From c5513d9a788bfb0b4560dcda2e9fcae4fbd1d321 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sat, 7 Sep 2019 18:01:50 +0530 Subject: [PATCH] Add support for adding PHP extensions --- .github/workflows/workflow.yml | 5 +- README.md | 16 +- action.yml | 4 +- lib/install.js | 167 +- node_modules/.bin/acorn | 15 - node_modules/.bin/acorn.cmd | 7 - node_modules/.bin/atob | 15 - node_modules/.bin/atob.cmd | 7 - node_modules/.bin/escodegen | 15 - node_modules/.bin/escodegen.cmd | 7 - node_modules/.bin/esgenerate | 15 - node_modules/.bin/esgenerate.cmd | 7 - node_modules/.bin/esparse | 15 - node_modules/.bin/esparse.cmd | 7 - node_modules/.bin/esvalidate | 15 - node_modules/.bin/esvalidate.cmd | 7 - node_modules/.bin/handlebars | 15 - node_modules/.bin/handlebars.cmd | 7 - node_modules/.bin/husky-upgrade | 15 - node_modules/.bin/husky-upgrade.cmd | 7 - node_modules/.bin/import-local-fixture | 15 - node_modules/.bin/import-local-fixture.cmd | 7 - node_modules/.bin/is-ci | 15 - node_modules/.bin/is-ci.cmd | 7 - node_modules/.bin/jest | 15 - node_modules/.bin/jest-runtime | 15 - node_modules/.bin/jest-runtime.cmd | 7 - node_modules/.bin/jest.cmd | 7 - node_modules/.bin/js-yaml | 15 - node_modules/.bin/js-yaml.cmd | 7 - node_modules/.bin/jsesc | 15 - node_modules/.bin/jsesc.cmd | 7 - node_modules/.bin/json5 | 15 - node_modules/.bin/json5.cmd | 7 - node_modules/.bin/loose-envify | 15 - node_modules/.bin/loose-envify.cmd | 7 - node_modules/.bin/mkdirp | 15 - node_modules/.bin/mkdirp.cmd | 7 - node_modules/.bin/parser | 15 - node_modules/.bin/parser.cmd | 7 - node_modules/.bin/prettier | 15 - node_modules/.bin/prettier.cmd | 7 - node_modules/.bin/rimraf | 15 - node_modules/.bin/rimraf.cmd | 7 - node_modules/.bin/run-node | 15 - node_modules/.bin/run-node.cmd | 7 - node_modules/.bin/sane | 15 - node_modules/.bin/sane.cmd | 7 - node_modules/.bin/sshpk-conv | 15 - node_modules/.bin/sshpk-conv.cmd | 7 - node_modules/.bin/sshpk-sign | 15 - node_modules/.bin/sshpk-sign.cmd | 7 - node_modules/.bin/sshpk-verify | 15 - node_modules/.bin/sshpk-verify.cmd | 7 - node_modules/.bin/ts-jest | 15 - node_modules/.bin/ts-jest.cmd | 7 - node_modules/.bin/uglifyjs | 15 - node_modules/.bin/uglifyjs.cmd | 7 - node_modules/.bin/watch | 15 - node_modules/.bin/watch.cmd | 7 - node_modules/.bin/which | 15 - node_modules/.bin/which.cmd | 7 - node_modules/@babel/code-frame/LICENSE | 22 - node_modules/@babel/code-frame/README.md | 19 - node_modules/@babel/code-frame/lib/index.js | 173 - node_modules/@babel/code-frame/package.json | 61 - node_modules/@babel/core/LICENSE | 22 - node_modules/@babel/core/README.md | 19 - .../@babel/core/lib/config/caching.js | 199 - .../@babel/core/lib/config/config-chain.js | 439 - .../core/lib/config/config-descriptors.js | 210 - .../core/lib/config/files/configuration.js | 323 - .../core/lib/config/files/index-browser.js | 59 - .../@babel/core/lib/config/files/index.js | 67 - .../@babel/core/lib/config/files/package.js | 76 - .../@babel/core/lib/config/files/plugins.js | 169 - .../@babel/core/lib/config/files/types.js | 0 .../@babel/core/lib/config/files/utils.js | 41 - node_modules/@babel/core/lib/config/full.js | 258 - .../core/lib/config/helpers/config-api.js | 86 - .../core/lib/config/helpers/environment.js | 10 - node_modules/@babel/core/lib/config/index.js | 29 - node_modules/@babel/core/lib/config/item.js | 66 - .../@babel/core/lib/config/partial.js | 141 - .../core/lib/config/pattern-to-regex.js | 52 - node_modules/@babel/core/lib/config/plugin.js | 22 - node_modules/@babel/core/lib/config/util.js | 30 - .../config/validation/option-assertions.js | 268 - .../core/lib/config/validation/options.js | 188 - .../core/lib/config/validation/plugins.js | 55 - .../core/lib/config/validation/removed.js | 66 - node_modules/@babel/core/lib/index.js | 240 - node_modules/@babel/core/lib/parse.js | 65 - .../core/lib/tools/build-external-helpers.js | 143 - node_modules/@babel/core/lib/transform-ast.js | 54 - .../@babel/core/lib/transform-file-browser.js | 26 - .../@babel/core/lib/transform-file.js | 91 - node_modules/@babel/core/lib/transform.js | 52 - .../lib/transformation/block-hoist-plugin.js | 67 - .../core/lib/transformation/file/file.js | 267 - .../core/lib/transformation/file/generate.js | 89 - .../core/lib/transformation/file/merge-map.js | 255 - .../@babel/core/lib/transformation/index.js | 106 - .../core/lib/transformation/normalize-file.js | 211 - .../core/lib/transformation/normalize-opts.js | 65 - .../core/lib/transformation/plugin-pass.js | 48 - .../util/missing-plugin-helper.js | 239 - .../@babel/core/node_modules/.bin/semver | 15 - .../@babel/core/node_modules/.bin/semver.cmd | 7 - .../core/node_modules/debug/CHANGELOG.md | 395 - .../@babel/core/node_modules/debug/LICENSE | 19 - .../@babel/core/node_modules/debug/README.md | 455 - .../core/node_modules/debug/dist/debug.js | 912 - .../core/node_modules/debug/package.json | 106 - .../core/node_modules/debug/src/browser.js | 264 - .../core/node_modules/debug/src/common.js | 266 - .../core/node_modules/debug/src/index.js | 10 - .../core/node_modules/debug/src/node.js | 257 - .../@babel/core/node_modules/ms/index.js | 162 - .../@babel/core/node_modules/ms/license.md | 21 - .../@babel/core/node_modules/ms/package.json | 73 - .../@babel/core/node_modules/ms/readme.md | 60 - .../core/node_modules/semver/CHANGELOG.md | 39 - .../@babel/core/node_modules/semver/LICENSE | 15 - .../@babel/core/node_modules/semver/README.md | 412 - .../core/node_modules/semver/bin/semver | 160 - .../core/node_modules/semver/package.json | 64 - .../@babel/core/node_modules/semver/range.bnf | 16 - .../@babel/core/node_modules/semver/semver.js | 1483 - .../core/node_modules/source-map/CHANGELOG.md | 301 - .../core/node_modules/source-map/LICENSE | 28 - .../core/node_modules/source-map/README.md | 729 - .../source-map/dist/source-map.debug.js | 3091 -- .../source-map/dist/source-map.js | 3090 -- .../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 - .../source-map/lib/binary-search.js | 111 - .../source-map/lib/mapping-list.js | 79 - .../node_modules/source-map/lib/quick-sort.js | 114 - .../source-map/lib/source-map-consumer.js | 1082 - .../source-map/lib/source-map-generator.js | 416 - .../source-map/lib/source-node.js | 413 - .../core/node_modules/source-map/lib/util.js | 417 - .../core/node_modules/source-map/package.json | 215 - .../node_modules/source-map/source-map.js | 8 - node_modules/@babel/core/package.json | 93 - node_modules/@babel/generator/LICENSE | 22 - node_modules/@babel/generator/README.md | 19 - node_modules/@babel/generator/lib/buffer.js | 257 - .../@babel/generator/lib/generators/base.js | 97 - .../generator/lib/generators/classes.js | 190 - .../generator/lib/generators/expressions.js | 292 - .../@babel/generator/lib/generators/flow.js | 639 - .../@babel/generator/lib/generators/index.js | 137 - .../@babel/generator/lib/generators/jsx.js | 145 - .../generator/lib/generators/methods.js | 167 - .../generator/lib/generators/modules.js | 214 - .../generator/lib/generators/statements.js | 319 - .../lib/generators/template-literals.js | 33 - .../@babel/generator/lib/generators/types.js | 198 - .../generator/lib/generators/typescript.js | 715 - node_modules/@babel/generator/lib/index.js | 92 - .../@babel/generator/lib/node/index.js | 117 - .../@babel/generator/lib/node/parentheses.js | 253 - .../@babel/generator/lib/node/whitespace.js | 192 - node_modules/@babel/generator/lib/printer.js | 501 - .../@babel/generator/lib/source-map.js | 81 - .../node_modules/source-map/CHANGELOG.md | 301 - .../generator/node_modules/source-map/LICENSE | 28 - .../node_modules/source-map/README.md | 729 - .../source-map/dist/source-map.debug.js | 3091 -- .../source-map/dist/source-map.js | 3090 -- .../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 - .../source-map/lib/binary-search.js | 111 - .../source-map/lib/mapping-list.js | 79 - .../node_modules/source-map/lib/quick-sort.js | 114 - .../source-map/lib/source-map-consumer.js | 1082 - .../source-map/lib/source-map-generator.js | 416 - .../source-map/lib/source-node.js | 413 - .../node_modules/source-map/lib/util.js | 417 - .../node_modules/source-map/package.json | 215 - .../node_modules/source-map/source-map.js | 8 - node_modules/@babel/generator/package.json | 66 - .../@babel/helper-function-name/LICENSE | 22 - .../@babel/helper-function-name/README.md | 19 - .../@babel/helper-function-name/lib/index.js | 198 - .../@babel/helper-function-name/package.json | 49 - .../@babel/helper-get-function-arity/LICENSE | 22 - .../helper-get-function-arity/README.md | 19 - .../helper-get-function-arity/lib/index.js | 32 - .../helper-get-function-arity/package.json | 44 - .../@babel/helper-plugin-utils/LICENSE | 22 - .../@babel/helper-plugin-utils/README.md | 19 - .../@babel/helper-plugin-utils/lib/index.js | 77 - .../@babel/helper-plugin-utils/package.json | 47 - .../@babel/helper-plugin-utils/src/index.js | 95 - .../helper-split-export-declaration/LICENSE | 22 - .../helper-split-export-declaration/README.md | 19 - .../lib/index.js | 68 - .../package.json | 48 - node_modules/@babel/helpers/LICENSE | 22 - node_modules/@babel/helpers/README.md | 19 - node_modules/@babel/helpers/lib/helpers.js | 1882 - node_modules/@babel/helpers/lib/index.js | 290 - node_modules/@babel/helpers/package.json | 58 - node_modules/@babel/highlight/LICENSE | 22 - node_modules/@babel/highlight/README.md | 19 - node_modules/@babel/highlight/lib/index.js | 129 - node_modules/@babel/highlight/package.json | 58 - node_modules/@babel/parser/CHANGELOG.md | 1073 - node_modules/@babel/parser/LICENSE | 19 - node_modules/@babel/parser/README.md | 19 - .../@babel/parser/bin/babel-parser.js | 16 - node_modules/@babel/parser/lib/index.js | 11353 ---- node_modules/@babel/parser/package.json | 81 - .../@babel/parser/typings/babel-parser.d.ts | 135 - .../plugin-syntax-object-rest-spread/LICENSE | 22 - .../README.md | 19 - .../lib/index.js | 30 - .../package.json | 56 - node_modules/@babel/template/LICENSE | 22 - node_modules/@babel/template/README.md | 19 - node_modules/@babel/template/lib/builder.js | 83 - .../@babel/template/lib/formatters.js | 63 - node_modules/@babel/template/lib/index.js | 36 - node_modules/@babel/template/lib/literal.js | 82 - node_modules/@babel/template/lib/options.js | 82 - node_modules/@babel/template/lib/parse.js | 193 - node_modules/@babel/template/lib/populate.js | 133 - node_modules/@babel/template/lib/string.js | 24 - node_modules/@babel/template/package.json | 58 - node_modules/@babel/traverse/LICENSE | 22 - node_modules/@babel/traverse/README.md | 19 - node_modules/@babel/traverse/lib/cache.js | 26 - node_modules/@babel/traverse/lib/context.js | 152 - node_modules/@babel/traverse/lib/hub.js | 23 - node_modules/@babel/traverse/lib/index.js | 130 - .../@babel/traverse/lib/path/ancestry.js | 188 - .../@babel/traverse/lib/path/comments.js | 47 - .../@babel/traverse/lib/path/context.js | 245 - .../@babel/traverse/lib/path/conversion.js | 463 - .../@babel/traverse/lib/path/evaluation.js | 404 - .../@babel/traverse/lib/path/family.js | 241 - .../@babel/traverse/lib/path/index.js | 219 - .../traverse/lib/path/inference/index.js | 132 - .../lib/path/inference/inferer-reference.js | 181 - .../traverse/lib/path/inference/inferers.js | 227 - .../@babel/traverse/lib/path/introspection.js | 371 - .../@babel/traverse/lib/path/lib/hoister.js | 188 - .../traverse/lib/path/lib/removal-hooks.js | 38 - .../traverse/lib/path/lib/virtual-types.js | 216 - .../@babel/traverse/lib/path/modification.js | 222 - .../@babel/traverse/lib/path/removal.js | 65 - .../@babel/traverse/lib/path/replacement.js | 266 - .../@babel/traverse/lib/scope/binding.js | 71 - .../@babel/traverse/lib/scope/index.js | 892 - .../@babel/traverse/lib/scope/lib/renamer.js | 138 - node_modules/@babel/traverse/lib/visitors.js | 254 - .../traverse/node_modules/debug/CHANGELOG.md | 395 - .../traverse/node_modules/debug/LICENSE | 19 - .../traverse/node_modules/debug/README.md | 455 - .../traverse/node_modules/debug/dist/debug.js | 912 - .../traverse/node_modules/debug/package.json | 106 - .../node_modules/debug/src/browser.js | 264 - .../traverse/node_modules/debug/src/common.js | 266 - .../traverse/node_modules/debug/src/index.js | 10 - .../traverse/node_modules/debug/src/node.js | 257 - .../@babel/traverse/node_modules/ms/index.js | 162 - .../traverse/node_modules/ms/license.md | 21 - .../traverse/node_modules/ms/package.json | 73 - .../@babel/traverse/node_modules/ms/readme.md | 60 - node_modules/@babel/traverse/package.json | 68 - node_modules/@babel/types/LICENSE | 22 - node_modules/@babel/types/README.md | 19 - .../@babel/types/lib/asserts/assertNode.js | 17 - .../types/lib/asserts/generated/index.js | 1364 - .../@babel/types/lib/builders/builder.js | 50 - .../flow/createTypeAnnotationBasedOnTypeof.js | 28 - .../flow/createUnionTypeAnnotation.js | 22 - .../types/lib/builders/generated/index.js | 1148 - .../types/lib/builders/react/buildChildren.js | 31 - node_modules/@babel/types/lib/clone/clone.js | 14 - .../@babel/types/lib/clone/cloneDeep.js | 14 - .../@babel/types/lib/clone/cloneNode.js | 78 - .../@babel/types/lib/clone/cloneWithoutLoc.js | 16 - .../@babel/types/lib/comments/addComment.js | 17 - .../@babel/types/lib/comments/addComments.js | 23 - .../lib/comments/inheritInnerComments.js | 14 - .../lib/comments/inheritLeadingComments.js | 14 - .../lib/comments/inheritTrailingComments.js | 14 - .../types/lib/comments/inheritsComments.js | 21 - .../types/lib/comments/removeComments.js | 16 - .../types/lib/constants/generated/index.js | 93 - .../@babel/types/lib/constants/index.js | 47 - .../types/lib/converters/ensureBlock.js | 14 - .../converters/gatherSequenceExpressions.js | 73 - .../lib/converters/toBindingIdentifierName.js | 16 - .../@babel/types/lib/converters/toBlock.js | 34 - .../types/lib/converters/toComputedKey.js | 15 - .../types/lib/converters/toExpression.js | 30 - .../types/lib/converters/toIdentifier.js | 25 - .../@babel/types/lib/converters/toKeyAlias.js | 48 - .../lib/converters/toSequenceExpression.js | 23 - .../types/lib/converters/toStatement.js | 44 - .../types/lib/converters/valueToNode.js | 104 - .../@babel/types/lib/definitions/core.js | 725 - .../@babel/types/lib/definitions/es2015.js | 401 - .../types/lib/definitions/experimental.js | 205 - .../@babel/types/lib/definitions/flow.js | 386 - .../@babel/types/lib/definitions/index.js | 101 - .../@babel/types/lib/definitions/jsx.js | 160 - .../@babel/types/lib/definitions/misc.js | 23 - .../types/lib/definitions/placeholders.js | 33 - .../types/lib/definitions/typescript.js | 412 - .../@babel/types/lib/definitions/utils.js | 249 - node_modules/@babel/types/lib/index.d.ts | 2073 - node_modules/@babel/types/lib/index.js | 579 - node_modules/@babel/types/lib/index.js.flow | 1975 - .../modifications/appendToMemberExpression.js | 15 - .../flow/removeTypeDuplicates.js | 74 - .../types/lib/modifications/inherits.js | 33 - .../prependToMemberExpression.js | 13 - .../lib/modifications/removeProperties.js | 30 - .../lib/modifications/removePropertiesDeep.js | 17 - .../lib/retrievers/getBindingIdentifiers.js | 103 - .../retrievers/getOuterBindingIdentifiers.js | 14 - .../@babel/types/lib/traverse/traverse.js | 55 - .../@babel/types/lib/traverse/traverseFast.js | 28 - .../@babel/types/lib/utils/inherit.js | 24 - .../react/cleanJSXElementLiteralChild.js | 47 - .../@babel/types/lib/utils/shallowEqual.js | 18 - .../validators/buildMatchMemberExpression.js | 15 - .../types/lib/validators/generated/index.js | 4317 -- .../@babel/types/lib/validators/is.js | 35 - .../@babel/types/lib/validators/isBinding.js | 33 - .../types/lib/validators/isBlockScoped.js | 16 - .../types/lib/validators/isImmutable.js | 26 - .../@babel/types/lib/validators/isLet.js | 14 - .../@babel/types/lib/validators/isNode.js | 12 - .../types/lib/validators/isNodesEquivalent.js | 67 - .../types/lib/validators/isPlaceholderType.js | 21 - .../types/lib/validators/isReferenced.js | 112 - .../@babel/types/lib/validators/isScope.js | 24 - .../lib/validators/isSpecifierDefault.js | 14 - .../@babel/types/lib/validators/isType.js | 24 - .../lib/validators/isValidES3Identifier.js | 16 - .../types/lib/validators/isValidIdentifier.js | 28 - .../@babel/types/lib/validators/isVar.js | 16 - .../types/lib/validators/matchesPattern.js | 40 - .../types/lib/validators/react/isCompatTag.js | 10 - .../lib/validators/react/isReactComponent.js | 14 - .../@babel/types/lib/validators/validate.js | 23 - node_modules/@babel/types/package.json | 70 - .../types/scripts/generateTypeHelpers.js | 29 - .../@babel/types/scripts/generators/docs.js | 117 - .../@babel/types/scripts/generators/flow.js | 153 - .../scripts/generators/generateAsserts.js | 43 - .../scripts/generators/generateBuilders.js | 43 - .../scripts/generators/generateConstants.js | 17 - .../scripts/generators/generateValidators.js | 78 - .../types/scripts/generators/typescript.js | 200 - .../types/scripts/utils/formatBuilderName.js | 9 - .../@babel/types/scripts/utils/lowerFirst.js | 4 - .../types/scripts/utils/stringifyValidator.js | 66 - .../types/scripts/utils/toFunctionName.js | 4 - node_modules/@cnakazawa/watch/LICENSE | 55 - node_modules/@cnakazawa/watch/README.md | 153 - node_modules/@cnakazawa/watch/cli.js | 83 - node_modules/@cnakazawa/watch/main.js | 168 - node_modules/@cnakazawa/watch/package.json | 73 - .../@cnakazawa/watch/scripts/release.sh | 90 - node_modules/@cnakazawa/watch/test/d/d/t | 0 node_modules/@cnakazawa/watch/test/d/t | 0 .../@cnakazawa/watch/test/test_monitor.js | 31 - .../watch/test/test_monitorRootDirectory.js | 28 - .../@cnakazawa/watch/test/test_watchTree.js | 23 - node_modules/@jest/console/LICENSE | 21 - .../@jest/console/build/BufferedConsole.d.ts | 36 - .../console/build/BufferedConsole.d.ts.map | 1 - .../@jest/console/build/BufferedConsole.js | 232 - .../@jest/console/build/CustomConsole.d.ts | 39 - .../console/build/CustomConsole.d.ts.map | 1 - .../@jest/console/build/CustomConsole.js | 216 - .../@jest/console/build/NullConsole.d.ts | 20 - .../@jest/console/build/NullConsole.d.ts.map | 1 - .../@jest/console/build/NullConsole.js | 42 - .../@jest/console/build/getConsoleOutput.d.ts | 9 - .../console/build/getConsoleOutput.d.ts.map | 1 - .../@jest/console/build/getConsoleOutput.js | 80 - node_modules/@jest/console/build/index.d.ts | 12 - .../@jest/console/build/index.d.ts.map | 1 - node_modules/@jest/console/build/index.js | 61 - node_modules/@jest/console/build/types.d.ts | 21 - .../@jest/console/build/types.d.ts.map | 1 - node_modules/@jest/console/build/types.js | 1 - .../@jest/console/node_modules/slash/index.js | 11 - .../@jest/console/node_modules/slash/license | 9 - .../console/node_modules/slash/package.json | 70 - .../console/node_modules/slash/readme.md | 44 - node_modules/@jest/console/package.json | 65 - node_modules/@jest/core/README.md | 3 - .../@jest/core/build/FailedTestsCache.d.ts | 16 - .../core/build/FailedTestsCache.d.ts.map | 1 - .../@jest/core/build/FailedTestsCache.js | 88 - .../@jest/core/build/ReporterDispatcher.d.ts | 23 - .../core/build/ReporterDispatcher.d.ts.map | 1 - .../@jest/core/build/ReporterDispatcher.js | 231 - .../@jest/core/build/SearchSource.d.ts | 43 - .../@jest/core/build/SearchSource.d.ts.map | 1 - node_modules/@jest/core/build/SearchSource.js | 425 - .../core/build/SnapshotInteractiveMode.d.ts | 31 - .../build/SnapshotInteractiveMode.d.ts.map | 1 - .../core/build/SnapshotInteractiveMode.js | 328 - .../core/build/TestNamePatternPrompt.d.ts | 18 - .../core/build/TestNamePatternPrompt.d.ts.map | 1 - .../@jest/core/build/TestNamePatternPrompt.js | 86 - .../core/build/TestPathPatternPrompt.d.ts | 25 - .../core/build/TestPathPatternPrompt.d.ts.map | 1 - .../@jest/core/build/TestPathPatternPrompt.js | 81 - .../@jest/core/build/TestScheduler.d.ts | 41 - .../@jest/core/build/TestScheduler.d.ts.map | 1 - .../@jest/core/build/TestScheduler.js | 563 - .../@jest/core/build/TestWatcher.d.ts | 23 - .../@jest/core/build/TestWatcher.d.ts.map | 1 - node_modules/@jest/core/build/TestWatcher.js | 60 - .../@jest/core/build/assets/jest_logo.png | Bin 3157 -> 0 bytes node_modules/@jest/core/build/cli/index.d.ts | 100 - .../@jest/core/build/cli/index.d.ts.map | 1 - node_modules/@jest/core/build/cli/index.js | 471 - .../@jest/core/build/collectHandles.d.ts | 10 - .../@jest/core/build/collectHandles.d.ts.map | 1 - .../@jest/core/build/collectHandles.js | 149 - .../core/build/getChangedFilesPromise.d.ts | 10 - .../build/getChangedFilesPromise.d.ts.map | 1 - .../core/build/getChangedFilesPromise.js | 78 - .../@jest/core/build/getNoTestFound.d.ts | 10 - .../@jest/core/build/getNoTestFound.d.ts.map | 1 - .../@jest/core/build/getNoTestFound.js | 63 - .../core/build/getNoTestFoundFailed.d.ts | 8 - .../core/build/getNoTestFoundFailed.d.ts.map | 1 - .../@jest/core/build/getNoTestFoundFailed.js | 33 - .../build/getNoTestFoundPassWithNoTests.d.ts | 8 - .../getNoTestFoundPassWithNoTests.d.ts.map | 1 - .../build/getNoTestFoundPassWithNoTests.js | 30 - .../getNoTestFoundRelatedToChangedFiles.d.ts | 9 - ...tNoTestFoundRelatedToChangedFiles.d.ts.map | 1 - .../getNoTestFoundRelatedToChangedFiles.js | 57 - .../core/build/getNoTestFoundVerbose.d.ts | 10 - .../core/build/getNoTestFoundVerbose.d.ts.map | 1 - .../@jest/core/build/getNoTestFoundVerbose.js | 95 - .../core/build/getNoTestsFoundMessage.d.ts | 10 - .../build/getNoTestsFoundMessage.d.ts.map | 1 - .../core/build/getNoTestsFoundMessage.js | 52 - node_modules/@jest/core/build/jest.d.ts | 12 - node_modules/@jest/core/build/jest.d.ts.map | 1 - node_modules/@jest/core/build/jest.js | 49 - .../build/lib/active_filters_message.d.ts | 10 - .../build/lib/active_filters_message.d.ts.map | 1 - .../core/build/lib/active_filters_message.js | 55 - .../@jest/core/build/lib/create_context.d.ts | 10 - .../core/build/lib/create_context.d.ts.map | 1 - .../@jest/core/build/lib/create_context.js | 35 - .../lib/handle_deprecation_warnings.d.ts | 10 - .../lib/handle_deprecation_warnings.d.ts.map | 1 - .../build/lib/handle_deprecation_warnings.js | 72 - .../@jest/core/build/lib/is_valid_path.d.ts | 9 - .../core/build/lib/is_valid_path.d.ts.map | 1 - .../@jest/core/build/lib/is_valid_path.js | 29 - .../core/build/lib/log_debug_messages.d.ts | 10 - .../build/lib/log_debug_messages.d.ts.map | 1 - .../core/build/lib/log_debug_messages.js | 23 - .../core/build/lib/update_global_config.d.ts | 12 - .../build/lib/update_global_config.d.ts.map | 1 - .../core/build/lib/update_global_config.js | 142 - .../core/build/lib/watch_plugins_helpers.d.ts | 11 - .../build/lib/watch_plugins_helpers.d.ts.map | 1 - .../core/build/lib/watch_plugins_helpers.js | 62 - .../@jest/core/build/plugins/quit.d.ts | 22 - .../@jest/core/build/plugins/quit.d.ts.map | 1 - node_modules/@jest/core/build/plugins/quit.js | 96 - .../core/build/plugins/test_name_pattern.d.ts | 25 - .../build/plugins/test_name_pattern.d.ts.map | 1 - .../core/build/plugins/test_name_pattern.js | 91 - .../core/build/plugins/test_path_pattern.d.ts | 25 - .../build/plugins/test_path_pattern.d.ts.map | 1 - .../core/build/plugins/test_path_pattern.js | 91 - .../core/build/plugins/update_snapshots.d.ts | 25 - .../build/plugins/update_snapshots.d.ts.map | 1 - .../core/build/plugins/update_snapshots.js | 70 - .../plugins/update_snapshots_interactive.d.ts | 24 - .../update_snapshots_interactive.d.ts.map | 1 - .../plugins/update_snapshots_interactive.js | 135 - node_modules/@jest/core/build/pluralize.d.ts | 8 - .../@jest/core/build/pluralize.d.ts.map | 1 - node_modules/@jest/core/build/pluralize.js | 16 - .../@jest/core/build/runGlobalHook.d.ts | 14 - .../@jest/core/build/runGlobalHook.d.ts.map | 1 - .../@jest/core/build/runGlobalHook.js | 149 - node_modules/@jest/core/build/runJest.d.ts | 28 - .../@jest/core/build/runJest.d.ts.map | 1 - node_modules/@jest/core/build/runJest.js | 446 - .../@jest/core/build/testSchedulerHelper.d.ts | 10 - .../core/build/testSchedulerHelper.d.ts.map | 1 - .../@jest/core/build/testSchedulerHelper.js | 51 - node_modules/@jest/core/build/types.d.ts | 40 - node_modules/@jest/core/build/types.d.ts.map | 1 - node_modules/@jest/core/build/types.js | 1 - node_modules/@jest/core/build/version.d.ts | 8 - .../@jest/core/build/version.d.ts.map | 1 - node_modules/@jest/core/build/version.js | 20 - node_modules/@jest/core/build/watch.d.ts | 14 - node_modules/@jest/core/build/watch.d.ts.map | 1 - node_modules/@jest/core/build/watch.js | 776 - .../@jest/core/node_modules/slash/index.js | 11 - .../@jest/core/node_modules/slash/license | 9 - .../core/node_modules/slash/package.json | 70 - .../@jest/core/node_modules/slash/readme.md | 44 - node_modules/@jest/core/package.json | 121 - .../@jest/environment/build/index.d.ts | 264 - .../@jest/environment/build/index.d.ts.map | 1 - node_modules/@jest/environment/build/index.js | 25 - node_modules/@jest/environment/package.json | 65 - node_modules/@jest/fake-timers/LICENSE | 21 - .../@jest/fake-timers/build/index.d.ts | 8 - .../@jest/fake-timers/build/index.d.ts.map | 1 - node_modules/@jest/fake-timers/build/index.js | 17 - .../fake-timers/build/jestFakeTimers.d.ts | 64 - .../fake-timers/build/jestFakeTimers.d.ts.map | 1 - .../@jest/fake-timers/build/jestFakeTimers.js | 574 - node_modules/@jest/fake-timers/package.json | 61 - .../@jest/reporters/build/Status.d.ts | 39 - .../@jest/reporters/build/Status.d.ts.map | 1 - node_modules/@jest/reporters/build/Status.js | 248 - .../@jest/reporters/build/base_reporter.d.ts | 19 - .../reporters/build/base_reporter.d.ts.map | 1 - .../@jest/reporters/build/base_reporter.js | 63 - .../reporters/build/coverage_reporter.d.ts | 24 - .../build/coverage_reporter.d.ts.map | 1 - .../reporters/build/coverage_reporter.js | 571 - .../reporters/build/coverage_worker.d.ts | 18 - .../reporters/build/coverage_worker.d.ts.map | 1 - .../@jest/reporters/build/coverage_worker.js | 87 - .../reporters/build/default_reporter.d.ts | 31 - .../reporters/build/default_reporter.d.ts.map | 1 - .../@jest/reporters/build/default_reporter.js | 268 - .../build/generateEmptyCoverage.d.ts | 13 - .../build/generateEmptyCoverage.d.ts.map | 1 - .../reporters/build/generateEmptyCoverage.js | 75 - .../reporters/build/get_result_header.d.ts | 11 - .../build/get_result_header.d.ts.map | 1 - .../reporters/build/get_result_header.js | 73 - .../reporters/build/get_snapshot_status.d.ts | 17 - .../build/get_snapshot_status.d.ts.map | 1 - .../reporters/build/get_snapshot_status.js | 113 - .../reporters/build/get_snapshot_summary.d.ts | 11 - .../build/get_snapshot_summary.d.ts.map | 1 - .../reporters/build/get_snapshot_summary.js | 222 - node_modules/@jest/reporters/build/index.d.ts | 14 - .../@jest/reporters/build/index.d.ts.map | 1 - node_modules/@jest/reporters/build/index.js | 71 - .../reporters/build/notify_reporter.d.ts | 18 - .../reporters/build/notify_reporter.d.ts.map | 1 - .../@jest/reporters/build/notify_reporter.js | 243 - .../reporters/build/summary_reporter.d.ts | 22 - .../reporters/build/summary_reporter.d.ts.map | 1 - .../@jest/reporters/build/summary_reporter.js | 275 - node_modules/@jest/reporters/build/types.d.ts | 73 - .../@jest/reporters/build/types.d.ts.map | 1 - node_modules/@jest/reporters/build/types.js | 3 - node_modules/@jest/reporters/build/utils.d.ts | 19 - .../@jest/reporters/build/utils.d.ts.map | 1 - node_modules/@jest/reporters/build/utils.js | 352 - .../reporters/build/verbose_reporter.d.ts | 25 - .../reporters/build/verbose_reporter.d.ts.map | 1 - .../@jest/reporters/build/verbose_reporter.js | 231 - .../reporters/node_modules/slash/index.js | 11 - .../reporters/node_modules/slash/license | 9 - .../reporters/node_modules/slash/package.json | 70 - .../reporters/node_modules/slash/readme.md | 44 - node_modules/@jest/reporters/package.json | 90 - node_modules/@jest/source-map/LICENSE | 21 - .../@jest/source-map/build/getCallsite.d.ts | 10 - .../source-map/build/getCallsite.d.ts.map | 1 - .../@jest/source-map/build/getCallsite.js | 107 - .../@jest/source-map/build/index.d.ts | 9 - .../@jest/source-map/build/index.d.ts.map | 1 - node_modules/@jest/source-map/build/index.js | 25 - .../@jest/source-map/build/types.d.ts | 8 - .../@jest/source-map/build/types.d.ts.map | 1 - node_modules/@jest/source-map/build/types.js | 1 - .../node_modules/callsites/index.d.ts | 96 - .../node_modules/callsites/index.js | 13 - .../source-map/node_modules/callsites/license | 9 - .../node_modules/callsites/package.json | 75 - .../node_modules/callsites/readme.md | 48 - node_modules/@jest/source-map/package.json | 63 - node_modules/@jest/test-result/LICENSE | 21 - .../test-result/build/formatTestResults.d.ts | 9 - .../build/formatTestResults.d.ts.map | 1 - .../test-result/build/formatTestResults.js | 104 - .../@jest/test-result/build/helpers.d.ts | 11 - .../@jest/test-result/build/helpers.d.ts.map | 1 - .../@jest/test-result/build/helpers.js | 153 - .../@jest/test-result/build/index.d.ts | 10 - .../@jest/test-result/build/index.d.ts.map | 1 - node_modules/@jest/test-result/build/index.js | 99 - .../@jest/test-result/build/types.d.ts | 166 - .../@jest/test-result/build/types.d.ts.map | 1 - node_modules/@jest/test-result/build/types.js | 1 - node_modules/@jest/test-result/package.json | 67 - .../@jest/test-sequencer/build/index.d.ts | 52 - .../@jest/test-sequencer/build/index.d.ts.map | 1 - .../@jest/test-sequencer/build/index.js | 178 - .../@jest/test-sequencer/package.json | 59 - .../transform/build/ScriptTransformer.d.ts | 39 - .../build/ScriptTransformer.d.ts.map | 1 - .../transform/build/ScriptTransformer.js | 863 - .../build/enhanceUnexpectedTokenMessage.d.ts | 8 - .../enhanceUnexpectedTokenMessage.d.ts.map | 1 - .../build/enhanceUnexpectedTokenMessage.js | 56 - node_modules/@jest/transform/build/index.d.ts | 10 - .../@jest/transform/build/index.d.ts.map | 1 - node_modules/@jest/transform/build/index.js | 45 - .../transform/build/shouldInstrument.d.ts | 10 - .../transform/build/shouldInstrument.d.ts.map | 1 - .../@jest/transform/build/shouldInstrument.js | 147 - node_modules/@jest/transform/build/types.d.ts | 46 - .../@jest/transform/build/types.d.ts.map | 1 - node_modules/@jest/transform/build/types.js | 1 - .../transform/node_modules/slash/index.js | 11 - .../transform/node_modules/slash/license | 9 - .../transform/node_modules/slash/package.json | 70 - .../transform/node_modules/slash/readme.md | 44 - node_modules/@jest/transform/package.json | 82 - node_modules/@jest/types/LICENSE | 21 - node_modules/@jest/types/build/Circus.d.ts | 172 - .../@jest/types/build/Circus.d.ts.map | 1 - node_modules/@jest/types/build/Circus.js | 1 - node_modules/@jest/types/build/Config.d.ts | 439 - .../@jest/types/build/Config.d.ts.map | 1 - node_modules/@jest/types/build/Config.js | 1 - node_modules/@jest/types/build/Global.d.ts | 74 - .../@jest/types/build/Global.d.ts.map | 1 - node_modules/@jest/types/build/Global.js | 1 - node_modules/@jest/types/build/index.d.ts | 11 - node_modules/@jest/types/build/index.d.ts.map | 1 - node_modules/@jest/types/build/index.js | 43 - node_modules/@jest/types/package.json | 85 - node_modules/@types/babel__core/LICENSE | 21 - node_modules/@types/babel__core/README.md | 16 - node_modules/@types/babel__core/index.d.ts | 687 - node_modules/@types/babel__core/package.json | 75 - node_modules/@types/babel__generator/LICENSE | 21 - .../@types/babel__generator/README.md | 16 - .../@types/babel__generator/index.d.ts | 117 - .../@types/babel__generator/package.json | 66 - node_modules/@types/babel__template/LICENSE | 21 - node_modules/@types/babel__template/README.md | 16 - .../@types/babel__template/index.d.ts | 72 - .../@types/babel__template/package.json | 67 - node_modules/@types/babel__traverse/LICENSE | 21 - node_modules/@types/babel__traverse/README.md | 16 - .../@types/babel__traverse/index.d.ts | 829 - .../@types/babel__traverse/package.json | 72 - .../@types/istanbul-lib-coverage/LICENSE | 21 - .../@types/istanbul-lib-coverage/README.md | 16 - .../@types/istanbul-lib-coverage/index.d.ts | 118 - .../@types/istanbul-lib-coverage/package.json | 64 - .../@types/istanbul-lib-report/LICENSE | 21 - .../@types/istanbul-lib-report/README.md | 16 - .../@types/istanbul-lib-report/index.d.ts | 82 - .../@types/istanbul-lib-report/package.json | 59 - node_modules/@types/istanbul-reports/LICENSE | 21 - .../@types/istanbul-reports/README.md | 16 - .../@types/istanbul-reports/index.d.ts | 50 - .../@types/istanbul-reports/package.json | 60 - node_modules/@types/jest-diff/LICENSE | 21 - node_modules/@types/jest-diff/README.md | 16 - node_modules/@types/jest-diff/index.d.ts | 18 - node_modules/@types/jest-diff/package.json | 56 - node_modules/@types/jest/LICENSE | 21 - node_modules/@types/jest/README.md | 17 - node_modules/@types/jest/index.d.ts | 1848 - node_modules/@types/jest/package.json | 143 - node_modules/@types/node/LICENSE | 21 - node_modules/@types/node/README.md | 16 - node_modules/@types/node/assert.d.ts | 52 - node_modules/@types/node/async_hooks.d.ts | 132 - node_modules/@types/node/base.d.ts | 41 - node_modules/@types/node/buffer.d.ts | 22 - node_modules/@types/node/child_process.d.ts | 478 - node_modules/@types/node/cluster.d.ts | 260 - node_modules/@types/node/console.d.ts | 3 - node_modules/@types/node/constants.d.ts | 278 - node_modules/@types/node/crypto.d.ts | 602 - node_modules/@types/node/dgram.d.ts | 102 - node_modules/@types/node/dns.d.ts | 366 - node_modules/@types/node/domain.d.ts | 16 - node_modules/@types/node/events.d.ts | 30 - node_modules/@types/node/fs.d.ts | 2297 - node_modules/@types/node/globals.d.ts | 1180 - node_modules/@types/node/http.d.ts | 370 - node_modules/@types/node/http2.d.ts | 960 - node_modules/@types/node/https.d.ts | 53 - node_modules/@types/node/index.d.ts | 100 - node_modules/@types/node/inspector.d.ts | 3034 -- node_modules/@types/node/module.d.ts | 3 - node_modules/@types/node/net.d.ts | 249 - node_modules/@types/node/os.d.ts | 201 - node_modules/@types/node/package.json | 208 - node_modules/@types/node/path.d.ts | 159 - node_modules/@types/node/perf_hooks.d.ts | 304 - node_modules/@types/node/process.d.ts | 3 - node_modules/@types/node/punycode.d.ts | 12 - node_modules/@types/node/querystring.d.ts | 32 - node_modules/@types/node/readline.d.ts | 150 - node_modules/@types/node/repl.d.ts | 382 - node_modules/@types/node/stream.d.ts | 307 - node_modules/@types/node/string_decoder.d.ts | 7 - node_modules/@types/node/timers.d.ts | 16 - node_modules/@types/node/tls.d.ts | 418 - node_modules/@types/node/trace_events.d.ts | 61 - node_modules/@types/node/ts3.2/globals.d.ts | 19 - node_modules/@types/node/ts3.2/index.d.ts | 20 - node_modules/@types/node/ts3.2/util.d.ts | 15 - node_modules/@types/node/tty.d.ts | 65 - node_modules/@types/node/url.d.ts | 104 - node_modules/@types/node/util.d.ts | 165 - node_modules/@types/node/v8.d.ts | 52 - node_modules/@types/node/vm.d.ts | 95 - node_modules/@types/node/worker_threads.d.ts | 153 - node_modules/@types/node/zlib.d.ts | 352 - .../@types/normalize-package-data/LICENSE | 21 - .../@types/normalize-package-data/README.md | 16 - .../@types/normalize-package-data/index.d.ts | 46 - .../normalize-package-data/package.json | 55 - node_modules/@types/stack-utils/LICENSE | 21 - node_modules/@types/stack-utils/README.md | 16 - node_modules/@types/stack-utils/index.d.ts | 64 - node_modules/@types/stack-utils/package.json | 55 - node_modules/@types/yargs-parser/LICENSE | 21 - node_modules/@types/yargs-parser/README.md | 16 - node_modules/@types/yargs-parser/index.d.ts | 100 - node_modules/@types/yargs-parser/package.json | 57 - node_modules/@types/yargs/LICENSE | 21 - node_modules/@types/yargs/README.md | 16 - node_modules/@types/yargs/index.d.ts | 761 - node_modules/@types/yargs/package.json | 85 - node_modules/@types/yargs/yargs.d.ts | 9 - node_modules/abab/CHANGELOG.md | 28 - node_modules/abab/LICENSE.md | 13 - node_modules/abab/README.md | 50 - node_modules/abab/index.d.ts | 2 - node_modules/abab/index.js | 9 - node_modules/abab/lib/atob.js | 107 - node_modules/abab/lib/btoa.js | 66 - node_modules/abab/package.json | 75 - node_modules/acorn-globals/LICENSE | 19 - node_modules/acorn-globals/README.md | 81 - node_modules/acorn-globals/index.js | 179 - .../acorn-globals/node_modules/.bin/acorn | 15 - .../acorn-globals/node_modules/.bin/acorn.cmd | 7 - .../node_modules/acorn/CHANGELOG.md | 544 - .../acorn-globals/node_modules/acorn/LICENSE | 19 - .../node_modules/acorn/README.md | 269 - .../node_modules/acorn/bin/acorn | 4 - .../node_modules/acorn/dist/acorn.d.ts | 209 - .../node_modules/acorn/dist/acorn.js | 4968 -- .../node_modules/acorn/dist/acorn.js.map | 1 - .../node_modules/acorn/dist/acorn.mjs | 4937 -- .../node_modules/acorn/dist/acorn.mjs.map | 1 - .../node_modules/acorn/dist/bin.js | 64 - .../node_modules/acorn/package.json | 70 - node_modules/acorn-globals/package.json | 70 - node_modules/acorn-walk/CHANGELOG.md | 103 - node_modules/acorn-walk/LICENSE | 19 - node_modules/acorn-walk/README.md | 126 - node_modules/acorn-walk/dist/walk.js | 458 - node_modules/acorn-walk/dist/walk.js.map | 1 - node_modules/acorn-walk/dist/walk.mjs | 438 - node_modules/acorn-walk/dist/walk.mjs.map | 1 - node_modules/acorn-walk/package.json | 67 - node_modules/acorn/AUTHORS | 79 - node_modules/acorn/CHANGELOG.md | 508 - node_modules/acorn/LICENSE | 19 - node_modules/acorn/README.md | 467 - node_modules/acorn/bin/_acorn.js | 69 - node_modules/acorn/bin/acorn | 4 - node_modules/acorn/bin/run_test262.js | 21 - node_modules/acorn/bin/test262.whitelist | 404 - node_modules/acorn/dist/.keep | 0 node_modules/acorn/dist/acorn.es.js | 5314 -- node_modules/acorn/dist/acorn.js | 5345 -- node_modules/acorn/dist/acorn_loose.es.js | 1424 - node_modules/acorn/dist/acorn_loose.js | 1434 - node_modules/acorn/dist/walk.es.js | 423 - node_modules/acorn/dist/walk.js | 443 - node_modules/acorn/package.json | 328 - node_modules/ajv/.tonic_example.js | 20 - node_modules/ajv/LICENSE | 22 - node_modules/ajv/README.md | 1359 - node_modules/ajv/dist/ajv.bundle.js | 7172 --- node_modules/ajv/dist/ajv.min.js | 3 - node_modules/ajv/dist/ajv.min.js.map | 1 - node_modules/ajv/lib/ajv.d.ts | 390 - node_modules/ajv/lib/ajv.js | 497 - node_modules/ajv/lib/cache.js | 26 - node_modules/ajv/lib/compile/async.js | 90 - node_modules/ajv/lib/compile/equal.js | 5 - node_modules/ajv/lib/compile/error_classes.js | 34 - node_modules/ajv/lib/compile/formats.js | 149 - node_modules/ajv/lib/compile/index.js | 387 - node_modules/ajv/lib/compile/resolve.js | 270 - node_modules/ajv/lib/compile/rules.js | 66 - node_modules/ajv/lib/compile/schema_obj.js | 9 - node_modules/ajv/lib/compile/ucs2length.js | 20 - node_modules/ajv/lib/compile/util.js | 274 - node_modules/ajv/lib/data.js | 49 - node_modules/ajv/lib/definition_schema.js | 37 - node_modules/ajv/lib/dot/_limit.jst | 104 - node_modules/ajv/lib/dot/_limitItems.jst | 10 - node_modules/ajv/lib/dot/_limitLength.jst | 10 - node_modules/ajv/lib/dot/_limitProperties.jst | 10 - node_modules/ajv/lib/dot/allOf.jst | 34 - node_modules/ajv/lib/dot/anyOf.jst | 48 - node_modules/ajv/lib/dot/coerce.def | 61 - node_modules/ajv/lib/dot/comment.jst | 9 - node_modules/ajv/lib/dot/const.jst | 11 - node_modules/ajv/lib/dot/contains.jst | 57 - node_modules/ajv/lib/dot/custom.jst | 191 - node_modules/ajv/lib/dot/defaults.def | 47 - node_modules/ajv/lib/dot/definitions.def | 201 - node_modules/ajv/lib/dot/dependencies.jst | 80 - node_modules/ajv/lib/dot/enum.jst | 30 - node_modules/ajv/lib/dot/errors.def | 194 - node_modules/ajv/lib/dot/format.jst | 106 - node_modules/ajv/lib/dot/if.jst | 75 - node_modules/ajv/lib/dot/items.jst | 100 - node_modules/ajv/lib/dot/missing.def | 39 - node_modules/ajv/lib/dot/multipleOf.jst | 20 - node_modules/ajv/lib/dot/not.jst | 43 - node_modules/ajv/lib/dot/oneOf.jst | 54 - node_modules/ajv/lib/dot/pattern.jst | 14 - node_modules/ajv/lib/dot/properties.jst | 244 - node_modules/ajv/lib/dot/propertyNames.jst | 54 - node_modules/ajv/lib/dot/ref.jst | 85 - node_modules/ajv/lib/dot/required.jst | 108 - node_modules/ajv/lib/dot/uniqueItems.jst | 62 - node_modules/ajv/lib/dot/validate.jst | 282 - node_modules/ajv/lib/dotjs/README.md | 3 - node_modules/ajv/lib/dotjs/_limit.js | 157 - node_modules/ajv/lib/dotjs/_limitItems.js | 77 - node_modules/ajv/lib/dotjs/_limitLength.js | 82 - .../ajv/lib/dotjs/_limitProperties.js | 77 - node_modules/ajv/lib/dotjs/allOf.js | 43 - node_modules/ajv/lib/dotjs/anyOf.js | 74 - node_modules/ajv/lib/dotjs/comment.js | 14 - node_modules/ajv/lib/dotjs/const.js | 56 - node_modules/ajv/lib/dotjs/contains.js | 82 - node_modules/ajv/lib/dotjs/custom.js | 228 - node_modules/ajv/lib/dotjs/dependencies.js | 168 - node_modules/ajv/lib/dotjs/enum.js | 66 - node_modules/ajv/lib/dotjs/format.js | 150 - node_modules/ajv/lib/dotjs/if.js | 104 - node_modules/ajv/lib/dotjs/index.js | 33 - node_modules/ajv/lib/dotjs/items.js | 141 - node_modules/ajv/lib/dotjs/multipleOf.js | 77 - node_modules/ajv/lib/dotjs/not.js | 84 - node_modules/ajv/lib/dotjs/oneOf.js | 73 - node_modules/ajv/lib/dotjs/pattern.js | 75 - node_modules/ajv/lib/dotjs/properties.js | 330 - node_modules/ajv/lib/dotjs/propertyNames.js | 82 - node_modules/ajv/lib/dotjs/ref.js | 124 - node_modules/ajv/lib/dotjs/required.js | 270 - node_modules/ajv/lib/dotjs/uniqueItems.js | 86 - node_modules/ajv/lib/dotjs/validate.js | 494 - node_modules/ajv/lib/keyword.js | 146 - node_modules/ajv/lib/refs/data.json | 17 - .../ajv/lib/refs/json-schema-draft-04.json | 149 - .../ajv/lib/refs/json-schema-draft-06.json | 154 - .../ajv/lib/refs/json-schema-draft-07.json | 168 - .../ajv/lib/refs/json-schema-secure.json | 94 - node_modules/ajv/package.json | 129 - node_modules/ajv/scripts/.eslintrc.yml | 3 - node_modules/ajv/scripts/bundle.js | 61 - node_modules/ajv/scripts/compile-dots.js | 73 - node_modules/ajv/scripts/info | 10 - node_modules/ajv/scripts/prepare-tests | 12 - .../ajv/scripts/publish-built-version | 32 - node_modules/ajv/scripts/travis-gh-pages | 23 - node_modules/ansi-escapes/index.js | 131 - node_modules/ansi-escapes/license | 9 - node_modules/ansi-escapes/package.json | 87 - node_modules/ansi-escapes/readme.md | 184 - node_modules/ansi-regex/index.js | 14 - node_modules/ansi-regex/license | 9 - node_modules/ansi-regex/package.json | 90 - node_modules/ansi-regex/readme.md | 87 - node_modules/ansi-styles/index.js | 165 - node_modules/ansi-styles/license | 9 - node_modules/ansi-styles/package.json | 95 - node_modules/ansi-styles/readme.md | 147 - node_modules/anymatch/LICENSE | 15 - node_modules/anymatch/README.md | 99 - node_modules/anymatch/index.js | 67 - node_modules/anymatch/package.json | 77 - node_modules/argparse/CHANGELOG.md | 185 - node_modules/argparse/LICENSE | 21 - node_modules/argparse/README.md | 257 - node_modules/argparse/index.js | 3 - node_modules/argparse/lib/action.js | 146 - node_modules/argparse/lib/action/append.js | 53 - .../argparse/lib/action/append/constant.js | 47 - node_modules/argparse/lib/action/count.js | 40 - node_modules/argparse/lib/action/help.js | 47 - node_modules/argparse/lib/action/store.js | 50 - .../argparse/lib/action/store/constant.js | 43 - .../argparse/lib/action/store/false.js | 27 - .../argparse/lib/action/store/true.js | 26 - .../argparse/lib/action/subparsers.js | 149 - node_modules/argparse/lib/action/version.js | 47 - node_modules/argparse/lib/action_container.js | 482 - node_modules/argparse/lib/argparse.js | 14 - node_modules/argparse/lib/argument/error.js | 50 - .../argparse/lib/argument/exclusive.js | 54 - node_modules/argparse/lib/argument/group.js | 75 - node_modules/argparse/lib/argument_parser.js | 1161 - node_modules/argparse/lib/const.js | 21 - .../argparse/lib/help/added_formatters.js | 87 - node_modules/argparse/lib/help/formatter.js | 795 - node_modules/argparse/lib/namespace.js | 76 - node_modules/argparse/lib/utils.js | 57 - node_modules/argparse/package.json | 74 - node_modules/arr-diff/LICENSE | 21 - node_modules/arr-diff/README.md | 130 - node_modules/arr-diff/index.js | 47 - node_modules/arr-diff/package.json | 113 - node_modules/arr-flatten/LICENSE | 21 - node_modules/arr-flatten/README.md | 86 - node_modules/arr-flatten/index.js | 22 - node_modules/arr-flatten/package.json | 117 - node_modules/arr-union/LICENSE | 21 - node_modules/arr-union/README.md | 99 - node_modules/arr-union/index.js | 29 - node_modules/arr-union/package.json | 112 - node_modules/array-equal/.npmignore | 1 - node_modules/array-equal/LICENSE | 22 - node_modules/array-equal/README.md | 11 - node_modules/array-equal/component.json | 10 - node_modules/array-equal/index.js | 9 - node_modules/array-equal/package.json | 48 - node_modules/array-unique/LICENSE | 21 - node_modules/array-unique/README.md | 77 - node_modules/array-unique/index.js | 43 - node_modules/array-unique/package.json | 100 - node_modules/asn1/LICENSE | 19 - node_modules/asn1/README.md | 50 - node_modules/asn1/lib/ber/errors.js | 13 - node_modules/asn1/lib/ber/index.js | 27 - node_modules/asn1/lib/ber/reader.js | 262 - node_modules/asn1/lib/ber/types.js | 36 - node_modules/asn1/lib/ber/writer.js | 317 - node_modules/asn1/lib/index.js | 20 - node_modules/asn1/package.json | 79 - node_modules/assert-plus/AUTHORS | 6 - node_modules/assert-plus/CHANGES.md | 14 - node_modules/assert-plus/README.md | 162 - node_modules/assert-plus/assert.js | 211 - node_modules/assert-plus/package.json | 91 - node_modules/assign-symbols/LICENSE | 21 - node_modules/assign-symbols/README.md | 73 - node_modules/assign-symbols/index.js | 40 - node_modules/assign-symbols/package.json | 75 - node_modules/astral-regex/index.js | 4 - node_modules/astral-regex/license | 9 - node_modules/astral-regex/package.json | 68 - node_modules/astral-regex/readme.md | 43 - node_modules/async-limiter/.eslintignore | 2 - node_modules/async-limiter/.nycrc | 10 - node_modules/async-limiter/.travis.yml | 9 - node_modules/async-limiter/LICENSE | 8 - node_modules/async-limiter/index.js | 67 - node_modules/async-limiter/package.json | 73 - node_modules/async-limiter/readme.md | 132 - node_modules/asynckit/LICENSE | 21 - node_modules/asynckit/README.md | 233 - node_modules/asynckit/bench.js | 76 - node_modules/asynckit/index.js | 6 - node_modules/asynckit/lib/abort.js | 29 - node_modules/asynckit/lib/async.js | 34 - node_modules/asynckit/lib/defer.js | 26 - node_modules/asynckit/lib/iterate.js | 75 - .../asynckit/lib/readable_asynckit.js | 91 - .../asynckit/lib/readable_parallel.js | 25 - node_modules/asynckit/lib/readable_serial.js | 25 - .../asynckit/lib/readable_serial_ordered.js | 29 - node_modules/asynckit/lib/state.js | 37 - node_modules/asynckit/lib/streamify.js | 141 - node_modules/asynckit/lib/terminator.js | 29 - node_modules/asynckit/package.json | 95 - node_modules/asynckit/parallel.js | 43 - node_modules/asynckit/serial.js | 17 - node_modules/asynckit/serialOrdered.js | 75 - node_modules/asynckit/stream.js | 21 - node_modules/atob/LICENSE | 230 - node_modules/atob/LICENSE.DOCS | 319 - node_modules/atob/README.md | 49 - node_modules/atob/bin/atob.js | 6 - node_modules/atob/bower.json | 24 - node_modules/atob/browser-atob.js | 44 - node_modules/atob/node-atob.js | 7 - node_modules/atob/package.json | 57 - node_modules/atob/test.js | 18 - node_modules/aws-sign2/LICENSE | 55 - node_modules/aws-sign2/README.md | 4 - node_modules/aws-sign2/index.js | 212 - node_modules/aws-sign2/package.json | 54 - node_modules/aws4/.travis.yml | 5 - node_modules/aws4/LICENSE | 19 - node_modules/aws4/README.md | 523 - node_modules/aws4/aws4.js | 332 - node_modules/aws4/lru.js | 96 - node_modules/aws4/package.json | 108 - node_modules/axios/CHANGELOG.md | 348 - node_modules/axios/LICENSE | 19 - node_modules/axios/README.md | 684 - node_modules/axios/UPGRADE_GUIDE.md | 162 - node_modules/axios/dist/axios.js | 1668 - node_modules/axios/dist/axios.map | 1 - node_modules/axios/dist/axios.min.js | 9 - node_modules/axios/dist/axios.min.map | 1 - node_modules/axios/index.d.ts | 152 - node_modules/axios/index.js | 1 - node_modules/axios/lib/adapters/README.md | 37 - node_modules/axios/lib/adapters/http.js | 275 - node_modules/axios/lib/adapters/xhr.js | 174 - node_modules/axios/lib/axios.js | 53 - node_modules/axios/lib/cancel/Cancel.js | 19 - node_modules/axios/lib/cancel/CancelToken.js | 57 - node_modules/axios/lib/cancel/isCancel.js | 5 - node_modules/axios/lib/core/Axios.js | 86 - .../axios/lib/core/InterceptorManager.js | 52 - node_modules/axios/lib/core/README.md | 7 - node_modules/axios/lib/core/createError.js | 18 - .../axios/lib/core/dispatchRequest.js | 86 - node_modules/axios/lib/core/enhanceError.js | 42 - node_modules/axios/lib/core/mergeConfig.js | 51 - node_modules/axios/lib/core/settle.js | 25 - node_modules/axios/lib/core/transformData.js | 20 - node_modules/axios/lib/defaults.js | 98 - node_modules/axios/lib/helpers/README.md | 7 - node_modules/axios/lib/helpers/bind.js | 11 - node_modules/axios/lib/helpers/buildURL.js | 71 - node_modules/axios/lib/helpers/combineURLs.js | 14 - node_modules/axios/lib/helpers/cookies.js | 53 - .../axios/lib/helpers/deprecatedMethod.js | 24 - .../axios/lib/helpers/isAbsoluteURL.js | 14 - .../axios/lib/helpers/isURLSameOrigin.js | 68 - .../axios/lib/helpers/normalizeHeaderName.js | 12 - .../axios/lib/helpers/parseHeaders.js | 53 - node_modules/axios/lib/helpers/spread.js | 27 - node_modules/axios/lib/utils.js | 334 - .../axios/node_modules/is-buffer/LICENSE | 21 - .../axios/node_modules/is-buffer/README.md | 53 - .../axios/node_modules/is-buffer/index.js | 11 - .../axios/node_modules/is-buffer/package.json | 83 - node_modules/axios/package.json | 115 - node_modules/babel-jest/README.md | 25 - node_modules/babel-jest/build/index.d.ts | 16 - node_modules/babel-jest/build/index.d.ts.map | 1 - node_modules/babel-jest/build/index.js | 226 - .../babel-jest/node_modules/slash/index.js | 11 - .../babel-jest/node_modules/slash/license | 9 - .../node_modules/slash/package.json | 70 - .../babel-jest/node_modules/slash/readme.md | 44 - node_modules/babel-jest/package.json | 69 - .../babel-plugin-istanbul/CHANGELOG.md | 294 - node_modules/babel-plugin-istanbul/LICENSE | 27 - node_modules/babel-plugin-istanbul/README.md | 131 - .../babel-plugin-istanbul/lib/index.js | 117 - .../babel-plugin-istanbul/package.json | 104 - node_modules/babel-plugin-jest-hoist/LICENSE | 21 - .../babel-plugin-jest-hoist/README.md | 33 - .../babel-plugin-jest-hoist/build/index.d.ts | 13 - .../build/index.d.ts.map | 1 - .../babel-plugin-jest-hoist/build/index.js | 208 - .../babel-plugin-jest-hoist/package.json | 59 - node_modules/babel-preset-jest/LICENSE | 21 - node_modules/babel-preset-jest/README.md | 33 - node_modules/babel-preset-jest/index.js | 13 - node_modules/babel-preset-jest/package.json | 59 - node_modules/balanced-match/.npmignore | 5 - node_modules/balanced-match/LICENSE.md | 21 - node_modules/balanced-match/README.md | 91 - node_modules/balanced-match/index.js | 59 - node_modules/balanced-match/package.json | 81 - node_modules/base/LICENSE | 21 - node_modules/base/README.md | 491 - node_modules/base/index.js | 435 - .../base/node_modules/define-property/LICENSE | 21 - .../node_modules/define-property/README.md | 95 - .../node_modules/define-property/index.js | 31 - .../node_modules/define-property/package.json | 97 - .../is-accessor-descriptor/LICENSE | 21 - .../is-accessor-descriptor/README.md | 144 - .../is-accessor-descriptor/index.js | 69 - .../is-accessor-descriptor/package.json | 114 - .../node_modules/is-data-descriptor/LICENSE | 21 - .../node_modules/is-data-descriptor/README.md | 161 - .../node_modules/is-data-descriptor/index.js | 49 - .../is-data-descriptor/package.json | 113 - .../base/node_modules/is-descriptor/LICENSE | 21 - .../base/node_modules/is-descriptor/README.md | 193 - .../base/node_modules/is-descriptor/index.js | 22 - .../node_modules/is-descriptor/package.json | 118 - node_modules/base/package.json | 168 - node_modules/bcrypt-pbkdf/CONTRIBUTING.md | 13 - node_modules/bcrypt-pbkdf/LICENSE | 66 - node_modules/bcrypt-pbkdf/README.md | 45 - node_modules/bcrypt-pbkdf/index.js | 556 - node_modules/bcrypt-pbkdf/package.json | 48 - node_modules/brace-expansion/LICENSE | 21 - node_modules/brace-expansion/README.md | 129 - node_modules/brace-expansion/index.js | 201 - node_modules/brace-expansion/package.json | 79 - node_modules/braces/LICENSE | 21 - node_modules/braces/README.md | 640 - node_modules/braces/index.js | 318 - node_modules/braces/lib/braces.js | 104 - node_modules/braces/lib/compilers.js | 282 - node_modules/braces/lib/parsers.js | 360 - node_modules/braces/lib/utils.js | 343 - .../node_modules/extend-shallow/LICENSE | 21 - .../node_modules/extend-shallow/README.md | 61 - .../node_modules/extend-shallow/index.js | 33 - .../node_modules/extend-shallow/package.json | 91 - node_modules/braces/package.json | 160 - node_modules/browser-process-hrtime/LICENSE | 9 - node_modules/browser-process-hrtime/README.md | 25 - node_modules/browser-process-hrtime/index.js | 28 - .../browser-process-hrtime/package.json | 50 - node_modules/browser-resolve/LICENSE | 21 - node_modules/browser-resolve/README.md | 146 - node_modules/browser-resolve/empty.js | 0 node_modules/browser-resolve/index.js | 345 - .../node_modules/resolve/.travis.yml | 4 - .../node_modules/resolve/LICENSE | 18 - .../node_modules/resolve/example/async.js | 5 - .../node_modules/resolve/example/sync.js | 3 - .../node_modules/resolve/index.js | 5 - .../node_modules/resolve/lib/async.js | 192 - .../node_modules/resolve/lib/caller.js | 8 - .../node_modules/resolve/lib/core.js | 4 - .../node_modules/resolve/lib/core.json | 38 - .../resolve/lib/node-modules-paths.js | 38 - .../node_modules/resolve/lib/sync.js | 81 - .../node_modules/resolve/package.json | 62 - .../node_modules/resolve/readme.markdown | 148 - .../node_modules/resolve/test/core.js | 12 - .../node_modules/resolve/test/dotdot.js | 29 - .../resolve/test/dotdot/abc/index.js | 2 - .../node_modules/resolve/test/dotdot/index.js | 1 - .../resolve/test/faulty_basedir.js | 17 - .../node_modules/resolve/test/filter.js | 18 - .../node_modules/resolve/test/filter_sync.js | 15 - .../node_modules/resolve/test/mock.js | 142 - .../node_modules/resolve/test/mock_sync.js | 68 - .../node_modules/resolve/test/module_dir.js | 56 - .../test/module_dir/xmodules/aaa/index.js | 1 - .../test/module_dir/ymodules/aaa/index.js | 1 - .../test/module_dir/zmodules/bbb/main.js | 1 - .../test/module_dir/zmodules/bbb/package.json | 3 - .../node_modules/resolve/test/node_path.js | 48 - .../resolve/test/node_path/x/aaa/index.js | 1 - .../resolve/test/node_path/x/ccc/index.js | 1 - .../resolve/test/node_path/y/bbb/index.js | 1 - .../resolve/test/node_path/y/ccc/index.js | 1 - .../node_modules/resolve/test/nonstring.js | 9 - .../node_modules/resolve/test/pathfilter.js | 35 - .../resolve/test/pathfilter/deep_ref/main.js | 0 .../deep_ref/node_modules/deep/alt.js | 0 .../deep_ref/node_modules/deep/deeper/ref.js | 0 .../deep_ref/node_modules/deep/package.json | 4 - .../deep_ref/node_modules/deep/ref.js | 0 .../node_modules/resolve/test/precedence.js | 23 - .../resolve/test/precedence/aaa.js | 1 - .../resolve/test/precedence/aaa/index.js | 1 - .../resolve/test/precedence/aaa/main.js | 1 - .../resolve/test/precedence/bbb.js | 1 - .../resolve/test/precedence/bbb/main.js | 1 - .../node_modules/resolve/test/resolver.js | 281 - .../resolver/bar/node_modules/foo/index.js | 1 - .../resolve/test/resolver/baz/doom.js | 0 .../resolve/test/resolver/baz/package.json | 3 - .../resolve/test/resolver/baz/quux.js | 1 - .../biz/node_modules/garply/lib/index.js | 1 - .../biz/node_modules/garply/package.json | 3 - .../resolver/biz/node_modules/grux/index.js | 1 - .../resolver/biz/node_modules/tiv/index.js | 1 - .../resolve/test/resolver/cup.coffee | 1 - .../node_modules/resolve/test/resolver/foo.js | 1 - .../test/resolver/incorrect_main/index.js | 2 - .../test/resolver/incorrect_main/package.json | 3 - .../resolve/test/resolver/mug.coffee | 0 .../node_modules/resolve/test/resolver/mug.js | 0 .../test/resolver/other_path/lib/other-lib.js | 0 .../resolve/test/resolver/other_path/root.js | 0 .../punycode/node_modules/punycode/index.js | 0 .../resolve/test/resolver/quux/foo/index.js | 1 - .../test/resolver/without_basedir/main.js | 6 - .../without_basedir/node_modules/mymodule.js | 1 - .../resolve/test/resolver_sync.js | 180 - .../node_modules/resolve/test/subdirs.js | 13 - .../test/subdirs/node_modules/a/b/c/x.json | 1 - .../test/subdirs/node_modules/a/package.json | 1 - node_modules/browser-resolve/package.json | 65 - node_modules/bs-logger/CHANGELOG.md | 60 - node_modules/bs-logger/LICENSE | 21 - node_modules/bs-logger/README.md | 319 - node_modules/bs-logger/dist/index.d.ts | 8 - node_modules/bs-logger/dist/index.js | 31 - .../bs-logger/dist/logger/context.d.ts | 16 - node_modules/bs-logger/dist/logger/context.js | 11 - node_modules/bs-logger/dist/logger/index.d.ts | 37 - node_modules/bs-logger/dist/logger/index.js | 164 - node_modules/bs-logger/dist/logger/level.d.ts | 25 - node_modules/bs-logger/dist/logger/level.js | 62 - .../bs-logger/dist/logger/message.d.ts | 18 - node_modules/bs-logger/dist/logger/message.js | 37 - node_modules/bs-logger/dist/logger/root.d.ts | 4 - node_modules/bs-logger/dist/logger/root.js | 79 - .../bs-logger/dist/logger/target.d.ts | 11 - node_modules/bs-logger/dist/logger/target.js | 90 - .../bs-logger/dist/testing/index.d.ts | 8 - node_modules/bs-logger/dist/testing/index.js | 29 - .../bs-logger/dist/testing/target-mock.d.ts | 28 - .../bs-logger/dist/testing/target-mock.js | 89 - .../bs-logger/dist/utils/cache-getters.d.ts | 2 - .../bs-logger/dist/utils/cache-getters.js | 40 - node_modules/bs-logger/package.json | 112 - node_modules/bser/README.md | 81 - node_modules/bser/index.js | 586 - node_modules/bser/package.json | 66 - node_modules/buffer-from/LICENSE | 21 - node_modules/buffer-from/index.js | 69 - node_modules/buffer-from/package.json | 57 - node_modules/buffer-from/readme.md | 69 - node_modules/cache-base/LICENSE | 21 - node_modules/cache-base/README.md | 291 - node_modules/cache-base/index.js | 261 - node_modules/cache-base/package.json | 122 - node_modules/caller-callsite/index.js | 18 - node_modules/caller-callsite/license | 21 - node_modules/caller-callsite/package.json | 80 - node_modules/caller-callsite/readme.md | 41 - node_modules/caller-path/index.js | 4 - node_modules/caller-path/license | 21 - node_modules/caller-path/package.json | 81 - node_modules/caller-path/readme.md | 34 - node_modules/callsites/index.js | 8 - node_modules/callsites/license | 21 - node_modules/callsites/package.json | 76 - node_modules/callsites/readme.md | 46 - node_modules/camelcase/index.d.ts | 63 - node_modules/camelcase/index.js | 76 - node_modules/camelcase/license | 9 - node_modules/camelcase/package.json | 80 - node_modules/camelcase/readme.md | 99 - node_modules/capture-exit/README.md | 38 - node_modules/capture-exit/index.js | 153 - node_modules/capture-exit/package.json | 67 - node_modules/caseless/LICENSE | 28 - node_modules/caseless/README.md | 45 - node_modules/caseless/index.js | 67 - node_modules/caseless/package.json | 60 - node_modules/caseless/test.js | 67 - node_modules/chalk/index.js | 228 - node_modules/chalk/index.js.flow | 93 - node_modules/chalk/license | 9 - node_modules/chalk/package.json | 127 - node_modules/chalk/readme.md | 314 - node_modules/chalk/templates.js | 128 - node_modules/chalk/types/index.d.ts | 97 - node_modules/ci-info/CHANGELOG.md | 78 - node_modules/ci-info/LICENSE | 21 - node_modules/ci-info/README.md | 108 - node_modules/ci-info/index.js | 66 - node_modules/ci-info/package.json | 69 - node_modules/ci-info/vendors.json | 153 - node_modules/class-utils/LICENSE | 21 - node_modules/class-utils/README.md | 300 - node_modules/class-utils/index.js | 370 - .../node_modules/define-property/LICENSE | 21 - .../node_modules/define-property/README.md | 77 - .../node_modules/define-property/index.js | 31 - .../node_modules/define-property/package.json | 86 - node_modules/class-utils/package.json | 135 - node_modules/cliui/CHANGELOG.md | 65 - node_modules/cliui/LICENSE.txt | 14 - node_modules/cliui/README.md | 115 - node_modules/cliui/index.js | 324 - node_modules/cliui/package.json | 103 - node_modules/co/History.md | 172 - node_modules/co/LICENSE | 22 - node_modules/co/Readme.md | 212 - node_modules/co/index.js | 237 - node_modules/co/package.json | 71 - node_modules/collection-visit/LICENSE | 21 - node_modules/collection-visit/README.md | 89 - node_modules/collection-visit/index.js | 30 - node_modules/collection-visit/package.json | 119 - node_modules/color-convert/CHANGELOG.md | 54 - node_modules/color-convert/LICENSE | 21 - node_modules/color-convert/README.md | 68 - node_modules/color-convert/conversions.js | 868 - node_modules/color-convert/index.js | 78 - node_modules/color-convert/package.json | 85 - node_modules/color-convert/route.js | 97 - node_modules/color-name/.eslintrc.json | 43 - node_modules/color-name/.npmignore | 107 - node_modules/color-name/LICENSE | 8 - node_modules/color-name/README.md | 11 - node_modules/color-name/index.js | 152 - node_modules/color-name/package.json | 57 - node_modules/color-name/test.js | 7 - node_modules/combined-stream/License | 19 - node_modules/combined-stream/Readme.md | 138 - .../combined-stream/lib/combined_stream.js | 208 - node_modules/combined-stream/package.json | 62 - node_modules/combined-stream/yarn.lock | 17 - node_modules/commander/CHANGELOG.md | 408 - node_modules/commander/LICENSE | 22 - node_modules/commander/Readme.md | 428 - node_modules/commander/index.js | 1224 - node_modules/commander/package.json | 75 - node_modules/commander/typings/index.d.ts | 310 - node_modules/component-emitter/History.md | 75 - node_modules/component-emitter/LICENSE | 24 - node_modules/component-emitter/Readme.md | 74 - node_modules/component-emitter/index.js | 175 - node_modules/component-emitter/package.json | 61 - node_modules/concat-map/.travis.yml | 4 - node_modules/concat-map/LICENSE | 18 - node_modules/concat-map/README.markdown | 62 - node_modules/concat-map/example/map.js | 6 - node_modules/concat-map/index.js | 13 - node_modules/concat-map/package.json | 92 - node_modules/concat-map/test/map.js | 39 - node_modules/convert-source-map/LICENSE | 23 - node_modules/convert-source-map/README.md | 125 - node_modules/convert-source-map/index.js | 136 - node_modules/convert-source-map/package.json | 74 - node_modules/copy-descriptor/LICENSE | 21 - node_modules/copy-descriptor/index.js | 81 - node_modules/copy-descriptor/package.json | 91 - node_modules/core-util-is/LICENSE | 19 - node_modules/core-util-is/README.md | 3 - node_modules/core-util-is/float.patch | 604 - node_modules/core-util-is/lib/util.js | 107 - node_modules/core-util-is/package.json | 66 - node_modules/core-util-is/test.js | 68 - node_modules/cosmiconfig/CHANGELOG.md | 151 - node_modules/cosmiconfig/LICENSE | 22 - node_modules/cosmiconfig/README.md | 537 - node_modules/cosmiconfig/dist/cacheWrapper.js | 19 - .../cosmiconfig/dist/createExplorer.js | 322 - node_modules/cosmiconfig/dist/getDirectory.js | 22 - .../cosmiconfig/dist/getPropertyByPath.js | 23 - node_modules/cosmiconfig/dist/index.js | 81 - node_modules/cosmiconfig/dist/loaders.js | 30 - node_modules/cosmiconfig/dist/readFile.js | 42 - node_modules/cosmiconfig/package.json | 152 - node_modules/cross-spawn/CHANGELOG.md | 100 - node_modules/cross-spawn/LICENSE | 21 - node_modules/cross-spawn/README.md | 94 - node_modules/cross-spawn/index.js | 39 - node_modules/cross-spawn/lib/enoent.js | 59 - node_modules/cross-spawn/lib/parse.js | 125 - node_modules/cross-spawn/lib/util/escape.js | 45 - .../cross-spawn/lib/util/readShebang.js | 32 - .../cross-spawn/lib/util/resolveCommand.js | 47 - .../cross-spawn/node_modules/.bin/semver | 15 - .../cross-spawn/node_modules/.bin/semver.cmd | 7 - .../node_modules/semver/CHANGELOG.md | 39 - .../cross-spawn/node_modules/semver/LICENSE | 15 - .../cross-spawn/node_modules/semver/README.md | 412 - .../node_modules/semver/bin/semver | 160 - .../node_modules/semver/package.json | 64 - .../cross-spawn/node_modules/semver/range.bnf | 16 - .../cross-spawn/node_modules/semver/semver.js | 1483 - node_modules/cross-spawn/package.json | 111 - node_modules/cssom/LICENSE.txt | 20 - node_modules/cssom/README.mdown | 67 - node_modules/cssom/lib/CSSDocumentRule.js | 39 - node_modules/cssom/lib/CSSFontFaceRule.js | 36 - node_modules/cssom/lib/CSSHostRule.js | 37 - node_modules/cssom/lib/CSSImportRule.js | 132 - node_modules/cssom/lib/CSSKeyframeRule.js | 37 - node_modules/cssom/lib/CSSKeyframesRule.js | 39 - node_modules/cssom/lib/CSSMediaRule.js | 41 - node_modules/cssom/lib/CSSOM.js | 3 - node_modules/cssom/lib/CSSRule.js | 43 - node_modules/cssom/lib/CSSStyleDeclaration.js | 148 - node_modules/cssom/lib/CSSStyleRule.js | 190 - node_modules/cssom/lib/CSSStyleSheet.js | 88 - node_modules/cssom/lib/CSSSupportsRule.js | 36 - node_modules/cssom/lib/CSSValue.js | 43 - node_modules/cssom/lib/CSSValueExpression.js | 344 - node_modules/cssom/lib/MatcherList.js | 62 - node_modules/cssom/lib/MediaList.js | 61 - node_modules/cssom/lib/StyleSheet.js | 17 - node_modules/cssom/lib/clone.js | 82 - node_modules/cssom/lib/index.js | 21 - node_modules/cssom/lib/parse.js | 464 - node_modules/cssom/package.json | 58 - node_modules/cssstyle/.eslintignore | 3 - node_modules/cssstyle/.eslintrc.js | 50 - node_modules/cssstyle/.travis.yml | 15 - node_modules/cssstyle/MIT-LICENSE.txt | 20 - node_modules/cssstyle/README.md | 27 - .../cssstyle/lib/CSSStyleDeclaration.js | 255 - .../cssstyle/lib/allExtraProperties.js | 248 - node_modules/cssstyle/lib/allProperties.js | 457 - node_modules/cssstyle/lib/constants.js | 6 - .../cssstyle/lib/implementedProperties.js | 90 - node_modules/cssstyle/lib/named_colors.json | 152 - node_modules/cssstyle/lib/parsers.js | 697 - node_modules/cssstyle/lib/properties.js | 1826 - .../cssstyle/lib/properties/azimuth.js | 67 - .../cssstyle/lib/properties/background.js | 19 - .../lib/properties/backgroundAttachment.js | 24 - .../lib/properties/backgroundColor.js | 36 - .../lib/properties/backgroundImage.js | 32 - .../lib/properties/backgroundPosition.js | 58 - .../lib/properties/backgroundRepeat.js | 32 - .../cssstyle/lib/properties/border.js | 33 - .../cssstyle/lib/properties/borderBottom.js | 17 - .../lib/properties/borderBottomColor.js | 16 - .../lib/properties/borderBottomStyle.js | 21 - .../lib/properties/borderBottomWidth.js | 16 - .../cssstyle/lib/properties/borderCollapse.js | 26 - .../cssstyle/lib/properties/borderColor.js | 30 - .../cssstyle/lib/properties/borderLeft.js | 17 - .../lib/properties/borderLeftColor.js | 16 - .../lib/properties/borderLeftStyle.js | 21 - .../lib/properties/borderLeftWidth.js | 16 - .../cssstyle/lib/properties/borderRight.js | 17 - .../lib/properties/borderRightColor.js | 16 - .../lib/properties/borderRightStyle.js | 21 - .../lib/properties/borderRightWidth.js | 16 - .../cssstyle/lib/properties/borderSpacing.js | 41 - .../cssstyle/lib/properties/borderStyle.js | 38 - .../cssstyle/lib/properties/borderTop.js | 17 - .../cssstyle/lib/properties/borderTopColor.js | 16 - .../cssstyle/lib/properties/borderTopStyle.js | 21 - .../cssstyle/lib/properties/borderTopWidth.js | 17 - .../cssstyle/lib/properties/borderWidth.js | 46 - .../cssstyle/lib/properties/bottom.js | 14 - node_modules/cssstyle/lib/properties/clear.js | 16 - node_modules/cssstyle/lib/properties/clip.js | 47 - node_modules/cssstyle/lib/properties/color.js | 14 - .../cssstyle/lib/properties/cssFloat.js | 12 - node_modules/cssstyle/lib/properties/flex.js | 45 - .../cssstyle/lib/properties/flexBasis.js | 28 - .../cssstyle/lib/properties/flexGrow.js | 19 - .../cssstyle/lib/properties/flexShrink.js | 19 - node_modules/cssstyle/lib/properties/float.js | 12 - .../cssstyle/lib/properties/floodColor.js | 14 - node_modules/cssstyle/lib/properties/font.js | 43 - .../cssstyle/lib/properties/fontFamily.js | 33 - .../cssstyle/lib/properties/fontSize.js | 28 - .../cssstyle/lib/properties/fontStyle.js | 18 - .../cssstyle/lib/properties/fontVariant.js | 18 - .../cssstyle/lib/properties/fontWeight.js | 33 - .../cssstyle/lib/properties/height.js | 24 - node_modules/cssstyle/lib/properties/left.js | 14 - .../cssstyle/lib/properties/lightingColor.js | 14 - .../cssstyle/lib/properties/lineHeight.js | 26 - .../cssstyle/lib/properties/margin.js | 68 - .../cssstyle/lib/properties/marginBottom.js | 13 - .../cssstyle/lib/properties/marginLeft.js | 13 - .../cssstyle/lib/properties/marginRight.js | 13 - .../cssstyle/lib/properties/marginTop.js | 13 - .../cssstyle/lib/properties/opacity.js | 14 - .../cssstyle/lib/properties/outlineColor.js | 14 - .../cssstyle/lib/properties/padding.js | 61 - .../cssstyle/lib/properties/paddingBottom.js | 13 - .../cssstyle/lib/properties/paddingLeft.js | 13 - .../cssstyle/lib/properties/paddingRight.js | 13 - .../cssstyle/lib/properties/paddingTop.js | 13 - node_modules/cssstyle/lib/properties/right.js | 14 - .../cssstyle/lib/properties/stopColor.js | 14 - .../lib/properties/textLineThroughColor.js | 14 - .../lib/properties/textOverlineColor.js | 14 - .../lib/properties/textUnderlineColor.js | 14 - node_modules/cssstyle/lib/properties/top.js | 14 - .../lib/properties/webkitBorderAfterColor.js | 14 - .../lib/properties/webkitBorderBeforeColor.js | 14 - .../lib/properties/webkitBorderEndColor.js | 14 - .../lib/properties/webkitBorderStartColor.js | 14 - .../lib/properties/webkitColumnRuleColor.js | 14 - .../webkitMatchNearestMailBlockquoteColor.js | 14 - .../lib/properties/webkitTapHighlightColor.js | 14 - .../lib/properties/webkitTextEmphasisColor.js | 14 - .../lib/properties/webkitTextFillColor.js | 14 - .../lib/properties/webkitTextStrokeColor.js | 14 - node_modules/cssstyle/lib/properties/width.js | 24 - .../lib/utils/getBasicPropertyDescriptor.js | 14 - node_modules/cssstyle/package.json | 109 - .../scripts/download_latest_properties.js | 88 - .../generate_implemented_properties.js | 61 - .../cssstyle/scripts/generate_properties.js | 292 - node_modules/cssstyle/tests/tests.js | 669 - node_modules/dashdash/CHANGES.md | 364 - node_modules/dashdash/LICENSE.txt | 24 - node_modules/dashdash/README.md | 574 - .../dashdash/etc/dashdash.bash_completion.in | 389 - node_modules/dashdash/lib/dashdash.js | 1055 - node_modules/dashdash/package.json | 71 - node_modules/data-urls/LICENSE.txt | 7 - node_modules/data-urls/README.md | 64 - node_modules/data-urls/lib/parser.js | 74 - node_modules/data-urls/lib/utils.js | 23 - .../node_modules/whatwg-url/LICENSE.txt | 21 - .../node_modules/whatwg-url/README.md | 91 - .../node_modules/whatwg-url/lib/URL-impl.js | 217 - .../node_modules/whatwg-url/lib/URL.js | 335 - .../whatwg-url/lib/URLSearchParams-impl.js | 122 - .../whatwg-url/lib/URLSearchParams.js | 432 - .../node_modules/whatwg-url/lib/infra.js | 24 - .../node_modules/whatwg-url/lib/public-api.js | 16 - .../whatwg-url/lib/url-state-machine.js | 1305 - .../node_modules/whatwg-url/lib/urlencoded.js | 138 - .../node_modules/whatwg-url/lib/utils.js | 127 - .../node_modules/whatwg-url/package.json | 94 - node_modules/data-urls/package.json | 94 - node_modules/debug/.coveralls.yml | 1 - node_modules/debug/.eslintrc | 11 - node_modules/debug/.npmignore | 9 - node_modules/debug/.travis.yml | 14 - node_modules/debug/CHANGELOG.md | 362 - node_modules/debug/LICENSE | 19 - node_modules/debug/Makefile | 50 - node_modules/debug/README.md | 312 - node_modules/debug/component.json | 19 - node_modules/debug/karma.conf.js | 70 - node_modules/debug/node.js | 1 - node_modules/debug/package.json | 93 - node_modules/debug/src/browser.js | 185 - node_modules/debug/src/debug.js | 202 - node_modules/debug/src/index.js | 10 - node_modules/debug/src/inspector-log.js | 15 - node_modules/debug/src/node.js | 248 - node_modules/decamelize/index.js | 13 - node_modules/decamelize/license | 21 - node_modules/decamelize/package.json | 74 - node_modules/decamelize/readme.md | 48 - node_modules/decode-uri-component/index.js | 94 - node_modules/decode-uri-component/license | 21 - .../decode-uri-component/package.json | 73 - node_modules/decode-uri-component/readme.md | 70 - node_modules/deep-is/.npmignore | 1 - node_modules/deep-is/.travis.yml | 6 - node_modules/deep-is/LICENSE | 22 - node_modules/deep-is/README.markdown | 70 - node_modules/deep-is/example/cmp.js | 11 - node_modules/deep-is/index.js | 102 - node_modules/deep-is/package.json | 94 - node_modules/deep-is/test/NaN.js | 16 - node_modules/deep-is/test/cmp.js | 23 - node_modules/deep-is/test/neg-vs-pos-0.js | 15 - node_modules/define-properties/.editorconfig | 13 - node_modules/define-properties/.eslintrc | 12 - node_modules/define-properties/.jscs.json | 175 - node_modules/define-properties/.travis.yml | 233 - node_modules/define-properties/CHANGELOG.md | 44 - node_modules/define-properties/LICENSE | 21 - node_modules/define-properties/README.md | 86 - node_modules/define-properties/index.js | 58 - node_modules/define-properties/package.json | 103 - node_modules/define-properties/test/index.js | 125 - node_modules/define-property/CHANGELOG.md | 82 - node_modules/define-property/LICENSE | 21 - node_modules/define-property/README.md | 117 - node_modules/define-property/index.js | 38 - .../is-accessor-descriptor/LICENSE | 21 - .../is-accessor-descriptor/README.md | 144 - .../is-accessor-descriptor/index.js | 69 - .../is-accessor-descriptor/package.json | 114 - .../node_modules/is-data-descriptor/LICENSE | 21 - .../node_modules/is-data-descriptor/README.md | 161 - .../node_modules/is-data-descriptor/index.js | 49 - .../is-data-descriptor/package.json | 113 - .../node_modules/is-descriptor/LICENSE | 21 - .../node_modules/is-descriptor/README.md | 193 - .../node_modules/is-descriptor/index.js | 22 - .../node_modules/is-descriptor/package.json | 118 - node_modules/define-property/package.json | 112 - node_modules/delayed-stream/.npmignore | 1 - node_modules/delayed-stream/License | 19 - node_modules/delayed-stream/Makefile | 7 - node_modules/delayed-stream/Readme.md | 141 - .../delayed-stream/lib/delayed_stream.js | 107 - node_modules/delayed-stream/package.json | 66 - node_modules/detect-newline/index.js | 24 - node_modules/detect-newline/license | 21 - node_modules/detect-newline/package.json | 73 - node_modules/detect-newline/readme.md | 42 - node_modules/diff-sequences/LICENSE | 21 - node_modules/diff-sequences/README.md | 406 - node_modules/diff-sequences/build/index.d.ts | 19 - .../diff-sequences/build/index.d.ts.map | 1 - node_modules/diff-sequences/build/index.js | 826 - node_modules/diff-sequences/package.json | 67 - node_modules/diff-sequences/perf/example.md | 48 - node_modules/diff-sequences/perf/index.js | 155 - node_modules/domexception/LICENSE.txt | 21 - node_modules/domexception/README.md | 19 - .../domexception/lib/DOMException-impl.js | 22 - node_modules/domexception/lib/DOMException.js | 368 - .../domexception/lib/legacy-error-codes.json | 27 - node_modules/domexception/lib/public-api.js | 5 - node_modules/domexception/lib/utils.js | 86 - node_modules/domexception/package.json | 76 - node_modules/ecc-jsbn/LICENSE | 21 - node_modules/ecc-jsbn/README.md | 8 - node_modules/ecc-jsbn/index.js | 58 - node_modules/ecc-jsbn/lib/LICENSE-jsbn | 40 - node_modules/ecc-jsbn/lib/ec.js | 561 - node_modules/ecc-jsbn/lib/sec.js | 170 - node_modules/ecc-jsbn/package.json | 69 - node_modules/ecc-jsbn/test.js | 14 - node_modules/emoji-regex/LICENSE-MIT.txt | 20 - node_modules/emoji-regex/README.md | 73 - node_modules/emoji-regex/es2015/index.js | 6 - node_modules/emoji-regex/es2015/text.js | 6 - node_modules/emoji-regex/index.d.ts | 5 - node_modules/emoji-regex/index.js | 6 - node_modules/emoji-regex/package.json | 82 - node_modules/emoji-regex/text.js | 6 - node_modules/end-of-stream/LICENSE | 21 - node_modules/end-of-stream/README.md | 52 - node_modules/end-of-stream/index.js | 87 - node_modules/end-of-stream/package.json | 66 - 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 | 91 - node_modules/es-abstract/.editorconfig | 13 - node_modules/es-abstract/.eslintrc | 49 - node_modules/es-abstract/.github/FUNDING.yml | 12 - node_modules/es-abstract/.nycrc | 14 - node_modules/es-abstract/.travis.yml | 327 - node_modules/es-abstract/CHANGELOG.md | 231 - node_modules/es-abstract/GetIntrinsic.js | 155 - node_modules/es-abstract/LICENSE | 21 - node_modules/es-abstract/Makefile | 61 - node_modules/es-abstract/README.md | 48 - node_modules/es-abstract/es2015.js | 1382 - node_modules/es-abstract/es2016.js | 64 - node_modules/es-abstract/es2017.js | 71 - node_modules/es-abstract/es2018.js | 255 - node_modules/es-abstract/es2019.js | 112 - node_modules/es-abstract/es5.js | 322 - node_modules/es-abstract/es6.js | 3 - node_modules/es-abstract/es7.js | 3 - .../es-abstract/helpers/assertRecord.js | 48 - node_modules/es-abstract/helpers/assign.js | 21 - node_modules/es-abstract/helpers/callBind.js | 17 - node_modules/es-abstract/helpers/every.js | 10 - node_modules/es-abstract/helpers/forEach.js | 7 - node_modules/es-abstract/helpers/isFinite.js | 5 - node_modules/es-abstract/helpers/isNaN.js | 5 - .../es-abstract/helpers/isPrimitive.js | 5 - .../helpers/isPropertyDescriptor.js | 31 - .../helpers/isSamePropertyDescriptor.js | 20 - node_modules/es-abstract/helpers/mod.js | 6 - node_modules/es-abstract/helpers/sign.js | 5 - node_modules/es-abstract/index.js | 26 - node_modules/es-abstract/operations/.eslintrc | 5 - node_modules/es-abstract/operations/2015.js | 93 - node_modules/es-abstract/operations/2016.js | 283 - node_modules/es-abstract/operations/2017.js | 331 - node_modules/es-abstract/operations/2018.js | 357 - node_modules/es-abstract/operations/2019.js | 362 - node_modules/es-abstract/operations/getOps.js | 63 - node_modules/es-abstract/package.json | 132 - node_modules/es-abstract/test/.eslintrc | 13 - node_modules/es-abstract/test/GetIntrinsic.js | 34 - node_modules/es-abstract/test/diffOps.js | 26 - node_modules/es-abstract/test/es2015.js | 9 - node_modules/es-abstract/test/es2016.js | 9 - node_modules/es-abstract/test/es2017.js | 9 - node_modules/es-abstract/test/es2018.js | 9 - node_modules/es-abstract/test/es2019.js | 9 - node_modules/es-abstract/test/es5.js | 530 - node_modules/es-abstract/test/es6.js | 18 - node_modules/es-abstract/test/es7.js | 18 - .../es-abstract/test/helpers/assertRecord.js | 60 - .../es-abstract/test/helpers/values.js | 117 - node_modules/es-abstract/test/index.js | 30 - node_modules/es-abstract/test/tests.js | 3583 -- node_modules/es-to-primitive/.editorconfig | 20 - node_modules/es-to-primitive/.eslintrc | 14 - node_modules/es-to-primitive/.jscs.json | 176 - node_modules/es-to-primitive/.travis.yml | 243 - node_modules/es-to-primitive/CHANGELOG.md | 38 - node_modules/es-to-primitive/LICENSE | 22 - node_modules/es-to-primitive/Makefile | 61 - node_modules/es-to-primitive/README.md | 51 - node_modules/es-to-primitive/es2015.js | 75 - node_modules/es-to-primitive/es5.js | 45 - node_modules/es-to-primitive/es6.js | 3 - .../es-to-primitive/helpers/isPrimitive.js | 3 - node_modules/es-to-primitive/index.js | 17 - node_modules/es-to-primitive/package.json | 117 - node_modules/es-to-primitive/test/.eslintrc | 9 - node_modules/es-to-primitive/test/es2015.js | 151 - node_modules/es-to-primitive/test/es5.js | 94 - node_modules/es-to-primitive/test/es6.js | 151 - node_modules/es-to-primitive/test/index.js | 20 - node_modules/escape-string-regexp/index.js | 11 - node_modules/escape-string-regexp/license | 21 - .../escape-string-regexp/package.json | 85 - node_modules/escape-string-regexp/readme.md | 27 - node_modules/escodegen/LICENSE.BSD | 19 - node_modules/escodegen/README.md | 84 - node_modules/escodegen/bin/escodegen.js | 77 - node_modules/escodegen/bin/esgenerate.js | 64 - node_modules/escodegen/escodegen.js | 2611 - .../escodegen/node_modules/.bin/esparse | 15 - .../escodegen/node_modules/.bin/esparse.cmd | 7 - .../escodegen/node_modules/.bin/esvalidate | 15 - .../node_modules/.bin/esvalidate.cmd | 7 - .../escodegen/node_modules/esprima/ChangeLog | 209 - .../node_modules/esprima/LICENSE.BSD | 21 - .../escodegen/node_modules/esprima/README.md | 44 - .../node_modules/esprima/bin/esparse.js | 139 - .../node_modules/esprima/bin/esvalidate.js | 236 - .../node_modules/esprima/dist/esprima.js | 6401 --- .../node_modules/esprima/package.json | 138 - node_modules/escodegen/package.json | 94 - node_modules/esprima/ChangeLog | 235 - node_modules/esprima/LICENSE.BSD | 21 - node_modules/esprima/README.md | 46 - node_modules/esprima/bin/esparse.js | 139 - node_modules/esprima/bin/esvalidate.js | 236 - node_modules/esprima/dist/esprima.js | 6709 --- node_modules/esprima/package.json | 141 - node_modules/estraverse/.jshintrc | 16 - node_modules/estraverse/LICENSE.BSD | 19 - node_modules/estraverse/README.md | 153 - node_modules/estraverse/estraverse.js | 782 - node_modules/estraverse/gulpfile.js | 70 - node_modules/estraverse/package.json | 72 - node_modules/esutils/LICENSE.BSD | 19 - node_modules/esutils/README.md | 174 - node_modules/esutils/lib/ast.js | 144 - node_modules/esutils/lib/code.js | 135 - node_modules/esutils/lib/keyword.js | 165 - node_modules/esutils/lib/utils.js | 33 - node_modules/esutils/package.json | 78 - node_modules/exec-sh/.jshintrc | 120 - node_modules/exec-sh/.travis.yml | 38 - node_modules/exec-sh/LICENSE | 21 - node_modules/exec-sh/README.md | 127 - node_modules/exec-sh/example/example.js | 17 - node_modules/exec-sh/lib/exec-sh.js | 101 - node_modules/exec-sh/package.json | 75 - node_modules/exec-sh/test/exec-sh.js | 194 - node_modules/execa/index.js | 361 - node_modules/execa/lib/errname.js | 39 - node_modules/execa/lib/stdio.js | 41 - node_modules/execa/license | 9 - node_modules/execa/package.json | 107 - node_modules/execa/readme.md | 327 - node_modules/exit/.jshintrc | 14 - node_modules/exit/.npmignore | 0 node_modules/exit/.travis.yml | 6 - node_modules/exit/Gruntfile.js | 48 - node_modules/exit/LICENSE-MIT | 22 - node_modules/exit/README.md | 75 - node_modules/exit/lib/exit.js | 41 - node_modules/exit/package.json | 80 - node_modules/exit/test/exit_test.js | 121 - node_modules/exit/test/fixtures/10-stderr.txt | 10 - .../exit/test/fixtures/10-stdout-stderr.txt | 20 - node_modules/exit/test/fixtures/10-stdout.txt | 10 - .../exit/test/fixtures/100-stderr.txt | 100 - .../exit/test/fixtures/100-stdout-stderr.txt | 200 - .../exit/test/fixtures/100-stdout.txt | 100 - .../exit/test/fixtures/1000-stderr.txt | 1000 - .../exit/test/fixtures/1000-stdout-stderr.txt | 2000 - .../exit/test/fixtures/1000-stdout.txt | 1000 - .../exit/test/fixtures/create-files.sh | 8 - node_modules/exit/test/fixtures/log-broken.js | 23 - node_modules/exit/test/fixtures/log.js | 25 - node_modules/expand-brackets/LICENSE | 21 - node_modules/expand-brackets/README.md | 302 - node_modules/expand-brackets/changelog.md | 35 - node_modules/expand-brackets/index.js | 211 - node_modules/expand-brackets/lib/compilers.js | 87 - node_modules/expand-brackets/lib/parsers.js | 219 - node_modules/expand-brackets/lib/utils.js | 34 - .../node_modules/define-property/LICENSE | 21 - .../node_modules/define-property/README.md | 77 - .../node_modules/define-property/index.js | 31 - .../node_modules/define-property/package.json | 86 - .../node_modules/extend-shallow/LICENSE | 21 - .../node_modules/extend-shallow/README.md | 61 - .../node_modules/extend-shallow/index.js | 33 - .../node_modules/extend-shallow/package.json | 91 - node_modules/expand-brackets/package.json | 137 - node_modules/expect/LICENSE | 21 - node_modules/expect/README.md | 3 - node_modules/expect/build-es5/index.js | 35614 ------------ node_modules/expect/build-es5/index.js.map | 1 - .../expect/build/asymmetricMatchers.d.ts | 61 - .../expect/build/asymmetricMatchers.d.ts.map | 1 - .../expect/build/asymmetricMatchers.js | 301 - .../extractExpectedAssertionsErrors.d.ts | 18 - .../extractExpectedAssertionsErrors.d.ts.map | 1 - .../build/extractExpectedAssertionsErrors.js | 91 - node_modules/expect/build/fakeChalk.d.ts | 11 - node_modules/expect/build/fakeChalk.d.ts.map | 1 - node_modules/expect/build/fakeChalk.js | 28 - node_modules/expect/build/index.d.ts | 16 - node_modules/expect/build/index.d.ts.map | 1 - node_modules/expect/build/index.js | 435 - node_modules/expect/build/jasmineUtils.d.ts | 9 - .../expect/build/jasmineUtils.d.ts.map | 1 - node_modules/expect/build/jasmineUtils.js | 313 - .../expect/build/jestMatchersObject.d.ts | 14 - .../expect/build/jestMatchersObject.d.ts.map | 1 - .../expect/build/jestMatchersObject.js | 94 - node_modules/expect/build/matchers.d.ts | 11 - node_modules/expect/build/matchers.d.ts.map | 1 - node_modules/expect/build/matchers.js | 1327 - node_modules/expect/build/print.d.ts | 15 - node_modules/expect/build/print.d.ts.map | 1 - node_modules/expect/build/print.js | 103 - node_modules/expect/build/spyMatchers.d.ts | 10 - .../expect/build/spyMatchers.d.ts.map | 1 - node_modules/expect/build/spyMatchers.js | 1370 - .../expect/build/toThrowMatchers.d.ts | 12 - .../expect/build/toThrowMatchers.d.ts.map | 1 - node_modules/expect/build/toThrowMatchers.js | 462 - node_modules/expect/build/types.d.ts | 326 - node_modules/expect/build/types.d.ts.map | 1 - node_modules/expect/build/types.js | 3 - node_modules/expect/build/utils.d.ts | 26 - node_modules/expect/build/utils.d.ts.map | 1 - node_modules/expect/build/utils.js | 502 - node_modules/expect/package.json | 68 - node_modules/extend-shallow/LICENSE | 21 - node_modules/extend-shallow/README.md | 97 - node_modules/extend-shallow/index.js | 60 - .../node_modules/is-extendable/LICENSE | 21 - .../node_modules/is-extendable/README.md | 88 - .../node_modules/is-extendable/index.d.ts | 5 - .../node_modules/is-extendable/index.js | 14 - .../node_modules/is-extendable/package.json | 102 - node_modules/extend-shallow/package.json | 130 - node_modules/extend/.editorconfig | 20 - node_modules/extend/.eslintrc | 17 - node_modules/extend/.jscs.json | 175 - node_modules/extend/.travis.yml | 230 - node_modules/extend/CHANGELOG.md | 83 - node_modules/extend/LICENSE | 23 - node_modules/extend/README.md | 81 - node_modules/extend/component.json | 32 - node_modules/extend/index.js | 117 - node_modules/extend/package.json | 79 - node_modules/extglob/LICENSE | 21 - node_modules/extglob/README.md | 362 - node_modules/extglob/changelog.md | 25 - node_modules/extglob/index.js | 331 - node_modules/extglob/lib/.DS_Store | Bin 6148 -> 0 bytes node_modules/extglob/lib/compilers.js | 169 - node_modules/extglob/lib/extglob.js | 78 - node_modules/extglob/lib/parsers.js | 156 - node_modules/extglob/lib/utils.js | 69 - .../node_modules/define-property/LICENSE | 21 - .../node_modules/define-property/README.md | 95 - .../node_modules/define-property/index.js | 31 - .../node_modules/define-property/package.json | 97 - .../node_modules/extend-shallow/LICENSE | 21 - .../node_modules/extend-shallow/README.md | 61 - .../node_modules/extend-shallow/index.js | 33 - .../node_modules/extend-shallow/package.json | 91 - .../is-accessor-descriptor/LICENSE | 21 - .../is-accessor-descriptor/README.md | 144 - .../is-accessor-descriptor/index.js | 69 - .../is-accessor-descriptor/package.json | 114 - .../node_modules/is-data-descriptor/LICENSE | 21 - .../node_modules/is-data-descriptor/README.md | 161 - .../node_modules/is-data-descriptor/index.js | 49 - .../is-data-descriptor/package.json | 113 - .../node_modules/is-descriptor/LICENSE | 21 - .../node_modules/is-descriptor/README.md | 193 - .../node_modules/is-descriptor/index.js | 22 - .../node_modules/is-descriptor/package.json | 118 - node_modules/extglob/package.json | 164 - node_modules/extsprintf/.gitmodules | 0 node_modules/extsprintf/.npmignore | 2 - node_modules/extsprintf/LICENSE | 19 - node_modules/extsprintf/Makefile | 24 - node_modules/extsprintf/Makefile.targ | 285 - node_modules/extsprintf/README.md | 46 - node_modules/extsprintf/jsl.node.conf | 137 - node_modules/extsprintf/lib/extsprintf.js | 183 - node_modules/extsprintf/package.json | 48 - node_modules/fast-deep-equal/LICENSE | 21 - node_modules/fast-deep-equal/README.md | 58 - node_modules/fast-deep-equal/index.d.ts | 4 - node_modules/fast-deep-equal/index.js | 55 - node_modules/fast-deep-equal/package.json | 90 - .../fast-json-stable-stringify/.eslintrc.yml | 26 - .../fast-json-stable-stringify/.npmignore | 4 - .../fast-json-stable-stringify/.travis.yml | 8 - .../fast-json-stable-stringify/LICENSE | 18 - .../fast-json-stable-stringify/README.md | 119 - .../benchmark/index.js | 31 - .../benchmark/test.json | 137 - .../example/key_cmp.js | 7 - .../example/nested.js | 3 - .../fast-json-stable-stringify/example/str.js | 3 - .../example/value_cmp.js | 7 - .../fast-json-stable-stringify/index.js | 59 - .../fast-json-stable-stringify/package.json | 85 - .../fast-json-stable-stringify/test/cmp.js | 13 - .../fast-json-stable-stringify/test/nested.js | 44 - .../fast-json-stable-stringify/test/str.js | 46 - .../test/to-json.js | 22 - node_modules/fast-levenshtein/LICENSE.md | 25 - node_modules/fast-levenshtein/README.md | 104 - node_modules/fast-levenshtein/levenshtein.js | 136 - node_modules/fast-levenshtein/package.json | 76 - node_modules/fb-watchman/README.md | 34 - node_modules/fb-watchman/index.js | 322 - node_modules/fb-watchman/package.json | 69 - node_modules/fill-range/LICENSE | 21 - node_modules/fill-range/README.md | 250 - node_modules/fill-range/index.js | 208 - .../node_modules/extend-shallow/LICENSE | 21 - .../node_modules/extend-shallow/README.md | 61 - .../node_modules/extend-shallow/index.js | 33 - .../node_modules/extend-shallow/package.json | 91 - node_modules/fill-range/package.json | 134 - node_modules/find-up/index.js | 46 - node_modules/find-up/license | 9 - node_modules/find-up/package.json | 90 - node_modules/find-up/readme.md | 87 - node_modules/follow-redirects/LICENSE | 18 - node_modules/follow-redirects/README.md | 155 - node_modules/follow-redirects/http.js | 1 - node_modules/follow-redirects/https.js | 1 - node_modules/follow-redirects/index.js | 322 - .../node_modules/debug/.coveralls.yml | 1 - .../node_modules/debug/.eslintrc | 14 - .../node_modules/debug/.npmignore | 9 - .../node_modules/debug/.travis.yml | 20 - .../node_modules/debug/CHANGELOG.md | 395 - .../node_modules/debug/LICENSE | 19 - .../node_modules/debug/Makefile | 58 - .../node_modules/debug/README.md | 368 - .../node_modules/debug/karma.conf.js | 70 - .../node_modules/debug/node.js | 1 - .../node_modules/debug/package.json | 85 - .../node_modules/debug/src/browser.js | 195 - .../node_modules/debug/src/debug.js | 225 - .../node_modules/debug/src/index.js | 10 - .../node_modules/debug/src/node.js | 186 - node_modules/follow-redirects/package.json | 101 - node_modules/for-in/LICENSE | 21 - node_modules/for-in/README.md | 85 - node_modules/for-in/index.js | 16 - node_modules/for-in/package.json | 110 - node_modules/forever-agent/LICENSE | 55 - node_modules/forever-agent/README.md | 4 - node_modules/forever-agent/index.js | 138 - node_modules/forever-agent/package.json | 54 - node_modules/form-data/License | 19 - node_modules/form-data/README.md | 234 - node_modules/form-data/README.md.bak | 234 - node_modules/form-data/lib/browser.js | 2 - node_modules/form-data/lib/form_data.js | 457 - node_modules/form-data/lib/populate.js | 10 - node_modules/form-data/package.json | 102 - node_modules/form-data/yarn.lock | 2662 - node_modules/fragment-cache/LICENSE | 21 - node_modules/fragment-cache/README.md | 156 - node_modules/fragment-cache/index.js | 128 - node_modules/fragment-cache/package.json | 97 - node_modules/fs.realpath/LICENSE | 43 - node_modules/fs.realpath/README.md | 33 - node_modules/fs.realpath/index.js | 66 - node_modules/fs.realpath/old.js | 303 - node_modules/fs.realpath/package.json | 63 - node_modules/function-bind/.editorconfig | 20 - node_modules/function-bind/.eslintrc | 15 - node_modules/function-bind/.jscs.json | 176 - node_modules/function-bind/.npmignore | 22 - node_modules/function-bind/.travis.yml | 168 - node_modules/function-bind/LICENSE | 20 - node_modules/function-bind/README.md | 48 - node_modules/function-bind/implementation.js | 52 - node_modules/function-bind/index.js | 5 - node_modules/function-bind/package.json | 101 - node_modules/function-bind/test/.eslintrc | 9 - node_modules/function-bind/test/index.js | 252 - node_modules/get-caller-file/LICENSE.md | 6 - node_modules/get-caller-file/README.md | 41 - node_modules/get-caller-file/index.d.ts | 2 - node_modules/get-caller-file/index.js | 22 - node_modules/get-caller-file/index.js.map | 1 - node_modules/get-caller-file/package.json | 73 - node_modules/get-stdin/index.d.ts | 33 - node_modules/get-stdin/index.js | 52 - node_modules/get-stdin/license | 9 - node_modules/get-stdin/package.json | 75 - node_modules/get-stdin/readme.md | 55 - node_modules/get-stream/buffer-stream.js | 51 - node_modules/get-stream/index.js | 50 - node_modules/get-stream/license | 9 - node_modules/get-stream/package.json | 82 - node_modules/get-stream/readme.md | 123 - node_modules/get-value/LICENSE | 21 - node_modules/get-value/index.js | 50 - node_modules/get-value/package.json | 117 - node_modules/getpass/.npmignore | 8 - node_modules/getpass/.travis.yml | 9 - node_modules/getpass/LICENSE | 18 - node_modules/getpass/README.md | 32 - node_modules/getpass/lib/index.js | 123 - node_modules/getpass/package.json | 54 - node_modules/glob/LICENSE | 21 - node_modules/glob/README.md | 373 - node_modules/glob/changelog.md | 67 - node_modules/glob/common.js | 240 - node_modules/glob/glob.js | 790 - node_modules/glob/package.json | 84 - node_modules/glob/sync.js | 486 - node_modules/globals/globals.json | 1563 - node_modules/globals/index.js | 2 - node_modules/globals/license | 9 - node_modules/globals/package.json | 77 - node_modules/globals/readme.md | 41 - node_modules/graceful-fs/LICENSE | 15 - node_modules/graceful-fs/README.md | 133 - node_modules/graceful-fs/clone.js | 19 - node_modules/graceful-fs/graceful-fs.js | 344 - node_modules/graceful-fs/legacy-streams.js | 118 - node_modules/graceful-fs/package.json | 91 - node_modules/graceful-fs/polyfills.js | 342 - node_modules/growly/HISTORY.md | 5 - node_modules/growly/README.md | 95 - node_modules/growly/example/bakery.js | 22 - node_modules/growly/example/cake.png | Bin 14813 -> 0 bytes node_modules/growly/example/muffin.png | Bin 16978 -> 0 bytes node_modules/growly/example/simple.js | 3 - node_modules/growly/lib/gntp.js | 200 - node_modules/growly/lib/growly.js | 193 - node_modules/growly/package.json | 61 - node_modules/handlebars/LICENSE | 19 - node_modules/handlebars/README.markdown | 168 - node_modules/handlebars/bin/handlebars | 128 - .../handlebars/dist/amd/handlebars.js | 51 - .../handlebars/dist/amd/handlebars.runtime.js | 44 - .../handlebars/dist/amd/handlebars/base.js | 96 - .../dist/amd/handlebars/compiler/ast.js | 31 - .../dist/amd/handlebars/compiler/base.js | 36 - .../dist/amd/handlebars/compiler/code-gen.js | 163 - .../dist/amd/handlebars/compiler/compiler.js | 569 - .../dist/amd/handlebars/compiler/helpers.js | 228 - .../compiler/javascript-compiler.js | 1123 - .../dist/amd/handlebars/compiler/parser.js | 737 - .../dist/amd/handlebars/compiler/printer.js | 186 - .../dist/amd/handlebars/compiler/visitor.js | 138 - .../handlebars/compiler/whitespace-control.js | 219 - .../dist/amd/handlebars/decorators.js | 16 - .../dist/amd/handlebars/decorators/inline.js | 25 - .../dist/amd/handlebars/exception.js | 53 - .../handlebars/dist/amd/handlebars/helpers.js | 34 - .../helpers/block-helper-missing.js | 35 - .../dist/amd/handlebars/helpers/each.js | 89 - .../amd/handlebars/helpers/helper-missing.js | 22 - .../dist/amd/handlebars/helpers/if.js | 25 - .../dist/amd/handlebars/helpers/log.js | 24 - .../dist/amd/handlebars/helpers/lookup.js | 16 - .../dist/amd/handlebars/helpers/with.js | 29 - .../handlebars/dist/amd/handlebars/logger.js | 44 - .../dist/amd/handlebars/no-conflict.js | 18 - .../handlebars/dist/amd/handlebars/runtime.js | 301 - .../dist/amd/handlebars/safe-string.js | 15 - .../handlebars/dist/amd/handlebars/utils.js | 126 - .../handlebars/dist/amd/precompiler.js | 313 - .../handlebars/dist/cjs/handlebars.js | 65 - .../handlebars/dist/cjs/handlebars.runtime.js | 66 - .../handlebars/dist/cjs/handlebars/base.js | 104 - .../dist/cjs/handlebars/compiler/ast.js | 31 - .../dist/cjs/handlebars/compiler/base.js | 48 - .../dist/cjs/handlebars/compiler/code-gen.js | 166 - .../dist/cjs/handlebars/compiler/compiler.js | 573 - .../dist/cjs/handlebars/compiler/helpers.js | 228 - .../compiler/javascript-compiler.js | 1131 - .../dist/cjs/handlebars/compiler/parser.js | 737 - .../dist/cjs/handlebars/compiler/printer.js | 186 - .../dist/cjs/handlebars/compiler/visitor.js | 140 - .../handlebars/compiler/whitespace-control.js | 221 - .../dist/cjs/handlebars/decorators.js | 16 - .../dist/cjs/handlebars/decorators/inline.js | 29 - .../dist/cjs/handlebars/exception.js | 54 - .../handlebars/dist/cjs/handlebars/helpers.js | 46 - .../helpers/block-helper-missing.js | 39 - .../dist/cjs/handlebars/helpers/each.js | 94 - .../cjs/handlebars/helpers/helper-missing.js | 25 - .../dist/cjs/handlebars/helpers/if.js | 29 - .../dist/cjs/handlebars/helpers/log.js | 26 - .../dist/cjs/handlebars/helpers/lookup.js | 18 - .../dist/cjs/handlebars/helpers/with.js | 33 - .../handlebars/dist/cjs/handlebars/logger.js | 47 - .../dist/cjs/handlebars/no-conflict.js | 20 - .../handlebars/dist/cjs/handlebars/runtime.js | 311 - .../dist/cjs/handlebars/safe-string.js | 15 - .../handlebars/dist/cjs/handlebars/utils.js | 124 - .../handlebars/dist/cjs/precompiler.js | 327 - .../handlebars/dist/handlebars.amd.js | 4361 -- .../handlebars/dist/handlebars.amd.min.js | 29 - node_modules/handlebars/dist/handlebars.js | 4849 -- .../handlebars/dist/handlebars.min.js | 29 - .../handlebars/dist/handlebars.runtime.amd.js | 1056 - .../dist/handlebars.runtime.amd.min.js | 27 - .../handlebars/dist/handlebars.runtime.js | 1478 - .../handlebars/dist/handlebars.runtime.min.js | 27 - node_modules/handlebars/lib/handlebars.js | 41 - .../handlebars/lib/handlebars.runtime.js | 37 - .../handlebars/lib/handlebars/base.js | 78 - .../handlebars/lib/handlebars/compiler/ast.js | 28 - .../lib/handlebars/compiler/base.js | 24 - .../lib/handlebars/compiler/code-gen.js | 168 - .../lib/handlebars/compiler/compiler.js | 559 - .../lib/handlebars/compiler/helpers.js | 210 - .../compiler/javascript-compiler.js | 1140 - .../lib/handlebars/compiler/parser.js | 622 - .../lib/handlebars/compiler/printer.js | 171 - .../lib/handlebars/compiler/visitor.js | 129 - .../handlebars/compiler/whitespace-control.js | 216 - .../handlebars/lib/handlebars/decorators.js | 6 - .../lib/handlebars/decorators/inline.js | 22 - .../handlebars/lib/handlebars/exception.js | 49 - .../handlebars/lib/handlebars/helpers.js | 17 - .../helpers/block-helper-missing.js | 32 - .../handlebars/lib/handlebars/helpers/each.js | 79 - .../lib/handlebars/helpers/helper-missing.js | 13 - .../handlebars/lib/handlebars/helpers/if.js | 20 - .../handlebars/lib/handlebars/helpers/log.js | 19 - .../lib/handlebars/helpers/lookup.js | 11 - .../handlebars/lib/handlebars/helpers/with.js | 24 - .../handlebars/lib/handlebars/logger.js | 35 - .../handlebars/lib/handlebars/no-conflict.js | 13 - .../handlebars/lib/handlebars/runtime.js | 284 - .../handlebars/lib/handlebars/safe-string.js | 10 - .../handlebars/lib/handlebars/utils.js | 108 - node_modules/handlebars/lib/index.js | 25 - node_modules/handlebars/lib/precompiler.js | 298 - node_modules/handlebars/package.json | 131 - node_modules/handlebars/print-script | 95 - node_modules/handlebars/release-notes.md | 668 - node_modules/handlebars/runtime.js | 3 - node_modules/handlebars/types/index.d.ts | 384 - node_modules/har-schema/LICENSE | 13 - node_modules/har-schema/README.md | 49 - node_modules/har-schema/lib/afterRequest.json | 30 - .../har-schema/lib/beforeRequest.json | 30 - node_modules/har-schema/lib/browser.json | 20 - node_modules/har-schema/lib/cache.json | 21 - node_modules/har-schema/lib/content.json | 29 - node_modules/har-schema/lib/cookie.json | 36 - node_modules/har-schema/lib/creator.json | 20 - node_modules/har-schema/lib/entry.json | 53 - node_modules/har-schema/lib/har.json | 13 - node_modules/har-schema/lib/header.json | 20 - node_modules/har-schema/lib/index.js | 22 - node_modules/har-schema/lib/log.json | 36 - node_modules/har-schema/lib/page.json | 32 - node_modules/har-schema/lib/pageTimings.json | 18 - node_modules/har-schema/lib/postData.json | 43 - node_modules/har-schema/lib/query.json | 20 - node_modules/har-schema/lib/request.json | 57 - node_modules/har-schema/lib/response.json | 54 - node_modules/har-schema/lib/timings.json | 42 - node_modules/har-schema/package.json | 90 - node_modules/har-validator/LICENSE | 9 - node_modules/har-validator/README.md | 37 - node_modules/har-validator/lib/async.js | 105 - node_modules/har-validator/lib/error.js | 17 - node_modules/har-validator/lib/promise.js | 102 - node_modules/har-validator/package.json | 80 - node_modules/has-flag/index.js | 8 - node_modules/has-flag/license | 9 - node_modules/has-flag/package.json | 82 - node_modules/has-flag/readme.md | 70 - node_modules/has-symbols/.eslintrc | 10 - node_modules/has-symbols/.npmignore | 37 - node_modules/has-symbols/.travis.yml | 113 - node_modules/has-symbols/CHANGELOG.md | 3 - node_modules/has-symbols/LICENSE | 21 - node_modules/has-symbols/README.md | 45 - node_modules/has-symbols/index.js | 13 - node_modules/has-symbols/package.json | 112 - node_modules/has-symbols/shams.js | 42 - node_modules/has-symbols/test/index.js | 22 - .../has-symbols/test/shams/core-js.js | 28 - .../test/shams/get-own-property-symbols.js | 28 - node_modules/has-symbols/test/tests.js | 54 - node_modules/has-value/LICENSE | 21 - node_modules/has-value/README.md | 149 - node_modules/has-value/index.js | 16 - node_modules/has-value/package.json | 124 - node_modules/has-values/LICENSE | 21 - node_modules/has-values/README.md | 129 - node_modules/has-values/index.js | 60 - .../has-values/node_modules/kind-of/LICENSE | 21 - .../has-values/node_modules/kind-of/README.md | 267 - .../has-values/node_modules/kind-of/index.js | 119 - .../node_modules/kind-of/package.json | 143 - node_modules/has-values/package.json | 119 - node_modules/has/LICENSE-MIT | 22 - node_modules/has/README.md | 18 - node_modules/has/package.json | 78 - node_modules/has/src/index.js | 5 - node_modules/has/test/index.js | 10 - node_modules/hosted-git-info/CHANGELOG.md | 104 - node_modules/hosted-git-info/LICENSE | 13 - node_modules/hosted-git-info/README.md | 133 - node_modules/hosted-git-info/git-host-info.js | 79 - node_modules/hosted-git-info/git-host.js | 156 - node_modules/hosted-git-info/index.js | 124 - node_modules/hosted-git-info/package.json | 72 - .../html-encoding-sniffer/LICENSE.txt | 7 - node_modules/html-encoding-sniffer/README.md | 38 - .../lib/html-encoding-sniffer.js | 302 - .../html-encoding-sniffer/package.json | 67 - node_modules/http-signature/.dir-locals.el | 6 - node_modules/http-signature/.npmignore | 7 - node_modules/http-signature/CHANGES.md | 46 - node_modules/http-signature/LICENSE | 18 - node_modules/http-signature/README.md | 79 - node_modules/http-signature/http_signing.md | 363 - node_modules/http-signature/lib/index.js | 29 - node_modules/http-signature/lib/parser.js | 315 - node_modules/http-signature/lib/signer.js | 401 - node_modules/http-signature/lib/utils.js | 112 - node_modules/http-signature/lib/verify.js | 88 - node_modules/http-signature/package.json | 81 - node_modules/husky/.eslintrc.js | 20 - node_modules/husky/.github/FUNDING.yml | 2 - node_modules/husky/.prettierrc | 4 - node_modules/husky/CHANGELOG.md | 284 - node_modules/husky/DOCS.md | 125 - node_modules/husky/LICENSE | 21 - node_modules/husky/README.md | 112 - node_modules/husky/husky.js | 15 - node_modules/husky/lib/getConf.js | 15 - node_modules/husky/lib/installer/bin.js | 29 - node_modules/husky/lib/installer/getScript.js | 99 - node_modules/husky/lib/installer/index.js | 171 - node_modules/husky/lib/installer/is.js | 24 - .../husky/lib/installer/resolveGitDir.js | 39 - node_modules/husky/lib/runner/bin.js | 12 - node_modules/husky/lib/runner/index.js | 83 - node_modules/husky/lib/upgrader/bin.js | 8 - node_modules/husky/lib/upgrader/index.js | 64 - node_modules/husky/package.json | 133 - node_modules/husky/run.js | 13 - node_modules/iconv-lite/Changelog.md | 162 - node_modules/iconv-lite/LICENSE | 21 - node_modules/iconv-lite/README.md | 156 - .../iconv-lite/encodings/dbcs-codec.js | 555 - .../iconv-lite/encodings/dbcs-data.js | 176 - node_modules/iconv-lite/encodings/index.js | 22 - node_modules/iconv-lite/encodings/internal.js | 188 - .../iconv-lite/encodings/sbcs-codec.js | 72 - .../encodings/sbcs-data-generated.js | 451 - .../iconv-lite/encodings/sbcs-data.js | 174 - .../encodings/tables/big5-added.json | 122 - .../iconv-lite/encodings/tables/cp936.json | 264 - .../iconv-lite/encodings/tables/cp949.json | 273 - .../iconv-lite/encodings/tables/cp950.json | 177 - .../iconv-lite/encodings/tables/eucjp.json | 182 - .../encodings/tables/gb18030-ranges.json | 1 - .../encodings/tables/gbk-added.json | 55 - .../iconv-lite/encodings/tables/shiftjis.json | 125 - node_modules/iconv-lite/encodings/utf16.js | 177 - node_modules/iconv-lite/encodings/utf7.js | 290 - node_modules/iconv-lite/lib/bom-handling.js | 52 - node_modules/iconv-lite/lib/extend-node.js | 217 - node_modules/iconv-lite/lib/index.d.ts | 24 - node_modules/iconv-lite/lib/index.js | 153 - node_modules/iconv-lite/lib/streams.js | 121 - node_modules/iconv-lite/package.json | 80 - node_modules/import-fresh/index.js | 29 - node_modules/import-fresh/license | 21 - node_modules/import-fresh/package.json | 84 - node_modules/import-fresh/readme.md | 50 - node_modules/import-local/fixtures/cli.js | 7 - node_modules/import-local/index.js | 17 - node_modules/import-local/license | 9 - .../node_modules/pkg-dir/index.js | 10 - .../import-local/node_modules/pkg-dir/license | 9 - .../node_modules/pkg-dir/package.json | 89 - .../node_modules/pkg-dir/readme.md | 66 - node_modules/import-local/package.json | 90 - node_modules/import-local/readme.md | 30 - node_modules/imurmurhash/README.md | 122 - node_modules/imurmurhash/imurmurhash.js | 138 - node_modules/imurmurhash/imurmurhash.min.js | 12 - node_modules/imurmurhash/package.json | 67 - node_modules/inflight/LICENSE | 15 - node_modules/inflight/README.md | 37 - node_modules/inflight/inflight.js | 54 - node_modules/inflight/package.json | 62 - node_modules/inherits/LICENSE | 16 - node_modules/inherits/README.md | 42 - node_modules/inherits/inherits.js | 9 - node_modules/inherits/inherits_browser.js | 27 - node_modules/inherits/package.json | 65 - node_modules/invariant/CHANGELOG.md | 69 - node_modules/invariant/LICENSE | 21 - node_modules/invariant/README.md | 37 - node_modules/invariant/browser.js | 49 - node_modules/invariant/invariant.js | 51 - node_modules/invariant/invariant.js.flow | 7 - node_modules/invariant/package.json | 74 - node_modules/is-accessor-descriptor/LICENSE | 21 - node_modules/is-accessor-descriptor/README.md | 123 - node_modules/is-accessor-descriptor/index.js | 69 - .../node_modules/kind-of/LICENSE | 21 - .../node_modules/kind-of/README.md | 261 - .../node_modules/kind-of/index.js | 116 - .../node_modules/kind-of/package.json | 143 - .../is-accessor-descriptor/package.json | 98 - 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 | 70 - node_modules/is-buffer/LICENSE | 21 - node_modules/is-buffer/README.md | 53 - node_modules/is-buffer/index.js | 21 - node_modules/is-buffer/package.json | 87 - node_modules/is-buffer/test/basic.js | 24 - node_modules/is-callable/.editorconfig | 20 - node_modules/is-callable/.eslintrc | 11 - node_modules/is-callable/.istanbul.yml | 47 - node_modules/is-callable/.jscs.json | 176 - node_modules/is-callable/.travis.yml | 225 - node_modules/is-callable/CHANGELOG.md | 56 - node_modules/is-callable/LICENSE | 22 - node_modules/is-callable/Makefile | 61 - node_modules/is-callable/README.md | 59 - node_modules/is-callable/index.js | 37 - node_modules/is-callable/package.json | 128 - node_modules/is-callable/test.js | 158 - node_modules/is-ci/CHANGELOG.md | 14 - node_modules/is-ci/LICENSE | 21 - node_modules/is-ci/README.md | 50 - node_modules/is-ci/bin.js | 4 - node_modules/is-ci/index.js | 3 - node_modules/is-ci/package.json | 75 - node_modules/is-data-descriptor/LICENSE | 21 - node_modules/is-data-descriptor/README.md | 128 - node_modules/is-data-descriptor/index.js | 55 - .../node_modules/kind-of/LICENSE | 21 - .../node_modules/kind-of/README.md | 261 - .../node_modules/kind-of/index.js | 116 - .../node_modules/kind-of/package.json | 143 - node_modules/is-data-descriptor/package.json | 97 - node_modules/is-date-object/.eslintrc | 9 - node_modules/is-date-object/.jscs.json | 122 - node_modules/is-date-object/.npmignore | 28 - node_modules/is-date-object/.travis.yml | 58 - node_modules/is-date-object/CHANGELOG.md | 10 - node_modules/is-date-object/LICENSE | 22 - node_modules/is-date-object/Makefile | 61 - node_modules/is-date-object/README.md | 53 - node_modules/is-date-object/index.js | 20 - node_modules/is-date-object/package.json | 97 - node_modules/is-date-object/test.js | 33 - node_modules/is-descriptor/LICENSE | 21 - node_modules/is-descriptor/README.md | 193 - node_modules/is-descriptor/index.js | 22 - .../node_modules/kind-of/LICENSE | 21 - .../node_modules/kind-of/README.md | 342 - .../node_modules/kind-of/index.js | 147 - .../node_modules/kind-of/package.json | 150 - node_modules/is-descriptor/package.json | 122 - node_modules/is-directory/LICENSE | 21 - node_modules/is-directory/README.md | 76 - node_modules/is-directory/index.js | 65 - node_modules/is-directory/package.json | 100 - node_modules/is-extendable/LICENSE | 21 - node_modules/is-extendable/README.md | 72 - node_modules/is-extendable/index.js | 13 - node_modules/is-extendable/package.json | 93 - node_modules/is-fullwidth-code-point/index.js | 46 - node_modules/is-fullwidth-code-point/license | 21 - .../is-fullwidth-code-point/package.json | 81 - .../is-fullwidth-code-point/readme.md | 39 - node_modules/is-generator-fn/index.d.ts | 24 - node_modules/is-generator-fn/index.js | 14 - node_modules/is-generator-fn/license | 9 - node_modules/is-generator-fn/package.json | 75 - node_modules/is-generator-fn/readme.md | 33 - node_modules/is-number/LICENSE | 21 - node_modules/is-number/README.md | 115 - node_modules/is-number/index.js | 22 - .../is-number/node_modules/kind-of/LICENSE | 21 - .../is-number/node_modules/kind-of/README.md | 261 - .../is-number/node_modules/kind-of/index.js | 116 - .../node_modules/kind-of/package.json | 143 - node_modules/is-number/package.json | 129 - node_modules/is-plain-object/LICENSE | 21 - node_modules/is-plain-object/README.md | 104 - node_modules/is-plain-object/index.d.ts | 5 - node_modules/is-plain-object/index.js | 37 - node_modules/is-plain-object/package.json | 127 - node_modules/is-regex/.eslintrc | 9 - node_modules/is-regex/.jscs.json | 176 - node_modules/is-regex/.npmignore | 15 - node_modules/is-regex/.travis.yml | 165 - node_modules/is-regex/CHANGELOG.md | 27 - node_modules/is-regex/LICENSE | 20 - node_modules/is-regex/Makefile | 61 - node_modules/is-regex/README.md | 54 - node_modules/is-regex/index.js | 39 - node_modules/is-regex/package.json | 104 - node_modules/is-regex/test.js | 58 - node_modules/is-stream/index.js | 21 - node_modules/is-stream/license | 21 - node_modules/is-stream/package.json | 74 - node_modules/is-stream/readme.md | 42 - node_modules/is-symbol/.editorconfig | 13 - node_modules/is-symbol/.eslintrc | 9 - node_modules/is-symbol/.jscs.json | 176 - node_modules/is-symbol/.nvmrc | 1 - node_modules/is-symbol/.travis.yml | 241 - node_modules/is-symbol/CHANGELOG.md | 12 - node_modules/is-symbol/LICENSE | 22 - node_modules/is-symbol/Makefile | 61 - node_modules/is-symbol/README.md | 46 - node_modules/is-symbol/index.js | 35 - node_modules/is-symbol/package.json | 100 - node_modules/is-symbol/test/.eslintrc | 7 - node_modules/is-symbol/test/index.js | 92 - node_modules/is-typedarray/LICENSE.md | 18 - node_modules/is-typedarray/README.md | 16 - node_modules/is-typedarray/index.js | 41 - node_modules/is-typedarray/package.json | 63 - node_modules/is-typedarray/test.js | 34 - node_modules/is-windows/LICENSE | 21 - node_modules/is-windows/README.md | 95 - node_modules/is-windows/index.js | 27 - node_modules/is-windows/package.json | 115 - node_modules/is-wsl/index.js | 25 - node_modules/is-wsl/license | 21 - node_modules/is-wsl/package.json | 76 - node_modules/is-wsl/readme.md | 28 - node_modules/isarray/.npmignore | 1 - node_modules/isarray/.travis.yml | 4 - node_modules/isarray/Makefile | 6 - node_modules/isarray/README.md | 60 - node_modules/isarray/component.json | 19 - node_modules/isarray/index.js | 5 - node_modules/isarray/package.json | 77 - node_modules/isarray/test.js | 20 - node_modules/isexe/.npmignore | 2 - node_modules/isexe/LICENSE | 15 - node_modules/isexe/README.md | 51 - node_modules/isexe/index.js | 57 - node_modules/isexe/mode.js | 41 - node_modules/isexe/package.json | 64 - node_modules/isexe/test/basic.js | 221 - node_modules/isexe/windows.js | 42 - node_modules/isobject/LICENSE | 21 - node_modules/isobject/README.md | 122 - node_modules/isobject/index.d.ts | 5 - node_modules/isobject/index.js | 12 - node_modules/isobject/package.json | 133 - node_modules/isstream/.jshintrc | 59 - node_modules/isstream/.npmignore | 1 - node_modules/isstream/.travis.yml | 12 - node_modules/isstream/LICENSE.md | 11 - node_modules/isstream/README.md | 66 - node_modules/isstream/isstream.js | 27 - node_modules/isstream/package.json | 65 - node_modules/isstream/test.js | 168 - .../istanbul-lib-coverage/CHANGELOG.md | 122 - node_modules/istanbul-lib-coverage/LICENSE | 24 - node_modules/istanbul-lib-coverage/README.md | 29 - node_modules/istanbul-lib-coverage/index.js | 64 - .../istanbul-lib-coverage/lib/coverage-map.js | 127 - .../istanbul-lib-coverage/lib/file.js | 348 - .../istanbul-lib-coverage/package.json | 77 - .../istanbul-lib-instrument/CHANGELOG.md | 464 - node_modules/istanbul-lib-instrument/LICENSE | 24 - .../istanbul-lib-instrument/README.md | 21 - .../istanbul-lib-instrument/dist/constants.js | 22 - .../istanbul-lib-instrument/dist/index.js | 44 - .../dist/instrumenter.js | 204 - .../dist/read-coverage.js | 80 - .../dist/source-coverage.js | 121 - .../istanbul-lib-instrument/dist/visitor.js | 673 - .../istanbul-lib-instrument/package.json | 76 - node_modules/istanbul-lib-report/CHANGELOG.md | 137 - node_modules/istanbul-lib-report/LICENSE | 24 - node_modules/istanbul-lib-report/README.md | 6 - node_modules/istanbul-lib-report/index.js | 56 - .../istanbul-lib-report/lib/context.js | 126 - .../istanbul-lib-report/lib/file-writer.js | 194 - node_modules/istanbul-lib-report/lib/path.js | 159 - .../istanbul-lib-report/lib/summarizer.js | 285 - node_modules/istanbul-lib-report/lib/tree.js | 159 - .../istanbul-lib-report/lib/watermarks.js | 14 - .../istanbul-lib-report/lib/xml-writer.js | 95 - .../node_modules/supports-color/browser.js | 5 - .../node_modules/supports-color/index.js | 138 - .../node_modules/supports-color/license | 9 - .../node_modules/supports-color/package.json | 89 - .../node_modules/supports-color/readme.md | 85 - node_modules/istanbul-lib-report/package.json | 72 - .../istanbul-lib-source-maps/CHANGELOG.md | 194 - node_modules/istanbul-lib-source-maps/LICENSE | 24 - .../istanbul-lib-source-maps/README.md | 11 - .../istanbul-lib-source-maps/index.js | 15 - .../lib/get-mapping.js | 182 - .../istanbul-lib-source-maps/lib/map-store.js | 189 - .../istanbul-lib-source-maps/lib/mapped.js | 113 - .../istanbul-lib-source-maps/lib/pathutils.js | 21 - .../lib/source-store.js | 80 - .../lib/transform-utils.js | 20 - .../lib/transformer.js | 134 - .../node_modules/debug/CHANGELOG.md | 395 - .../node_modules/debug/LICENSE | 19 - .../node_modules/debug/README.md | 455 - .../node_modules/debug/dist/debug.js | 912 - .../node_modules/debug/package.json | 106 - .../node_modules/debug/src/browser.js | 264 - .../node_modules/debug/src/common.js | 266 - .../node_modules/debug/src/index.js | 10 - .../node_modules/debug/src/node.js | 257 - .../node_modules/ms/index.js | 162 - .../node_modules/ms/license.md | 21 - .../node_modules/ms/package.json | 73 - .../node_modules/ms/readme.md | 60 - .../istanbul-lib-source-maps/package.json | 76 - node_modules/istanbul-reports/CHANGELOG.md | 277 - node_modules/istanbul-reports/LICENSE | 24 - node_modules/istanbul-reports/README.md | 13 - node_modules/istanbul-reports/index.js | 19 - .../istanbul-reports/lib/clover/index.js | 163 - .../istanbul-reports/lib/cobertura/index.js | 143 - .../istanbul-reports/lib/html/annotator.js | 275 - .../istanbul-reports/lib/html/assets/base.css | 224 - .../lib/html/assets/block-navigation.js | 78 - .../lib/html/assets/sort-arrow-sprite.png | Bin 209 -> 0 bytes .../lib/html/assets/sorter.js | 169 - .../lib/html/assets/vendor/prettify.css | 1 - .../lib/html/assets/vendor/prettify.js | 1 - .../istanbul-reports/lib/html/helpers.js | 106 - .../istanbul-reports/lib/html/index.js | 274 - .../lib/html/insertion-text.js | 113 - .../lib/html/templates/foot.txt | 21 - .../lib/html/templates/head.txt | 63 - .../lib/json-summary/index.js | 48 - .../istanbul-reports/lib/json/index.js | 39 - .../istanbul-reports/lib/lcov/index.js | 28 - .../istanbul-reports/lib/lcovonly/index.js | 68 - .../istanbul-reports/lib/none/index.js | 7 - .../istanbul-reports/lib/teamcity/index.js | 54 - .../istanbul-reports/lib/text-lcov/index.js | 14 - .../lib/text-summary/index.js | 57 - .../istanbul-reports/lib/text/index.js | 239 - node_modules/istanbul-reports/package.json | 70 - node_modules/jest-changed-files/LICENSE | 21 - node_modules/jest-changed-files/README.md | 63 - .../jest-changed-files/build/git.d.ts | 11 - .../jest-changed-files/build/git.d.ts.map | 1 - node_modules/jest-changed-files/build/git.js | 159 - node_modules/jest-changed-files/build/hg.d.ts | 11 - .../jest-changed-files/build/hg.d.ts.map | 1 - node_modules/jest-changed-files/build/hg.js | 152 - .../jest-changed-files/build/index.d.ts | 12 - .../jest-changed-files/build/index.d.ts.map | 1 - .../jest-changed-files/build/index.js | 201 - .../jest-changed-files/build/types.d.ts | 29 - .../jest-changed-files/build/types.d.ts.map | 1 - .../jest-changed-files/build/types.js | 1 - node_modules/jest-changed-files/package.json | 61 - node_modules/jest-circus/README.md | 59 - .../jest-circus/build/eventHandler.d.ts | 10 - .../jest-circus/build/eventHandler.d.ts.map | 1 - .../jest-circus/build/eventHandler.js | 245 - .../build/formatNodeAssertErrors.d.ts | 10 - .../build/formatNodeAssertErrors.d.ts.map | 1 - .../build/formatNodeAssertErrors.js | 238 - .../build/globalErrorHandlers.d.ts | 11 - .../build/globalErrorHandlers.d.ts.map | 1 - .../jest-circus/build/globalErrorHandlers.js | 100 - node_modules/jest-circus/build/index.d.ts | 51 - node_modules/jest-circus/build/index.d.ts.map | 1 - node_modules/jest-circus/build/index.js | 223 - .../legacy-code-todo-rewrite/jestAdapter.d.ts | 13 - .../jestAdapter.d.ts.map | 1 - .../legacy-code-todo-rewrite/jestAdapter.js | 159 - .../jestAdapterInit.d.ts | 48 - .../jestAdapterInit.d.ts.map | 1 - .../jestAdapterInit.js | 315 - .../legacy-code-todo-rewrite/jestExpect.d.ts | 11 - .../jestExpect.d.ts.map | 1 - .../legacy-code-todo-rewrite/jestExpect.js | 40 - node_modules/jest-circus/build/run.d.ts | 10 - node_modules/jest-circus/build/run.d.ts.map | 1 - node_modules/jest-circus/build/run.js | 432 - node_modules/jest-circus/build/state.d.ts | 13 - node_modules/jest-circus/build/state.d.ts.map | 1 - node_modules/jest-circus/build/state.js | 68 - node_modules/jest-circus/build/types.d.ts | 22 - node_modules/jest-circus/build/types.d.ts.map | 1 - node_modules/jest-circus/build/types.js | 21 - node_modules/jest-circus/build/utils.d.ts | 28 - node_modules/jest-circus/build/utils.d.ts.map | 1 - node_modules/jest-circus/build/utils.js | 519 - node_modules/jest-circus/package.json | 79 - node_modules/jest-circus/runner.js | 10 - node_modules/jest-config/build/Defaults.d.ts | 10 - .../jest-config/build/Defaults.d.ts.map | 1 - node_modules/jest-config/build/Defaults.js | 107 - .../jest-config/build/Deprecated.d.ts | 9 - .../jest-config/build/Deprecated.d.ts.map | 1 - node_modules/jest-config/build/Deprecated.js | 146 - .../jest-config/build/Descriptions.d.ts | 12 - .../jest-config/build/Descriptions.d.ts.map | 1 - .../jest-config/build/Descriptions.js | 102 - .../build/ReporterValidationErrors.d.ts | 19 - .../build/ReporterValidationErrors.d.ts.map | 1 - .../build/ReporterValidationErrors.js | 177 - .../jest-config/build/ValidConfig.d.ts | 10 - .../jest-config/build/ValidConfig.d.ts.map | 1 - node_modules/jest-config/build/ValidConfig.js | 176 - node_modules/jest-config/build/constants.d.ts | 12 - .../jest-config/build/constants.d.ts.map | 1 - node_modules/jest-config/build/constants.js | 38 - .../jest-config/build/getCacheDirectory.d.ts | 9 - .../build/getCacheDirectory.d.ts.map | 1 - .../jest-config/build/getCacheDirectory.js | 68 - .../jest-config/build/getMaxWorkers.d.ts | 9 - .../jest-config/build/getMaxWorkers.d.ts.map | 1 - .../jest-config/build/getMaxWorkers.js | 58 - node_modules/jest-config/build/index.d.ts | 26 - node_modules/jest-config/build/index.d.ts.map | 1 - node_modules/jest-config/build/index.js | 440 - node_modules/jest-config/build/normalize.d.ts | 14 - .../jest-config/build/normalize.d.ts.map | 1 - node_modules/jest-config/build/normalize.js | 1131 - .../build/readConfigFileAndSetRootDir.d.ts | 10 - .../readConfigFileAndSetRootDir.d.ts.map | 1 - .../build/readConfigFileAndSetRootDir.js | 88 - .../jest-config/build/resolveConfigPath.d.ts | 9 - .../build/resolveConfigPath.d.ts.map | 1 - .../jest-config/build/resolveConfigPath.js | 119 - .../jest-config/build/setFromArgv.d.ts | 9 - .../jest-config/build/setFromArgv.d.ts.map | 1 - node_modules/jest-config/build/setFromArgv.js | 100 - node_modules/jest-config/build/utils.d.ts | 75 - node_modules/jest-config/build/utils.d.ts.map | 1 - node_modules/jest-config/build/utils.js | 271 - .../jest-config/build/validatePattern.d.ts | 8 - .../build/validatePattern.d.ts.map | 1 - .../jest-config/build/validatePattern.js | 25 - .../jest-config/build/vendor/jsonlint.js | 917 - node_modules/jest-config/package.json | 79 - node_modules/jest-diff/LICENSE | 21 - .../jest-diff/build/cleanupSemantic.d.ts | 58 - .../jest-diff/build/cleanupSemantic.d.ts.map | 1 - .../jest-diff/build/cleanupSemantic.js | 653 - node_modules/jest-diff/build/constants.d.ts | 9 - .../jest-diff/build/constants.d.ts.map | 1 - node_modules/jest-diff/build/constants.js | 31 - node_modules/jest-diff/build/diffLines.d.ts | 14 - .../jest-diff/build/diffLines.d.ts.map | 1 - node_modules/jest-diff/build/diffLines.js | 290 - node_modules/jest-diff/build/diffStrings.d.ts | 10 - .../jest-diff/build/diffStrings.d.ts.map | 1 - node_modules/jest-diff/build/diffStrings.js | 78 - .../jest-diff/build/getAlignedDiffs.d.ts | 10 - .../jest-diff/build/getAlignedDiffs.d.ts.map | 1 - .../jest-diff/build/getAlignedDiffs.js | 215 - node_modules/jest-diff/build/index.d.ts | 23 - node_modules/jest-diff/build/index.d.ts.map | 1 - node_modules/jest-diff/build/index.js | 199 - .../jest-diff/build/joinAlignedDiffs.d.ts | 10 - .../jest-diff/build/joinAlignedDiffs.d.ts.map | 1 - .../jest-diff/build/joinAlignedDiffs.js | 231 - node_modules/jest-diff/build/printDiffs.d.ts | 46 - .../jest-diff/build/printDiffs.d.ts.map | 1 - node_modules/jest-diff/build/printDiffs.js | 196 - node_modules/jest-diff/build/types.d.ts | 13 - node_modules/jest-diff/build/types.d.ts.map | 1 - node_modules/jest-diff/build/types.js | 1 - node_modules/jest-diff/package.json | 63 - node_modules/jest-docblock/LICENSE | 21 - node_modules/jest-docblock/README.md | 108 - node_modules/jest-docblock/build/index.d.ts | 20 - .../jest-docblock/build/index.d.ts.map | 1 - node_modules/jest-docblock/build/index.js | 149 - node_modules/jest-docblock/package.json | 58 - node_modules/jest-each/LICENSE | 21 - node_modules/jest-each/README.md | 443 - node_modules/jest-each/build/bind.d.ts | 17 - node_modules/jest-each/build/bind.d.ts.map | 1 - node_modules/jest-each/build/bind.js | 76 - node_modules/jest-each/build/index.d.ts | 59 - node_modules/jest-each/build/index.d.ts.map | 1 - node_modules/jest-each/build/index.js | 81 - node_modules/jest-each/build/table/array.d.ts | 14 - .../jest-each/build/table/array.d.ts.map | 1 - node_modules/jest-each/build/table/array.js | 126 - .../jest-each/build/table/template.d.ts | 20 - .../jest-each/build/table/template.d.ts.map | 1 - .../jest-each/build/table/template.js | 102 - node_modules/jest-each/build/validation.d.ts | 10 - .../jest-each/build/validation.d.ts.map | 1 - node_modules/jest-each/build/validation.js | 102 - node_modules/jest-each/package.json | 71 - .../jest-environment-jsdom/build/index.d.ts | 33 - .../build/index.d.ts.map | 1 - .../jest-environment-jsdom/build/index.js | 194 - .../jest-environment-jsdom/package.json | 63 - .../jest-environment-node/build/index.d.ts | 29 - .../build/index.d.ts.map | 1 - .../jest-environment-node/build/index.js | 153 - .../jest-environment-node/package.json | 59 - node_modules/jest-get-type/LICENSE | 21 - node_modules/jest-get-type/build/index.d.ts | 13 - .../jest-get-type/build/index.d.ts.map | 1 - node_modules/jest-get-type/build/index.js | 49 - node_modules/jest-get-type/package.json | 60 - node_modules/jest-haste-map/LICENSE | 21 - .../jest-haste-map/build/HasteFS.d.ts | 28 - .../jest-haste-map/build/HasteFS.d.ts.map | 1 - node_modules/jest-haste-map/build/HasteFS.js | 249 - .../jest-haste-map/build/ModuleMap.d.ts | 49 - .../jest-haste-map/build/ModuleMap.d.ts.map | 1 - .../jest-haste-map/build/ModuleMap.js | 355 - .../jest-haste-map/build/blacklist.d.ts | 9 - .../jest-haste-map/build/blacklist.d.ts.map | 1 - .../jest-haste-map/build/blacklist.js | 58 - .../jest-haste-map/build/constants.d.ts | 10 - .../jest-haste-map/build/constants.d.ts.map | 1 - .../jest-haste-map/build/constants.js | 50 - .../jest-haste-map/build/crawlers/node.d.ts | 13 - .../build/crawlers/node.d.ts.map | 1 - .../jest-haste-map/build/crawlers/node.js | 267 - .../build/crawlers/watchman.d.ts | 14 - .../build/crawlers/watchman.d.ts.map | 1 - .../jest-haste-map/build/crawlers/watchman.js | 588 - .../jest-haste-map/build/getMockName.d.ts | 9 - .../jest-haste-map/build/getMockName.d.ts.map | 1 - .../jest-haste-map/build/getMockName.js | 38 - node_modules/jest-haste-map/build/index.d.ts | 192 - .../jest-haste-map/build/index.d.ts.map | 1 - node_modules/jest-haste-map/build/index.js | 1390 - .../build/lib/FSEventsWatcher.d.ts | 46 - .../build/lib/FSEventsWatcher.d.ts.map | 1 - .../build/lib/FSEventsWatcher.js | 248 - .../build/lib/WatchmanWatcher.js | 400 - .../build/lib/dependencyExtractor.d.ts | 8 - .../build/lib/dependencyExtractor.d.ts.map | 1 - .../build/lib/dependencyExtractor.js | 100 - .../jest-haste-map/build/lib/fast_path.d.ts | 9 - .../build/lib/fast_path.d.ts.map | 1 - .../jest-haste-map/build/lib/fast_path.js | 43 - .../build/lib/getPlatformExtension.d.ts | 8 - .../build/lib/getPlatformExtension.d.ts.map | 1 - .../build/lib/getPlatformExtension.js | 31 - .../build/lib/isRegExpSupported.d.ts | 8 - .../build/lib/isRegExpSupported.d.ts.map | 1 - .../build/lib/isRegExpSupported.js | 22 - .../build/lib/normalizePathSep.d.ts | 9 - .../build/lib/normalizePathSep.d.ts.map | 1 - .../build/lib/normalizePathSep.js | 37 - node_modules/jest-haste-map/build/types.d.ts | 98 - .../jest-haste-map/build/types.d.ts.map | 1 - node_modules/jest-haste-map/build/types.js | 1 - node_modules/jest-haste-map/build/worker.d.ts | 10 - .../jest-haste-map/build/worker.d.ts.map | 1 - node_modules/jest-haste-map/build/worker.js | 230 - node_modules/jest-haste-map/package.json | 83 - .../build/ExpectationFailed.d.ts | 9 - .../build/ExpectationFailed.d.ts.map | 1 - .../jest-jasmine2/build/ExpectationFailed.js | 16 - .../jest-jasmine2/build/PCancelable.js | 85 - .../build/assertionErrorMessage.d.ts | 11 - .../build/assertionErrorMessage.d.ts.map | 1 - .../build/assertionErrorMessage.js | 149 - node_modules/jest-jasmine2/build/each.d.ts | 10 - .../jest-jasmine2/build/each.d.ts.map | 1 - node_modules/jest-jasmine2/build/each.js | 34 - .../jest-jasmine2/build/errorOnPrivate.d.ts | 9 - .../build/errorOnPrivate.d.ts.map | 1 - .../jest-jasmine2/build/errorOnPrivate.js | 66 - .../build/expectationResultFactory.d.ts | 17 - .../build/expectationResultFactory.d.ts.map | 1 - .../build/expectationResultFactory.js | 93 - node_modules/jest-jasmine2/build/index.d.ts | 17 - .../jest-jasmine2/build/index.d.ts.map | 1 - node_modules/jest-jasmine2/build/index.js | 237 - node_modules/jest-jasmine2/build/isError.d.ts | 11 - .../jest-jasmine2/build/isError.d.ts.map | 1 - node_modules/jest-jasmine2/build/isError.js | 36 - .../build/jasmine/CallTracker.d.ts | 26 - .../build/jasmine/CallTracker.d.ts.map | 1 - .../build/jasmine/CallTracker.js | 121 - .../jest-jasmine2/build/jasmine/Env.d.ts | 43 - .../jest-jasmine2/build/jasmine/Env.d.ts.map | 1 - .../jest-jasmine2/build/jasmine/Env.js | 801 - .../build/jasmine/JsApiReporter.d.ts | 32 - .../build/jasmine/JsApiReporter.d.ts.map | 1 - .../build/jasmine/JsApiReporter.js | 173 - .../build/jasmine/ReportDispatcher.d.ts | 23 - .../build/jasmine/ReportDispatcher.d.ts.map | 1 - .../build/jasmine/ReportDispatcher.js | 125 - .../jest-jasmine2/build/jasmine/Spec.d.ts | 82 - .../jest-jasmine2/build/jasmine/Spec.d.ts.map | 1 - .../jest-jasmine2/build/jasmine/Spec.js | 298 - .../build/jasmine/SpyStrategy.d.ts | 23 - .../build/jasmine/SpyStrategy.d.ts.map | 1 - .../build/jasmine/SpyStrategy.js | 141 - .../jest-jasmine2/build/jasmine/Suite.d.ts | 62 - .../build/jasmine/Suite.d.ts.map | 1 - .../jest-jasmine2/build/jasmine/Suite.js | 235 - .../jest-jasmine2/build/jasmine/Timer.d.ts | 15 - .../build/jasmine/Timer.d.ts.map | 1 - .../jest-jasmine2/build/jasmine/Timer.js | 79 - .../build/jasmine/createSpy.d.ts | 14 - .../build/jasmine/createSpy.d.ts.map | 1 - .../jest-jasmine2/build/jasmine/createSpy.js | 88 - .../build/jasmine/jasmineLight.d.ts | 31 - .../build/jasmine/jasmineLight.d.ts.map | 1 - .../build/jasmine/jasmineLight.js | 167 - .../build/jasmine/spyRegistry.d.ts | 19 - .../build/jasmine/spyRegistry.d.ts.map | 1 - .../build/jasmine/spyRegistry.js | 244 - .../build/jasmineAsyncInstall.d.ts | 13 - .../build/jasmineAsyncInstall.d.ts.map | 1 - .../build/jasmineAsyncInstall.js | 188 - .../jest-jasmine2/build/jestExpect.d.ts | 11 - .../jest-jasmine2/build/jestExpect.d.ts.map | 1 - .../jest-jasmine2/build/jestExpect.js | 69 - .../jest-jasmine2/build/pTimeout.d.ts | 8 - .../jest-jasmine2/build/pTimeout.d.ts.map | 1 - node_modules/jest-jasmine2/build/pTimeout.js | 33 - .../jest-jasmine2/build/queueRunner.d.ts | 27 - .../jest-jasmine2/build/queueRunner.d.ts.map | 1 - .../jest-jasmine2/build/queueRunner.js | 81 - .../jest-jasmine2/build/reporter.d.ts | 32 - .../jest-jasmine2/build/reporter.d.ts.map | 1 - node_modules/jest-jasmine2/build/reporter.js | 176 - .../build/setup_jest_globals.d.ts | 17 - .../build/setup_jest_globals.d.ts.map | 1 - .../jest-jasmine2/build/setup_jest_globals.js | 117 - .../jest-jasmine2/build/treeProcessor.d.ts | 27 - .../build/treeProcessor.d.ts.map | 1 - .../jest-jasmine2/build/treeProcessor.js | 123 - node_modules/jest-jasmine2/build/types.d.ts | 73 - .../jest-jasmine2/build/types.d.ts.map | 1 - node_modules/jest-jasmine2/build/types.js | 25 - node_modules/jest-jasmine2/package.json | 74 - node_modules/jest-leak-detector/LICENSE | 21 - node_modules/jest-leak-detector/README.md | 22 - .../jest-leak-detector/build/index.d.ts | 13 - .../jest-leak-detector/build/index.d.ts.map | 1 - .../jest-leak-detector/build/index.js | 124 - node_modules/jest-leak-detector/package.json | 61 - node_modules/jest-matcher-utils/LICENSE | 21 - .../jest-matcher-utils/build/index.d.ts | 53 - .../jest-matcher-utils/build/index.d.ts.map | 1 - .../jest-matcher-utils/build/index.js | 477 - node_modules/jest-matcher-utils/package.json | 61 - node_modules/jest-message-util/LICENSE | 21 - .../jest-message-util/build/index.d.ts | 24 - .../jest-message-util/build/index.d.ts.map | 1 - node_modules/jest-message-util/build/index.js | 401 - .../jest-message-util/build/types.d.ts | 11 - .../jest-message-util/build/types.d.ts.map | 1 - node_modules/jest-message-util/build/types.js | 1 - .../node_modules/slash/index.js | 11 - .../node_modules/slash/license | 9 - .../node_modules/slash/package.json | 70 - .../node_modules/slash/readme.md | 44 - node_modules/jest-message-util/package.json | 74 - node_modules/jest-mock/LICENSE | 21 - node_modules/jest-mock/README.md | 88 - node_modules/jest-mock/build-es5/index.js | 1000 - node_modules/jest-mock/build-es5/index.js.map | 1 - node_modules/jest-mock/build/index.d.ts | 134 - node_modules/jest-mock/build/index.d.ts.map | 1 - node_modules/jest-mock/build/index.js | 967 - node_modules/jest-mock/package.json | 61 - node_modules/jest-pnp-resolver/README.md | 32 - node_modules/jest-pnp-resolver/index.d.ts | 10 - node_modules/jest-pnp-resolver/index.js | 41 - node_modules/jest-pnp-resolver/package.json | 60 - node_modules/jest-regex-util/LICENSE | 21 - node_modules/jest-regex-util/build/index.d.ts | 11 - .../jest-regex-util/build/index.d.ts.map | 1 - node_modules/jest-regex-util/build/index.js | 49 - node_modules/jest-regex-util/package.json | 57 - .../build/index.d.ts | 31 - .../build/index.d.ts.map | 1 - .../jest-resolve-dependencies/build/index.js | 204 - .../jest-resolve-dependencies/package.json | 62 - node_modules/jest-resolve/LICENSE | 21 - .../jest-resolve/build/defaultResolver.d.ts | 20 - .../build/defaultResolver.d.ts.map | 1 - .../jest-resolve/build/defaultResolver.js | 253 - node_modules/jest-resolve/build/index.d.ts | 53 - .../jest-resolve/build/index.d.ts.map | 1 - node_modules/jest-resolve/build/index.js | 519 - .../jest-resolve/build/isBuiltinModule.d.ts | 8 - .../build/isBuiltinModule.d.ts.map | 1 - .../jest-resolve/build/isBuiltinModule.js | 39 - .../jest-resolve/build/nodeModulesPaths.d.ts | 16 - .../build/nodeModulesPaths.d.ts.map | 1 - .../jest-resolve/build/nodeModulesPaths.js | 92 - node_modules/jest-resolve/build/types.d.ts | 25 - .../jest-resolve/build/types.d.ts.map | 1 - node_modules/jest-resolve/build/types.js | 1 - node_modules/jest-resolve/package.json | 68 - node_modules/jest-runner/build/index.d.ts | 27 - node_modules/jest-runner/build/index.d.ts.map | 1 - node_modules/jest-runner/build/index.js | 298 - node_modules/jest-runner/build/runTest.d.ts | 13 - .../jest-runner/build/runTest.d.ts.map | 1 - node_modules/jest-runner/build/runTest.js | 482 - .../jest-runner/build/testWorker.d.ts | 27 - .../jest-runner/build/testWorker.d.ts.map | 1 - node_modules/jest-runner/build/testWorker.js | 222 - node_modules/jest-runner/build/types.d.ts | 54 - node_modules/jest-runner/build/types.d.ts.map | 1 - node_modules/jest-runner/build/types.js | 1 - node_modules/jest-runner/package.json | 79 - node_modules/jest-runtime/bin/jest-runtime.js | 13 - node_modules/jest-runtime/build/cli/args.d.ts | 10 - .../jest-runtime/build/cli/args.d.ts.map | 1 - node_modules/jest-runtime/build/cli/args.js | 46 - .../jest-runtime/build/cli/index.d.ts | 9 - .../jest-runtime/build/cli/index.d.ts.map | 1 - node_modules/jest-runtime/build/cli/index.js | 256 - node_modules/jest-runtime/build/helpers.d.ts | 8 - .../jest-runtime/build/helpers.d.ts.map | 1 - node_modules/jest-runtime/build/helpers.js | 97 - node_modules/jest-runtime/build/index.d.ts | 102 - .../jest-runtime/build/index.d.ts.map | 1 - node_modules/jest-runtime/build/index.js | 1234 - node_modules/jest-runtime/build/types.d.ts | 16 - .../jest-runtime/build/types.d.ts.map | 1 - node_modules/jest-runtime/build/types.js | 1 - node_modules/jest-runtime/build/version.d.ts | 8 - .../jest-runtime/build/version.d.ts.map | 1 - node_modules/jest-runtime/build/version.js | 16 - .../jest-runtime/node_modules/slash/index.js | 11 - .../jest-runtime/node_modules/slash/license | 9 - .../node_modules/slash/package.json | 70 - .../jest-runtime/node_modules/slash/readme.md | 44 - node_modules/jest-runtime/package.json | 92 - node_modules/jest-serializer/LICENSE | 21 - node_modules/jest-serializer/README.md | 47 - node_modules/jest-serializer/build/index.d.ts | 21 - .../jest-serializer/build/index.d.ts.map | 1 - node_modules/jest-serializer/build/index.js | 206 - node_modules/jest-serializer/package.json | 53 - node_modules/jest-serializer/v8.d.ts | 11 - node_modules/jest-snapshot/LICENSE | 21 - node_modules/jest-snapshot/build/State.d.ts | 58 - .../jest-snapshot/build/State.d.ts.map | 1 - node_modules/jest-snapshot/build/State.js | 316 - node_modules/jest-snapshot/build/index.d.ts | 121 - .../jest-snapshot/build/index.d.ts.map | 1 - node_modules/jest-snapshot/build/index.js | 541 - .../jest-snapshot/build/inline_snapshots.d.ts | 13 - .../build/inline_snapshots.d.ts.map | 1 - .../jest-snapshot/build/inline_snapshots.js | 331 - .../jest-snapshot/build/mock_serializer.d.ts | 12 - .../build/mock_serializer.d.ts.map | 1 - .../jest-snapshot/build/mock_serializer.js | 52 - node_modules/jest-snapshot/build/plugins.d.ts | 9 - .../jest-snapshot/build/plugins.d.ts.map | 1 - node_modules/jest-snapshot/build/plugins.js | 47 - node_modules/jest-snapshot/build/print.d.ts | 8 - .../jest-snapshot/build/print.d.ts.map | 1 - node_modules/jest-snapshot/build/print.js | 174 - .../build/snapshot_resolver.d.ts | 17 - .../build/snapshot_resolver.d.ts.map | 1 - .../jest-snapshot/build/snapshot_resolver.js | 117 - node_modules/jest-snapshot/build/types.d.ts | 8 - .../jest-snapshot/build/types.d.ts.map | 1 - node_modules/jest-snapshot/build/types.js | 1 - node_modules/jest-snapshot/build/utils.d.ts | 23 - .../jest-snapshot/build/utils.d.ts.map | 1 - node_modules/jest-snapshot/build/utils.js | 297 - node_modules/jest-snapshot/package.json | 80 - node_modules/jest-util/LICENSE | 21 - .../jest-util/build/ErrorWithStack.d.ts | 10 - .../jest-util/build/ErrorWithStack.d.ts.map | 1 - .../jest-util/build/ErrorWithStack.js | 24 - node_modules/jest-util/build/clearLine.d.ts | 10 - .../jest-util/build/clearLine.d.ts.map | 1 - node_modules/jest-util/build/clearLine.js | 20 - .../build/convertDescriptorToString.d.ts | 8 - .../build/convertDescriptorToString.d.ts.map | 1 - .../build/convertDescriptorToString.js | 39 - .../jest-util/build/createDirectory.d.ts | 9 - .../jest-util/build/createDirectory.d.ts.map | 1 - .../jest-util/build/createDirectory.js | 36 - .../jest-util/build/createProcessObject.d.ts | 8 - .../build/createProcessObject.d.ts.map | 1 - .../jest-util/build/createProcessObject.js | 121 - .../jest-util/build/deepCyclicCopy.d.ts | 12 - .../jest-util/build/deepCyclicCopy.d.ts.map | 1 - .../jest-util/build/deepCyclicCopy.js | 99 - .../build/getFailedSnapshotTests.d.ts | 10 - .../build/getFailedSnapshotTests.d.ts.map | 1 - .../jest-util/build/getFailedSnapshotTests.js | 30 - node_modules/jest-util/build/index.d.ts | 48 - node_modules/jest-util/build/index.d.ts.map | 1 - node_modules/jest-util/build/index.js | 147 - .../jest-util/build/installCommonGlobals.d.ts | 10 - .../build/installCommonGlobals.d.ts.map | 1 - .../jest-util/build/installCommonGlobals.js | 85 - .../build/interopRequireDefault.d.ts | 8 - .../build/interopRequireDefault.d.ts.map | 1 - .../jest-util/build/interopRequireDefault.js | 21 - .../jest-util/build/isInteractive.d.ts | 9 - .../jest-util/build/isInteractive.d.ts.map | 1 - node_modules/jest-util/build/isInteractive.js | 31 - node_modules/jest-util/build/isPromise.d.ts | 9 - .../jest-util/build/isPromise.d.ts.map | 1 - node_modules/jest-util/build/isPromise.js | 19 - node_modules/jest-util/build/pluralize.d.ts | 8 - .../jest-util/build/pluralize.d.ts.map | 1 - node_modules/jest-util/build/pluralize.js | 16 - .../jest-util/build/preRunMessage.d.ts | 10 - .../jest-util/build/preRunMessage.d.ts.map | 1 - node_modules/jest-util/build/preRunMessage.js | 48 - .../build/replacePathSepForGlob.d.ts | 9 - .../build/replacePathSepForGlob.d.ts.map | 1 - .../jest-util/build/replacePathSepForGlob.js | 16 - node_modules/jest-util/build/setGlobal.d.ts | 10 - .../jest-util/build/setGlobal.d.ts.map | 1 - node_modules/jest-util/build/setGlobal.js | 19 - .../jest-util/build/specialChars.d.ts | 15 - .../jest-util/build/specialChars.d.ts.map | 1 - node_modules/jest-util/build/specialChars.js | 25 - .../build/testPathPatternToRegExp.d.ts | 9 - .../build/testPathPatternToRegExp.d.ts.map | 1 - .../build/testPathPatternToRegExp.js | 19 - .../node_modules/callsites/index.d.ts | 96 - .../jest-util/node_modules/callsites/index.js | 13 - .../jest-util/node_modules/callsites/license | 9 - .../node_modules/callsites/package.json | 75 - .../node_modules/callsites/readme.md | 48 - .../jest-util/node_modules/slash/index.js | 11 - .../jest-util/node_modules/slash/license | 9 - .../jest-util/node_modules/slash/package.json | 70 - .../jest-util/node_modules/slash/readme.md | 44 - node_modules/jest-util/package.json | 85 - node_modules/jest-validate/LICENSE | 21 - node_modules/jest-validate/README.md | 193 - .../jest-validate/build/condition.d.ts | 10 - .../jest-validate/build/condition.d.ts.map | 1 - node_modules/jest-validate/build/condition.js | 48 - .../jest-validate/build/defaultConfig.d.ts | 10 - .../build/defaultConfig.d.ts.map | 1 - .../jest-validate/build/defaultConfig.js | 42 - .../jest-validate/build/deprecated.d.ts | 9 - .../jest-validate/build/deprecated.d.ts.map | 1 - .../jest-validate/build/deprecated.js | 32 - node_modules/jest-validate/build/errors.d.ts | 9 - .../jest-validate/build/errors.d.ts.map | 1 - node_modules/jest-validate/build/errors.js | 75 - .../jest-validate/build/exampleConfig.d.ts | 10 - .../build/exampleConfig.d.ts.map | 1 - .../jest-validate/build/exampleConfig.js | 36 - node_modules/jest-validate/build/index.d.ts | 23 - .../jest-validate/build/index.d.ts.map | 1 - node_modules/jest-validate/build/index.js | 31 - node_modules/jest-validate/build/types.d.ts | 26 - .../jest-validate/build/types.d.ts.map | 1 - node_modules/jest-validate/build/types.js | 1 - node_modules/jest-validate/build/utils.d.ts | 19 - .../jest-validate/build/utils.d.ts.map | 1 - node_modules/jest-validate/build/utils.js | 123 - .../jest-validate/build/validate.d.ts | 13 - .../jest-validate/build/validate.d.ts.map | 1 - node_modules/jest-validate/build/validate.js | 154 - .../build/validateCLIOptions.d.ts | 15 - .../build/validateCLIOptions.d.ts.map | 1 - .../jest-validate/build/validateCLIOptions.js | 163 - .../jest-validate/build/warnings.d.ts | 9 - .../jest-validate/build/warnings.d.ts.map | 1 - node_modules/jest-validate/build/warnings.js | 48 - node_modules/jest-validate/package.json | 64 - node_modules/jest-watcher/LICENSE | 21 - .../jest-watcher/build/BaseWatchPlugin.d.ts | 23 - .../build/BaseWatchPlugin.d.ts.map | 1 - .../jest-watcher/build/BaseWatchPlugin.js | 52 - .../jest-watcher/build/JestHooks.d.ts | 19 - .../jest-watcher/build/JestHooks.d.ts.map | 1 - node_modules/jest-watcher/build/JestHooks.js | 126 - .../jest-watcher/build/PatternPrompt.d.ts | 21 - .../jest-watcher/build/PatternPrompt.d.ts.map | 1 - .../jest-watcher/build/PatternPrompt.js | 113 - .../jest-watcher/build/constants.d.ts | 18 - .../jest-watcher/build/constants.d.ts.map | 1 - node_modules/jest-watcher/build/constants.js | 26 - node_modules/jest-watcher/build/index.d.ts | 14 - .../jest-watcher/build/index.d.ts.map | 1 - node_modules/jest-watcher/build/index.js | 131 - .../jest-watcher/build/lib/Prompt.d.ts | 26 - .../jest-watcher/build/lib/Prompt.d.ts.map | 1 - node_modules/jest-watcher/build/lib/Prompt.js | 149 - .../jest-watcher/build/lib/colorize.d.ts | 9 - .../jest-watcher/build/lib/colorize.d.ts.map | 1 - .../jest-watcher/build/lib/colorize.js | 33 - .../build/lib/formatTestNameByPattern.d.ts | 9 - .../lib/formatTestNameByPattern.d.ts.map | 1 - .../build/lib/formatTestNameByPattern.js | 83 - .../build/lib/patternModeHelpers.d.ts | 10 - .../build/lib/patternModeHelpers.d.ts.map | 1 - .../build/lib/patternModeHelpers.js | 68 - .../jest-watcher/build/lib/scroll.d.ts | 13 - .../jest-watcher/build/lib/scroll.d.ts.map | 1 - node_modules/jest-watcher/build/lib/scroll.js | 34 - node_modules/jest-watcher/build/types.d.ts | 60 - .../jest-watcher/build/types.d.ts.map | 1 - node_modules/jest-watcher/build/types.js | 1 - node_modules/jest-watcher/package.json | 65 - node_modules/jest-worker/LICENSE | 21 - node_modules/jest-worker/README.md | 215 - node_modules/jest-worker/build/Farm.d.ts | 27 - node_modules/jest-worker/build/Farm.d.ts.map | 1 - node_modules/jest-worker/build/Farm.js | 179 - .../jest-worker/build/WorkerPool.d.ts | 14 - .../jest-worker/build/WorkerPool.d.ts.map | 1 - node_modules/jest-worker/build/WorkerPool.js | 49 - .../build/base/BaseWorkerPool.d.ts | 22 - .../build/base/BaseWorkerPool.d.ts.map | 1 - .../jest-worker/build/base/BaseWorkerPool.js | 134 - node_modules/jest-worker/build/index.d.ts | 46 - node_modules/jest-worker/build/index.d.ts.map | 1 - node_modules/jest-worker/build/index.js | 184 - node_modules/jest-worker/build/types.d.ts | 98 - node_modules/jest-worker/build/types.d.ts.map | 1 - node_modules/jest-worker/build/types.js | 43 - .../build/workers/ChildProcessWorker.d.ts | 47 - .../build/workers/ChildProcessWorker.d.ts.map | 1 - .../build/workers/ChildProcessWorker.js | 310 - .../build/workers/NodeThreadsWorker.d.ts | 29 - .../build/workers/NodeThreadsWorker.d.ts.map | 1 - .../build/workers/NodeThreadsWorker.js | 289 - .../build/workers/processChild.d.ts | 8 - .../build/workers/processChild.d.ts.map | 1 - .../jest-worker/build/workers/processChild.js | 166 - .../build/workers/threadChild.d.ts | 8 - .../build/workers/threadChild.d.ts.map | 1 - .../jest-worker/build/workers/threadChild.js | 176 - .../node_modules/supports-color/browser.js | 5 - .../node_modules/supports-color/index.js | 138 - .../node_modules/supports-color/license | 9 - .../node_modules/supports-color/package.json | 89 - .../node_modules/supports-color/readme.md | 85 - node_modules/jest-worker/package.json | 67 - node_modules/jest/README.md | 11 - node_modules/jest/bin/jest.js | 13 - node_modules/jest/build/jest.d.ts | 9 - node_modules/jest/build/jest.d.ts.map | 1 - node_modules/jest/build/jest.js | 44 - node_modules/jest/node_modules/.bin/jest | 15 - node_modules/jest/node_modules/.bin/jest.cmd | 7 - .../jest/node_modules/jest-cli/README.md | 11 - .../jest/node_modules/jest-cli/bin/jest.js | 17 - .../node_modules/jest-cli/build/cli/args.d.ts | 580 - .../jest-cli/build/cli/args.d.ts.map | 1 - .../node_modules/jest-cli/build/cli/args.js | 753 - .../jest-cli/build/cli/index.d.ts | 97 - .../jest-cli/build/cli/index.d.ts.map | 1 - .../node_modules/jest-cli/build/cli/index.js | 325 - .../node_modules/jest-cli/build/index.d.ts | 108 - .../jest-cli/build/index.d.ts.map | 1 - .../jest/node_modules/jest-cli/build/index.js | 29 - .../jest-cli/build/init/constants.d.ts | 9 - .../jest-cli/build/init/constants.d.ts.map | 1 - .../jest-cli/build/init/constants.js | 17 - .../jest-cli/build/init/errors.d.ts | 13 - .../jest-cli/build/init/errors.d.ts.map | 1 - .../jest-cli/build/init/errors.js | 35 - .../build/init/generate_config_file.d.ts | 9 - .../build/init/generate_config_file.d.ts.map | 1 - .../build/init/generate_config_file.js | 89 - .../jest-cli/build/init/index.d.ts | 9 - .../jest-cli/build/init/index.d.ts.map | 1 - .../node_modules/jest-cli/build/init/index.js | 255 - .../build/init/modify_package_json.d.ts | 13 - .../build/init/modify_package_json.d.ts.map | 1 - .../build/init/modify_package_json.js | 28 - .../jest-cli/build/init/questions.d.ts | 11 - .../jest-cli/build/init/questions.d.ts.map | 1 - .../jest-cli/build/init/questions.js | 53 - .../jest-cli/build/init/types.d.ts | 12 - .../jest-cli/build/init/types.d.ts.map | 1 - .../node_modules/jest-cli/build/init/types.js | 1 - .../jest/node_modules/jest-cli/package.json | 103 - node_modules/jest/package.json | 99 - node_modules/js-tokens/CHANGELOG.md | 151 - node_modules/js-tokens/LICENSE | 21 - node_modules/js-tokens/README.md | 240 - node_modules/js-tokens/index.js | 23 - node_modules/js-tokens/package.json | 69 - node_modules/js-yaml/CHANGELOG.md | 501 - node_modules/js-yaml/LICENSE | 21 - node_modules/js-yaml/README.md | 314 - node_modules/js-yaml/bin/js-yaml.js | 132 - node_modules/js-yaml/dist/js-yaml.js | 3946 -- node_modules/js-yaml/dist/js-yaml.min.js | 1 - node_modules/js-yaml/index.js | 7 - node_modules/js-yaml/lib/js-yaml.js | 39 - node_modules/js-yaml/lib/js-yaml/common.js | 59 - node_modules/js-yaml/lib/js-yaml/dumper.js | 827 - node_modules/js-yaml/lib/js-yaml/exception.js | 43 - node_modules/js-yaml/lib/js-yaml/loader.js | 1625 - node_modules/js-yaml/lib/js-yaml/mark.js | 76 - node_modules/js-yaml/lib/js-yaml/schema.js | 108 - .../js-yaml/lib/js-yaml/schema/core.js | 18 - .../lib/js-yaml/schema/default_full.js | 25 - .../lib/js-yaml/schema/default_safe.js | 28 - .../js-yaml/lib/js-yaml/schema/failsafe.js | 17 - .../js-yaml/lib/js-yaml/schema/json.js | 25 - node_modules/js-yaml/lib/js-yaml/type.js | 61 - .../js-yaml/lib/js-yaml/type/binary.js | 138 - node_modules/js-yaml/lib/js-yaml/type/bool.js | 35 - .../js-yaml/lib/js-yaml/type/float.js | 116 - node_modules/js-yaml/lib/js-yaml/type/int.js | 173 - .../js-yaml/lib/js-yaml/type/js/function.js | 92 - .../js-yaml/lib/js-yaml/type/js/regexp.js | 60 - .../js-yaml/lib/js-yaml/type/js/undefined.js | 28 - node_modules/js-yaml/lib/js-yaml/type/map.js | 8 - .../js-yaml/lib/js-yaml/type/merge.js | 12 - node_modules/js-yaml/lib/js-yaml/type/null.js | 34 - node_modules/js-yaml/lib/js-yaml/type/omap.js | 44 - .../js-yaml/lib/js-yaml/type/pairs.js | 53 - node_modules/js-yaml/lib/js-yaml/type/seq.js | 8 - node_modules/js-yaml/lib/js-yaml/type/set.js | 29 - node_modules/js-yaml/lib/js-yaml/type/str.js | 8 - .../js-yaml/lib/js-yaml/type/timestamp.js | 88 - node_modules/js-yaml/package.json | 97 - node_modules/jsbn/.npmignore | 2 - node_modules/jsbn/LICENSE | 40 - node_modules/jsbn/README.md | 175 - node_modules/jsbn/example.html | 12 - node_modules/jsbn/example.js | 3 - node_modules/jsbn/index.js | 1357 - node_modules/jsbn/package.json | 57 - node_modules/jsdom/Changelog.md | 1532 - node_modules/jsdom/LICENSE.txt | 22 - node_modules/jsdom/README.md | 481 - node_modules/jsdom/lib/api.js | 351 - .../jsdom/lib/jsdom/browser/Window.js | 704 - .../lib/jsdom/browser/default-stylesheet.js | 785 - .../lib/jsdom/browser/documentfeatures.js | 55 - .../jsdom/lib/jsdom/browser/domtohtml.js | 18 - .../jsdom/lib/jsdom/browser/htmltodom.js | 271 - .../lib/jsdom/browser/not-implemented.js | 13 - .../jsdom/browser/parse5-adapter-parsing.js | 110 - .../browser/parse5-adapter-serialization.js | 41 - .../lib/jsdom/browser/resource-loader.js | 275 - node_modules/jsdom/lib/jsdom/level2/style.js | 70 - node_modules/jsdom/lib/jsdom/level3/xpath.js | 1874 - .../living/aborting/AbortController-impl.js | 15 - .../jsdom/living/aborting/AbortSignal-impl.js | 55 - .../jsdom/lib/jsdom/living/attributes.js | 299 - .../lib/jsdom/living/attributes/Attr-impl.js | 75 - .../living/attributes/NamedNodeMap-impl.js | 68 - .../DefaultConstraintValidation-impl.js | 73 - .../ValidityState-impl.js | 64 - .../jsdom/living/domparsing/DOMParser-impl.js | 57 - .../jsdom/living/events/CloseEvent-impl.js | 10 - .../living/events/CompositionEvent-impl.js | 20 - .../jsdom/living/events/CustomEvent-impl.js | 21 - .../jsdom/living/events/ErrorEvent-impl.js | 14 - .../lib/jsdom/living/events/Event-impl.js | 107 - .../living/events/EventModifierMixin-impl.js | 18 - .../jsdom/living/events/EventTarget-impl.js | 243 - .../jsdom/living/events/FocusEvent-impl.js | 9 - .../living/events/HashChangeEvent-impl.js | 14 - .../jsdom/living/events/KeyboardEvent-impl.js | 29 - .../jsdom/living/events/MessageEvent-impl.js | 25 - .../jsdom/living/events/MouseEvent-impl.js | 36 - .../jsdom/living/events/PopStateEvent-impl.js | 9 - .../jsdom/living/events/ProgressEvent-impl.js | 14 - .../jsdom/living/events/StorageEvent-impl.js | 26 - .../jsdom/living/events/TouchEvent-impl.js | 14 - .../lib/jsdom/living/events/UIEvent-impl.js | 59 - .../jsdom/living/events/WheelEvent-impl.js | 12 - .../lib/jsdom/living/file-api/Blob-impl.js | 92 - .../lib/jsdom/living/file-api/File-impl.js | 15 - .../jsdom/living/file-api/FileList-impl.js | 15 - .../jsdom/living/file-api/FileReader-impl.js | 143 - .../jsdom/living/generated/AbortController.js | 144 - .../lib/jsdom/living/generated/AbortSignal.js | 156 - .../generated/AddEventListenerOptions.js | 34 - .../jsdom/lib/jsdom/living/generated/Attr.js | 269 - .../lib/jsdom/living/generated/BarProp.js | 116 - .../lib/jsdom/living/generated/BinaryType.js | 13 - .../jsdom/lib/jsdom/living/generated/Blob.js | 203 - .../jsdom/living/generated/BlobPropertyBag.js | 44 - .../jsdom/living/generated/CDATASection.js | 109 - .../living/generated/CanPlayTypeResult.js | 13 - .../jsdom/living/generated/CharacterData.js | 396 - .../lib/jsdom/living/generated/ChildNode.js | 179 - .../lib/jsdom/living/generated/CloseEvent.js | 174 - .../jsdom/living/generated/CloseEventInit.js | 58 - .../lib/jsdom/living/generated/Comment.js | 126 - .../living/generated/CompositionEvent.js | 216 - .../living/generated/CompositionEventInit.js | 34 - .../lib/jsdom/living/generated/CustomEvent.js | 204 - .../jsdom/living/generated/CustomEventInit.js | 34 - .../living/generated/DOMImplementation.js | 216 - .../lib/jsdom/living/generated/DOMParser.js | 141 - .../jsdom/living/generated/DOMStringMap.js | 275 - .../jsdom/living/generated/DOMTokenList.js | 464 - .../lib/jsdom/living/generated/Document.js | 2826 - .../living/generated/DocumentFragment.js | 284 - .../living/generated/DocumentReadyState.js | 13 - .../jsdom/living/generated/DocumentType.js | 217 - .../lib/jsdom/living/generated/Element.js | 1226 - .../living/generated/ElementCSSInlineStyle.js | 124 - .../generated/ElementContentEditable.js | 101 - .../generated/ElementCreationOptions.js | 28 - .../lib/jsdom/living/generated/EndingType.js | 13 - .../lib/jsdom/living/generated/ErrorEvent.js | 200 - .../jsdom/living/generated/ErrorEventInit.js | 82 - .../jsdom/lib/jsdom/living/generated/Event.js | 405 - .../lib/jsdom/living/generated/EventInit.js | 42 - .../living/generated/EventListenerOptions.js | 30 - .../living/generated/EventModifierInit.js | 190 - .../lib/jsdom/living/generated/EventTarget.js | 246 - .../lib/jsdom/living/generated/External.js | 117 - .../jsdom/lib/jsdom/living/generated/File.js | 182 - .../lib/jsdom/living/generated/FileList.js | 301 - .../jsdom/living/generated/FilePropertyBag.js | 32 - .../lib/jsdom/living/generated/FileReader.js | 435 - .../lib/jsdom/living/generated/FocusEvent.js | 147 - .../jsdom/living/generated/FocusEventInit.js | 38 - .../lib/jsdom/living/generated/FormData.js | 419 - .../living/generated/GetRootNodeOptions.js | 30 - .../living/generated/GlobalEventHandlers.js | 1511 - .../living/generated/HTMLAnchorElement.js | 667 - .../jsdom/living/generated/HTMLAreaElement.js | 541 - .../living/generated/HTMLAudioElement.js | 109 - .../jsdom/living/generated/HTMLBRElement.js | 135 - .../jsdom/living/generated/HTMLBaseElement.js | 160 - .../jsdom/living/generated/HTMLBodyElement.js | 641 - .../living/generated/HTMLButtonElement.js | 403 - .../living/generated/HTMLCanvasElement.js | 254 - .../jsdom/living/generated/HTMLCollection.js | 353 - .../living/generated/HTMLDListElement.js | 138 - .../jsdom/living/generated/HTMLDataElement.js | 135 - .../living/generated/HTMLDataListElement.js | 109 - .../living/generated/HTMLDetailsElement.js | 138 - .../living/generated/HTMLDialogElement.js | 138 - .../living/generated/HTMLDirectoryElement.js | 138 - .../jsdom/living/generated/HTMLDivElement.js | 135 - .../lib/jsdom/living/generated/HTMLElement.js | 1812 - .../living/generated/HTMLEmbedElement.js | 264 - .../living/generated/HTMLFieldSetElement.js | 257 - .../jsdom/living/generated/HTMLFontElement.js | 188 - .../jsdom/living/generated/HTMLFormElement.js | 351 - .../living/generated/HTMLFrameElement.js | 346 - .../living/generated/HTMLFrameSetElement.js | 532 - .../jsdom/living/generated/HTMLHRElement.js | 242 - .../jsdom/living/generated/HTMLHeadElement.js | 109 - .../living/generated/HTMLHeadingElement.js | 135 - .../jsdom/living/generated/HTMLHtmlElement.js | 135 - .../generated/HTMLHyperlinkElementUtils.js | 371 - .../living/generated/HTMLIFrameElement.js | 458 - .../living/generated/HTMLImageElement.js | 578 - .../living/generated/HTMLInputElement.js | 1256 - .../jsdom/living/generated/HTMLLIElement.js | 161 - .../living/generated/HTMLLabelElement.js | 161 - .../living/generated/HTMLLegendElement.js | 148 - .../jsdom/living/generated/HTMLLinkElement.js | 361 - .../jsdom/living/generated/HTMLMapElement.js | 150 - .../living/generated/HTMLMarqueeElement.js | 372 - .../living/generated/HTMLMediaElement.js | 779 - .../jsdom/living/generated/HTMLMenuElement.js | 138 - .../jsdom/living/generated/HTMLMetaElement.js | 213 - .../living/generated/HTMLMeterElement.js | 272 - .../jsdom/living/generated/HTMLModElement.js | 160 - .../living/generated/HTMLOListElement.js | 219 - .../living/generated/HTMLObjectElement.js | 631 - .../living/generated/HTMLOptGroupElement.js | 164 - .../living/generated/HTMLOptionElement.js | 293 - .../living/generated/HTMLOptionsCollection.js | 471 - .../living/generated/HTMLOutputElement.js | 226 - .../living/generated/HTMLParagraphElement.js | 135 - .../living/generated/HTMLParamElement.js | 213 - .../living/generated/HTMLPictureElement.js | 109 - .../jsdom/living/generated/HTMLPreElement.js | 135 - .../living/generated/HTMLProgressElement.js | 122 - .../living/generated/HTMLQuoteElement.js | 134 - .../living/generated/HTMLScriptElement.js | 347 - .../living/generated/HTMLSelectElement.js | 821 - .../living/generated/HTMLSourceElement.js | 237 - .../jsdom/living/generated/HTMLSpanElement.js | 109 - .../living/generated/HTMLStyleElement.js | 203 - .../generated/HTMLTableCaptionElement.js | 135 - .../living/generated/HTMLTableCellElement.js | 487 - .../living/generated/HTMLTableColElement.js | 265 - .../living/generated/HTMLTableElement.js | 560 - .../living/generated/HTMLTableRowElement.js | 323 - .../generated/HTMLTableSectionElement.js | 270 - .../living/generated/HTMLTemplateElement.js | 122 - .../living/generated/HTMLTextAreaElement.js | 875 - .../jsdom/living/generated/HTMLTimeElement.js | 135 - .../living/generated/HTMLTitleElement.js | 134 - .../living/generated/HTMLTrackElement.js | 290 - .../living/generated/HTMLUListElement.js | 164 - .../living/generated/HTMLUnknownElement.js | 109 - .../living/generated/HTMLVideoElement.js | 241 - .../jsdom/living/generated/HashChangeEvent.js | 160 - .../living/generated/HashChangeEventInit.js | 46 - .../lib/jsdom/living/generated/History.js | 242 - .../jsdom/living/generated/KeyboardEvent.js | 460 - .../living/generated/KeyboardEventInit.js | 106 - .../lib/jsdom/living/generated/LinkStyle.js | 114 - .../lib/jsdom/living/generated/Location.js | 376 - .../jsdom/living/generated/MessageEvent.js | 314 - .../living/generated/MessageEventInit.js | 96 - .../lib/jsdom/living/generated/MouseEvent.js | 484 - .../jsdom/living/generated/MouseEventInit.js | 110 - .../jsdom/living/generated/NamedNodeMap.js | 487 - .../lib/jsdom/living/generated/Navigator.js | 311 - .../generated/NavigatorConcurrentHardware.js | 114 - .../living/generated/NavigatorCookies.js | 114 - .../lib/jsdom/living/generated/NavigatorID.js | 218 - .../living/generated/NavigatorLanguage.js | 127 - .../jsdom/living/generated/NavigatorOnLine.js | 114 - .../living/generated/NavigatorPlugins.js | 109 - .../jsdom/lib/jsdom/living/generated/Node.js | 791 - .../jsdom/living/generated/NodeIterator.js | 194 - .../lib/jsdom/living/generated/NodeList.js | 304 - .../generated/NonDocumentTypeChildNode.js | 127 - .../living/generated/NonElementParentNode.js | 124 - .../lib/jsdom/living/generated/ParentNode.js | 250 - .../lib/jsdom/living/generated/Performance.js | 139 - .../jsdom/living/generated/PopStateEvent.js | 147 - .../living/generated/PopStateEventInit.js | 34 - .../living/generated/ProcessingInstruction.js | 122 - .../jsdom/living/generated/ProgressEvent.js | 175 - .../living/generated/ProgressEventInit.js | 58 - .../living/generated/SVGAnimatedString.js | 141 - .../living/generated/SVGBoundingBoxOptions.js | 66 - .../lib/jsdom/living/generated/SVGElement.js | 1645 - .../living/generated/SVGGraphicsElement.js | 142 - .../lib/jsdom/living/generated/SVGNumber.js | 126 - .../jsdom/living/generated/SVGSVGElement.js | 573 - .../jsdom/living/generated/SVGStringList.js | 488 - .../lib/jsdom/living/generated/SVGTests.js | 131 - .../lib/jsdom/living/generated/Screen.js | 181 - .../jsdom/living/generated/ScrollBehavior.js | 13 - .../living/generated/ScrollIntoViewOptions.js | 47 - .../living/generated/ScrollLogicalPosition.js | 13 - .../jsdom/living/generated/ScrollOptions.js | 32 - .../living/generated/ScrollRestoration.js | 13 - .../jsdom/living/generated/SelectionMode.js | 13 - .../jsdom/living/generated/ShadowRootInit.js | 30 - .../lib/jsdom/living/generated/Storage.js | 369 - .../jsdom/living/generated/StorageEvent.js | 199 - .../living/generated/StorageEventInit.js | 95 - .../jsdom/living/generated/SupportedType.js | 19 - .../jsdom/lib/jsdom/living/generated/Text.js | 157 - .../jsdom/living/generated/TextTrackKind.js | 13 - .../lib/jsdom/living/generated/TouchEvent.js | 225 - .../jsdom/living/generated/TouchEventInit.js | 91 - .../lib/jsdom/living/generated/TreeWalker.js | 224 - .../lib/jsdom/living/generated/UIEvent.js | 232 - .../lib/jsdom/living/generated/UIEventInit.js | 61 - .../jsdom/living/generated/ValidityState.js | 246 - .../jsdom/living/generated/VisibilityState.js | 13 - .../lib/jsdom/living/generated/WebSocket.js | 473 - .../lib/jsdom/living/generated/WheelEvent.js | 213 - .../jsdom/living/generated/WheelEventInit.js | 70 - .../living/generated/WindowEventHandlers.js | 469 - .../lib/jsdom/living/generated/XMLDocument.js | 109 - .../generated/XMLHttpRequestEventTarget.js | 272 - .../living/generated/XMLHttpRequestUpload.js | 111 - .../jsdom/lib/jsdom/living/generated/utils.js | 101 - .../living/helpers/create-event-accessor.js | 191 - .../jsdom/living/helpers/dates-and-times.js | 246 - .../jsdom/living/helpers/document-base-url.js | 52 - .../lib/jsdom/living/helpers/focusing.js | 78 - .../lib/jsdom/living/helpers/form-controls.js | 216 - .../living/helpers/internal-constants.js | 12 - .../jsdom/lib/jsdom/living/helpers/json.js | 8 - .../lib/jsdom/living/helpers/namespaces.js | 15 - .../lib/jsdom/living/helpers/ordered-set.js | 104 - .../living/helpers/runtime-script-errors.js | 76 - .../lib/jsdom/living/helpers/selectors.js | 44 - .../jsdom/lib/jsdom/living/helpers/strings.js | 101 - .../lib/jsdom/living/helpers/stylesheets.js | 104 - .../jsdom/living/helpers/svg/basic-types.js | 41 - .../jsdom/lib/jsdom/living/helpers/text.js | 14 - .../lib/jsdom/living/helpers/traversal.js | 83 - .../jsdom/living/helpers/validate-names.js | 73 - .../jsdom/living/hr-time/Performance-impl.js | 25 - node_modules/jsdom/lib/jsdom/living/index.js | 78 - .../jsdom/living/named-properties-window.js | 141 - .../jsdom/living/navigator/Navigator-impl.js | 24 - .../NavigatorConcurrentHardware-impl.js | 8 - .../living/navigator/NavigatorCookies-impl.js | 7 - .../living/navigator/NavigatorID-impl.js | 37 - .../navigator/NavigatorLanguage-impl.js | 9 - .../living/navigator/NavigatorOnLine-impl.js | 7 - .../living/navigator/NavigatorPlugins-impl.js | 7 - .../jsdom/living/node-document-position.js | 10 - .../jsdom/lib/jsdom/living/node-filter.js | 47 - .../jsdom/lib/jsdom/living/node-type.js | 16 - node_modules/jsdom/lib/jsdom/living/node.js | 315 - .../jsdom/living/nodes/CDATASection-impl.js | 16 - .../jsdom/living/nodes/CharacterData-impl.js | 83 - .../lib/jsdom/living/nodes/ChildNode-impl.js | 79 - .../lib/jsdom/living/nodes/Comment-impl.js | 17 - .../living/nodes/DOMImplementation-impl.js | 169 - .../jsdom/living/nodes/DOMStringMap-impl.js | 60 - .../jsdom/living/nodes/DOMTokenList-impl.js | 167 - .../lib/jsdom/living/nodes/Document-impl.js | 846 - .../living/nodes/DocumentFragment-impl.js | 37 - .../jsdom/living/nodes/DocumentType-impl.js | 24 - .../lib/jsdom/living/nodes/Element-impl.js | 444 - .../nodes/ElementCSSInlineStyle-impl.js | 24 - .../nodes/ElementContentEditable-impl.js | 7 - .../living/nodes/GlobalEventHandlers-impl.js | 95 - .../living/nodes/HTMLAnchorElement-impl.js | 25 - .../nodes/HTMLAndSVGElementShared-impl.js | 56 - .../living/nodes/HTMLAreaElement-impl.js | 18 - .../living/nodes/HTMLAudioElement-impl.js | 9 - .../jsdom/living/nodes/HTMLBRElement-impl.js | 9 - .../living/nodes/HTMLBaseElement-impl.js | 27 - .../living/nodes/HTMLBodyElement-impl.js | 17 - .../living/nodes/HTMLButtonElement-impl.js | 75 - .../living/nodes/HTMLCanvasElement-impl.js | 131 - .../jsdom/living/nodes/HTMLCollection-impl.js | 93 - .../living/nodes/HTMLDListElement-impl.js | 9 - .../living/nodes/HTMLDataElement-impl.js | 9 - .../living/nodes/HTMLDataListElement-impl.js | 9 - .../living/nodes/HTMLDetailsElement-impl.js | 41 - .../living/nodes/HTMLDialogElement-impl.js | 9 - .../living/nodes/HTMLDirectoryElement-impl.js | 9 - .../jsdom/living/nodes/HTMLDivElement-impl.js | 9 - .../jsdom/living/nodes/HTMLElement-impl.js | 141 - .../living/nodes/HTMLEmbedElement-impl.js | 17 - .../living/nodes/HTMLFieldSetElement-impl.js | 22 - .../living/nodes/HTMLFontElement-impl.js | 9 - .../living/nodes/HTMLFormElement-impl.js | 180 - .../living/nodes/HTMLFrameElement-impl.js | 186 - .../living/nodes/HTMLFrameSetElement-impl.js | 17 - .../jsdom/living/nodes/HTMLHRElement-impl.js | 9 - .../living/nodes/HTMLHeadElement-impl.js | 9 - .../living/nodes/HTMLHeadingElement-impl.js | 9 - .../living/nodes/HTMLHtmlElement-impl.js | 9 - .../nodes/HTMLHyperlinkElementUtils-impl.js | 296 - .../living/nodes/HTMLIFrameElement-impl.js | 9 - .../living/nodes/HTMLImageElement-impl.js | 120 - .../living/nodes/HTMLInputElement-impl.js | 864 - .../jsdom/living/nodes/HTMLLIElement-impl.js | 9 - .../living/nodes/HTMLLabelElement-impl.js | 69 - .../living/nodes/HTMLLegendElement-impl.js | 13 - .../living/nodes/HTMLLinkElement-impl.js | 79 - .../jsdom/living/nodes/HTMLMapElement-impl.js | 13 - .../living/nodes/HTMLMarqueeElement-impl.js | 9 - .../living/nodes/HTMLMediaElement-impl.js | 140 - .../living/nodes/HTMLMenuElement-impl.js | 9 - .../living/nodes/HTMLMetaElement-impl.js | 9 - .../living/nodes/HTMLMeterElement-impl.js | 181 - .../jsdom/living/nodes/HTMLModElement-impl.js | 18 - .../living/nodes/HTMLOListElement-impl.js | 9 - .../living/nodes/HTMLObjectElement-impl.js | 43 - .../living/nodes/HTMLOptGroupElement-impl.js | 9 - .../living/nodes/HTMLOptionElement-impl.js | 117 - .../nodes/HTMLOptionsCollection-impl.js | 107 - .../living/nodes/HTMLOutputElement-impl.js | 28 - .../living/nodes/HTMLParagraphElement-impl.js | 9 - .../living/nodes/HTMLParamElement-impl.js | 9 - .../living/nodes/HTMLPictureElement-impl.js | 9 - .../jsdom/living/nodes/HTMLPreElement-impl.js | 9 - .../living/nodes/HTMLProgressElement-impl.js | 19 - .../living/nodes/HTMLQuoteElement-impl.js | 18 - .../living/nodes/HTMLScriptElement-impl.js | 214 - .../living/nodes/HTMLSelectElement-impl.js | 270 - .../living/nodes/HTMLSourceElement-impl.js | 26 - .../living/nodes/HTMLSpanElement-impl.js | 9 - .../living/nodes/HTMLStyleElement-impl.js | 73 - .../nodes/HTMLTableCaptionElement-impl.js | 9 - .../living/nodes/HTMLTableCellElement-impl.js | 75 - .../living/nodes/HTMLTableColElement-impl.js | 9 - .../living/nodes/HTMLTableElement-impl.js | 226 - .../living/nodes/HTMLTableRowElement-impl.js | 88 - .../nodes/HTMLTableSectionElement-impl.js | 56 - .../living/nodes/HTMLTemplateElement-impl.js | 32 - .../living/nodes/HTMLTextAreaElement-impl.js | 223 - .../living/nodes/HTMLTimeElement-impl.js | 9 - .../living/nodes/HTMLTitleElement-impl.js | 18 - .../living/nodes/HTMLTrackElement-impl.js | 21 - .../living/nodes/HTMLUListElement-impl.js | 9 - .../living/nodes/HTMLUnknownElement-impl.js | 9 - .../living/nodes/HTMLVideoElement-impl.js | 26 - .../lib/jsdom/living/nodes/LinkStyle-impl.js | 2 - .../jsdom/lib/jsdom/living/nodes/Node-impl.js | 561 - .../lib/jsdom/living/nodes/NodeList-impl.js | 43 - .../nodes/NonDocumentTypeChildNode-impl.js | 28 - .../living/nodes/NonElementParentNode-impl.js | 11 - .../lib/jsdom/living/nodes/ParentNode-impl.js | 86 - .../nodes/ProcessingInstruction-impl.js | 22 - .../lib/jsdom/living/nodes/SVGElement-impl.js | 51 - .../living/nodes/SVGGraphicsElement-impl.js | 16 - .../jsdom/living/nodes/SVGSVGElement-impl.js | 42 - .../lib/jsdom/living/nodes/SVGTests-impl.js | 42 - .../jsdom/lib/jsdom/living/nodes/Text-impl.js | 62 - .../living/nodes/WindowEventHandlers-impl.js | 52 - .../jsdom/living/nodes/XMLDocument-impl.js | 4 - .../jsdom/lib/jsdom/living/post-message.js | 36 - .../lib/jsdom/living/register-elements.js | 379 - .../living/svg/SVGAnimatedString-impl.js | 38 - .../jsdom/lib/jsdom/living/svg/SVGListBase.js | 180 - .../lib/jsdom/living/svg/SVGNumber-impl.js | 45 - .../jsdom/living/svg/SVGStringList-impl.js | 14 - .../living/traversal/NodeIterator-impl.js | 123 - .../jsdom/living/traversal/TreeWalker-impl.js | 216 - .../lib/jsdom/living/traversal/helpers.js | 47 - .../websockets/WebSocket-impl-browser.js | 172 - .../jsdom/living/websockets/WebSocket-impl.js | 316 - .../jsdom/living/webstorage/Storage-impl.js | 99 - .../lib/jsdom/living/window/BarProp-impl.js | 10 - .../lib/jsdom/living/window/External-impl.js | 9 - .../lib/jsdom/living/window/History-impl.js | 123 - .../lib/jsdom/living/window/History.webidl | 14 - .../lib/jsdom/living/window/Location-impl.js | 232 - .../lib/jsdom/living/window/Screen-impl.js | 13 - .../lib/jsdom/living/window/SessionHistory.js | 177 - .../lib/jsdom/living/window/navigation.js | 90 - .../jsdom/lib/jsdom/living/xhr-sync-worker.js | 48 - .../jsdom/lib/jsdom/living/xhr-utils.js | 448 - .../lib/jsdom/living/xhr/FormData-impl.js | 172 - .../xhr/XMLHttpRequestEventTarget-impl.js | 10 - .../living/xhr/XMLHttpRequestUpload-impl.js | 4 - .../jsdom/living/xmlhttprequest-symbols.js | 4 - .../jsdom/lib/jsdom/living/xmlhttprequest.js | 1097 - .../lib/jsdom/named-properties-tracker.js | 158 - node_modules/jsdom/lib/jsdom/utils.js | 195 - .../jsdom/lib/jsdom/virtual-console.js | 34 - node_modules/jsdom/lib/jsdom/vm-shim.js | 126 - node_modules/jsdom/lib/old-api.js | 503 - node_modules/jsdom/lib/old-api.md | 588 - node_modules/jsdom/package.json | 161 - node_modules/jsesc/LICENSE-MIT.txt | 20 - node_modules/jsesc/README.md | 421 - node_modules/jsesc/bin/jsesc | 148 - node_modules/jsesc/jsesc.js | 329 - node_modules/jsesc/man/jsesc.1 | 94 - node_modules/jsesc/package.json | 89 - .../json-parse-better-errors/CHANGELOG.md | 46 - .../json-parse-better-errors/LICENSE.md | 7 - .../json-parse-better-errors/README.md | 46 - .../json-parse-better-errors/index.js | 38 - .../json-parse-better-errors/package.json | 81 - .../json-schema-traverse/.eslintrc.yml | 27 - node_modules/json-schema-traverse/.travis.yml | 8 - node_modules/json-schema-traverse/LICENSE | 21 - node_modules/json-schema-traverse/README.md | 83 - node_modules/json-schema-traverse/index.js | 89 - .../json-schema-traverse/package.json | 74 - .../json-schema-traverse/spec/.eslintrc.yml | 6 - .../spec/fixtures/schema.js | 125 - .../json-schema-traverse/spec/index.spec.js | 171 - node_modules/json-schema/README.md | 5 - .../json-schema/draft-00/hyper-schema | 68 - node_modules/json-schema/draft-00/json-ref | 26 - node_modules/json-schema/draft-00/links | 33 - node_modules/json-schema/draft-00/schema | 155 - .../json-schema/draft-01/hyper-schema | 68 - node_modules/json-schema/draft-01/json-ref | 26 - node_modules/json-schema/draft-01/links | 33 - node_modules/json-schema/draft-01/schema | 155 - .../json-schema/draft-02/hyper-schema | 68 - node_modules/json-schema/draft-02/json-ref | 26 - node_modules/json-schema/draft-02/links | 35 - node_modules/json-schema/draft-02/schema | 166 - .../json-schema/draft-03/examples/address | 20 - .../json-schema/draft-03/examples/calendar | 53 - .../json-schema/draft-03/examples/card | 105 - .../json-schema/draft-03/examples/geo | 8 - .../json-schema/draft-03/examples/interfaces | 23 - .../json-schema/draft-03/hyper-schema | 60 - node_modules/json-schema/draft-03/json-ref | 26 - node_modules/json-schema/draft-03/links | 35 - node_modules/json-schema/draft-03/schema | 174 - .../json-schema/draft-04/hyper-schema | 60 - node_modules/json-schema/draft-04/links | 41 - node_modules/json-schema/draft-04/schema | 189 - .../json-schema/draft-zyp-json-schema-03.xml | 1120 - .../json-schema/draft-zyp-json-schema-04.xml | 1072 - node_modules/json-schema/lib/links.js | 66 - node_modules/json-schema/lib/validate.js | 273 - node_modules/json-schema/package.json | 75 - node_modules/json-schema/test/tests.js | 95 - node_modules/json-stringify-safe/.npmignore | 1 - node_modules/json-stringify-safe/CHANGELOG.md | 14 - node_modules/json-stringify-safe/LICENSE | 15 - node_modules/json-stringify-safe/Makefile | 35 - node_modules/json-stringify-safe/README.md | 52 - node_modules/json-stringify-safe/package.json | 70 - node_modules/json-stringify-safe/stringify.js | 27 - .../json-stringify-safe/test/mocha.opts | 2 - .../test/stringify_test.js | 246 - node_modules/json5/CHANGELOG.md | 315 - node_modules/json5/LICENSE.md | 23 - node_modules/json5/README.md | 234 - node_modules/json5/dist/index.js | 1688 - node_modules/json5/dist/index.min.js | 1 - node_modules/json5/dist/index.min.mjs | 1 - node_modules/json5/dist/index.mjs | 1392 - node_modules/json5/lib/cli.js | 112 - node_modules/json5/lib/index.js | 9 - node_modules/json5/lib/parse.js | 1087 - node_modules/json5/lib/register.js | 13 - node_modules/json5/lib/require.js | 4 - node_modules/json5/lib/stringify.js | 254 - node_modules/json5/lib/unicode.js | 4 - node_modules/json5/lib/util.js | 35 - node_modules/json5/package.json | 114 - node_modules/jsprim/CHANGES.md | 49 - node_modules/jsprim/CONTRIBUTING.md | 19 - node_modules/jsprim/LICENSE | 19 - node_modules/jsprim/README.md | 287 - node_modules/jsprim/lib/jsprim.js | 735 - node_modules/jsprim/package.json | 53 - node_modules/kind-of/CHANGELOG.md | 157 - node_modules/kind-of/LICENSE | 21 - node_modules/kind-of/README.md | 365 - node_modules/kind-of/index.js | 129 - node_modules/kind-of/package.json | 160 - node_modules/kleur/index.js | 104 - node_modules/kleur/kleur.d.ts | 45 - node_modules/kleur/license | 21 - node_modules/kleur/package.json | 71 - node_modules/kleur/readme.md | 172 - node_modules/left-pad/.travis.yml | 6 - node_modules/left-pad/COPYING | 14 - node_modules/left-pad/README.md | 36 - node_modules/left-pad/index.d.ts | 9 - node_modules/left-pad/index.js | 52 - node_modules/left-pad/package.json | 71 - node_modules/left-pad/perf/O(n).js | 17 - node_modules/left-pad/perf/es6Repeat.js | 13 - node_modules/left-pad/perf/perf.js | 40 - node_modules/left-pad/test.js | 88 - node_modules/leven/index.d.ts | 21 - node_modules/leven/index.js | 77 - node_modules/leven/license | 9 - node_modules/leven/package.json | 93 - node_modules/leven/readme.md | 50 - node_modules/levn/LICENSE | 22 - node_modules/levn/README.md | 196 - node_modules/levn/lib/cast.js | 298 - node_modules/levn/lib/coerce.js | 285 - node_modules/levn/lib/index.js | 22 - node_modules/levn/lib/parse-string.js | 113 - node_modules/levn/lib/parse.js | 102 - node_modules/levn/package.json | 81 - node_modules/lines-and-columns/LICENSE | 21 - node_modules/lines-and-columns/README.md | 29 - .../lines-and-columns/dist/index.d.ts | 12 - node_modules/lines-and-columns/dist/index.js | 58 - node_modules/lines-and-columns/dist/index.mjs | 56 - node_modules/lines-and-columns/package.json | 77 - node_modules/load-json-file/index.js | 11 - node_modules/load-json-file/license | 21 - node_modules/load-json-file/package.json | 79 - node_modules/load-json-file/readme.md | 45 - node_modules/locate-path/index.js | 24 - node_modules/locate-path/license | 9 - node_modules/locate-path/package.json | 80 - node_modules/locate-path/readme.md | 99 - node_modules/lodash.sortby/LICENSE | 47 - node_modules/lodash.sortby/README.md | 18 - node_modules/lodash.sortby/index.js | 2630 - node_modules/lodash.sortby/package.json | 74 - node_modules/lodash/LICENSE | 47 - node_modules/lodash/README.md | 39 - node_modules/lodash/_DataView.js | 7 - node_modules/lodash/_Hash.js | 32 - node_modules/lodash/_LazyWrapper.js | 28 - node_modules/lodash/_ListCache.js | 32 - node_modules/lodash/_LodashWrapper.js | 22 - node_modules/lodash/_Map.js | 7 - node_modules/lodash/_MapCache.js | 32 - node_modules/lodash/_Promise.js | 7 - node_modules/lodash/_Set.js | 7 - node_modules/lodash/_SetCache.js | 27 - node_modules/lodash/_Stack.js | 27 - node_modules/lodash/_Symbol.js | 6 - node_modules/lodash/_Uint8Array.js | 6 - node_modules/lodash/_WeakMap.js | 7 - node_modules/lodash/_apply.js | 21 - node_modules/lodash/_arrayAggregator.js | 22 - node_modules/lodash/_arrayEach.js | 22 - node_modules/lodash/_arrayEachRight.js | 21 - node_modules/lodash/_arrayEvery.js | 23 - node_modules/lodash/_arrayFilter.js | 25 - node_modules/lodash/_arrayIncludes.js | 17 - node_modules/lodash/_arrayIncludesWith.js | 22 - node_modules/lodash/_arrayLikeKeys.js | 49 - node_modules/lodash/_arrayMap.js | 21 - node_modules/lodash/_arrayPush.js | 20 - node_modules/lodash/_arrayReduce.js | 26 - node_modules/lodash/_arrayReduceRight.js | 24 - node_modules/lodash/_arraySample.js | 15 - node_modules/lodash/_arraySampleSize.js | 17 - node_modules/lodash/_arrayShuffle.js | 15 - node_modules/lodash/_arraySome.js | 23 - node_modules/lodash/_asciiSize.js | 12 - node_modules/lodash/_asciiToArray.js | 12 - node_modules/lodash/_asciiWords.js | 15 - node_modules/lodash/_assignMergeValue.js | 20 - node_modules/lodash/_assignValue.js | 28 - node_modules/lodash/_assocIndexOf.js | 21 - node_modules/lodash/_baseAggregator.js | 21 - node_modules/lodash/_baseAssign.js | 17 - node_modules/lodash/_baseAssignIn.js | 17 - node_modules/lodash/_baseAssignValue.js | 25 - node_modules/lodash/_baseAt.js | 23 - node_modules/lodash/_baseClamp.js | 22 - node_modules/lodash/_baseClone.js | 165 - node_modules/lodash/_baseConforms.js | 18 - node_modules/lodash/_baseConformsTo.js | 27 - node_modules/lodash/_baseCreate.js | 30 - node_modules/lodash/_baseDelay.js | 21 - node_modules/lodash/_baseDifference.js | 67 - node_modules/lodash/_baseEach.js | 14 - node_modules/lodash/_baseEachRight.js | 14 - node_modules/lodash/_baseEvery.js | 21 - node_modules/lodash/_baseExtremum.js | 32 - node_modules/lodash/_baseFill.js | 32 - node_modules/lodash/_baseFilter.js | 21 - node_modules/lodash/_baseFindIndex.js | 24 - node_modules/lodash/_baseFindKey.js | 23 - node_modules/lodash/_baseFlatten.js | 38 - node_modules/lodash/_baseFor.js | 16 - node_modules/lodash/_baseForOwn.js | 16 - node_modules/lodash/_baseForOwnRight.js | 16 - node_modules/lodash/_baseForRight.js | 15 - node_modules/lodash/_baseFunctions.js | 19 - node_modules/lodash/_baseGet.js | 24 - node_modules/lodash/_baseGetAllKeys.js | 20 - node_modules/lodash/_baseGetTag.js | 28 - node_modules/lodash/_baseGt.js | 14 - node_modules/lodash/_baseHas.js | 19 - node_modules/lodash/_baseHasIn.js | 13 - node_modules/lodash/_baseInRange.js | 18 - node_modules/lodash/_baseIndexOf.js | 20 - node_modules/lodash/_baseIndexOfWith.js | 23 - node_modules/lodash/_baseIntersection.js | 74 - node_modules/lodash/_baseInverter.js | 21 - node_modules/lodash/_baseInvoke.js | 24 - node_modules/lodash/_baseIsArguments.js | 18 - node_modules/lodash/_baseIsArrayBuffer.js | 17 - node_modules/lodash/_baseIsDate.js | 18 - node_modules/lodash/_baseIsEqual.js | 28 - node_modules/lodash/_baseIsEqualDeep.js | 83 - node_modules/lodash/_baseIsMap.js | 18 - node_modules/lodash/_baseIsMatch.js | 62 - node_modules/lodash/_baseIsNaN.js | 12 - node_modules/lodash/_baseIsNative.js | 47 - node_modules/lodash/_baseIsRegExp.js | 18 - node_modules/lodash/_baseIsSet.js | 18 - node_modules/lodash/_baseIsTypedArray.js | 60 - node_modules/lodash/_baseIteratee.js | 31 - node_modules/lodash/_baseKeys.js | 30 - node_modules/lodash/_baseKeysIn.js | 33 - node_modules/lodash/_baseLodash.js | 10 - node_modules/lodash/_baseLt.js | 14 - node_modules/lodash/_baseMap.js | 22 - node_modules/lodash/_baseMatches.js | 22 - node_modules/lodash/_baseMatchesProperty.js | 33 - node_modules/lodash/_baseMean.js | 20 - node_modules/lodash/_baseMerge.js | 42 - node_modules/lodash/_baseMergeDeep.js | 94 - node_modules/lodash/_baseNth.js | 20 - node_modules/lodash/_baseOrderBy.js | 34 - node_modules/lodash/_basePick.js | 19 - node_modules/lodash/_basePickBy.js | 30 - node_modules/lodash/_baseProperty.js | 14 - node_modules/lodash/_basePropertyDeep.js | 16 - node_modules/lodash/_basePropertyOf.js | 14 - node_modules/lodash/_basePullAll.js | 51 - node_modules/lodash/_basePullAt.js | 37 - node_modules/lodash/_baseRandom.js | 18 - node_modules/lodash/_baseRange.js | 28 - node_modules/lodash/_baseReduce.js | 23 - node_modules/lodash/_baseRepeat.js | 35 - node_modules/lodash/_baseRest.js | 17 - node_modules/lodash/_baseSample.js | 15 - node_modules/lodash/_baseSampleSize.js | 18 - node_modules/lodash/_baseSet.js | 47 - node_modules/lodash/_baseSetData.js | 17 - node_modules/lodash/_baseSetToString.js | 22 - node_modules/lodash/_baseShuffle.js | 15 - node_modules/lodash/_baseSlice.js | 31 - node_modules/lodash/_baseSome.js | 22 - node_modules/lodash/_baseSortBy.js | 21 - node_modules/lodash/_baseSortedIndex.js | 42 - node_modules/lodash/_baseSortedIndexBy.js | 64 - node_modules/lodash/_baseSortedUniq.js | 30 - node_modules/lodash/_baseSum.js | 24 - node_modules/lodash/_baseTimes.js | 20 - node_modules/lodash/_baseToNumber.js | 24 - node_modules/lodash/_baseToPairs.js | 18 - node_modules/lodash/_baseToString.js | 37 - node_modules/lodash/_baseUnary.js | 14 - node_modules/lodash/_baseUniq.js | 72 - node_modules/lodash/_baseUnset.js | 20 - node_modules/lodash/_baseUpdate.js | 18 - node_modules/lodash/_baseValues.js | 19 - node_modules/lodash/_baseWhile.js | 26 - node_modules/lodash/_baseWrapperValue.js | 25 - node_modules/lodash/_baseXor.js | 36 - node_modules/lodash/_baseZipObject.js | 23 - node_modules/lodash/_cacheHas.js | 13 - node_modules/lodash/_castArrayLikeObject.js | 14 - node_modules/lodash/_castFunction.js | 14 - node_modules/lodash/_castPath.js | 21 - node_modules/lodash/_castRest.js | 14 - node_modules/lodash/_castSlice.js | 18 - node_modules/lodash/_charsEndIndex.js | 19 - node_modules/lodash/_charsStartIndex.js | 20 - node_modules/lodash/_cloneArrayBuffer.js | 16 - node_modules/lodash/_cloneBuffer.js | 35 - node_modules/lodash/_cloneDataView.js | 16 - node_modules/lodash/_cloneRegExp.js | 17 - node_modules/lodash/_cloneSymbol.js | 18 - node_modules/lodash/_cloneTypedArray.js | 16 - node_modules/lodash/_compareAscending.js | 41 - node_modules/lodash/_compareMultiple.js | 44 - node_modules/lodash/_composeArgs.js | 39 - node_modules/lodash/_composeArgsRight.js | 41 - node_modules/lodash/_copyArray.js | 20 - node_modules/lodash/_copyObject.js | 40 - node_modules/lodash/_copySymbols.js | 16 - node_modules/lodash/_copySymbolsIn.js | 16 - node_modules/lodash/_coreJsData.js | 6 - node_modules/lodash/_countHolders.js | 21 - node_modules/lodash/_createAggregator.js | 23 - node_modules/lodash/_createAssigner.js | 37 - node_modules/lodash/_createBaseEach.js | 32 - node_modules/lodash/_createBaseFor.js | 25 - node_modules/lodash/_createBind.js | 28 - node_modules/lodash/_createCaseFirst.js | 33 - node_modules/lodash/_createCompounder.js | 24 - node_modules/lodash/_createCtor.js | 37 - node_modules/lodash/_createCurry.js | 46 - node_modules/lodash/_createFind.js | 25 - node_modules/lodash/_createFlow.js | 78 - node_modules/lodash/_createHybrid.js | 92 - node_modules/lodash/_createInverter.js | 17 - node_modules/lodash/_createMathOperation.js | 38 - node_modules/lodash/_createOver.js | 27 - node_modules/lodash/_createPadding.js | 33 - node_modules/lodash/_createPartial.js | 43 - node_modules/lodash/_createRange.js | 30 - node_modules/lodash/_createRecurry.js | 56 - .../lodash/_createRelationalOperation.js | 20 - node_modules/lodash/_createRound.js | 35 - node_modules/lodash/_createSet.js | 19 - node_modules/lodash/_createToPairs.js | 30 - node_modules/lodash/_createWrap.js | 106 - .../lodash/_customDefaultsAssignIn.js | 29 - node_modules/lodash/_customDefaultsMerge.js | 28 - node_modules/lodash/_customOmitClone.js | 16 - node_modules/lodash/_deburrLetter.js | 71 - node_modules/lodash/_defineProperty.js | 11 - node_modules/lodash/_equalArrays.js | 83 - node_modules/lodash/_equalByTag.js | 112 - node_modules/lodash/_equalObjects.js | 89 - node_modules/lodash/_escapeHtmlChar.js | 21 - node_modules/lodash/_escapeStringChar.js | 22 - node_modules/lodash/_flatRest.js | 16 - node_modules/lodash/_freeGlobal.js | 4 - node_modules/lodash/_getAllKeys.js | 16 - node_modules/lodash/_getAllKeysIn.js | 17 - node_modules/lodash/_getData.js | 15 - node_modules/lodash/_getFuncName.js | 31 - node_modules/lodash/_getHolder.js | 13 - node_modules/lodash/_getMapData.js | 18 - node_modules/lodash/_getMatchData.js | 24 - node_modules/lodash/_getNative.js | 17 - node_modules/lodash/_getPrototype.js | 6 - node_modules/lodash/_getRawTag.js | 46 - node_modules/lodash/_getSymbols.js | 30 - node_modules/lodash/_getSymbolsIn.js | 25 - node_modules/lodash/_getTag.js | 58 - node_modules/lodash/_getValue.js | 13 - node_modules/lodash/_getView.js | 33 - node_modules/lodash/_getWrapDetails.js | 17 - node_modules/lodash/_hasPath.js | 39 - node_modules/lodash/_hasUnicode.js | 26 - node_modules/lodash/_hasUnicodeWord.js | 15 - node_modules/lodash/_hashClear.js | 15 - node_modules/lodash/_hashDelete.js | 17 - node_modules/lodash/_hashGet.js | 30 - node_modules/lodash/_hashHas.js | 23 - node_modules/lodash/_hashSet.js | 23 - node_modules/lodash/_initCloneArray.js | 26 - node_modules/lodash/_initCloneByTag.js | 77 - node_modules/lodash/_initCloneObject.js | 18 - node_modules/lodash/_insertWrapDetails.js | 23 - node_modules/lodash/_isFlattenable.js | 20 - node_modules/lodash/_isIndex.js | 25 - node_modules/lodash/_isIterateeCall.js | 30 - node_modules/lodash/_isKey.js | 29 - node_modules/lodash/_isKeyable.js | 15 - node_modules/lodash/_isLaziable.js | 28 - node_modules/lodash/_isMaskable.js | 14 - node_modules/lodash/_isMasked.js | 20 - node_modules/lodash/_isPrototype.js | 18 - node_modules/lodash/_isStrictComparable.js | 15 - node_modules/lodash/_iteratorToArray.js | 18 - node_modules/lodash/_lazyClone.js | 23 - node_modules/lodash/_lazyReverse.js | 23 - node_modules/lodash/_lazyValue.js | 69 - node_modules/lodash/_listCacheClear.js | 13 - node_modules/lodash/_listCacheDelete.js | 35 - node_modules/lodash/_listCacheGet.js | 19 - node_modules/lodash/_listCacheHas.js | 16 - node_modules/lodash/_listCacheSet.js | 26 - node_modules/lodash/_mapCacheClear.js | 21 - node_modules/lodash/_mapCacheDelete.js | 18 - node_modules/lodash/_mapCacheGet.js | 16 - node_modules/lodash/_mapCacheHas.js | 16 - node_modules/lodash/_mapCacheSet.js | 22 - node_modules/lodash/_mapToArray.js | 18 - .../lodash/_matchesStrictComparable.js | 20 - node_modules/lodash/_memoizeCapped.js | 26 - node_modules/lodash/_mergeData.js | 90 - node_modules/lodash/_metaMap.js | 6 - node_modules/lodash/_nativeCreate.js | 6 - node_modules/lodash/_nativeKeys.js | 6 - node_modules/lodash/_nativeKeysIn.js | 20 - node_modules/lodash/_nodeUtil.js | 30 - node_modules/lodash/_objectToString.js | 22 - node_modules/lodash/_overArg.js | 15 - node_modules/lodash/_overRest.js | 36 - node_modules/lodash/_parent.js | 16 - node_modules/lodash/_reEscape.js | 4 - node_modules/lodash/_reEvaluate.js | 4 - node_modules/lodash/_reInterpolate.js | 4 - node_modules/lodash/_realNames.js | 4 - node_modules/lodash/_reorder.js | 29 - node_modules/lodash/_replaceHolders.js | 29 - node_modules/lodash/_root.js | 9 - node_modules/lodash/_safeGet.js | 21 - node_modules/lodash/_setCacheAdd.js | 19 - node_modules/lodash/_setCacheHas.js | 14 - node_modules/lodash/_setData.js | 20 - node_modules/lodash/_setToArray.js | 18 - node_modules/lodash/_setToPairs.js | 18 - node_modules/lodash/_setToString.js | 14 - node_modules/lodash/_setWrapToString.js | 21 - node_modules/lodash/_shortOut.js | 37 - node_modules/lodash/_shuffleSelf.js | 28 - node_modules/lodash/_stackClear.js | 15 - node_modules/lodash/_stackDelete.js | 18 - node_modules/lodash/_stackGet.js | 14 - node_modules/lodash/_stackHas.js | 14 - node_modules/lodash/_stackSet.js | 34 - node_modules/lodash/_strictIndexOf.js | 23 - node_modules/lodash/_strictLastIndexOf.js | 21 - node_modules/lodash/_stringSize.js | 18 - node_modules/lodash/_stringToArray.js | 18 - node_modules/lodash/_stringToPath.js | 27 - node_modules/lodash/_toKey.js | 21 - node_modules/lodash/_toSource.js | 26 - node_modules/lodash/_unescapeHtmlChar.js | 21 - node_modules/lodash/_unicodeSize.js | 44 - node_modules/lodash/_unicodeToArray.js | 40 - node_modules/lodash/_unicodeWords.js | 69 - node_modules/lodash/_updateWrapDetails.js | 46 - node_modules/lodash/_wrapperClone.js | 23 - node_modules/lodash/add.js | 22 - node_modules/lodash/after.js | 42 - node_modules/lodash/array.js | 67 - node_modules/lodash/ary.js | 29 - node_modules/lodash/assign.js | 58 - node_modules/lodash/assignIn.js | 40 - node_modules/lodash/assignInWith.js | 38 - node_modules/lodash/assignWith.js | 37 - node_modules/lodash/at.js | 23 - node_modules/lodash/attempt.js | 35 - node_modules/lodash/before.js | 40 - node_modules/lodash/bind.js | 57 - node_modules/lodash/bindAll.js | 41 - node_modules/lodash/bindKey.js | 68 - node_modules/lodash/camelCase.js | 29 - node_modules/lodash/capitalize.js | 23 - node_modules/lodash/castArray.js | 44 - node_modules/lodash/ceil.js | 26 - node_modules/lodash/chain.js | 38 - node_modules/lodash/chunk.js | 50 - node_modules/lodash/clamp.js | 39 - node_modules/lodash/clone.js | 36 - node_modules/lodash/cloneDeep.js | 29 - node_modules/lodash/cloneDeepWith.js | 40 - node_modules/lodash/cloneWith.js | 42 - node_modules/lodash/collection.js | 30 - node_modules/lodash/commit.js | 33 - node_modules/lodash/compact.js | 31 - node_modules/lodash/concat.js | 43 - node_modules/lodash/cond.js | 60 - node_modules/lodash/conforms.js | 35 - node_modules/lodash/conformsTo.js | 32 - node_modules/lodash/constant.js | 26 - node_modules/lodash/core.js | 3854 -- node_modules/lodash/core.min.js | 29 - node_modules/lodash/countBy.js | 40 - node_modules/lodash/create.js | 43 - node_modules/lodash/curry.js | 57 - node_modules/lodash/curryRight.js | 54 - node_modules/lodash/date.js | 3 - node_modules/lodash/debounce.js | 191 - node_modules/lodash/deburr.js | 45 - node_modules/lodash/defaultTo.js | 25 - node_modules/lodash/defaults.js | 64 - node_modules/lodash/defaultsDeep.js | 30 - node_modules/lodash/defer.js | 26 - node_modules/lodash/delay.js | 28 - node_modules/lodash/difference.js | 33 - node_modules/lodash/differenceBy.js | 44 - node_modules/lodash/differenceWith.js | 40 - node_modules/lodash/divide.js | 22 - node_modules/lodash/drop.js | 38 - node_modules/lodash/dropRight.js | 39 - node_modules/lodash/dropRightWhile.js | 45 - node_modules/lodash/dropWhile.js | 45 - node_modules/lodash/each.js | 1 - node_modules/lodash/eachRight.js | 1 - node_modules/lodash/endsWith.js | 43 - node_modules/lodash/entries.js | 1 - node_modules/lodash/entriesIn.js | 1 - node_modules/lodash/eq.js | 37 - node_modules/lodash/escape.js | 43 - node_modules/lodash/escapeRegExp.js | 32 - node_modules/lodash/every.js | 56 - node_modules/lodash/extend.js | 1 - node_modules/lodash/extendWith.js | 1 - node_modules/lodash/fill.js | 45 - node_modules/lodash/filter.js | 48 - node_modules/lodash/find.js | 42 - node_modules/lodash/findIndex.js | 55 - node_modules/lodash/findKey.js | 44 - node_modules/lodash/findLast.js | 25 - node_modules/lodash/findLastIndex.js | 59 - node_modules/lodash/findLastKey.js | 44 - node_modules/lodash/first.js | 1 - node_modules/lodash/flatMap.js | 29 - node_modules/lodash/flatMapDeep.js | 31 - node_modules/lodash/flatMapDepth.js | 31 - node_modules/lodash/flatten.js | 22 - node_modules/lodash/flattenDeep.js | 25 - node_modules/lodash/flattenDepth.js | 33 - node_modules/lodash/flip.js | 28 - node_modules/lodash/floor.js | 26 - node_modules/lodash/flow.js | 27 - node_modules/lodash/flowRight.js | 26 - node_modules/lodash/forEach.js | 41 - node_modules/lodash/forEachRight.js | 31 - node_modules/lodash/forIn.js | 39 - node_modules/lodash/forInRight.js | 37 - node_modules/lodash/forOwn.js | 36 - node_modules/lodash/forOwnRight.js | 34 - node_modules/lodash/fp.js | 2 - node_modules/lodash/fp/F.js | 1 - node_modules/lodash/fp/T.js | 1 - node_modules/lodash/fp/__.js | 1 - node_modules/lodash/fp/_baseConvert.js | 569 - node_modules/lodash/fp/_convertBrowser.js | 18 - node_modules/lodash/fp/_falseOptions.js | 7 - node_modules/lodash/fp/_mapping.js | 358 - node_modules/lodash/fp/_util.js | 16 - node_modules/lodash/fp/add.js | 5 - node_modules/lodash/fp/after.js | 5 - node_modules/lodash/fp/all.js | 1 - node_modules/lodash/fp/allPass.js | 1 - node_modules/lodash/fp/always.js | 1 - node_modules/lodash/fp/any.js | 1 - node_modules/lodash/fp/anyPass.js | 1 - node_modules/lodash/fp/apply.js | 1 - node_modules/lodash/fp/array.js | 2 - node_modules/lodash/fp/ary.js | 5 - node_modules/lodash/fp/assign.js | 5 - node_modules/lodash/fp/assignAll.js | 5 - node_modules/lodash/fp/assignAllWith.js | 5 - node_modules/lodash/fp/assignIn.js | 5 - node_modules/lodash/fp/assignInAll.js | 5 - node_modules/lodash/fp/assignInAllWith.js | 5 - node_modules/lodash/fp/assignInWith.js | 5 - node_modules/lodash/fp/assignWith.js | 5 - node_modules/lodash/fp/assoc.js | 1 - node_modules/lodash/fp/assocPath.js | 1 - node_modules/lodash/fp/at.js | 5 - node_modules/lodash/fp/attempt.js | 5 - node_modules/lodash/fp/before.js | 5 - node_modules/lodash/fp/bind.js | 5 - node_modules/lodash/fp/bindAll.js | 5 - node_modules/lodash/fp/bindKey.js | 5 - node_modules/lodash/fp/camelCase.js | 5 - node_modules/lodash/fp/capitalize.js | 5 - node_modules/lodash/fp/castArray.js | 5 - node_modules/lodash/fp/ceil.js | 5 - node_modules/lodash/fp/chain.js | 5 - node_modules/lodash/fp/chunk.js | 5 - node_modules/lodash/fp/clamp.js | 5 - node_modules/lodash/fp/clone.js | 5 - node_modules/lodash/fp/cloneDeep.js | 5 - node_modules/lodash/fp/cloneDeepWith.js | 5 - node_modules/lodash/fp/cloneWith.js | 5 - node_modules/lodash/fp/collection.js | 2 - node_modules/lodash/fp/commit.js | 5 - node_modules/lodash/fp/compact.js | 5 - node_modules/lodash/fp/complement.js | 1 - node_modules/lodash/fp/compose.js | 1 - node_modules/lodash/fp/concat.js | 5 - node_modules/lodash/fp/cond.js | 5 - node_modules/lodash/fp/conforms.js | 1 - node_modules/lodash/fp/conformsTo.js | 5 - node_modules/lodash/fp/constant.js | 5 - node_modules/lodash/fp/contains.js | 1 - node_modules/lodash/fp/convert.js | 18 - node_modules/lodash/fp/countBy.js | 5 - node_modules/lodash/fp/create.js | 5 - node_modules/lodash/fp/curry.js | 5 - node_modules/lodash/fp/curryN.js | 5 - node_modules/lodash/fp/curryRight.js | 5 - node_modules/lodash/fp/curryRightN.js | 5 - node_modules/lodash/fp/date.js | 2 - node_modules/lodash/fp/debounce.js | 5 - node_modules/lodash/fp/deburr.js | 5 - node_modules/lodash/fp/defaultTo.js | 5 - node_modules/lodash/fp/defaults.js | 5 - node_modules/lodash/fp/defaultsAll.js | 5 - node_modules/lodash/fp/defaultsDeep.js | 5 - node_modules/lodash/fp/defaultsDeepAll.js | 5 - node_modules/lodash/fp/defer.js | 5 - node_modules/lodash/fp/delay.js | 5 - node_modules/lodash/fp/difference.js | 5 - node_modules/lodash/fp/differenceBy.js | 5 - node_modules/lodash/fp/differenceWith.js | 5 - node_modules/lodash/fp/dissoc.js | 1 - node_modules/lodash/fp/dissocPath.js | 1 - node_modules/lodash/fp/divide.js | 5 - node_modules/lodash/fp/drop.js | 5 - node_modules/lodash/fp/dropLast.js | 1 - node_modules/lodash/fp/dropLastWhile.js | 1 - node_modules/lodash/fp/dropRight.js | 5 - node_modules/lodash/fp/dropRightWhile.js | 5 - node_modules/lodash/fp/dropWhile.js | 5 - node_modules/lodash/fp/each.js | 1 - node_modules/lodash/fp/eachRight.js | 1 - node_modules/lodash/fp/endsWith.js | 5 - node_modules/lodash/fp/entries.js | 1 - node_modules/lodash/fp/entriesIn.js | 1 - node_modules/lodash/fp/eq.js | 5 - node_modules/lodash/fp/equals.js | 1 - node_modules/lodash/fp/escape.js | 5 - node_modules/lodash/fp/escapeRegExp.js | 5 - node_modules/lodash/fp/every.js | 5 - node_modules/lodash/fp/extend.js | 1 - node_modules/lodash/fp/extendAll.js | 1 - node_modules/lodash/fp/extendAllWith.js | 1 - node_modules/lodash/fp/extendWith.js | 1 - node_modules/lodash/fp/fill.js | 5 - node_modules/lodash/fp/filter.js | 5 - node_modules/lodash/fp/find.js | 5 - node_modules/lodash/fp/findFrom.js | 5 - node_modules/lodash/fp/findIndex.js | 5 - node_modules/lodash/fp/findIndexFrom.js | 5 - node_modules/lodash/fp/findKey.js | 5 - node_modules/lodash/fp/findLast.js | 5 - node_modules/lodash/fp/findLastFrom.js | 5 - node_modules/lodash/fp/findLastIndex.js | 5 - node_modules/lodash/fp/findLastIndexFrom.js | 5 - node_modules/lodash/fp/findLastKey.js | 5 - node_modules/lodash/fp/first.js | 1 - node_modules/lodash/fp/flatMap.js | 5 - node_modules/lodash/fp/flatMapDeep.js | 5 - node_modules/lodash/fp/flatMapDepth.js | 5 - node_modules/lodash/fp/flatten.js | 5 - node_modules/lodash/fp/flattenDeep.js | 5 - node_modules/lodash/fp/flattenDepth.js | 5 - node_modules/lodash/fp/flip.js | 5 - node_modules/lodash/fp/floor.js | 5 - node_modules/lodash/fp/flow.js | 5 - node_modules/lodash/fp/flowRight.js | 5 - node_modules/lodash/fp/forEach.js | 5 - node_modules/lodash/fp/forEachRight.js | 5 - node_modules/lodash/fp/forIn.js | 5 - node_modules/lodash/fp/forInRight.js | 5 - node_modules/lodash/fp/forOwn.js | 5 - node_modules/lodash/fp/forOwnRight.js | 5 - node_modules/lodash/fp/fromPairs.js | 5 - node_modules/lodash/fp/function.js | 2 - node_modules/lodash/fp/functions.js | 5 - node_modules/lodash/fp/functionsIn.js | 5 - node_modules/lodash/fp/get.js | 5 - node_modules/lodash/fp/getOr.js | 5 - node_modules/lodash/fp/groupBy.js | 5 - node_modules/lodash/fp/gt.js | 5 - node_modules/lodash/fp/gte.js | 5 - node_modules/lodash/fp/has.js | 5 - node_modules/lodash/fp/hasIn.js | 5 - node_modules/lodash/fp/head.js | 5 - node_modules/lodash/fp/identical.js | 1 - node_modules/lodash/fp/identity.js | 5 - node_modules/lodash/fp/inRange.js | 5 - node_modules/lodash/fp/includes.js | 5 - node_modules/lodash/fp/includesFrom.js | 5 - node_modules/lodash/fp/indexBy.js | 1 - node_modules/lodash/fp/indexOf.js | 5 - node_modules/lodash/fp/indexOfFrom.js | 5 - node_modules/lodash/fp/init.js | 1 - node_modules/lodash/fp/initial.js | 5 - node_modules/lodash/fp/intersection.js | 5 - node_modules/lodash/fp/intersectionBy.js | 5 - node_modules/lodash/fp/intersectionWith.js | 5 - node_modules/lodash/fp/invert.js | 5 - node_modules/lodash/fp/invertBy.js | 5 - node_modules/lodash/fp/invertObj.js | 1 - node_modules/lodash/fp/invoke.js | 5 - node_modules/lodash/fp/invokeArgs.js | 5 - node_modules/lodash/fp/invokeArgsMap.js | 5 - node_modules/lodash/fp/invokeMap.js | 5 - node_modules/lodash/fp/isArguments.js | 5 - node_modules/lodash/fp/isArray.js | 5 - node_modules/lodash/fp/isArrayBuffer.js | 5 - node_modules/lodash/fp/isArrayLike.js | 5 - node_modules/lodash/fp/isArrayLikeObject.js | 5 - node_modules/lodash/fp/isBoolean.js | 5 - node_modules/lodash/fp/isBuffer.js | 5 - node_modules/lodash/fp/isDate.js | 5 - node_modules/lodash/fp/isElement.js | 5 - node_modules/lodash/fp/isEmpty.js | 5 - node_modules/lodash/fp/isEqual.js | 5 - node_modules/lodash/fp/isEqualWith.js | 5 - node_modules/lodash/fp/isError.js | 5 - node_modules/lodash/fp/isFinite.js | 5 - node_modules/lodash/fp/isFunction.js | 5 - node_modules/lodash/fp/isInteger.js | 5 - node_modules/lodash/fp/isLength.js | 5 - node_modules/lodash/fp/isMap.js | 5 - node_modules/lodash/fp/isMatch.js | 5 - node_modules/lodash/fp/isMatchWith.js | 5 - node_modules/lodash/fp/isNaN.js | 5 - node_modules/lodash/fp/isNative.js | 5 - node_modules/lodash/fp/isNil.js | 5 - node_modules/lodash/fp/isNull.js | 5 - node_modules/lodash/fp/isNumber.js | 5 - node_modules/lodash/fp/isObject.js | 5 - node_modules/lodash/fp/isObjectLike.js | 5 - node_modules/lodash/fp/isPlainObject.js | 5 - node_modules/lodash/fp/isRegExp.js | 5 - node_modules/lodash/fp/isSafeInteger.js | 5 - node_modules/lodash/fp/isSet.js | 5 - node_modules/lodash/fp/isString.js | 5 - node_modules/lodash/fp/isSymbol.js | 5 - node_modules/lodash/fp/isTypedArray.js | 5 - node_modules/lodash/fp/isUndefined.js | 5 - node_modules/lodash/fp/isWeakMap.js | 5 - node_modules/lodash/fp/isWeakSet.js | 5 - node_modules/lodash/fp/iteratee.js | 5 - node_modules/lodash/fp/join.js | 5 - node_modules/lodash/fp/juxt.js | 1 - node_modules/lodash/fp/kebabCase.js | 5 - node_modules/lodash/fp/keyBy.js | 5 - node_modules/lodash/fp/keys.js | 5 - node_modules/lodash/fp/keysIn.js | 5 - node_modules/lodash/fp/lang.js | 2 - node_modules/lodash/fp/last.js | 5 - node_modules/lodash/fp/lastIndexOf.js | 5 - node_modules/lodash/fp/lastIndexOfFrom.js | 5 - node_modules/lodash/fp/lowerCase.js | 5 - node_modules/lodash/fp/lowerFirst.js | 5 - node_modules/lodash/fp/lt.js | 5 - node_modules/lodash/fp/lte.js | 5 - node_modules/lodash/fp/map.js | 5 - node_modules/lodash/fp/mapKeys.js | 5 - node_modules/lodash/fp/mapValues.js | 5 - node_modules/lodash/fp/matches.js | 1 - node_modules/lodash/fp/matchesProperty.js | 5 - node_modules/lodash/fp/math.js | 2 - node_modules/lodash/fp/max.js | 5 - node_modules/lodash/fp/maxBy.js | 5 - node_modules/lodash/fp/mean.js | 5 - node_modules/lodash/fp/meanBy.js | 5 - node_modules/lodash/fp/memoize.js | 5 - node_modules/lodash/fp/merge.js | 5 - node_modules/lodash/fp/mergeAll.js | 5 - node_modules/lodash/fp/mergeAllWith.js | 5 - node_modules/lodash/fp/mergeWith.js | 5 - node_modules/lodash/fp/method.js | 5 - node_modules/lodash/fp/methodOf.js | 5 - node_modules/lodash/fp/min.js | 5 - node_modules/lodash/fp/minBy.js | 5 - node_modules/lodash/fp/mixin.js | 5 - node_modules/lodash/fp/multiply.js | 5 - node_modules/lodash/fp/nAry.js | 1 - node_modules/lodash/fp/negate.js | 5 - node_modules/lodash/fp/next.js | 5 - node_modules/lodash/fp/noop.js | 5 - node_modules/lodash/fp/now.js | 5 - node_modules/lodash/fp/nth.js | 5 - node_modules/lodash/fp/nthArg.js | 5 - node_modules/lodash/fp/number.js | 2 - node_modules/lodash/fp/object.js | 2 - node_modules/lodash/fp/omit.js | 5 - node_modules/lodash/fp/omitAll.js | 1 - node_modules/lodash/fp/omitBy.js | 5 - node_modules/lodash/fp/once.js | 5 - node_modules/lodash/fp/orderBy.js | 5 - node_modules/lodash/fp/over.js | 5 - node_modules/lodash/fp/overArgs.js | 5 - node_modules/lodash/fp/overEvery.js | 5 - node_modules/lodash/fp/overSome.js | 5 - node_modules/lodash/fp/pad.js | 5 - node_modules/lodash/fp/padChars.js | 5 - node_modules/lodash/fp/padCharsEnd.js | 5 - node_modules/lodash/fp/padCharsStart.js | 5 - node_modules/lodash/fp/padEnd.js | 5 - node_modules/lodash/fp/padStart.js | 5 - node_modules/lodash/fp/parseInt.js | 5 - node_modules/lodash/fp/partial.js | 5 - node_modules/lodash/fp/partialRight.js | 5 - node_modules/lodash/fp/partition.js | 5 - node_modules/lodash/fp/path.js | 1 - node_modules/lodash/fp/pathEq.js | 1 - node_modules/lodash/fp/pathOr.js | 1 - node_modules/lodash/fp/paths.js | 1 - node_modules/lodash/fp/pick.js | 5 - node_modules/lodash/fp/pickAll.js | 1 - node_modules/lodash/fp/pickBy.js | 5 - node_modules/lodash/fp/pipe.js | 1 - node_modules/lodash/fp/placeholder.js | 6 - node_modules/lodash/fp/plant.js | 5 - node_modules/lodash/fp/pluck.js | 1 - node_modules/lodash/fp/prop.js | 1 - node_modules/lodash/fp/propEq.js | 1 - node_modules/lodash/fp/propOr.js | 1 - node_modules/lodash/fp/property.js | 1 - node_modules/lodash/fp/propertyOf.js | 5 - node_modules/lodash/fp/props.js | 1 - node_modules/lodash/fp/pull.js | 5 - node_modules/lodash/fp/pullAll.js | 5 - node_modules/lodash/fp/pullAllBy.js | 5 - node_modules/lodash/fp/pullAllWith.js | 5 - node_modules/lodash/fp/pullAt.js | 5 - node_modules/lodash/fp/random.js | 5 - node_modules/lodash/fp/range.js | 5 - node_modules/lodash/fp/rangeRight.js | 5 - node_modules/lodash/fp/rangeStep.js | 5 - node_modules/lodash/fp/rangeStepRight.js | 5 - node_modules/lodash/fp/rearg.js | 5 - node_modules/lodash/fp/reduce.js | 5 - node_modules/lodash/fp/reduceRight.js | 5 - node_modules/lodash/fp/reject.js | 5 - node_modules/lodash/fp/remove.js | 5 - node_modules/lodash/fp/repeat.js | 5 - node_modules/lodash/fp/replace.js | 5 - node_modules/lodash/fp/rest.js | 5 - node_modules/lodash/fp/restFrom.js | 5 - node_modules/lodash/fp/result.js | 5 - node_modules/lodash/fp/reverse.js | 5 - node_modules/lodash/fp/round.js | 5 - node_modules/lodash/fp/sample.js | 5 - node_modules/lodash/fp/sampleSize.js | 5 - node_modules/lodash/fp/seq.js | 2 - node_modules/lodash/fp/set.js | 5 - node_modules/lodash/fp/setWith.js | 5 - node_modules/lodash/fp/shuffle.js | 5 - node_modules/lodash/fp/size.js | 5 - node_modules/lodash/fp/slice.js | 5 - node_modules/lodash/fp/snakeCase.js | 5 - node_modules/lodash/fp/some.js | 5 - node_modules/lodash/fp/sortBy.js | 5 - node_modules/lodash/fp/sortedIndex.js | 5 - node_modules/lodash/fp/sortedIndexBy.js | 5 - node_modules/lodash/fp/sortedIndexOf.js | 5 - node_modules/lodash/fp/sortedLastIndex.js | 5 - node_modules/lodash/fp/sortedLastIndexBy.js | 5 - node_modules/lodash/fp/sortedLastIndexOf.js | 5 - node_modules/lodash/fp/sortedUniq.js | 5 - node_modules/lodash/fp/sortedUniqBy.js | 5 - node_modules/lodash/fp/split.js | 5 - node_modules/lodash/fp/spread.js | 5 - node_modules/lodash/fp/spreadFrom.js | 5 - node_modules/lodash/fp/startCase.js | 5 - node_modules/lodash/fp/startsWith.js | 5 - node_modules/lodash/fp/string.js | 2 - node_modules/lodash/fp/stubArray.js | 5 - node_modules/lodash/fp/stubFalse.js | 5 - node_modules/lodash/fp/stubObject.js | 5 - node_modules/lodash/fp/stubString.js | 5 - node_modules/lodash/fp/stubTrue.js | 5 - node_modules/lodash/fp/subtract.js | 5 - node_modules/lodash/fp/sum.js | 5 - node_modules/lodash/fp/sumBy.js | 5 - node_modules/lodash/fp/symmetricDifference.js | 1 - .../lodash/fp/symmetricDifferenceBy.js | 1 - .../lodash/fp/symmetricDifferenceWith.js | 1 - node_modules/lodash/fp/tail.js | 5 - node_modules/lodash/fp/take.js | 5 - node_modules/lodash/fp/takeLast.js | 1 - node_modules/lodash/fp/takeLastWhile.js | 1 - node_modules/lodash/fp/takeRight.js | 5 - node_modules/lodash/fp/takeRightWhile.js | 5 - node_modules/lodash/fp/takeWhile.js | 5 - node_modules/lodash/fp/tap.js | 5 - node_modules/lodash/fp/template.js | 5 - node_modules/lodash/fp/templateSettings.js | 5 - node_modules/lodash/fp/throttle.js | 5 - node_modules/lodash/fp/thru.js | 5 - node_modules/lodash/fp/times.js | 5 - node_modules/lodash/fp/toArray.js | 5 - node_modules/lodash/fp/toFinite.js | 5 - node_modules/lodash/fp/toInteger.js | 5 - node_modules/lodash/fp/toIterator.js | 5 - node_modules/lodash/fp/toJSON.js | 5 - node_modules/lodash/fp/toLength.js | 5 - node_modules/lodash/fp/toLower.js | 5 - node_modules/lodash/fp/toNumber.js | 5 - node_modules/lodash/fp/toPairs.js | 5 - node_modules/lodash/fp/toPairsIn.js | 5 - node_modules/lodash/fp/toPath.js | 5 - node_modules/lodash/fp/toPlainObject.js | 5 - node_modules/lodash/fp/toSafeInteger.js | 5 - node_modules/lodash/fp/toString.js | 5 - node_modules/lodash/fp/toUpper.js | 5 - node_modules/lodash/fp/transform.js | 5 - node_modules/lodash/fp/trim.js | 5 - node_modules/lodash/fp/trimChars.js | 5 - node_modules/lodash/fp/trimCharsEnd.js | 5 - node_modules/lodash/fp/trimCharsStart.js | 5 - node_modules/lodash/fp/trimEnd.js | 5 - node_modules/lodash/fp/trimStart.js | 5 - node_modules/lodash/fp/truncate.js | 5 - node_modules/lodash/fp/unapply.js | 1 - node_modules/lodash/fp/unary.js | 5 - node_modules/lodash/fp/unescape.js | 5 - node_modules/lodash/fp/union.js | 5 - node_modules/lodash/fp/unionBy.js | 5 - node_modules/lodash/fp/unionWith.js | 5 - node_modules/lodash/fp/uniq.js | 5 - node_modules/lodash/fp/uniqBy.js | 5 - node_modules/lodash/fp/uniqWith.js | 5 - node_modules/lodash/fp/uniqueId.js | 5 - node_modules/lodash/fp/unnest.js | 1 - node_modules/lodash/fp/unset.js | 5 - node_modules/lodash/fp/unzip.js | 5 - node_modules/lodash/fp/unzipWith.js | 5 - node_modules/lodash/fp/update.js | 5 - node_modules/lodash/fp/updateWith.js | 5 - node_modules/lodash/fp/upperCase.js | 5 - node_modules/lodash/fp/upperFirst.js | 5 - node_modules/lodash/fp/useWith.js | 1 - node_modules/lodash/fp/util.js | 2 - node_modules/lodash/fp/value.js | 5 - node_modules/lodash/fp/valueOf.js | 5 - node_modules/lodash/fp/values.js | 5 - node_modules/lodash/fp/valuesIn.js | 5 - node_modules/lodash/fp/where.js | 1 - node_modules/lodash/fp/whereEq.js | 1 - node_modules/lodash/fp/without.js | 5 - node_modules/lodash/fp/words.js | 5 - node_modules/lodash/fp/wrap.js | 5 - node_modules/lodash/fp/wrapperAt.js | 5 - node_modules/lodash/fp/wrapperChain.js | 5 - node_modules/lodash/fp/wrapperLodash.js | 5 - node_modules/lodash/fp/wrapperReverse.js | 5 - node_modules/lodash/fp/wrapperValue.js | 5 - node_modules/lodash/fp/xor.js | 5 - node_modules/lodash/fp/xorBy.js | 5 - node_modules/lodash/fp/xorWith.js | 5 - node_modules/lodash/fp/zip.js | 5 - node_modules/lodash/fp/zipAll.js | 5 - node_modules/lodash/fp/zipObj.js | 1 - node_modules/lodash/fp/zipObject.js | 5 - node_modules/lodash/fp/zipObjectDeep.js | 5 - node_modules/lodash/fp/zipWith.js | 5 - node_modules/lodash/fromPairs.js | 28 - node_modules/lodash/function.js | 25 - node_modules/lodash/functions.js | 31 - node_modules/lodash/functionsIn.js | 31 - node_modules/lodash/get.js | 33 - node_modules/lodash/groupBy.js | 41 - node_modules/lodash/gt.js | 29 - node_modules/lodash/gte.js | 30 - node_modules/lodash/has.js | 35 - node_modules/lodash/hasIn.js | 34 - node_modules/lodash/head.js | 23 - node_modules/lodash/identity.js | 21 - node_modules/lodash/inRange.js | 55 - node_modules/lodash/includes.js | 53 - node_modules/lodash/index.js | 1 - node_modules/lodash/indexOf.js | 42 - node_modules/lodash/initial.js | 22 - node_modules/lodash/intersection.js | 30 - node_modules/lodash/intersectionBy.js | 45 - node_modules/lodash/intersectionWith.js | 41 - node_modules/lodash/invert.js | 42 - node_modules/lodash/invertBy.js | 56 - node_modules/lodash/invoke.js | 24 - node_modules/lodash/invokeMap.js | 41 - node_modules/lodash/isArguments.js | 36 - node_modules/lodash/isArray.js | 26 - node_modules/lodash/isArrayBuffer.js | 27 - node_modules/lodash/isArrayLike.js | 33 - node_modules/lodash/isArrayLikeObject.js | 33 - node_modules/lodash/isBoolean.js | 29 - node_modules/lodash/isBuffer.js | 38 - node_modules/lodash/isDate.js | 27 - node_modules/lodash/isElement.js | 25 - node_modules/lodash/isEmpty.js | 77 - node_modules/lodash/isEqual.js | 35 - node_modules/lodash/isEqualWith.js | 41 - node_modules/lodash/isError.js | 36 - node_modules/lodash/isFinite.js | 36 - node_modules/lodash/isFunction.js | 37 - node_modules/lodash/isInteger.js | 33 - node_modules/lodash/isLength.js | 35 - node_modules/lodash/isMap.js | 27 - node_modules/lodash/isMatch.js | 36 - node_modules/lodash/isMatchWith.js | 41 - node_modules/lodash/isNaN.js | 38 - node_modules/lodash/isNative.js | 40 - node_modules/lodash/isNil.js | 25 - node_modules/lodash/isNull.js | 22 - node_modules/lodash/isNumber.js | 38 - node_modules/lodash/isObject.js | 31 - node_modules/lodash/isObjectLike.js | 29 - node_modules/lodash/isPlainObject.js | 62 - node_modules/lodash/isRegExp.js | 27 - node_modules/lodash/isSafeInteger.js | 37 - node_modules/lodash/isSet.js | 27 - node_modules/lodash/isString.js | 30 - node_modules/lodash/isSymbol.js | 29 - node_modules/lodash/isTypedArray.js | 27 - node_modules/lodash/isUndefined.js | 22 - node_modules/lodash/isWeakMap.js | 28 - node_modules/lodash/isWeakSet.js | 28 - node_modules/lodash/iteratee.js | 53 - node_modules/lodash/join.js | 26 - node_modules/lodash/kebabCase.js | 28 - node_modules/lodash/keyBy.js | 36 - node_modules/lodash/keys.js | 37 - node_modules/lodash/keysIn.js | 32 - node_modules/lodash/lang.js | 58 - node_modules/lodash/last.js | 20 - node_modules/lodash/lastIndexOf.js | 46 - node_modules/lodash/lodash.js | 17112 ------ node_modules/lodash/lodash.min.js | 137 - node_modules/lodash/lowerCase.js | 27 - node_modules/lodash/lowerFirst.js | 22 - node_modules/lodash/lt.js | 29 - node_modules/lodash/lte.js | 30 - node_modules/lodash/map.js | 53 - node_modules/lodash/mapKeys.js | 36 - node_modules/lodash/mapValues.js | 43 - node_modules/lodash/matches.js | 39 - node_modules/lodash/matchesProperty.js | 37 - node_modules/lodash/math.js | 17 - node_modules/lodash/max.js | 29 - node_modules/lodash/maxBy.js | 34 - node_modules/lodash/mean.js | 22 - node_modules/lodash/meanBy.js | 31 - node_modules/lodash/memoize.js | 73 - node_modules/lodash/merge.js | 39 - node_modules/lodash/mergeWith.js | 39 - node_modules/lodash/method.js | 34 - node_modules/lodash/methodOf.js | 33 - node_modules/lodash/min.js | 29 - node_modules/lodash/minBy.js | 34 - node_modules/lodash/mixin.js | 74 - node_modules/lodash/multiply.js | 22 - node_modules/lodash/negate.js | 40 - node_modules/lodash/next.js | 35 - node_modules/lodash/noop.js | 17 - node_modules/lodash/now.js | 23 - node_modules/lodash/nth.js | 29 - node_modules/lodash/nthArg.js | 32 - node_modules/lodash/number.js | 5 - node_modules/lodash/object.js | 49 - node_modules/lodash/omit.js | 57 - node_modules/lodash/omitBy.js | 29 - node_modules/lodash/once.js | 25 - node_modules/lodash/orderBy.js | 47 - node_modules/lodash/over.js | 24 - node_modules/lodash/overArgs.js | 61 - node_modules/lodash/overEvery.js | 30 - node_modules/lodash/overSome.js | 30 - node_modules/lodash/package.json | 71 - node_modules/lodash/pad.js | 49 - node_modules/lodash/padEnd.js | 39 - node_modules/lodash/padStart.js | 39 - node_modules/lodash/parseInt.js | 43 - node_modules/lodash/partial.js | 50 - node_modules/lodash/partialRight.js | 49 - node_modules/lodash/partition.js | 43 - node_modules/lodash/pick.js | 25 - node_modules/lodash/pickBy.js | 37 - node_modules/lodash/plant.js | 48 - node_modules/lodash/property.js | 32 - node_modules/lodash/propertyOf.js | 30 - node_modules/lodash/pull.js | 29 - node_modules/lodash/pullAll.js | 29 - node_modules/lodash/pullAllBy.js | 33 - node_modules/lodash/pullAllWith.js | 32 - node_modules/lodash/pullAt.js | 43 - node_modules/lodash/random.js | 82 - node_modules/lodash/range.js | 46 - node_modules/lodash/rangeRight.js | 41 - node_modules/lodash/rearg.js | 33 - node_modules/lodash/reduce.js | 51 - node_modules/lodash/reduceRight.js | 36 - node_modules/lodash/reject.js | 46 - node_modules/lodash/remove.js | 53 - node_modules/lodash/repeat.js | 37 - node_modules/lodash/replace.js | 29 - node_modules/lodash/rest.js | 40 - node_modules/lodash/result.js | 56 - node_modules/lodash/reverse.js | 34 - node_modules/lodash/round.js | 26 - node_modules/lodash/sample.js | 24 - node_modules/lodash/sampleSize.js | 37 - node_modules/lodash/seq.js | 16 - node_modules/lodash/set.js | 35 - node_modules/lodash/setWith.js | 32 - node_modules/lodash/shuffle.js | 25 - node_modules/lodash/size.js | 46 - node_modules/lodash/slice.js | 37 - node_modules/lodash/snakeCase.js | 28 - node_modules/lodash/some.js | 51 - node_modules/lodash/sortBy.js | 48 - node_modules/lodash/sortedIndex.js | 24 - node_modules/lodash/sortedIndexBy.js | 33 - node_modules/lodash/sortedIndexOf.js | 31 - node_modules/lodash/sortedLastIndex.js | 25 - node_modules/lodash/sortedLastIndexBy.js | 33 - node_modules/lodash/sortedLastIndexOf.js | 31 - node_modules/lodash/sortedUniq.js | 24 - node_modules/lodash/sortedUniqBy.js | 26 - node_modules/lodash/split.js | 52 - node_modules/lodash/spread.js | 63 - node_modules/lodash/startCase.js | 29 - node_modules/lodash/startsWith.js | 39 - node_modules/lodash/string.js | 33 - node_modules/lodash/stubArray.js | 23 - node_modules/lodash/stubFalse.js | 18 - node_modules/lodash/stubObject.js | 23 - node_modules/lodash/stubString.js | 18 - node_modules/lodash/stubTrue.js | 18 - node_modules/lodash/subtract.js | 22 - node_modules/lodash/sum.js | 24 - node_modules/lodash/sumBy.js | 33 - node_modules/lodash/tail.js | 22 - node_modules/lodash/take.js | 37 - node_modules/lodash/takeRight.js | 39 - node_modules/lodash/takeRightWhile.js | 45 - node_modules/lodash/takeWhile.js | 45 - node_modules/lodash/tap.js | 29 - node_modules/lodash/template.js | 253 - node_modules/lodash/templateSettings.js | 67 - node_modules/lodash/throttle.js | 69 - node_modules/lodash/thru.js | 28 - node_modules/lodash/times.js | 51 - node_modules/lodash/toArray.js | 58 - node_modules/lodash/toFinite.js | 42 - node_modules/lodash/toInteger.js | 36 - node_modules/lodash/toIterator.js | 23 - node_modules/lodash/toJSON.js | 1 - node_modules/lodash/toLength.js | 38 - node_modules/lodash/toLower.js | 28 - node_modules/lodash/toNumber.js | 66 - node_modules/lodash/toPairs.js | 30 - node_modules/lodash/toPairsIn.js | 30 - node_modules/lodash/toPath.js | 33 - node_modules/lodash/toPlainObject.js | 32 - node_modules/lodash/toSafeInteger.js | 37 - node_modules/lodash/toString.js | 28 - node_modules/lodash/toUpper.js | 28 - node_modules/lodash/transform.js | 65 - node_modules/lodash/trim.js | 49 - node_modules/lodash/trimEnd.js | 43 - node_modules/lodash/trimStart.js | 43 - node_modules/lodash/truncate.js | 111 - node_modules/lodash/unary.js | 22 - node_modules/lodash/unescape.js | 34 - node_modules/lodash/union.js | 26 - node_modules/lodash/unionBy.js | 39 - node_modules/lodash/unionWith.js | 34 - node_modules/lodash/uniq.js | 25 - node_modules/lodash/uniqBy.js | 31 - node_modules/lodash/uniqWith.js | 28 - node_modules/lodash/uniqueId.js | 28 - node_modules/lodash/unset.js | 34 - node_modules/lodash/unzip.js | 45 - node_modules/lodash/unzipWith.js | 39 - node_modules/lodash/update.js | 35 - node_modules/lodash/updateWith.js | 33 - node_modules/lodash/upperCase.js | 27 - node_modules/lodash/upperFirst.js | 22 - node_modules/lodash/util.js | 34 - node_modules/lodash/value.js | 1 - node_modules/lodash/valueOf.js | 1 - node_modules/lodash/values.js | 34 - node_modules/lodash/valuesIn.js | 32 - node_modules/lodash/without.js | 31 - node_modules/lodash/words.js | 35 - node_modules/lodash/wrap.js | 30 - node_modules/lodash/wrapperAt.js | 48 - node_modules/lodash/wrapperChain.js | 34 - node_modules/lodash/wrapperLodash.js | 147 - node_modules/lodash/wrapperReverse.js | 44 - node_modules/lodash/wrapperValue.js | 21 - node_modules/lodash/xor.js | 28 - node_modules/lodash/xorBy.js | 39 - node_modules/lodash/xorWith.js | 34 - node_modules/lodash/zip.js | 22 - node_modules/lodash/zipObject.js | 24 - node_modules/lodash/zipObjectDeep.js | 23 - node_modules/lodash/zipWith.js | 32 - node_modules/loose-envify/LICENSE | 21 - node_modules/loose-envify/README.md | 45 - node_modules/loose-envify/cli.js | 16 - node_modules/loose-envify/custom.js | 4 - node_modules/loose-envify/index.js | 3 - node_modules/loose-envify/loose-envify.js | 36 - node_modules/loose-envify/package.json | 71 - node_modules/loose-envify/replace.js | 65 - node_modules/make-dir/index.d.ts | 39 - node_modules/make-dir/index.js | 139 - node_modules/make-dir/license | 9 - .../make-dir/node_modules/.bin/semver | 15 - .../make-dir/node_modules/.bin/semver.cmd | 7 - .../make-dir/node_modules/pify/index.js | 68 - .../make-dir/node_modules/pify/license | 9 - .../make-dir/node_modules/pify/package.json | 87 - .../make-dir/node_modules/pify/readme.md | 145 - .../make-dir/node_modules/semver/CHANGELOG.md | 39 - .../make-dir/node_modules/semver/LICENSE | 15 - .../make-dir/node_modules/semver/README.md | 412 - .../make-dir/node_modules/semver/bin/semver | 160 - .../make-dir/node_modules/semver/package.json | 64 - .../make-dir/node_modules/semver/range.bnf | 16 - .../make-dir/node_modules/semver/semver.js | 1483 - node_modules/make-dir/package.json | 96 - node_modules/make-dir/readme.md | 123 - node_modules/make-error/LICENSE | 5 - node_modules/make-error/README.md | 111 - node_modules/make-error/dist/make-error.js | 1 - node_modules/make-error/index.d.ts | 40 - node_modules/make-error/index.js | 147 - node_modules/make-error/package.json | 84 - node_modules/makeerror/.travis.yml | 3 - node_modules/makeerror/lib/makeerror.js | 87 - node_modules/makeerror/license | 28 - node_modules/makeerror/package.json | 57 - node_modules/makeerror/readme.md | 77 - node_modules/map-cache/LICENSE | 21 - node_modules/map-cache/README.md | 145 - node_modules/map-cache/index.js | 100 - node_modules/map-cache/package.json | 95 - node_modules/map-visit/LICENSE | 21 - node_modules/map-visit/README.md | 155 - node_modules/map-visit/index.js | 37 - node_modules/map-visit/package.json | 117 - node_modules/merge-stream/LICENSE | 21 - node_modules/merge-stream/README.md | 78 - node_modules/merge-stream/index.js | 41 - node_modules/merge-stream/package.json | 58 - node_modules/micromatch/CHANGELOG.md | 37 - node_modules/micromatch/LICENSE | 21 - node_modules/micromatch/README.md | 1150 - node_modules/micromatch/index.js | 877 - node_modules/micromatch/lib/.DS_Store | Bin 6148 -> 0 bytes node_modules/micromatch/lib/cache.js | 1 - node_modules/micromatch/lib/compilers.js | 77 - node_modules/micromatch/lib/parsers.js | 83 - node_modules/micromatch/lib/utils.js | 309 - node_modules/micromatch/package.json | 226 - node_modules/mime-db/HISTORY.md | 417 - node_modules/mime-db/LICENSE | 22 - node_modules/mime-db/README.md | 94 - node_modules/mime-db/db.json | 7834 --- node_modules/mime-db/index.js | 11 - node_modules/mime-db/package.json | 105 - node_modules/mime-types/HISTORY.md | 308 - node_modules/mime-types/LICENSE | 23 - node_modules/mime-types/README.md | 113 - node_modules/mime-types/index.js | 188 - node_modules/mime-types/package.json | 91 - node_modules/minimatch/LICENSE | 15 - node_modules/minimatch/README.md | 209 - node_modules/minimatch/minimatch.js | 923 - node_modules/minimatch/package.json | 68 - node_modules/minimist/.travis.yml | 8 - node_modules/minimist/LICENSE | 18 - node_modules/minimist/example/parse.js | 2 - node_modules/minimist/index.js | 236 - node_modules/minimist/package.json | 79 - node_modules/minimist/readme.markdown | 91 - node_modules/minimist/test/all_bool.js | 32 - node_modules/minimist/test/bool.js | 166 - node_modules/minimist/test/dash.js | 31 - node_modules/minimist/test/default_bool.js | 35 - node_modules/minimist/test/dotted.js | 22 - node_modules/minimist/test/kv_short.js | 16 - node_modules/minimist/test/long.js | 31 - node_modules/minimist/test/num.js | 36 - node_modules/minimist/test/parse.js | 197 - node_modules/minimist/test/parse_modified.js | 9 - node_modules/minimist/test/short.js | 67 - node_modules/minimist/test/stop_early.js | 15 - node_modules/minimist/test/unknown.js | 102 - node_modules/minimist/test/whitespace.js | 8 - node_modules/mixin-deep/LICENSE | 21 - node_modules/mixin-deep/README.md | 80 - node_modules/mixin-deep/index.js | 64 - .../node_modules/is-extendable/LICENSE | 21 - .../node_modules/is-extendable/README.md | 88 - .../node_modules/is-extendable/index.d.ts | 5 - .../node_modules/is-extendable/index.js | 14 - .../node_modules/is-extendable/package.json | 102 - node_modules/mixin-deep/package.json | 102 - node_modules/mkdirp/.travis.yml | 8 - node_modules/mkdirp/LICENSE | 21 - node_modules/mkdirp/bin/cmd.js | 33 - node_modules/mkdirp/bin/usage.txt | 12 - node_modules/mkdirp/examples/pow.js | 6 - node_modules/mkdirp/index.js | 98 - .../mkdirp/node_modules/minimist/.travis.yml | 4 - .../mkdirp/node_modules/minimist/LICENSE | 18 - .../node_modules/minimist/example/parse.js | 2 - .../mkdirp/node_modules/minimist/index.js | 187 - .../mkdirp/node_modules/minimist/package.json | 75 - .../node_modules/minimist/readme.markdown | 73 - .../mkdirp/node_modules/minimist/test/dash.js | 24 - .../minimist/test/default_bool.js | 20 - .../node_modules/minimist/test/dotted.js | 16 - .../mkdirp/node_modules/minimist/test/long.js | 31 - .../node_modules/minimist/test/parse.js | 318 - .../minimist/test/parse_modified.js | 9 - .../node_modules/minimist/test/short.js | 67 - .../node_modules/minimist/test/whitespace.js | 8 - node_modules/mkdirp/package.json | 68 - node_modules/mkdirp/readme.markdown | 100 - node_modules/mkdirp/test/chmod.js | 41 - node_modules/mkdirp/test/clobber.js | 38 - node_modules/mkdirp/test/mkdirp.js | 28 - node_modules/mkdirp/test/opts_fs.js | 29 - node_modules/mkdirp/test/opts_fs_sync.js | 27 - node_modules/mkdirp/test/perm.js | 32 - node_modules/mkdirp/test/perm_sync.js | 36 - node_modules/mkdirp/test/race.js | 37 - node_modules/mkdirp/test/rel.js | 32 - node_modules/mkdirp/test/return.js | 25 - node_modules/mkdirp/test/return_sync.js | 24 - node_modules/mkdirp/test/root.js | 19 - node_modules/mkdirp/test/sync.js | 32 - node_modules/mkdirp/test/umask.js | 28 - node_modules/mkdirp/test/umask_sync.js | 32 - node_modules/ms/index.js | 152 - node_modules/ms/license.md | 21 - node_modules/ms/package.json | 73 - node_modules/ms/readme.md | 51 - node_modules/nanomatch/CHANGELOG.md | 57 - node_modules/nanomatch/LICENSE | 21 - node_modules/nanomatch/README.md | 1148 - node_modules/nanomatch/index.js | 838 - node_modules/nanomatch/lib/cache.js | 1 - node_modules/nanomatch/lib/compilers.js | 339 - node_modules/nanomatch/lib/parsers.js | 386 - node_modules/nanomatch/lib/utils.js | 379 - node_modules/nanomatch/package.json | 175 - node_modules/natural-compare/README.md | 125 - node_modules/natural-compare/index.js | 57 - node_modules/natural-compare/package.json | 77 - node_modules/neo-async/LICENSE | 22 - node_modules/neo-async/README.md | 268 - node_modules/neo-async/all.js | 3 - node_modules/neo-async/allLimit.js | 3 - node_modules/neo-async/allSeries.js | 3 - node_modules/neo-async/angelFall.js | 3 - node_modules/neo-async/any.js | 3 - node_modules/neo-async/anyLimit.js | 3 - node_modules/neo-async/anySeries.js | 3 - node_modules/neo-async/apply.js | 3 - node_modules/neo-async/applyEach.js | 3 - node_modules/neo-async/applyEachSeries.js | 3 - node_modules/neo-async/async.js | 9182 ---- node_modules/neo-async/async.min.js | 80 - node_modules/neo-async/asyncify.js | 3 - node_modules/neo-async/auto.js | 3 - node_modules/neo-async/autoInject.js | 3 - node_modules/neo-async/cargo.js | 3 - node_modules/neo-async/compose.js | 3 - node_modules/neo-async/concat.js | 3 - node_modules/neo-async/concatLimit.js | 3 - node_modules/neo-async/concatSeries.js | 3 - node_modules/neo-async/constant.js | 3 - node_modules/neo-async/createLogger.js | 3 - node_modules/neo-async/detect.js | 3 - node_modules/neo-async/detectLimit.js | 3 - node_modules/neo-async/detectSeries.js | 3 - node_modules/neo-async/dir.js | 3 - node_modules/neo-async/doDuring.js | 3 - node_modules/neo-async/doUntil.js | 3 - node_modules/neo-async/doWhilst.js | 3 - node_modules/neo-async/during.js | 3 - node_modules/neo-async/each.js | 3 - node_modules/neo-async/eachLimit.js | 3 - node_modules/neo-async/eachOf.js | 3 - node_modules/neo-async/eachOfLimit.js | 3 - node_modules/neo-async/eachOfSeries.js | 3 - node_modules/neo-async/eachSeries.js | 3 - node_modules/neo-async/ensureAsync.js | 3 - node_modules/neo-async/every.js | 3 - node_modules/neo-async/everyLimit.js | 3 - node_modules/neo-async/everySeries.js | 3 - node_modules/neo-async/fast.js | 3 - node_modules/neo-async/filter.js | 3 - node_modules/neo-async/filterLimit.js | 3 - node_modules/neo-async/filterSeries.js | 3 - node_modules/neo-async/find.js | 3 - node_modules/neo-async/findLimit.js | 3 - node_modules/neo-async/findSeries.js | 3 - node_modules/neo-async/foldl.js | 3 - node_modules/neo-async/foldr.js | 3 - node_modules/neo-async/forEach.js | 3 - node_modules/neo-async/forEachLimit.js | 3 - node_modules/neo-async/forEachOf.js | 3 - node_modules/neo-async/forEachOfLimit.js | 3 - node_modules/neo-async/forEachOfSeries.js | 3 - node_modules/neo-async/forEachSeries.js | 3 - node_modules/neo-async/forever.js | 3 - node_modules/neo-async/groupBy.js | 3 - node_modules/neo-async/groupByLimit.js | 3 - node_modules/neo-async/groupBySeries.js | 3 - node_modules/neo-async/inject.js | 3 - node_modules/neo-async/iterator.js | 3 - node_modules/neo-async/log.js | 3 - node_modules/neo-async/map.js | 3 - node_modules/neo-async/mapLimit.js | 3 - node_modules/neo-async/mapSeries.js | 3 - node_modules/neo-async/mapValues.js | 3 - node_modules/neo-async/mapValuesLimit.js | 3 - node_modules/neo-async/mapValuesSeries.js | 3 - node_modules/neo-async/memoize.js | 3 - node_modules/neo-async/nextTick.js | 3 - node_modules/neo-async/omit.js | 3 - node_modules/neo-async/omitLimit.js | 3 - node_modules/neo-async/omitSeries.js | 3 - node_modules/neo-async/package.json | 90 - node_modules/neo-async/parallel.js | 3 - node_modules/neo-async/parallelLimit.js | 3 - node_modules/neo-async/pick.js | 3 - node_modules/neo-async/pickLimit.js | 3 - node_modules/neo-async/pickSeries.js | 3 - node_modules/neo-async/priorityQueue.js | 3 - node_modules/neo-async/queue.js | 3 - node_modules/neo-async/race.js | 3 - node_modules/neo-async/reduce.js | 3 - node_modules/neo-async/reduceRight.js | 3 - node_modules/neo-async/reflect.js | 3 - node_modules/neo-async/reflectAll.js | 3 - node_modules/neo-async/reject.js | 3 - node_modules/neo-async/rejectLimit.js | 3 - node_modules/neo-async/rejectSeries.js | 3 - node_modules/neo-async/retry.js | 3 - node_modules/neo-async/retryable.js | 3 - node_modules/neo-async/safe.js | 3 - node_modules/neo-async/select.js | 3 - node_modules/neo-async/selectLimit.js | 3 - node_modules/neo-async/selectSeries.js | 3 - node_modules/neo-async/seq.js | 3 - node_modules/neo-async/series.js | 3 - node_modules/neo-async/setImmediate.js | 3 - node_modules/neo-async/some.js | 3 - node_modules/neo-async/someLimit.js | 3 - node_modules/neo-async/someSeries.js | 3 - node_modules/neo-async/sortBy.js | 3 - node_modules/neo-async/sortByLimit.js | 3 - node_modules/neo-async/sortBySeries.js | 3 - node_modules/neo-async/timeout.js | 3 - node_modules/neo-async/times.js | 3 - node_modules/neo-async/timesLimit.js | 3 - node_modules/neo-async/timesSeries.js | 3 - node_modules/neo-async/transform.js | 3 - node_modules/neo-async/transformLimit.js | 3 - node_modules/neo-async/transformSeries.js | 3 - node_modules/neo-async/tryEach.js | 3 - node_modules/neo-async/unmemoize.js | 3 - node_modules/neo-async/until.js | 3 - node_modules/neo-async/waterfall.js | 3 - node_modules/neo-async/whilst.js | 3 - node_modules/neo-async/wrapSync.js | 3 - node_modules/nice-try/CHANGELOG.md | 21 - node_modules/nice-try/LICENSE | 21 - node_modules/nice-try/README.md | 32 - node_modules/nice-try/package.json | 65 - node_modules/nice-try/src/index.js | 12 - node_modules/node-int64/.npmignore | 3 - node_modules/node-int64/Int64.js | 268 - node_modules/node-int64/LICENSE | 19 - node_modules/node-int64/README.md | 78 - node_modules/node-int64/package.json | 63 - node_modules/node-int64/test.js | 120 - node_modules/node-modules-regexp/index.js | 2 - node_modules/node-modules-regexp/license | 21 - node_modules/node-modules-regexp/package.json | 80 - node_modules/node-modules-regexp/readme.md | 32 - node_modules/node-notifier/.prettierrc | 4 - node_modules/node-notifier/CHANGELOG.md | 286 - node_modules/node-notifier/LICENSE | 21 - node_modules/node-notifier/README.md | 457 - node_modules/node-notifier/index.js | 52 - node_modules/node-notifier/lib/checkGrowl.js | 24 - node_modules/node-notifier/lib/utils.js | 515 - .../node-notifier/node_modules/.bin/semver | 15 - .../node_modules/.bin/semver.cmd | 7 - .../node_modules/semver/CHANGELOG.md | 39 - .../node-notifier/node_modules/semver/LICENSE | 15 - .../node_modules/semver/README.md | 412 - .../node_modules/semver/bin/semver | 160 - .../node_modules/semver/package.json | 64 - .../node_modules/semver/range.bnf | 16 - .../node_modules/semver/semver.js | 1483 - .../node-notifier/notifiers/balloon.js | 156 - node_modules/node-notifier/notifiers/growl.js | 76 - .../notifiers/notificationcenter.js | 100 - .../node-notifier/notifiers/notifysend.js | 94 - .../node-notifier/notifiers/toaster.js | 100 - node_modules/node-notifier/package.json | 103 - .../terminal-notifier.app/Contents/Info.plist | 63 - .../Contents/MacOS/terminal-notifier | Bin 87688 -> 0 bytes .../terminal-notifier.app/Contents/PkgInfo | 1 - .../Contents/Resources/Terminal.icns | Bin 369386 -> 0 bytes .../Contents/Resources/en.lproj/Credits.rtf | 29 - .../Resources/en.lproj/InfoPlist.strings | Bin 92 -> 0 bytes .../Contents/Resources/en.lproj/MainMenu.nib | Bin 25790 -> 0 bytes .../node-notifier/vendor/notifu/notifu.exe | Bin 242176 -> 0 bytes .../node-notifier/vendor/notifu/notifu64.exe | Bin 293376 -> 0 bytes .../node-notifier/vendor/snoreToast/LICENSE | 165 - .../vendor/snoreToast/SnoreToast.exe | Bin 281600 -> 0 bytes .../vendor/terminal-notifier-LICENSE | 9 - node_modules/normalize-package-data/AUTHORS | 4 - node_modules/normalize-package-data/LICENSE | 30 - node_modules/normalize-package-data/README.md | 106 - .../lib/extract_description.js | 14 - .../normalize-package-data/lib/fixer.js | 418 - .../lib/make_warning.js | 23 - .../normalize-package-data/lib/normalize.js | 39 - .../normalize-package-data/lib/safe_format.js | 9 - .../normalize-package-data/lib/typos.json | 25 - .../lib/warning_messages.json | 30 - .../node_modules/.bin/semver | 15 - .../node_modules/.bin/semver.cmd | 7 - .../node_modules/semver/CHANGELOG.md | 39 - .../node_modules/semver/LICENSE | 15 - .../node_modules/semver/README.md | 412 - .../node_modules/semver/bin/semver | 160 - .../node_modules/semver/package.json | 64 - .../node_modules/semver/range.bnf | 16 - .../node_modules/semver/semver.js | 1483 - .../normalize-package-data/package.json | 82 - node_modules/normalize-path/LICENSE | 21 - node_modules/normalize-path/README.md | 92 - node_modules/normalize-path/index.js | 19 - node_modules/normalize-path/package.json | 121 - node_modules/npm-run-path/index.js | 39 - node_modules/npm-run-path/license | 21 - node_modules/npm-run-path/package.json | 81 - node_modules/npm-run-path/readme.md | 81 - node_modules/nwsapi/LICENSE | 22 - node_modules/nwsapi/README.md | 132 - node_modules/nwsapi/dist/lint.log | 0 node_modules/nwsapi/package.json | 72 - .../nwsapi/src/modules/nwsapi-jquery.js | 135 - .../nwsapi/src/modules/nwsapi-traversal.js | 90 - node_modules/nwsapi/src/nwsapi.js | 1817 - node_modules/oauth-sign/LICENSE | 55 - node_modules/oauth-sign/README.md | 11 - node_modules/oauth-sign/index.js | 146 - node_modules/oauth-sign/package.json | 60 - node_modules/object-copy/LICENSE | 21 - node_modules/object-copy/index.js | 174 - .../node_modules/define-property/LICENSE | 21 - .../node_modules/define-property/README.md | 77 - .../node_modules/define-property/index.js | 31 - .../node_modules/define-property/package.json | 86 - .../object-copy/node_modules/kind-of/LICENSE | 21 - .../node_modules/kind-of/README.md | 261 - .../object-copy/node_modules/kind-of/index.js | 116 - .../node_modules/kind-of/package.json | 143 - node_modules/object-copy/package.json | 85 - node_modules/object-inspect/.nycrc | 17 - node_modules/object-inspect/.travis.yml | 216 - node_modules/object-inspect/LICENSE | 18 - node_modules/object-inspect/example/all.js | 19 - .../object-inspect/example/circular.js | 4 - node_modules/object-inspect/example/fn.js | 3 - .../object-inspect/example/inspect.js | 7 - node_modules/object-inspect/index.js | 257 - node_modules/object-inspect/package.json | 88 - node_modules/object-inspect/readme.markdown | 61 - node_modules/object-inspect/test-core-js.js | 16 - node_modules/object-inspect/test/bigint.js | 30 - .../object-inspect/test/browser/dom.js | 15 - node_modules/object-inspect/test/circular.js | 9 - node_modules/object-inspect/test/deep.js | 9 - node_modules/object-inspect/test/element.js | 53 - node_modules/object-inspect/test/err.js | 29 - node_modules/object-inspect/test/fn.js | 28 - node_modules/object-inspect/test/has.js | 31 - node_modules/object-inspect/test/holes.js | 15 - node_modules/object-inspect/test/inspect.js | 8 - node_modules/object-inspect/test/lowbyte.js | 12 - node_modules/object-inspect/test/number.js | 12 - .../object-inspect/test/quoteStyle.js | 17 - node_modules/object-inspect/test/undef.js | 12 - node_modules/object-inspect/test/values.js | 136 - node_modules/object-inspect/util.inspect.js | 1 - node_modules/object-keys/.editorconfig | 13 - node_modules/object-keys/.eslintrc | 17 - node_modules/object-keys/.travis.yml | 277 - node_modules/object-keys/CHANGELOG.md | 232 - node_modules/object-keys/LICENSE | 21 - node_modules/object-keys/README.md | 76 - node_modules/object-keys/implementation.js | 122 - node_modules/object-keys/index.js | 32 - node_modules/object-keys/isArguments.js | 17 - node_modules/object-keys/package.json | 122 - node_modules/object-keys/test/index.js | 5 - node_modules/object-visit/LICENSE | 21 - node_modules/object-visit/README.md | 83 - node_modules/object-visit/index.js | 33 - node_modules/object-visit/package.json | 101 - .../.editorconfig | 13 - .../.eslintrc | 10 - .../.jscs.json | 176 - .../.npmignore | 28 - .../.travis.yml | 96 - .../CHANGELOG.md | 51 - .../object.getownpropertydescriptors/LICENSE | 22 - .../object.getownpropertydescriptors/Makefile | 61 - .../README.md | 99 - .../implementation.js | 44 - .../object.getownpropertydescriptors/index.js | 15 - .../package.json | 111 - .../polyfill.js | 7 - .../object.getownpropertydescriptors/shim.js | 14 - .../test/.eslintrc | 8 - .../test/index.js | 17 - .../test/shimmed.js | 35 - .../test/tests.js | 127 - node_modules/object.pick/LICENSE | 21 - node_modules/object.pick/README.md | 76 - node_modules/object.pick/index.js | 35 - node_modules/object.pick/package.json | 96 - node_modules/once/LICENSE | 15 - node_modules/once/README.md | 79 - node_modules/once/once.js | 42 - node_modules/once/package.json | 73 - node_modules/optimist/.travis.yml | 4 - node_modules/optimist/LICENSE | 21 - node_modules/optimist/example/bool.js | 10 - .../optimist/example/boolean_double.js | 7 - .../optimist/example/boolean_single.js | 7 - node_modules/optimist/example/default_hash.js | 8 - .../optimist/example/default_singles.js | 7 - node_modules/optimist/example/divide.js | 8 - node_modules/optimist/example/line_count.js | 20 - .../optimist/example/line_count_options.js | 29 - .../optimist/example/line_count_wrap.js | 29 - node_modules/optimist/example/nonopt.js | 4 - node_modules/optimist/example/reflect.js | 2 - node_modules/optimist/example/short.js | 3 - node_modules/optimist/example/string.js | 11 - .../optimist/example/usage-options.js | 19 - node_modules/optimist/example/xup.js | 10 - node_modules/optimist/index.js | 343 - .../node_modules/minimist/.travis.yml | 4 - .../optimist/node_modules/minimist/LICENSE | 18 - .../node_modules/minimist/example/parse.js | 2 - .../optimist/node_modules/minimist/index.js | 187 - .../node_modules/minimist/package.json | 75 - .../node_modules/minimist/readme.markdown | 73 - .../node_modules/minimist/test/bool.js | 119 - .../node_modules/minimist/test/dash.js | 24 - .../minimist/test/default_bool.js | 20 - .../node_modules/minimist/test/dotted.js | 22 - .../node_modules/minimist/test/long.js | 31 - .../node_modules/minimist/test/num.js | 36 - .../node_modules/minimist/test/parse.js | 197 - .../minimist/test/parse_modified.js | 9 - .../node_modules/minimist/test/short.js | 67 - .../node_modules/minimist/test/whitespace.js | 8 - node_modules/optimist/package.json | 72 - node_modules/optimist/readme.markdown | 513 - node_modules/optimist/test/_.js | 71 - node_modules/optimist/test/_/argv.js | 2 - node_modules/optimist/test/_/bin.js | 3 - node_modules/optimist/test/dash.js | 31 - node_modules/optimist/test/parse.js | 446 - node_modules/optimist/test/parse_modified.js | 14 - node_modules/optimist/test/short.js | 16 - node_modules/optimist/test/usage.js | 292 - node_modules/optimist/test/whitespace.js | 8 - node_modules/optionator/CHANGELOG.md | 52 - node_modules/optionator/LICENSE | 22 - node_modules/optionator/README.md | 236 - node_modules/optionator/lib/help.js | 247 - node_modules/optionator/lib/index.js | 465 - node_modules/optionator/lib/util.js | 54 - .../optionator/node_modules/wordwrap/LICENSE | 18 - .../node_modules/wordwrap/README.markdown | 70 - .../node_modules/wordwrap/example/center.js | 10 - .../node_modules/wordwrap/example/meat.js | 3 - .../optionator/node_modules/wordwrap/index.js | 76 - .../node_modules/wordwrap/package.json | 67 - .../node_modules/wordwrap/test/break.js | 32 - .../node_modules/wordwrap/test/idleness.txt | 63 - .../node_modules/wordwrap/test/wrap.js | 33 - node_modules/optionator/package.json | 78 - node_modules/p-each-series/index.js | 4 - node_modules/p-each-series/license | 21 - node_modules/p-each-series/package.json | 87 - node_modules/p-each-series/readme.md | 65 - node_modules/p-finally/index.js | 15 - node_modules/p-finally/license | 21 - node_modules/p-finally/package.json | 78 - node_modules/p-finally/readme.md | 47 - node_modules/p-limit/index.d.ts | 29 - node_modules/p-limit/index.js | 52 - node_modules/p-limit/license | 9 - node_modules/p-limit/package.json | 88 - node_modules/p-limit/readme.md | 99 - node_modules/p-locate/index.js | 34 - node_modules/p-locate/license | 9 - node_modules/p-locate/package.json | 87 - node_modules/p-locate/readme.md | 88 - node_modules/p-reduce/index.js | 22 - node_modules/p-reduce/license | 21 - node_modules/p-reduce/package.json | 77 - node_modules/p-reduce/readme.md | 72 - node_modules/p-try/index.d.ts | 39 - node_modules/p-try/index.js | 9 - node_modules/p-try/license | 9 - node_modules/p-try/package.json | 78 - node_modules/p-try/readme.md | 58 - node_modules/parse-json/index.js | 33 - node_modules/parse-json/license | 9 - node_modules/parse-json/package.json | 80 - node_modules/parse-json/readme.md | 83 - node_modules/parse5/LICENSE | 19 - node_modules/parse5/README.md | 40 - node_modules/parse5/lib/common/doctype.js | 156 - .../parse5/lib/common/foreign_content.js | 260 - node_modules/parse5/lib/common/html.js | 272 - node_modules/parse5/lib/common/unicode.js | 47 - .../location_info/open_element_stack_mixin.js | 34 - .../extensions/location_info/parser_mixin.js | 213 - .../location_info/tokenizer_mixin.js | 117 - .../position_tracking/preprocessor_mixin.js | 72 - node_modules/parse5/lib/index.d.ts | 1085 - node_modules/parse5/lib/index.js | 66 - .../lib/parser/formatting_element_list.js | 167 - node_modules/parse5/lib/parser/index.js | 2819 - .../parse5/lib/parser/open_element_stack.js | 395 - .../parse5/lib/parser/parser_stream.js | 76 - .../parser/plain_text_conversion_stream.js | 20 - .../parse5/lib/sax/dev_null_stream.js | 14 - node_modules/parse5/lib/sax/index.js | 118 - .../lib/sax/parser_feedback_simulator.js | 153 - node_modules/parse5/lib/serializer/index.js | 162 - .../lib/serializer/serializer_stream.js | 28 - node_modules/parse5/lib/tokenizer/index.js | 2144 - .../parse5/lib/tokenizer/named_entity_data.js | 5 - .../parse5/lib/tokenizer/preprocessor.js | 147 - .../parse5/lib/tree_adapters/default.js | 209 - .../parse5/lib/tree_adapters/htmlparser2.js | 338 - .../parse5/lib/utils/merge_options.js | 13 - node_modules/parse5/lib/utils/mixin.js | 18 - node_modules/parse5/package.json | 96 - node_modules/pascalcase/LICENSE | 21 - node_modules/pascalcase/README.md | 80 - node_modules/pascalcase/index.js | 21 - node_modules/pascalcase/package.json | 81 - node_modules/path-exists/index.js | 17 - node_modules/path-exists/license | 21 - node_modules/path-exists/package.json | 76 - node_modules/path-exists/readme.md | 50 - node_modules/path-is-absolute/index.js | 20 - node_modules/path-is-absolute/license | 21 - node_modules/path-is-absolute/package.json | 79 - node_modules/path-is-absolute/readme.md | 59 - node_modules/path-key/index.js | 13 - node_modules/path-key/license | 21 - node_modules/path-key/package.json | 76 - node_modules/path-key/readme.md | 51 - node_modules/path-parse/.travis.yml | 9 - node_modules/path-parse/LICENSE | 21 - node_modules/path-parse/README.md | 42 - node_modules/path-parse/index.js | 93 - node_modules/path-parse/package.json | 65 - node_modules/path-parse/test.js | 77 - node_modules/path-type/index.js | 42 - node_modules/path-type/license | 9 - node_modules/path-type/package.json | 81 - node_modules/path-type/readme.md | 42 - node_modules/performance-now/.npmignore | 1 - node_modules/performance-now/.tm_properties | 7 - node_modules/performance-now/.travis.yml | 6 - node_modules/performance-now/README.md | 30 - .../performance-now/lib/performance-now.js | 36 - .../lib/performance-now.js.map | 10 - node_modules/performance-now/license.txt | 7 - node_modules/performance-now/package.json | 69 - node_modules/performance-now/src/index.d.ts | 8 - .../src/performance-now.coffee | 17 - node_modules/performance-now/test/mocha.opts | 3 - .../test/performance-now.coffee | 43 - .../performance-now/test/scripts.coffee | 27 - .../test/scripts/delayed-call.coffee | 11 - .../test/scripts/delayed-require.coffee | 12 - .../test/scripts/difference.coffee | 6 - .../test/scripts/initial-value.coffee | 10 - node_modules/pify/index.js | 84 - node_modules/pify/license | 9 - node_modules/pify/package.json | 88 - node_modules/pify/readme.md | 131 - node_modules/pirates/LICENSE | 21 - node_modules/pirates/README.md | 89 - node_modules/pirates/index.d.ts | 30 - node_modules/pirates/lib/index.js | 118 - node_modules/pirates/package.json | 113 - node_modules/pkg-dir/index.d.ts | 44 - node_modules/pkg-dir/index.js | 17 - node_modules/pkg-dir/license | 9 - .../pkg-dir/node_modules/find-up/index.d.ts | 137 - .../pkg-dir/node_modules/find-up/index.js | 89 - .../pkg-dir/node_modules/find-up/license | 9 - .../pkg-dir/node_modules/find-up/package.json | 89 - .../pkg-dir/node_modules/find-up/readme.md | 156 - .../node_modules/locate-path/index.d.ts | 83 - .../pkg-dir/node_modules/locate-path/index.js | 65 - .../pkg-dir/node_modules/locate-path/license | 9 - .../node_modules/locate-path/package.json | 81 - .../node_modules/locate-path/readme.md | 122 - .../pkg-dir/node_modules/p-locate/index.d.ts | 64 - .../pkg-dir/node_modules/p-locate/index.js | 52 - .../pkg-dir/node_modules/p-locate/license | 9 - .../node_modules/p-locate/package.json | 89 - .../pkg-dir/node_modules/p-locate/readme.md | 90 - .../node_modules/path-exists/index.d.ts | 28 - .../pkg-dir/node_modules/path-exists/index.js | 23 - .../pkg-dir/node_modules/path-exists/license | 9 - .../node_modules/path-exists/package.json | 75 - .../node_modules/path-exists/readme.md | 52 - node_modules/pkg-dir/package.json | 94 - node_modules/pkg-dir/readme.md | 66 - node_modules/please-upgrade-node/.eslintrc.js | 12 - .../please-upgrade-node/.github/FUNDING.yml | 1 - node_modules/please-upgrade-node/LICENSE | 21 - node_modules/please-upgrade-node/README.md | 72 - node_modules/please-upgrade-node/index.d.ts | 11 - node_modules/please-upgrade-node/index.js | 25 - node_modules/please-upgrade-node/package.json | 77 - node_modules/pn/.travis.yml | 13 - node_modules/pn/README.md | 148 - node_modules/pn/_promise.js | 6 - node_modules/pn/_promisify.js | 58 - node_modules/pn/assert.js | 2 - node_modules/pn/async_hooks.js | 3 - node_modules/pn/buffer.js | 2 - node_modules/pn/child_process.js | 14 - node_modules/pn/cluster.js | 20 - node_modules/pn/console.js | 2 - node_modules/pn/crypto.js | 53 - node_modules/pn/dgram.js | 8 - node_modules/pn/dns.js | 49 - node_modules/pn/domain.js | 10 - node_modules/pn/events.js | 2 - node_modules/pn/fs.js | 87 - node_modules/pn/http.js | 20 - node_modules/pn/http2.js | 15 - node_modules/pn/https.js | 11 - node_modules/pn/inspector.js | 3 - node_modules/pn/net.js | 17 - node_modules/pn/os.js | 2 - node_modules/pn/package.json | 59 - node_modules/pn/path.js | 2 - node_modules/pn/perf_hooks.js | 3 - node_modules/pn/process.js | 74 - node_modules/pn/punycode.js | 3 - node_modules/pn/querystring.js | 2 - node_modules/pn/readline.js | 16 - node_modules/pn/repl.js | 2 - node_modules/pn/scripts/generate.js | 244 - node_modules/pn/stream.js | 14 - node_modules/pn/string_decoder.js | 2 - node_modules/pn/test/cp.js | 13 - node_modules/pn/test/custom.js | 20 - node_modules/pn/test/fs.js | 60 - node_modules/pn/test/load.js | 14 - node_modules/pn/test/timers.js | 34 - node_modules/pn/timers.js | 15 - node_modules/pn/tls.js | 22 - node_modules/pn/tty.js | 2 - node_modules/pn/url.js | 2 - node_modules/pn/util.js | 41 - node_modules/pn/v8.js | 3 - node_modules/pn/vm.js | 2 - node_modules/pn/zlib.js | 81 - node_modules/posix-character-classes/LICENSE | 21 - .../posix-character-classes/README.md | 103 - node_modules/posix-character-classes/index.js | 22 - .../posix-character-classes/package.json | 89 - node_modules/prelude-ls/CHANGELOG.md | 99 - node_modules/prelude-ls/LICENSE | 22 - node_modules/prelude-ls/README.md | 15 - node_modules/prelude-ls/lib/Func.js | 65 - node_modules/prelude-ls/lib/List.js | 686 - node_modules/prelude-ls/lib/Num.js | 130 - node_modules/prelude-ls/lib/Obj.js | 154 - node_modules/prelude-ls/lib/Str.js | 92 - node_modules/prelude-ls/lib/index.js | 178 - node_modules/prelude-ls/package.json | 88 - node_modules/prettier/LICENSE | 7 - node_modules/prettier/README.md | 107 - node_modules/prettier/bin-prettier.js | 44858 ---------------- node_modules/prettier/doc.js | 1984 - node_modules/prettier/index.js | 42803 --------------- node_modules/prettier/package.json | 59 - node_modules/prettier/parser-angular.js | 1 - node_modules/prettier/parser-babylon.js | 1 - node_modules/prettier/parser-flow.js | 1 - node_modules/prettier/parser-glimmer.js | 1 - node_modules/prettier/parser-graphql.js | 1 - node_modules/prettier/parser-html.js | 1 - node_modules/prettier/parser-markdown.js | 1 - node_modules/prettier/parser-postcss.js | 32300 ----------- node_modules/prettier/parser-typescript.js | 1 - node_modules/prettier/parser-yaml.js | 1 - node_modules/prettier/standalone.js | 31023 ----------- node_modules/prettier/third-party.js | 5357 -- node_modules/pretty-format/LICENSE | 21 - node_modules/pretty-format/README.md | 456 - node_modules/pretty-format/build-es5/index.js | 3263 -- .../pretty-format/build-es5/index.js.map | 1 - .../pretty-format/build/collections.d.ts | 33 - .../pretty-format/build/collections.d.ts.map | 1 - .../pretty-format/build/collections.js | 185 - node_modules/pretty-format/build/index.d.ts | 37 - .../pretty-format/build/index.d.ts.map | 1 - node_modules/pretty-format/build/index.js | 556 - .../build/plugins/AsymmetricMatcher.d.ts | 12 - .../build/plugins/AsymmetricMatcher.d.ts.map | 1 - .../build/plugins/AsymmetricMatcher.js | 100 - .../build/plugins/ConvertAnsi.d.ts | 12 - .../build/plugins/ConvertAnsi.d.ts.map | 1 - .../build/plugins/ConvertAnsi.js | 96 - .../build/plugins/DOMCollection.d.ts | 12 - .../build/plugins/DOMCollection.d.ts.map | 1 - .../build/plugins/DOMCollection.js | 103 - .../build/plugins/DOMElement.d.ts | 13 - .../build/plugins/DOMElement.d.ts.map | 1 - .../pretty-format/build/plugins/DOMElement.js | 104 - .../build/plugins/Immutable.d.ts | 12 - .../build/plugins/Immutable.d.ts.map | 1 - .../pretty-format/build/plugins/Immutable.js | 246 - .../build/plugins/ReactElement.d.ts | 12 - .../build/plugins/ReactElement.d.ts.map | 1 - .../build/plugins/ReactElement.js | 145 - .../build/plugins/ReactTestComponent.d.ts | 19 - .../build/plugins/ReactTestComponent.d.ts.map | 1 - .../build/plugins/ReactTestComponent.js | 62 - .../build/plugins/lib/escapeHTML.d.ts | 8 - .../build/plugins/lib/escapeHTML.d.ts.map | 1 - .../build/plugins/lib/escapeHTML.js | 16 - .../build/plugins/lib/markup.d.ts | 14 - .../build/plugins/lib/markup.d.ts.map | 1 - .../pretty-format/build/plugins/lib/markup.js | 147 - node_modules/pretty-format/build/types.d.ts | 101 - .../pretty-format/build/types.d.ts.map | 1 - node_modules/pretty-format/build/types.js | 1 - node_modules/pretty-format/package.json | 83 - node_modules/pretty-format/perf/test.js | 215 - .../pretty-format/perf/world.geo.json | 182 - .../prompts/dist/dateparts/datepart.js | 39 - node_modules/prompts/dist/dateparts/day.js | 35 - node_modules/prompts/dist/dateparts/hours.js | 30 - node_modules/prompts/dist/dateparts/index.js | 13 - .../prompts/dist/dateparts/meridiem.js | 25 - .../prompts/dist/dateparts/milliseconds.js | 28 - .../prompts/dist/dateparts/minutes.js | 29 - node_modules/prompts/dist/dateparts/month.js | 31 - .../prompts/dist/dateparts/seconds.js | 29 - node_modules/prompts/dist/dateparts/year.js | 29 - .../prompts/dist/elements/autocomplete.js | 277 - .../dist/elements/autocompleteMultiselect.js | 193 - node_modules/prompts/dist/elements/confirm.js | 89 - node_modules/prompts/dist/elements/date.js | 247 - node_modules/prompts/dist/elements/index.js | 13 - .../prompts/dist/elements/multiselect.js | 286 - node_modules/prompts/dist/elements/number.js | 231 - node_modules/prompts/dist/elements/prompt.js | 78 - node_modules/prompts/dist/elements/select.js | 159 - node_modules/prompts/dist/elements/text.js | 214 - node_modules/prompts/dist/elements/toggle.js | 120 - node_modules/prompts/dist/index.js | 153 - node_modules/prompts/dist/prompts.js | 219 - node_modules/prompts/dist/util/action.js | 34 - node_modules/prompts/dist/util/clear.js | 40 - node_modules/prompts/dist/util/figures.js | 32 - node_modules/prompts/dist/util/index.js | 11 - node_modules/prompts/dist/util/lines.js | 9 - node_modules/prompts/dist/util/strip.js | 7 - node_modules/prompts/dist/util/style.js | 50 - node_modules/prompts/dist/util/wrap.js | 16 - node_modules/prompts/index.js | 14 - .../prompts/lib/dateparts/datepart.js | 35 - node_modules/prompts/lib/dateparts/day.js | 42 - node_modules/prompts/lib/dateparts/hours.js | 30 - node_modules/prompts/lib/dateparts/index.js | 13 - .../prompts/lib/dateparts/meridiem.js | 24 - .../prompts/lib/dateparts/milliseconds.js | 28 - node_modules/prompts/lib/dateparts/minutes.js | 28 - node_modules/prompts/lib/dateparts/month.js | 33 - node_modules/prompts/lib/dateparts/seconds.js | 28 - node_modules/prompts/lib/dateparts/year.js | 28 - .../prompts/lib/elements/autocomplete.js | 264 - .../lib/elements/autocompleteMultiselect.js | 188 - node_modules/prompts/lib/elements/confirm.js | 85 - node_modules/prompts/lib/elements/date.js | 205 - node_modules/prompts/lib/elements/index.js | 13 - .../prompts/lib/elements/multiselect.js | 269 - node_modules/prompts/lib/elements/number.js | 200 - node_modules/prompts/lib/elements/prompt.js | 67 - node_modules/prompts/lib/elements/select.js | 152 - node_modules/prompts/lib/elements/text.js | 181 - node_modules/prompts/lib/elements/toggle.js | 114 - node_modules/prompts/lib/index.js | 92 - node_modules/prompts/lib/prompts.js | 203 - node_modules/prompts/lib/util/action.js | 35 - node_modules/prompts/lib/util/clear.js | 18 - node_modules/prompts/lib/util/figures.js | 33 - node_modules/prompts/lib/util/index.js | 11 - node_modules/prompts/lib/util/lines.js | 11 - node_modules/prompts/lib/util/strip.js | 11 - node_modules/prompts/lib/util/style.js | 39 - node_modules/prompts/lib/util/wrap.js | 27 - node_modules/prompts/license | 21 - node_modules/prompts/package.json | 89 - node_modules/prompts/readme.md | 819 - node_modules/psl/LICENSE | 9 - node_modules/psl/README.md | 215 - node_modules/psl/browserstack-logo.svg | 90 - node_modules/psl/data/rules.json | 8790 --- node_modules/psl/dist/psl.js | 9601 ---- node_modules/psl/dist/psl.min.js | 1 - node_modules/psl/index.js | 269 - node_modules/psl/package.json | 82 - node_modules/pump/.travis.yml | 5 - node_modules/pump/LICENSE | 21 - node_modules/pump/README.md | 65 - node_modules/pump/index.js | 82 - node_modules/pump/package.json | 63 - node_modules/pump/test-browser.js | 66 - node_modules/pump/test-node.js | 53 - node_modules/punycode/LICENSE-MIT.txt | 20 - node_modules/punycode/README.md | 122 - node_modules/punycode/package.json | 91 - node_modules/punycode/punycode.es6.js | 441 - node_modules/punycode/punycode.js | 440 - node_modules/qs/.editorconfig | 30 - node_modules/qs/.eslintignore | 1 - node_modules/qs/.eslintrc | 19 - node_modules/qs/CHANGELOG.md | 226 - node_modules/qs/LICENSE | 28 - node_modules/qs/README.md | 475 - node_modules/qs/dist/qs.js | 638 - node_modules/qs/lib/formats.js | 18 - node_modules/qs/lib/index.js | 11 - node_modules/qs/lib/parse.js | 174 - node_modules/qs/lib/stringify.js | 210 - node_modules/qs/lib/utils.js | 213 - node_modules/qs/package.json | 84 - node_modules/qs/test/.eslintrc | 15 - node_modules/qs/test/index.js | 7 - node_modules/qs/test/parse.js | 574 - node_modules/qs/test/stringify.js | 597 - node_modules/qs/test/utils.js | 34 - node_modules/react-is/LICENSE | 21 - node_modules/react-is/README.md | 104 - node_modules/react-is/build-info.json | 8 - .../react-is/cjs/react-is.development.js | 232 - .../react-is/cjs/react-is.production.min.js | 15 - node_modules/react-is/index.js | 7 - node_modules/react-is/package.json | 56 - .../react-is/umd/react-is.development.js | 232 - .../react-is/umd/react-is.production.min.js | 13 - node_modules/read-pkg-up/index.js | 26 - node_modules/read-pkg-up/license | 9 - .../node_modules/read-pkg/index.js | 47 - .../read-pkg-up/node_modules/read-pkg/license | 9 - .../node_modules/read-pkg/package.json | 78 - .../node_modules/read-pkg/readme.md | 79 - node_modules/read-pkg-up/package.json | 97 - node_modules/read-pkg-up/readme.md | 82 - node_modules/read-pkg/index.d.ts | 67 - node_modules/read-pkg/index.js | 41 - node_modules/read-pkg/license | 9 - .../read-pkg/node_modules/parse-json/index.js | 50 - .../read-pkg/node_modules/parse-json/license | 9 - .../node_modules/parse-json/package.json | 80 - .../node_modules/parse-json/readme.md | 101 - node_modules/read-pkg/package.json | 90 - node_modules/read-pkg/readme.md | 81 - node_modules/realpath-native/LICENSE | 22 - node_modules/realpath-native/README.md | 60 - node_modules/realpath-native/index.d.ts | 6 - node_modules/realpath-native/index.js | 46 - node_modules/realpath-native/package.json | 102 - node_modules/regex-not/LICENSE | 21 - node_modules/regex-not/README.md | 133 - node_modules/regex-not/index.js | 72 - node_modules/regex-not/package.json | 102 - .../remove-trailing-separator/history.md | 17 - .../remove-trailing-separator/index.js | 17 - .../remove-trailing-separator/license | 3 - .../remove-trailing-separator/package.json | 68 - .../remove-trailing-separator/readme.md | 51 - node_modules/repeat-element/LICENSE | 21 - node_modules/repeat-element/README.md | 99 - node_modules/repeat-element/index.js | 18 - node_modules/repeat-element/package.json | 84 - node_modules/repeat-string/LICENSE | 21 - node_modules/repeat-string/README.md | 136 - node_modules/repeat-string/index.js | 70 - node_modules/repeat-string/package.json | 133 - node_modules/request-promise-core/LICENSE | 15 - node_modules/request-promise-core/README.md | 125 - .../configure/request-next.js | 67 - .../configure/request2.js | 74 - node_modules/request-promise-core/errors.js | 3 - .../request-promise-core/lib/errors.js | 62 - .../request-promise-core/lib/plumbing.js | 167 - .../request-promise-core/package.json | 92 - .../request-promise-native/.npmignore | 13 - node_modules/request-promise-native/LICENSE | 15 - node_modules/request-promise-native/README.md | 78 - node_modules/request-promise-native/errors.js | 3 - node_modules/request-promise-native/lib/rp.js | 26 - .../request-promise-native/package.json | 90 - node_modules/request/CHANGELOG.md | 709 - node_modules/request/LICENSE | 55 - node_modules/request/README.md | 1097 - node_modules/request/index.js | 155 - node_modules/request/lib/auth.js | 167 - node_modules/request/lib/cookies.js | 38 - node_modules/request/lib/getProxyFromURI.js | 79 - node_modules/request/lib/har.js | 205 - node_modules/request/lib/hawk.js | 89 - node_modules/request/lib/helpers.js | 66 - node_modules/request/lib/multipart.js | 112 - node_modules/request/lib/oauth.js | 148 - node_modules/request/lib/querystring.js | 50 - node_modules/request/lib/redirect.js | 154 - node_modules/request/lib/tunnel.js | 175 - .../node_modules/punycode/LICENSE-MIT.txt | 20 - .../request/node_modules/punycode/README.md | 176 - .../node_modules/punycode/package.json | 91 - .../request/node_modules/punycode/punycode.js | 533 - .../request/node_modules/tough-cookie/LICENSE | 12 - .../node_modules/tough-cookie/README.md | 507 - .../node_modules/tough-cookie/lib/cookie.js | 1431 - .../node_modules/tough-cookie/lib/memstore.js | 176 - .../tough-cookie/lib/pathMatch.js | 61 - .../tough-cookie/lib/permuteDomain.js | 56 - .../tough-cookie/lib/pubsuffix-psl.js | 38 - .../node_modules/tough-cookie/lib/store.js | 71 - .../node_modules/tough-cookie/package.json | 98 - node_modules/request/package.json | 121 - node_modules/request/request.js | 1551 - node_modules/require-directory/.jshintrc | 67 - node_modules/require-directory/.npmignore | 1 - node_modules/require-directory/.travis.yml | 3 - node_modules/require-directory/LICENSE | 22 - .../require-directory/README.markdown | 184 - node_modules/require-directory/index.js | 86 - node_modules/require-directory/package.json | 73 - .../require-main-filename/CHANGELOG.md | 26 - .../require-main-filename/LICENSE.txt | 14 - node_modules/require-main-filename/README.md | 26 - node_modules/require-main-filename/index.js | 18 - .../require-main-filename/package.json | 68 - node_modules/resolve-cwd/index.js | 5 - node_modules/resolve-cwd/license | 21 - node_modules/resolve-cwd/package.json | 77 - node_modules/resolve-cwd/readme.md | 57 - node_modules/resolve-from/index.js | 35 - node_modules/resolve-from/license | 21 - node_modules/resolve-from/package.json | 72 - node_modules/resolve-from/readme.md | 71 - node_modules/resolve-url/.jshintrc | 44 - node_modules/resolve-url/LICENSE | 21 - node_modules/resolve-url/bower.json | 15 - node_modules/resolve-url/changelog.md | 15 - node_modules/resolve-url/component.json | 15 - node_modules/resolve-url/package.json | 72 - node_modules/resolve-url/readme.md | 83 - node_modules/resolve-url/resolve-url.js | 47 - node_modules/resolve-url/test/resolve-url.js | 70 - node_modules/resolve/.editorconfig | 20 - node_modules/resolve/.eslintignore | 1 - node_modules/resolve/.eslintrc | 39 - node_modules/resolve/.travis.yml | 308 - node_modules/resolve/LICENSE | 21 - node_modules/resolve/appveyor.yml | 53 - node_modules/resolve/example/async.js | 5 - node_modules/resolve/example/sync.js | 3 - node_modules/resolve/index.js | 8 - node_modules/resolve/lib/async.js | 271 - node_modules/resolve/lib/caller.js | 8 - node_modules/resolve/lib/core.js | 53 - node_modules/resolve/lib/core.json | 74 - .../resolve/lib/node-modules-paths.js | 42 - node_modules/resolve/lib/normalize-options.js | 10 - node_modules/resolve/lib/sync.js | 172 - node_modules/resolve/package.json | 78 - node_modules/resolve/readme.markdown | 201 - node_modules/resolve/test/.eslintrc | 5 - node_modules/resolve/test/core.js | 82 - node_modules/resolve/test/dotdot.js | 29 - node_modules/resolve/test/dotdot/abc/index.js | 2 - node_modules/resolve/test/dotdot/index.js | 1 - node_modules/resolve/test/faulty_basedir.js | 29 - node_modules/resolve/test/filter.js | 34 - node_modules/resolve/test/filter_sync.js | 26 - node_modules/resolve/test/mock.js | 169 - node_modules/resolve/test/mock_sync.js | 80 - node_modules/resolve/test/module_dir.js | 56 - .../test/module_dir/xmodules/aaa/index.js | 1 - .../test/module_dir/ymodules/aaa/index.js | 1 - .../test/module_dir/zmodules/bbb/main.js | 1 - .../test/module_dir/zmodules/bbb/package.json | 3 - .../resolve/test/node-modules-paths.js | 143 - node_modules/resolve/test/node_path.js | 70 - .../resolve/test/node_path/x/aaa/index.js | 1 - .../resolve/test/node_path/x/ccc/index.js | 1 - .../resolve/test/node_path/y/bbb/index.js | 1 - .../resolve/test/node_path/y/ccc/index.js | 1 - node_modules/resolve/test/nonstring.js | 9 - node_modules/resolve/test/pathfilter.js | 75 - .../resolve/test/pathfilter/deep_ref/main.js | 0 node_modules/resolve/test/precedence.js | 23 - node_modules/resolve/test/precedence/aaa.js | 1 - .../resolve/test/precedence/aaa/index.js | 1 - .../resolve/test/precedence/aaa/main.js | 1 - node_modules/resolve/test/precedence/bbb.js | 1 - .../resolve/test/precedence/bbb/main.js | 1 - node_modules/resolve/test/resolver.js | 418 - .../resolve/test/resolver/baz/doom.js | 0 .../resolve/test/resolver/baz/package.json | 3 - .../resolve/test/resolver/baz/quux.js | 1 - .../resolve/test/resolver/browser_field/a.js | 0 .../resolve/test/resolver/browser_field/b.js | 0 .../test/resolver/browser_field/package.json | 5 - node_modules/resolve/test/resolver/cup.coffee | 1 - .../resolve/test/resolver/dot_main/index.js | 1 - .../test/resolver/dot_main/package.json | 3 - .../test/resolver/dot_slash_main/index.js | 1 - .../test/resolver/dot_slash_main/package.json | 3 - node_modules/resolve/test/resolver/foo.js | 1 - .../test/resolver/incorrect_main/index.js | 2 - .../test/resolver/incorrect_main/package.json | 3 - .../test/resolver/invalid_main/package.json | 7 - node_modules/resolve/test/resolver/mug.coffee | 0 node_modules/resolve/test/resolver/mug.js | 0 .../test/resolver/multirepo/lerna.json | 6 - .../test/resolver/multirepo/package.json | 20 - .../multirepo/packages/package-a/index.js | 35 - .../multirepo/packages/package-a/package.json | 14 - .../multirepo/packages/package-b/index.js | 0 .../multirepo/packages/package-b/package.json | 14 - .../resolver/nested_symlinks/mylib/async.js | 26 - .../nested_symlinks/mylib/package.json | 15 - .../resolver/nested_symlinks/mylib/sync.js | 12 - .../test/resolver/other_path/lib/other-lib.js | 0 .../resolve/test/resolver/other_path/root.js | 0 .../resolve/test/resolver/quux/foo/index.js | 1 - .../resolve/test/resolver/same_names/foo.js | 1 - .../test/resolver/same_names/foo/index.js | 1 - .../resolver/symlinked/_/node_modules/foo.js | 0 .../symlinked/_/symlink_target/.gitkeep | 0 .../test/resolver/symlinked/package/bar.js | 1 - .../resolver/symlinked/package/package.json | 3 - .../test/resolver/without_basedir/main.js | 5 - node_modules/resolve/test/resolver_sync.js | 329 - node_modules/resolve/test/shadowed_core.js | 38 - .../shadowed_core/node_modules/util/index.js | 0 node_modules/resolve/test/subdirs.js | 13 - node_modules/resolve/test/symlinks.js | 84 - node_modules/ret/LICENSE | 19 - node_modules/ret/README.md | 183 - node_modules/ret/lib/index.js | 282 - node_modules/ret/lib/positions.js | 17 - node_modules/ret/lib/sets.js | 82 - node_modules/ret/lib/types.js | 10 - node_modules/ret/lib/util.js | 111 - node_modules/ret/package.json | 71 - node_modules/rimraf/LICENSE | 15 - node_modules/rimraf/README.md | 101 - node_modules/rimraf/bin.js | 50 - node_modules/rimraf/package.json | 72 - node_modules/rimraf/rimraf.js | 372 - node_modules/rsvp/CHANGELOG.md | 337 - node_modules/rsvp/LICENSE | 19 - node_modules/rsvp/README.md | 371 - node_modules/rsvp/dist/es6/rsvp.es.js | 2474 - node_modules/rsvp/dist/es6/rsvp.es.map | 1 - node_modules/rsvp/dist/rsvp.es.js | 2526 - node_modules/rsvp/dist/rsvp.es.map | 1 - node_modules/rsvp/dist/rsvp.js | 2559 - node_modules/rsvp/dist/rsvp.map | 1 - node_modules/rsvp/lib/rsvp.js | 93 - node_modules/rsvp/lib/rsvp/-internal.js | 224 - node_modules/rsvp/lib/rsvp/all-settled.js | 81 - node_modules/rsvp/lib/rsvp/all.js | 16 - node_modules/rsvp/lib/rsvp/asap.js | 106 - node_modules/rsvp/lib/rsvp/config.js | 20 - node_modules/rsvp/lib/rsvp/defer.js | 46 - node_modules/rsvp/lib/rsvp/enumerator.js | 136 - node_modules/rsvp/lib/rsvp/events.js | 205 - node_modules/rsvp/lib/rsvp/filter.js | 145 - node_modules/rsvp/lib/rsvp/hash-settled.js | 134 - node_modules/rsvp/lib/rsvp/hash.js | 102 - node_modules/rsvp/lib/rsvp/instrument.js | 39 - node_modules/rsvp/lib/rsvp/map.js | 132 - node_modules/rsvp/lib/rsvp/node.js | 245 - node_modules/rsvp/lib/rsvp/promise-hash.js | 34 - node_modules/rsvp/lib/rsvp/promise.js | 444 - node_modules/rsvp/lib/rsvp/promise/all.js | 59 - node_modules/rsvp/lib/rsvp/promise/race.js | 102 - node_modules/rsvp/lib/rsvp/promise/reject.js | 52 - node_modules/rsvp/lib/rsvp/promise/resolve.js | 54 - node_modules/rsvp/lib/rsvp/race.js | 16 - node_modules/rsvp/lib/rsvp/reject.js | 17 - node_modules/rsvp/lib/rsvp/resolve.js | 18 - node_modules/rsvp/lib/rsvp/rethrow.js | 49 - node_modules/rsvp/lib/rsvp/then.js | 36 - node_modules/rsvp/package.json | 105 - node_modules/run-node/license | 9 - node_modules/run-node/package.json | 77 - node_modules/run-node/readme.md | 70 - node_modules/run-node/run-node | 49 - node_modules/safe-buffer/LICENSE | 21 - node_modules/safe-buffer/README.md | 584 - node_modules/safe-buffer/index.d.ts | 187 - node_modules/safe-buffer/index.js | 62 - node_modules/safe-buffer/package.json | 68 - node_modules/safe-regex/.travis.yml | 4 - node_modules/safe-regex/LICENSE | 18 - node_modules/safe-regex/example/safe.js | 3 - node_modules/safe-regex/index.js | 43 - node_modules/safe-regex/package.json | 78 - node_modules/safe-regex/readme.markdown | 65 - node_modules/safe-regex/test/regex.js | 50 - node_modules/safer-buffer/LICENSE | 21 - node_modules/safer-buffer/Porting-Buffer.md | 268 - node_modules/safer-buffer/Readme.md | 156 - node_modules/safer-buffer/dangerous.js | 58 - node_modules/safer-buffer/package.json | 67 - node_modules/safer-buffer/safer.js | 77 - node_modules/safer-buffer/tests.js | 406 - node_modules/sane/README.md | 149 - node_modules/sane/index.js | 40 - node_modules/sane/package.json | 88 - node_modules/sane/src/cli.js | 76 - node_modules/sane/src/common.js | 110 - node_modules/sane/src/node_watcher.js | 398 - node_modules/sane/src/poll_watcher.js | 117 - .../sane/src/utils/recrawl-warning-dedupe.js | 51 - node_modules/sane/src/watchexec_client.js | 63 - node_modules/sane/src/watchexec_watcher.js | 116 - node_modules/sane/src/watchman_client.js | 525 - node_modules/sane/src/watchman_watcher.js | 249 - node_modules/sax/LICENSE | 41 - node_modules/sax/README.md | 225 - node_modules/sax/lib/sax.js | 1565 - node_modules/sax/package.json | 65 - node_modules/semver-compare/.travis.yml | 6 - node_modules/semver-compare/LICENSE | 18 - node_modules/semver-compare/example/cmp.js | 13 - node_modules/semver-compare/example/lex.js | 12 - node_modules/semver-compare/index.js | 13 - node_modules/semver-compare/package.json | 63 - node_modules/semver-compare/readme.markdown | 77 - node_modules/semver-compare/test/cmp.js | 29 - node_modules/set-blocking/CHANGELOG.md | 26 - node_modules/set-blocking/LICENSE.txt | 14 - node_modules/set-blocking/README.md | 31 - node_modules/set-blocking/index.js | 7 - node_modules/set-blocking/package.json | 74 - node_modules/set-value/LICENSE | 21 - node_modules/set-value/README.md | 150 - node_modules/set-value/index.js | 55 - .../node_modules/extend-shallow/LICENSE | 21 - .../node_modules/extend-shallow/README.md | 61 - .../node_modules/extend-shallow/index.js | 33 - .../node_modules/extend-shallow/package.json | 91 - node_modules/set-value/package.json | 125 - node_modules/shebang-command/index.js | 19 - node_modules/shebang-command/license | 21 - node_modules/shebang-command/package.json | 75 - node_modules/shebang-command/readme.md | 39 - node_modules/shebang-regex/index.js | 2 - node_modules/shebang-regex/license | 21 - node_modules/shebang-regex/package.json | 68 - node_modules/shebang-regex/readme.md | 29 - node_modules/shellwords/LICENSE | 19 - node_modules/shellwords/README.md | 19 - node_modules/shellwords/lib/shellwords.js | 57 - node_modules/shellwords/package.json | 60 - node_modules/signal-exit/CHANGELOG.md | 27 - node_modules/signal-exit/LICENSE.txt | 16 - node_modules/signal-exit/README.md | 40 - node_modules/signal-exit/index.js | 157 - node_modules/signal-exit/package.json | 71 - node_modules/signal-exit/signals.js | 53 - node_modules/sisteransi/license | 21 - node_modules/sisteransi/package.json | 67 - node_modules/sisteransi/readme.md | 113 - node_modules/sisteransi/src/index.js | 58 - node_modules/sisteransi/src/sisteransi.d.ts | 35 - node_modules/slash/index.d.ts | 25 - node_modules/slash/index.js | 11 - node_modules/slash/license | 9 - node_modules/slash/package.json | 71 - node_modules/slash/readme.md | 44 - node_modules/snapdragon-node/LICENSE | 21 - node_modules/snapdragon-node/README.md | 453 - node_modules/snapdragon-node/index.js | 492 - .../node_modules/define-property/LICENSE | 21 - .../node_modules/define-property/README.md | 95 - .../node_modules/define-property/index.js | 31 - .../node_modules/define-property/package.json | 97 - .../is-accessor-descriptor/LICENSE | 21 - .../is-accessor-descriptor/README.md | 144 - .../is-accessor-descriptor/index.js | 69 - .../is-accessor-descriptor/package.json | 114 - .../node_modules/is-data-descriptor/LICENSE | 21 - .../node_modules/is-data-descriptor/README.md | 161 - .../node_modules/is-data-descriptor/index.js | 49 - .../is-data-descriptor/package.json | 113 - .../node_modules/is-descriptor/LICENSE | 21 - .../node_modules/is-descriptor/README.md | 193 - .../node_modules/is-descriptor/index.js | 22 - .../node_modules/is-descriptor/package.json | 118 - node_modules/snapdragon-node/package.json | 113 - node_modules/snapdragon-util/LICENSE | 21 - node_modules/snapdragon-util/README.md | 807 - node_modules/snapdragon-util/index.js | 1019 - .../node_modules/kind-of/LICENSE | 21 - .../node_modules/kind-of/README.md | 261 - .../node_modules/kind-of/index.js | 116 - .../node_modules/kind-of/package.json | 143 - node_modules/snapdragon-util/package.json | 102 - node_modules/snapdragon/LICENSE | 21 - node_modules/snapdragon/README.md | 321 - node_modules/snapdragon/index.js | 174 - node_modules/snapdragon/lib/compiler.js | 177 - node_modules/snapdragon/lib/parser.js | 533 - node_modules/snapdragon/lib/position.js | 14 - node_modules/snapdragon/lib/source-maps.js | 145 - node_modules/snapdragon/lib/utils.js | 48 - .../node_modules/define-property/LICENSE | 21 - .../node_modules/define-property/README.md | 77 - .../node_modules/define-property/index.js | 31 - .../node_modules/define-property/package.json | 86 - .../node_modules/extend-shallow/LICENSE | 21 - .../node_modules/extend-shallow/README.md | 61 - .../node_modules/extend-shallow/index.js | 33 - .../node_modules/extend-shallow/package.json | 91 - .../node_modules/source-map/CHANGELOG.md | 301 - .../node_modules/source-map/LICENSE | 28 - .../node_modules/source-map/README.md | 729 - .../source-map/dist/source-map.debug.js | 3091 -- .../source-map/dist/source-map.js | 3090 -- .../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 - .../source-map/lib/binary-search.js | 111 - .../source-map/lib/mapping-list.js | 79 - .../node_modules/source-map/lib/quick-sort.js | 114 - .../source-map/lib/source-map-consumer.js | 1082 - .../source-map/lib/source-map-generator.js | 416 - .../source-map/lib/source-node.js | 413 - .../node_modules/source-map/lib/util.js | 417 - .../node_modules/source-map/package.json | 215 - .../node_modules/source-map/source-map.js | 8 - node_modules/snapdragon/package.json | 130 - node_modules/source-map-resolve/.jshintrc | 46 - node_modules/source-map-resolve/.travis.yml | 3 - node_modules/source-map-resolve/LICENSE | 21 - node_modules/source-map-resolve/bower.json | 30 - node_modules/source-map-resolve/changelog.md | 100 - .../source-map-resolve/component.json | 29 - .../generate-source-map-resolve.js | 28 - .../lib/decode-uri-component.js | 11 - .../source-map-resolve/lib/resolve-url.js | 12 - .../lib/source-map-resolve-node.js | 302 - node_modules/source-map-resolve/package.json | 81 - node_modules/source-map-resolve/readme.md | 231 - .../source-map-resolve/source-map-resolve.js | 309 - .../source-map-resolve.js.template | 22 - .../source-map-resolve/test/common.js | 27 - node_modules/source-map-resolve/test/read.js | 105 - .../test/source-map-resolve.js | 1162 - .../source-map-resolve/test/windows.js | 166 - .../source-map-resolve/x-package.json5 | 68 - node_modules/source-map-support/LICENSE.md | 21 - node_modules/source-map-support/README.md | 284 - .../browser-source-map-support.js | 113 - node_modules/source-map-support/package.json | 61 - node_modules/source-map-support/register.js | 1 - .../source-map-support/source-map-support.js | 567 - node_modules/source-map-url/.jshintrc | 43 - node_modules/source-map-url/LICENSE | 21 - node_modules/source-map-url/bower.json | 20 - node_modules/source-map-url/changelog.md | 52 - node_modules/source-map-url/component.json | 18 - node_modules/source-map-url/package.json | 77 - node_modules/source-map-url/readme.md | 97 - node_modules/source-map-url/source-map-url.js | 57 - .../source-map-url/test/source-map-url.js | 402 - node_modules/source-map-url/x-package.json5 | 55 - node_modules/source-map/CHANGELOG.md | 301 - node_modules/source-map/LICENSE | 28 - node_modules/source-map/README.md | 742 - .../source-map/dist/source-map.debug.js | 3234 -- node_modules/source-map/dist/source-map.js | 3233 -- .../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 | 224 - node_modules/source-map/source-map.d.ts | 98 - node_modules/source-map/source-map.js | 8 - node_modules/spdx-correct/LICENSE | 202 - node_modules/spdx-correct/README.md | 14 - node_modules/spdx-correct/index.js | 343 - node_modules/spdx-correct/package.json | 92 - node_modules/spdx-exceptions/README.md | 36 - node_modules/spdx-exceptions/index.json | 34 - node_modules/spdx-exceptions/package.json | 53 - node_modules/spdx-exceptions/test.log | 8 - node_modules/spdx-expression-parse/AUTHORS | 4 - node_modules/spdx-expression-parse/LICENSE | 22 - node_modules/spdx-expression-parse/README.md | 91 - node_modules/spdx-expression-parse/index.js | 8 - .../spdx-expression-parse/package.json | 101 - node_modules/spdx-expression-parse/parse.js | 138 - node_modules/spdx-expression-parse/scan.js | 131 - node_modules/spdx-license-ids/README.md | 52 - node_modules/spdx-license-ids/deprecated.json | 24 - node_modules/spdx-license-ids/index.json | 370 - node_modules/spdx-license-ids/package.json | 79 - node_modules/split-string/LICENSE | 21 - node_modules/split-string/README.md | 321 - node_modules/split-string/index.js | 171 - node_modules/split-string/package.json | 107 - node_modules/sprintf-js/.npmignore | 1 - node_modules/sprintf-js/LICENSE | 24 - node_modules/sprintf-js/README.md | 88 - node_modules/sprintf-js/bower.json | 14 - node_modules/sprintf-js/demo/angular.html | 20 - .../sprintf-js/dist/angular-sprintf.min.js | 4 - .../dist/angular-sprintf.min.js.map | 1 - .../sprintf-js/dist/angular-sprintf.min.map | 1 - node_modules/sprintf-js/dist/sprintf.min.js | 4 - .../sprintf-js/dist/sprintf.min.js.map | 1 - node_modules/sprintf-js/dist/sprintf.min.map | 1 - node_modules/sprintf-js/gruntfile.js | 36 - node_modules/sprintf-js/package.json | 58 - .../sprintf-js/src/angular-sprintf.js | 18 - node_modules/sprintf-js/src/sprintf.js | 208 - node_modules/sprintf-js/test/test.js | 82 - node_modules/sshpk/.npmignore | 9 - node_modules/sshpk/.travis.yml | 11 - node_modules/sshpk/LICENSE | 18 - node_modules/sshpk/README.md | 804 - node_modules/sshpk/bin/sshpk-conv | 243 - node_modules/sshpk/bin/sshpk-sign | 191 - node_modules/sshpk/bin/sshpk-verify | 167 - node_modules/sshpk/lib/algs.js | 168 - node_modules/sshpk/lib/certificate.js | 410 - node_modules/sshpk/lib/dhe.js | 397 - node_modules/sshpk/lib/ed-compat.js | 92 - node_modules/sshpk/lib/errors.js | 84 - node_modules/sshpk/lib/fingerprint.js | 220 - node_modules/sshpk/lib/formats/auto.js | 124 - node_modules/sshpk/lib/formats/dnssec.js | 287 - .../sshpk/lib/formats/openssh-cert.js | 352 - node_modules/sshpk/lib/formats/pem.js | 290 - node_modules/sshpk/lib/formats/pkcs1.js | 373 - node_modules/sshpk/lib/formats/pkcs8.js | 631 - node_modules/sshpk/lib/formats/putty.js | 99 - node_modules/sshpk/lib/formats/rfc4253.js | 166 - node_modules/sshpk/lib/formats/ssh-private.js | 262 - node_modules/sshpk/lib/formats/ssh.js | 115 - node_modules/sshpk/lib/formats/x509-pem.js | 88 - node_modules/sshpk/lib/formats/x509.js | 752 - node_modules/sshpk/lib/identity.js | 373 - node_modules/sshpk/lib/index.js | 40 - node_modules/sshpk/lib/key.js | 294 - node_modules/sshpk/lib/private-key.js | 246 - node_modules/sshpk/lib/signature.js | 314 - node_modules/sshpk/lib/ssh-buffer.js | 149 - node_modules/sshpk/lib/utils.js | 404 - node_modules/sshpk/man/man1/sshpk-conv.1 | 135 - node_modules/sshpk/man/man1/sshpk-sign.1 | 81 - node_modules/sshpk/man/man1/sshpk-verify.1 | 68 - node_modules/sshpk/package.json | 100 - node_modules/stack-utils/index.js | 331 - node_modules/stack-utils/license | 23 - node_modules/stack-utils/package.json | 72 - node_modules/stack-utils/readme.md | 132 - node_modules/static-extend/LICENSE | 21 - node_modules/static-extend/index.js | 90 - .../node_modules/define-property/LICENSE | 21 - .../node_modules/define-property/README.md | 77 - .../node_modules/define-property/index.js | 31 - .../node_modules/define-property/package.json | 86 - node_modules/static-extend/package.json | 100 - node_modules/stealthy-require/.npmignore | 13 - node_modules/stealthy-require/LICENSE | 15 - node_modules/stealthy-require/README.md | 192 - node_modules/stealthy-require/lib/index.js | 81 - node_modules/stealthy-require/package.json | 81 - node_modules/string-length/index.js | 5 - node_modules/string-length/license | 9 - .../node_modules/ansi-regex/index.js | 10 - .../node_modules/ansi-regex/license | 9 - .../node_modules/ansi-regex/package.json | 89 - .../node_modules/ansi-regex/readme.md | 46 - .../node_modules/strip-ansi/index.js | 4 - .../node_modules/strip-ansi/license | 9 - .../node_modules/strip-ansi/package.json | 88 - .../node_modules/strip-ansi/readme.md | 39 - node_modules/string-length/package.json | 80 - node_modules/string-length/readme.md | 38 - node_modules/string-width/index.js | 39 - node_modules/string-width/license | 9 - node_modules/string-width/package.json | 94 - node_modules/string-width/readme.md | 45 - .../string.prototype.trimleft/.eslintrc | 10 - .../string.prototype.trimleft/.jscs.json | 159 - .../string.prototype.trimleft/.npmignore | 27 - .../string.prototype.trimleft/.travis.yml | 73 - .../string.prototype.trimleft/CHANGELOG.md | 15 - .../string.prototype.trimleft/LICENSE | 22 - .../string.prototype.trimleft/README.md | 47 - .../implementation.js | 10 - .../string.prototype.trimleft/index.js | 18 - .../string.prototype.trimleft/package.json | 104 - .../string.prototype.trimleft/polyfill.js | 14 - .../string.prototype.trimleft/shim.js | 14 - .../string.prototype.trimleft/test/index.js | 18 - .../string.prototype.trimleft/test/shimmed.js | 37 - .../string.prototype.trimleft/test/tests.js | 19 - .../string.prototype.trimright/.eslintrc | 10 - .../string.prototype.trimright/.jscs.json | 159 - .../string.prototype.trimright/.npmignore | 27 - .../string.prototype.trimright/.travis.yml | 73 - .../string.prototype.trimright/CHANGELOG.md | 15 - .../string.prototype.trimright/LICENSE | 22 - .../string.prototype.trimright/README.md | 47 - .../implementation.js | 10 - .../string.prototype.trimright/index.js | 18 - .../string.prototype.trimright/package.json | 104 - .../string.prototype.trimright/polyfill.js | 14 - .../string.prototype.trimright/shim.js | 14 - .../string.prototype.trimright/test/index.js | 17 - .../test/shimmed.js | 37 - .../string.prototype.trimright/test/tests.js | 19 - node_modules/strip-ansi/index.d.ts | 15 - node_modules/strip-ansi/index.js | 7 - node_modules/strip-ansi/license | 9 - node_modules/strip-ansi/package.json | 93 - node_modules/strip-ansi/readme.md | 61 - node_modules/strip-bom/index.js | 14 - node_modules/strip-bom/license | 21 - node_modules/strip-bom/package.json | 77 - node_modules/strip-bom/readme.md | 36 - node_modules/strip-eof/index.js | 15 - node_modules/strip-eof/license | 21 - node_modules/strip-eof/package.json | 75 - node_modules/strip-eof/readme.md | 28 - node_modules/supports-color/browser.js | 5 - node_modules/supports-color/index.js | 131 - node_modules/supports-color/license | 9 - node_modules/supports-color/package.json | 89 - node_modules/supports-color/readme.md | 66 - node_modules/symbol-tree/LICENSE | 21 - node_modules/symbol-tree/README.md | 545 - node_modules/symbol-tree/lib/SymbolTree.js | 838 - .../symbol-tree/lib/SymbolTreeNode.js | 54 - node_modules/symbol-tree/lib/TreeIterator.js | 69 - node_modules/symbol-tree/lib/TreePosition.js | 11 - node_modules/symbol-tree/package.json | 79 - node_modules/test-exclude/CHANGELOG.md | 292 - node_modules/test-exclude/LICENSE.txt | 14 - node_modules/test-exclude/README.md | 56 - node_modules/test-exclude/index.js | 186 - node_modules/test-exclude/package.json | 71 - node_modules/throat/LICENSE | 19 - node_modules/throat/README.md | 55 - node_modules/throat/index.d.ts | 5 - node_modules/throat/index.js | 116 - node_modules/throat/index.js.flow | 7 - node_modules/throat/package.json | 82 - node_modules/tmpl/.travis.yml | 3 - node_modules/tmpl/lib/tmpl.js | 17 - node_modules/tmpl/license | 28 - node_modules/tmpl/package.json | 54 - node_modules/tmpl/readme.md | 10 - node_modules/to-fast-properties/index.js | 27 - node_modules/to-fast-properties/license | 10 - node_modules/to-fast-properties/package.json | 71 - node_modules/to-fast-properties/readme.md | 37 - node_modules/to-object-path/LICENSE | 21 - node_modules/to-object-path/README.md | 71 - node_modules/to-object-path/index.js | 33 - .../node_modules/kind-of/LICENSE | 21 - .../node_modules/kind-of/README.md | 261 - .../node_modules/kind-of/index.js | 116 - .../node_modules/kind-of/package.json | 143 - node_modules/to-object-path/package.json | 85 - node_modules/to-regex-range/LICENSE | 21 - node_modules/to-regex-range/README.md | 281 - node_modules/to-regex-range/index.js | 294 - node_modules/to-regex-range/package.json | 121 - node_modules/to-regex/LICENSE | 21 - node_modules/to-regex/README.md | 205 - node_modules/to-regex/index.js | 155 - node_modules/to-regex/package.json | 101 - node_modules/tough-cookie/LICENSE | 12 - node_modules/tough-cookie/README.md | 527 - node_modules/tough-cookie/lib/cookie.js | 1482 - node_modules/tough-cookie/lib/memstore.js | 181 - node_modules/tough-cookie/lib/pathMatch.js | 61 - .../tough-cookie/lib/permuteDomain.js | 56 - .../tough-cookie/lib/pubsuffix-psl.js | 38 - node_modules/tough-cookie/lib/store.js | 75 - node_modules/tough-cookie/lib/version.js | 2 - node_modules/tough-cookie/package.json | 101 - node_modules/tr46/LICENSE.md | 21 - node_modules/tr46/README.md | 69 - node_modules/tr46/index.js | 287 - node_modules/tr46/lib/mappingTable.json | 1 - node_modules/tr46/lib/regexes.js | 29 - node_modules/tr46/package.json | 77 - node_modules/trim-right/index.js | 10 - node_modules/trim-right/license | 21 - node_modules/trim-right/package.json | 73 - node_modules/trim-right/readme.md | 30 - node_modules/ts-jest/.gitattributes | 2 - node_modules/ts-jest/.ts-jest-digest | 1 - node_modules/ts-jest/CHANGELOG.md | 475 - node_modules/ts-jest/CONTRIBUTING.md | 67 - node_modules/ts-jest/LICENSE.md | 21 - node_modules/ts-jest/README.md | 62 - node_modules/ts-jest/cli.js | 3 - .../ts-jest/dist/cli/config/init.d.ts | 1 - node_modules/ts-jest/dist/cli/config/init.js | 152 - .../ts-jest/dist/cli/config/migrate.d.ts | 1 - .../ts-jest/dist/cli/config/migrate.js | 220 - node_modules/ts-jest/dist/cli/help.d.ts | 1 - node_modules/ts-jest/dist/cli/help.js | 45 - .../ts-jest/dist/cli/helpers/presets.d.ts | 1 - .../ts-jest/dist/cli/helpers/presets.js | 39 - node_modules/ts-jest/dist/cli/index.d.ts | 1 - node_modules/ts-jest/dist/cli/index.js | 105 - node_modules/ts-jest/dist/compiler.d.ts | 1 - node_modules/ts-jest/dist/compiler.js | 233 - .../ts-jest/dist/config/config-set.d.ts | 36 - .../ts-jest/dist/config/config-set.js | 794 - .../dist/config/create-jest-preset.d.ts | 10 - .../ts-jest/dist/config/create-jest-preset.js | 23 - .../config/paths-to-module-name-mapper.d.ts | 5 - .../config/paths-to-module-name-mapper.js | 62 - node_modules/ts-jest/dist/index.d.ts | 16 - node_modules/ts-jest/dist/index.js | 74 - .../ts-jest/dist/transformers/hoist-jest.d.ts | 1 - .../ts-jest/dist/transformers/hoist-jest.js | 80 - .../ts-jest/dist/transformers/index.d.ts | 1 - .../ts-jest/dist/transformers/index.js | 11 - .../ts-jest/dist/ts-jest-transformer.d.ts | 17 - .../ts-jest/dist/ts-jest-transformer.js | 132 - node_modules/ts-jest/dist/types.d.ts | 112 - node_modules/ts-jest/dist/types.js | 2 - node_modules/ts-jest/dist/util/backports.d.ts | 1 - node_modules/ts-jest/dist/util/backports.js | 101 - node_modules/ts-jest/dist/util/exported.d.ts | 3 - node_modules/ts-jest/dist/util/exported.js | 8 - .../dist/util/get-package-version.d.ts | 1 - .../ts-jest/dist/util/get-package-version.js | 10 - node_modules/ts-jest/dist/util/importer.d.ts | 1 - node_modules/ts-jest/dist/util/importer.js | 193 - node_modules/ts-jest/dist/util/json.d.ts | 1 - node_modules/ts-jest/dist/util/json.js | 31 - .../ts-jest/dist/util/jsonable-value.d.ts | 1 - .../ts-jest/dist/util/jsonable-value.js | 34 - node_modules/ts-jest/dist/util/logger.d.ts | 1 - node_modules/ts-jest/dist/util/logger.js | 21 - node_modules/ts-jest/dist/util/memoize.d.ts | 1 - node_modules/ts-jest/dist/util/memoize.js | 47 - node_modules/ts-jest/dist/util/messages.d.ts | 1 - node_modules/ts-jest/dist/util/messages.js | 47 - .../ts-jest/dist/util/normalize-slashes.d.ts | 1 - .../ts-jest/dist/util/normalize-slashes.js | 6 - node_modules/ts-jest/dist/util/sha1.d.ts | 1 - node_modules/ts-jest/dist/util/sha1.js | 31 - node_modules/ts-jest/dist/util/testing.d.ts | 34 - node_modules/ts-jest/dist/util/testing.js | 7 - node_modules/ts-jest/dist/util/ts-error.d.ts | 1 - node_modules/ts-jest/dist/util/ts-error.js | 41 - .../ts-jest/dist/util/version-checkers.d.ts | 1 - .../ts-jest/dist/util/version-checkers.js | 63 - node_modules/ts-jest/icon.png | Bin 60539 -> 0 bytes node_modules/ts-jest/jest-preset.js | 1 - node_modules/ts-jest/node_modules/.bin/semver | 15 - .../ts-jest/node_modules/.bin/semver.cmd | 7 - .../ts-jest/node_modules/camelcase/index.js | 64 - .../ts-jest/node_modules/camelcase/license | 21 - .../node_modules/camelcase/package.json | 78 - .../ts-jest/node_modules/camelcase/readme.md | 57 - .../ts-jest/node_modules/semver/CHANGELOG.md | 39 - .../ts-jest/node_modules/semver/LICENSE | 15 - .../ts-jest/node_modules/semver/README.md | 412 - .../ts-jest/node_modules/semver/bin/semver | 160 - .../ts-jest/node_modules/semver/package.json | 64 - .../ts-jest/node_modules/semver/range.bnf | 16 - .../ts-jest/node_modules/semver/semver.js | 1483 - .../node_modules/yargs-parser/CHANGELOG.md | 353 - .../node_modules/yargs-parser/LICENSE.txt | 14 - .../node_modules/yargs-parser/README.md | 329 - .../node_modules/yargs-parser/index.js | 833 - .../yargs-parser/lib/tokenize-arg-string.js | 40 - .../node_modules/yargs-parser/package.json | 79 - node_modules/ts-jest/package.json | 171 - node_modules/ts-jest/preprocessor.js | 7 - node_modules/ts-jest/presets/create.js | 1 - .../ts-jest/presets/default/jest-preset.js | 1 - node_modules/ts-jest/presets/index.d.ts | 5 - node_modules/ts-jest/presets/index.js | 13 - .../presets/js-with-babel/jest-preset.js | 1 - .../ts-jest/presets/js-with-ts/jest-preset.js | 1 - node_modules/ts-jest/utils/index.d.ts | 1 - node_modules/ts-jest/utils/index.js | 1 - node_modules/tunnel-agent/LICENSE | 55 - node_modules/tunnel-agent/README.md | 4 - node_modules/tunnel-agent/index.js | 244 - node_modules/tunnel-agent/package.json | 59 - node_modules/tweetnacl/.npmignore | 4 - node_modules/tweetnacl/AUTHORS.md | 28 - node_modules/tweetnacl/CHANGELOG.md | 221 - node_modules/tweetnacl/LICENSE | 24 - .../tweetnacl/PULL_REQUEST_TEMPLATE.md | 20 - node_modules/tweetnacl/README.md | 459 - node_modules/tweetnacl/nacl-fast.js | 2388 - node_modules/tweetnacl/nacl-fast.min.js | 2 - node_modules/tweetnacl/nacl.d.ts | 98 - node_modules/tweetnacl/nacl.js | 1175 - node_modules/tweetnacl/nacl.min.js | 1 - node_modules/tweetnacl/package.json | 90 - node_modules/type-check/LICENSE | 22 - node_modules/type-check/README.md | 210 - node_modules/type-check/lib/check.js | 126 - node_modules/type-check/lib/index.js | 16 - node_modules/type-check/lib/parse-type.js | 196 - node_modules/type-check/package.json | 75 - node_modules/type-fest/index.d.ts | 15 - node_modules/type-fest/license | 9 - node_modules/type-fest/package.json | 87 - node_modules/type-fest/readme.md | 119 - node_modules/type-fest/source/basic.d.ts | 67 - node_modules/type-fest/source/except.d.ts | 22 - .../type-fest/source/literal-union.d.ts | 33 - .../type-fest/source/merge-exclusive.d.ts | 39 - node_modules/type-fest/source/merge.d.ts | 22 - node_modules/type-fest/source/mutable.d.ts | 22 - .../type-fest/source/package-json.d.ts | 501 - node_modules/type-fest/source/promisable.d.ts | 23 - .../type-fest/source/readonly-deep.d.ts | 59 - .../source/require-at-least-one.d.ts | 32 - node_modules/typed-rest-client/package.json | 1 + node_modules/typescript/package.json | 1 - node_modules/uglify-js/LICENSE | 29 - node_modules/uglify-js/README.md | 1138 - node_modules/uglify-js/bin/uglifyjs | 419 - node_modules/uglify-js/lib/ast.js | 988 - node_modules/uglify-js/lib/compress.js | 6927 --- node_modules/uglify-js/lib/minify.js | 245 - node_modules/uglify-js/lib/mozilla-ast.js | 629 - node_modules/uglify-js/lib/output.js | 1510 - node_modules/uglify-js/lib/parse.js | 1645 - node_modules/uglify-js/lib/propmangle.js | 234 - node_modules/uglify-js/lib/scope.js | 594 - node_modules/uglify-js/lib/sourcemap.js | 104 - node_modules/uglify-js/lib/transform.js | 185 - node_modules/uglify-js/lib/utils.js | 277 - node_modules/uglify-js/package.json | 108 - node_modules/uglify-js/tools/domprops.json | 6841 --- node_modules/uglify-js/tools/exit.js | 15 - node_modules/uglify-js/tools/exports.js | 6 - node_modules/uglify-js/tools/node.js | 78 - node_modules/uglify-js/tools/props.html | 540 - node_modules/union-value/LICENSE | 21 - node_modules/union-value/README.md | 73 - node_modules/union-value/index.js | 30 - node_modules/union-value/package.json | 105 - node_modules/unset-value/LICENSE | 21 - node_modules/unset-value/README.md | 131 - node_modules/unset-value/index.js | 32 - .../node_modules/has-value/LICENSE | 21 - .../node_modules/has-value/README.md | 130 - .../node_modules/has-value/index.js | 19 - .../has-value/node_modules/isobject/LICENSE | 21 - .../has-value/node_modules/isobject/README.md | 112 - .../has-value/node_modules/isobject/index.js | 14 - .../node_modules/isobject/package.json | 102 - .../node_modules/has-value/package.json | 118 - .../node_modules/has-values/LICENSE | 21 - .../node_modules/has-values/README.md | 114 - .../node_modules/has-values/index.js | 36 - .../node_modules/has-values/package.json | 110 - node_modules/unset-value/package.json | 116 - node_modules/uri-js/README.md | 199 - node_modules/uri-js/bower.json | 47 - node_modules/uri-js/dist/es5/uri.all.d.ts | 59 - node_modules/uri-js/dist/es5/uri.all.js | 1389 - node_modules/uri-js/dist/es5/uri.all.js.map | 1 - node_modules/uri-js/dist/es5/uri.all.min.d.ts | 59 - node_modules/uri-js/dist/es5/uri.all.min.js | 3 - .../uri-js/dist/es5/uri.all.min.js.map | 1 - node_modules/uri-js/dist/esnext/index.d.ts | 1 - node_modules/uri-js/dist/esnext/index.js | 13 - node_modules/uri-js/dist/esnext/index.js.map | 1 - .../uri-js/dist/esnext/regexps-iri.d.ts | 3 - .../uri-js/dist/esnext/regexps-iri.js | 3 - .../uri-js/dist/esnext/regexps-iri.js.map | 1 - .../uri-js/dist/esnext/regexps-uri.d.ts | 4 - .../uri-js/dist/esnext/regexps-uri.js | 42 - .../uri-js/dist/esnext/regexps-uri.js.map | 1 - .../uri-js/dist/esnext/schemes/http.d.ts | 3 - .../uri-js/dist/esnext/schemes/http.js | 27 - .../uri-js/dist/esnext/schemes/http.js.map | 1 - .../uri-js/dist/esnext/schemes/https.d.ts | 3 - .../uri-js/dist/esnext/schemes/https.js | 9 - .../uri-js/dist/esnext/schemes/https.js.map | 1 - .../uri-js/dist/esnext/schemes/mailto.d.ts | 12 - .../uri-js/dist/esnext/schemes/mailto.js | 148 - .../uri-js/dist/esnext/schemes/mailto.js.map | 1 - .../uri-js/dist/esnext/schemes/urn-uuid.d.ts | 7 - .../uri-js/dist/esnext/schemes/urn-uuid.js | 23 - .../dist/esnext/schemes/urn-uuid.js.map | 1 - .../uri-js/dist/esnext/schemes/urn.d.ts | 10 - .../uri-js/dist/esnext/schemes/urn.js | 49 - .../uri-js/dist/esnext/schemes/urn.js.map | 1 - node_modules/uri-js/dist/esnext/uri.d.ts | 59 - node_modules/uri-js/dist/esnext/uri.js | 480 - node_modules/uri-js/dist/esnext/uri.js.map | 1 - node_modules/uri-js/dist/esnext/util.d.ts | 6 - node_modules/uri-js/dist/esnext/util.js | 36 - node_modules/uri-js/dist/esnext/util.js.map | 1 - node_modules/uri-js/package.json | 97 - node_modules/uri-js/rollup.config.js | 32 - node_modules/uri-js/src/index.ts | 18 - node_modules/uri-js/src/punycode.d.ts | 24 - node_modules/uri-js/src/regexps-iri.ts | 4 - node_modules/uri-js/src/regexps-uri.ts | 89 - node_modules/uri-js/src/schemes/http.ts | 36 - node_modules/uri-js/src/schemes/https.ts | 11 - node_modules/uri-js/src/schemes/mailto.ts | 182 - node_modules/uri-js/src/schemes/urn-uuid.ts | 36 - node_modules/uri-js/src/schemes/urn.ts | 69 - node_modules/uri-js/src/uri.ts | 556 - node_modules/uri-js/src/util.ts | 40 - node_modules/uri-js/tests/qunit.css | 118 - node_modules/uri-js/tests/qunit.js | 1042 - node_modules/uri-js/tests/test-es5-min.html | 17 - node_modules/uri-js/tests/test-es5.html | 17 - node_modules/uri-js/tests/tests.js | 774 - node_modules/uri-js/tsconfig.json | 20 - node_modules/uri-js/yarn.lock | 1902 - node_modules/urix/.jshintrc | 42 - node_modules/urix/LICENSE | 21 - node_modules/urix/index.js | 17 - node_modules/urix/package.json | 63 - node_modules/urix/readme.md | 46 - node_modules/urix/test/index.js | 43 - node_modules/use/LICENSE | 21 - node_modules/use/README.md | 90 - node_modules/use/index.js | 155 - node_modules/use/package.json | 112 - node_modules/util.promisify/.eslintrc | 16 - node_modules/util.promisify/.npmignore | 61 - node_modules/util.promisify/.travis.yml | 182 - node_modules/util.promisify/CHANGELOG.md | 3 - node_modules/util.promisify/LICENSE | 21 - node_modules/util.promisify/README.md | 8 - node_modules/util.promisify/implementation.js | 86 - node_modules/util.promisify/index.js | 24 - node_modules/util.promisify/package.json | 73 - node_modules/util.promisify/polyfill.js | 11 - node_modules/util.promisify/shim.js | 13 - .../validate-npm-package-license/LICENSE | 202 - .../validate-npm-package-license/README.md | 113 - .../validate-npm-package-license/index.js | 86 - .../validate-npm-package-license/package.json | 71 - node_modules/verror/.npmignore | 9 - node_modules/verror/CHANGES.md | 28 - node_modules/verror/CONTRIBUTING.md | 19 - node_modules/verror/LICENSE | 19 - node_modules/verror/README.md | 528 - node_modules/verror/lib/verror.js | 451 - node_modules/verror/package.json | 55 - node_modules/w3c-hr-time/CHANGELOG.md | 11 - node_modules/w3c-hr-time/README.md | 119 - node_modules/w3c-hr-time/index.js | 11 - .../w3c-hr-time/lib/calculate-clock-offset.js | 37 - .../w3c-hr-time/lib/clock-is-accurate.js | 61 - .../w3c-hr-time/lib/global-monotonic-clock.js | 10 - node_modules/w3c-hr-time/lib/performance.js | 53 - node_modules/w3c-hr-time/lib/utils.js | 11 - node_modules/w3c-hr-time/package.json | 65 - node_modules/walker/.travis.yml | 3 - node_modules/walker/LICENSE | 13 - node_modules/walker/lib/walker.js | 111 - node_modules/walker/package.json | 63 - node_modules/walker/readme.md | 52 - node_modules/webidl-conversions/LICENSE.md | 12 - node_modules/webidl-conversions/README.md | 80 - node_modules/webidl-conversions/lib/index.js | 332 - node_modules/webidl-conversions/package.json | 70 - node_modules/whatwg-encoding/LICENSE.txt | 7 - node_modules/whatwg-encoding/README.md | 50 - .../whatwg-encoding/lib/labels-to-names.json | 207 - .../whatwg-encoding/lib/supported-names.json | 37 - .../whatwg-encoding/lib/whatwg-encoding.js | 47 - node_modules/whatwg-encoding/package.json | 70 - node_modules/whatwg-mimetype/LICENSE.txt | 7 - node_modules/whatwg-mimetype/README.md | 101 - node_modules/whatwg-mimetype/lib/mime-type.js | 191 - node_modules/whatwg-mimetype/lib/parser.js | 124 - .../whatwg-mimetype/lib/serializer.js | 25 - node_modules/whatwg-mimetype/lib/utils.js | 25 - node_modules/whatwg-mimetype/package.json | 84 - node_modules/whatwg-url/LICENSE.txt | 21 - node_modules/whatwg-url/README.md | 68 - node_modules/whatwg-url/lib/URL-impl.js | 217 - node_modules/whatwg-url/lib/URL.js | 396 - .../whatwg-url/lib/URLSearchParams-impl.js | 122 - .../whatwg-url/lib/URLSearchParams.js | 449 - node_modules/whatwg-url/lib/infra.js | 24 - node_modules/whatwg-url/lib/public-api.js | 16 - .../whatwg-url/lib/url-state-machine.js | 1299 - node_modules/whatwg-url/lib/urlencoded.js | 138 - node_modules/whatwg-url/lib/utils.js | 125 - node_modules/whatwg-url/package.json | 95 - node_modules/which-module/CHANGELOG.md | 26 - node_modules/which-module/LICENSE | 13 - node_modules/which-module/README.md | 55 - node_modules/which-module/index.js | 9 - node_modules/which-module/package.json | 72 - node_modules/which/CHANGELOG.md | 152 - node_modules/which/LICENSE | 15 - node_modules/which/README.md | 51 - node_modules/which/bin/which | 52 - node_modules/which/package.json | 70 - node_modules/which/which.js | 135 - node_modules/wordwrap/LICENSE | 18 - node_modules/wordwrap/README.markdown | 70 - node_modules/wordwrap/example/center.js | 10 - node_modules/wordwrap/example/meat.js | 3 - node_modules/wordwrap/index.js | 76 - node_modules/wordwrap/package.json | 70 - node_modules/wordwrap/test/break.js | 30 - node_modules/wordwrap/test/idleness.txt | 63 - node_modules/wordwrap/test/wrap.js | 31 - node_modules/wrap-ansi/index.js | 188 - node_modules/wrap-ansi/license | 9 - node_modules/wrap-ansi/package.json | 97 - node_modules/wrap-ansi/readme.md | 108 - node_modules/wrappy/LICENSE | 15 - node_modules/wrappy/README.md | 36 - node_modules/wrappy/package.json | 63 - node_modules/wrappy/wrappy.js | 33 - node_modules/write-file-atomic/CHANGELOG.md | 15 - node_modules/write-file-atomic/LICENSE | 6 - node_modules/write-file-atomic/README.md | 56 - node_modules/write-file-atomic/index.js | 222 - node_modules/write-file-atomic/package.json | 71 - node_modules/ws/LICENSE | 21 - node_modules/ws/README.md | 417 - node_modules/ws/index.js | 9 - node_modules/ws/lib/buffer-util.js | 72 - node_modules/ws/lib/constants.js | 10 - node_modules/ws/lib/event-target.js | 170 - node_modules/ws/lib/extension.js | 211 - node_modules/ws/lib/permessage-deflate.js | 516 - node_modules/ws/lib/receiver.js | 513 - node_modules/ws/lib/sender.js | 401 - node_modules/ws/lib/validation.js | 29 - node_modules/ws/lib/websocket-server.js | 357 - node_modules/ws/lib/websocket.js | 828 - node_modules/ws/package.json | 82 - node_modules/xml-name-validator/LICENSE.txt | 176 - node_modules/xml-name-validator/README.md | 36 - .../lib/generated-parser.js | 504 - .../xml-name-validator/lib/grammar.pegjs | 35 - .../lib/xml-name-validator.js | 17 - node_modules/xml-name-validator/package.json | 68 - node_modules/y18n/CHANGELOG.md | 21 - node_modules/y18n/LICENSE | 13 - node_modules/y18n/README.md | 109 - node_modules/y18n/index.js | 188 - node_modules/y18n/package.json | 71 - node_modules/yargs-parser/CHANGELOG.md | 467 - node_modules/yargs-parser/LICENSE.txt | 14 - node_modules/yargs-parser/README.md | 396 - node_modules/yargs-parser/index.js | 903 - .../yargs-parser/lib/tokenize-arg-string.js | 40 - node_modules/yargs-parser/package.json | 83 - node_modules/yargs/CHANGELOG.md | 1335 - node_modules/yargs/LICENSE | 22 - node_modules/yargs/README.md | 122 - node_modules/yargs/index.js | 32 - node_modules/yargs/lib/apply-extends.js | 53 - node_modules/yargs/lib/argsert.js | 68 - node_modules/yargs/lib/command.js | 437 - .../yargs/lib/completion-templates.js | 49 - node_modules/yargs/lib/completion.js | 115 - node_modules/yargs/lib/decamelize.js | 32 - node_modules/yargs/lib/is-promise.js | 3 - node_modules/yargs/lib/levenshtein.js | 58 - node_modules/yargs/lib/middleware.js | 65 - node_modules/yargs/lib/obj-filter.js | 11 - node_modules/yargs/lib/usage.js | 540 - node_modules/yargs/lib/validation.js | 341 - node_modules/yargs/lib/yerror.js | 11 - node_modules/yargs/locales/be.json | 39 - node_modules/yargs/locales/de.json | 39 - node_modules/yargs/locales/en.json | 42 - node_modules/yargs/locales/es.json | 39 - node_modules/yargs/locales/fr.json | 37 - node_modules/yargs/locales/hi.json | 42 - node_modules/yargs/locales/hu.json | 39 - node_modules/yargs/locales/id.json | 43 - node_modules/yargs/locales/it.json | 39 - node_modules/yargs/locales/ja.json | 42 - node_modules/yargs/locales/ko.json | 42 - node_modules/yargs/locales/nb.json | 37 - node_modules/yargs/locales/nl.json | 42 - node_modules/yargs/locales/nn.json | 39 - node_modules/yargs/locales/pirate.json | 13 - node_modules/yargs/locales/pl.json | 42 - node_modules/yargs/locales/pt.json | 38 - node_modules/yargs/locales/pt_BR.json | 42 - node_modules/yargs/locales/ru.json | 39 - node_modules/yargs/locales/th.json | 39 - node_modules/yargs/locales/tr.json | 41 - node_modules/yargs/locales/zh_CN.json | 41 - node_modules/yargs/locales/zh_TW.json | 40 - node_modules/yargs/package.json | 111 - node_modules/yargs/yargs.js | 1206 - package-lock.json | 37 +- package.json | 2 +- src/install.ts | 168 +- src/linux.sh | 2 + src/windows.ps1 | 26 +- 6842 files changed, 266 insertions(+), 1017047 deletions(-) delete mode 100644 node_modules/.bin/acorn delete mode 100644 node_modules/.bin/acorn.cmd delete mode 100644 node_modules/.bin/atob delete mode 100644 node_modules/.bin/atob.cmd delete mode 100644 node_modules/.bin/escodegen delete mode 100644 node_modules/.bin/escodegen.cmd delete mode 100644 node_modules/.bin/esgenerate delete mode 100644 node_modules/.bin/esgenerate.cmd delete mode 100644 node_modules/.bin/esparse delete mode 100644 node_modules/.bin/esparse.cmd delete mode 100644 node_modules/.bin/esvalidate delete mode 100644 node_modules/.bin/esvalidate.cmd delete mode 100644 node_modules/.bin/handlebars delete mode 100644 node_modules/.bin/handlebars.cmd delete mode 100644 node_modules/.bin/husky-upgrade delete mode 100644 node_modules/.bin/husky-upgrade.cmd delete mode 100644 node_modules/.bin/import-local-fixture delete mode 100644 node_modules/.bin/import-local-fixture.cmd delete mode 100644 node_modules/.bin/is-ci delete mode 100644 node_modules/.bin/is-ci.cmd delete mode 100644 node_modules/.bin/jest delete mode 100644 node_modules/.bin/jest-runtime delete mode 100644 node_modules/.bin/jest-runtime.cmd delete mode 100644 node_modules/.bin/jest.cmd delete mode 100644 node_modules/.bin/js-yaml delete mode 100644 node_modules/.bin/js-yaml.cmd delete mode 100644 node_modules/.bin/jsesc delete mode 100644 node_modules/.bin/jsesc.cmd delete mode 100644 node_modules/.bin/json5 delete mode 100644 node_modules/.bin/json5.cmd delete mode 100644 node_modules/.bin/loose-envify delete mode 100644 node_modules/.bin/loose-envify.cmd delete mode 100644 node_modules/.bin/mkdirp delete mode 100644 node_modules/.bin/mkdirp.cmd delete mode 100644 node_modules/.bin/parser delete mode 100644 node_modules/.bin/parser.cmd delete mode 100644 node_modules/.bin/prettier delete mode 100644 node_modules/.bin/prettier.cmd delete mode 100644 node_modules/.bin/rimraf delete mode 100644 node_modules/.bin/rimraf.cmd delete mode 100644 node_modules/.bin/run-node delete mode 100644 node_modules/.bin/run-node.cmd delete mode 100644 node_modules/.bin/sane delete mode 100644 node_modules/.bin/sane.cmd delete mode 100644 node_modules/.bin/sshpk-conv delete mode 100644 node_modules/.bin/sshpk-conv.cmd delete mode 100644 node_modules/.bin/sshpk-sign delete mode 100644 node_modules/.bin/sshpk-sign.cmd delete mode 100644 node_modules/.bin/sshpk-verify delete mode 100644 node_modules/.bin/sshpk-verify.cmd delete mode 100644 node_modules/.bin/ts-jest delete mode 100644 node_modules/.bin/ts-jest.cmd delete mode 100644 node_modules/.bin/uglifyjs delete mode 100644 node_modules/.bin/uglifyjs.cmd delete mode 100644 node_modules/.bin/watch delete mode 100644 node_modules/.bin/watch.cmd delete mode 100644 node_modules/.bin/which delete mode 100644 node_modules/.bin/which.cmd delete mode 100644 node_modules/@babel/code-frame/LICENSE delete mode 100644 node_modules/@babel/code-frame/README.md delete mode 100644 node_modules/@babel/code-frame/lib/index.js delete mode 100644 node_modules/@babel/code-frame/package.json delete mode 100644 node_modules/@babel/core/LICENSE delete mode 100644 node_modules/@babel/core/README.md delete mode 100644 node_modules/@babel/core/lib/config/caching.js delete mode 100644 node_modules/@babel/core/lib/config/config-chain.js delete mode 100644 node_modules/@babel/core/lib/config/config-descriptors.js delete mode 100644 node_modules/@babel/core/lib/config/files/configuration.js delete mode 100644 node_modules/@babel/core/lib/config/files/index-browser.js delete mode 100644 node_modules/@babel/core/lib/config/files/index.js delete mode 100644 node_modules/@babel/core/lib/config/files/package.js delete mode 100644 node_modules/@babel/core/lib/config/files/plugins.js delete mode 100644 node_modules/@babel/core/lib/config/files/types.js delete mode 100644 node_modules/@babel/core/lib/config/files/utils.js delete mode 100644 node_modules/@babel/core/lib/config/full.js delete mode 100644 node_modules/@babel/core/lib/config/helpers/config-api.js delete mode 100644 node_modules/@babel/core/lib/config/helpers/environment.js delete mode 100644 node_modules/@babel/core/lib/config/index.js delete mode 100644 node_modules/@babel/core/lib/config/item.js delete mode 100644 node_modules/@babel/core/lib/config/partial.js delete mode 100644 node_modules/@babel/core/lib/config/pattern-to-regex.js delete mode 100644 node_modules/@babel/core/lib/config/plugin.js delete mode 100644 node_modules/@babel/core/lib/config/util.js delete mode 100644 node_modules/@babel/core/lib/config/validation/option-assertions.js delete mode 100644 node_modules/@babel/core/lib/config/validation/options.js delete mode 100644 node_modules/@babel/core/lib/config/validation/plugins.js delete mode 100644 node_modules/@babel/core/lib/config/validation/removed.js delete mode 100644 node_modules/@babel/core/lib/index.js delete mode 100644 node_modules/@babel/core/lib/parse.js delete mode 100644 node_modules/@babel/core/lib/tools/build-external-helpers.js delete mode 100644 node_modules/@babel/core/lib/transform-ast.js delete mode 100644 node_modules/@babel/core/lib/transform-file-browser.js delete mode 100644 node_modules/@babel/core/lib/transform-file.js delete mode 100644 node_modules/@babel/core/lib/transform.js delete mode 100644 node_modules/@babel/core/lib/transformation/block-hoist-plugin.js delete mode 100644 node_modules/@babel/core/lib/transformation/file/file.js delete mode 100644 node_modules/@babel/core/lib/transformation/file/generate.js delete mode 100644 node_modules/@babel/core/lib/transformation/file/merge-map.js delete mode 100644 node_modules/@babel/core/lib/transformation/index.js delete mode 100644 node_modules/@babel/core/lib/transformation/normalize-file.js delete mode 100644 node_modules/@babel/core/lib/transformation/normalize-opts.js delete mode 100644 node_modules/@babel/core/lib/transformation/plugin-pass.js delete mode 100644 node_modules/@babel/core/lib/transformation/util/missing-plugin-helper.js delete mode 100644 node_modules/@babel/core/node_modules/.bin/semver delete mode 100644 node_modules/@babel/core/node_modules/.bin/semver.cmd delete mode 100644 node_modules/@babel/core/node_modules/debug/CHANGELOG.md delete mode 100644 node_modules/@babel/core/node_modules/debug/LICENSE delete mode 100644 node_modules/@babel/core/node_modules/debug/README.md delete mode 100644 node_modules/@babel/core/node_modules/debug/dist/debug.js delete mode 100644 node_modules/@babel/core/node_modules/debug/package.json delete mode 100644 node_modules/@babel/core/node_modules/debug/src/browser.js delete mode 100644 node_modules/@babel/core/node_modules/debug/src/common.js delete mode 100644 node_modules/@babel/core/node_modules/debug/src/index.js delete mode 100644 node_modules/@babel/core/node_modules/debug/src/node.js delete mode 100644 node_modules/@babel/core/node_modules/ms/index.js delete mode 100644 node_modules/@babel/core/node_modules/ms/license.md delete mode 100644 node_modules/@babel/core/node_modules/ms/package.json delete mode 100644 node_modules/@babel/core/node_modules/ms/readme.md delete mode 100644 node_modules/@babel/core/node_modules/semver/CHANGELOG.md delete mode 100644 node_modules/@babel/core/node_modules/semver/LICENSE delete mode 100644 node_modules/@babel/core/node_modules/semver/README.md delete mode 100644 node_modules/@babel/core/node_modules/semver/bin/semver delete mode 100644 node_modules/@babel/core/node_modules/semver/package.json delete mode 100644 node_modules/@babel/core/node_modules/semver/range.bnf delete mode 100644 node_modules/@babel/core/node_modules/semver/semver.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/CHANGELOG.md delete mode 100644 node_modules/@babel/core/node_modules/source-map/LICENSE delete mode 100644 node_modules/@babel/core/node_modules/source-map/README.md delete mode 100644 node_modules/@babel/core/node_modules/source-map/dist/source-map.debug.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/dist/source-map.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/dist/source-map.min.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/dist/source-map.min.js.map delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/array-set.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/base64-vlq.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/base64.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/binary-search.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/mapping-list.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/quick-sort.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/source-map-consumer.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/source-map-generator.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/source-node.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/lib/util.js delete mode 100644 node_modules/@babel/core/node_modules/source-map/package.json delete mode 100644 node_modules/@babel/core/node_modules/source-map/source-map.js delete mode 100644 node_modules/@babel/core/package.json delete mode 100644 node_modules/@babel/generator/LICENSE delete mode 100644 node_modules/@babel/generator/README.md delete mode 100644 node_modules/@babel/generator/lib/buffer.js delete mode 100644 node_modules/@babel/generator/lib/generators/base.js delete mode 100644 node_modules/@babel/generator/lib/generators/classes.js delete mode 100644 node_modules/@babel/generator/lib/generators/expressions.js delete mode 100644 node_modules/@babel/generator/lib/generators/flow.js delete mode 100644 node_modules/@babel/generator/lib/generators/index.js delete mode 100644 node_modules/@babel/generator/lib/generators/jsx.js delete mode 100644 node_modules/@babel/generator/lib/generators/methods.js delete mode 100644 node_modules/@babel/generator/lib/generators/modules.js delete mode 100644 node_modules/@babel/generator/lib/generators/statements.js delete mode 100644 node_modules/@babel/generator/lib/generators/template-literals.js delete mode 100644 node_modules/@babel/generator/lib/generators/types.js delete mode 100644 node_modules/@babel/generator/lib/generators/typescript.js delete mode 100644 node_modules/@babel/generator/lib/index.js delete mode 100644 node_modules/@babel/generator/lib/node/index.js delete mode 100644 node_modules/@babel/generator/lib/node/parentheses.js delete mode 100644 node_modules/@babel/generator/lib/node/whitespace.js delete mode 100644 node_modules/@babel/generator/lib/printer.js delete mode 100644 node_modules/@babel/generator/lib/source-map.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/CHANGELOG.md delete mode 100644 node_modules/@babel/generator/node_modules/source-map/LICENSE delete mode 100644 node_modules/@babel/generator/node_modules/source-map/README.md delete mode 100644 node_modules/@babel/generator/node_modules/source-map/dist/source-map.debug.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/dist/source-map.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js.map delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/array-set.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/base64-vlq.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/base64.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/binary-search.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/mapping-list.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/quick-sort.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/source-map-consumer.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/source-map-generator.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/source-node.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/lib/util.js delete mode 100644 node_modules/@babel/generator/node_modules/source-map/package.json delete mode 100644 node_modules/@babel/generator/node_modules/source-map/source-map.js delete mode 100644 node_modules/@babel/generator/package.json delete mode 100644 node_modules/@babel/helper-function-name/LICENSE delete mode 100644 node_modules/@babel/helper-function-name/README.md delete mode 100644 node_modules/@babel/helper-function-name/lib/index.js delete mode 100644 node_modules/@babel/helper-function-name/package.json delete mode 100644 node_modules/@babel/helper-get-function-arity/LICENSE delete mode 100644 node_modules/@babel/helper-get-function-arity/README.md delete mode 100644 node_modules/@babel/helper-get-function-arity/lib/index.js delete mode 100644 node_modules/@babel/helper-get-function-arity/package.json delete mode 100644 node_modules/@babel/helper-plugin-utils/LICENSE delete mode 100644 node_modules/@babel/helper-plugin-utils/README.md delete mode 100644 node_modules/@babel/helper-plugin-utils/lib/index.js delete mode 100644 node_modules/@babel/helper-plugin-utils/package.json delete mode 100644 node_modules/@babel/helper-plugin-utils/src/index.js delete mode 100644 node_modules/@babel/helper-split-export-declaration/LICENSE delete mode 100644 node_modules/@babel/helper-split-export-declaration/README.md delete mode 100644 node_modules/@babel/helper-split-export-declaration/lib/index.js delete mode 100644 node_modules/@babel/helper-split-export-declaration/package.json delete mode 100644 node_modules/@babel/helpers/LICENSE delete mode 100644 node_modules/@babel/helpers/README.md delete mode 100644 node_modules/@babel/helpers/lib/helpers.js delete mode 100644 node_modules/@babel/helpers/lib/index.js delete mode 100644 node_modules/@babel/helpers/package.json delete mode 100644 node_modules/@babel/highlight/LICENSE delete mode 100644 node_modules/@babel/highlight/README.md delete mode 100644 node_modules/@babel/highlight/lib/index.js delete mode 100644 node_modules/@babel/highlight/package.json delete mode 100644 node_modules/@babel/parser/CHANGELOG.md delete mode 100644 node_modules/@babel/parser/LICENSE delete mode 100644 node_modules/@babel/parser/README.md delete mode 100644 node_modules/@babel/parser/bin/babel-parser.js delete mode 100644 node_modules/@babel/parser/lib/index.js delete mode 100644 node_modules/@babel/parser/package.json delete mode 100644 node_modules/@babel/parser/typings/babel-parser.d.ts delete mode 100644 node_modules/@babel/plugin-syntax-object-rest-spread/LICENSE delete mode 100644 node_modules/@babel/plugin-syntax-object-rest-spread/README.md delete mode 100644 node_modules/@babel/plugin-syntax-object-rest-spread/lib/index.js delete mode 100644 node_modules/@babel/plugin-syntax-object-rest-spread/package.json delete mode 100644 node_modules/@babel/template/LICENSE delete mode 100644 node_modules/@babel/template/README.md delete mode 100644 node_modules/@babel/template/lib/builder.js delete mode 100644 node_modules/@babel/template/lib/formatters.js delete mode 100644 node_modules/@babel/template/lib/index.js delete mode 100644 node_modules/@babel/template/lib/literal.js delete mode 100644 node_modules/@babel/template/lib/options.js delete mode 100644 node_modules/@babel/template/lib/parse.js delete mode 100644 node_modules/@babel/template/lib/populate.js delete mode 100644 node_modules/@babel/template/lib/string.js delete mode 100644 node_modules/@babel/template/package.json delete mode 100644 node_modules/@babel/traverse/LICENSE delete mode 100644 node_modules/@babel/traverse/README.md delete mode 100644 node_modules/@babel/traverse/lib/cache.js delete mode 100644 node_modules/@babel/traverse/lib/context.js delete mode 100644 node_modules/@babel/traverse/lib/hub.js delete mode 100644 node_modules/@babel/traverse/lib/index.js delete mode 100644 node_modules/@babel/traverse/lib/path/ancestry.js delete mode 100644 node_modules/@babel/traverse/lib/path/comments.js delete mode 100644 node_modules/@babel/traverse/lib/path/context.js delete mode 100644 node_modules/@babel/traverse/lib/path/conversion.js delete mode 100644 node_modules/@babel/traverse/lib/path/evaluation.js delete mode 100644 node_modules/@babel/traverse/lib/path/family.js delete mode 100644 node_modules/@babel/traverse/lib/path/index.js delete mode 100644 node_modules/@babel/traverse/lib/path/inference/index.js delete mode 100644 node_modules/@babel/traverse/lib/path/inference/inferer-reference.js delete mode 100644 node_modules/@babel/traverse/lib/path/inference/inferers.js delete mode 100644 node_modules/@babel/traverse/lib/path/introspection.js delete mode 100644 node_modules/@babel/traverse/lib/path/lib/hoister.js delete mode 100644 node_modules/@babel/traverse/lib/path/lib/removal-hooks.js delete mode 100644 node_modules/@babel/traverse/lib/path/lib/virtual-types.js delete mode 100644 node_modules/@babel/traverse/lib/path/modification.js delete mode 100644 node_modules/@babel/traverse/lib/path/removal.js delete mode 100644 node_modules/@babel/traverse/lib/path/replacement.js delete mode 100644 node_modules/@babel/traverse/lib/scope/binding.js delete mode 100644 node_modules/@babel/traverse/lib/scope/index.js delete mode 100644 node_modules/@babel/traverse/lib/scope/lib/renamer.js delete mode 100644 node_modules/@babel/traverse/lib/visitors.js delete mode 100644 node_modules/@babel/traverse/node_modules/debug/CHANGELOG.md delete mode 100644 node_modules/@babel/traverse/node_modules/debug/LICENSE delete mode 100644 node_modules/@babel/traverse/node_modules/debug/README.md delete mode 100644 node_modules/@babel/traverse/node_modules/debug/dist/debug.js delete mode 100644 node_modules/@babel/traverse/node_modules/debug/package.json delete mode 100644 node_modules/@babel/traverse/node_modules/debug/src/browser.js delete mode 100644 node_modules/@babel/traverse/node_modules/debug/src/common.js delete mode 100644 node_modules/@babel/traverse/node_modules/debug/src/index.js delete mode 100644 node_modules/@babel/traverse/node_modules/debug/src/node.js delete mode 100644 node_modules/@babel/traverse/node_modules/ms/index.js delete mode 100644 node_modules/@babel/traverse/node_modules/ms/license.md delete mode 100644 node_modules/@babel/traverse/node_modules/ms/package.json delete mode 100644 node_modules/@babel/traverse/node_modules/ms/readme.md delete mode 100644 node_modules/@babel/traverse/package.json delete mode 100644 node_modules/@babel/types/LICENSE delete mode 100644 node_modules/@babel/types/README.md delete mode 100644 node_modules/@babel/types/lib/asserts/assertNode.js delete mode 100644 node_modules/@babel/types/lib/asserts/generated/index.js delete mode 100644 node_modules/@babel/types/lib/builders/builder.js delete mode 100644 node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js delete mode 100644 node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js delete mode 100644 node_modules/@babel/types/lib/builders/generated/index.js delete mode 100644 node_modules/@babel/types/lib/builders/react/buildChildren.js delete mode 100644 node_modules/@babel/types/lib/clone/clone.js delete mode 100644 node_modules/@babel/types/lib/clone/cloneDeep.js delete mode 100644 node_modules/@babel/types/lib/clone/cloneNode.js delete mode 100644 node_modules/@babel/types/lib/clone/cloneWithoutLoc.js delete mode 100644 node_modules/@babel/types/lib/comments/addComment.js delete mode 100644 node_modules/@babel/types/lib/comments/addComments.js delete mode 100644 node_modules/@babel/types/lib/comments/inheritInnerComments.js delete mode 100644 node_modules/@babel/types/lib/comments/inheritLeadingComments.js delete mode 100644 node_modules/@babel/types/lib/comments/inheritTrailingComments.js delete mode 100644 node_modules/@babel/types/lib/comments/inheritsComments.js delete mode 100644 node_modules/@babel/types/lib/comments/removeComments.js delete mode 100644 node_modules/@babel/types/lib/constants/generated/index.js delete mode 100644 node_modules/@babel/types/lib/constants/index.js delete mode 100644 node_modules/@babel/types/lib/converters/ensureBlock.js delete mode 100644 node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js delete mode 100644 node_modules/@babel/types/lib/converters/toBindingIdentifierName.js delete mode 100644 node_modules/@babel/types/lib/converters/toBlock.js delete mode 100644 node_modules/@babel/types/lib/converters/toComputedKey.js delete mode 100644 node_modules/@babel/types/lib/converters/toExpression.js delete mode 100644 node_modules/@babel/types/lib/converters/toIdentifier.js delete mode 100644 node_modules/@babel/types/lib/converters/toKeyAlias.js delete mode 100644 node_modules/@babel/types/lib/converters/toSequenceExpression.js delete mode 100644 node_modules/@babel/types/lib/converters/toStatement.js delete mode 100644 node_modules/@babel/types/lib/converters/valueToNode.js delete mode 100644 node_modules/@babel/types/lib/definitions/core.js delete mode 100644 node_modules/@babel/types/lib/definitions/es2015.js delete mode 100644 node_modules/@babel/types/lib/definitions/experimental.js delete mode 100644 node_modules/@babel/types/lib/definitions/flow.js delete mode 100644 node_modules/@babel/types/lib/definitions/index.js delete mode 100644 node_modules/@babel/types/lib/definitions/jsx.js delete mode 100644 node_modules/@babel/types/lib/definitions/misc.js delete mode 100644 node_modules/@babel/types/lib/definitions/placeholders.js delete mode 100644 node_modules/@babel/types/lib/definitions/typescript.js delete mode 100644 node_modules/@babel/types/lib/definitions/utils.js delete mode 100644 node_modules/@babel/types/lib/index.d.ts delete mode 100644 node_modules/@babel/types/lib/index.js delete mode 100644 node_modules/@babel/types/lib/index.js.flow delete mode 100644 node_modules/@babel/types/lib/modifications/appendToMemberExpression.js delete mode 100644 node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js delete mode 100644 node_modules/@babel/types/lib/modifications/inherits.js delete mode 100644 node_modules/@babel/types/lib/modifications/prependToMemberExpression.js delete mode 100644 node_modules/@babel/types/lib/modifications/removeProperties.js delete mode 100644 node_modules/@babel/types/lib/modifications/removePropertiesDeep.js delete mode 100644 node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js delete mode 100644 node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js delete mode 100644 node_modules/@babel/types/lib/traverse/traverse.js delete mode 100644 node_modules/@babel/types/lib/traverse/traverseFast.js delete mode 100644 node_modules/@babel/types/lib/utils/inherit.js delete mode 100644 node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js delete mode 100644 node_modules/@babel/types/lib/utils/shallowEqual.js delete mode 100644 node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js delete mode 100644 node_modules/@babel/types/lib/validators/generated/index.js delete mode 100644 node_modules/@babel/types/lib/validators/is.js delete mode 100644 node_modules/@babel/types/lib/validators/isBinding.js delete mode 100644 node_modules/@babel/types/lib/validators/isBlockScoped.js delete mode 100644 node_modules/@babel/types/lib/validators/isImmutable.js delete mode 100644 node_modules/@babel/types/lib/validators/isLet.js delete mode 100644 node_modules/@babel/types/lib/validators/isNode.js delete mode 100644 node_modules/@babel/types/lib/validators/isNodesEquivalent.js delete mode 100644 node_modules/@babel/types/lib/validators/isPlaceholderType.js delete mode 100644 node_modules/@babel/types/lib/validators/isReferenced.js delete mode 100644 node_modules/@babel/types/lib/validators/isScope.js delete mode 100644 node_modules/@babel/types/lib/validators/isSpecifierDefault.js delete mode 100644 node_modules/@babel/types/lib/validators/isType.js delete mode 100644 node_modules/@babel/types/lib/validators/isValidES3Identifier.js delete mode 100644 node_modules/@babel/types/lib/validators/isValidIdentifier.js delete mode 100644 node_modules/@babel/types/lib/validators/isVar.js delete mode 100644 node_modules/@babel/types/lib/validators/matchesPattern.js delete mode 100644 node_modules/@babel/types/lib/validators/react/isCompatTag.js delete mode 100644 node_modules/@babel/types/lib/validators/react/isReactComponent.js delete mode 100644 node_modules/@babel/types/lib/validators/validate.js delete mode 100644 node_modules/@babel/types/package.json delete mode 100644 node_modules/@babel/types/scripts/generateTypeHelpers.js delete mode 100644 node_modules/@babel/types/scripts/generators/docs.js delete mode 100644 node_modules/@babel/types/scripts/generators/flow.js delete mode 100644 node_modules/@babel/types/scripts/generators/generateAsserts.js delete mode 100644 node_modules/@babel/types/scripts/generators/generateBuilders.js delete mode 100644 node_modules/@babel/types/scripts/generators/generateConstants.js delete mode 100644 node_modules/@babel/types/scripts/generators/generateValidators.js delete mode 100644 node_modules/@babel/types/scripts/generators/typescript.js delete mode 100644 node_modules/@babel/types/scripts/utils/formatBuilderName.js delete mode 100644 node_modules/@babel/types/scripts/utils/lowerFirst.js delete mode 100644 node_modules/@babel/types/scripts/utils/stringifyValidator.js delete mode 100644 node_modules/@babel/types/scripts/utils/toFunctionName.js delete mode 100644 node_modules/@cnakazawa/watch/LICENSE delete mode 100644 node_modules/@cnakazawa/watch/README.md delete mode 100644 node_modules/@cnakazawa/watch/cli.js delete mode 100644 node_modules/@cnakazawa/watch/main.js delete mode 100644 node_modules/@cnakazawa/watch/package.json delete mode 100644 node_modules/@cnakazawa/watch/scripts/release.sh delete mode 100644 node_modules/@cnakazawa/watch/test/d/d/t delete mode 100644 node_modules/@cnakazawa/watch/test/d/t delete mode 100644 node_modules/@cnakazawa/watch/test/test_monitor.js delete mode 100644 node_modules/@cnakazawa/watch/test/test_monitorRootDirectory.js delete mode 100644 node_modules/@cnakazawa/watch/test/test_watchTree.js delete mode 100644 node_modules/@jest/console/LICENSE delete mode 100644 node_modules/@jest/console/build/BufferedConsole.d.ts delete mode 100644 node_modules/@jest/console/build/BufferedConsole.d.ts.map delete mode 100644 node_modules/@jest/console/build/BufferedConsole.js delete mode 100644 node_modules/@jest/console/build/CustomConsole.d.ts delete mode 100644 node_modules/@jest/console/build/CustomConsole.d.ts.map delete mode 100644 node_modules/@jest/console/build/CustomConsole.js delete mode 100644 node_modules/@jest/console/build/NullConsole.d.ts delete mode 100644 node_modules/@jest/console/build/NullConsole.d.ts.map delete mode 100644 node_modules/@jest/console/build/NullConsole.js delete mode 100644 node_modules/@jest/console/build/getConsoleOutput.d.ts delete mode 100644 node_modules/@jest/console/build/getConsoleOutput.d.ts.map delete mode 100644 node_modules/@jest/console/build/getConsoleOutput.js delete mode 100644 node_modules/@jest/console/build/index.d.ts delete mode 100644 node_modules/@jest/console/build/index.d.ts.map delete mode 100644 node_modules/@jest/console/build/index.js delete mode 100644 node_modules/@jest/console/build/types.d.ts delete mode 100644 node_modules/@jest/console/build/types.d.ts.map delete mode 100644 node_modules/@jest/console/build/types.js delete mode 100644 node_modules/@jest/console/node_modules/slash/index.js delete mode 100644 node_modules/@jest/console/node_modules/slash/license delete mode 100644 node_modules/@jest/console/node_modules/slash/package.json delete mode 100644 node_modules/@jest/console/node_modules/slash/readme.md delete mode 100644 node_modules/@jest/console/package.json delete mode 100644 node_modules/@jest/core/README.md delete mode 100644 node_modules/@jest/core/build/FailedTestsCache.d.ts delete mode 100644 node_modules/@jest/core/build/FailedTestsCache.d.ts.map delete mode 100644 node_modules/@jest/core/build/FailedTestsCache.js delete mode 100644 node_modules/@jest/core/build/ReporterDispatcher.d.ts delete mode 100644 node_modules/@jest/core/build/ReporterDispatcher.d.ts.map delete mode 100644 node_modules/@jest/core/build/ReporterDispatcher.js delete mode 100644 node_modules/@jest/core/build/SearchSource.d.ts delete mode 100644 node_modules/@jest/core/build/SearchSource.d.ts.map delete mode 100644 node_modules/@jest/core/build/SearchSource.js delete mode 100644 node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts delete mode 100644 node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts.map delete mode 100644 node_modules/@jest/core/build/SnapshotInteractiveMode.js delete mode 100644 node_modules/@jest/core/build/TestNamePatternPrompt.d.ts delete mode 100644 node_modules/@jest/core/build/TestNamePatternPrompt.d.ts.map delete mode 100644 node_modules/@jest/core/build/TestNamePatternPrompt.js delete mode 100644 node_modules/@jest/core/build/TestPathPatternPrompt.d.ts delete mode 100644 node_modules/@jest/core/build/TestPathPatternPrompt.d.ts.map delete mode 100644 node_modules/@jest/core/build/TestPathPatternPrompt.js delete mode 100644 node_modules/@jest/core/build/TestScheduler.d.ts delete mode 100644 node_modules/@jest/core/build/TestScheduler.d.ts.map delete mode 100644 node_modules/@jest/core/build/TestScheduler.js delete mode 100644 node_modules/@jest/core/build/TestWatcher.d.ts delete mode 100644 node_modules/@jest/core/build/TestWatcher.d.ts.map delete mode 100644 node_modules/@jest/core/build/TestWatcher.js delete mode 100644 node_modules/@jest/core/build/assets/jest_logo.png delete mode 100644 node_modules/@jest/core/build/cli/index.d.ts delete mode 100644 node_modules/@jest/core/build/cli/index.d.ts.map delete mode 100644 node_modules/@jest/core/build/cli/index.js delete mode 100644 node_modules/@jest/core/build/collectHandles.d.ts delete mode 100644 node_modules/@jest/core/build/collectHandles.d.ts.map delete mode 100644 node_modules/@jest/core/build/collectHandles.js delete mode 100644 node_modules/@jest/core/build/getChangedFilesPromise.d.ts delete mode 100644 node_modules/@jest/core/build/getChangedFilesPromise.d.ts.map delete mode 100644 node_modules/@jest/core/build/getChangedFilesPromise.js delete mode 100644 node_modules/@jest/core/build/getNoTestFound.d.ts delete mode 100644 node_modules/@jest/core/build/getNoTestFound.d.ts.map delete mode 100644 node_modules/@jest/core/build/getNoTestFound.js delete mode 100644 node_modules/@jest/core/build/getNoTestFoundFailed.d.ts delete mode 100644 node_modules/@jest/core/build/getNoTestFoundFailed.d.ts.map delete mode 100644 node_modules/@jest/core/build/getNoTestFoundFailed.js delete mode 100644 node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.d.ts delete mode 100644 node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.d.ts.map delete mode 100644 node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.js delete mode 100644 node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts delete mode 100644 node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts.map delete mode 100644 node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.js delete mode 100644 node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts delete mode 100644 node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts.map delete mode 100644 node_modules/@jest/core/build/getNoTestFoundVerbose.js delete mode 100644 node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts delete mode 100644 node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts.map delete mode 100644 node_modules/@jest/core/build/getNoTestsFoundMessage.js delete mode 100644 node_modules/@jest/core/build/jest.d.ts delete mode 100644 node_modules/@jest/core/build/jest.d.ts.map delete mode 100644 node_modules/@jest/core/build/jest.js delete mode 100644 node_modules/@jest/core/build/lib/active_filters_message.d.ts delete mode 100644 node_modules/@jest/core/build/lib/active_filters_message.d.ts.map delete mode 100644 node_modules/@jest/core/build/lib/active_filters_message.js delete mode 100644 node_modules/@jest/core/build/lib/create_context.d.ts delete mode 100644 node_modules/@jest/core/build/lib/create_context.d.ts.map delete mode 100644 node_modules/@jest/core/build/lib/create_context.js delete mode 100644 node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts delete mode 100644 node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts.map delete mode 100644 node_modules/@jest/core/build/lib/handle_deprecation_warnings.js delete mode 100644 node_modules/@jest/core/build/lib/is_valid_path.d.ts delete mode 100644 node_modules/@jest/core/build/lib/is_valid_path.d.ts.map delete mode 100644 node_modules/@jest/core/build/lib/is_valid_path.js delete mode 100644 node_modules/@jest/core/build/lib/log_debug_messages.d.ts delete mode 100644 node_modules/@jest/core/build/lib/log_debug_messages.d.ts.map delete mode 100644 node_modules/@jest/core/build/lib/log_debug_messages.js delete mode 100644 node_modules/@jest/core/build/lib/update_global_config.d.ts delete mode 100644 node_modules/@jest/core/build/lib/update_global_config.d.ts.map delete mode 100644 node_modules/@jest/core/build/lib/update_global_config.js delete mode 100644 node_modules/@jest/core/build/lib/watch_plugins_helpers.d.ts delete mode 100644 node_modules/@jest/core/build/lib/watch_plugins_helpers.d.ts.map delete mode 100644 node_modules/@jest/core/build/lib/watch_plugins_helpers.js delete mode 100644 node_modules/@jest/core/build/plugins/quit.d.ts delete mode 100644 node_modules/@jest/core/build/plugins/quit.d.ts.map delete mode 100644 node_modules/@jest/core/build/plugins/quit.js delete mode 100644 node_modules/@jest/core/build/plugins/test_name_pattern.d.ts delete mode 100644 node_modules/@jest/core/build/plugins/test_name_pattern.d.ts.map delete mode 100644 node_modules/@jest/core/build/plugins/test_name_pattern.js delete mode 100644 node_modules/@jest/core/build/plugins/test_path_pattern.d.ts delete mode 100644 node_modules/@jest/core/build/plugins/test_path_pattern.d.ts.map delete mode 100644 node_modules/@jest/core/build/plugins/test_path_pattern.js delete mode 100644 node_modules/@jest/core/build/plugins/update_snapshots.d.ts delete mode 100644 node_modules/@jest/core/build/plugins/update_snapshots.d.ts.map delete mode 100644 node_modules/@jest/core/build/plugins/update_snapshots.js delete mode 100644 node_modules/@jest/core/build/plugins/update_snapshots_interactive.d.ts delete mode 100644 node_modules/@jest/core/build/plugins/update_snapshots_interactive.d.ts.map delete mode 100644 node_modules/@jest/core/build/plugins/update_snapshots_interactive.js delete mode 100644 node_modules/@jest/core/build/pluralize.d.ts delete mode 100644 node_modules/@jest/core/build/pluralize.d.ts.map delete mode 100644 node_modules/@jest/core/build/pluralize.js delete mode 100644 node_modules/@jest/core/build/runGlobalHook.d.ts delete mode 100644 node_modules/@jest/core/build/runGlobalHook.d.ts.map delete mode 100644 node_modules/@jest/core/build/runGlobalHook.js delete mode 100644 node_modules/@jest/core/build/runJest.d.ts delete mode 100644 node_modules/@jest/core/build/runJest.d.ts.map delete mode 100644 node_modules/@jest/core/build/runJest.js delete mode 100644 node_modules/@jest/core/build/testSchedulerHelper.d.ts delete mode 100644 node_modules/@jest/core/build/testSchedulerHelper.d.ts.map delete mode 100644 node_modules/@jest/core/build/testSchedulerHelper.js delete mode 100644 node_modules/@jest/core/build/types.d.ts delete mode 100644 node_modules/@jest/core/build/types.d.ts.map delete mode 100644 node_modules/@jest/core/build/types.js delete mode 100644 node_modules/@jest/core/build/version.d.ts delete mode 100644 node_modules/@jest/core/build/version.d.ts.map delete mode 100644 node_modules/@jest/core/build/version.js delete mode 100644 node_modules/@jest/core/build/watch.d.ts delete mode 100644 node_modules/@jest/core/build/watch.d.ts.map delete mode 100644 node_modules/@jest/core/build/watch.js delete mode 100644 node_modules/@jest/core/node_modules/slash/index.js delete mode 100644 node_modules/@jest/core/node_modules/slash/license delete mode 100644 node_modules/@jest/core/node_modules/slash/package.json delete mode 100644 node_modules/@jest/core/node_modules/slash/readme.md delete mode 100644 node_modules/@jest/core/package.json delete mode 100644 node_modules/@jest/environment/build/index.d.ts delete mode 100644 node_modules/@jest/environment/build/index.d.ts.map delete mode 100644 node_modules/@jest/environment/build/index.js delete mode 100644 node_modules/@jest/environment/package.json delete mode 100644 node_modules/@jest/fake-timers/LICENSE delete mode 100644 node_modules/@jest/fake-timers/build/index.d.ts delete mode 100644 node_modules/@jest/fake-timers/build/index.d.ts.map delete mode 100644 node_modules/@jest/fake-timers/build/index.js delete mode 100644 node_modules/@jest/fake-timers/build/jestFakeTimers.d.ts delete mode 100644 node_modules/@jest/fake-timers/build/jestFakeTimers.d.ts.map delete mode 100644 node_modules/@jest/fake-timers/build/jestFakeTimers.js delete mode 100644 node_modules/@jest/fake-timers/package.json delete mode 100644 node_modules/@jest/reporters/build/Status.d.ts delete mode 100644 node_modules/@jest/reporters/build/Status.d.ts.map delete mode 100644 node_modules/@jest/reporters/build/Status.js delete mode 100644 node_modules/@jest/reporters/build/base_reporter.d.ts delete mode 100644 node_modules/@jest/reporters/build/base_reporter.d.ts.map delete mode 100644 node_modules/@jest/reporters/build/base_reporter.js delete mode 100644 node_modules/@jest/reporters/build/coverage_reporter.d.ts delete mode 100644 node_modules/@jest/reporters/build/coverage_reporter.d.ts.map delete mode 100644 node_modules/@jest/reporters/build/coverage_reporter.js delete mode 100644 node_modules/@jest/reporters/build/coverage_worker.d.ts delete mode 100644 node_modules/@jest/reporters/build/coverage_worker.d.ts.map delete mode 100644 node_modules/@jest/reporters/build/coverage_worker.js delete mode 100644 node_modules/@jest/reporters/build/default_reporter.d.ts delete mode 100644 node_modules/@jest/reporters/build/default_reporter.d.ts.map delete mode 100644 node_modules/@jest/reporters/build/default_reporter.js delete mode 100644 node_modules/@jest/reporters/build/generateEmptyCoverage.d.ts delete mode 100644 node_modules/@jest/reporters/build/generateEmptyCoverage.d.ts.map delete mode 100644 node_modules/@jest/reporters/build/generateEmptyCoverage.js delete mode 100644 node_modules/@jest/reporters/build/get_result_header.d.ts delete mode 100644 node_modules/@jest/reporters/build/get_result_header.d.ts.map delete mode 100644 node_modules/@jest/reporters/build/get_result_header.js delete mode 100644 node_modules/@jest/reporters/build/get_snapshot_status.d.ts delete mode 100644 node_modules/@jest/reporters/build/get_snapshot_status.d.ts.map delete mode 100644 node_modules/@jest/reporters/build/get_snapshot_status.js delete mode 100644 node_modules/@jest/reporters/build/get_snapshot_summary.d.ts delete mode 100644 node_modules/@jest/reporters/build/get_snapshot_summary.d.ts.map delete mode 100644 node_modules/@jest/reporters/build/get_snapshot_summary.js delete mode 100644 node_modules/@jest/reporters/build/index.d.ts delete mode 100644 node_modules/@jest/reporters/build/index.d.ts.map delete mode 100644 node_modules/@jest/reporters/build/index.js delete mode 100644 node_modules/@jest/reporters/build/notify_reporter.d.ts delete mode 100644 node_modules/@jest/reporters/build/notify_reporter.d.ts.map delete mode 100644 node_modules/@jest/reporters/build/notify_reporter.js delete mode 100644 node_modules/@jest/reporters/build/summary_reporter.d.ts delete mode 100644 node_modules/@jest/reporters/build/summary_reporter.d.ts.map delete mode 100644 node_modules/@jest/reporters/build/summary_reporter.js delete mode 100644 node_modules/@jest/reporters/build/types.d.ts delete mode 100644 node_modules/@jest/reporters/build/types.d.ts.map delete mode 100644 node_modules/@jest/reporters/build/types.js delete mode 100644 node_modules/@jest/reporters/build/utils.d.ts delete mode 100644 node_modules/@jest/reporters/build/utils.d.ts.map delete mode 100644 node_modules/@jest/reporters/build/utils.js delete mode 100644 node_modules/@jest/reporters/build/verbose_reporter.d.ts delete mode 100644 node_modules/@jest/reporters/build/verbose_reporter.d.ts.map delete mode 100644 node_modules/@jest/reporters/build/verbose_reporter.js delete mode 100644 node_modules/@jest/reporters/node_modules/slash/index.js delete mode 100644 node_modules/@jest/reporters/node_modules/slash/license delete mode 100644 node_modules/@jest/reporters/node_modules/slash/package.json delete mode 100644 node_modules/@jest/reporters/node_modules/slash/readme.md delete mode 100644 node_modules/@jest/reporters/package.json delete mode 100644 node_modules/@jest/source-map/LICENSE delete mode 100644 node_modules/@jest/source-map/build/getCallsite.d.ts delete mode 100644 node_modules/@jest/source-map/build/getCallsite.d.ts.map delete mode 100644 node_modules/@jest/source-map/build/getCallsite.js delete mode 100644 node_modules/@jest/source-map/build/index.d.ts delete mode 100644 node_modules/@jest/source-map/build/index.d.ts.map delete mode 100644 node_modules/@jest/source-map/build/index.js delete mode 100644 node_modules/@jest/source-map/build/types.d.ts delete mode 100644 node_modules/@jest/source-map/build/types.d.ts.map delete mode 100644 node_modules/@jest/source-map/build/types.js delete mode 100644 node_modules/@jest/source-map/node_modules/callsites/index.d.ts delete mode 100644 node_modules/@jest/source-map/node_modules/callsites/index.js delete mode 100644 node_modules/@jest/source-map/node_modules/callsites/license delete mode 100644 node_modules/@jest/source-map/node_modules/callsites/package.json delete mode 100644 node_modules/@jest/source-map/node_modules/callsites/readme.md delete mode 100644 node_modules/@jest/source-map/package.json delete mode 100644 node_modules/@jest/test-result/LICENSE delete mode 100644 node_modules/@jest/test-result/build/formatTestResults.d.ts delete mode 100644 node_modules/@jest/test-result/build/formatTestResults.d.ts.map delete mode 100644 node_modules/@jest/test-result/build/formatTestResults.js delete mode 100644 node_modules/@jest/test-result/build/helpers.d.ts delete mode 100644 node_modules/@jest/test-result/build/helpers.d.ts.map delete mode 100644 node_modules/@jest/test-result/build/helpers.js delete mode 100644 node_modules/@jest/test-result/build/index.d.ts delete mode 100644 node_modules/@jest/test-result/build/index.d.ts.map delete mode 100644 node_modules/@jest/test-result/build/index.js delete mode 100644 node_modules/@jest/test-result/build/types.d.ts delete mode 100644 node_modules/@jest/test-result/build/types.d.ts.map delete mode 100644 node_modules/@jest/test-result/build/types.js delete mode 100644 node_modules/@jest/test-result/package.json delete mode 100644 node_modules/@jest/test-sequencer/build/index.d.ts delete mode 100644 node_modules/@jest/test-sequencer/build/index.d.ts.map delete mode 100644 node_modules/@jest/test-sequencer/build/index.js delete mode 100644 node_modules/@jest/test-sequencer/package.json delete mode 100644 node_modules/@jest/transform/build/ScriptTransformer.d.ts delete mode 100644 node_modules/@jest/transform/build/ScriptTransformer.d.ts.map delete mode 100644 node_modules/@jest/transform/build/ScriptTransformer.js delete mode 100644 node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts delete mode 100644 node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts.map delete mode 100644 node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js delete mode 100644 node_modules/@jest/transform/build/index.d.ts delete mode 100644 node_modules/@jest/transform/build/index.d.ts.map delete mode 100644 node_modules/@jest/transform/build/index.js delete mode 100644 node_modules/@jest/transform/build/shouldInstrument.d.ts delete mode 100644 node_modules/@jest/transform/build/shouldInstrument.d.ts.map delete mode 100644 node_modules/@jest/transform/build/shouldInstrument.js delete mode 100644 node_modules/@jest/transform/build/types.d.ts delete mode 100644 node_modules/@jest/transform/build/types.d.ts.map delete mode 100644 node_modules/@jest/transform/build/types.js delete mode 100644 node_modules/@jest/transform/node_modules/slash/index.js delete mode 100644 node_modules/@jest/transform/node_modules/slash/license delete mode 100644 node_modules/@jest/transform/node_modules/slash/package.json delete mode 100644 node_modules/@jest/transform/node_modules/slash/readme.md delete mode 100644 node_modules/@jest/transform/package.json delete mode 100644 node_modules/@jest/types/LICENSE delete mode 100644 node_modules/@jest/types/build/Circus.d.ts delete mode 100644 node_modules/@jest/types/build/Circus.d.ts.map delete mode 100644 node_modules/@jest/types/build/Circus.js delete mode 100644 node_modules/@jest/types/build/Config.d.ts delete mode 100644 node_modules/@jest/types/build/Config.d.ts.map delete mode 100644 node_modules/@jest/types/build/Config.js delete mode 100644 node_modules/@jest/types/build/Global.d.ts delete mode 100644 node_modules/@jest/types/build/Global.d.ts.map delete mode 100644 node_modules/@jest/types/build/Global.js delete mode 100644 node_modules/@jest/types/build/index.d.ts delete mode 100644 node_modules/@jest/types/build/index.d.ts.map delete mode 100644 node_modules/@jest/types/build/index.js delete mode 100644 node_modules/@jest/types/package.json delete mode 100644 node_modules/@types/babel__core/LICENSE delete mode 100644 node_modules/@types/babel__core/README.md delete mode 100644 node_modules/@types/babel__core/index.d.ts delete mode 100644 node_modules/@types/babel__core/package.json delete mode 100644 node_modules/@types/babel__generator/LICENSE delete mode 100644 node_modules/@types/babel__generator/README.md delete mode 100644 node_modules/@types/babel__generator/index.d.ts delete mode 100644 node_modules/@types/babel__generator/package.json delete mode 100644 node_modules/@types/babel__template/LICENSE delete mode 100644 node_modules/@types/babel__template/README.md delete mode 100644 node_modules/@types/babel__template/index.d.ts delete mode 100644 node_modules/@types/babel__template/package.json delete mode 100644 node_modules/@types/babel__traverse/LICENSE delete mode 100644 node_modules/@types/babel__traverse/README.md delete mode 100644 node_modules/@types/babel__traverse/index.d.ts delete mode 100644 node_modules/@types/babel__traverse/package.json delete mode 100644 node_modules/@types/istanbul-lib-coverage/LICENSE delete mode 100644 node_modules/@types/istanbul-lib-coverage/README.md delete mode 100644 node_modules/@types/istanbul-lib-coverage/index.d.ts delete mode 100644 node_modules/@types/istanbul-lib-coverage/package.json delete mode 100644 node_modules/@types/istanbul-lib-report/LICENSE delete mode 100644 node_modules/@types/istanbul-lib-report/README.md delete mode 100644 node_modules/@types/istanbul-lib-report/index.d.ts delete mode 100644 node_modules/@types/istanbul-lib-report/package.json delete mode 100644 node_modules/@types/istanbul-reports/LICENSE delete mode 100644 node_modules/@types/istanbul-reports/README.md delete mode 100644 node_modules/@types/istanbul-reports/index.d.ts delete mode 100644 node_modules/@types/istanbul-reports/package.json delete mode 100644 node_modules/@types/jest-diff/LICENSE delete mode 100644 node_modules/@types/jest-diff/README.md delete mode 100644 node_modules/@types/jest-diff/index.d.ts delete mode 100644 node_modules/@types/jest-diff/package.json delete mode 100644 node_modules/@types/jest/LICENSE delete mode 100644 node_modules/@types/jest/README.md delete mode 100644 node_modules/@types/jest/index.d.ts delete mode 100644 node_modules/@types/jest/package.json delete mode 100644 node_modules/@types/node/LICENSE delete mode 100644 node_modules/@types/node/README.md delete mode 100644 node_modules/@types/node/assert.d.ts delete mode 100644 node_modules/@types/node/async_hooks.d.ts delete mode 100644 node_modules/@types/node/base.d.ts delete mode 100644 node_modules/@types/node/buffer.d.ts delete mode 100644 node_modules/@types/node/child_process.d.ts delete mode 100644 node_modules/@types/node/cluster.d.ts delete mode 100644 node_modules/@types/node/console.d.ts delete mode 100644 node_modules/@types/node/constants.d.ts delete mode 100644 node_modules/@types/node/crypto.d.ts delete mode 100644 node_modules/@types/node/dgram.d.ts delete mode 100644 node_modules/@types/node/dns.d.ts delete mode 100644 node_modules/@types/node/domain.d.ts delete mode 100644 node_modules/@types/node/events.d.ts delete mode 100644 node_modules/@types/node/fs.d.ts delete mode 100644 node_modules/@types/node/globals.d.ts delete mode 100644 node_modules/@types/node/http.d.ts delete mode 100644 node_modules/@types/node/http2.d.ts delete mode 100644 node_modules/@types/node/https.d.ts delete mode 100644 node_modules/@types/node/index.d.ts delete mode 100644 node_modules/@types/node/inspector.d.ts delete mode 100644 node_modules/@types/node/module.d.ts delete mode 100644 node_modules/@types/node/net.d.ts delete mode 100644 node_modules/@types/node/os.d.ts delete mode 100644 node_modules/@types/node/package.json delete mode 100644 node_modules/@types/node/path.d.ts delete mode 100644 node_modules/@types/node/perf_hooks.d.ts delete mode 100644 node_modules/@types/node/process.d.ts delete mode 100644 node_modules/@types/node/punycode.d.ts delete mode 100644 node_modules/@types/node/querystring.d.ts delete mode 100644 node_modules/@types/node/readline.d.ts delete mode 100644 node_modules/@types/node/repl.d.ts delete mode 100644 node_modules/@types/node/stream.d.ts delete mode 100644 node_modules/@types/node/string_decoder.d.ts delete mode 100644 node_modules/@types/node/timers.d.ts delete mode 100644 node_modules/@types/node/tls.d.ts delete mode 100644 node_modules/@types/node/trace_events.d.ts delete mode 100644 node_modules/@types/node/ts3.2/globals.d.ts delete mode 100644 node_modules/@types/node/ts3.2/index.d.ts delete mode 100644 node_modules/@types/node/ts3.2/util.d.ts delete mode 100644 node_modules/@types/node/tty.d.ts delete mode 100644 node_modules/@types/node/url.d.ts delete mode 100644 node_modules/@types/node/util.d.ts delete mode 100644 node_modules/@types/node/v8.d.ts delete mode 100644 node_modules/@types/node/vm.d.ts delete mode 100644 node_modules/@types/node/worker_threads.d.ts delete mode 100644 node_modules/@types/node/zlib.d.ts delete mode 100644 node_modules/@types/normalize-package-data/LICENSE delete mode 100644 node_modules/@types/normalize-package-data/README.md delete mode 100644 node_modules/@types/normalize-package-data/index.d.ts delete mode 100644 node_modules/@types/normalize-package-data/package.json delete mode 100644 node_modules/@types/stack-utils/LICENSE delete mode 100644 node_modules/@types/stack-utils/README.md delete mode 100644 node_modules/@types/stack-utils/index.d.ts delete mode 100644 node_modules/@types/stack-utils/package.json delete mode 100644 node_modules/@types/yargs-parser/LICENSE delete mode 100644 node_modules/@types/yargs-parser/README.md delete mode 100644 node_modules/@types/yargs-parser/index.d.ts delete mode 100644 node_modules/@types/yargs-parser/package.json delete mode 100644 node_modules/@types/yargs/LICENSE delete mode 100644 node_modules/@types/yargs/README.md delete mode 100644 node_modules/@types/yargs/index.d.ts delete mode 100644 node_modules/@types/yargs/package.json delete mode 100644 node_modules/@types/yargs/yargs.d.ts delete mode 100644 node_modules/abab/CHANGELOG.md delete mode 100644 node_modules/abab/LICENSE.md delete mode 100644 node_modules/abab/README.md delete mode 100644 node_modules/abab/index.d.ts delete mode 100644 node_modules/abab/index.js delete mode 100644 node_modules/abab/lib/atob.js delete mode 100644 node_modules/abab/lib/btoa.js delete mode 100644 node_modules/abab/package.json delete mode 100644 node_modules/acorn-globals/LICENSE delete mode 100644 node_modules/acorn-globals/README.md delete mode 100644 node_modules/acorn-globals/index.js delete mode 100644 node_modules/acorn-globals/node_modules/.bin/acorn delete mode 100644 node_modules/acorn-globals/node_modules/.bin/acorn.cmd delete mode 100644 node_modules/acorn-globals/node_modules/acorn/CHANGELOG.md delete mode 100644 node_modules/acorn-globals/node_modules/acorn/LICENSE delete mode 100644 node_modules/acorn-globals/node_modules/acorn/README.md delete mode 100644 node_modules/acorn-globals/node_modules/acorn/bin/acorn delete mode 100644 node_modules/acorn-globals/node_modules/acorn/dist/acorn.d.ts delete mode 100644 node_modules/acorn-globals/node_modules/acorn/dist/acorn.js delete mode 100644 node_modules/acorn-globals/node_modules/acorn/dist/acorn.js.map delete mode 100644 node_modules/acorn-globals/node_modules/acorn/dist/acorn.mjs delete mode 100644 node_modules/acorn-globals/node_modules/acorn/dist/acorn.mjs.map delete mode 100644 node_modules/acorn-globals/node_modules/acorn/dist/bin.js delete mode 100644 node_modules/acorn-globals/node_modules/acorn/package.json delete mode 100644 node_modules/acorn-globals/package.json delete mode 100644 node_modules/acorn-walk/CHANGELOG.md delete mode 100644 node_modules/acorn-walk/LICENSE delete mode 100644 node_modules/acorn-walk/README.md delete mode 100644 node_modules/acorn-walk/dist/walk.js delete mode 100644 node_modules/acorn-walk/dist/walk.js.map delete mode 100644 node_modules/acorn-walk/dist/walk.mjs delete mode 100644 node_modules/acorn-walk/dist/walk.mjs.map delete mode 100644 node_modules/acorn-walk/package.json delete mode 100644 node_modules/acorn/AUTHORS delete mode 100644 node_modules/acorn/CHANGELOG.md delete mode 100644 node_modules/acorn/LICENSE delete mode 100644 node_modules/acorn/README.md delete mode 100644 node_modules/acorn/bin/_acorn.js delete mode 100644 node_modules/acorn/bin/acorn delete mode 100644 node_modules/acorn/bin/run_test262.js delete mode 100644 node_modules/acorn/bin/test262.whitelist delete mode 100644 node_modules/acorn/dist/.keep delete mode 100644 node_modules/acorn/dist/acorn.es.js delete mode 100644 node_modules/acorn/dist/acorn.js delete mode 100644 node_modules/acorn/dist/acorn_loose.es.js delete mode 100644 node_modules/acorn/dist/acorn_loose.js delete mode 100644 node_modules/acorn/dist/walk.es.js delete mode 100644 node_modules/acorn/dist/walk.js delete mode 100644 node_modules/acorn/package.json delete mode 100644 node_modules/ajv/.tonic_example.js delete mode 100644 node_modules/ajv/LICENSE delete mode 100644 node_modules/ajv/README.md delete mode 100644 node_modules/ajv/dist/ajv.bundle.js delete mode 100644 node_modules/ajv/dist/ajv.min.js delete mode 100644 node_modules/ajv/dist/ajv.min.js.map delete mode 100644 node_modules/ajv/lib/ajv.d.ts delete mode 100644 node_modules/ajv/lib/ajv.js delete mode 100644 node_modules/ajv/lib/cache.js delete mode 100644 node_modules/ajv/lib/compile/async.js delete mode 100644 node_modules/ajv/lib/compile/equal.js delete mode 100644 node_modules/ajv/lib/compile/error_classes.js delete mode 100644 node_modules/ajv/lib/compile/formats.js delete mode 100644 node_modules/ajv/lib/compile/index.js delete mode 100644 node_modules/ajv/lib/compile/resolve.js delete mode 100644 node_modules/ajv/lib/compile/rules.js delete mode 100644 node_modules/ajv/lib/compile/schema_obj.js delete mode 100644 node_modules/ajv/lib/compile/ucs2length.js delete mode 100644 node_modules/ajv/lib/compile/util.js delete mode 100644 node_modules/ajv/lib/data.js delete mode 100644 node_modules/ajv/lib/definition_schema.js delete mode 100644 node_modules/ajv/lib/dot/_limit.jst delete mode 100644 node_modules/ajv/lib/dot/_limitItems.jst delete mode 100644 node_modules/ajv/lib/dot/_limitLength.jst delete mode 100644 node_modules/ajv/lib/dot/_limitProperties.jst delete mode 100644 node_modules/ajv/lib/dot/allOf.jst delete mode 100644 node_modules/ajv/lib/dot/anyOf.jst delete mode 100644 node_modules/ajv/lib/dot/coerce.def delete mode 100644 node_modules/ajv/lib/dot/comment.jst delete mode 100644 node_modules/ajv/lib/dot/const.jst delete mode 100644 node_modules/ajv/lib/dot/contains.jst delete mode 100644 node_modules/ajv/lib/dot/custom.jst delete mode 100644 node_modules/ajv/lib/dot/defaults.def delete mode 100644 node_modules/ajv/lib/dot/definitions.def delete mode 100644 node_modules/ajv/lib/dot/dependencies.jst delete mode 100644 node_modules/ajv/lib/dot/enum.jst delete mode 100644 node_modules/ajv/lib/dot/errors.def delete mode 100644 node_modules/ajv/lib/dot/format.jst delete mode 100644 node_modules/ajv/lib/dot/if.jst delete mode 100644 node_modules/ajv/lib/dot/items.jst delete mode 100644 node_modules/ajv/lib/dot/missing.def delete mode 100644 node_modules/ajv/lib/dot/multipleOf.jst delete mode 100644 node_modules/ajv/lib/dot/not.jst delete mode 100644 node_modules/ajv/lib/dot/oneOf.jst delete mode 100644 node_modules/ajv/lib/dot/pattern.jst delete mode 100644 node_modules/ajv/lib/dot/properties.jst delete mode 100644 node_modules/ajv/lib/dot/propertyNames.jst delete mode 100644 node_modules/ajv/lib/dot/ref.jst delete mode 100644 node_modules/ajv/lib/dot/required.jst delete mode 100644 node_modules/ajv/lib/dot/uniqueItems.jst delete mode 100644 node_modules/ajv/lib/dot/validate.jst delete mode 100644 node_modules/ajv/lib/dotjs/README.md delete mode 100644 node_modules/ajv/lib/dotjs/_limit.js delete mode 100644 node_modules/ajv/lib/dotjs/_limitItems.js delete mode 100644 node_modules/ajv/lib/dotjs/_limitLength.js delete mode 100644 node_modules/ajv/lib/dotjs/_limitProperties.js delete mode 100644 node_modules/ajv/lib/dotjs/allOf.js delete mode 100644 node_modules/ajv/lib/dotjs/anyOf.js delete mode 100644 node_modules/ajv/lib/dotjs/comment.js delete mode 100644 node_modules/ajv/lib/dotjs/const.js delete mode 100644 node_modules/ajv/lib/dotjs/contains.js delete mode 100644 node_modules/ajv/lib/dotjs/custom.js delete mode 100644 node_modules/ajv/lib/dotjs/dependencies.js delete mode 100644 node_modules/ajv/lib/dotjs/enum.js delete mode 100644 node_modules/ajv/lib/dotjs/format.js delete mode 100644 node_modules/ajv/lib/dotjs/if.js delete mode 100644 node_modules/ajv/lib/dotjs/index.js delete mode 100644 node_modules/ajv/lib/dotjs/items.js delete mode 100644 node_modules/ajv/lib/dotjs/multipleOf.js delete mode 100644 node_modules/ajv/lib/dotjs/not.js delete mode 100644 node_modules/ajv/lib/dotjs/oneOf.js delete mode 100644 node_modules/ajv/lib/dotjs/pattern.js delete mode 100644 node_modules/ajv/lib/dotjs/properties.js delete mode 100644 node_modules/ajv/lib/dotjs/propertyNames.js delete mode 100644 node_modules/ajv/lib/dotjs/ref.js delete mode 100644 node_modules/ajv/lib/dotjs/required.js delete mode 100644 node_modules/ajv/lib/dotjs/uniqueItems.js delete mode 100644 node_modules/ajv/lib/dotjs/validate.js delete mode 100644 node_modules/ajv/lib/keyword.js delete mode 100644 node_modules/ajv/lib/refs/data.json delete mode 100644 node_modules/ajv/lib/refs/json-schema-draft-04.json delete mode 100644 node_modules/ajv/lib/refs/json-schema-draft-06.json delete mode 100644 node_modules/ajv/lib/refs/json-schema-draft-07.json delete mode 100644 node_modules/ajv/lib/refs/json-schema-secure.json delete mode 100644 node_modules/ajv/package.json delete mode 100644 node_modules/ajv/scripts/.eslintrc.yml delete mode 100644 node_modules/ajv/scripts/bundle.js delete mode 100644 node_modules/ajv/scripts/compile-dots.js delete mode 100644 node_modules/ajv/scripts/info delete mode 100644 node_modules/ajv/scripts/prepare-tests delete mode 100644 node_modules/ajv/scripts/publish-built-version delete mode 100644 node_modules/ajv/scripts/travis-gh-pages delete mode 100644 node_modules/ansi-escapes/index.js delete mode 100644 node_modules/ansi-escapes/license delete mode 100644 node_modules/ansi-escapes/package.json delete mode 100644 node_modules/ansi-escapes/readme.md delete mode 100644 node_modules/ansi-regex/index.js delete mode 100644 node_modules/ansi-regex/license delete mode 100644 node_modules/ansi-regex/package.json delete mode 100644 node_modules/ansi-regex/readme.md delete mode 100644 node_modules/ansi-styles/index.js delete mode 100644 node_modules/ansi-styles/license delete mode 100644 node_modules/ansi-styles/package.json delete mode 100644 node_modules/ansi-styles/readme.md delete mode 100644 node_modules/anymatch/LICENSE delete mode 100644 node_modules/anymatch/README.md delete mode 100644 node_modules/anymatch/index.js delete mode 100644 node_modules/anymatch/package.json delete mode 100644 node_modules/argparse/CHANGELOG.md delete mode 100644 node_modules/argparse/LICENSE delete mode 100644 node_modules/argparse/README.md delete mode 100644 node_modules/argparse/index.js delete mode 100644 node_modules/argparse/lib/action.js delete mode 100644 node_modules/argparse/lib/action/append.js delete mode 100644 node_modules/argparse/lib/action/append/constant.js delete mode 100644 node_modules/argparse/lib/action/count.js delete mode 100644 node_modules/argparse/lib/action/help.js delete mode 100644 node_modules/argparse/lib/action/store.js delete mode 100644 node_modules/argparse/lib/action/store/constant.js delete mode 100644 node_modules/argparse/lib/action/store/false.js delete mode 100644 node_modules/argparse/lib/action/store/true.js delete mode 100644 node_modules/argparse/lib/action/subparsers.js delete mode 100644 node_modules/argparse/lib/action/version.js delete mode 100644 node_modules/argparse/lib/action_container.js delete mode 100644 node_modules/argparse/lib/argparse.js delete mode 100644 node_modules/argparse/lib/argument/error.js delete mode 100644 node_modules/argparse/lib/argument/exclusive.js delete mode 100644 node_modules/argparse/lib/argument/group.js delete mode 100644 node_modules/argparse/lib/argument_parser.js delete mode 100644 node_modules/argparse/lib/const.js delete mode 100644 node_modules/argparse/lib/help/added_formatters.js delete mode 100644 node_modules/argparse/lib/help/formatter.js delete mode 100644 node_modules/argparse/lib/namespace.js delete mode 100644 node_modules/argparse/lib/utils.js delete mode 100644 node_modules/argparse/package.json delete mode 100644 node_modules/arr-diff/LICENSE delete mode 100644 node_modules/arr-diff/README.md delete mode 100644 node_modules/arr-diff/index.js delete mode 100644 node_modules/arr-diff/package.json delete mode 100644 node_modules/arr-flatten/LICENSE delete mode 100644 node_modules/arr-flatten/README.md delete mode 100644 node_modules/arr-flatten/index.js delete mode 100644 node_modules/arr-flatten/package.json delete mode 100644 node_modules/arr-union/LICENSE delete mode 100644 node_modules/arr-union/README.md delete mode 100644 node_modules/arr-union/index.js delete mode 100644 node_modules/arr-union/package.json delete mode 100644 node_modules/array-equal/.npmignore delete mode 100644 node_modules/array-equal/LICENSE delete mode 100644 node_modules/array-equal/README.md delete mode 100644 node_modules/array-equal/component.json delete mode 100644 node_modules/array-equal/index.js delete mode 100644 node_modules/array-equal/package.json delete mode 100644 node_modules/array-unique/LICENSE delete mode 100644 node_modules/array-unique/README.md delete mode 100644 node_modules/array-unique/index.js delete mode 100644 node_modules/array-unique/package.json delete mode 100644 node_modules/asn1/LICENSE delete mode 100644 node_modules/asn1/README.md delete mode 100644 node_modules/asn1/lib/ber/errors.js delete mode 100644 node_modules/asn1/lib/ber/index.js delete mode 100644 node_modules/asn1/lib/ber/reader.js delete mode 100644 node_modules/asn1/lib/ber/types.js delete mode 100644 node_modules/asn1/lib/ber/writer.js delete mode 100644 node_modules/asn1/lib/index.js delete mode 100644 node_modules/asn1/package.json delete mode 100644 node_modules/assert-plus/AUTHORS delete mode 100644 node_modules/assert-plus/CHANGES.md delete mode 100644 node_modules/assert-plus/README.md delete mode 100644 node_modules/assert-plus/assert.js delete mode 100644 node_modules/assert-plus/package.json delete mode 100644 node_modules/assign-symbols/LICENSE delete mode 100644 node_modules/assign-symbols/README.md delete mode 100644 node_modules/assign-symbols/index.js delete mode 100644 node_modules/assign-symbols/package.json delete mode 100644 node_modules/astral-regex/index.js delete mode 100644 node_modules/astral-regex/license delete mode 100644 node_modules/astral-regex/package.json delete mode 100644 node_modules/astral-regex/readme.md delete mode 100644 node_modules/async-limiter/.eslintignore delete mode 100644 node_modules/async-limiter/.nycrc delete mode 100644 node_modules/async-limiter/.travis.yml delete mode 100644 node_modules/async-limiter/LICENSE delete mode 100644 node_modules/async-limiter/index.js delete mode 100644 node_modules/async-limiter/package.json delete mode 100644 node_modules/async-limiter/readme.md delete mode 100644 node_modules/asynckit/LICENSE delete mode 100644 node_modules/asynckit/README.md delete mode 100644 node_modules/asynckit/bench.js delete mode 100644 node_modules/asynckit/index.js delete mode 100644 node_modules/asynckit/lib/abort.js delete mode 100644 node_modules/asynckit/lib/async.js delete mode 100644 node_modules/asynckit/lib/defer.js delete mode 100644 node_modules/asynckit/lib/iterate.js delete mode 100644 node_modules/asynckit/lib/readable_asynckit.js delete mode 100644 node_modules/asynckit/lib/readable_parallel.js delete mode 100644 node_modules/asynckit/lib/readable_serial.js delete mode 100644 node_modules/asynckit/lib/readable_serial_ordered.js delete mode 100644 node_modules/asynckit/lib/state.js delete mode 100644 node_modules/asynckit/lib/streamify.js delete mode 100644 node_modules/asynckit/lib/terminator.js delete mode 100644 node_modules/asynckit/package.json delete mode 100644 node_modules/asynckit/parallel.js delete mode 100644 node_modules/asynckit/serial.js delete mode 100644 node_modules/asynckit/serialOrdered.js delete mode 100644 node_modules/asynckit/stream.js delete mode 100644 node_modules/atob/LICENSE delete mode 100644 node_modules/atob/LICENSE.DOCS delete mode 100644 node_modules/atob/README.md delete mode 100644 node_modules/atob/bin/atob.js delete mode 100644 node_modules/atob/bower.json delete mode 100644 node_modules/atob/browser-atob.js delete mode 100644 node_modules/atob/node-atob.js delete mode 100644 node_modules/atob/package.json delete mode 100644 node_modules/atob/test.js delete mode 100644 node_modules/aws-sign2/LICENSE delete mode 100644 node_modules/aws-sign2/README.md delete mode 100644 node_modules/aws-sign2/index.js delete mode 100644 node_modules/aws-sign2/package.json delete mode 100644 node_modules/aws4/.travis.yml delete mode 100644 node_modules/aws4/LICENSE delete mode 100644 node_modules/aws4/README.md delete mode 100644 node_modules/aws4/aws4.js delete mode 100644 node_modules/aws4/lru.js delete mode 100644 node_modules/aws4/package.json delete mode 100644 node_modules/axios/CHANGELOG.md delete mode 100644 node_modules/axios/LICENSE delete mode 100644 node_modules/axios/README.md delete mode 100644 node_modules/axios/UPGRADE_GUIDE.md delete mode 100644 node_modules/axios/dist/axios.js delete mode 100644 node_modules/axios/dist/axios.map delete mode 100644 node_modules/axios/dist/axios.min.js delete mode 100644 node_modules/axios/dist/axios.min.map delete mode 100644 node_modules/axios/index.d.ts delete mode 100644 node_modules/axios/index.js delete mode 100644 node_modules/axios/lib/adapters/README.md delete mode 100644 node_modules/axios/lib/adapters/http.js delete mode 100644 node_modules/axios/lib/adapters/xhr.js delete mode 100644 node_modules/axios/lib/axios.js delete mode 100644 node_modules/axios/lib/cancel/Cancel.js delete mode 100644 node_modules/axios/lib/cancel/CancelToken.js delete mode 100644 node_modules/axios/lib/cancel/isCancel.js delete mode 100644 node_modules/axios/lib/core/Axios.js delete mode 100644 node_modules/axios/lib/core/InterceptorManager.js delete mode 100644 node_modules/axios/lib/core/README.md delete mode 100644 node_modules/axios/lib/core/createError.js delete mode 100644 node_modules/axios/lib/core/dispatchRequest.js delete mode 100644 node_modules/axios/lib/core/enhanceError.js delete mode 100644 node_modules/axios/lib/core/mergeConfig.js delete mode 100644 node_modules/axios/lib/core/settle.js delete mode 100644 node_modules/axios/lib/core/transformData.js delete mode 100644 node_modules/axios/lib/defaults.js delete mode 100644 node_modules/axios/lib/helpers/README.md delete mode 100644 node_modules/axios/lib/helpers/bind.js delete mode 100644 node_modules/axios/lib/helpers/buildURL.js delete mode 100644 node_modules/axios/lib/helpers/combineURLs.js delete mode 100644 node_modules/axios/lib/helpers/cookies.js delete mode 100644 node_modules/axios/lib/helpers/deprecatedMethod.js delete mode 100644 node_modules/axios/lib/helpers/isAbsoluteURL.js delete mode 100644 node_modules/axios/lib/helpers/isURLSameOrigin.js delete mode 100644 node_modules/axios/lib/helpers/normalizeHeaderName.js delete mode 100644 node_modules/axios/lib/helpers/parseHeaders.js delete mode 100644 node_modules/axios/lib/helpers/spread.js delete mode 100644 node_modules/axios/lib/utils.js delete mode 100644 node_modules/axios/node_modules/is-buffer/LICENSE delete mode 100644 node_modules/axios/node_modules/is-buffer/README.md delete mode 100644 node_modules/axios/node_modules/is-buffer/index.js delete mode 100644 node_modules/axios/node_modules/is-buffer/package.json delete mode 100644 node_modules/axios/package.json delete mode 100644 node_modules/babel-jest/README.md delete mode 100644 node_modules/babel-jest/build/index.d.ts delete mode 100644 node_modules/babel-jest/build/index.d.ts.map delete mode 100644 node_modules/babel-jest/build/index.js delete mode 100644 node_modules/babel-jest/node_modules/slash/index.js delete mode 100644 node_modules/babel-jest/node_modules/slash/license delete mode 100644 node_modules/babel-jest/node_modules/slash/package.json delete mode 100644 node_modules/babel-jest/node_modules/slash/readme.md delete mode 100644 node_modules/babel-jest/package.json delete mode 100644 node_modules/babel-plugin-istanbul/CHANGELOG.md delete mode 100644 node_modules/babel-plugin-istanbul/LICENSE delete mode 100644 node_modules/babel-plugin-istanbul/README.md delete mode 100644 node_modules/babel-plugin-istanbul/lib/index.js delete mode 100644 node_modules/babel-plugin-istanbul/package.json delete mode 100644 node_modules/babel-plugin-jest-hoist/LICENSE delete mode 100644 node_modules/babel-plugin-jest-hoist/README.md delete mode 100644 node_modules/babel-plugin-jest-hoist/build/index.d.ts delete mode 100644 node_modules/babel-plugin-jest-hoist/build/index.d.ts.map delete mode 100644 node_modules/babel-plugin-jest-hoist/build/index.js delete mode 100644 node_modules/babel-plugin-jest-hoist/package.json delete mode 100644 node_modules/babel-preset-jest/LICENSE delete mode 100644 node_modules/babel-preset-jest/README.md delete mode 100644 node_modules/babel-preset-jest/index.js delete mode 100644 node_modules/babel-preset-jest/package.json delete mode 100644 node_modules/balanced-match/.npmignore delete mode 100644 node_modules/balanced-match/LICENSE.md delete mode 100644 node_modules/balanced-match/README.md delete mode 100644 node_modules/balanced-match/index.js delete mode 100644 node_modules/balanced-match/package.json delete mode 100644 node_modules/base/LICENSE delete mode 100644 node_modules/base/README.md delete mode 100644 node_modules/base/index.js delete mode 100644 node_modules/base/node_modules/define-property/LICENSE delete mode 100644 node_modules/base/node_modules/define-property/README.md delete mode 100644 node_modules/base/node_modules/define-property/index.js delete mode 100644 node_modules/base/node_modules/define-property/package.json delete mode 100644 node_modules/base/node_modules/is-accessor-descriptor/LICENSE delete mode 100644 node_modules/base/node_modules/is-accessor-descriptor/README.md delete mode 100644 node_modules/base/node_modules/is-accessor-descriptor/index.js delete mode 100644 node_modules/base/node_modules/is-accessor-descriptor/package.json delete mode 100644 node_modules/base/node_modules/is-data-descriptor/LICENSE delete mode 100644 node_modules/base/node_modules/is-data-descriptor/README.md delete mode 100644 node_modules/base/node_modules/is-data-descriptor/index.js delete mode 100644 node_modules/base/node_modules/is-data-descriptor/package.json delete mode 100644 node_modules/base/node_modules/is-descriptor/LICENSE delete mode 100644 node_modules/base/node_modules/is-descriptor/README.md delete mode 100644 node_modules/base/node_modules/is-descriptor/index.js delete mode 100644 node_modules/base/node_modules/is-descriptor/package.json delete mode 100644 node_modules/base/package.json delete mode 100644 node_modules/bcrypt-pbkdf/CONTRIBUTING.md delete mode 100644 node_modules/bcrypt-pbkdf/LICENSE delete mode 100644 node_modules/bcrypt-pbkdf/README.md delete mode 100644 node_modules/bcrypt-pbkdf/index.js delete mode 100644 node_modules/bcrypt-pbkdf/package.json delete mode 100644 node_modules/brace-expansion/LICENSE delete mode 100644 node_modules/brace-expansion/README.md delete mode 100644 node_modules/brace-expansion/index.js delete mode 100644 node_modules/brace-expansion/package.json delete mode 100644 node_modules/braces/LICENSE delete mode 100644 node_modules/braces/README.md delete mode 100644 node_modules/braces/index.js delete mode 100644 node_modules/braces/lib/braces.js delete mode 100644 node_modules/braces/lib/compilers.js delete mode 100644 node_modules/braces/lib/parsers.js delete mode 100644 node_modules/braces/lib/utils.js delete mode 100644 node_modules/braces/node_modules/extend-shallow/LICENSE delete mode 100644 node_modules/braces/node_modules/extend-shallow/README.md delete mode 100644 node_modules/braces/node_modules/extend-shallow/index.js delete mode 100644 node_modules/braces/node_modules/extend-shallow/package.json delete mode 100644 node_modules/braces/package.json delete mode 100644 node_modules/browser-process-hrtime/LICENSE delete mode 100644 node_modules/browser-process-hrtime/README.md delete mode 100644 node_modules/browser-process-hrtime/index.js delete mode 100644 node_modules/browser-process-hrtime/package.json delete mode 100644 node_modules/browser-resolve/LICENSE delete mode 100644 node_modules/browser-resolve/README.md delete mode 100644 node_modules/browser-resolve/empty.js delete mode 100644 node_modules/browser-resolve/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/.travis.yml delete mode 100644 node_modules/browser-resolve/node_modules/resolve/LICENSE delete mode 100644 node_modules/browser-resolve/node_modules/resolve/example/async.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/example/sync.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/lib/async.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/lib/caller.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/lib/core.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/lib/core.json delete mode 100644 node_modules/browser-resolve/node_modules/resolve/lib/node-modules-paths.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/lib/sync.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/package.json delete mode 100644 node_modules/browser-resolve/node_modules/resolve/readme.markdown delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/core.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/dotdot.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/dotdot/abc/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/dotdot/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/faulty_basedir.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/filter.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/filter_sync.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/mock.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/mock_sync.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/module_dir.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/module_dir/xmodules/aaa/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/module_dir/ymodules/aaa/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/main.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/package.json delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/node_path.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/node_path/x/aaa/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/node_path/x/ccc/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/node_path/y/bbb/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/node_path/y/ccc/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/nonstring.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/pathfilter.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/main.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/alt.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/deeper/ref.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/package.json delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/ref.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/precedence.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/main.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb/main.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/doom.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/package.json delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/quux.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/cup.coffee delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/foo.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/package.json delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.coffee delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/other_path/lib/other-lib.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/other_path/root.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/punycode/node_modules/punycode/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/quux/foo/index.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/main.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/resolver_sync.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/subdirs.js delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json delete mode 100644 node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/package.json delete mode 100644 node_modules/browser-resolve/package.json delete mode 100644 node_modules/bs-logger/CHANGELOG.md delete mode 100644 node_modules/bs-logger/LICENSE delete mode 100644 node_modules/bs-logger/README.md delete mode 100644 node_modules/bs-logger/dist/index.d.ts delete mode 100644 node_modules/bs-logger/dist/index.js delete mode 100644 node_modules/bs-logger/dist/logger/context.d.ts delete mode 100644 node_modules/bs-logger/dist/logger/context.js delete mode 100644 node_modules/bs-logger/dist/logger/index.d.ts delete mode 100644 node_modules/bs-logger/dist/logger/index.js delete mode 100644 node_modules/bs-logger/dist/logger/level.d.ts delete mode 100644 node_modules/bs-logger/dist/logger/level.js delete mode 100644 node_modules/bs-logger/dist/logger/message.d.ts delete mode 100644 node_modules/bs-logger/dist/logger/message.js delete mode 100644 node_modules/bs-logger/dist/logger/root.d.ts delete mode 100644 node_modules/bs-logger/dist/logger/root.js delete mode 100644 node_modules/bs-logger/dist/logger/target.d.ts delete mode 100644 node_modules/bs-logger/dist/logger/target.js delete mode 100644 node_modules/bs-logger/dist/testing/index.d.ts delete mode 100644 node_modules/bs-logger/dist/testing/index.js delete mode 100644 node_modules/bs-logger/dist/testing/target-mock.d.ts delete mode 100644 node_modules/bs-logger/dist/testing/target-mock.js delete mode 100644 node_modules/bs-logger/dist/utils/cache-getters.d.ts delete mode 100644 node_modules/bs-logger/dist/utils/cache-getters.js delete mode 100644 node_modules/bs-logger/package.json delete mode 100644 node_modules/bser/README.md delete mode 100644 node_modules/bser/index.js delete mode 100644 node_modules/bser/package.json delete mode 100644 node_modules/buffer-from/LICENSE delete mode 100644 node_modules/buffer-from/index.js delete mode 100644 node_modules/buffer-from/package.json delete mode 100644 node_modules/buffer-from/readme.md delete mode 100644 node_modules/cache-base/LICENSE delete mode 100644 node_modules/cache-base/README.md delete mode 100644 node_modules/cache-base/index.js delete mode 100644 node_modules/cache-base/package.json delete mode 100644 node_modules/caller-callsite/index.js delete mode 100644 node_modules/caller-callsite/license delete mode 100644 node_modules/caller-callsite/package.json delete mode 100644 node_modules/caller-callsite/readme.md delete mode 100644 node_modules/caller-path/index.js delete mode 100644 node_modules/caller-path/license delete mode 100644 node_modules/caller-path/package.json delete mode 100644 node_modules/caller-path/readme.md delete mode 100644 node_modules/callsites/index.js delete mode 100644 node_modules/callsites/license delete mode 100644 node_modules/callsites/package.json delete mode 100644 node_modules/callsites/readme.md delete mode 100644 node_modules/camelcase/index.d.ts delete mode 100644 node_modules/camelcase/index.js delete mode 100644 node_modules/camelcase/license delete mode 100644 node_modules/camelcase/package.json delete mode 100644 node_modules/camelcase/readme.md delete mode 100644 node_modules/capture-exit/README.md delete mode 100644 node_modules/capture-exit/index.js delete mode 100644 node_modules/capture-exit/package.json delete mode 100644 node_modules/caseless/LICENSE delete mode 100644 node_modules/caseless/README.md delete mode 100644 node_modules/caseless/index.js delete mode 100644 node_modules/caseless/package.json delete mode 100644 node_modules/caseless/test.js delete mode 100644 node_modules/chalk/index.js delete mode 100644 node_modules/chalk/index.js.flow delete mode 100644 node_modules/chalk/license delete mode 100644 node_modules/chalk/package.json delete mode 100644 node_modules/chalk/readme.md delete mode 100644 node_modules/chalk/templates.js delete mode 100644 node_modules/chalk/types/index.d.ts delete mode 100644 node_modules/ci-info/CHANGELOG.md delete mode 100644 node_modules/ci-info/LICENSE delete mode 100644 node_modules/ci-info/README.md delete mode 100644 node_modules/ci-info/index.js delete mode 100644 node_modules/ci-info/package.json delete mode 100644 node_modules/ci-info/vendors.json delete mode 100644 node_modules/class-utils/LICENSE delete mode 100644 node_modules/class-utils/README.md delete mode 100644 node_modules/class-utils/index.js delete mode 100644 node_modules/class-utils/node_modules/define-property/LICENSE delete mode 100644 node_modules/class-utils/node_modules/define-property/README.md delete mode 100644 node_modules/class-utils/node_modules/define-property/index.js delete mode 100644 node_modules/class-utils/node_modules/define-property/package.json delete mode 100644 node_modules/class-utils/package.json delete mode 100644 node_modules/cliui/CHANGELOG.md delete mode 100644 node_modules/cliui/LICENSE.txt delete mode 100644 node_modules/cliui/README.md delete mode 100644 node_modules/cliui/index.js delete mode 100644 node_modules/cliui/package.json delete mode 100644 node_modules/co/History.md delete mode 100644 node_modules/co/LICENSE delete mode 100644 node_modules/co/Readme.md delete mode 100644 node_modules/co/index.js delete mode 100644 node_modules/co/package.json delete mode 100644 node_modules/collection-visit/LICENSE delete mode 100644 node_modules/collection-visit/README.md delete mode 100644 node_modules/collection-visit/index.js delete mode 100644 node_modules/collection-visit/package.json delete mode 100644 node_modules/color-convert/CHANGELOG.md delete mode 100644 node_modules/color-convert/LICENSE delete mode 100644 node_modules/color-convert/README.md delete mode 100644 node_modules/color-convert/conversions.js delete mode 100644 node_modules/color-convert/index.js delete mode 100644 node_modules/color-convert/package.json delete mode 100644 node_modules/color-convert/route.js delete mode 100644 node_modules/color-name/.eslintrc.json delete mode 100644 node_modules/color-name/.npmignore delete mode 100644 node_modules/color-name/LICENSE delete mode 100644 node_modules/color-name/README.md delete mode 100644 node_modules/color-name/index.js delete mode 100644 node_modules/color-name/package.json delete mode 100644 node_modules/color-name/test.js delete mode 100644 node_modules/combined-stream/License delete mode 100644 node_modules/combined-stream/Readme.md delete mode 100644 node_modules/combined-stream/lib/combined_stream.js delete mode 100644 node_modules/combined-stream/package.json delete mode 100644 node_modules/combined-stream/yarn.lock delete mode 100644 node_modules/commander/CHANGELOG.md delete mode 100644 node_modules/commander/LICENSE delete mode 100644 node_modules/commander/Readme.md delete mode 100644 node_modules/commander/index.js delete mode 100644 node_modules/commander/package.json delete mode 100644 node_modules/commander/typings/index.d.ts delete mode 100644 node_modules/component-emitter/History.md delete mode 100644 node_modules/component-emitter/LICENSE delete mode 100644 node_modules/component-emitter/Readme.md delete mode 100644 node_modules/component-emitter/index.js delete mode 100644 node_modules/component-emitter/package.json delete mode 100644 node_modules/concat-map/.travis.yml delete mode 100644 node_modules/concat-map/LICENSE delete mode 100644 node_modules/concat-map/README.markdown delete mode 100644 node_modules/concat-map/example/map.js delete mode 100644 node_modules/concat-map/index.js delete mode 100644 node_modules/concat-map/package.json delete mode 100644 node_modules/concat-map/test/map.js delete mode 100644 node_modules/convert-source-map/LICENSE delete mode 100644 node_modules/convert-source-map/README.md delete mode 100644 node_modules/convert-source-map/index.js delete mode 100644 node_modules/convert-source-map/package.json delete mode 100644 node_modules/copy-descriptor/LICENSE delete mode 100644 node_modules/copy-descriptor/index.js delete mode 100644 node_modules/copy-descriptor/package.json delete mode 100644 node_modules/core-util-is/LICENSE delete mode 100644 node_modules/core-util-is/README.md delete mode 100644 node_modules/core-util-is/float.patch delete mode 100644 node_modules/core-util-is/lib/util.js delete mode 100644 node_modules/core-util-is/package.json delete mode 100644 node_modules/core-util-is/test.js delete mode 100644 node_modules/cosmiconfig/CHANGELOG.md delete mode 100644 node_modules/cosmiconfig/LICENSE delete mode 100644 node_modules/cosmiconfig/README.md delete mode 100644 node_modules/cosmiconfig/dist/cacheWrapper.js delete mode 100644 node_modules/cosmiconfig/dist/createExplorer.js delete mode 100644 node_modules/cosmiconfig/dist/getDirectory.js delete mode 100644 node_modules/cosmiconfig/dist/getPropertyByPath.js delete mode 100644 node_modules/cosmiconfig/dist/index.js delete mode 100644 node_modules/cosmiconfig/dist/loaders.js delete mode 100644 node_modules/cosmiconfig/dist/readFile.js delete mode 100644 node_modules/cosmiconfig/package.json delete mode 100644 node_modules/cross-spawn/CHANGELOG.md delete mode 100644 node_modules/cross-spawn/LICENSE delete mode 100644 node_modules/cross-spawn/README.md delete mode 100644 node_modules/cross-spawn/index.js delete mode 100644 node_modules/cross-spawn/lib/enoent.js delete mode 100644 node_modules/cross-spawn/lib/parse.js delete mode 100644 node_modules/cross-spawn/lib/util/escape.js delete mode 100644 node_modules/cross-spawn/lib/util/readShebang.js delete mode 100644 node_modules/cross-spawn/lib/util/resolveCommand.js delete mode 100644 node_modules/cross-spawn/node_modules/.bin/semver delete mode 100644 node_modules/cross-spawn/node_modules/.bin/semver.cmd delete mode 100644 node_modules/cross-spawn/node_modules/semver/CHANGELOG.md delete mode 100644 node_modules/cross-spawn/node_modules/semver/LICENSE delete mode 100644 node_modules/cross-spawn/node_modules/semver/README.md delete mode 100644 node_modules/cross-spawn/node_modules/semver/bin/semver delete mode 100644 node_modules/cross-spawn/node_modules/semver/package.json delete mode 100644 node_modules/cross-spawn/node_modules/semver/range.bnf delete mode 100644 node_modules/cross-spawn/node_modules/semver/semver.js delete mode 100644 node_modules/cross-spawn/package.json delete mode 100644 node_modules/cssom/LICENSE.txt delete mode 100644 node_modules/cssom/README.mdown delete mode 100644 node_modules/cssom/lib/CSSDocumentRule.js delete mode 100644 node_modules/cssom/lib/CSSFontFaceRule.js delete mode 100644 node_modules/cssom/lib/CSSHostRule.js delete mode 100644 node_modules/cssom/lib/CSSImportRule.js delete mode 100644 node_modules/cssom/lib/CSSKeyframeRule.js delete mode 100644 node_modules/cssom/lib/CSSKeyframesRule.js delete mode 100644 node_modules/cssom/lib/CSSMediaRule.js delete mode 100644 node_modules/cssom/lib/CSSOM.js delete mode 100644 node_modules/cssom/lib/CSSRule.js delete mode 100644 node_modules/cssom/lib/CSSStyleDeclaration.js delete mode 100644 node_modules/cssom/lib/CSSStyleRule.js delete mode 100644 node_modules/cssom/lib/CSSStyleSheet.js delete mode 100644 node_modules/cssom/lib/CSSSupportsRule.js delete mode 100644 node_modules/cssom/lib/CSSValue.js delete mode 100644 node_modules/cssom/lib/CSSValueExpression.js delete mode 100644 node_modules/cssom/lib/MatcherList.js delete mode 100644 node_modules/cssom/lib/MediaList.js delete mode 100644 node_modules/cssom/lib/StyleSheet.js delete mode 100644 node_modules/cssom/lib/clone.js delete mode 100644 node_modules/cssom/lib/index.js delete mode 100644 node_modules/cssom/lib/parse.js delete mode 100644 node_modules/cssom/package.json delete mode 100644 node_modules/cssstyle/.eslintignore delete mode 100644 node_modules/cssstyle/.eslintrc.js delete mode 100644 node_modules/cssstyle/.travis.yml delete mode 100644 node_modules/cssstyle/MIT-LICENSE.txt delete mode 100644 node_modules/cssstyle/README.md delete mode 100644 node_modules/cssstyle/lib/CSSStyleDeclaration.js delete mode 100644 node_modules/cssstyle/lib/allExtraProperties.js delete mode 100644 node_modules/cssstyle/lib/allProperties.js delete mode 100644 node_modules/cssstyle/lib/constants.js delete mode 100644 node_modules/cssstyle/lib/implementedProperties.js delete mode 100644 node_modules/cssstyle/lib/named_colors.json delete mode 100644 node_modules/cssstyle/lib/parsers.js delete mode 100644 node_modules/cssstyle/lib/properties.js delete mode 100644 node_modules/cssstyle/lib/properties/azimuth.js delete mode 100644 node_modules/cssstyle/lib/properties/background.js delete mode 100644 node_modules/cssstyle/lib/properties/backgroundAttachment.js delete mode 100644 node_modules/cssstyle/lib/properties/backgroundColor.js delete mode 100644 node_modules/cssstyle/lib/properties/backgroundImage.js delete mode 100644 node_modules/cssstyle/lib/properties/backgroundPosition.js delete mode 100644 node_modules/cssstyle/lib/properties/backgroundRepeat.js delete mode 100644 node_modules/cssstyle/lib/properties/border.js delete mode 100644 node_modules/cssstyle/lib/properties/borderBottom.js delete mode 100644 node_modules/cssstyle/lib/properties/borderBottomColor.js delete mode 100644 node_modules/cssstyle/lib/properties/borderBottomStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/borderBottomWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/borderCollapse.js delete mode 100644 node_modules/cssstyle/lib/properties/borderColor.js delete mode 100644 node_modules/cssstyle/lib/properties/borderLeft.js delete mode 100644 node_modules/cssstyle/lib/properties/borderLeftColor.js delete mode 100644 node_modules/cssstyle/lib/properties/borderLeftStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/borderLeftWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/borderRight.js delete mode 100644 node_modules/cssstyle/lib/properties/borderRightColor.js delete mode 100644 node_modules/cssstyle/lib/properties/borderRightStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/borderRightWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/borderSpacing.js delete mode 100644 node_modules/cssstyle/lib/properties/borderStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/borderTop.js delete mode 100644 node_modules/cssstyle/lib/properties/borderTopColor.js delete mode 100644 node_modules/cssstyle/lib/properties/borderTopStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/borderTopWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/borderWidth.js delete mode 100644 node_modules/cssstyle/lib/properties/bottom.js delete mode 100644 node_modules/cssstyle/lib/properties/clear.js delete mode 100644 node_modules/cssstyle/lib/properties/clip.js delete mode 100644 node_modules/cssstyle/lib/properties/color.js delete mode 100644 node_modules/cssstyle/lib/properties/cssFloat.js delete mode 100644 node_modules/cssstyle/lib/properties/flex.js delete mode 100644 node_modules/cssstyle/lib/properties/flexBasis.js delete mode 100644 node_modules/cssstyle/lib/properties/flexGrow.js delete mode 100644 node_modules/cssstyle/lib/properties/flexShrink.js delete mode 100644 node_modules/cssstyle/lib/properties/float.js delete mode 100644 node_modules/cssstyle/lib/properties/floodColor.js delete mode 100644 node_modules/cssstyle/lib/properties/font.js delete mode 100644 node_modules/cssstyle/lib/properties/fontFamily.js delete mode 100644 node_modules/cssstyle/lib/properties/fontSize.js delete mode 100644 node_modules/cssstyle/lib/properties/fontStyle.js delete mode 100644 node_modules/cssstyle/lib/properties/fontVariant.js delete mode 100644 node_modules/cssstyle/lib/properties/fontWeight.js delete mode 100644 node_modules/cssstyle/lib/properties/height.js delete mode 100644 node_modules/cssstyle/lib/properties/left.js delete mode 100644 node_modules/cssstyle/lib/properties/lightingColor.js delete mode 100644 node_modules/cssstyle/lib/properties/lineHeight.js delete mode 100644 node_modules/cssstyle/lib/properties/margin.js delete mode 100644 node_modules/cssstyle/lib/properties/marginBottom.js delete mode 100644 node_modules/cssstyle/lib/properties/marginLeft.js delete mode 100644 node_modules/cssstyle/lib/properties/marginRight.js delete mode 100644 node_modules/cssstyle/lib/properties/marginTop.js delete mode 100644 node_modules/cssstyle/lib/properties/opacity.js delete mode 100644 node_modules/cssstyle/lib/properties/outlineColor.js delete mode 100644 node_modules/cssstyle/lib/properties/padding.js delete mode 100644 node_modules/cssstyle/lib/properties/paddingBottom.js delete mode 100644 node_modules/cssstyle/lib/properties/paddingLeft.js delete mode 100644 node_modules/cssstyle/lib/properties/paddingRight.js delete mode 100644 node_modules/cssstyle/lib/properties/paddingTop.js delete mode 100644 node_modules/cssstyle/lib/properties/right.js delete mode 100644 node_modules/cssstyle/lib/properties/stopColor.js delete mode 100644 node_modules/cssstyle/lib/properties/textLineThroughColor.js delete mode 100644 node_modules/cssstyle/lib/properties/textOverlineColor.js delete mode 100644 node_modules/cssstyle/lib/properties/textUnderlineColor.js delete mode 100644 node_modules/cssstyle/lib/properties/top.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderAfterColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderBeforeColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderEndColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitBorderStartColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitColumnRuleColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitMatchNearestMailBlockquoteColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTapHighlightColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTextEmphasisColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTextFillColor.js delete mode 100644 node_modules/cssstyle/lib/properties/webkitTextStrokeColor.js delete mode 100644 node_modules/cssstyle/lib/properties/width.js delete mode 100644 node_modules/cssstyle/lib/utils/getBasicPropertyDescriptor.js delete mode 100644 node_modules/cssstyle/package.json delete mode 100644 node_modules/cssstyle/scripts/download_latest_properties.js delete mode 100644 node_modules/cssstyle/scripts/generate_implemented_properties.js delete mode 100644 node_modules/cssstyle/scripts/generate_properties.js delete mode 100644 node_modules/cssstyle/tests/tests.js delete mode 100644 node_modules/dashdash/CHANGES.md delete mode 100644 node_modules/dashdash/LICENSE.txt delete mode 100644 node_modules/dashdash/README.md delete mode 100644 node_modules/dashdash/etc/dashdash.bash_completion.in delete mode 100644 node_modules/dashdash/lib/dashdash.js delete mode 100644 node_modules/dashdash/package.json delete mode 100644 node_modules/data-urls/LICENSE.txt delete mode 100644 node_modules/data-urls/README.md delete mode 100644 node_modules/data-urls/lib/parser.js delete mode 100644 node_modules/data-urls/lib/utils.js delete mode 100644 node_modules/data-urls/node_modules/whatwg-url/LICENSE.txt delete mode 100644 node_modules/data-urls/node_modules/whatwg-url/README.md delete mode 100644 node_modules/data-urls/node_modules/whatwg-url/lib/URL-impl.js delete mode 100644 node_modules/data-urls/node_modules/whatwg-url/lib/URL.js delete mode 100644 node_modules/data-urls/node_modules/whatwg-url/lib/URLSearchParams-impl.js delete mode 100644 node_modules/data-urls/node_modules/whatwg-url/lib/URLSearchParams.js delete mode 100644 node_modules/data-urls/node_modules/whatwg-url/lib/infra.js delete mode 100644 node_modules/data-urls/node_modules/whatwg-url/lib/public-api.js delete mode 100644 node_modules/data-urls/node_modules/whatwg-url/lib/url-state-machine.js delete mode 100644 node_modules/data-urls/node_modules/whatwg-url/lib/urlencoded.js delete mode 100644 node_modules/data-urls/node_modules/whatwg-url/lib/utils.js delete mode 100644 node_modules/data-urls/node_modules/whatwg-url/package.json delete mode 100644 node_modules/data-urls/package.json delete mode 100644 node_modules/debug/.coveralls.yml delete mode 100644 node_modules/debug/.eslintrc delete mode 100644 node_modules/debug/.npmignore delete mode 100644 node_modules/debug/.travis.yml delete mode 100644 node_modules/debug/CHANGELOG.md delete mode 100644 node_modules/debug/LICENSE delete mode 100644 node_modules/debug/Makefile delete mode 100644 node_modules/debug/README.md delete mode 100644 node_modules/debug/component.json delete mode 100644 node_modules/debug/karma.conf.js delete mode 100644 node_modules/debug/node.js delete mode 100644 node_modules/debug/package.json delete mode 100644 node_modules/debug/src/browser.js delete mode 100644 node_modules/debug/src/debug.js delete mode 100644 node_modules/debug/src/index.js delete mode 100644 node_modules/debug/src/inspector-log.js delete mode 100644 node_modules/debug/src/node.js delete mode 100644 node_modules/decamelize/index.js delete mode 100644 node_modules/decamelize/license delete mode 100644 node_modules/decamelize/package.json delete mode 100644 node_modules/decamelize/readme.md delete mode 100644 node_modules/decode-uri-component/index.js delete mode 100644 node_modules/decode-uri-component/license delete mode 100644 node_modules/decode-uri-component/package.json delete mode 100644 node_modules/decode-uri-component/readme.md delete mode 100644 node_modules/deep-is/.npmignore delete mode 100644 node_modules/deep-is/.travis.yml delete mode 100644 node_modules/deep-is/LICENSE delete mode 100644 node_modules/deep-is/README.markdown delete mode 100644 node_modules/deep-is/example/cmp.js delete mode 100644 node_modules/deep-is/index.js delete mode 100644 node_modules/deep-is/package.json delete mode 100644 node_modules/deep-is/test/NaN.js delete mode 100644 node_modules/deep-is/test/cmp.js delete mode 100644 node_modules/deep-is/test/neg-vs-pos-0.js delete mode 100644 node_modules/define-properties/.editorconfig delete mode 100644 node_modules/define-properties/.eslintrc delete mode 100644 node_modules/define-properties/.jscs.json delete mode 100644 node_modules/define-properties/.travis.yml delete mode 100644 node_modules/define-properties/CHANGELOG.md delete mode 100644 node_modules/define-properties/LICENSE delete mode 100644 node_modules/define-properties/README.md delete mode 100644 node_modules/define-properties/index.js delete mode 100644 node_modules/define-properties/package.json delete mode 100644 node_modules/define-properties/test/index.js delete mode 100644 node_modules/define-property/CHANGELOG.md delete mode 100644 node_modules/define-property/LICENSE delete mode 100644 node_modules/define-property/README.md delete mode 100644 node_modules/define-property/index.js delete mode 100644 node_modules/define-property/node_modules/is-accessor-descriptor/LICENSE delete mode 100644 node_modules/define-property/node_modules/is-accessor-descriptor/README.md delete mode 100644 node_modules/define-property/node_modules/is-accessor-descriptor/index.js delete mode 100644 node_modules/define-property/node_modules/is-accessor-descriptor/package.json delete mode 100644 node_modules/define-property/node_modules/is-data-descriptor/LICENSE delete mode 100644 node_modules/define-property/node_modules/is-data-descriptor/README.md delete mode 100644 node_modules/define-property/node_modules/is-data-descriptor/index.js delete mode 100644 node_modules/define-property/node_modules/is-data-descriptor/package.json delete mode 100644 node_modules/define-property/node_modules/is-descriptor/LICENSE delete mode 100644 node_modules/define-property/node_modules/is-descriptor/README.md delete mode 100644 node_modules/define-property/node_modules/is-descriptor/index.js delete mode 100644 node_modules/define-property/node_modules/is-descriptor/package.json delete mode 100644 node_modules/define-property/package.json delete mode 100644 node_modules/delayed-stream/.npmignore delete mode 100644 node_modules/delayed-stream/License delete mode 100644 node_modules/delayed-stream/Makefile delete mode 100644 node_modules/delayed-stream/Readme.md delete mode 100644 node_modules/delayed-stream/lib/delayed_stream.js delete mode 100644 node_modules/delayed-stream/package.json delete mode 100644 node_modules/detect-newline/index.js delete mode 100644 node_modules/detect-newline/license delete mode 100644 node_modules/detect-newline/package.json delete mode 100644 node_modules/detect-newline/readme.md delete mode 100644 node_modules/diff-sequences/LICENSE delete mode 100644 node_modules/diff-sequences/README.md delete mode 100644 node_modules/diff-sequences/build/index.d.ts delete mode 100644 node_modules/diff-sequences/build/index.d.ts.map delete mode 100644 node_modules/diff-sequences/build/index.js delete mode 100644 node_modules/diff-sequences/package.json delete mode 100644 node_modules/diff-sequences/perf/example.md delete mode 100644 node_modules/diff-sequences/perf/index.js delete mode 100644 node_modules/domexception/LICENSE.txt delete mode 100644 node_modules/domexception/README.md delete mode 100644 node_modules/domexception/lib/DOMException-impl.js delete mode 100644 node_modules/domexception/lib/DOMException.js delete mode 100644 node_modules/domexception/lib/legacy-error-codes.json delete mode 100644 node_modules/domexception/lib/public-api.js delete mode 100644 node_modules/domexception/lib/utils.js delete mode 100644 node_modules/domexception/package.json delete mode 100644 node_modules/ecc-jsbn/LICENSE delete mode 100644 node_modules/ecc-jsbn/README.md delete mode 100644 node_modules/ecc-jsbn/index.js delete mode 100644 node_modules/ecc-jsbn/lib/LICENSE-jsbn delete mode 100644 node_modules/ecc-jsbn/lib/ec.js delete mode 100644 node_modules/ecc-jsbn/lib/sec.js delete mode 100644 node_modules/ecc-jsbn/package.json delete mode 100644 node_modules/ecc-jsbn/test.js delete mode 100644 node_modules/emoji-regex/LICENSE-MIT.txt delete mode 100644 node_modules/emoji-regex/README.md delete mode 100644 node_modules/emoji-regex/es2015/index.js delete mode 100644 node_modules/emoji-regex/es2015/text.js delete mode 100644 node_modules/emoji-regex/index.d.ts delete mode 100644 node_modules/emoji-regex/index.js delete mode 100644 node_modules/emoji-regex/package.json delete mode 100644 node_modules/emoji-regex/text.js delete mode 100644 node_modules/end-of-stream/LICENSE delete mode 100644 node_modules/end-of-stream/README.md delete mode 100644 node_modules/end-of-stream/index.js delete mode 100644 node_modules/end-of-stream/package.json delete mode 100644 node_modules/error-ex/LICENSE delete mode 100644 node_modules/error-ex/README.md delete mode 100644 node_modules/error-ex/index.js delete mode 100644 node_modules/error-ex/package.json delete mode 100644 node_modules/es-abstract/.editorconfig delete mode 100644 node_modules/es-abstract/.eslintrc delete mode 100644 node_modules/es-abstract/.github/FUNDING.yml delete mode 100644 node_modules/es-abstract/.nycrc delete mode 100644 node_modules/es-abstract/.travis.yml delete mode 100644 node_modules/es-abstract/CHANGELOG.md delete mode 100644 node_modules/es-abstract/GetIntrinsic.js delete mode 100644 node_modules/es-abstract/LICENSE delete mode 100644 node_modules/es-abstract/Makefile delete mode 100644 node_modules/es-abstract/README.md delete mode 100644 node_modules/es-abstract/es2015.js delete mode 100644 node_modules/es-abstract/es2016.js delete mode 100644 node_modules/es-abstract/es2017.js delete mode 100644 node_modules/es-abstract/es2018.js delete mode 100644 node_modules/es-abstract/es2019.js delete mode 100644 node_modules/es-abstract/es5.js delete mode 100644 node_modules/es-abstract/es6.js delete mode 100644 node_modules/es-abstract/es7.js delete mode 100644 node_modules/es-abstract/helpers/assertRecord.js delete mode 100644 node_modules/es-abstract/helpers/assign.js delete mode 100644 node_modules/es-abstract/helpers/callBind.js delete mode 100644 node_modules/es-abstract/helpers/every.js delete mode 100644 node_modules/es-abstract/helpers/forEach.js delete mode 100644 node_modules/es-abstract/helpers/isFinite.js delete mode 100644 node_modules/es-abstract/helpers/isNaN.js delete mode 100644 node_modules/es-abstract/helpers/isPrimitive.js delete mode 100644 node_modules/es-abstract/helpers/isPropertyDescriptor.js delete mode 100644 node_modules/es-abstract/helpers/isSamePropertyDescriptor.js delete mode 100644 node_modules/es-abstract/helpers/mod.js delete mode 100644 node_modules/es-abstract/helpers/sign.js delete mode 100644 node_modules/es-abstract/index.js delete mode 100644 node_modules/es-abstract/operations/.eslintrc delete mode 100644 node_modules/es-abstract/operations/2015.js delete mode 100644 node_modules/es-abstract/operations/2016.js delete mode 100644 node_modules/es-abstract/operations/2017.js delete mode 100644 node_modules/es-abstract/operations/2018.js delete mode 100644 node_modules/es-abstract/operations/2019.js delete mode 100644 node_modules/es-abstract/operations/getOps.js delete mode 100644 node_modules/es-abstract/package.json delete mode 100644 node_modules/es-abstract/test/.eslintrc delete mode 100644 node_modules/es-abstract/test/GetIntrinsic.js delete mode 100644 node_modules/es-abstract/test/diffOps.js delete mode 100644 node_modules/es-abstract/test/es2015.js delete mode 100644 node_modules/es-abstract/test/es2016.js delete mode 100644 node_modules/es-abstract/test/es2017.js delete mode 100644 node_modules/es-abstract/test/es2018.js delete mode 100644 node_modules/es-abstract/test/es2019.js delete mode 100644 node_modules/es-abstract/test/es5.js delete mode 100644 node_modules/es-abstract/test/es6.js delete mode 100644 node_modules/es-abstract/test/es7.js delete mode 100644 node_modules/es-abstract/test/helpers/assertRecord.js delete mode 100644 node_modules/es-abstract/test/helpers/values.js delete mode 100644 node_modules/es-abstract/test/index.js delete mode 100644 node_modules/es-abstract/test/tests.js delete mode 100644 node_modules/es-to-primitive/.editorconfig delete mode 100644 node_modules/es-to-primitive/.eslintrc delete mode 100644 node_modules/es-to-primitive/.jscs.json delete mode 100644 node_modules/es-to-primitive/.travis.yml delete mode 100644 node_modules/es-to-primitive/CHANGELOG.md delete mode 100644 node_modules/es-to-primitive/LICENSE delete mode 100644 node_modules/es-to-primitive/Makefile delete mode 100644 node_modules/es-to-primitive/README.md delete mode 100644 node_modules/es-to-primitive/es2015.js delete mode 100644 node_modules/es-to-primitive/es5.js delete mode 100644 node_modules/es-to-primitive/es6.js delete mode 100644 node_modules/es-to-primitive/helpers/isPrimitive.js delete mode 100644 node_modules/es-to-primitive/index.js delete mode 100644 node_modules/es-to-primitive/package.json delete mode 100644 node_modules/es-to-primitive/test/.eslintrc delete mode 100644 node_modules/es-to-primitive/test/es2015.js delete mode 100644 node_modules/es-to-primitive/test/es5.js delete mode 100644 node_modules/es-to-primitive/test/es6.js delete mode 100644 node_modules/es-to-primitive/test/index.js delete mode 100644 node_modules/escape-string-regexp/index.js delete mode 100644 node_modules/escape-string-regexp/license delete mode 100644 node_modules/escape-string-regexp/package.json delete mode 100644 node_modules/escape-string-regexp/readme.md delete mode 100644 node_modules/escodegen/LICENSE.BSD delete mode 100644 node_modules/escodegen/README.md delete mode 100644 node_modules/escodegen/bin/escodegen.js delete mode 100644 node_modules/escodegen/bin/esgenerate.js delete mode 100644 node_modules/escodegen/escodegen.js delete mode 100644 node_modules/escodegen/node_modules/.bin/esparse delete mode 100644 node_modules/escodegen/node_modules/.bin/esparse.cmd delete mode 100644 node_modules/escodegen/node_modules/.bin/esvalidate delete mode 100644 node_modules/escodegen/node_modules/.bin/esvalidate.cmd delete mode 100644 node_modules/escodegen/node_modules/esprima/ChangeLog delete mode 100644 node_modules/escodegen/node_modules/esprima/LICENSE.BSD delete mode 100644 node_modules/escodegen/node_modules/esprima/README.md delete mode 100644 node_modules/escodegen/node_modules/esprima/bin/esparse.js delete mode 100644 node_modules/escodegen/node_modules/esprima/bin/esvalidate.js delete mode 100644 node_modules/escodegen/node_modules/esprima/dist/esprima.js delete mode 100644 node_modules/escodegen/node_modules/esprima/package.json delete mode 100644 node_modules/escodegen/package.json delete mode 100644 node_modules/esprima/ChangeLog delete mode 100644 node_modules/esprima/LICENSE.BSD delete mode 100644 node_modules/esprima/README.md delete mode 100644 node_modules/esprima/bin/esparse.js delete mode 100644 node_modules/esprima/bin/esvalidate.js delete mode 100644 node_modules/esprima/dist/esprima.js delete mode 100644 node_modules/esprima/package.json delete mode 100644 node_modules/estraverse/.jshintrc delete mode 100644 node_modules/estraverse/LICENSE.BSD delete mode 100644 node_modules/estraverse/README.md delete mode 100644 node_modules/estraverse/estraverse.js delete mode 100644 node_modules/estraverse/gulpfile.js delete mode 100644 node_modules/estraverse/package.json delete mode 100644 node_modules/esutils/LICENSE.BSD delete mode 100644 node_modules/esutils/README.md delete mode 100644 node_modules/esutils/lib/ast.js delete mode 100644 node_modules/esutils/lib/code.js delete mode 100644 node_modules/esutils/lib/keyword.js delete mode 100644 node_modules/esutils/lib/utils.js delete mode 100644 node_modules/esutils/package.json delete mode 100644 node_modules/exec-sh/.jshintrc delete mode 100644 node_modules/exec-sh/.travis.yml delete mode 100644 node_modules/exec-sh/LICENSE delete mode 100644 node_modules/exec-sh/README.md delete mode 100644 node_modules/exec-sh/example/example.js delete mode 100644 node_modules/exec-sh/lib/exec-sh.js delete mode 100644 node_modules/exec-sh/package.json delete mode 100644 node_modules/exec-sh/test/exec-sh.js delete mode 100644 node_modules/execa/index.js delete mode 100644 node_modules/execa/lib/errname.js delete mode 100644 node_modules/execa/lib/stdio.js delete mode 100644 node_modules/execa/license delete mode 100644 node_modules/execa/package.json delete mode 100644 node_modules/execa/readme.md delete mode 100644 node_modules/exit/.jshintrc delete mode 100644 node_modules/exit/.npmignore delete mode 100644 node_modules/exit/.travis.yml delete mode 100644 node_modules/exit/Gruntfile.js delete mode 100644 node_modules/exit/LICENSE-MIT delete mode 100644 node_modules/exit/README.md delete mode 100644 node_modules/exit/lib/exit.js delete mode 100644 node_modules/exit/package.json delete mode 100644 node_modules/exit/test/exit_test.js delete mode 100644 node_modules/exit/test/fixtures/10-stderr.txt delete mode 100644 node_modules/exit/test/fixtures/10-stdout-stderr.txt delete mode 100644 node_modules/exit/test/fixtures/10-stdout.txt delete mode 100644 node_modules/exit/test/fixtures/100-stderr.txt delete mode 100644 node_modules/exit/test/fixtures/100-stdout-stderr.txt delete mode 100644 node_modules/exit/test/fixtures/100-stdout.txt delete mode 100644 node_modules/exit/test/fixtures/1000-stderr.txt delete mode 100644 node_modules/exit/test/fixtures/1000-stdout-stderr.txt delete mode 100644 node_modules/exit/test/fixtures/1000-stdout.txt delete mode 100644 node_modules/exit/test/fixtures/create-files.sh delete mode 100644 node_modules/exit/test/fixtures/log-broken.js delete mode 100644 node_modules/exit/test/fixtures/log.js delete mode 100644 node_modules/expand-brackets/LICENSE delete mode 100644 node_modules/expand-brackets/README.md delete mode 100644 node_modules/expand-brackets/changelog.md delete mode 100644 node_modules/expand-brackets/index.js delete mode 100644 node_modules/expand-brackets/lib/compilers.js delete mode 100644 node_modules/expand-brackets/lib/parsers.js delete mode 100644 node_modules/expand-brackets/lib/utils.js delete mode 100644 node_modules/expand-brackets/node_modules/define-property/LICENSE delete mode 100644 node_modules/expand-brackets/node_modules/define-property/README.md delete mode 100644 node_modules/expand-brackets/node_modules/define-property/index.js delete mode 100644 node_modules/expand-brackets/node_modules/define-property/package.json delete mode 100644 node_modules/expand-brackets/node_modules/extend-shallow/LICENSE delete mode 100644 node_modules/expand-brackets/node_modules/extend-shallow/README.md delete mode 100644 node_modules/expand-brackets/node_modules/extend-shallow/index.js delete mode 100644 node_modules/expand-brackets/node_modules/extend-shallow/package.json delete mode 100644 node_modules/expand-brackets/package.json delete mode 100644 node_modules/expect/LICENSE delete mode 100644 node_modules/expect/README.md delete mode 100644 node_modules/expect/build-es5/index.js delete mode 100644 node_modules/expect/build-es5/index.js.map delete mode 100644 node_modules/expect/build/asymmetricMatchers.d.ts delete mode 100644 node_modules/expect/build/asymmetricMatchers.d.ts.map delete mode 100644 node_modules/expect/build/asymmetricMatchers.js delete mode 100644 node_modules/expect/build/extractExpectedAssertionsErrors.d.ts delete mode 100644 node_modules/expect/build/extractExpectedAssertionsErrors.d.ts.map delete mode 100644 node_modules/expect/build/extractExpectedAssertionsErrors.js delete mode 100644 node_modules/expect/build/fakeChalk.d.ts delete mode 100644 node_modules/expect/build/fakeChalk.d.ts.map delete mode 100644 node_modules/expect/build/fakeChalk.js delete mode 100644 node_modules/expect/build/index.d.ts delete mode 100644 node_modules/expect/build/index.d.ts.map delete mode 100644 node_modules/expect/build/index.js delete mode 100644 node_modules/expect/build/jasmineUtils.d.ts delete mode 100644 node_modules/expect/build/jasmineUtils.d.ts.map delete mode 100644 node_modules/expect/build/jasmineUtils.js delete mode 100644 node_modules/expect/build/jestMatchersObject.d.ts delete mode 100644 node_modules/expect/build/jestMatchersObject.d.ts.map delete mode 100644 node_modules/expect/build/jestMatchersObject.js delete mode 100644 node_modules/expect/build/matchers.d.ts delete mode 100644 node_modules/expect/build/matchers.d.ts.map delete mode 100644 node_modules/expect/build/matchers.js delete mode 100644 node_modules/expect/build/print.d.ts delete mode 100644 node_modules/expect/build/print.d.ts.map delete mode 100644 node_modules/expect/build/print.js delete mode 100644 node_modules/expect/build/spyMatchers.d.ts delete mode 100644 node_modules/expect/build/spyMatchers.d.ts.map delete mode 100644 node_modules/expect/build/spyMatchers.js delete mode 100644 node_modules/expect/build/toThrowMatchers.d.ts delete mode 100644 node_modules/expect/build/toThrowMatchers.d.ts.map delete mode 100644 node_modules/expect/build/toThrowMatchers.js delete mode 100644 node_modules/expect/build/types.d.ts delete mode 100644 node_modules/expect/build/types.d.ts.map delete mode 100644 node_modules/expect/build/types.js delete mode 100644 node_modules/expect/build/utils.d.ts delete mode 100644 node_modules/expect/build/utils.d.ts.map delete mode 100644 node_modules/expect/build/utils.js delete mode 100644 node_modules/expect/package.json delete mode 100644 node_modules/extend-shallow/LICENSE delete mode 100644 node_modules/extend-shallow/README.md delete mode 100644 node_modules/extend-shallow/index.js delete mode 100644 node_modules/extend-shallow/node_modules/is-extendable/LICENSE delete mode 100644 node_modules/extend-shallow/node_modules/is-extendable/README.md delete mode 100644 node_modules/extend-shallow/node_modules/is-extendable/index.d.ts delete mode 100644 node_modules/extend-shallow/node_modules/is-extendable/index.js delete mode 100644 node_modules/extend-shallow/node_modules/is-extendable/package.json delete mode 100644 node_modules/extend-shallow/package.json delete mode 100644 node_modules/extend/.editorconfig delete mode 100644 node_modules/extend/.eslintrc delete mode 100644 node_modules/extend/.jscs.json delete mode 100644 node_modules/extend/.travis.yml delete mode 100644 node_modules/extend/CHANGELOG.md delete mode 100644 node_modules/extend/LICENSE delete mode 100644 node_modules/extend/README.md delete mode 100644 node_modules/extend/component.json delete mode 100644 node_modules/extend/index.js delete mode 100644 node_modules/extend/package.json delete mode 100644 node_modules/extglob/LICENSE delete mode 100644 node_modules/extglob/README.md delete mode 100644 node_modules/extglob/changelog.md delete mode 100644 node_modules/extglob/index.js delete mode 100644 node_modules/extglob/lib/.DS_Store delete mode 100644 node_modules/extglob/lib/compilers.js delete mode 100644 node_modules/extglob/lib/extglob.js delete mode 100644 node_modules/extglob/lib/parsers.js delete mode 100644 node_modules/extglob/lib/utils.js delete mode 100644 node_modules/extglob/node_modules/define-property/LICENSE delete mode 100644 node_modules/extglob/node_modules/define-property/README.md delete mode 100644 node_modules/extglob/node_modules/define-property/index.js delete mode 100644 node_modules/extglob/node_modules/define-property/package.json delete mode 100644 node_modules/extglob/node_modules/extend-shallow/LICENSE delete mode 100644 node_modules/extglob/node_modules/extend-shallow/README.md delete mode 100644 node_modules/extglob/node_modules/extend-shallow/index.js delete mode 100644 node_modules/extglob/node_modules/extend-shallow/package.json delete mode 100644 node_modules/extglob/node_modules/is-accessor-descriptor/LICENSE delete mode 100644 node_modules/extglob/node_modules/is-accessor-descriptor/README.md delete mode 100644 node_modules/extglob/node_modules/is-accessor-descriptor/index.js delete mode 100644 node_modules/extglob/node_modules/is-accessor-descriptor/package.json delete mode 100644 node_modules/extglob/node_modules/is-data-descriptor/LICENSE delete mode 100644 node_modules/extglob/node_modules/is-data-descriptor/README.md delete mode 100644 node_modules/extglob/node_modules/is-data-descriptor/index.js delete mode 100644 node_modules/extglob/node_modules/is-data-descriptor/package.json delete mode 100644 node_modules/extglob/node_modules/is-descriptor/LICENSE delete mode 100644 node_modules/extglob/node_modules/is-descriptor/README.md delete mode 100644 node_modules/extglob/node_modules/is-descriptor/index.js delete mode 100644 node_modules/extglob/node_modules/is-descriptor/package.json delete mode 100644 node_modules/extglob/package.json delete mode 100644 node_modules/extsprintf/.gitmodules delete mode 100644 node_modules/extsprintf/.npmignore delete mode 100644 node_modules/extsprintf/LICENSE delete mode 100644 node_modules/extsprintf/Makefile delete mode 100644 node_modules/extsprintf/Makefile.targ delete mode 100644 node_modules/extsprintf/README.md delete mode 100644 node_modules/extsprintf/jsl.node.conf delete mode 100644 node_modules/extsprintf/lib/extsprintf.js delete mode 100644 node_modules/extsprintf/package.json delete mode 100644 node_modules/fast-deep-equal/LICENSE delete mode 100644 node_modules/fast-deep-equal/README.md delete mode 100644 node_modules/fast-deep-equal/index.d.ts delete mode 100644 node_modules/fast-deep-equal/index.js delete mode 100644 node_modules/fast-deep-equal/package.json delete mode 100644 node_modules/fast-json-stable-stringify/.eslintrc.yml delete mode 100644 node_modules/fast-json-stable-stringify/.npmignore delete mode 100644 node_modules/fast-json-stable-stringify/.travis.yml delete mode 100644 node_modules/fast-json-stable-stringify/LICENSE delete mode 100644 node_modules/fast-json-stable-stringify/README.md delete mode 100644 node_modules/fast-json-stable-stringify/benchmark/index.js delete mode 100644 node_modules/fast-json-stable-stringify/benchmark/test.json delete mode 100644 node_modules/fast-json-stable-stringify/example/key_cmp.js delete mode 100644 node_modules/fast-json-stable-stringify/example/nested.js delete mode 100644 node_modules/fast-json-stable-stringify/example/str.js delete mode 100644 node_modules/fast-json-stable-stringify/example/value_cmp.js delete mode 100644 node_modules/fast-json-stable-stringify/index.js delete mode 100644 node_modules/fast-json-stable-stringify/package.json delete mode 100644 node_modules/fast-json-stable-stringify/test/cmp.js delete mode 100644 node_modules/fast-json-stable-stringify/test/nested.js delete mode 100644 node_modules/fast-json-stable-stringify/test/str.js delete mode 100644 node_modules/fast-json-stable-stringify/test/to-json.js delete mode 100644 node_modules/fast-levenshtein/LICENSE.md delete mode 100644 node_modules/fast-levenshtein/README.md delete mode 100644 node_modules/fast-levenshtein/levenshtein.js delete mode 100644 node_modules/fast-levenshtein/package.json delete mode 100644 node_modules/fb-watchman/README.md delete mode 100644 node_modules/fb-watchman/index.js delete mode 100644 node_modules/fb-watchman/package.json delete mode 100644 node_modules/fill-range/LICENSE delete mode 100644 node_modules/fill-range/README.md delete mode 100644 node_modules/fill-range/index.js delete mode 100644 node_modules/fill-range/node_modules/extend-shallow/LICENSE delete mode 100644 node_modules/fill-range/node_modules/extend-shallow/README.md delete mode 100644 node_modules/fill-range/node_modules/extend-shallow/index.js delete mode 100644 node_modules/fill-range/node_modules/extend-shallow/package.json delete mode 100644 node_modules/fill-range/package.json delete mode 100644 node_modules/find-up/index.js delete mode 100644 node_modules/find-up/license delete mode 100644 node_modules/find-up/package.json delete mode 100644 node_modules/find-up/readme.md delete mode 100644 node_modules/follow-redirects/LICENSE delete mode 100644 node_modules/follow-redirects/README.md delete mode 100644 node_modules/follow-redirects/http.js delete mode 100644 node_modules/follow-redirects/https.js delete mode 100644 node_modules/follow-redirects/index.js delete mode 100644 node_modules/follow-redirects/node_modules/debug/.coveralls.yml delete mode 100644 node_modules/follow-redirects/node_modules/debug/.eslintrc delete mode 100644 node_modules/follow-redirects/node_modules/debug/.npmignore delete mode 100644 node_modules/follow-redirects/node_modules/debug/.travis.yml delete mode 100644 node_modules/follow-redirects/node_modules/debug/CHANGELOG.md delete mode 100644 node_modules/follow-redirects/node_modules/debug/LICENSE delete mode 100644 node_modules/follow-redirects/node_modules/debug/Makefile delete mode 100644 node_modules/follow-redirects/node_modules/debug/README.md delete mode 100644 node_modules/follow-redirects/node_modules/debug/karma.conf.js delete mode 100644 node_modules/follow-redirects/node_modules/debug/node.js delete mode 100644 node_modules/follow-redirects/node_modules/debug/package.json delete mode 100644 node_modules/follow-redirects/node_modules/debug/src/browser.js delete mode 100644 node_modules/follow-redirects/node_modules/debug/src/debug.js delete mode 100644 node_modules/follow-redirects/node_modules/debug/src/index.js delete mode 100644 node_modules/follow-redirects/node_modules/debug/src/node.js delete mode 100644 node_modules/follow-redirects/package.json delete mode 100644 node_modules/for-in/LICENSE delete mode 100644 node_modules/for-in/README.md delete mode 100644 node_modules/for-in/index.js delete mode 100644 node_modules/for-in/package.json delete mode 100644 node_modules/forever-agent/LICENSE delete mode 100644 node_modules/forever-agent/README.md delete mode 100644 node_modules/forever-agent/index.js delete mode 100644 node_modules/forever-agent/package.json delete mode 100644 node_modules/form-data/License delete mode 100644 node_modules/form-data/README.md delete mode 100644 node_modules/form-data/README.md.bak delete mode 100644 node_modules/form-data/lib/browser.js delete mode 100644 node_modules/form-data/lib/form_data.js delete mode 100644 node_modules/form-data/lib/populate.js delete mode 100644 node_modules/form-data/package.json delete mode 100644 node_modules/form-data/yarn.lock delete mode 100644 node_modules/fragment-cache/LICENSE delete mode 100644 node_modules/fragment-cache/README.md delete mode 100644 node_modules/fragment-cache/index.js delete mode 100644 node_modules/fragment-cache/package.json delete mode 100644 node_modules/fs.realpath/LICENSE delete mode 100644 node_modules/fs.realpath/README.md delete mode 100644 node_modules/fs.realpath/index.js delete mode 100644 node_modules/fs.realpath/old.js delete mode 100644 node_modules/fs.realpath/package.json delete mode 100644 node_modules/function-bind/.editorconfig delete mode 100644 node_modules/function-bind/.eslintrc delete mode 100644 node_modules/function-bind/.jscs.json delete mode 100644 node_modules/function-bind/.npmignore delete mode 100644 node_modules/function-bind/.travis.yml delete mode 100644 node_modules/function-bind/LICENSE delete mode 100644 node_modules/function-bind/README.md delete mode 100644 node_modules/function-bind/implementation.js delete mode 100644 node_modules/function-bind/index.js delete mode 100644 node_modules/function-bind/package.json delete mode 100644 node_modules/function-bind/test/.eslintrc delete mode 100644 node_modules/function-bind/test/index.js delete mode 100644 node_modules/get-caller-file/LICENSE.md delete mode 100644 node_modules/get-caller-file/README.md delete mode 100644 node_modules/get-caller-file/index.d.ts delete mode 100644 node_modules/get-caller-file/index.js delete mode 100644 node_modules/get-caller-file/index.js.map delete mode 100644 node_modules/get-caller-file/package.json delete mode 100644 node_modules/get-stdin/index.d.ts delete mode 100644 node_modules/get-stdin/index.js delete mode 100644 node_modules/get-stdin/license delete mode 100644 node_modules/get-stdin/package.json delete mode 100644 node_modules/get-stdin/readme.md delete mode 100644 node_modules/get-stream/buffer-stream.js delete mode 100644 node_modules/get-stream/index.js delete mode 100644 node_modules/get-stream/license delete mode 100644 node_modules/get-stream/package.json delete mode 100644 node_modules/get-stream/readme.md delete mode 100644 node_modules/get-value/LICENSE delete mode 100644 node_modules/get-value/index.js delete mode 100644 node_modules/get-value/package.json delete mode 100644 node_modules/getpass/.npmignore delete mode 100644 node_modules/getpass/.travis.yml delete mode 100644 node_modules/getpass/LICENSE delete mode 100644 node_modules/getpass/README.md delete mode 100644 node_modules/getpass/lib/index.js delete mode 100644 node_modules/getpass/package.json delete mode 100644 node_modules/glob/LICENSE delete mode 100644 node_modules/glob/README.md delete mode 100644 node_modules/glob/changelog.md delete mode 100644 node_modules/glob/common.js delete mode 100644 node_modules/glob/glob.js delete mode 100644 node_modules/glob/package.json delete mode 100644 node_modules/glob/sync.js delete mode 100644 node_modules/globals/globals.json delete mode 100644 node_modules/globals/index.js delete mode 100644 node_modules/globals/license delete mode 100644 node_modules/globals/package.json delete mode 100644 node_modules/globals/readme.md delete mode 100644 node_modules/graceful-fs/LICENSE delete mode 100644 node_modules/graceful-fs/README.md delete mode 100644 node_modules/graceful-fs/clone.js delete mode 100644 node_modules/graceful-fs/graceful-fs.js delete mode 100644 node_modules/graceful-fs/legacy-streams.js delete mode 100644 node_modules/graceful-fs/package.json delete mode 100644 node_modules/graceful-fs/polyfills.js delete mode 100644 node_modules/growly/HISTORY.md delete mode 100644 node_modules/growly/README.md delete mode 100644 node_modules/growly/example/bakery.js delete mode 100644 node_modules/growly/example/cake.png delete mode 100644 node_modules/growly/example/muffin.png delete mode 100644 node_modules/growly/example/simple.js delete mode 100644 node_modules/growly/lib/gntp.js delete mode 100644 node_modules/growly/lib/growly.js delete mode 100644 node_modules/growly/package.json delete mode 100644 node_modules/handlebars/LICENSE delete mode 100644 node_modules/handlebars/README.markdown delete mode 100644 node_modules/handlebars/bin/handlebars delete mode 100644 node_modules/handlebars/dist/amd/handlebars.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars.runtime.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/base.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/compiler/ast.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/compiler/base.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/compiler/code-gen.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/compiler/compiler.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/compiler/helpers.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/compiler/parser.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/compiler/printer.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/compiler/visitor.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/compiler/whitespace-control.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/decorators.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/decorators/inline.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/exception.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/helpers.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/helpers/block-helper-missing.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/helpers/each.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/helpers/helper-missing.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/helpers/if.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/helpers/log.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/helpers/lookup.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/helpers/with.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/logger.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/no-conflict.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/runtime.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/safe-string.js delete mode 100644 node_modules/handlebars/dist/amd/handlebars/utils.js delete mode 100644 node_modules/handlebars/dist/amd/precompiler.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars.runtime.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/base.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/compiler/base.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/decorators.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/exception.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/helpers.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/helpers/each.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/helpers/if.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/helpers/log.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/helpers/with.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/logger.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/no-conflict.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/runtime.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/safe-string.js delete mode 100644 node_modules/handlebars/dist/cjs/handlebars/utils.js delete mode 100644 node_modules/handlebars/dist/cjs/precompiler.js delete mode 100644 node_modules/handlebars/dist/handlebars.amd.js delete mode 100644 node_modules/handlebars/dist/handlebars.amd.min.js delete mode 100644 node_modules/handlebars/dist/handlebars.js delete mode 100644 node_modules/handlebars/dist/handlebars.min.js delete mode 100644 node_modules/handlebars/dist/handlebars.runtime.amd.js delete mode 100644 node_modules/handlebars/dist/handlebars.runtime.amd.min.js delete mode 100644 node_modules/handlebars/dist/handlebars.runtime.js delete mode 100644 node_modules/handlebars/dist/handlebars.runtime.min.js delete mode 100644 node_modules/handlebars/lib/handlebars.js delete mode 100644 node_modules/handlebars/lib/handlebars.runtime.js delete mode 100644 node_modules/handlebars/lib/handlebars/base.js delete mode 100644 node_modules/handlebars/lib/handlebars/compiler/ast.js delete mode 100644 node_modules/handlebars/lib/handlebars/compiler/base.js delete mode 100644 node_modules/handlebars/lib/handlebars/compiler/code-gen.js delete mode 100644 node_modules/handlebars/lib/handlebars/compiler/compiler.js delete mode 100644 node_modules/handlebars/lib/handlebars/compiler/helpers.js delete mode 100644 node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js delete mode 100644 node_modules/handlebars/lib/handlebars/compiler/parser.js delete mode 100644 node_modules/handlebars/lib/handlebars/compiler/printer.js delete mode 100644 node_modules/handlebars/lib/handlebars/compiler/visitor.js delete mode 100644 node_modules/handlebars/lib/handlebars/compiler/whitespace-control.js delete mode 100644 node_modules/handlebars/lib/handlebars/decorators.js delete mode 100644 node_modules/handlebars/lib/handlebars/decorators/inline.js delete mode 100644 node_modules/handlebars/lib/handlebars/exception.js delete mode 100644 node_modules/handlebars/lib/handlebars/helpers.js delete mode 100644 node_modules/handlebars/lib/handlebars/helpers/block-helper-missing.js delete mode 100644 node_modules/handlebars/lib/handlebars/helpers/each.js delete mode 100644 node_modules/handlebars/lib/handlebars/helpers/helper-missing.js delete mode 100644 node_modules/handlebars/lib/handlebars/helpers/if.js delete mode 100644 node_modules/handlebars/lib/handlebars/helpers/log.js delete mode 100644 node_modules/handlebars/lib/handlebars/helpers/lookup.js delete mode 100644 node_modules/handlebars/lib/handlebars/helpers/with.js delete mode 100644 node_modules/handlebars/lib/handlebars/logger.js delete mode 100644 node_modules/handlebars/lib/handlebars/no-conflict.js delete mode 100644 node_modules/handlebars/lib/handlebars/runtime.js delete mode 100644 node_modules/handlebars/lib/handlebars/safe-string.js delete mode 100644 node_modules/handlebars/lib/handlebars/utils.js delete mode 100644 node_modules/handlebars/lib/index.js delete mode 100644 node_modules/handlebars/lib/precompiler.js delete mode 100644 node_modules/handlebars/package.json delete mode 100644 node_modules/handlebars/print-script delete mode 100644 node_modules/handlebars/release-notes.md delete mode 100644 node_modules/handlebars/runtime.js delete mode 100644 node_modules/handlebars/types/index.d.ts delete mode 100644 node_modules/har-schema/LICENSE delete mode 100644 node_modules/har-schema/README.md delete mode 100644 node_modules/har-schema/lib/afterRequest.json delete mode 100644 node_modules/har-schema/lib/beforeRequest.json delete mode 100644 node_modules/har-schema/lib/browser.json delete mode 100644 node_modules/har-schema/lib/cache.json delete mode 100644 node_modules/har-schema/lib/content.json delete mode 100644 node_modules/har-schema/lib/cookie.json delete mode 100644 node_modules/har-schema/lib/creator.json delete mode 100644 node_modules/har-schema/lib/entry.json delete mode 100644 node_modules/har-schema/lib/har.json delete mode 100644 node_modules/har-schema/lib/header.json delete mode 100644 node_modules/har-schema/lib/index.js delete mode 100644 node_modules/har-schema/lib/log.json delete mode 100644 node_modules/har-schema/lib/page.json delete mode 100644 node_modules/har-schema/lib/pageTimings.json delete mode 100644 node_modules/har-schema/lib/postData.json delete mode 100644 node_modules/har-schema/lib/query.json delete mode 100644 node_modules/har-schema/lib/request.json delete mode 100644 node_modules/har-schema/lib/response.json delete mode 100644 node_modules/har-schema/lib/timings.json delete mode 100644 node_modules/har-schema/package.json delete mode 100644 node_modules/har-validator/LICENSE delete mode 100644 node_modules/har-validator/README.md delete mode 100644 node_modules/har-validator/lib/async.js delete mode 100644 node_modules/har-validator/lib/error.js delete mode 100644 node_modules/har-validator/lib/promise.js delete mode 100644 node_modules/har-validator/package.json delete mode 100644 node_modules/has-flag/index.js delete mode 100644 node_modules/has-flag/license delete mode 100644 node_modules/has-flag/package.json delete mode 100644 node_modules/has-flag/readme.md delete mode 100644 node_modules/has-symbols/.eslintrc delete mode 100644 node_modules/has-symbols/.npmignore delete mode 100644 node_modules/has-symbols/.travis.yml delete mode 100644 node_modules/has-symbols/CHANGELOG.md delete mode 100644 node_modules/has-symbols/LICENSE delete mode 100644 node_modules/has-symbols/README.md delete mode 100644 node_modules/has-symbols/index.js delete mode 100644 node_modules/has-symbols/package.json delete mode 100644 node_modules/has-symbols/shams.js delete mode 100644 node_modules/has-symbols/test/index.js delete mode 100644 node_modules/has-symbols/test/shams/core-js.js delete mode 100644 node_modules/has-symbols/test/shams/get-own-property-symbols.js delete mode 100644 node_modules/has-symbols/test/tests.js delete mode 100644 node_modules/has-value/LICENSE delete mode 100644 node_modules/has-value/README.md delete mode 100644 node_modules/has-value/index.js delete mode 100644 node_modules/has-value/package.json delete mode 100644 node_modules/has-values/LICENSE delete mode 100644 node_modules/has-values/README.md delete mode 100644 node_modules/has-values/index.js delete mode 100644 node_modules/has-values/node_modules/kind-of/LICENSE delete mode 100644 node_modules/has-values/node_modules/kind-of/README.md delete mode 100644 node_modules/has-values/node_modules/kind-of/index.js delete mode 100644 node_modules/has-values/node_modules/kind-of/package.json delete mode 100644 node_modules/has-values/package.json delete mode 100644 node_modules/has/LICENSE-MIT delete mode 100644 node_modules/has/README.md delete mode 100644 node_modules/has/package.json delete mode 100644 node_modules/has/src/index.js delete mode 100644 node_modules/has/test/index.js delete mode 100644 node_modules/hosted-git-info/CHANGELOG.md delete mode 100644 node_modules/hosted-git-info/LICENSE delete mode 100644 node_modules/hosted-git-info/README.md delete mode 100644 node_modules/hosted-git-info/git-host-info.js delete mode 100644 node_modules/hosted-git-info/git-host.js delete mode 100644 node_modules/hosted-git-info/index.js delete mode 100644 node_modules/hosted-git-info/package.json delete mode 100644 node_modules/html-encoding-sniffer/LICENSE.txt delete mode 100644 node_modules/html-encoding-sniffer/README.md delete mode 100644 node_modules/html-encoding-sniffer/lib/html-encoding-sniffer.js delete mode 100644 node_modules/html-encoding-sniffer/package.json delete mode 100644 node_modules/http-signature/.dir-locals.el delete mode 100644 node_modules/http-signature/.npmignore delete mode 100644 node_modules/http-signature/CHANGES.md delete mode 100644 node_modules/http-signature/LICENSE delete mode 100644 node_modules/http-signature/README.md delete mode 100644 node_modules/http-signature/http_signing.md delete mode 100644 node_modules/http-signature/lib/index.js delete mode 100644 node_modules/http-signature/lib/parser.js delete mode 100644 node_modules/http-signature/lib/signer.js delete mode 100644 node_modules/http-signature/lib/utils.js delete mode 100644 node_modules/http-signature/lib/verify.js delete mode 100644 node_modules/http-signature/package.json delete mode 100644 node_modules/husky/.eslintrc.js delete mode 100644 node_modules/husky/.github/FUNDING.yml delete mode 100644 node_modules/husky/.prettierrc delete mode 100644 node_modules/husky/CHANGELOG.md delete mode 100644 node_modules/husky/DOCS.md delete mode 100644 node_modules/husky/LICENSE delete mode 100644 node_modules/husky/README.md delete mode 100644 node_modules/husky/husky.js delete mode 100644 node_modules/husky/lib/getConf.js delete mode 100644 node_modules/husky/lib/installer/bin.js delete mode 100644 node_modules/husky/lib/installer/getScript.js delete mode 100644 node_modules/husky/lib/installer/index.js delete mode 100644 node_modules/husky/lib/installer/is.js delete mode 100644 node_modules/husky/lib/installer/resolveGitDir.js delete mode 100644 node_modules/husky/lib/runner/bin.js delete mode 100644 node_modules/husky/lib/runner/index.js delete mode 100644 node_modules/husky/lib/upgrader/bin.js delete mode 100644 node_modules/husky/lib/upgrader/index.js delete mode 100644 node_modules/husky/package.json delete mode 100644 node_modules/husky/run.js delete mode 100644 node_modules/iconv-lite/Changelog.md delete mode 100644 node_modules/iconv-lite/LICENSE delete mode 100644 node_modules/iconv-lite/README.md delete mode 100644 node_modules/iconv-lite/encodings/dbcs-codec.js delete mode 100644 node_modules/iconv-lite/encodings/dbcs-data.js delete mode 100644 node_modules/iconv-lite/encodings/index.js delete mode 100644 node_modules/iconv-lite/encodings/internal.js delete mode 100644 node_modules/iconv-lite/encodings/sbcs-codec.js delete mode 100644 node_modules/iconv-lite/encodings/sbcs-data-generated.js delete mode 100644 node_modules/iconv-lite/encodings/sbcs-data.js delete mode 100644 node_modules/iconv-lite/encodings/tables/big5-added.json delete mode 100644 node_modules/iconv-lite/encodings/tables/cp936.json delete mode 100644 node_modules/iconv-lite/encodings/tables/cp949.json delete mode 100644 node_modules/iconv-lite/encodings/tables/cp950.json delete mode 100644 node_modules/iconv-lite/encodings/tables/eucjp.json delete mode 100644 node_modules/iconv-lite/encodings/tables/gb18030-ranges.json delete mode 100644 node_modules/iconv-lite/encodings/tables/gbk-added.json delete mode 100644 node_modules/iconv-lite/encodings/tables/shiftjis.json delete mode 100644 node_modules/iconv-lite/encodings/utf16.js delete mode 100644 node_modules/iconv-lite/encodings/utf7.js delete mode 100644 node_modules/iconv-lite/lib/bom-handling.js delete mode 100644 node_modules/iconv-lite/lib/extend-node.js delete mode 100644 node_modules/iconv-lite/lib/index.d.ts delete mode 100644 node_modules/iconv-lite/lib/index.js delete mode 100644 node_modules/iconv-lite/lib/streams.js delete mode 100644 node_modules/iconv-lite/package.json delete mode 100644 node_modules/import-fresh/index.js delete mode 100644 node_modules/import-fresh/license delete mode 100644 node_modules/import-fresh/package.json delete mode 100644 node_modules/import-fresh/readme.md delete mode 100644 node_modules/import-local/fixtures/cli.js delete mode 100644 node_modules/import-local/index.js delete mode 100644 node_modules/import-local/license delete mode 100644 node_modules/import-local/node_modules/pkg-dir/index.js delete mode 100644 node_modules/import-local/node_modules/pkg-dir/license delete mode 100644 node_modules/import-local/node_modules/pkg-dir/package.json delete mode 100644 node_modules/import-local/node_modules/pkg-dir/readme.md delete mode 100644 node_modules/import-local/package.json delete mode 100644 node_modules/import-local/readme.md delete mode 100644 node_modules/imurmurhash/README.md delete mode 100644 node_modules/imurmurhash/imurmurhash.js delete mode 100644 node_modules/imurmurhash/imurmurhash.min.js delete mode 100644 node_modules/imurmurhash/package.json delete mode 100644 node_modules/inflight/LICENSE delete mode 100644 node_modules/inflight/README.md delete mode 100644 node_modules/inflight/inflight.js delete mode 100644 node_modules/inflight/package.json delete mode 100644 node_modules/inherits/LICENSE delete mode 100644 node_modules/inherits/README.md delete mode 100644 node_modules/inherits/inherits.js delete mode 100644 node_modules/inherits/inherits_browser.js delete mode 100644 node_modules/inherits/package.json delete mode 100644 node_modules/invariant/CHANGELOG.md delete mode 100644 node_modules/invariant/LICENSE delete mode 100644 node_modules/invariant/README.md delete mode 100644 node_modules/invariant/browser.js delete mode 100644 node_modules/invariant/invariant.js delete mode 100644 node_modules/invariant/invariant.js.flow delete mode 100644 node_modules/invariant/package.json delete mode 100644 node_modules/is-accessor-descriptor/LICENSE delete mode 100644 node_modules/is-accessor-descriptor/README.md delete mode 100644 node_modules/is-accessor-descriptor/index.js delete mode 100644 node_modules/is-accessor-descriptor/node_modules/kind-of/LICENSE delete mode 100644 node_modules/is-accessor-descriptor/node_modules/kind-of/README.md delete mode 100644 node_modules/is-accessor-descriptor/node_modules/kind-of/index.js delete mode 100644 node_modules/is-accessor-descriptor/node_modules/kind-of/package.json delete mode 100644 node_modules/is-accessor-descriptor/package.json delete mode 100644 node_modules/is-arrayish/.editorconfig delete mode 100644 node_modules/is-arrayish/.istanbul.yml delete mode 100644 node_modules/is-arrayish/.npmignore delete mode 100644 node_modules/is-arrayish/.travis.yml delete mode 100644 node_modules/is-arrayish/LICENSE delete mode 100644 node_modules/is-arrayish/README.md delete mode 100644 node_modules/is-arrayish/index.js delete mode 100644 node_modules/is-arrayish/package.json delete mode 100644 node_modules/is-buffer/LICENSE delete mode 100644 node_modules/is-buffer/README.md delete mode 100644 node_modules/is-buffer/index.js delete mode 100644 node_modules/is-buffer/package.json delete mode 100644 node_modules/is-buffer/test/basic.js delete mode 100644 node_modules/is-callable/.editorconfig delete mode 100644 node_modules/is-callable/.eslintrc delete mode 100644 node_modules/is-callable/.istanbul.yml delete mode 100644 node_modules/is-callable/.jscs.json delete mode 100644 node_modules/is-callable/.travis.yml delete mode 100644 node_modules/is-callable/CHANGELOG.md delete mode 100644 node_modules/is-callable/LICENSE delete mode 100644 node_modules/is-callable/Makefile delete mode 100644 node_modules/is-callable/README.md delete mode 100644 node_modules/is-callable/index.js delete mode 100644 node_modules/is-callable/package.json delete mode 100644 node_modules/is-callable/test.js delete mode 100644 node_modules/is-ci/CHANGELOG.md delete mode 100644 node_modules/is-ci/LICENSE delete mode 100644 node_modules/is-ci/README.md delete mode 100644 node_modules/is-ci/bin.js delete mode 100644 node_modules/is-ci/index.js delete mode 100644 node_modules/is-ci/package.json delete mode 100644 node_modules/is-data-descriptor/LICENSE delete mode 100644 node_modules/is-data-descriptor/README.md delete mode 100644 node_modules/is-data-descriptor/index.js delete mode 100644 node_modules/is-data-descriptor/node_modules/kind-of/LICENSE delete mode 100644 node_modules/is-data-descriptor/node_modules/kind-of/README.md delete mode 100644 node_modules/is-data-descriptor/node_modules/kind-of/index.js delete mode 100644 node_modules/is-data-descriptor/node_modules/kind-of/package.json delete mode 100644 node_modules/is-data-descriptor/package.json delete mode 100644 node_modules/is-date-object/.eslintrc delete mode 100644 node_modules/is-date-object/.jscs.json delete mode 100644 node_modules/is-date-object/.npmignore delete mode 100644 node_modules/is-date-object/.travis.yml delete mode 100644 node_modules/is-date-object/CHANGELOG.md delete mode 100644 node_modules/is-date-object/LICENSE delete mode 100644 node_modules/is-date-object/Makefile delete mode 100644 node_modules/is-date-object/README.md delete mode 100644 node_modules/is-date-object/index.js delete mode 100644 node_modules/is-date-object/package.json delete mode 100644 node_modules/is-date-object/test.js delete mode 100644 node_modules/is-descriptor/LICENSE delete mode 100644 node_modules/is-descriptor/README.md delete mode 100644 node_modules/is-descriptor/index.js delete mode 100644 node_modules/is-descriptor/node_modules/kind-of/LICENSE delete mode 100644 node_modules/is-descriptor/node_modules/kind-of/README.md delete mode 100644 node_modules/is-descriptor/node_modules/kind-of/index.js delete mode 100644 node_modules/is-descriptor/node_modules/kind-of/package.json delete mode 100644 node_modules/is-descriptor/package.json delete mode 100644 node_modules/is-directory/LICENSE delete mode 100644 node_modules/is-directory/README.md delete mode 100644 node_modules/is-directory/index.js delete mode 100644 node_modules/is-directory/package.json delete mode 100644 node_modules/is-extendable/LICENSE delete mode 100644 node_modules/is-extendable/README.md delete mode 100644 node_modules/is-extendable/index.js delete mode 100644 node_modules/is-extendable/package.json delete mode 100644 node_modules/is-fullwidth-code-point/index.js delete mode 100644 node_modules/is-fullwidth-code-point/license delete mode 100644 node_modules/is-fullwidth-code-point/package.json delete mode 100644 node_modules/is-fullwidth-code-point/readme.md delete mode 100644 node_modules/is-generator-fn/index.d.ts delete mode 100644 node_modules/is-generator-fn/index.js delete mode 100644 node_modules/is-generator-fn/license delete mode 100644 node_modules/is-generator-fn/package.json delete mode 100644 node_modules/is-generator-fn/readme.md delete mode 100644 node_modules/is-number/LICENSE delete mode 100644 node_modules/is-number/README.md delete mode 100644 node_modules/is-number/index.js delete mode 100644 node_modules/is-number/node_modules/kind-of/LICENSE delete mode 100644 node_modules/is-number/node_modules/kind-of/README.md delete mode 100644 node_modules/is-number/node_modules/kind-of/index.js delete mode 100644 node_modules/is-number/node_modules/kind-of/package.json delete mode 100644 node_modules/is-number/package.json delete mode 100644 node_modules/is-plain-object/LICENSE delete mode 100644 node_modules/is-plain-object/README.md delete mode 100644 node_modules/is-plain-object/index.d.ts delete mode 100644 node_modules/is-plain-object/index.js delete mode 100644 node_modules/is-plain-object/package.json delete mode 100644 node_modules/is-regex/.eslintrc delete mode 100644 node_modules/is-regex/.jscs.json delete mode 100644 node_modules/is-regex/.npmignore delete mode 100644 node_modules/is-regex/.travis.yml delete mode 100644 node_modules/is-regex/CHANGELOG.md delete mode 100644 node_modules/is-regex/LICENSE delete mode 100644 node_modules/is-regex/Makefile delete mode 100644 node_modules/is-regex/README.md delete mode 100644 node_modules/is-regex/index.js delete mode 100644 node_modules/is-regex/package.json delete mode 100644 node_modules/is-regex/test.js delete mode 100644 node_modules/is-stream/index.js delete mode 100644 node_modules/is-stream/license delete mode 100644 node_modules/is-stream/package.json delete mode 100644 node_modules/is-stream/readme.md delete mode 100644 node_modules/is-symbol/.editorconfig delete mode 100644 node_modules/is-symbol/.eslintrc delete mode 100644 node_modules/is-symbol/.jscs.json delete mode 100644 node_modules/is-symbol/.nvmrc delete mode 100644 node_modules/is-symbol/.travis.yml delete mode 100644 node_modules/is-symbol/CHANGELOG.md delete mode 100644 node_modules/is-symbol/LICENSE delete mode 100644 node_modules/is-symbol/Makefile delete mode 100644 node_modules/is-symbol/README.md delete mode 100644 node_modules/is-symbol/index.js delete mode 100644 node_modules/is-symbol/package.json delete mode 100644 node_modules/is-symbol/test/.eslintrc delete mode 100644 node_modules/is-symbol/test/index.js delete mode 100644 node_modules/is-typedarray/LICENSE.md delete mode 100644 node_modules/is-typedarray/README.md delete mode 100644 node_modules/is-typedarray/index.js delete mode 100644 node_modules/is-typedarray/package.json delete mode 100644 node_modules/is-typedarray/test.js delete mode 100644 node_modules/is-windows/LICENSE delete mode 100644 node_modules/is-windows/README.md delete mode 100644 node_modules/is-windows/index.js delete mode 100644 node_modules/is-windows/package.json delete mode 100644 node_modules/is-wsl/index.js delete mode 100644 node_modules/is-wsl/license delete mode 100644 node_modules/is-wsl/package.json delete mode 100644 node_modules/is-wsl/readme.md delete mode 100644 node_modules/isarray/.npmignore delete mode 100644 node_modules/isarray/.travis.yml delete mode 100644 node_modules/isarray/Makefile delete mode 100644 node_modules/isarray/README.md delete mode 100644 node_modules/isarray/component.json delete mode 100644 node_modules/isarray/index.js delete mode 100644 node_modules/isarray/package.json delete mode 100644 node_modules/isarray/test.js delete mode 100644 node_modules/isexe/.npmignore delete mode 100644 node_modules/isexe/LICENSE delete mode 100644 node_modules/isexe/README.md delete mode 100644 node_modules/isexe/index.js delete mode 100644 node_modules/isexe/mode.js delete mode 100644 node_modules/isexe/package.json delete mode 100644 node_modules/isexe/test/basic.js delete mode 100644 node_modules/isexe/windows.js delete mode 100644 node_modules/isobject/LICENSE delete mode 100644 node_modules/isobject/README.md delete mode 100644 node_modules/isobject/index.d.ts delete mode 100644 node_modules/isobject/index.js delete mode 100644 node_modules/isobject/package.json delete mode 100644 node_modules/isstream/.jshintrc delete mode 100644 node_modules/isstream/.npmignore delete mode 100644 node_modules/isstream/.travis.yml delete mode 100644 node_modules/isstream/LICENSE.md delete mode 100644 node_modules/isstream/README.md delete mode 100644 node_modules/isstream/isstream.js delete mode 100644 node_modules/isstream/package.json delete mode 100644 node_modules/isstream/test.js delete mode 100644 node_modules/istanbul-lib-coverage/CHANGELOG.md delete mode 100644 node_modules/istanbul-lib-coverage/LICENSE delete mode 100644 node_modules/istanbul-lib-coverage/README.md delete mode 100644 node_modules/istanbul-lib-coverage/index.js delete mode 100644 node_modules/istanbul-lib-coverage/lib/coverage-map.js delete mode 100644 node_modules/istanbul-lib-coverage/lib/file.js delete mode 100644 node_modules/istanbul-lib-coverage/package.json delete mode 100644 node_modules/istanbul-lib-instrument/CHANGELOG.md delete mode 100644 node_modules/istanbul-lib-instrument/LICENSE delete mode 100644 node_modules/istanbul-lib-instrument/README.md delete mode 100644 node_modules/istanbul-lib-instrument/dist/constants.js delete mode 100644 node_modules/istanbul-lib-instrument/dist/index.js delete mode 100644 node_modules/istanbul-lib-instrument/dist/instrumenter.js delete mode 100644 node_modules/istanbul-lib-instrument/dist/read-coverage.js delete mode 100644 node_modules/istanbul-lib-instrument/dist/source-coverage.js delete mode 100644 node_modules/istanbul-lib-instrument/dist/visitor.js delete mode 100644 node_modules/istanbul-lib-instrument/package.json delete mode 100644 node_modules/istanbul-lib-report/CHANGELOG.md delete mode 100644 node_modules/istanbul-lib-report/LICENSE delete mode 100644 node_modules/istanbul-lib-report/README.md delete mode 100644 node_modules/istanbul-lib-report/index.js delete mode 100644 node_modules/istanbul-lib-report/lib/context.js delete mode 100644 node_modules/istanbul-lib-report/lib/file-writer.js delete mode 100644 node_modules/istanbul-lib-report/lib/path.js delete mode 100644 node_modules/istanbul-lib-report/lib/summarizer.js delete mode 100644 node_modules/istanbul-lib-report/lib/tree.js delete mode 100644 node_modules/istanbul-lib-report/lib/watermarks.js delete mode 100644 node_modules/istanbul-lib-report/lib/xml-writer.js delete mode 100644 node_modules/istanbul-lib-report/node_modules/supports-color/browser.js delete mode 100644 node_modules/istanbul-lib-report/node_modules/supports-color/index.js delete mode 100644 node_modules/istanbul-lib-report/node_modules/supports-color/license delete mode 100644 node_modules/istanbul-lib-report/node_modules/supports-color/package.json delete mode 100644 node_modules/istanbul-lib-report/node_modules/supports-color/readme.md delete mode 100644 node_modules/istanbul-lib-report/package.json delete mode 100644 node_modules/istanbul-lib-source-maps/CHANGELOG.md delete mode 100644 node_modules/istanbul-lib-source-maps/LICENSE delete mode 100644 node_modules/istanbul-lib-source-maps/README.md delete mode 100644 node_modules/istanbul-lib-source-maps/index.js delete mode 100644 node_modules/istanbul-lib-source-maps/lib/get-mapping.js delete mode 100644 node_modules/istanbul-lib-source-maps/lib/map-store.js delete mode 100644 node_modules/istanbul-lib-source-maps/lib/mapped.js delete mode 100644 node_modules/istanbul-lib-source-maps/lib/pathutils.js delete mode 100644 node_modules/istanbul-lib-source-maps/lib/source-store.js delete mode 100644 node_modules/istanbul-lib-source-maps/lib/transform-utils.js delete mode 100644 node_modules/istanbul-lib-source-maps/lib/transformer.js delete mode 100644 node_modules/istanbul-lib-source-maps/node_modules/debug/CHANGELOG.md delete mode 100644 node_modules/istanbul-lib-source-maps/node_modules/debug/LICENSE delete mode 100644 node_modules/istanbul-lib-source-maps/node_modules/debug/README.md delete mode 100644 node_modules/istanbul-lib-source-maps/node_modules/debug/dist/debug.js delete mode 100644 node_modules/istanbul-lib-source-maps/node_modules/debug/package.json delete mode 100644 node_modules/istanbul-lib-source-maps/node_modules/debug/src/browser.js delete mode 100644 node_modules/istanbul-lib-source-maps/node_modules/debug/src/common.js delete mode 100644 node_modules/istanbul-lib-source-maps/node_modules/debug/src/index.js delete mode 100644 node_modules/istanbul-lib-source-maps/node_modules/debug/src/node.js delete mode 100644 node_modules/istanbul-lib-source-maps/node_modules/ms/index.js delete mode 100644 node_modules/istanbul-lib-source-maps/node_modules/ms/license.md delete mode 100644 node_modules/istanbul-lib-source-maps/node_modules/ms/package.json delete mode 100644 node_modules/istanbul-lib-source-maps/node_modules/ms/readme.md delete mode 100644 node_modules/istanbul-lib-source-maps/package.json delete mode 100644 node_modules/istanbul-reports/CHANGELOG.md delete mode 100644 node_modules/istanbul-reports/LICENSE delete mode 100644 node_modules/istanbul-reports/README.md delete mode 100644 node_modules/istanbul-reports/index.js delete mode 100644 node_modules/istanbul-reports/lib/clover/index.js delete mode 100644 node_modules/istanbul-reports/lib/cobertura/index.js delete mode 100644 node_modules/istanbul-reports/lib/html/annotator.js delete mode 100644 node_modules/istanbul-reports/lib/html/assets/base.css delete mode 100644 node_modules/istanbul-reports/lib/html/assets/block-navigation.js delete mode 100644 node_modules/istanbul-reports/lib/html/assets/sort-arrow-sprite.png delete mode 100644 node_modules/istanbul-reports/lib/html/assets/sorter.js delete mode 100644 node_modules/istanbul-reports/lib/html/assets/vendor/prettify.css delete mode 100644 node_modules/istanbul-reports/lib/html/assets/vendor/prettify.js delete mode 100644 node_modules/istanbul-reports/lib/html/helpers.js delete mode 100644 node_modules/istanbul-reports/lib/html/index.js delete mode 100644 node_modules/istanbul-reports/lib/html/insertion-text.js delete mode 100644 node_modules/istanbul-reports/lib/html/templates/foot.txt delete mode 100644 node_modules/istanbul-reports/lib/html/templates/head.txt delete mode 100644 node_modules/istanbul-reports/lib/json-summary/index.js delete mode 100644 node_modules/istanbul-reports/lib/json/index.js delete mode 100644 node_modules/istanbul-reports/lib/lcov/index.js delete mode 100644 node_modules/istanbul-reports/lib/lcovonly/index.js delete mode 100644 node_modules/istanbul-reports/lib/none/index.js delete mode 100644 node_modules/istanbul-reports/lib/teamcity/index.js delete mode 100644 node_modules/istanbul-reports/lib/text-lcov/index.js delete mode 100644 node_modules/istanbul-reports/lib/text-summary/index.js delete mode 100644 node_modules/istanbul-reports/lib/text/index.js delete mode 100644 node_modules/istanbul-reports/package.json delete mode 100644 node_modules/jest-changed-files/LICENSE delete mode 100644 node_modules/jest-changed-files/README.md delete mode 100644 node_modules/jest-changed-files/build/git.d.ts delete mode 100644 node_modules/jest-changed-files/build/git.d.ts.map delete mode 100644 node_modules/jest-changed-files/build/git.js delete mode 100644 node_modules/jest-changed-files/build/hg.d.ts delete mode 100644 node_modules/jest-changed-files/build/hg.d.ts.map delete mode 100644 node_modules/jest-changed-files/build/hg.js delete mode 100644 node_modules/jest-changed-files/build/index.d.ts delete mode 100644 node_modules/jest-changed-files/build/index.d.ts.map delete mode 100644 node_modules/jest-changed-files/build/index.js delete mode 100644 node_modules/jest-changed-files/build/types.d.ts delete mode 100644 node_modules/jest-changed-files/build/types.d.ts.map delete mode 100644 node_modules/jest-changed-files/build/types.js delete mode 100644 node_modules/jest-changed-files/package.json delete mode 100644 node_modules/jest-circus/README.md delete mode 100644 node_modules/jest-circus/build/eventHandler.d.ts delete mode 100644 node_modules/jest-circus/build/eventHandler.d.ts.map delete mode 100644 node_modules/jest-circus/build/eventHandler.js delete mode 100644 node_modules/jest-circus/build/formatNodeAssertErrors.d.ts delete mode 100644 node_modules/jest-circus/build/formatNodeAssertErrors.d.ts.map delete mode 100644 node_modules/jest-circus/build/formatNodeAssertErrors.js delete mode 100644 node_modules/jest-circus/build/globalErrorHandlers.d.ts delete mode 100644 node_modules/jest-circus/build/globalErrorHandlers.d.ts.map delete mode 100644 node_modules/jest-circus/build/globalErrorHandlers.js delete mode 100644 node_modules/jest-circus/build/index.d.ts delete mode 100644 node_modules/jest-circus/build/index.d.ts.map delete mode 100644 node_modules/jest-circus/build/index.js delete mode 100644 node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.d.ts delete mode 100644 node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.d.ts.map delete mode 100644 node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js delete mode 100644 node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.d.ts delete mode 100644 node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.d.ts.map delete mode 100644 node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js delete mode 100644 node_modules/jest-circus/build/legacy-code-todo-rewrite/jestExpect.d.ts delete mode 100644 node_modules/jest-circus/build/legacy-code-todo-rewrite/jestExpect.d.ts.map delete mode 100644 node_modules/jest-circus/build/legacy-code-todo-rewrite/jestExpect.js delete mode 100644 node_modules/jest-circus/build/run.d.ts delete mode 100644 node_modules/jest-circus/build/run.d.ts.map delete mode 100644 node_modules/jest-circus/build/run.js delete mode 100644 node_modules/jest-circus/build/state.d.ts delete mode 100644 node_modules/jest-circus/build/state.d.ts.map delete mode 100644 node_modules/jest-circus/build/state.js delete mode 100644 node_modules/jest-circus/build/types.d.ts delete mode 100644 node_modules/jest-circus/build/types.d.ts.map delete mode 100644 node_modules/jest-circus/build/types.js delete mode 100644 node_modules/jest-circus/build/utils.d.ts delete mode 100644 node_modules/jest-circus/build/utils.d.ts.map delete mode 100644 node_modules/jest-circus/build/utils.js delete mode 100644 node_modules/jest-circus/package.json delete mode 100644 node_modules/jest-circus/runner.js delete mode 100644 node_modules/jest-config/build/Defaults.d.ts delete mode 100644 node_modules/jest-config/build/Defaults.d.ts.map delete mode 100644 node_modules/jest-config/build/Defaults.js delete mode 100644 node_modules/jest-config/build/Deprecated.d.ts delete mode 100644 node_modules/jest-config/build/Deprecated.d.ts.map delete mode 100644 node_modules/jest-config/build/Deprecated.js delete mode 100644 node_modules/jest-config/build/Descriptions.d.ts delete mode 100644 node_modules/jest-config/build/Descriptions.d.ts.map delete mode 100644 node_modules/jest-config/build/Descriptions.js delete mode 100644 node_modules/jest-config/build/ReporterValidationErrors.d.ts delete mode 100644 node_modules/jest-config/build/ReporterValidationErrors.d.ts.map delete mode 100644 node_modules/jest-config/build/ReporterValidationErrors.js delete mode 100644 node_modules/jest-config/build/ValidConfig.d.ts delete mode 100644 node_modules/jest-config/build/ValidConfig.d.ts.map delete mode 100644 node_modules/jest-config/build/ValidConfig.js delete mode 100644 node_modules/jest-config/build/constants.d.ts delete mode 100644 node_modules/jest-config/build/constants.d.ts.map delete mode 100644 node_modules/jest-config/build/constants.js delete mode 100644 node_modules/jest-config/build/getCacheDirectory.d.ts delete mode 100644 node_modules/jest-config/build/getCacheDirectory.d.ts.map delete mode 100644 node_modules/jest-config/build/getCacheDirectory.js delete mode 100644 node_modules/jest-config/build/getMaxWorkers.d.ts delete mode 100644 node_modules/jest-config/build/getMaxWorkers.d.ts.map delete mode 100644 node_modules/jest-config/build/getMaxWorkers.js delete mode 100644 node_modules/jest-config/build/index.d.ts delete mode 100644 node_modules/jest-config/build/index.d.ts.map delete mode 100644 node_modules/jest-config/build/index.js delete mode 100644 node_modules/jest-config/build/normalize.d.ts delete mode 100644 node_modules/jest-config/build/normalize.d.ts.map delete mode 100644 node_modules/jest-config/build/normalize.js delete mode 100644 node_modules/jest-config/build/readConfigFileAndSetRootDir.d.ts delete mode 100644 node_modules/jest-config/build/readConfigFileAndSetRootDir.d.ts.map delete mode 100644 node_modules/jest-config/build/readConfigFileAndSetRootDir.js delete mode 100644 node_modules/jest-config/build/resolveConfigPath.d.ts delete mode 100644 node_modules/jest-config/build/resolveConfigPath.d.ts.map delete mode 100644 node_modules/jest-config/build/resolveConfigPath.js delete mode 100644 node_modules/jest-config/build/setFromArgv.d.ts delete mode 100644 node_modules/jest-config/build/setFromArgv.d.ts.map delete mode 100644 node_modules/jest-config/build/setFromArgv.js delete mode 100644 node_modules/jest-config/build/utils.d.ts delete mode 100644 node_modules/jest-config/build/utils.d.ts.map delete mode 100644 node_modules/jest-config/build/utils.js delete mode 100644 node_modules/jest-config/build/validatePattern.d.ts delete mode 100644 node_modules/jest-config/build/validatePattern.d.ts.map delete mode 100644 node_modules/jest-config/build/validatePattern.js delete mode 100644 node_modules/jest-config/build/vendor/jsonlint.js delete mode 100644 node_modules/jest-config/package.json delete mode 100644 node_modules/jest-diff/LICENSE delete mode 100644 node_modules/jest-diff/build/cleanupSemantic.d.ts delete mode 100644 node_modules/jest-diff/build/cleanupSemantic.d.ts.map delete mode 100644 node_modules/jest-diff/build/cleanupSemantic.js delete mode 100644 node_modules/jest-diff/build/constants.d.ts delete mode 100644 node_modules/jest-diff/build/constants.d.ts.map delete mode 100644 node_modules/jest-diff/build/constants.js delete mode 100644 node_modules/jest-diff/build/diffLines.d.ts delete mode 100644 node_modules/jest-diff/build/diffLines.d.ts.map delete mode 100644 node_modules/jest-diff/build/diffLines.js delete mode 100644 node_modules/jest-diff/build/diffStrings.d.ts delete mode 100644 node_modules/jest-diff/build/diffStrings.d.ts.map delete mode 100644 node_modules/jest-diff/build/diffStrings.js delete mode 100644 node_modules/jest-diff/build/getAlignedDiffs.d.ts delete mode 100644 node_modules/jest-diff/build/getAlignedDiffs.d.ts.map delete mode 100644 node_modules/jest-diff/build/getAlignedDiffs.js delete mode 100644 node_modules/jest-diff/build/index.d.ts delete mode 100644 node_modules/jest-diff/build/index.d.ts.map delete mode 100644 node_modules/jest-diff/build/index.js delete mode 100644 node_modules/jest-diff/build/joinAlignedDiffs.d.ts delete mode 100644 node_modules/jest-diff/build/joinAlignedDiffs.d.ts.map delete mode 100644 node_modules/jest-diff/build/joinAlignedDiffs.js delete mode 100644 node_modules/jest-diff/build/printDiffs.d.ts delete mode 100644 node_modules/jest-diff/build/printDiffs.d.ts.map delete mode 100644 node_modules/jest-diff/build/printDiffs.js delete mode 100644 node_modules/jest-diff/build/types.d.ts delete mode 100644 node_modules/jest-diff/build/types.d.ts.map delete mode 100644 node_modules/jest-diff/build/types.js delete mode 100644 node_modules/jest-diff/package.json delete mode 100644 node_modules/jest-docblock/LICENSE delete mode 100644 node_modules/jest-docblock/README.md delete mode 100644 node_modules/jest-docblock/build/index.d.ts delete mode 100644 node_modules/jest-docblock/build/index.d.ts.map delete mode 100644 node_modules/jest-docblock/build/index.js delete mode 100644 node_modules/jest-docblock/package.json delete mode 100644 node_modules/jest-each/LICENSE delete mode 100644 node_modules/jest-each/README.md delete mode 100644 node_modules/jest-each/build/bind.d.ts delete mode 100644 node_modules/jest-each/build/bind.d.ts.map delete mode 100644 node_modules/jest-each/build/bind.js delete mode 100644 node_modules/jest-each/build/index.d.ts delete mode 100644 node_modules/jest-each/build/index.d.ts.map delete mode 100644 node_modules/jest-each/build/index.js delete mode 100644 node_modules/jest-each/build/table/array.d.ts delete mode 100644 node_modules/jest-each/build/table/array.d.ts.map delete mode 100644 node_modules/jest-each/build/table/array.js delete mode 100644 node_modules/jest-each/build/table/template.d.ts delete mode 100644 node_modules/jest-each/build/table/template.d.ts.map delete mode 100644 node_modules/jest-each/build/table/template.js delete mode 100644 node_modules/jest-each/build/validation.d.ts delete mode 100644 node_modules/jest-each/build/validation.d.ts.map delete mode 100644 node_modules/jest-each/build/validation.js delete mode 100644 node_modules/jest-each/package.json delete mode 100644 node_modules/jest-environment-jsdom/build/index.d.ts delete mode 100644 node_modules/jest-environment-jsdom/build/index.d.ts.map delete mode 100644 node_modules/jest-environment-jsdom/build/index.js delete mode 100644 node_modules/jest-environment-jsdom/package.json delete mode 100644 node_modules/jest-environment-node/build/index.d.ts delete mode 100644 node_modules/jest-environment-node/build/index.d.ts.map delete mode 100644 node_modules/jest-environment-node/build/index.js delete mode 100644 node_modules/jest-environment-node/package.json delete mode 100644 node_modules/jest-get-type/LICENSE delete mode 100644 node_modules/jest-get-type/build/index.d.ts delete mode 100644 node_modules/jest-get-type/build/index.d.ts.map delete mode 100644 node_modules/jest-get-type/build/index.js delete mode 100644 node_modules/jest-get-type/package.json delete mode 100644 node_modules/jest-haste-map/LICENSE delete mode 100644 node_modules/jest-haste-map/build/HasteFS.d.ts delete mode 100644 node_modules/jest-haste-map/build/HasteFS.d.ts.map delete mode 100644 node_modules/jest-haste-map/build/HasteFS.js delete mode 100644 node_modules/jest-haste-map/build/ModuleMap.d.ts delete mode 100644 node_modules/jest-haste-map/build/ModuleMap.d.ts.map delete mode 100644 node_modules/jest-haste-map/build/ModuleMap.js delete mode 100644 node_modules/jest-haste-map/build/blacklist.d.ts delete mode 100644 node_modules/jest-haste-map/build/blacklist.d.ts.map delete mode 100644 node_modules/jest-haste-map/build/blacklist.js delete mode 100644 node_modules/jest-haste-map/build/constants.d.ts delete mode 100644 node_modules/jest-haste-map/build/constants.d.ts.map delete mode 100644 node_modules/jest-haste-map/build/constants.js delete mode 100644 node_modules/jest-haste-map/build/crawlers/node.d.ts delete mode 100644 node_modules/jest-haste-map/build/crawlers/node.d.ts.map delete mode 100644 node_modules/jest-haste-map/build/crawlers/node.js delete mode 100644 node_modules/jest-haste-map/build/crawlers/watchman.d.ts delete mode 100644 node_modules/jest-haste-map/build/crawlers/watchman.d.ts.map delete mode 100644 node_modules/jest-haste-map/build/crawlers/watchman.js delete mode 100644 node_modules/jest-haste-map/build/getMockName.d.ts delete mode 100644 node_modules/jest-haste-map/build/getMockName.d.ts.map delete mode 100644 node_modules/jest-haste-map/build/getMockName.js delete mode 100644 node_modules/jest-haste-map/build/index.d.ts delete mode 100644 node_modules/jest-haste-map/build/index.d.ts.map delete mode 100644 node_modules/jest-haste-map/build/index.js delete mode 100644 node_modules/jest-haste-map/build/lib/FSEventsWatcher.d.ts delete mode 100644 node_modules/jest-haste-map/build/lib/FSEventsWatcher.d.ts.map delete mode 100644 node_modules/jest-haste-map/build/lib/FSEventsWatcher.js delete mode 100644 node_modules/jest-haste-map/build/lib/WatchmanWatcher.js delete mode 100644 node_modules/jest-haste-map/build/lib/dependencyExtractor.d.ts delete mode 100644 node_modules/jest-haste-map/build/lib/dependencyExtractor.d.ts.map delete mode 100644 node_modules/jest-haste-map/build/lib/dependencyExtractor.js delete mode 100644 node_modules/jest-haste-map/build/lib/fast_path.d.ts delete mode 100644 node_modules/jest-haste-map/build/lib/fast_path.d.ts.map delete mode 100644 node_modules/jest-haste-map/build/lib/fast_path.js delete mode 100644 node_modules/jest-haste-map/build/lib/getPlatformExtension.d.ts delete mode 100644 node_modules/jest-haste-map/build/lib/getPlatformExtension.d.ts.map delete mode 100644 node_modules/jest-haste-map/build/lib/getPlatformExtension.js delete mode 100644 node_modules/jest-haste-map/build/lib/isRegExpSupported.d.ts delete mode 100644 node_modules/jest-haste-map/build/lib/isRegExpSupported.d.ts.map delete mode 100644 node_modules/jest-haste-map/build/lib/isRegExpSupported.js delete mode 100644 node_modules/jest-haste-map/build/lib/normalizePathSep.d.ts delete mode 100644 node_modules/jest-haste-map/build/lib/normalizePathSep.d.ts.map delete mode 100644 node_modules/jest-haste-map/build/lib/normalizePathSep.js delete mode 100644 node_modules/jest-haste-map/build/types.d.ts delete mode 100644 node_modules/jest-haste-map/build/types.d.ts.map delete mode 100644 node_modules/jest-haste-map/build/types.js delete mode 100644 node_modules/jest-haste-map/build/worker.d.ts delete mode 100644 node_modules/jest-haste-map/build/worker.d.ts.map delete mode 100644 node_modules/jest-haste-map/build/worker.js delete mode 100644 node_modules/jest-haste-map/package.json delete mode 100644 node_modules/jest-jasmine2/build/ExpectationFailed.d.ts delete mode 100644 node_modules/jest-jasmine2/build/ExpectationFailed.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/ExpectationFailed.js delete mode 100644 node_modules/jest-jasmine2/build/PCancelable.js delete mode 100644 node_modules/jest-jasmine2/build/assertionErrorMessage.d.ts delete mode 100644 node_modules/jest-jasmine2/build/assertionErrorMessage.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/assertionErrorMessage.js delete mode 100644 node_modules/jest-jasmine2/build/each.d.ts delete mode 100644 node_modules/jest-jasmine2/build/each.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/each.js delete mode 100644 node_modules/jest-jasmine2/build/errorOnPrivate.d.ts delete mode 100644 node_modules/jest-jasmine2/build/errorOnPrivate.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/errorOnPrivate.js delete mode 100644 node_modules/jest-jasmine2/build/expectationResultFactory.d.ts delete mode 100644 node_modules/jest-jasmine2/build/expectationResultFactory.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/expectationResultFactory.js delete mode 100644 node_modules/jest-jasmine2/build/index.d.ts delete mode 100644 node_modules/jest-jasmine2/build/index.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/index.js delete mode 100644 node_modules/jest-jasmine2/build/isError.d.ts delete mode 100644 node_modules/jest-jasmine2/build/isError.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/isError.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/CallTracker.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/CallTracker.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/jasmine/CallTracker.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Env.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Env.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Env.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/jasmine/JsApiReporter.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Spec.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Spec.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Spec.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/SpyStrategy.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/SpyStrategy.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/jasmine/SpyStrategy.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Suite.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Suite.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Suite.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Timer.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Timer.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/jasmine/Timer.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/jasmine/createSpy.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/jasmineLight.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/jasmineLight.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/jasmine/jasmineLight.js delete mode 100644 node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/jasmine/spyRegistry.js delete mode 100644 node_modules/jest-jasmine2/build/jasmineAsyncInstall.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jasmineAsyncInstall.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/jasmineAsyncInstall.js delete mode 100644 node_modules/jest-jasmine2/build/jestExpect.d.ts delete mode 100644 node_modules/jest-jasmine2/build/jestExpect.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/jestExpect.js delete mode 100644 node_modules/jest-jasmine2/build/pTimeout.d.ts delete mode 100644 node_modules/jest-jasmine2/build/pTimeout.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/pTimeout.js delete mode 100644 node_modules/jest-jasmine2/build/queueRunner.d.ts delete mode 100644 node_modules/jest-jasmine2/build/queueRunner.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/queueRunner.js delete mode 100644 node_modules/jest-jasmine2/build/reporter.d.ts delete mode 100644 node_modules/jest-jasmine2/build/reporter.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/reporter.js delete mode 100644 node_modules/jest-jasmine2/build/setup_jest_globals.d.ts delete mode 100644 node_modules/jest-jasmine2/build/setup_jest_globals.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/setup_jest_globals.js delete mode 100644 node_modules/jest-jasmine2/build/treeProcessor.d.ts delete mode 100644 node_modules/jest-jasmine2/build/treeProcessor.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/treeProcessor.js delete mode 100644 node_modules/jest-jasmine2/build/types.d.ts delete mode 100644 node_modules/jest-jasmine2/build/types.d.ts.map delete mode 100644 node_modules/jest-jasmine2/build/types.js delete mode 100644 node_modules/jest-jasmine2/package.json delete mode 100644 node_modules/jest-leak-detector/LICENSE delete mode 100644 node_modules/jest-leak-detector/README.md delete mode 100644 node_modules/jest-leak-detector/build/index.d.ts delete mode 100644 node_modules/jest-leak-detector/build/index.d.ts.map delete mode 100644 node_modules/jest-leak-detector/build/index.js delete mode 100644 node_modules/jest-leak-detector/package.json delete mode 100644 node_modules/jest-matcher-utils/LICENSE delete mode 100644 node_modules/jest-matcher-utils/build/index.d.ts delete mode 100644 node_modules/jest-matcher-utils/build/index.d.ts.map delete mode 100644 node_modules/jest-matcher-utils/build/index.js delete mode 100644 node_modules/jest-matcher-utils/package.json delete mode 100644 node_modules/jest-message-util/LICENSE delete mode 100644 node_modules/jest-message-util/build/index.d.ts delete mode 100644 node_modules/jest-message-util/build/index.d.ts.map delete mode 100644 node_modules/jest-message-util/build/index.js delete mode 100644 node_modules/jest-message-util/build/types.d.ts delete mode 100644 node_modules/jest-message-util/build/types.d.ts.map delete mode 100644 node_modules/jest-message-util/build/types.js delete mode 100644 node_modules/jest-message-util/node_modules/slash/index.js delete mode 100644 node_modules/jest-message-util/node_modules/slash/license delete mode 100644 node_modules/jest-message-util/node_modules/slash/package.json delete mode 100644 node_modules/jest-message-util/node_modules/slash/readme.md delete mode 100644 node_modules/jest-message-util/package.json delete mode 100644 node_modules/jest-mock/LICENSE delete mode 100644 node_modules/jest-mock/README.md delete mode 100644 node_modules/jest-mock/build-es5/index.js delete mode 100644 node_modules/jest-mock/build-es5/index.js.map delete mode 100644 node_modules/jest-mock/build/index.d.ts delete mode 100644 node_modules/jest-mock/build/index.d.ts.map delete mode 100644 node_modules/jest-mock/build/index.js delete mode 100644 node_modules/jest-mock/package.json delete mode 100644 node_modules/jest-pnp-resolver/README.md delete mode 100644 node_modules/jest-pnp-resolver/index.d.ts delete mode 100644 node_modules/jest-pnp-resolver/index.js delete mode 100644 node_modules/jest-pnp-resolver/package.json delete mode 100644 node_modules/jest-regex-util/LICENSE delete mode 100644 node_modules/jest-regex-util/build/index.d.ts delete mode 100644 node_modules/jest-regex-util/build/index.d.ts.map delete mode 100644 node_modules/jest-regex-util/build/index.js delete mode 100644 node_modules/jest-regex-util/package.json delete mode 100644 node_modules/jest-resolve-dependencies/build/index.d.ts delete mode 100644 node_modules/jest-resolve-dependencies/build/index.d.ts.map delete mode 100644 node_modules/jest-resolve-dependencies/build/index.js delete mode 100644 node_modules/jest-resolve-dependencies/package.json delete mode 100644 node_modules/jest-resolve/LICENSE delete mode 100644 node_modules/jest-resolve/build/defaultResolver.d.ts delete mode 100644 node_modules/jest-resolve/build/defaultResolver.d.ts.map delete mode 100644 node_modules/jest-resolve/build/defaultResolver.js delete mode 100644 node_modules/jest-resolve/build/index.d.ts delete mode 100644 node_modules/jest-resolve/build/index.d.ts.map delete mode 100644 node_modules/jest-resolve/build/index.js delete mode 100644 node_modules/jest-resolve/build/isBuiltinModule.d.ts delete mode 100644 node_modules/jest-resolve/build/isBuiltinModule.d.ts.map delete mode 100644 node_modules/jest-resolve/build/isBuiltinModule.js delete mode 100644 node_modules/jest-resolve/build/nodeModulesPaths.d.ts delete mode 100644 node_modules/jest-resolve/build/nodeModulesPaths.d.ts.map delete mode 100644 node_modules/jest-resolve/build/nodeModulesPaths.js delete mode 100644 node_modules/jest-resolve/build/types.d.ts delete mode 100644 node_modules/jest-resolve/build/types.d.ts.map delete mode 100644 node_modules/jest-resolve/build/types.js delete mode 100644 node_modules/jest-resolve/package.json delete mode 100644 node_modules/jest-runner/build/index.d.ts delete mode 100644 node_modules/jest-runner/build/index.d.ts.map delete mode 100644 node_modules/jest-runner/build/index.js delete mode 100644 node_modules/jest-runner/build/runTest.d.ts delete mode 100644 node_modules/jest-runner/build/runTest.d.ts.map delete mode 100644 node_modules/jest-runner/build/runTest.js delete mode 100644 node_modules/jest-runner/build/testWorker.d.ts delete mode 100644 node_modules/jest-runner/build/testWorker.d.ts.map delete mode 100644 node_modules/jest-runner/build/testWorker.js delete mode 100644 node_modules/jest-runner/build/types.d.ts delete mode 100644 node_modules/jest-runner/build/types.d.ts.map delete mode 100644 node_modules/jest-runner/build/types.js delete mode 100644 node_modules/jest-runner/package.json delete mode 100644 node_modules/jest-runtime/bin/jest-runtime.js delete mode 100644 node_modules/jest-runtime/build/cli/args.d.ts delete mode 100644 node_modules/jest-runtime/build/cli/args.d.ts.map delete mode 100644 node_modules/jest-runtime/build/cli/args.js delete mode 100644 node_modules/jest-runtime/build/cli/index.d.ts delete mode 100644 node_modules/jest-runtime/build/cli/index.d.ts.map delete mode 100644 node_modules/jest-runtime/build/cli/index.js delete mode 100644 node_modules/jest-runtime/build/helpers.d.ts delete mode 100644 node_modules/jest-runtime/build/helpers.d.ts.map delete mode 100644 node_modules/jest-runtime/build/helpers.js delete mode 100644 node_modules/jest-runtime/build/index.d.ts delete mode 100644 node_modules/jest-runtime/build/index.d.ts.map delete mode 100644 node_modules/jest-runtime/build/index.js delete mode 100644 node_modules/jest-runtime/build/types.d.ts delete mode 100644 node_modules/jest-runtime/build/types.d.ts.map delete mode 100644 node_modules/jest-runtime/build/types.js delete mode 100644 node_modules/jest-runtime/build/version.d.ts delete mode 100644 node_modules/jest-runtime/build/version.d.ts.map delete mode 100644 node_modules/jest-runtime/build/version.js delete mode 100644 node_modules/jest-runtime/node_modules/slash/index.js delete mode 100644 node_modules/jest-runtime/node_modules/slash/license delete mode 100644 node_modules/jest-runtime/node_modules/slash/package.json delete mode 100644 node_modules/jest-runtime/node_modules/slash/readme.md delete mode 100644 node_modules/jest-runtime/package.json delete mode 100644 node_modules/jest-serializer/LICENSE delete mode 100644 node_modules/jest-serializer/README.md delete mode 100644 node_modules/jest-serializer/build/index.d.ts delete mode 100644 node_modules/jest-serializer/build/index.d.ts.map delete mode 100644 node_modules/jest-serializer/build/index.js delete mode 100644 node_modules/jest-serializer/package.json delete mode 100644 node_modules/jest-serializer/v8.d.ts delete mode 100644 node_modules/jest-snapshot/LICENSE delete mode 100644 node_modules/jest-snapshot/build/State.d.ts delete mode 100644 node_modules/jest-snapshot/build/State.d.ts.map delete mode 100644 node_modules/jest-snapshot/build/State.js delete mode 100644 node_modules/jest-snapshot/build/index.d.ts delete mode 100644 node_modules/jest-snapshot/build/index.d.ts.map delete mode 100644 node_modules/jest-snapshot/build/index.js delete mode 100644 node_modules/jest-snapshot/build/inline_snapshots.d.ts delete mode 100644 node_modules/jest-snapshot/build/inline_snapshots.d.ts.map delete mode 100644 node_modules/jest-snapshot/build/inline_snapshots.js delete mode 100644 node_modules/jest-snapshot/build/mock_serializer.d.ts delete mode 100644 node_modules/jest-snapshot/build/mock_serializer.d.ts.map delete mode 100644 node_modules/jest-snapshot/build/mock_serializer.js delete mode 100644 node_modules/jest-snapshot/build/plugins.d.ts delete mode 100644 node_modules/jest-snapshot/build/plugins.d.ts.map delete mode 100644 node_modules/jest-snapshot/build/plugins.js delete mode 100644 node_modules/jest-snapshot/build/print.d.ts delete mode 100644 node_modules/jest-snapshot/build/print.d.ts.map delete mode 100644 node_modules/jest-snapshot/build/print.js delete mode 100644 node_modules/jest-snapshot/build/snapshot_resolver.d.ts delete mode 100644 node_modules/jest-snapshot/build/snapshot_resolver.d.ts.map delete mode 100644 node_modules/jest-snapshot/build/snapshot_resolver.js delete mode 100644 node_modules/jest-snapshot/build/types.d.ts delete mode 100644 node_modules/jest-snapshot/build/types.d.ts.map delete mode 100644 node_modules/jest-snapshot/build/types.js delete mode 100644 node_modules/jest-snapshot/build/utils.d.ts delete mode 100644 node_modules/jest-snapshot/build/utils.d.ts.map delete mode 100644 node_modules/jest-snapshot/build/utils.js delete mode 100644 node_modules/jest-snapshot/package.json delete mode 100644 node_modules/jest-util/LICENSE delete mode 100644 node_modules/jest-util/build/ErrorWithStack.d.ts delete mode 100644 node_modules/jest-util/build/ErrorWithStack.d.ts.map delete mode 100644 node_modules/jest-util/build/ErrorWithStack.js delete mode 100644 node_modules/jest-util/build/clearLine.d.ts delete mode 100644 node_modules/jest-util/build/clearLine.d.ts.map delete mode 100644 node_modules/jest-util/build/clearLine.js delete mode 100644 node_modules/jest-util/build/convertDescriptorToString.d.ts delete mode 100644 node_modules/jest-util/build/convertDescriptorToString.d.ts.map delete mode 100644 node_modules/jest-util/build/convertDescriptorToString.js delete mode 100644 node_modules/jest-util/build/createDirectory.d.ts delete mode 100644 node_modules/jest-util/build/createDirectory.d.ts.map delete mode 100644 node_modules/jest-util/build/createDirectory.js delete mode 100644 node_modules/jest-util/build/createProcessObject.d.ts delete mode 100644 node_modules/jest-util/build/createProcessObject.d.ts.map delete mode 100644 node_modules/jest-util/build/createProcessObject.js delete mode 100644 node_modules/jest-util/build/deepCyclicCopy.d.ts delete mode 100644 node_modules/jest-util/build/deepCyclicCopy.d.ts.map delete mode 100644 node_modules/jest-util/build/deepCyclicCopy.js delete mode 100644 node_modules/jest-util/build/getFailedSnapshotTests.d.ts delete mode 100644 node_modules/jest-util/build/getFailedSnapshotTests.d.ts.map delete mode 100644 node_modules/jest-util/build/getFailedSnapshotTests.js delete mode 100644 node_modules/jest-util/build/index.d.ts delete mode 100644 node_modules/jest-util/build/index.d.ts.map delete mode 100644 node_modules/jest-util/build/index.js delete mode 100644 node_modules/jest-util/build/installCommonGlobals.d.ts delete mode 100644 node_modules/jest-util/build/installCommonGlobals.d.ts.map delete mode 100644 node_modules/jest-util/build/installCommonGlobals.js delete mode 100644 node_modules/jest-util/build/interopRequireDefault.d.ts delete mode 100644 node_modules/jest-util/build/interopRequireDefault.d.ts.map delete mode 100644 node_modules/jest-util/build/interopRequireDefault.js delete mode 100644 node_modules/jest-util/build/isInteractive.d.ts delete mode 100644 node_modules/jest-util/build/isInteractive.d.ts.map delete mode 100644 node_modules/jest-util/build/isInteractive.js delete mode 100644 node_modules/jest-util/build/isPromise.d.ts delete mode 100644 node_modules/jest-util/build/isPromise.d.ts.map delete mode 100644 node_modules/jest-util/build/isPromise.js delete mode 100644 node_modules/jest-util/build/pluralize.d.ts delete mode 100644 node_modules/jest-util/build/pluralize.d.ts.map delete mode 100644 node_modules/jest-util/build/pluralize.js delete mode 100644 node_modules/jest-util/build/preRunMessage.d.ts delete mode 100644 node_modules/jest-util/build/preRunMessage.d.ts.map delete mode 100644 node_modules/jest-util/build/preRunMessage.js delete mode 100644 node_modules/jest-util/build/replacePathSepForGlob.d.ts delete mode 100644 node_modules/jest-util/build/replacePathSepForGlob.d.ts.map delete mode 100644 node_modules/jest-util/build/replacePathSepForGlob.js delete mode 100644 node_modules/jest-util/build/setGlobal.d.ts delete mode 100644 node_modules/jest-util/build/setGlobal.d.ts.map delete mode 100644 node_modules/jest-util/build/setGlobal.js delete mode 100644 node_modules/jest-util/build/specialChars.d.ts delete mode 100644 node_modules/jest-util/build/specialChars.d.ts.map delete mode 100644 node_modules/jest-util/build/specialChars.js delete mode 100644 node_modules/jest-util/build/testPathPatternToRegExp.d.ts delete mode 100644 node_modules/jest-util/build/testPathPatternToRegExp.d.ts.map delete mode 100644 node_modules/jest-util/build/testPathPatternToRegExp.js delete mode 100644 node_modules/jest-util/node_modules/callsites/index.d.ts delete mode 100644 node_modules/jest-util/node_modules/callsites/index.js delete mode 100644 node_modules/jest-util/node_modules/callsites/license delete mode 100644 node_modules/jest-util/node_modules/callsites/package.json delete mode 100644 node_modules/jest-util/node_modules/callsites/readme.md delete mode 100644 node_modules/jest-util/node_modules/slash/index.js delete mode 100644 node_modules/jest-util/node_modules/slash/license delete mode 100644 node_modules/jest-util/node_modules/slash/package.json delete mode 100644 node_modules/jest-util/node_modules/slash/readme.md delete mode 100644 node_modules/jest-util/package.json delete mode 100644 node_modules/jest-validate/LICENSE delete mode 100644 node_modules/jest-validate/README.md delete mode 100644 node_modules/jest-validate/build/condition.d.ts delete mode 100644 node_modules/jest-validate/build/condition.d.ts.map delete mode 100644 node_modules/jest-validate/build/condition.js delete mode 100644 node_modules/jest-validate/build/defaultConfig.d.ts delete mode 100644 node_modules/jest-validate/build/defaultConfig.d.ts.map delete mode 100644 node_modules/jest-validate/build/defaultConfig.js delete mode 100644 node_modules/jest-validate/build/deprecated.d.ts delete mode 100644 node_modules/jest-validate/build/deprecated.d.ts.map delete mode 100644 node_modules/jest-validate/build/deprecated.js delete mode 100644 node_modules/jest-validate/build/errors.d.ts delete mode 100644 node_modules/jest-validate/build/errors.d.ts.map delete mode 100644 node_modules/jest-validate/build/errors.js delete mode 100644 node_modules/jest-validate/build/exampleConfig.d.ts delete mode 100644 node_modules/jest-validate/build/exampleConfig.d.ts.map delete mode 100644 node_modules/jest-validate/build/exampleConfig.js delete mode 100644 node_modules/jest-validate/build/index.d.ts delete mode 100644 node_modules/jest-validate/build/index.d.ts.map delete mode 100644 node_modules/jest-validate/build/index.js delete mode 100644 node_modules/jest-validate/build/types.d.ts delete mode 100644 node_modules/jest-validate/build/types.d.ts.map delete mode 100644 node_modules/jest-validate/build/types.js delete mode 100644 node_modules/jest-validate/build/utils.d.ts delete mode 100644 node_modules/jest-validate/build/utils.d.ts.map delete mode 100644 node_modules/jest-validate/build/utils.js delete mode 100644 node_modules/jest-validate/build/validate.d.ts delete mode 100644 node_modules/jest-validate/build/validate.d.ts.map delete mode 100644 node_modules/jest-validate/build/validate.js delete mode 100644 node_modules/jest-validate/build/validateCLIOptions.d.ts delete mode 100644 node_modules/jest-validate/build/validateCLIOptions.d.ts.map delete mode 100644 node_modules/jest-validate/build/validateCLIOptions.js delete mode 100644 node_modules/jest-validate/build/warnings.d.ts delete mode 100644 node_modules/jest-validate/build/warnings.d.ts.map delete mode 100644 node_modules/jest-validate/build/warnings.js delete mode 100644 node_modules/jest-validate/package.json delete mode 100644 node_modules/jest-watcher/LICENSE delete mode 100644 node_modules/jest-watcher/build/BaseWatchPlugin.d.ts delete mode 100644 node_modules/jest-watcher/build/BaseWatchPlugin.d.ts.map delete mode 100644 node_modules/jest-watcher/build/BaseWatchPlugin.js delete mode 100644 node_modules/jest-watcher/build/JestHooks.d.ts delete mode 100644 node_modules/jest-watcher/build/JestHooks.d.ts.map delete mode 100644 node_modules/jest-watcher/build/JestHooks.js delete mode 100644 node_modules/jest-watcher/build/PatternPrompt.d.ts delete mode 100644 node_modules/jest-watcher/build/PatternPrompt.d.ts.map delete mode 100644 node_modules/jest-watcher/build/PatternPrompt.js delete mode 100644 node_modules/jest-watcher/build/constants.d.ts delete mode 100644 node_modules/jest-watcher/build/constants.d.ts.map delete mode 100644 node_modules/jest-watcher/build/constants.js delete mode 100644 node_modules/jest-watcher/build/index.d.ts delete mode 100644 node_modules/jest-watcher/build/index.d.ts.map delete mode 100644 node_modules/jest-watcher/build/index.js delete mode 100644 node_modules/jest-watcher/build/lib/Prompt.d.ts delete mode 100644 node_modules/jest-watcher/build/lib/Prompt.d.ts.map delete mode 100644 node_modules/jest-watcher/build/lib/Prompt.js delete mode 100644 node_modules/jest-watcher/build/lib/colorize.d.ts delete mode 100644 node_modules/jest-watcher/build/lib/colorize.d.ts.map delete mode 100644 node_modules/jest-watcher/build/lib/colorize.js delete mode 100644 node_modules/jest-watcher/build/lib/formatTestNameByPattern.d.ts delete mode 100644 node_modules/jest-watcher/build/lib/formatTestNameByPattern.d.ts.map delete mode 100644 node_modules/jest-watcher/build/lib/formatTestNameByPattern.js delete mode 100644 node_modules/jest-watcher/build/lib/patternModeHelpers.d.ts delete mode 100644 node_modules/jest-watcher/build/lib/patternModeHelpers.d.ts.map delete mode 100644 node_modules/jest-watcher/build/lib/patternModeHelpers.js delete mode 100644 node_modules/jest-watcher/build/lib/scroll.d.ts delete mode 100644 node_modules/jest-watcher/build/lib/scroll.d.ts.map delete mode 100644 node_modules/jest-watcher/build/lib/scroll.js delete mode 100644 node_modules/jest-watcher/build/types.d.ts delete mode 100644 node_modules/jest-watcher/build/types.d.ts.map delete mode 100644 node_modules/jest-watcher/build/types.js delete mode 100644 node_modules/jest-watcher/package.json delete mode 100644 node_modules/jest-worker/LICENSE delete mode 100644 node_modules/jest-worker/README.md delete mode 100644 node_modules/jest-worker/build/Farm.d.ts delete mode 100644 node_modules/jest-worker/build/Farm.d.ts.map delete mode 100644 node_modules/jest-worker/build/Farm.js delete mode 100644 node_modules/jest-worker/build/WorkerPool.d.ts delete mode 100644 node_modules/jest-worker/build/WorkerPool.d.ts.map delete mode 100644 node_modules/jest-worker/build/WorkerPool.js delete mode 100644 node_modules/jest-worker/build/base/BaseWorkerPool.d.ts delete mode 100644 node_modules/jest-worker/build/base/BaseWorkerPool.d.ts.map delete mode 100644 node_modules/jest-worker/build/base/BaseWorkerPool.js delete mode 100644 node_modules/jest-worker/build/index.d.ts delete mode 100644 node_modules/jest-worker/build/index.d.ts.map delete mode 100644 node_modules/jest-worker/build/index.js delete mode 100644 node_modules/jest-worker/build/types.d.ts delete mode 100644 node_modules/jest-worker/build/types.d.ts.map delete mode 100644 node_modules/jest-worker/build/types.js delete mode 100644 node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts delete mode 100644 node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts.map delete mode 100644 node_modules/jest-worker/build/workers/ChildProcessWorker.js delete mode 100644 node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts delete mode 100644 node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts.map delete mode 100644 node_modules/jest-worker/build/workers/NodeThreadsWorker.js delete mode 100644 node_modules/jest-worker/build/workers/processChild.d.ts delete mode 100644 node_modules/jest-worker/build/workers/processChild.d.ts.map delete mode 100644 node_modules/jest-worker/build/workers/processChild.js delete mode 100644 node_modules/jest-worker/build/workers/threadChild.d.ts delete mode 100644 node_modules/jest-worker/build/workers/threadChild.d.ts.map delete mode 100644 node_modules/jest-worker/build/workers/threadChild.js delete mode 100644 node_modules/jest-worker/node_modules/supports-color/browser.js delete mode 100644 node_modules/jest-worker/node_modules/supports-color/index.js delete mode 100644 node_modules/jest-worker/node_modules/supports-color/license delete mode 100644 node_modules/jest-worker/node_modules/supports-color/package.json delete mode 100644 node_modules/jest-worker/node_modules/supports-color/readme.md delete mode 100644 node_modules/jest-worker/package.json delete mode 100644 node_modules/jest/README.md delete mode 100644 node_modules/jest/bin/jest.js delete mode 100644 node_modules/jest/build/jest.d.ts delete mode 100644 node_modules/jest/build/jest.d.ts.map delete mode 100644 node_modules/jest/build/jest.js delete mode 100644 node_modules/jest/node_modules/.bin/jest delete mode 100644 node_modules/jest/node_modules/.bin/jest.cmd delete mode 100644 node_modules/jest/node_modules/jest-cli/README.md delete mode 100644 node_modules/jest/node_modules/jest-cli/bin/jest.js delete mode 100644 node_modules/jest/node_modules/jest-cli/build/cli/args.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/cli/args.d.ts.map delete mode 100644 node_modules/jest/node_modules/jest-cli/build/cli/args.js delete mode 100644 node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts.map delete mode 100644 node_modules/jest/node_modules/jest-cli/build/cli/index.js delete mode 100644 node_modules/jest/node_modules/jest-cli/build/index.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/index.d.ts.map delete mode 100644 node_modules/jest/node_modules/jest-cli/build/index.js delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/constants.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/constants.d.ts.map delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/constants.js delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/errors.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/errors.d.ts.map delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/errors.js delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts.map delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.js delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/index.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/index.d.ts.map delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/index.js delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.d.ts.map delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.js delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/questions.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/questions.d.ts.map delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/questions.js delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/types.d.ts delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/types.d.ts.map delete mode 100644 node_modules/jest/node_modules/jest-cli/build/init/types.js delete mode 100644 node_modules/jest/node_modules/jest-cli/package.json delete mode 100644 node_modules/jest/package.json delete mode 100644 node_modules/js-tokens/CHANGELOG.md delete mode 100644 node_modules/js-tokens/LICENSE delete mode 100644 node_modules/js-tokens/README.md delete mode 100644 node_modules/js-tokens/index.js delete mode 100644 node_modules/js-tokens/package.json delete mode 100644 node_modules/js-yaml/CHANGELOG.md delete mode 100644 node_modules/js-yaml/LICENSE delete mode 100644 node_modules/js-yaml/README.md delete mode 100644 node_modules/js-yaml/bin/js-yaml.js delete mode 100644 node_modules/js-yaml/dist/js-yaml.js delete mode 100644 node_modules/js-yaml/dist/js-yaml.min.js delete mode 100644 node_modules/js-yaml/index.js delete mode 100644 node_modules/js-yaml/lib/js-yaml.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/common.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/dumper.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/exception.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/loader.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/mark.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/schema.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/schema/core.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/schema/default_full.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/schema/default_safe.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/schema/failsafe.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/schema/json.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/type.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/type/binary.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/type/bool.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/type/float.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/type/int.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/type/js/function.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/type/js/regexp.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/type/js/undefined.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/type/map.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/type/merge.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/type/null.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/type/omap.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/type/pairs.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/type/seq.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/type/set.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/type/str.js delete mode 100644 node_modules/js-yaml/lib/js-yaml/type/timestamp.js delete mode 100644 node_modules/js-yaml/package.json delete mode 100644 node_modules/jsbn/.npmignore delete mode 100644 node_modules/jsbn/LICENSE delete mode 100644 node_modules/jsbn/README.md delete mode 100644 node_modules/jsbn/example.html delete mode 100644 node_modules/jsbn/example.js delete mode 100644 node_modules/jsbn/index.js delete mode 100644 node_modules/jsbn/package.json delete mode 100644 node_modules/jsdom/Changelog.md delete mode 100644 node_modules/jsdom/LICENSE.txt delete mode 100644 node_modules/jsdom/README.md delete mode 100644 node_modules/jsdom/lib/api.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/Window.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/default-stylesheet.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/documentfeatures.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/domtohtml.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/htmltodom.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/not-implemented.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/parse5-adapter-parsing.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/parse5-adapter-serialization.js delete mode 100644 node_modules/jsdom/lib/jsdom/browser/resource-loader.js delete mode 100644 node_modules/jsdom/lib/jsdom/level2/style.js delete mode 100644 node_modules/jsdom/lib/jsdom/level3/xpath.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/aborting/AbortController-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/aborting/AbortSignal-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/attributes.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/attributes/Attr-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/attributes/NamedNodeMap-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/constraint-validation/DefaultConstraintValidation-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/constraint-validation/ValidityState-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/domparsing/DOMParser-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/CloseEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/CompositionEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/CustomEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/ErrorEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/Event-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/EventModifierMixin-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/FocusEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/HashChangeEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/KeyboardEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/MessageEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/MouseEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/PopStateEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/ProgressEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/StorageEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/TouchEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/UIEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/events/WheelEvent-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/file-api/Blob-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/file-api/File-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/file-api/FileList-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/file-api/FileReader-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/AbortController.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/AbortSignal.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/AddEventListenerOptions.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Attr.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/BarProp.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/BinaryType.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Blob.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/BlobPropertyBag.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CDATASection.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CanPlayTypeResult.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CharacterData.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ChildNode.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CloseEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CloseEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Comment.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CompositionEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CompositionEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CustomEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/CustomEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DOMImplementation.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DOMParser.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DOMStringMap.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DOMTokenList.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Document.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DocumentFragment.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DocumentReadyState.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/DocumentType.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Element.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ElementCSSInlineStyle.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ElementContentEditable.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ElementCreationOptions.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EndingType.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ErrorEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ErrorEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Event.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EventListenerOptions.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EventModifierInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/External.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/File.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FileList.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FilePropertyBag.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FileReader.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FocusEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FocusEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/FormData.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/GetRootNodeOptions.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/GlobalEventHandlers.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLAnchorElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLAreaElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLAudioElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLBRElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLBaseElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLBodyElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLButtonElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLCanvasElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLCollection.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDListElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDataElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDataListElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDetailsElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDialogElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDirectoryElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLDivElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLEmbedElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLFieldSetElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLFontElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLFormElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLFrameSetElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLHRElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLHeadElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLHeadingElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLHtmlElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLHyperlinkElementUtils.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLIFrameElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLImageElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLInputElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLLIElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLLabelElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLLegendElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLLinkElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMapElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMarqueeElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMediaElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMenuElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMetaElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLMeterElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLModElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLOListElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLObjectElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLOptGroupElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLOptionElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLOptionsCollection.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLOutputElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLParagraphElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLParamElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLPictureElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLPreElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLProgressElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLQuoteElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLScriptElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLSelectElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLSourceElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLSpanElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLStyleElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCaptionElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableCellElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableColElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableRowElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTableSectionElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTemplateElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTextAreaElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTimeElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTitleElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLTrackElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLUListElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLUnknownElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HTMLVideoElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HashChangeEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/HashChangeEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/History.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/KeyboardEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/KeyboardEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/LinkStyle.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Location.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MessageEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MessageEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MouseEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/MouseEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NamedNodeMap.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Navigator.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NavigatorConcurrentHardware.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NavigatorCookies.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NavigatorID.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NavigatorLanguage.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NavigatorOnLine.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NavigatorPlugins.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Node.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NodeIterator.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NodeList.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NonDocumentTypeChildNode.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/NonElementParentNode.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ParentNode.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Performance.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/PopStateEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/PopStateEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ProcessingInstruction.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ProgressEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ProgressEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGAnimatedString.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGBoundingBoxOptions.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGGraphicsElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGNumber.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGSVGElement.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGStringList.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SVGTests.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Screen.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ScrollBehavior.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ScrollIntoViewOptions.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ScrollLogicalPosition.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ScrollOptions.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ScrollRestoration.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SelectionMode.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ShadowRootInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Storage.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/StorageEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/StorageEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/SupportedType.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/Text.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/TextTrackKind.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/TouchEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/TouchEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/TreeWalker.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/UIEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/UIEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/ValidityState.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/VisibilityState.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/WebSocket.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/WheelEvent.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/WheelEventInit.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/WindowEventHandlers.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/XMLDocument.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequestEventTarget.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/XMLHttpRequestUpload.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/generated/utils.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/create-event-accessor.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/dates-and-times.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/document-base-url.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/focusing.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/form-controls.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/internal-constants.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/json.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/namespaces.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/ordered-set.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/selectors.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/strings.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/stylesheets.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/svg/basic-types.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/text.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/traversal.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/helpers/validate-names.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/hr-time/Performance-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/index.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/named-properties-window.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/Navigator-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorConcurrentHardware-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorCookies-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorID-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorLanguage-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorOnLine-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/navigator/NavigatorPlugins-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/node-document-position.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/node-filter.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/node-type.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/node.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/CDATASection-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/CharacterData-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ChildNode-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Comment-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/DOMImplementation-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/DOMStringMap-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/DOMTokenList-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/DocumentFragment-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/DocumentType-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Element-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ElementCSSInlineStyle-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ElementContentEditable-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/GlobalEventHandlers-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLAnchorElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLAndSVGElementShared-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLAreaElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLAudioElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLBRElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLBaseElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLBodyElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLButtonElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLCollection-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDListElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDataElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDataListElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDetailsElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDialogElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDirectoryElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLDivElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLEmbedElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLFieldSetElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLFontElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLFormElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLFrameElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLFrameSetElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLHRElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLHeadElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLHeadingElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLHtmlElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLHyperlinkElementUtils-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLIFrameElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLImageElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLInputElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLLIElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLLabelElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLLegendElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLLinkElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMapElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMarqueeElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMediaElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMenuElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMetaElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLMeterElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLModElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLOListElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLObjectElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptGroupElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptionElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLOptionsCollection-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLOutputElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLParagraphElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLParamElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLPictureElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLPreElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLProgressElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLQuoteElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLScriptElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLSelectElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLSourceElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLSpanElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLStyleElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableCaptionElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableCellElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableColElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableRowElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTableSectionElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTemplateElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTextAreaElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTimeElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTitleElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLTrackElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLUListElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLUnknownElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/HTMLVideoElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/LinkStyle-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/NodeList-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/NonDocumentTypeChildNode-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/NonElementParentNode-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ParentNode-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/ProcessingInstruction-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/SVGElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/SVGGraphicsElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/SVGSVGElement-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/SVGTests-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/Text-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/WindowEventHandlers-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/nodes/XMLDocument-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/post-message.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/register-elements.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/svg/SVGAnimatedString-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/svg/SVGListBase.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/svg/SVGNumber-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/svg/SVGStringList-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/traversal/NodeIterator-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/traversal/TreeWalker-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/traversal/helpers.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/websockets/WebSocket-impl-browser.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/websockets/WebSocket-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/webstorage/Storage-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/window/BarProp-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/window/External-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/window/History-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/window/History.webidl delete mode 100644 node_modules/jsdom/lib/jsdom/living/window/Location-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/window/Screen-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/window/SessionHistory.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/window/navigation.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/xhr-sync-worker.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/xhr-utils.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/xhr/FormData-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequestEventTarget-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequestUpload-impl.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/xmlhttprequest-symbols.js delete mode 100644 node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js delete mode 100644 node_modules/jsdom/lib/jsdom/named-properties-tracker.js delete mode 100644 node_modules/jsdom/lib/jsdom/utils.js delete mode 100644 node_modules/jsdom/lib/jsdom/virtual-console.js delete mode 100644 node_modules/jsdom/lib/jsdom/vm-shim.js delete mode 100644 node_modules/jsdom/lib/old-api.js delete mode 100644 node_modules/jsdom/lib/old-api.md delete mode 100644 node_modules/jsdom/package.json delete mode 100644 node_modules/jsesc/LICENSE-MIT.txt delete mode 100644 node_modules/jsesc/README.md delete mode 100644 node_modules/jsesc/bin/jsesc delete mode 100644 node_modules/jsesc/jsesc.js delete mode 100644 node_modules/jsesc/man/jsesc.1 delete mode 100644 node_modules/jsesc/package.json delete mode 100644 node_modules/json-parse-better-errors/CHANGELOG.md delete mode 100644 node_modules/json-parse-better-errors/LICENSE.md delete mode 100644 node_modules/json-parse-better-errors/README.md delete mode 100644 node_modules/json-parse-better-errors/index.js delete mode 100644 node_modules/json-parse-better-errors/package.json delete mode 100644 node_modules/json-schema-traverse/.eslintrc.yml delete mode 100644 node_modules/json-schema-traverse/.travis.yml delete mode 100644 node_modules/json-schema-traverse/LICENSE delete mode 100644 node_modules/json-schema-traverse/README.md delete mode 100644 node_modules/json-schema-traverse/index.js delete mode 100644 node_modules/json-schema-traverse/package.json delete mode 100644 node_modules/json-schema-traverse/spec/.eslintrc.yml delete mode 100644 node_modules/json-schema-traverse/spec/fixtures/schema.js delete mode 100644 node_modules/json-schema-traverse/spec/index.spec.js delete mode 100644 node_modules/json-schema/README.md delete mode 100644 node_modules/json-schema/draft-00/hyper-schema delete mode 100644 node_modules/json-schema/draft-00/json-ref delete mode 100644 node_modules/json-schema/draft-00/links delete mode 100644 node_modules/json-schema/draft-00/schema delete mode 100644 node_modules/json-schema/draft-01/hyper-schema delete mode 100644 node_modules/json-schema/draft-01/json-ref delete mode 100644 node_modules/json-schema/draft-01/links delete mode 100644 node_modules/json-schema/draft-01/schema delete mode 100644 node_modules/json-schema/draft-02/hyper-schema delete mode 100644 node_modules/json-schema/draft-02/json-ref delete mode 100644 node_modules/json-schema/draft-02/links delete mode 100644 node_modules/json-schema/draft-02/schema delete mode 100644 node_modules/json-schema/draft-03/examples/address delete mode 100644 node_modules/json-schema/draft-03/examples/calendar delete mode 100644 node_modules/json-schema/draft-03/examples/card delete mode 100644 node_modules/json-schema/draft-03/examples/geo delete mode 100644 node_modules/json-schema/draft-03/examples/interfaces delete mode 100644 node_modules/json-schema/draft-03/hyper-schema delete mode 100644 node_modules/json-schema/draft-03/json-ref delete mode 100644 node_modules/json-schema/draft-03/links delete mode 100644 node_modules/json-schema/draft-03/schema delete mode 100644 node_modules/json-schema/draft-04/hyper-schema delete mode 100644 node_modules/json-schema/draft-04/links delete mode 100644 node_modules/json-schema/draft-04/schema delete mode 100644 node_modules/json-schema/draft-zyp-json-schema-03.xml delete mode 100644 node_modules/json-schema/draft-zyp-json-schema-04.xml delete mode 100644 node_modules/json-schema/lib/links.js delete mode 100644 node_modules/json-schema/lib/validate.js delete mode 100644 node_modules/json-schema/package.json delete mode 100644 node_modules/json-schema/test/tests.js delete mode 100644 node_modules/json-stringify-safe/.npmignore delete mode 100644 node_modules/json-stringify-safe/CHANGELOG.md delete mode 100644 node_modules/json-stringify-safe/LICENSE delete mode 100644 node_modules/json-stringify-safe/Makefile delete mode 100644 node_modules/json-stringify-safe/README.md delete mode 100644 node_modules/json-stringify-safe/package.json delete mode 100644 node_modules/json-stringify-safe/stringify.js delete mode 100644 node_modules/json-stringify-safe/test/mocha.opts delete mode 100644 node_modules/json-stringify-safe/test/stringify_test.js delete mode 100644 node_modules/json5/CHANGELOG.md delete mode 100644 node_modules/json5/LICENSE.md delete mode 100644 node_modules/json5/README.md delete mode 100644 node_modules/json5/dist/index.js delete mode 100644 node_modules/json5/dist/index.min.js delete mode 100644 node_modules/json5/dist/index.min.mjs delete mode 100644 node_modules/json5/dist/index.mjs delete mode 100644 node_modules/json5/lib/cli.js delete mode 100644 node_modules/json5/lib/index.js delete mode 100644 node_modules/json5/lib/parse.js delete mode 100644 node_modules/json5/lib/register.js delete mode 100644 node_modules/json5/lib/require.js delete mode 100644 node_modules/json5/lib/stringify.js delete mode 100644 node_modules/json5/lib/unicode.js delete mode 100644 node_modules/json5/lib/util.js delete mode 100644 node_modules/json5/package.json delete mode 100644 node_modules/jsprim/CHANGES.md delete mode 100644 node_modules/jsprim/CONTRIBUTING.md delete mode 100644 node_modules/jsprim/LICENSE delete mode 100644 node_modules/jsprim/README.md delete mode 100644 node_modules/jsprim/lib/jsprim.js delete mode 100644 node_modules/jsprim/package.json delete mode 100644 node_modules/kind-of/CHANGELOG.md delete mode 100644 node_modules/kind-of/LICENSE delete mode 100644 node_modules/kind-of/README.md delete mode 100644 node_modules/kind-of/index.js delete mode 100644 node_modules/kind-of/package.json delete mode 100644 node_modules/kleur/index.js delete mode 100644 node_modules/kleur/kleur.d.ts delete mode 100644 node_modules/kleur/license delete mode 100644 node_modules/kleur/package.json delete mode 100644 node_modules/kleur/readme.md delete mode 100644 node_modules/left-pad/.travis.yml delete mode 100644 node_modules/left-pad/COPYING delete mode 100644 node_modules/left-pad/README.md delete mode 100644 node_modules/left-pad/index.d.ts delete mode 100644 node_modules/left-pad/index.js delete mode 100644 node_modules/left-pad/package.json delete mode 100644 node_modules/left-pad/perf/O(n).js delete mode 100644 node_modules/left-pad/perf/es6Repeat.js delete mode 100644 node_modules/left-pad/perf/perf.js delete mode 100644 node_modules/left-pad/test.js delete mode 100644 node_modules/leven/index.d.ts delete mode 100644 node_modules/leven/index.js delete mode 100644 node_modules/leven/license delete mode 100644 node_modules/leven/package.json delete mode 100644 node_modules/leven/readme.md delete mode 100644 node_modules/levn/LICENSE delete mode 100644 node_modules/levn/README.md delete mode 100644 node_modules/levn/lib/cast.js delete mode 100644 node_modules/levn/lib/coerce.js delete mode 100644 node_modules/levn/lib/index.js delete mode 100644 node_modules/levn/lib/parse-string.js delete mode 100644 node_modules/levn/lib/parse.js delete mode 100644 node_modules/levn/package.json delete mode 100644 node_modules/lines-and-columns/LICENSE delete mode 100644 node_modules/lines-and-columns/README.md delete mode 100644 node_modules/lines-and-columns/dist/index.d.ts delete mode 100644 node_modules/lines-and-columns/dist/index.js delete mode 100644 node_modules/lines-and-columns/dist/index.mjs delete mode 100644 node_modules/lines-and-columns/package.json delete mode 100644 node_modules/load-json-file/index.js delete mode 100644 node_modules/load-json-file/license delete mode 100644 node_modules/load-json-file/package.json delete mode 100644 node_modules/load-json-file/readme.md delete mode 100644 node_modules/locate-path/index.js delete mode 100644 node_modules/locate-path/license delete mode 100644 node_modules/locate-path/package.json delete mode 100644 node_modules/locate-path/readme.md delete mode 100644 node_modules/lodash.sortby/LICENSE delete mode 100644 node_modules/lodash.sortby/README.md delete mode 100644 node_modules/lodash.sortby/index.js delete mode 100644 node_modules/lodash.sortby/package.json delete mode 100644 node_modules/lodash/LICENSE delete mode 100644 node_modules/lodash/README.md delete mode 100644 node_modules/lodash/_DataView.js delete mode 100644 node_modules/lodash/_Hash.js delete mode 100644 node_modules/lodash/_LazyWrapper.js delete mode 100644 node_modules/lodash/_ListCache.js delete mode 100644 node_modules/lodash/_LodashWrapper.js delete mode 100644 node_modules/lodash/_Map.js delete mode 100644 node_modules/lodash/_MapCache.js delete mode 100644 node_modules/lodash/_Promise.js delete mode 100644 node_modules/lodash/_Set.js delete mode 100644 node_modules/lodash/_SetCache.js delete mode 100644 node_modules/lodash/_Stack.js delete mode 100644 node_modules/lodash/_Symbol.js delete mode 100644 node_modules/lodash/_Uint8Array.js delete mode 100644 node_modules/lodash/_WeakMap.js delete mode 100644 node_modules/lodash/_apply.js delete mode 100644 node_modules/lodash/_arrayAggregator.js delete mode 100644 node_modules/lodash/_arrayEach.js delete mode 100644 node_modules/lodash/_arrayEachRight.js delete mode 100644 node_modules/lodash/_arrayEvery.js delete mode 100644 node_modules/lodash/_arrayFilter.js delete mode 100644 node_modules/lodash/_arrayIncludes.js delete mode 100644 node_modules/lodash/_arrayIncludesWith.js delete mode 100644 node_modules/lodash/_arrayLikeKeys.js delete mode 100644 node_modules/lodash/_arrayMap.js delete mode 100644 node_modules/lodash/_arrayPush.js delete mode 100644 node_modules/lodash/_arrayReduce.js delete mode 100644 node_modules/lodash/_arrayReduceRight.js delete mode 100644 node_modules/lodash/_arraySample.js delete mode 100644 node_modules/lodash/_arraySampleSize.js delete mode 100644 node_modules/lodash/_arrayShuffle.js delete mode 100644 node_modules/lodash/_arraySome.js delete mode 100644 node_modules/lodash/_asciiSize.js delete mode 100644 node_modules/lodash/_asciiToArray.js delete mode 100644 node_modules/lodash/_asciiWords.js delete mode 100644 node_modules/lodash/_assignMergeValue.js delete mode 100644 node_modules/lodash/_assignValue.js delete mode 100644 node_modules/lodash/_assocIndexOf.js delete mode 100644 node_modules/lodash/_baseAggregator.js delete mode 100644 node_modules/lodash/_baseAssign.js delete mode 100644 node_modules/lodash/_baseAssignIn.js delete mode 100644 node_modules/lodash/_baseAssignValue.js delete mode 100644 node_modules/lodash/_baseAt.js delete mode 100644 node_modules/lodash/_baseClamp.js delete mode 100644 node_modules/lodash/_baseClone.js delete mode 100644 node_modules/lodash/_baseConforms.js delete mode 100644 node_modules/lodash/_baseConformsTo.js delete mode 100644 node_modules/lodash/_baseCreate.js delete mode 100644 node_modules/lodash/_baseDelay.js delete mode 100644 node_modules/lodash/_baseDifference.js delete mode 100644 node_modules/lodash/_baseEach.js delete mode 100644 node_modules/lodash/_baseEachRight.js delete mode 100644 node_modules/lodash/_baseEvery.js delete mode 100644 node_modules/lodash/_baseExtremum.js delete mode 100644 node_modules/lodash/_baseFill.js delete mode 100644 node_modules/lodash/_baseFilter.js delete mode 100644 node_modules/lodash/_baseFindIndex.js delete mode 100644 node_modules/lodash/_baseFindKey.js delete mode 100644 node_modules/lodash/_baseFlatten.js delete mode 100644 node_modules/lodash/_baseFor.js delete mode 100644 node_modules/lodash/_baseForOwn.js delete mode 100644 node_modules/lodash/_baseForOwnRight.js delete mode 100644 node_modules/lodash/_baseForRight.js delete mode 100644 node_modules/lodash/_baseFunctions.js delete mode 100644 node_modules/lodash/_baseGet.js delete mode 100644 node_modules/lodash/_baseGetAllKeys.js delete mode 100644 node_modules/lodash/_baseGetTag.js delete mode 100644 node_modules/lodash/_baseGt.js delete mode 100644 node_modules/lodash/_baseHas.js delete mode 100644 node_modules/lodash/_baseHasIn.js delete mode 100644 node_modules/lodash/_baseInRange.js delete mode 100644 node_modules/lodash/_baseIndexOf.js delete mode 100644 node_modules/lodash/_baseIndexOfWith.js delete mode 100644 node_modules/lodash/_baseIntersection.js delete mode 100644 node_modules/lodash/_baseInverter.js delete mode 100644 node_modules/lodash/_baseInvoke.js delete mode 100644 node_modules/lodash/_baseIsArguments.js delete mode 100644 node_modules/lodash/_baseIsArrayBuffer.js delete mode 100644 node_modules/lodash/_baseIsDate.js delete mode 100644 node_modules/lodash/_baseIsEqual.js delete mode 100644 node_modules/lodash/_baseIsEqualDeep.js delete mode 100644 node_modules/lodash/_baseIsMap.js delete mode 100644 node_modules/lodash/_baseIsMatch.js delete mode 100644 node_modules/lodash/_baseIsNaN.js delete mode 100644 node_modules/lodash/_baseIsNative.js delete mode 100644 node_modules/lodash/_baseIsRegExp.js delete mode 100644 node_modules/lodash/_baseIsSet.js delete mode 100644 node_modules/lodash/_baseIsTypedArray.js delete mode 100644 node_modules/lodash/_baseIteratee.js delete mode 100644 node_modules/lodash/_baseKeys.js delete mode 100644 node_modules/lodash/_baseKeysIn.js delete mode 100644 node_modules/lodash/_baseLodash.js delete mode 100644 node_modules/lodash/_baseLt.js delete mode 100644 node_modules/lodash/_baseMap.js delete mode 100644 node_modules/lodash/_baseMatches.js delete mode 100644 node_modules/lodash/_baseMatchesProperty.js delete mode 100644 node_modules/lodash/_baseMean.js delete mode 100644 node_modules/lodash/_baseMerge.js delete mode 100644 node_modules/lodash/_baseMergeDeep.js delete mode 100644 node_modules/lodash/_baseNth.js delete mode 100644 node_modules/lodash/_baseOrderBy.js delete mode 100644 node_modules/lodash/_basePick.js delete mode 100644 node_modules/lodash/_basePickBy.js delete mode 100644 node_modules/lodash/_baseProperty.js delete mode 100644 node_modules/lodash/_basePropertyDeep.js delete mode 100644 node_modules/lodash/_basePropertyOf.js delete mode 100644 node_modules/lodash/_basePullAll.js delete mode 100644 node_modules/lodash/_basePullAt.js delete mode 100644 node_modules/lodash/_baseRandom.js delete mode 100644 node_modules/lodash/_baseRange.js delete mode 100644 node_modules/lodash/_baseReduce.js delete mode 100644 node_modules/lodash/_baseRepeat.js delete mode 100644 node_modules/lodash/_baseRest.js delete mode 100644 node_modules/lodash/_baseSample.js delete mode 100644 node_modules/lodash/_baseSampleSize.js delete mode 100644 node_modules/lodash/_baseSet.js delete mode 100644 node_modules/lodash/_baseSetData.js delete mode 100644 node_modules/lodash/_baseSetToString.js delete mode 100644 node_modules/lodash/_baseShuffle.js delete mode 100644 node_modules/lodash/_baseSlice.js delete mode 100644 node_modules/lodash/_baseSome.js delete mode 100644 node_modules/lodash/_baseSortBy.js delete mode 100644 node_modules/lodash/_baseSortedIndex.js delete mode 100644 node_modules/lodash/_baseSortedIndexBy.js delete mode 100644 node_modules/lodash/_baseSortedUniq.js delete mode 100644 node_modules/lodash/_baseSum.js delete mode 100644 node_modules/lodash/_baseTimes.js delete mode 100644 node_modules/lodash/_baseToNumber.js delete mode 100644 node_modules/lodash/_baseToPairs.js delete mode 100644 node_modules/lodash/_baseToString.js delete mode 100644 node_modules/lodash/_baseUnary.js delete mode 100644 node_modules/lodash/_baseUniq.js delete mode 100644 node_modules/lodash/_baseUnset.js delete mode 100644 node_modules/lodash/_baseUpdate.js delete mode 100644 node_modules/lodash/_baseValues.js delete mode 100644 node_modules/lodash/_baseWhile.js delete mode 100644 node_modules/lodash/_baseWrapperValue.js delete mode 100644 node_modules/lodash/_baseXor.js delete mode 100644 node_modules/lodash/_baseZipObject.js delete mode 100644 node_modules/lodash/_cacheHas.js delete mode 100644 node_modules/lodash/_castArrayLikeObject.js delete mode 100644 node_modules/lodash/_castFunction.js delete mode 100644 node_modules/lodash/_castPath.js delete mode 100644 node_modules/lodash/_castRest.js delete mode 100644 node_modules/lodash/_castSlice.js delete mode 100644 node_modules/lodash/_charsEndIndex.js delete mode 100644 node_modules/lodash/_charsStartIndex.js delete mode 100644 node_modules/lodash/_cloneArrayBuffer.js delete mode 100644 node_modules/lodash/_cloneBuffer.js delete mode 100644 node_modules/lodash/_cloneDataView.js delete mode 100644 node_modules/lodash/_cloneRegExp.js delete mode 100644 node_modules/lodash/_cloneSymbol.js delete mode 100644 node_modules/lodash/_cloneTypedArray.js delete mode 100644 node_modules/lodash/_compareAscending.js delete mode 100644 node_modules/lodash/_compareMultiple.js delete mode 100644 node_modules/lodash/_composeArgs.js delete mode 100644 node_modules/lodash/_composeArgsRight.js delete mode 100644 node_modules/lodash/_copyArray.js delete mode 100644 node_modules/lodash/_copyObject.js delete mode 100644 node_modules/lodash/_copySymbols.js delete mode 100644 node_modules/lodash/_copySymbolsIn.js delete mode 100644 node_modules/lodash/_coreJsData.js delete mode 100644 node_modules/lodash/_countHolders.js delete mode 100644 node_modules/lodash/_createAggregator.js delete mode 100644 node_modules/lodash/_createAssigner.js delete mode 100644 node_modules/lodash/_createBaseEach.js delete mode 100644 node_modules/lodash/_createBaseFor.js delete mode 100644 node_modules/lodash/_createBind.js delete mode 100644 node_modules/lodash/_createCaseFirst.js delete mode 100644 node_modules/lodash/_createCompounder.js delete mode 100644 node_modules/lodash/_createCtor.js delete mode 100644 node_modules/lodash/_createCurry.js delete mode 100644 node_modules/lodash/_createFind.js delete mode 100644 node_modules/lodash/_createFlow.js delete mode 100644 node_modules/lodash/_createHybrid.js delete mode 100644 node_modules/lodash/_createInverter.js delete mode 100644 node_modules/lodash/_createMathOperation.js delete mode 100644 node_modules/lodash/_createOver.js delete mode 100644 node_modules/lodash/_createPadding.js delete mode 100644 node_modules/lodash/_createPartial.js delete mode 100644 node_modules/lodash/_createRange.js delete mode 100644 node_modules/lodash/_createRecurry.js delete mode 100644 node_modules/lodash/_createRelationalOperation.js delete mode 100644 node_modules/lodash/_createRound.js delete mode 100644 node_modules/lodash/_createSet.js delete mode 100644 node_modules/lodash/_createToPairs.js delete mode 100644 node_modules/lodash/_createWrap.js delete mode 100644 node_modules/lodash/_customDefaultsAssignIn.js delete mode 100644 node_modules/lodash/_customDefaultsMerge.js delete mode 100644 node_modules/lodash/_customOmitClone.js delete mode 100644 node_modules/lodash/_deburrLetter.js delete mode 100644 node_modules/lodash/_defineProperty.js delete mode 100644 node_modules/lodash/_equalArrays.js delete mode 100644 node_modules/lodash/_equalByTag.js delete mode 100644 node_modules/lodash/_equalObjects.js delete mode 100644 node_modules/lodash/_escapeHtmlChar.js delete mode 100644 node_modules/lodash/_escapeStringChar.js delete mode 100644 node_modules/lodash/_flatRest.js delete mode 100644 node_modules/lodash/_freeGlobal.js delete mode 100644 node_modules/lodash/_getAllKeys.js delete mode 100644 node_modules/lodash/_getAllKeysIn.js delete mode 100644 node_modules/lodash/_getData.js delete mode 100644 node_modules/lodash/_getFuncName.js delete mode 100644 node_modules/lodash/_getHolder.js delete mode 100644 node_modules/lodash/_getMapData.js delete mode 100644 node_modules/lodash/_getMatchData.js delete mode 100644 node_modules/lodash/_getNative.js delete mode 100644 node_modules/lodash/_getPrototype.js delete mode 100644 node_modules/lodash/_getRawTag.js delete mode 100644 node_modules/lodash/_getSymbols.js delete mode 100644 node_modules/lodash/_getSymbolsIn.js delete mode 100644 node_modules/lodash/_getTag.js delete mode 100644 node_modules/lodash/_getValue.js delete mode 100644 node_modules/lodash/_getView.js delete mode 100644 node_modules/lodash/_getWrapDetails.js delete mode 100644 node_modules/lodash/_hasPath.js delete mode 100644 node_modules/lodash/_hasUnicode.js delete mode 100644 node_modules/lodash/_hasUnicodeWord.js delete mode 100644 node_modules/lodash/_hashClear.js delete mode 100644 node_modules/lodash/_hashDelete.js delete mode 100644 node_modules/lodash/_hashGet.js delete mode 100644 node_modules/lodash/_hashHas.js delete mode 100644 node_modules/lodash/_hashSet.js delete mode 100644 node_modules/lodash/_initCloneArray.js delete mode 100644 node_modules/lodash/_initCloneByTag.js delete mode 100644 node_modules/lodash/_initCloneObject.js delete mode 100644 node_modules/lodash/_insertWrapDetails.js delete mode 100644 node_modules/lodash/_isFlattenable.js delete mode 100644 node_modules/lodash/_isIndex.js delete mode 100644 node_modules/lodash/_isIterateeCall.js delete mode 100644 node_modules/lodash/_isKey.js delete mode 100644 node_modules/lodash/_isKeyable.js delete mode 100644 node_modules/lodash/_isLaziable.js delete mode 100644 node_modules/lodash/_isMaskable.js delete mode 100644 node_modules/lodash/_isMasked.js delete mode 100644 node_modules/lodash/_isPrototype.js delete mode 100644 node_modules/lodash/_isStrictComparable.js delete mode 100644 node_modules/lodash/_iteratorToArray.js delete mode 100644 node_modules/lodash/_lazyClone.js delete mode 100644 node_modules/lodash/_lazyReverse.js delete mode 100644 node_modules/lodash/_lazyValue.js delete mode 100644 node_modules/lodash/_listCacheClear.js delete mode 100644 node_modules/lodash/_listCacheDelete.js delete mode 100644 node_modules/lodash/_listCacheGet.js delete mode 100644 node_modules/lodash/_listCacheHas.js delete mode 100644 node_modules/lodash/_listCacheSet.js delete mode 100644 node_modules/lodash/_mapCacheClear.js delete mode 100644 node_modules/lodash/_mapCacheDelete.js delete mode 100644 node_modules/lodash/_mapCacheGet.js delete mode 100644 node_modules/lodash/_mapCacheHas.js delete mode 100644 node_modules/lodash/_mapCacheSet.js delete mode 100644 node_modules/lodash/_mapToArray.js delete mode 100644 node_modules/lodash/_matchesStrictComparable.js delete mode 100644 node_modules/lodash/_memoizeCapped.js delete mode 100644 node_modules/lodash/_mergeData.js delete mode 100644 node_modules/lodash/_metaMap.js delete mode 100644 node_modules/lodash/_nativeCreate.js delete mode 100644 node_modules/lodash/_nativeKeys.js delete mode 100644 node_modules/lodash/_nativeKeysIn.js delete mode 100644 node_modules/lodash/_nodeUtil.js delete mode 100644 node_modules/lodash/_objectToString.js delete mode 100644 node_modules/lodash/_overArg.js delete mode 100644 node_modules/lodash/_overRest.js delete mode 100644 node_modules/lodash/_parent.js delete mode 100644 node_modules/lodash/_reEscape.js delete mode 100644 node_modules/lodash/_reEvaluate.js delete mode 100644 node_modules/lodash/_reInterpolate.js delete mode 100644 node_modules/lodash/_realNames.js delete mode 100644 node_modules/lodash/_reorder.js delete mode 100644 node_modules/lodash/_replaceHolders.js delete mode 100644 node_modules/lodash/_root.js delete mode 100644 node_modules/lodash/_safeGet.js delete mode 100644 node_modules/lodash/_setCacheAdd.js delete mode 100644 node_modules/lodash/_setCacheHas.js delete mode 100644 node_modules/lodash/_setData.js delete mode 100644 node_modules/lodash/_setToArray.js delete mode 100644 node_modules/lodash/_setToPairs.js delete mode 100644 node_modules/lodash/_setToString.js delete mode 100644 node_modules/lodash/_setWrapToString.js delete mode 100644 node_modules/lodash/_shortOut.js delete mode 100644 node_modules/lodash/_shuffleSelf.js delete mode 100644 node_modules/lodash/_stackClear.js delete mode 100644 node_modules/lodash/_stackDelete.js delete mode 100644 node_modules/lodash/_stackGet.js delete mode 100644 node_modules/lodash/_stackHas.js delete mode 100644 node_modules/lodash/_stackSet.js delete mode 100644 node_modules/lodash/_strictIndexOf.js delete mode 100644 node_modules/lodash/_strictLastIndexOf.js delete mode 100644 node_modules/lodash/_stringSize.js delete mode 100644 node_modules/lodash/_stringToArray.js delete mode 100644 node_modules/lodash/_stringToPath.js delete mode 100644 node_modules/lodash/_toKey.js delete mode 100644 node_modules/lodash/_toSource.js delete mode 100644 node_modules/lodash/_unescapeHtmlChar.js delete mode 100644 node_modules/lodash/_unicodeSize.js delete mode 100644 node_modules/lodash/_unicodeToArray.js delete mode 100644 node_modules/lodash/_unicodeWords.js delete mode 100644 node_modules/lodash/_updateWrapDetails.js delete mode 100644 node_modules/lodash/_wrapperClone.js delete mode 100644 node_modules/lodash/add.js delete mode 100644 node_modules/lodash/after.js delete mode 100644 node_modules/lodash/array.js delete mode 100644 node_modules/lodash/ary.js delete mode 100644 node_modules/lodash/assign.js delete mode 100644 node_modules/lodash/assignIn.js delete mode 100644 node_modules/lodash/assignInWith.js delete mode 100644 node_modules/lodash/assignWith.js delete mode 100644 node_modules/lodash/at.js delete mode 100644 node_modules/lodash/attempt.js delete mode 100644 node_modules/lodash/before.js delete mode 100644 node_modules/lodash/bind.js delete mode 100644 node_modules/lodash/bindAll.js delete mode 100644 node_modules/lodash/bindKey.js delete mode 100644 node_modules/lodash/camelCase.js delete mode 100644 node_modules/lodash/capitalize.js delete mode 100644 node_modules/lodash/castArray.js delete mode 100644 node_modules/lodash/ceil.js delete mode 100644 node_modules/lodash/chain.js delete mode 100644 node_modules/lodash/chunk.js delete mode 100644 node_modules/lodash/clamp.js delete mode 100644 node_modules/lodash/clone.js delete mode 100644 node_modules/lodash/cloneDeep.js delete mode 100644 node_modules/lodash/cloneDeepWith.js delete mode 100644 node_modules/lodash/cloneWith.js delete mode 100644 node_modules/lodash/collection.js delete mode 100644 node_modules/lodash/commit.js delete mode 100644 node_modules/lodash/compact.js delete mode 100644 node_modules/lodash/concat.js delete mode 100644 node_modules/lodash/cond.js delete mode 100644 node_modules/lodash/conforms.js delete mode 100644 node_modules/lodash/conformsTo.js delete mode 100644 node_modules/lodash/constant.js delete mode 100644 node_modules/lodash/core.js delete mode 100644 node_modules/lodash/core.min.js delete mode 100644 node_modules/lodash/countBy.js delete mode 100644 node_modules/lodash/create.js delete mode 100644 node_modules/lodash/curry.js delete mode 100644 node_modules/lodash/curryRight.js delete mode 100644 node_modules/lodash/date.js delete mode 100644 node_modules/lodash/debounce.js delete mode 100644 node_modules/lodash/deburr.js delete mode 100644 node_modules/lodash/defaultTo.js delete mode 100644 node_modules/lodash/defaults.js delete mode 100644 node_modules/lodash/defaultsDeep.js delete mode 100644 node_modules/lodash/defer.js delete mode 100644 node_modules/lodash/delay.js delete mode 100644 node_modules/lodash/difference.js delete mode 100644 node_modules/lodash/differenceBy.js delete mode 100644 node_modules/lodash/differenceWith.js delete mode 100644 node_modules/lodash/divide.js delete mode 100644 node_modules/lodash/drop.js delete mode 100644 node_modules/lodash/dropRight.js delete mode 100644 node_modules/lodash/dropRightWhile.js delete mode 100644 node_modules/lodash/dropWhile.js delete mode 100644 node_modules/lodash/each.js delete mode 100644 node_modules/lodash/eachRight.js delete mode 100644 node_modules/lodash/endsWith.js delete mode 100644 node_modules/lodash/entries.js delete mode 100644 node_modules/lodash/entriesIn.js delete mode 100644 node_modules/lodash/eq.js delete mode 100644 node_modules/lodash/escape.js delete mode 100644 node_modules/lodash/escapeRegExp.js delete mode 100644 node_modules/lodash/every.js delete mode 100644 node_modules/lodash/extend.js delete mode 100644 node_modules/lodash/extendWith.js delete mode 100644 node_modules/lodash/fill.js delete mode 100644 node_modules/lodash/filter.js delete mode 100644 node_modules/lodash/find.js delete mode 100644 node_modules/lodash/findIndex.js delete mode 100644 node_modules/lodash/findKey.js delete mode 100644 node_modules/lodash/findLast.js delete mode 100644 node_modules/lodash/findLastIndex.js delete mode 100644 node_modules/lodash/findLastKey.js delete mode 100644 node_modules/lodash/first.js delete mode 100644 node_modules/lodash/flatMap.js delete mode 100644 node_modules/lodash/flatMapDeep.js delete mode 100644 node_modules/lodash/flatMapDepth.js delete mode 100644 node_modules/lodash/flatten.js delete mode 100644 node_modules/lodash/flattenDeep.js delete mode 100644 node_modules/lodash/flattenDepth.js delete mode 100644 node_modules/lodash/flip.js delete mode 100644 node_modules/lodash/floor.js delete mode 100644 node_modules/lodash/flow.js delete mode 100644 node_modules/lodash/flowRight.js delete mode 100644 node_modules/lodash/forEach.js delete mode 100644 node_modules/lodash/forEachRight.js delete mode 100644 node_modules/lodash/forIn.js delete mode 100644 node_modules/lodash/forInRight.js delete mode 100644 node_modules/lodash/forOwn.js delete mode 100644 node_modules/lodash/forOwnRight.js delete mode 100644 node_modules/lodash/fp.js delete mode 100644 node_modules/lodash/fp/F.js delete mode 100644 node_modules/lodash/fp/T.js delete mode 100644 node_modules/lodash/fp/__.js delete mode 100644 node_modules/lodash/fp/_baseConvert.js delete mode 100644 node_modules/lodash/fp/_convertBrowser.js delete mode 100644 node_modules/lodash/fp/_falseOptions.js delete mode 100644 node_modules/lodash/fp/_mapping.js delete mode 100644 node_modules/lodash/fp/_util.js delete mode 100644 node_modules/lodash/fp/add.js delete mode 100644 node_modules/lodash/fp/after.js delete mode 100644 node_modules/lodash/fp/all.js delete mode 100644 node_modules/lodash/fp/allPass.js delete mode 100644 node_modules/lodash/fp/always.js delete mode 100644 node_modules/lodash/fp/any.js delete mode 100644 node_modules/lodash/fp/anyPass.js delete mode 100644 node_modules/lodash/fp/apply.js delete mode 100644 node_modules/lodash/fp/array.js delete mode 100644 node_modules/lodash/fp/ary.js delete mode 100644 node_modules/lodash/fp/assign.js delete mode 100644 node_modules/lodash/fp/assignAll.js delete mode 100644 node_modules/lodash/fp/assignAllWith.js delete mode 100644 node_modules/lodash/fp/assignIn.js delete mode 100644 node_modules/lodash/fp/assignInAll.js delete mode 100644 node_modules/lodash/fp/assignInAllWith.js delete mode 100644 node_modules/lodash/fp/assignInWith.js delete mode 100644 node_modules/lodash/fp/assignWith.js delete mode 100644 node_modules/lodash/fp/assoc.js delete mode 100644 node_modules/lodash/fp/assocPath.js delete mode 100644 node_modules/lodash/fp/at.js delete mode 100644 node_modules/lodash/fp/attempt.js delete mode 100644 node_modules/lodash/fp/before.js delete mode 100644 node_modules/lodash/fp/bind.js delete mode 100644 node_modules/lodash/fp/bindAll.js delete mode 100644 node_modules/lodash/fp/bindKey.js delete mode 100644 node_modules/lodash/fp/camelCase.js delete mode 100644 node_modules/lodash/fp/capitalize.js delete mode 100644 node_modules/lodash/fp/castArray.js delete mode 100644 node_modules/lodash/fp/ceil.js delete mode 100644 node_modules/lodash/fp/chain.js delete mode 100644 node_modules/lodash/fp/chunk.js delete mode 100644 node_modules/lodash/fp/clamp.js delete mode 100644 node_modules/lodash/fp/clone.js delete mode 100644 node_modules/lodash/fp/cloneDeep.js delete mode 100644 node_modules/lodash/fp/cloneDeepWith.js delete mode 100644 node_modules/lodash/fp/cloneWith.js delete mode 100644 node_modules/lodash/fp/collection.js delete mode 100644 node_modules/lodash/fp/commit.js delete mode 100644 node_modules/lodash/fp/compact.js delete mode 100644 node_modules/lodash/fp/complement.js delete mode 100644 node_modules/lodash/fp/compose.js delete mode 100644 node_modules/lodash/fp/concat.js delete mode 100644 node_modules/lodash/fp/cond.js delete mode 100644 node_modules/lodash/fp/conforms.js delete mode 100644 node_modules/lodash/fp/conformsTo.js delete mode 100644 node_modules/lodash/fp/constant.js delete mode 100644 node_modules/lodash/fp/contains.js delete mode 100644 node_modules/lodash/fp/convert.js delete mode 100644 node_modules/lodash/fp/countBy.js delete mode 100644 node_modules/lodash/fp/create.js delete mode 100644 node_modules/lodash/fp/curry.js delete mode 100644 node_modules/lodash/fp/curryN.js delete mode 100644 node_modules/lodash/fp/curryRight.js delete mode 100644 node_modules/lodash/fp/curryRightN.js delete mode 100644 node_modules/lodash/fp/date.js delete mode 100644 node_modules/lodash/fp/debounce.js delete mode 100644 node_modules/lodash/fp/deburr.js delete mode 100644 node_modules/lodash/fp/defaultTo.js delete mode 100644 node_modules/lodash/fp/defaults.js delete mode 100644 node_modules/lodash/fp/defaultsAll.js delete mode 100644 node_modules/lodash/fp/defaultsDeep.js delete mode 100644 node_modules/lodash/fp/defaultsDeepAll.js delete mode 100644 node_modules/lodash/fp/defer.js delete mode 100644 node_modules/lodash/fp/delay.js delete mode 100644 node_modules/lodash/fp/difference.js delete mode 100644 node_modules/lodash/fp/differenceBy.js delete mode 100644 node_modules/lodash/fp/differenceWith.js delete mode 100644 node_modules/lodash/fp/dissoc.js delete mode 100644 node_modules/lodash/fp/dissocPath.js delete mode 100644 node_modules/lodash/fp/divide.js delete mode 100644 node_modules/lodash/fp/drop.js delete mode 100644 node_modules/lodash/fp/dropLast.js delete mode 100644 node_modules/lodash/fp/dropLastWhile.js delete mode 100644 node_modules/lodash/fp/dropRight.js delete mode 100644 node_modules/lodash/fp/dropRightWhile.js delete mode 100644 node_modules/lodash/fp/dropWhile.js delete mode 100644 node_modules/lodash/fp/each.js delete mode 100644 node_modules/lodash/fp/eachRight.js delete mode 100644 node_modules/lodash/fp/endsWith.js delete mode 100644 node_modules/lodash/fp/entries.js delete mode 100644 node_modules/lodash/fp/entriesIn.js delete mode 100644 node_modules/lodash/fp/eq.js delete mode 100644 node_modules/lodash/fp/equals.js delete mode 100644 node_modules/lodash/fp/escape.js delete mode 100644 node_modules/lodash/fp/escapeRegExp.js delete mode 100644 node_modules/lodash/fp/every.js delete mode 100644 node_modules/lodash/fp/extend.js delete mode 100644 node_modules/lodash/fp/extendAll.js delete mode 100644 node_modules/lodash/fp/extendAllWith.js delete mode 100644 node_modules/lodash/fp/extendWith.js delete mode 100644 node_modules/lodash/fp/fill.js delete mode 100644 node_modules/lodash/fp/filter.js delete mode 100644 node_modules/lodash/fp/find.js delete mode 100644 node_modules/lodash/fp/findFrom.js delete mode 100644 node_modules/lodash/fp/findIndex.js delete mode 100644 node_modules/lodash/fp/findIndexFrom.js delete mode 100644 node_modules/lodash/fp/findKey.js delete mode 100644 node_modules/lodash/fp/findLast.js delete mode 100644 node_modules/lodash/fp/findLastFrom.js delete mode 100644 node_modules/lodash/fp/findLastIndex.js delete mode 100644 node_modules/lodash/fp/findLastIndexFrom.js delete mode 100644 node_modules/lodash/fp/findLastKey.js delete mode 100644 node_modules/lodash/fp/first.js delete mode 100644 node_modules/lodash/fp/flatMap.js delete mode 100644 node_modules/lodash/fp/flatMapDeep.js delete mode 100644 node_modules/lodash/fp/flatMapDepth.js delete mode 100644 node_modules/lodash/fp/flatten.js delete mode 100644 node_modules/lodash/fp/flattenDeep.js delete mode 100644 node_modules/lodash/fp/flattenDepth.js delete mode 100644 node_modules/lodash/fp/flip.js delete mode 100644 node_modules/lodash/fp/floor.js delete mode 100644 node_modules/lodash/fp/flow.js delete mode 100644 node_modules/lodash/fp/flowRight.js delete mode 100644 node_modules/lodash/fp/forEach.js delete mode 100644 node_modules/lodash/fp/forEachRight.js delete mode 100644 node_modules/lodash/fp/forIn.js delete mode 100644 node_modules/lodash/fp/forInRight.js delete mode 100644 node_modules/lodash/fp/forOwn.js delete mode 100644 node_modules/lodash/fp/forOwnRight.js delete mode 100644 node_modules/lodash/fp/fromPairs.js delete mode 100644 node_modules/lodash/fp/function.js delete mode 100644 node_modules/lodash/fp/functions.js delete mode 100644 node_modules/lodash/fp/functionsIn.js delete mode 100644 node_modules/lodash/fp/get.js delete mode 100644 node_modules/lodash/fp/getOr.js delete mode 100644 node_modules/lodash/fp/groupBy.js delete mode 100644 node_modules/lodash/fp/gt.js delete mode 100644 node_modules/lodash/fp/gte.js delete mode 100644 node_modules/lodash/fp/has.js delete mode 100644 node_modules/lodash/fp/hasIn.js delete mode 100644 node_modules/lodash/fp/head.js delete mode 100644 node_modules/lodash/fp/identical.js delete mode 100644 node_modules/lodash/fp/identity.js delete mode 100644 node_modules/lodash/fp/inRange.js delete mode 100644 node_modules/lodash/fp/includes.js delete mode 100644 node_modules/lodash/fp/includesFrom.js delete mode 100644 node_modules/lodash/fp/indexBy.js delete mode 100644 node_modules/lodash/fp/indexOf.js delete mode 100644 node_modules/lodash/fp/indexOfFrom.js delete mode 100644 node_modules/lodash/fp/init.js delete mode 100644 node_modules/lodash/fp/initial.js delete mode 100644 node_modules/lodash/fp/intersection.js delete mode 100644 node_modules/lodash/fp/intersectionBy.js delete mode 100644 node_modules/lodash/fp/intersectionWith.js delete mode 100644 node_modules/lodash/fp/invert.js delete mode 100644 node_modules/lodash/fp/invertBy.js delete mode 100644 node_modules/lodash/fp/invertObj.js delete mode 100644 node_modules/lodash/fp/invoke.js delete mode 100644 node_modules/lodash/fp/invokeArgs.js delete mode 100644 node_modules/lodash/fp/invokeArgsMap.js delete mode 100644 node_modules/lodash/fp/invokeMap.js delete mode 100644 node_modules/lodash/fp/isArguments.js delete mode 100644 node_modules/lodash/fp/isArray.js delete mode 100644 node_modules/lodash/fp/isArrayBuffer.js delete mode 100644 node_modules/lodash/fp/isArrayLike.js delete mode 100644 node_modules/lodash/fp/isArrayLikeObject.js delete mode 100644 node_modules/lodash/fp/isBoolean.js delete mode 100644 node_modules/lodash/fp/isBuffer.js delete mode 100644 node_modules/lodash/fp/isDate.js delete mode 100644 node_modules/lodash/fp/isElement.js delete mode 100644 node_modules/lodash/fp/isEmpty.js delete mode 100644 node_modules/lodash/fp/isEqual.js delete mode 100644 node_modules/lodash/fp/isEqualWith.js delete mode 100644 node_modules/lodash/fp/isError.js delete mode 100644 node_modules/lodash/fp/isFinite.js delete mode 100644 node_modules/lodash/fp/isFunction.js delete mode 100644 node_modules/lodash/fp/isInteger.js delete mode 100644 node_modules/lodash/fp/isLength.js delete mode 100644 node_modules/lodash/fp/isMap.js delete mode 100644 node_modules/lodash/fp/isMatch.js delete mode 100644 node_modules/lodash/fp/isMatchWith.js delete mode 100644 node_modules/lodash/fp/isNaN.js delete mode 100644 node_modules/lodash/fp/isNative.js delete mode 100644 node_modules/lodash/fp/isNil.js delete mode 100644 node_modules/lodash/fp/isNull.js delete mode 100644 node_modules/lodash/fp/isNumber.js delete mode 100644 node_modules/lodash/fp/isObject.js delete mode 100644 node_modules/lodash/fp/isObjectLike.js delete mode 100644 node_modules/lodash/fp/isPlainObject.js delete mode 100644 node_modules/lodash/fp/isRegExp.js delete mode 100644 node_modules/lodash/fp/isSafeInteger.js delete mode 100644 node_modules/lodash/fp/isSet.js delete mode 100644 node_modules/lodash/fp/isString.js delete mode 100644 node_modules/lodash/fp/isSymbol.js delete mode 100644 node_modules/lodash/fp/isTypedArray.js delete mode 100644 node_modules/lodash/fp/isUndefined.js delete mode 100644 node_modules/lodash/fp/isWeakMap.js delete mode 100644 node_modules/lodash/fp/isWeakSet.js delete mode 100644 node_modules/lodash/fp/iteratee.js delete mode 100644 node_modules/lodash/fp/join.js delete mode 100644 node_modules/lodash/fp/juxt.js delete mode 100644 node_modules/lodash/fp/kebabCase.js delete mode 100644 node_modules/lodash/fp/keyBy.js delete mode 100644 node_modules/lodash/fp/keys.js delete mode 100644 node_modules/lodash/fp/keysIn.js delete mode 100644 node_modules/lodash/fp/lang.js delete mode 100644 node_modules/lodash/fp/last.js delete mode 100644 node_modules/lodash/fp/lastIndexOf.js delete mode 100644 node_modules/lodash/fp/lastIndexOfFrom.js delete mode 100644 node_modules/lodash/fp/lowerCase.js delete mode 100644 node_modules/lodash/fp/lowerFirst.js delete mode 100644 node_modules/lodash/fp/lt.js delete mode 100644 node_modules/lodash/fp/lte.js delete mode 100644 node_modules/lodash/fp/map.js delete mode 100644 node_modules/lodash/fp/mapKeys.js delete mode 100644 node_modules/lodash/fp/mapValues.js delete mode 100644 node_modules/lodash/fp/matches.js delete mode 100644 node_modules/lodash/fp/matchesProperty.js delete mode 100644 node_modules/lodash/fp/math.js delete mode 100644 node_modules/lodash/fp/max.js delete mode 100644 node_modules/lodash/fp/maxBy.js delete mode 100644 node_modules/lodash/fp/mean.js delete mode 100644 node_modules/lodash/fp/meanBy.js delete mode 100644 node_modules/lodash/fp/memoize.js delete mode 100644 node_modules/lodash/fp/merge.js delete mode 100644 node_modules/lodash/fp/mergeAll.js delete mode 100644 node_modules/lodash/fp/mergeAllWith.js delete mode 100644 node_modules/lodash/fp/mergeWith.js delete mode 100644 node_modules/lodash/fp/method.js delete mode 100644 node_modules/lodash/fp/methodOf.js delete mode 100644 node_modules/lodash/fp/min.js delete mode 100644 node_modules/lodash/fp/minBy.js delete mode 100644 node_modules/lodash/fp/mixin.js delete mode 100644 node_modules/lodash/fp/multiply.js delete mode 100644 node_modules/lodash/fp/nAry.js delete mode 100644 node_modules/lodash/fp/negate.js delete mode 100644 node_modules/lodash/fp/next.js delete mode 100644 node_modules/lodash/fp/noop.js delete mode 100644 node_modules/lodash/fp/now.js delete mode 100644 node_modules/lodash/fp/nth.js delete mode 100644 node_modules/lodash/fp/nthArg.js delete mode 100644 node_modules/lodash/fp/number.js delete mode 100644 node_modules/lodash/fp/object.js delete mode 100644 node_modules/lodash/fp/omit.js delete mode 100644 node_modules/lodash/fp/omitAll.js delete mode 100644 node_modules/lodash/fp/omitBy.js delete mode 100644 node_modules/lodash/fp/once.js delete mode 100644 node_modules/lodash/fp/orderBy.js delete mode 100644 node_modules/lodash/fp/over.js delete mode 100644 node_modules/lodash/fp/overArgs.js delete mode 100644 node_modules/lodash/fp/overEvery.js delete mode 100644 node_modules/lodash/fp/overSome.js delete mode 100644 node_modules/lodash/fp/pad.js delete mode 100644 node_modules/lodash/fp/padChars.js delete mode 100644 node_modules/lodash/fp/padCharsEnd.js delete mode 100644 node_modules/lodash/fp/padCharsStart.js delete mode 100644 node_modules/lodash/fp/padEnd.js delete mode 100644 node_modules/lodash/fp/padStart.js delete mode 100644 node_modules/lodash/fp/parseInt.js delete mode 100644 node_modules/lodash/fp/partial.js delete mode 100644 node_modules/lodash/fp/partialRight.js delete mode 100644 node_modules/lodash/fp/partition.js delete mode 100644 node_modules/lodash/fp/path.js delete mode 100644 node_modules/lodash/fp/pathEq.js delete mode 100644 node_modules/lodash/fp/pathOr.js delete mode 100644 node_modules/lodash/fp/paths.js delete mode 100644 node_modules/lodash/fp/pick.js delete mode 100644 node_modules/lodash/fp/pickAll.js delete mode 100644 node_modules/lodash/fp/pickBy.js delete mode 100644 node_modules/lodash/fp/pipe.js delete mode 100644 node_modules/lodash/fp/placeholder.js delete mode 100644 node_modules/lodash/fp/plant.js delete mode 100644 node_modules/lodash/fp/pluck.js delete mode 100644 node_modules/lodash/fp/prop.js delete mode 100644 node_modules/lodash/fp/propEq.js delete mode 100644 node_modules/lodash/fp/propOr.js delete mode 100644 node_modules/lodash/fp/property.js delete mode 100644 node_modules/lodash/fp/propertyOf.js delete mode 100644 node_modules/lodash/fp/props.js delete mode 100644 node_modules/lodash/fp/pull.js delete mode 100644 node_modules/lodash/fp/pullAll.js delete mode 100644 node_modules/lodash/fp/pullAllBy.js delete mode 100644 node_modules/lodash/fp/pullAllWith.js delete mode 100644 node_modules/lodash/fp/pullAt.js delete mode 100644 node_modules/lodash/fp/random.js delete mode 100644 node_modules/lodash/fp/range.js delete mode 100644 node_modules/lodash/fp/rangeRight.js delete mode 100644 node_modules/lodash/fp/rangeStep.js delete mode 100644 node_modules/lodash/fp/rangeStepRight.js delete mode 100644 node_modules/lodash/fp/rearg.js delete mode 100644 node_modules/lodash/fp/reduce.js delete mode 100644 node_modules/lodash/fp/reduceRight.js delete mode 100644 node_modules/lodash/fp/reject.js delete mode 100644 node_modules/lodash/fp/remove.js delete mode 100644 node_modules/lodash/fp/repeat.js delete mode 100644 node_modules/lodash/fp/replace.js delete mode 100644 node_modules/lodash/fp/rest.js delete mode 100644 node_modules/lodash/fp/restFrom.js delete mode 100644 node_modules/lodash/fp/result.js delete mode 100644 node_modules/lodash/fp/reverse.js delete mode 100644 node_modules/lodash/fp/round.js delete mode 100644 node_modules/lodash/fp/sample.js delete mode 100644 node_modules/lodash/fp/sampleSize.js delete mode 100644 node_modules/lodash/fp/seq.js delete mode 100644 node_modules/lodash/fp/set.js delete mode 100644 node_modules/lodash/fp/setWith.js delete mode 100644 node_modules/lodash/fp/shuffle.js delete mode 100644 node_modules/lodash/fp/size.js delete mode 100644 node_modules/lodash/fp/slice.js delete mode 100644 node_modules/lodash/fp/snakeCase.js delete mode 100644 node_modules/lodash/fp/some.js delete mode 100644 node_modules/lodash/fp/sortBy.js delete mode 100644 node_modules/lodash/fp/sortedIndex.js delete mode 100644 node_modules/lodash/fp/sortedIndexBy.js delete mode 100644 node_modules/lodash/fp/sortedIndexOf.js delete mode 100644 node_modules/lodash/fp/sortedLastIndex.js delete mode 100644 node_modules/lodash/fp/sortedLastIndexBy.js delete mode 100644 node_modules/lodash/fp/sortedLastIndexOf.js delete mode 100644 node_modules/lodash/fp/sortedUniq.js delete mode 100644 node_modules/lodash/fp/sortedUniqBy.js delete mode 100644 node_modules/lodash/fp/split.js delete mode 100644 node_modules/lodash/fp/spread.js delete mode 100644 node_modules/lodash/fp/spreadFrom.js delete mode 100644 node_modules/lodash/fp/startCase.js delete mode 100644 node_modules/lodash/fp/startsWith.js delete mode 100644 node_modules/lodash/fp/string.js delete mode 100644 node_modules/lodash/fp/stubArray.js delete mode 100644 node_modules/lodash/fp/stubFalse.js delete mode 100644 node_modules/lodash/fp/stubObject.js delete mode 100644 node_modules/lodash/fp/stubString.js delete mode 100644 node_modules/lodash/fp/stubTrue.js delete mode 100644 node_modules/lodash/fp/subtract.js delete mode 100644 node_modules/lodash/fp/sum.js delete mode 100644 node_modules/lodash/fp/sumBy.js delete mode 100644 node_modules/lodash/fp/symmetricDifference.js delete mode 100644 node_modules/lodash/fp/symmetricDifferenceBy.js delete mode 100644 node_modules/lodash/fp/symmetricDifferenceWith.js delete mode 100644 node_modules/lodash/fp/tail.js delete mode 100644 node_modules/lodash/fp/take.js delete mode 100644 node_modules/lodash/fp/takeLast.js delete mode 100644 node_modules/lodash/fp/takeLastWhile.js delete mode 100644 node_modules/lodash/fp/takeRight.js delete mode 100644 node_modules/lodash/fp/takeRightWhile.js delete mode 100644 node_modules/lodash/fp/takeWhile.js delete mode 100644 node_modules/lodash/fp/tap.js delete mode 100644 node_modules/lodash/fp/template.js delete mode 100644 node_modules/lodash/fp/templateSettings.js delete mode 100644 node_modules/lodash/fp/throttle.js delete mode 100644 node_modules/lodash/fp/thru.js delete mode 100644 node_modules/lodash/fp/times.js delete mode 100644 node_modules/lodash/fp/toArray.js delete mode 100644 node_modules/lodash/fp/toFinite.js delete mode 100644 node_modules/lodash/fp/toInteger.js delete mode 100644 node_modules/lodash/fp/toIterator.js delete mode 100644 node_modules/lodash/fp/toJSON.js delete mode 100644 node_modules/lodash/fp/toLength.js delete mode 100644 node_modules/lodash/fp/toLower.js delete mode 100644 node_modules/lodash/fp/toNumber.js delete mode 100644 node_modules/lodash/fp/toPairs.js delete mode 100644 node_modules/lodash/fp/toPairsIn.js delete mode 100644 node_modules/lodash/fp/toPath.js delete mode 100644 node_modules/lodash/fp/toPlainObject.js delete mode 100644 node_modules/lodash/fp/toSafeInteger.js delete mode 100644 node_modules/lodash/fp/toString.js delete mode 100644 node_modules/lodash/fp/toUpper.js delete mode 100644 node_modules/lodash/fp/transform.js delete mode 100644 node_modules/lodash/fp/trim.js delete mode 100644 node_modules/lodash/fp/trimChars.js delete mode 100644 node_modules/lodash/fp/trimCharsEnd.js delete mode 100644 node_modules/lodash/fp/trimCharsStart.js delete mode 100644 node_modules/lodash/fp/trimEnd.js delete mode 100644 node_modules/lodash/fp/trimStart.js delete mode 100644 node_modules/lodash/fp/truncate.js delete mode 100644 node_modules/lodash/fp/unapply.js delete mode 100644 node_modules/lodash/fp/unary.js delete mode 100644 node_modules/lodash/fp/unescape.js delete mode 100644 node_modules/lodash/fp/union.js delete mode 100644 node_modules/lodash/fp/unionBy.js delete mode 100644 node_modules/lodash/fp/unionWith.js delete mode 100644 node_modules/lodash/fp/uniq.js delete mode 100644 node_modules/lodash/fp/uniqBy.js delete mode 100644 node_modules/lodash/fp/uniqWith.js delete mode 100644 node_modules/lodash/fp/uniqueId.js delete mode 100644 node_modules/lodash/fp/unnest.js delete mode 100644 node_modules/lodash/fp/unset.js delete mode 100644 node_modules/lodash/fp/unzip.js delete mode 100644 node_modules/lodash/fp/unzipWith.js delete mode 100644 node_modules/lodash/fp/update.js delete mode 100644 node_modules/lodash/fp/updateWith.js delete mode 100644 node_modules/lodash/fp/upperCase.js delete mode 100644 node_modules/lodash/fp/upperFirst.js delete mode 100644 node_modules/lodash/fp/useWith.js delete mode 100644 node_modules/lodash/fp/util.js delete mode 100644 node_modules/lodash/fp/value.js delete mode 100644 node_modules/lodash/fp/valueOf.js delete mode 100644 node_modules/lodash/fp/values.js delete mode 100644 node_modules/lodash/fp/valuesIn.js delete mode 100644 node_modules/lodash/fp/where.js delete mode 100644 node_modules/lodash/fp/whereEq.js delete mode 100644 node_modules/lodash/fp/without.js delete mode 100644 node_modules/lodash/fp/words.js delete mode 100644 node_modules/lodash/fp/wrap.js delete mode 100644 node_modules/lodash/fp/wrapperAt.js delete mode 100644 node_modules/lodash/fp/wrapperChain.js delete mode 100644 node_modules/lodash/fp/wrapperLodash.js delete mode 100644 node_modules/lodash/fp/wrapperReverse.js delete mode 100644 node_modules/lodash/fp/wrapperValue.js delete mode 100644 node_modules/lodash/fp/xor.js delete mode 100644 node_modules/lodash/fp/xorBy.js delete mode 100644 node_modules/lodash/fp/xorWith.js delete mode 100644 node_modules/lodash/fp/zip.js delete mode 100644 node_modules/lodash/fp/zipAll.js delete mode 100644 node_modules/lodash/fp/zipObj.js delete mode 100644 node_modules/lodash/fp/zipObject.js delete mode 100644 node_modules/lodash/fp/zipObjectDeep.js delete mode 100644 node_modules/lodash/fp/zipWith.js delete mode 100644 node_modules/lodash/fromPairs.js delete mode 100644 node_modules/lodash/function.js delete mode 100644 node_modules/lodash/functions.js delete mode 100644 node_modules/lodash/functionsIn.js delete mode 100644 node_modules/lodash/get.js delete mode 100644 node_modules/lodash/groupBy.js delete mode 100644 node_modules/lodash/gt.js delete mode 100644 node_modules/lodash/gte.js delete mode 100644 node_modules/lodash/has.js delete mode 100644 node_modules/lodash/hasIn.js delete mode 100644 node_modules/lodash/head.js delete mode 100644 node_modules/lodash/identity.js delete mode 100644 node_modules/lodash/inRange.js delete mode 100644 node_modules/lodash/includes.js delete mode 100644 node_modules/lodash/index.js delete mode 100644 node_modules/lodash/indexOf.js delete mode 100644 node_modules/lodash/initial.js delete mode 100644 node_modules/lodash/intersection.js delete mode 100644 node_modules/lodash/intersectionBy.js delete mode 100644 node_modules/lodash/intersectionWith.js delete mode 100644 node_modules/lodash/invert.js delete mode 100644 node_modules/lodash/invertBy.js delete mode 100644 node_modules/lodash/invoke.js delete mode 100644 node_modules/lodash/invokeMap.js delete mode 100644 node_modules/lodash/isArguments.js delete mode 100644 node_modules/lodash/isArray.js delete mode 100644 node_modules/lodash/isArrayBuffer.js delete mode 100644 node_modules/lodash/isArrayLike.js delete mode 100644 node_modules/lodash/isArrayLikeObject.js delete mode 100644 node_modules/lodash/isBoolean.js delete mode 100644 node_modules/lodash/isBuffer.js delete mode 100644 node_modules/lodash/isDate.js delete mode 100644 node_modules/lodash/isElement.js delete mode 100644 node_modules/lodash/isEmpty.js delete mode 100644 node_modules/lodash/isEqual.js delete mode 100644 node_modules/lodash/isEqualWith.js delete mode 100644 node_modules/lodash/isError.js delete mode 100644 node_modules/lodash/isFinite.js delete mode 100644 node_modules/lodash/isFunction.js delete mode 100644 node_modules/lodash/isInteger.js delete mode 100644 node_modules/lodash/isLength.js delete mode 100644 node_modules/lodash/isMap.js delete mode 100644 node_modules/lodash/isMatch.js delete mode 100644 node_modules/lodash/isMatchWith.js delete mode 100644 node_modules/lodash/isNaN.js delete mode 100644 node_modules/lodash/isNative.js delete mode 100644 node_modules/lodash/isNil.js delete mode 100644 node_modules/lodash/isNull.js delete mode 100644 node_modules/lodash/isNumber.js delete mode 100644 node_modules/lodash/isObject.js delete mode 100644 node_modules/lodash/isObjectLike.js delete mode 100644 node_modules/lodash/isPlainObject.js delete mode 100644 node_modules/lodash/isRegExp.js delete mode 100644 node_modules/lodash/isSafeInteger.js delete mode 100644 node_modules/lodash/isSet.js delete mode 100644 node_modules/lodash/isString.js delete mode 100644 node_modules/lodash/isSymbol.js delete mode 100644 node_modules/lodash/isTypedArray.js delete mode 100644 node_modules/lodash/isUndefined.js delete mode 100644 node_modules/lodash/isWeakMap.js delete mode 100644 node_modules/lodash/isWeakSet.js delete mode 100644 node_modules/lodash/iteratee.js delete mode 100644 node_modules/lodash/join.js delete mode 100644 node_modules/lodash/kebabCase.js delete mode 100644 node_modules/lodash/keyBy.js delete mode 100644 node_modules/lodash/keys.js delete mode 100644 node_modules/lodash/keysIn.js delete mode 100644 node_modules/lodash/lang.js delete mode 100644 node_modules/lodash/last.js delete mode 100644 node_modules/lodash/lastIndexOf.js delete mode 100644 node_modules/lodash/lodash.js delete mode 100644 node_modules/lodash/lodash.min.js delete mode 100644 node_modules/lodash/lowerCase.js delete mode 100644 node_modules/lodash/lowerFirst.js delete mode 100644 node_modules/lodash/lt.js delete mode 100644 node_modules/lodash/lte.js delete mode 100644 node_modules/lodash/map.js delete mode 100644 node_modules/lodash/mapKeys.js delete mode 100644 node_modules/lodash/mapValues.js delete mode 100644 node_modules/lodash/matches.js delete mode 100644 node_modules/lodash/matchesProperty.js delete mode 100644 node_modules/lodash/math.js delete mode 100644 node_modules/lodash/max.js delete mode 100644 node_modules/lodash/maxBy.js delete mode 100644 node_modules/lodash/mean.js delete mode 100644 node_modules/lodash/meanBy.js delete mode 100644 node_modules/lodash/memoize.js delete mode 100644 node_modules/lodash/merge.js delete mode 100644 node_modules/lodash/mergeWith.js delete mode 100644 node_modules/lodash/method.js delete mode 100644 node_modules/lodash/methodOf.js delete mode 100644 node_modules/lodash/min.js delete mode 100644 node_modules/lodash/minBy.js delete mode 100644 node_modules/lodash/mixin.js delete mode 100644 node_modules/lodash/multiply.js delete mode 100644 node_modules/lodash/negate.js delete mode 100644 node_modules/lodash/next.js delete mode 100644 node_modules/lodash/noop.js delete mode 100644 node_modules/lodash/now.js delete mode 100644 node_modules/lodash/nth.js delete mode 100644 node_modules/lodash/nthArg.js delete mode 100644 node_modules/lodash/number.js delete mode 100644 node_modules/lodash/object.js delete mode 100644 node_modules/lodash/omit.js delete mode 100644 node_modules/lodash/omitBy.js delete mode 100644 node_modules/lodash/once.js delete mode 100644 node_modules/lodash/orderBy.js delete mode 100644 node_modules/lodash/over.js delete mode 100644 node_modules/lodash/overArgs.js delete mode 100644 node_modules/lodash/overEvery.js delete mode 100644 node_modules/lodash/overSome.js delete mode 100644 node_modules/lodash/package.json delete mode 100644 node_modules/lodash/pad.js delete mode 100644 node_modules/lodash/padEnd.js delete mode 100644 node_modules/lodash/padStart.js delete mode 100644 node_modules/lodash/parseInt.js delete mode 100644 node_modules/lodash/partial.js delete mode 100644 node_modules/lodash/partialRight.js delete mode 100644 node_modules/lodash/partition.js delete mode 100644 node_modules/lodash/pick.js delete mode 100644 node_modules/lodash/pickBy.js delete mode 100644 node_modules/lodash/plant.js delete mode 100644 node_modules/lodash/property.js delete mode 100644 node_modules/lodash/propertyOf.js delete mode 100644 node_modules/lodash/pull.js delete mode 100644 node_modules/lodash/pullAll.js delete mode 100644 node_modules/lodash/pullAllBy.js delete mode 100644 node_modules/lodash/pullAllWith.js delete mode 100644 node_modules/lodash/pullAt.js delete mode 100644 node_modules/lodash/random.js delete mode 100644 node_modules/lodash/range.js delete mode 100644 node_modules/lodash/rangeRight.js delete mode 100644 node_modules/lodash/rearg.js delete mode 100644 node_modules/lodash/reduce.js delete mode 100644 node_modules/lodash/reduceRight.js delete mode 100644 node_modules/lodash/reject.js delete mode 100644 node_modules/lodash/remove.js delete mode 100644 node_modules/lodash/repeat.js delete mode 100644 node_modules/lodash/replace.js delete mode 100644 node_modules/lodash/rest.js delete mode 100644 node_modules/lodash/result.js delete mode 100644 node_modules/lodash/reverse.js delete mode 100644 node_modules/lodash/round.js delete mode 100644 node_modules/lodash/sample.js delete mode 100644 node_modules/lodash/sampleSize.js delete mode 100644 node_modules/lodash/seq.js delete mode 100644 node_modules/lodash/set.js delete mode 100644 node_modules/lodash/setWith.js delete mode 100644 node_modules/lodash/shuffle.js delete mode 100644 node_modules/lodash/size.js delete mode 100644 node_modules/lodash/slice.js delete mode 100644 node_modules/lodash/snakeCase.js delete mode 100644 node_modules/lodash/some.js delete mode 100644 node_modules/lodash/sortBy.js delete mode 100644 node_modules/lodash/sortedIndex.js delete mode 100644 node_modules/lodash/sortedIndexBy.js delete mode 100644 node_modules/lodash/sortedIndexOf.js delete mode 100644 node_modules/lodash/sortedLastIndex.js delete mode 100644 node_modules/lodash/sortedLastIndexBy.js delete mode 100644 node_modules/lodash/sortedLastIndexOf.js delete mode 100644 node_modules/lodash/sortedUniq.js delete mode 100644 node_modules/lodash/sortedUniqBy.js delete mode 100644 node_modules/lodash/split.js delete mode 100644 node_modules/lodash/spread.js delete mode 100644 node_modules/lodash/startCase.js delete mode 100644 node_modules/lodash/startsWith.js delete mode 100644 node_modules/lodash/string.js delete mode 100644 node_modules/lodash/stubArray.js delete mode 100644 node_modules/lodash/stubFalse.js delete mode 100644 node_modules/lodash/stubObject.js delete mode 100644 node_modules/lodash/stubString.js delete mode 100644 node_modules/lodash/stubTrue.js delete mode 100644 node_modules/lodash/subtract.js delete mode 100644 node_modules/lodash/sum.js delete mode 100644 node_modules/lodash/sumBy.js delete mode 100644 node_modules/lodash/tail.js delete mode 100644 node_modules/lodash/take.js delete mode 100644 node_modules/lodash/takeRight.js delete mode 100644 node_modules/lodash/takeRightWhile.js delete mode 100644 node_modules/lodash/takeWhile.js delete mode 100644 node_modules/lodash/tap.js delete mode 100644 node_modules/lodash/template.js delete mode 100644 node_modules/lodash/templateSettings.js delete mode 100644 node_modules/lodash/throttle.js delete mode 100644 node_modules/lodash/thru.js delete mode 100644 node_modules/lodash/times.js delete mode 100644 node_modules/lodash/toArray.js delete mode 100644 node_modules/lodash/toFinite.js delete mode 100644 node_modules/lodash/toInteger.js delete mode 100644 node_modules/lodash/toIterator.js delete mode 100644 node_modules/lodash/toJSON.js delete mode 100644 node_modules/lodash/toLength.js delete mode 100644 node_modules/lodash/toLower.js delete mode 100644 node_modules/lodash/toNumber.js delete mode 100644 node_modules/lodash/toPairs.js delete mode 100644 node_modules/lodash/toPairsIn.js delete mode 100644 node_modules/lodash/toPath.js delete mode 100644 node_modules/lodash/toPlainObject.js delete mode 100644 node_modules/lodash/toSafeInteger.js delete mode 100644 node_modules/lodash/toString.js delete mode 100644 node_modules/lodash/toUpper.js delete mode 100644 node_modules/lodash/transform.js delete mode 100644 node_modules/lodash/trim.js delete mode 100644 node_modules/lodash/trimEnd.js delete mode 100644 node_modules/lodash/trimStart.js delete mode 100644 node_modules/lodash/truncate.js delete mode 100644 node_modules/lodash/unary.js delete mode 100644 node_modules/lodash/unescape.js delete mode 100644 node_modules/lodash/union.js delete mode 100644 node_modules/lodash/unionBy.js delete mode 100644 node_modules/lodash/unionWith.js delete mode 100644 node_modules/lodash/uniq.js delete mode 100644 node_modules/lodash/uniqBy.js delete mode 100644 node_modules/lodash/uniqWith.js delete mode 100644 node_modules/lodash/uniqueId.js delete mode 100644 node_modules/lodash/unset.js delete mode 100644 node_modules/lodash/unzip.js delete mode 100644 node_modules/lodash/unzipWith.js delete mode 100644 node_modules/lodash/update.js delete mode 100644 node_modules/lodash/updateWith.js delete mode 100644 node_modules/lodash/upperCase.js delete mode 100644 node_modules/lodash/upperFirst.js delete mode 100644 node_modules/lodash/util.js delete mode 100644 node_modules/lodash/value.js delete mode 100644 node_modules/lodash/valueOf.js delete mode 100644 node_modules/lodash/values.js delete mode 100644 node_modules/lodash/valuesIn.js delete mode 100644 node_modules/lodash/without.js delete mode 100644 node_modules/lodash/words.js delete mode 100644 node_modules/lodash/wrap.js delete mode 100644 node_modules/lodash/wrapperAt.js delete mode 100644 node_modules/lodash/wrapperChain.js delete mode 100644 node_modules/lodash/wrapperLodash.js delete mode 100644 node_modules/lodash/wrapperReverse.js delete mode 100644 node_modules/lodash/wrapperValue.js delete mode 100644 node_modules/lodash/xor.js delete mode 100644 node_modules/lodash/xorBy.js delete mode 100644 node_modules/lodash/xorWith.js delete mode 100644 node_modules/lodash/zip.js delete mode 100644 node_modules/lodash/zipObject.js delete mode 100644 node_modules/lodash/zipObjectDeep.js delete mode 100644 node_modules/lodash/zipWith.js delete mode 100644 node_modules/loose-envify/LICENSE delete mode 100644 node_modules/loose-envify/README.md delete mode 100644 node_modules/loose-envify/cli.js delete mode 100644 node_modules/loose-envify/custom.js delete mode 100644 node_modules/loose-envify/index.js delete mode 100644 node_modules/loose-envify/loose-envify.js delete mode 100644 node_modules/loose-envify/package.json delete mode 100644 node_modules/loose-envify/replace.js delete mode 100644 node_modules/make-dir/index.d.ts delete mode 100644 node_modules/make-dir/index.js delete mode 100644 node_modules/make-dir/license delete mode 100644 node_modules/make-dir/node_modules/.bin/semver delete mode 100644 node_modules/make-dir/node_modules/.bin/semver.cmd delete mode 100644 node_modules/make-dir/node_modules/pify/index.js delete mode 100644 node_modules/make-dir/node_modules/pify/license delete mode 100644 node_modules/make-dir/node_modules/pify/package.json delete mode 100644 node_modules/make-dir/node_modules/pify/readme.md delete mode 100644 node_modules/make-dir/node_modules/semver/CHANGELOG.md delete mode 100644 node_modules/make-dir/node_modules/semver/LICENSE delete mode 100644 node_modules/make-dir/node_modules/semver/README.md delete mode 100644 node_modules/make-dir/node_modules/semver/bin/semver delete mode 100644 node_modules/make-dir/node_modules/semver/package.json delete mode 100644 node_modules/make-dir/node_modules/semver/range.bnf delete mode 100644 node_modules/make-dir/node_modules/semver/semver.js delete mode 100644 node_modules/make-dir/package.json delete mode 100644 node_modules/make-dir/readme.md delete mode 100644 node_modules/make-error/LICENSE delete mode 100644 node_modules/make-error/README.md delete mode 100644 node_modules/make-error/dist/make-error.js delete mode 100644 node_modules/make-error/index.d.ts delete mode 100644 node_modules/make-error/index.js delete mode 100644 node_modules/make-error/package.json delete mode 100644 node_modules/makeerror/.travis.yml delete mode 100644 node_modules/makeerror/lib/makeerror.js delete mode 100644 node_modules/makeerror/license delete mode 100644 node_modules/makeerror/package.json delete mode 100644 node_modules/makeerror/readme.md delete mode 100644 node_modules/map-cache/LICENSE delete mode 100644 node_modules/map-cache/README.md delete mode 100644 node_modules/map-cache/index.js delete mode 100644 node_modules/map-cache/package.json delete mode 100644 node_modules/map-visit/LICENSE delete mode 100644 node_modules/map-visit/README.md delete mode 100644 node_modules/map-visit/index.js delete mode 100644 node_modules/map-visit/package.json delete mode 100644 node_modules/merge-stream/LICENSE delete mode 100644 node_modules/merge-stream/README.md delete mode 100644 node_modules/merge-stream/index.js delete mode 100644 node_modules/merge-stream/package.json delete mode 100644 node_modules/micromatch/CHANGELOG.md delete mode 100644 node_modules/micromatch/LICENSE delete mode 100644 node_modules/micromatch/README.md delete mode 100644 node_modules/micromatch/index.js delete mode 100644 node_modules/micromatch/lib/.DS_Store delete mode 100644 node_modules/micromatch/lib/cache.js delete mode 100644 node_modules/micromatch/lib/compilers.js delete mode 100644 node_modules/micromatch/lib/parsers.js delete mode 100644 node_modules/micromatch/lib/utils.js delete mode 100644 node_modules/micromatch/package.json delete mode 100644 node_modules/mime-db/HISTORY.md delete mode 100644 node_modules/mime-db/LICENSE delete mode 100644 node_modules/mime-db/README.md delete mode 100644 node_modules/mime-db/db.json delete mode 100644 node_modules/mime-db/index.js delete mode 100644 node_modules/mime-db/package.json delete mode 100644 node_modules/mime-types/HISTORY.md delete mode 100644 node_modules/mime-types/LICENSE delete mode 100644 node_modules/mime-types/README.md delete mode 100644 node_modules/mime-types/index.js delete mode 100644 node_modules/mime-types/package.json delete mode 100644 node_modules/minimatch/LICENSE delete mode 100644 node_modules/minimatch/README.md delete mode 100644 node_modules/minimatch/minimatch.js delete mode 100644 node_modules/minimatch/package.json delete mode 100644 node_modules/minimist/.travis.yml delete mode 100644 node_modules/minimist/LICENSE delete mode 100644 node_modules/minimist/example/parse.js delete mode 100644 node_modules/minimist/index.js delete mode 100644 node_modules/minimist/package.json delete mode 100644 node_modules/minimist/readme.markdown delete mode 100644 node_modules/minimist/test/all_bool.js delete mode 100644 node_modules/minimist/test/bool.js delete mode 100644 node_modules/minimist/test/dash.js delete mode 100644 node_modules/minimist/test/default_bool.js delete mode 100644 node_modules/minimist/test/dotted.js delete mode 100644 node_modules/minimist/test/kv_short.js delete mode 100644 node_modules/minimist/test/long.js delete mode 100644 node_modules/minimist/test/num.js delete mode 100644 node_modules/minimist/test/parse.js delete mode 100644 node_modules/minimist/test/parse_modified.js delete mode 100644 node_modules/minimist/test/short.js delete mode 100644 node_modules/minimist/test/stop_early.js delete mode 100644 node_modules/minimist/test/unknown.js delete mode 100644 node_modules/minimist/test/whitespace.js delete mode 100644 node_modules/mixin-deep/LICENSE delete mode 100644 node_modules/mixin-deep/README.md delete mode 100644 node_modules/mixin-deep/index.js delete mode 100644 node_modules/mixin-deep/node_modules/is-extendable/LICENSE delete mode 100644 node_modules/mixin-deep/node_modules/is-extendable/README.md delete mode 100644 node_modules/mixin-deep/node_modules/is-extendable/index.d.ts delete mode 100644 node_modules/mixin-deep/node_modules/is-extendable/index.js delete mode 100644 node_modules/mixin-deep/node_modules/is-extendable/package.json delete mode 100644 node_modules/mixin-deep/package.json delete mode 100644 node_modules/mkdirp/.travis.yml delete mode 100644 node_modules/mkdirp/LICENSE delete mode 100644 node_modules/mkdirp/bin/cmd.js delete mode 100644 node_modules/mkdirp/bin/usage.txt delete mode 100644 node_modules/mkdirp/examples/pow.js delete mode 100644 node_modules/mkdirp/index.js delete mode 100644 node_modules/mkdirp/node_modules/minimist/.travis.yml delete mode 100644 node_modules/mkdirp/node_modules/minimist/LICENSE delete mode 100644 node_modules/mkdirp/node_modules/minimist/example/parse.js delete mode 100644 node_modules/mkdirp/node_modules/minimist/index.js delete mode 100644 node_modules/mkdirp/node_modules/minimist/package.json delete mode 100644 node_modules/mkdirp/node_modules/minimist/readme.markdown delete mode 100644 node_modules/mkdirp/node_modules/minimist/test/dash.js delete mode 100644 node_modules/mkdirp/node_modules/minimist/test/default_bool.js delete mode 100644 node_modules/mkdirp/node_modules/minimist/test/dotted.js delete mode 100644 node_modules/mkdirp/node_modules/minimist/test/long.js delete mode 100644 node_modules/mkdirp/node_modules/minimist/test/parse.js delete mode 100644 node_modules/mkdirp/node_modules/minimist/test/parse_modified.js delete mode 100644 node_modules/mkdirp/node_modules/minimist/test/short.js delete mode 100644 node_modules/mkdirp/node_modules/minimist/test/whitespace.js delete mode 100644 node_modules/mkdirp/package.json delete mode 100644 node_modules/mkdirp/readme.markdown delete mode 100644 node_modules/mkdirp/test/chmod.js delete mode 100644 node_modules/mkdirp/test/clobber.js delete mode 100644 node_modules/mkdirp/test/mkdirp.js delete mode 100644 node_modules/mkdirp/test/opts_fs.js delete mode 100644 node_modules/mkdirp/test/opts_fs_sync.js delete mode 100644 node_modules/mkdirp/test/perm.js delete mode 100644 node_modules/mkdirp/test/perm_sync.js delete mode 100644 node_modules/mkdirp/test/race.js delete mode 100644 node_modules/mkdirp/test/rel.js delete mode 100644 node_modules/mkdirp/test/return.js delete mode 100644 node_modules/mkdirp/test/return_sync.js delete mode 100644 node_modules/mkdirp/test/root.js delete mode 100644 node_modules/mkdirp/test/sync.js delete mode 100644 node_modules/mkdirp/test/umask.js delete mode 100644 node_modules/mkdirp/test/umask_sync.js delete mode 100644 node_modules/ms/index.js delete mode 100644 node_modules/ms/license.md delete mode 100644 node_modules/ms/package.json delete mode 100644 node_modules/ms/readme.md delete mode 100644 node_modules/nanomatch/CHANGELOG.md delete mode 100644 node_modules/nanomatch/LICENSE delete mode 100644 node_modules/nanomatch/README.md delete mode 100644 node_modules/nanomatch/index.js delete mode 100644 node_modules/nanomatch/lib/cache.js delete mode 100644 node_modules/nanomatch/lib/compilers.js delete mode 100644 node_modules/nanomatch/lib/parsers.js delete mode 100644 node_modules/nanomatch/lib/utils.js delete mode 100644 node_modules/nanomatch/package.json delete mode 100644 node_modules/natural-compare/README.md delete mode 100644 node_modules/natural-compare/index.js delete mode 100644 node_modules/natural-compare/package.json delete mode 100644 node_modules/neo-async/LICENSE delete mode 100644 node_modules/neo-async/README.md delete mode 100644 node_modules/neo-async/all.js delete mode 100644 node_modules/neo-async/allLimit.js delete mode 100644 node_modules/neo-async/allSeries.js delete mode 100644 node_modules/neo-async/angelFall.js delete mode 100644 node_modules/neo-async/any.js delete mode 100644 node_modules/neo-async/anyLimit.js delete mode 100644 node_modules/neo-async/anySeries.js delete mode 100644 node_modules/neo-async/apply.js delete mode 100644 node_modules/neo-async/applyEach.js delete mode 100644 node_modules/neo-async/applyEachSeries.js delete mode 100644 node_modules/neo-async/async.js delete mode 100644 node_modules/neo-async/async.min.js delete mode 100644 node_modules/neo-async/asyncify.js delete mode 100644 node_modules/neo-async/auto.js delete mode 100644 node_modules/neo-async/autoInject.js delete mode 100644 node_modules/neo-async/cargo.js delete mode 100644 node_modules/neo-async/compose.js delete mode 100644 node_modules/neo-async/concat.js delete mode 100644 node_modules/neo-async/concatLimit.js delete mode 100644 node_modules/neo-async/concatSeries.js delete mode 100644 node_modules/neo-async/constant.js delete mode 100644 node_modules/neo-async/createLogger.js delete mode 100644 node_modules/neo-async/detect.js delete mode 100644 node_modules/neo-async/detectLimit.js delete mode 100644 node_modules/neo-async/detectSeries.js delete mode 100644 node_modules/neo-async/dir.js delete mode 100644 node_modules/neo-async/doDuring.js delete mode 100644 node_modules/neo-async/doUntil.js delete mode 100644 node_modules/neo-async/doWhilst.js delete mode 100644 node_modules/neo-async/during.js delete mode 100644 node_modules/neo-async/each.js delete mode 100644 node_modules/neo-async/eachLimit.js delete mode 100644 node_modules/neo-async/eachOf.js delete mode 100644 node_modules/neo-async/eachOfLimit.js delete mode 100644 node_modules/neo-async/eachOfSeries.js delete mode 100644 node_modules/neo-async/eachSeries.js delete mode 100644 node_modules/neo-async/ensureAsync.js delete mode 100644 node_modules/neo-async/every.js delete mode 100644 node_modules/neo-async/everyLimit.js delete mode 100644 node_modules/neo-async/everySeries.js delete mode 100644 node_modules/neo-async/fast.js delete mode 100644 node_modules/neo-async/filter.js delete mode 100644 node_modules/neo-async/filterLimit.js delete mode 100644 node_modules/neo-async/filterSeries.js delete mode 100644 node_modules/neo-async/find.js delete mode 100644 node_modules/neo-async/findLimit.js delete mode 100644 node_modules/neo-async/findSeries.js delete mode 100644 node_modules/neo-async/foldl.js delete mode 100644 node_modules/neo-async/foldr.js delete mode 100644 node_modules/neo-async/forEach.js delete mode 100644 node_modules/neo-async/forEachLimit.js delete mode 100644 node_modules/neo-async/forEachOf.js delete mode 100644 node_modules/neo-async/forEachOfLimit.js delete mode 100644 node_modules/neo-async/forEachOfSeries.js delete mode 100644 node_modules/neo-async/forEachSeries.js delete mode 100644 node_modules/neo-async/forever.js delete mode 100644 node_modules/neo-async/groupBy.js delete mode 100644 node_modules/neo-async/groupByLimit.js delete mode 100644 node_modules/neo-async/groupBySeries.js delete mode 100644 node_modules/neo-async/inject.js delete mode 100644 node_modules/neo-async/iterator.js delete mode 100644 node_modules/neo-async/log.js delete mode 100644 node_modules/neo-async/map.js delete mode 100644 node_modules/neo-async/mapLimit.js delete mode 100644 node_modules/neo-async/mapSeries.js delete mode 100644 node_modules/neo-async/mapValues.js delete mode 100644 node_modules/neo-async/mapValuesLimit.js delete mode 100644 node_modules/neo-async/mapValuesSeries.js delete mode 100644 node_modules/neo-async/memoize.js delete mode 100644 node_modules/neo-async/nextTick.js delete mode 100644 node_modules/neo-async/omit.js delete mode 100644 node_modules/neo-async/omitLimit.js delete mode 100644 node_modules/neo-async/omitSeries.js delete mode 100644 node_modules/neo-async/package.json delete mode 100644 node_modules/neo-async/parallel.js delete mode 100644 node_modules/neo-async/parallelLimit.js delete mode 100644 node_modules/neo-async/pick.js delete mode 100644 node_modules/neo-async/pickLimit.js delete mode 100644 node_modules/neo-async/pickSeries.js delete mode 100644 node_modules/neo-async/priorityQueue.js delete mode 100644 node_modules/neo-async/queue.js delete mode 100644 node_modules/neo-async/race.js delete mode 100644 node_modules/neo-async/reduce.js delete mode 100644 node_modules/neo-async/reduceRight.js delete mode 100644 node_modules/neo-async/reflect.js delete mode 100644 node_modules/neo-async/reflectAll.js delete mode 100644 node_modules/neo-async/reject.js delete mode 100644 node_modules/neo-async/rejectLimit.js delete mode 100644 node_modules/neo-async/rejectSeries.js delete mode 100644 node_modules/neo-async/retry.js delete mode 100644 node_modules/neo-async/retryable.js delete mode 100644 node_modules/neo-async/safe.js delete mode 100644 node_modules/neo-async/select.js delete mode 100644 node_modules/neo-async/selectLimit.js delete mode 100644 node_modules/neo-async/selectSeries.js delete mode 100644 node_modules/neo-async/seq.js delete mode 100644 node_modules/neo-async/series.js delete mode 100644 node_modules/neo-async/setImmediate.js delete mode 100644 node_modules/neo-async/some.js delete mode 100644 node_modules/neo-async/someLimit.js delete mode 100644 node_modules/neo-async/someSeries.js delete mode 100644 node_modules/neo-async/sortBy.js delete mode 100644 node_modules/neo-async/sortByLimit.js delete mode 100644 node_modules/neo-async/sortBySeries.js delete mode 100644 node_modules/neo-async/timeout.js delete mode 100644 node_modules/neo-async/times.js delete mode 100644 node_modules/neo-async/timesLimit.js delete mode 100644 node_modules/neo-async/timesSeries.js delete mode 100644 node_modules/neo-async/transform.js delete mode 100644 node_modules/neo-async/transformLimit.js delete mode 100644 node_modules/neo-async/transformSeries.js delete mode 100644 node_modules/neo-async/tryEach.js delete mode 100644 node_modules/neo-async/unmemoize.js delete mode 100644 node_modules/neo-async/until.js delete mode 100644 node_modules/neo-async/waterfall.js delete mode 100644 node_modules/neo-async/whilst.js delete mode 100644 node_modules/neo-async/wrapSync.js delete mode 100644 node_modules/nice-try/CHANGELOG.md delete mode 100644 node_modules/nice-try/LICENSE delete mode 100644 node_modules/nice-try/README.md delete mode 100644 node_modules/nice-try/package.json delete mode 100644 node_modules/nice-try/src/index.js delete mode 100644 node_modules/node-int64/.npmignore delete mode 100644 node_modules/node-int64/Int64.js delete mode 100644 node_modules/node-int64/LICENSE delete mode 100644 node_modules/node-int64/README.md delete mode 100644 node_modules/node-int64/package.json delete mode 100644 node_modules/node-int64/test.js delete mode 100644 node_modules/node-modules-regexp/index.js delete mode 100644 node_modules/node-modules-regexp/license delete mode 100644 node_modules/node-modules-regexp/package.json delete mode 100644 node_modules/node-modules-regexp/readme.md delete mode 100644 node_modules/node-notifier/.prettierrc delete mode 100644 node_modules/node-notifier/CHANGELOG.md delete mode 100644 node_modules/node-notifier/LICENSE delete mode 100644 node_modules/node-notifier/README.md delete mode 100644 node_modules/node-notifier/index.js delete mode 100644 node_modules/node-notifier/lib/checkGrowl.js delete mode 100644 node_modules/node-notifier/lib/utils.js delete mode 100644 node_modules/node-notifier/node_modules/.bin/semver delete mode 100644 node_modules/node-notifier/node_modules/.bin/semver.cmd delete mode 100644 node_modules/node-notifier/node_modules/semver/CHANGELOG.md delete mode 100644 node_modules/node-notifier/node_modules/semver/LICENSE delete mode 100644 node_modules/node-notifier/node_modules/semver/README.md delete mode 100644 node_modules/node-notifier/node_modules/semver/bin/semver delete mode 100644 node_modules/node-notifier/node_modules/semver/package.json delete mode 100644 node_modules/node-notifier/node_modules/semver/range.bnf delete mode 100644 node_modules/node-notifier/node_modules/semver/semver.js delete mode 100644 node_modules/node-notifier/notifiers/balloon.js delete mode 100644 node_modules/node-notifier/notifiers/growl.js delete mode 100644 node_modules/node-notifier/notifiers/notificationcenter.js delete mode 100644 node_modules/node-notifier/notifiers/notifysend.js delete mode 100644 node_modules/node-notifier/notifiers/toaster.js delete mode 100644 node_modules/node-notifier/package.json delete mode 100644 node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Info.plist delete mode 100644 node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier delete mode 100644 node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/PkgInfo delete mode 100644 node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/Terminal.icns delete mode 100644 node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/en.lproj/Credits.rtf delete mode 100644 node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/en.lproj/InfoPlist.strings delete mode 100644 node_modules/node-notifier/vendor/mac.noindex/terminal-notifier.app/Contents/Resources/en.lproj/MainMenu.nib delete mode 100644 node_modules/node-notifier/vendor/notifu/notifu.exe delete mode 100644 node_modules/node-notifier/vendor/notifu/notifu64.exe delete mode 100644 node_modules/node-notifier/vendor/snoreToast/LICENSE delete mode 100644 node_modules/node-notifier/vendor/snoreToast/SnoreToast.exe delete mode 100644 node_modules/node-notifier/vendor/terminal-notifier-LICENSE delete mode 100644 node_modules/normalize-package-data/AUTHORS delete mode 100644 node_modules/normalize-package-data/LICENSE delete mode 100644 node_modules/normalize-package-data/README.md delete mode 100644 node_modules/normalize-package-data/lib/extract_description.js delete mode 100644 node_modules/normalize-package-data/lib/fixer.js delete mode 100644 node_modules/normalize-package-data/lib/make_warning.js delete mode 100644 node_modules/normalize-package-data/lib/normalize.js delete mode 100644 node_modules/normalize-package-data/lib/safe_format.js delete mode 100644 node_modules/normalize-package-data/lib/typos.json delete mode 100644 node_modules/normalize-package-data/lib/warning_messages.json delete mode 100644 node_modules/normalize-package-data/node_modules/.bin/semver delete mode 100644 node_modules/normalize-package-data/node_modules/.bin/semver.cmd delete mode 100644 node_modules/normalize-package-data/node_modules/semver/CHANGELOG.md delete mode 100644 node_modules/normalize-package-data/node_modules/semver/LICENSE delete mode 100644 node_modules/normalize-package-data/node_modules/semver/README.md delete mode 100644 node_modules/normalize-package-data/node_modules/semver/bin/semver delete mode 100644 node_modules/normalize-package-data/node_modules/semver/package.json delete mode 100644 node_modules/normalize-package-data/node_modules/semver/range.bnf delete mode 100644 node_modules/normalize-package-data/node_modules/semver/semver.js delete mode 100644 node_modules/normalize-package-data/package.json delete mode 100644 node_modules/normalize-path/LICENSE delete mode 100644 node_modules/normalize-path/README.md delete mode 100644 node_modules/normalize-path/index.js delete mode 100644 node_modules/normalize-path/package.json delete mode 100644 node_modules/npm-run-path/index.js delete mode 100644 node_modules/npm-run-path/license delete mode 100644 node_modules/npm-run-path/package.json delete mode 100644 node_modules/npm-run-path/readme.md delete mode 100644 node_modules/nwsapi/LICENSE delete mode 100644 node_modules/nwsapi/README.md delete mode 100644 node_modules/nwsapi/dist/lint.log delete mode 100644 node_modules/nwsapi/package.json delete mode 100644 node_modules/nwsapi/src/modules/nwsapi-jquery.js delete mode 100644 node_modules/nwsapi/src/modules/nwsapi-traversal.js delete mode 100644 node_modules/nwsapi/src/nwsapi.js delete mode 100644 node_modules/oauth-sign/LICENSE delete mode 100644 node_modules/oauth-sign/README.md delete mode 100644 node_modules/oauth-sign/index.js delete mode 100644 node_modules/oauth-sign/package.json delete mode 100644 node_modules/object-copy/LICENSE delete mode 100644 node_modules/object-copy/index.js delete mode 100644 node_modules/object-copy/node_modules/define-property/LICENSE delete mode 100644 node_modules/object-copy/node_modules/define-property/README.md delete mode 100644 node_modules/object-copy/node_modules/define-property/index.js delete mode 100644 node_modules/object-copy/node_modules/define-property/package.json delete mode 100644 node_modules/object-copy/node_modules/kind-of/LICENSE delete mode 100644 node_modules/object-copy/node_modules/kind-of/README.md delete mode 100644 node_modules/object-copy/node_modules/kind-of/index.js delete mode 100644 node_modules/object-copy/node_modules/kind-of/package.json delete mode 100644 node_modules/object-copy/package.json delete mode 100644 node_modules/object-inspect/.nycrc delete mode 100644 node_modules/object-inspect/.travis.yml delete mode 100644 node_modules/object-inspect/LICENSE delete mode 100644 node_modules/object-inspect/example/all.js delete mode 100644 node_modules/object-inspect/example/circular.js delete mode 100644 node_modules/object-inspect/example/fn.js delete mode 100644 node_modules/object-inspect/example/inspect.js delete mode 100644 node_modules/object-inspect/index.js delete mode 100644 node_modules/object-inspect/package.json delete mode 100644 node_modules/object-inspect/readme.markdown delete mode 100644 node_modules/object-inspect/test-core-js.js delete mode 100644 node_modules/object-inspect/test/bigint.js delete mode 100644 node_modules/object-inspect/test/browser/dom.js delete mode 100644 node_modules/object-inspect/test/circular.js delete mode 100644 node_modules/object-inspect/test/deep.js delete mode 100644 node_modules/object-inspect/test/element.js delete mode 100644 node_modules/object-inspect/test/err.js delete mode 100644 node_modules/object-inspect/test/fn.js delete mode 100644 node_modules/object-inspect/test/has.js delete mode 100644 node_modules/object-inspect/test/holes.js delete mode 100644 node_modules/object-inspect/test/inspect.js delete mode 100644 node_modules/object-inspect/test/lowbyte.js delete mode 100644 node_modules/object-inspect/test/number.js delete mode 100644 node_modules/object-inspect/test/quoteStyle.js delete mode 100644 node_modules/object-inspect/test/undef.js delete mode 100644 node_modules/object-inspect/test/values.js delete mode 100644 node_modules/object-inspect/util.inspect.js delete mode 100644 node_modules/object-keys/.editorconfig delete mode 100644 node_modules/object-keys/.eslintrc delete mode 100644 node_modules/object-keys/.travis.yml delete mode 100644 node_modules/object-keys/CHANGELOG.md delete mode 100644 node_modules/object-keys/LICENSE delete mode 100644 node_modules/object-keys/README.md delete mode 100644 node_modules/object-keys/implementation.js delete mode 100644 node_modules/object-keys/index.js delete mode 100644 node_modules/object-keys/isArguments.js delete mode 100644 node_modules/object-keys/package.json delete mode 100644 node_modules/object-keys/test/index.js delete mode 100644 node_modules/object-visit/LICENSE delete mode 100644 node_modules/object-visit/README.md delete mode 100644 node_modules/object-visit/index.js delete mode 100644 node_modules/object-visit/package.json delete mode 100644 node_modules/object.getownpropertydescriptors/.editorconfig delete mode 100644 node_modules/object.getownpropertydescriptors/.eslintrc delete mode 100644 node_modules/object.getownpropertydescriptors/.jscs.json delete mode 100644 node_modules/object.getownpropertydescriptors/.npmignore delete mode 100644 node_modules/object.getownpropertydescriptors/.travis.yml delete mode 100644 node_modules/object.getownpropertydescriptors/CHANGELOG.md delete mode 100644 node_modules/object.getownpropertydescriptors/LICENSE delete mode 100644 node_modules/object.getownpropertydescriptors/Makefile delete mode 100644 node_modules/object.getownpropertydescriptors/README.md delete mode 100644 node_modules/object.getownpropertydescriptors/implementation.js delete mode 100644 node_modules/object.getownpropertydescriptors/index.js delete mode 100644 node_modules/object.getownpropertydescriptors/package.json delete mode 100644 node_modules/object.getownpropertydescriptors/polyfill.js delete mode 100644 node_modules/object.getownpropertydescriptors/shim.js delete mode 100644 node_modules/object.getownpropertydescriptors/test/.eslintrc delete mode 100644 node_modules/object.getownpropertydescriptors/test/index.js delete mode 100644 node_modules/object.getownpropertydescriptors/test/shimmed.js delete mode 100644 node_modules/object.getownpropertydescriptors/test/tests.js delete mode 100644 node_modules/object.pick/LICENSE delete mode 100644 node_modules/object.pick/README.md delete mode 100644 node_modules/object.pick/index.js delete mode 100644 node_modules/object.pick/package.json delete mode 100644 node_modules/once/LICENSE delete mode 100644 node_modules/once/README.md delete mode 100644 node_modules/once/once.js delete mode 100644 node_modules/once/package.json delete mode 100644 node_modules/optimist/.travis.yml delete mode 100644 node_modules/optimist/LICENSE delete mode 100644 node_modules/optimist/example/bool.js delete mode 100644 node_modules/optimist/example/boolean_double.js delete mode 100644 node_modules/optimist/example/boolean_single.js delete mode 100644 node_modules/optimist/example/default_hash.js delete mode 100644 node_modules/optimist/example/default_singles.js delete mode 100644 node_modules/optimist/example/divide.js delete mode 100644 node_modules/optimist/example/line_count.js delete mode 100644 node_modules/optimist/example/line_count_options.js delete mode 100644 node_modules/optimist/example/line_count_wrap.js delete mode 100644 node_modules/optimist/example/nonopt.js delete mode 100644 node_modules/optimist/example/reflect.js delete mode 100644 node_modules/optimist/example/short.js delete mode 100644 node_modules/optimist/example/string.js delete mode 100644 node_modules/optimist/example/usage-options.js delete mode 100644 node_modules/optimist/example/xup.js delete mode 100644 node_modules/optimist/index.js delete mode 100644 node_modules/optimist/node_modules/minimist/.travis.yml delete mode 100644 node_modules/optimist/node_modules/minimist/LICENSE delete mode 100644 node_modules/optimist/node_modules/minimist/example/parse.js delete mode 100644 node_modules/optimist/node_modules/minimist/index.js delete mode 100644 node_modules/optimist/node_modules/minimist/package.json delete mode 100644 node_modules/optimist/node_modules/minimist/readme.markdown delete mode 100644 node_modules/optimist/node_modules/minimist/test/bool.js delete mode 100644 node_modules/optimist/node_modules/minimist/test/dash.js delete mode 100644 node_modules/optimist/node_modules/minimist/test/default_bool.js delete mode 100644 node_modules/optimist/node_modules/minimist/test/dotted.js delete mode 100644 node_modules/optimist/node_modules/minimist/test/long.js delete mode 100644 node_modules/optimist/node_modules/minimist/test/num.js delete mode 100644 node_modules/optimist/node_modules/minimist/test/parse.js delete mode 100644 node_modules/optimist/node_modules/minimist/test/parse_modified.js delete mode 100644 node_modules/optimist/node_modules/minimist/test/short.js delete mode 100644 node_modules/optimist/node_modules/minimist/test/whitespace.js delete mode 100644 node_modules/optimist/package.json delete mode 100644 node_modules/optimist/readme.markdown delete mode 100644 node_modules/optimist/test/_.js delete mode 100644 node_modules/optimist/test/_/argv.js delete mode 100644 node_modules/optimist/test/_/bin.js delete mode 100644 node_modules/optimist/test/dash.js delete mode 100644 node_modules/optimist/test/parse.js delete mode 100644 node_modules/optimist/test/parse_modified.js delete mode 100644 node_modules/optimist/test/short.js delete mode 100644 node_modules/optimist/test/usage.js delete mode 100644 node_modules/optimist/test/whitespace.js delete mode 100644 node_modules/optionator/CHANGELOG.md delete mode 100644 node_modules/optionator/LICENSE delete mode 100644 node_modules/optionator/README.md delete mode 100644 node_modules/optionator/lib/help.js delete mode 100644 node_modules/optionator/lib/index.js delete mode 100644 node_modules/optionator/lib/util.js delete mode 100644 node_modules/optionator/node_modules/wordwrap/LICENSE delete mode 100644 node_modules/optionator/node_modules/wordwrap/README.markdown delete mode 100644 node_modules/optionator/node_modules/wordwrap/example/center.js delete mode 100644 node_modules/optionator/node_modules/wordwrap/example/meat.js delete mode 100644 node_modules/optionator/node_modules/wordwrap/index.js delete mode 100644 node_modules/optionator/node_modules/wordwrap/package.json delete mode 100644 node_modules/optionator/node_modules/wordwrap/test/break.js delete mode 100644 node_modules/optionator/node_modules/wordwrap/test/idleness.txt delete mode 100644 node_modules/optionator/node_modules/wordwrap/test/wrap.js delete mode 100644 node_modules/optionator/package.json delete mode 100644 node_modules/p-each-series/index.js delete mode 100644 node_modules/p-each-series/license delete mode 100644 node_modules/p-each-series/package.json delete mode 100644 node_modules/p-each-series/readme.md delete mode 100644 node_modules/p-finally/index.js delete mode 100644 node_modules/p-finally/license delete mode 100644 node_modules/p-finally/package.json delete mode 100644 node_modules/p-finally/readme.md delete mode 100644 node_modules/p-limit/index.d.ts delete mode 100644 node_modules/p-limit/index.js delete mode 100644 node_modules/p-limit/license delete mode 100644 node_modules/p-limit/package.json delete mode 100644 node_modules/p-limit/readme.md delete mode 100644 node_modules/p-locate/index.js delete mode 100644 node_modules/p-locate/license delete mode 100644 node_modules/p-locate/package.json delete mode 100644 node_modules/p-locate/readme.md delete mode 100644 node_modules/p-reduce/index.js delete mode 100644 node_modules/p-reduce/license delete mode 100644 node_modules/p-reduce/package.json delete mode 100644 node_modules/p-reduce/readme.md delete mode 100644 node_modules/p-try/index.d.ts delete mode 100644 node_modules/p-try/index.js delete mode 100644 node_modules/p-try/license delete mode 100644 node_modules/p-try/package.json delete mode 100644 node_modules/p-try/readme.md delete mode 100644 node_modules/parse-json/index.js delete mode 100644 node_modules/parse-json/license delete mode 100644 node_modules/parse-json/package.json delete mode 100644 node_modules/parse-json/readme.md delete mode 100644 node_modules/parse5/LICENSE delete mode 100644 node_modules/parse5/README.md delete mode 100644 node_modules/parse5/lib/common/doctype.js delete mode 100644 node_modules/parse5/lib/common/foreign_content.js delete mode 100644 node_modules/parse5/lib/common/html.js delete mode 100644 node_modules/parse5/lib/common/unicode.js delete mode 100644 node_modules/parse5/lib/extensions/location_info/open_element_stack_mixin.js delete mode 100644 node_modules/parse5/lib/extensions/location_info/parser_mixin.js delete mode 100644 node_modules/parse5/lib/extensions/location_info/tokenizer_mixin.js delete mode 100644 node_modules/parse5/lib/extensions/position_tracking/preprocessor_mixin.js delete mode 100644 node_modules/parse5/lib/index.d.ts delete mode 100644 node_modules/parse5/lib/index.js delete mode 100644 node_modules/parse5/lib/parser/formatting_element_list.js delete mode 100644 node_modules/parse5/lib/parser/index.js delete mode 100644 node_modules/parse5/lib/parser/open_element_stack.js delete mode 100644 node_modules/parse5/lib/parser/parser_stream.js delete mode 100644 node_modules/parse5/lib/parser/plain_text_conversion_stream.js delete mode 100644 node_modules/parse5/lib/sax/dev_null_stream.js delete mode 100644 node_modules/parse5/lib/sax/index.js delete mode 100644 node_modules/parse5/lib/sax/parser_feedback_simulator.js delete mode 100644 node_modules/parse5/lib/serializer/index.js delete mode 100644 node_modules/parse5/lib/serializer/serializer_stream.js delete mode 100644 node_modules/parse5/lib/tokenizer/index.js delete mode 100644 node_modules/parse5/lib/tokenizer/named_entity_data.js delete mode 100644 node_modules/parse5/lib/tokenizer/preprocessor.js delete mode 100644 node_modules/parse5/lib/tree_adapters/default.js delete mode 100644 node_modules/parse5/lib/tree_adapters/htmlparser2.js delete mode 100644 node_modules/parse5/lib/utils/merge_options.js delete mode 100644 node_modules/parse5/lib/utils/mixin.js delete mode 100644 node_modules/parse5/package.json delete mode 100644 node_modules/pascalcase/LICENSE delete mode 100644 node_modules/pascalcase/README.md delete mode 100644 node_modules/pascalcase/index.js delete mode 100644 node_modules/pascalcase/package.json delete mode 100644 node_modules/path-exists/index.js delete mode 100644 node_modules/path-exists/license delete mode 100644 node_modules/path-exists/package.json delete mode 100644 node_modules/path-exists/readme.md delete mode 100644 node_modules/path-is-absolute/index.js delete mode 100644 node_modules/path-is-absolute/license delete mode 100644 node_modules/path-is-absolute/package.json delete mode 100644 node_modules/path-is-absolute/readme.md delete mode 100644 node_modules/path-key/index.js delete mode 100644 node_modules/path-key/license delete mode 100644 node_modules/path-key/package.json delete mode 100644 node_modules/path-key/readme.md delete mode 100644 node_modules/path-parse/.travis.yml delete mode 100644 node_modules/path-parse/LICENSE delete mode 100644 node_modules/path-parse/README.md delete mode 100644 node_modules/path-parse/index.js delete mode 100644 node_modules/path-parse/package.json delete mode 100644 node_modules/path-parse/test.js delete mode 100644 node_modules/path-type/index.js delete mode 100644 node_modules/path-type/license delete mode 100644 node_modules/path-type/package.json delete mode 100644 node_modules/path-type/readme.md delete mode 100644 node_modules/performance-now/.npmignore delete mode 100644 node_modules/performance-now/.tm_properties delete mode 100644 node_modules/performance-now/.travis.yml delete mode 100644 node_modules/performance-now/README.md delete mode 100644 node_modules/performance-now/lib/performance-now.js delete mode 100644 node_modules/performance-now/lib/performance-now.js.map delete mode 100644 node_modules/performance-now/license.txt delete mode 100644 node_modules/performance-now/package.json delete mode 100644 node_modules/performance-now/src/index.d.ts delete mode 100644 node_modules/performance-now/src/performance-now.coffee delete mode 100644 node_modules/performance-now/test/mocha.opts delete mode 100644 node_modules/performance-now/test/performance-now.coffee delete mode 100644 node_modules/performance-now/test/scripts.coffee delete mode 100644 node_modules/performance-now/test/scripts/delayed-call.coffee delete mode 100644 node_modules/performance-now/test/scripts/delayed-require.coffee delete mode 100644 node_modules/performance-now/test/scripts/difference.coffee delete mode 100644 node_modules/performance-now/test/scripts/initial-value.coffee delete mode 100644 node_modules/pify/index.js delete mode 100644 node_modules/pify/license delete mode 100644 node_modules/pify/package.json delete mode 100644 node_modules/pify/readme.md delete mode 100644 node_modules/pirates/LICENSE delete mode 100644 node_modules/pirates/README.md delete mode 100644 node_modules/pirates/index.d.ts delete mode 100644 node_modules/pirates/lib/index.js delete mode 100644 node_modules/pirates/package.json delete mode 100644 node_modules/pkg-dir/index.d.ts delete mode 100644 node_modules/pkg-dir/index.js delete mode 100644 node_modules/pkg-dir/license delete mode 100644 node_modules/pkg-dir/node_modules/find-up/index.d.ts delete mode 100644 node_modules/pkg-dir/node_modules/find-up/index.js delete mode 100644 node_modules/pkg-dir/node_modules/find-up/license delete mode 100644 node_modules/pkg-dir/node_modules/find-up/package.json delete mode 100644 node_modules/pkg-dir/node_modules/find-up/readme.md delete mode 100644 node_modules/pkg-dir/node_modules/locate-path/index.d.ts delete mode 100644 node_modules/pkg-dir/node_modules/locate-path/index.js delete mode 100644 node_modules/pkg-dir/node_modules/locate-path/license delete mode 100644 node_modules/pkg-dir/node_modules/locate-path/package.json delete mode 100644 node_modules/pkg-dir/node_modules/locate-path/readme.md delete mode 100644 node_modules/pkg-dir/node_modules/p-locate/index.d.ts delete mode 100644 node_modules/pkg-dir/node_modules/p-locate/index.js delete mode 100644 node_modules/pkg-dir/node_modules/p-locate/license delete mode 100644 node_modules/pkg-dir/node_modules/p-locate/package.json delete mode 100644 node_modules/pkg-dir/node_modules/p-locate/readme.md delete mode 100644 node_modules/pkg-dir/node_modules/path-exists/index.d.ts delete mode 100644 node_modules/pkg-dir/node_modules/path-exists/index.js delete mode 100644 node_modules/pkg-dir/node_modules/path-exists/license delete mode 100644 node_modules/pkg-dir/node_modules/path-exists/package.json delete mode 100644 node_modules/pkg-dir/node_modules/path-exists/readme.md delete mode 100644 node_modules/pkg-dir/package.json delete mode 100644 node_modules/pkg-dir/readme.md delete mode 100644 node_modules/please-upgrade-node/.eslintrc.js delete mode 100644 node_modules/please-upgrade-node/.github/FUNDING.yml delete mode 100644 node_modules/please-upgrade-node/LICENSE delete mode 100644 node_modules/please-upgrade-node/README.md delete mode 100644 node_modules/please-upgrade-node/index.d.ts delete mode 100644 node_modules/please-upgrade-node/index.js delete mode 100644 node_modules/please-upgrade-node/package.json delete mode 100644 node_modules/pn/.travis.yml delete mode 100644 node_modules/pn/README.md delete mode 100644 node_modules/pn/_promise.js delete mode 100644 node_modules/pn/_promisify.js delete mode 100644 node_modules/pn/assert.js delete mode 100644 node_modules/pn/async_hooks.js delete mode 100644 node_modules/pn/buffer.js delete mode 100644 node_modules/pn/child_process.js delete mode 100644 node_modules/pn/cluster.js delete mode 100644 node_modules/pn/console.js delete mode 100644 node_modules/pn/crypto.js delete mode 100644 node_modules/pn/dgram.js delete mode 100644 node_modules/pn/dns.js delete mode 100644 node_modules/pn/domain.js delete mode 100644 node_modules/pn/events.js delete mode 100644 node_modules/pn/fs.js delete mode 100644 node_modules/pn/http.js delete mode 100644 node_modules/pn/http2.js delete mode 100644 node_modules/pn/https.js delete mode 100644 node_modules/pn/inspector.js delete mode 100644 node_modules/pn/net.js delete mode 100644 node_modules/pn/os.js delete mode 100644 node_modules/pn/package.json delete mode 100644 node_modules/pn/path.js delete mode 100644 node_modules/pn/perf_hooks.js delete mode 100644 node_modules/pn/process.js delete mode 100644 node_modules/pn/punycode.js delete mode 100644 node_modules/pn/querystring.js delete mode 100644 node_modules/pn/readline.js delete mode 100644 node_modules/pn/repl.js delete mode 100644 node_modules/pn/scripts/generate.js delete mode 100644 node_modules/pn/stream.js delete mode 100644 node_modules/pn/string_decoder.js delete mode 100644 node_modules/pn/test/cp.js delete mode 100644 node_modules/pn/test/custom.js delete mode 100644 node_modules/pn/test/fs.js delete mode 100644 node_modules/pn/test/load.js delete mode 100644 node_modules/pn/test/timers.js delete mode 100644 node_modules/pn/timers.js delete mode 100644 node_modules/pn/tls.js delete mode 100644 node_modules/pn/tty.js delete mode 100644 node_modules/pn/url.js delete mode 100644 node_modules/pn/util.js delete mode 100644 node_modules/pn/v8.js delete mode 100644 node_modules/pn/vm.js delete mode 100644 node_modules/pn/zlib.js delete mode 100644 node_modules/posix-character-classes/LICENSE delete mode 100644 node_modules/posix-character-classes/README.md delete mode 100644 node_modules/posix-character-classes/index.js delete mode 100644 node_modules/posix-character-classes/package.json delete mode 100644 node_modules/prelude-ls/CHANGELOG.md delete mode 100644 node_modules/prelude-ls/LICENSE delete mode 100644 node_modules/prelude-ls/README.md delete mode 100644 node_modules/prelude-ls/lib/Func.js delete mode 100644 node_modules/prelude-ls/lib/List.js delete mode 100644 node_modules/prelude-ls/lib/Num.js delete mode 100644 node_modules/prelude-ls/lib/Obj.js delete mode 100644 node_modules/prelude-ls/lib/Str.js delete mode 100644 node_modules/prelude-ls/lib/index.js delete mode 100644 node_modules/prelude-ls/package.json delete mode 100644 node_modules/prettier/LICENSE delete mode 100644 node_modules/prettier/README.md delete mode 100644 node_modules/prettier/bin-prettier.js delete mode 100644 node_modules/prettier/doc.js delete mode 100644 node_modules/prettier/index.js delete mode 100644 node_modules/prettier/package.json delete mode 100644 node_modules/prettier/parser-angular.js delete mode 100644 node_modules/prettier/parser-babylon.js delete mode 100644 node_modules/prettier/parser-flow.js delete mode 100644 node_modules/prettier/parser-glimmer.js delete mode 100644 node_modules/prettier/parser-graphql.js delete mode 100644 node_modules/prettier/parser-html.js delete mode 100644 node_modules/prettier/parser-markdown.js delete mode 100644 node_modules/prettier/parser-postcss.js delete mode 100644 node_modules/prettier/parser-typescript.js delete mode 100644 node_modules/prettier/parser-yaml.js delete mode 100644 node_modules/prettier/standalone.js delete mode 100644 node_modules/prettier/third-party.js delete mode 100644 node_modules/pretty-format/LICENSE delete mode 100644 node_modules/pretty-format/README.md delete mode 100644 node_modules/pretty-format/build-es5/index.js delete mode 100644 node_modules/pretty-format/build-es5/index.js.map delete mode 100644 node_modules/pretty-format/build/collections.d.ts delete mode 100644 node_modules/pretty-format/build/collections.d.ts.map delete mode 100644 node_modules/pretty-format/build/collections.js delete mode 100644 node_modules/pretty-format/build/index.d.ts delete mode 100644 node_modules/pretty-format/build/index.d.ts.map delete mode 100644 node_modules/pretty-format/build/index.js delete mode 100644 node_modules/pretty-format/build/plugins/AsymmetricMatcher.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/AsymmetricMatcher.d.ts.map delete mode 100644 node_modules/pretty-format/build/plugins/AsymmetricMatcher.js delete mode 100644 node_modules/pretty-format/build/plugins/ConvertAnsi.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/ConvertAnsi.d.ts.map delete mode 100644 node_modules/pretty-format/build/plugins/ConvertAnsi.js delete mode 100644 node_modules/pretty-format/build/plugins/DOMCollection.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/DOMCollection.d.ts.map delete mode 100644 node_modules/pretty-format/build/plugins/DOMCollection.js delete mode 100644 node_modules/pretty-format/build/plugins/DOMElement.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/DOMElement.d.ts.map delete mode 100644 node_modules/pretty-format/build/plugins/DOMElement.js delete mode 100644 node_modules/pretty-format/build/plugins/Immutable.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/Immutable.d.ts.map delete mode 100644 node_modules/pretty-format/build/plugins/Immutable.js delete mode 100644 node_modules/pretty-format/build/plugins/ReactElement.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/ReactElement.d.ts.map delete mode 100644 node_modules/pretty-format/build/plugins/ReactElement.js delete mode 100644 node_modules/pretty-format/build/plugins/ReactTestComponent.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/ReactTestComponent.d.ts.map delete mode 100644 node_modules/pretty-format/build/plugins/ReactTestComponent.js delete mode 100644 node_modules/pretty-format/build/plugins/lib/escapeHTML.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/lib/escapeHTML.d.ts.map delete mode 100644 node_modules/pretty-format/build/plugins/lib/escapeHTML.js delete mode 100644 node_modules/pretty-format/build/plugins/lib/markup.d.ts delete mode 100644 node_modules/pretty-format/build/plugins/lib/markup.d.ts.map delete mode 100644 node_modules/pretty-format/build/plugins/lib/markup.js delete mode 100644 node_modules/pretty-format/build/types.d.ts delete mode 100644 node_modules/pretty-format/build/types.d.ts.map delete mode 100644 node_modules/pretty-format/build/types.js delete mode 100644 node_modules/pretty-format/package.json delete mode 100644 node_modules/pretty-format/perf/test.js delete mode 100644 node_modules/pretty-format/perf/world.geo.json delete mode 100644 node_modules/prompts/dist/dateparts/datepart.js delete mode 100644 node_modules/prompts/dist/dateparts/day.js delete mode 100644 node_modules/prompts/dist/dateparts/hours.js delete mode 100644 node_modules/prompts/dist/dateparts/index.js delete mode 100644 node_modules/prompts/dist/dateparts/meridiem.js delete mode 100644 node_modules/prompts/dist/dateparts/milliseconds.js delete mode 100644 node_modules/prompts/dist/dateparts/minutes.js delete mode 100644 node_modules/prompts/dist/dateparts/month.js delete mode 100644 node_modules/prompts/dist/dateparts/seconds.js delete mode 100644 node_modules/prompts/dist/dateparts/year.js delete mode 100644 node_modules/prompts/dist/elements/autocomplete.js delete mode 100644 node_modules/prompts/dist/elements/autocompleteMultiselect.js delete mode 100644 node_modules/prompts/dist/elements/confirm.js delete mode 100644 node_modules/prompts/dist/elements/date.js delete mode 100644 node_modules/prompts/dist/elements/index.js delete mode 100644 node_modules/prompts/dist/elements/multiselect.js delete mode 100644 node_modules/prompts/dist/elements/number.js delete mode 100644 node_modules/prompts/dist/elements/prompt.js delete mode 100644 node_modules/prompts/dist/elements/select.js delete mode 100644 node_modules/prompts/dist/elements/text.js delete mode 100644 node_modules/prompts/dist/elements/toggle.js delete mode 100644 node_modules/prompts/dist/index.js delete mode 100644 node_modules/prompts/dist/prompts.js delete mode 100644 node_modules/prompts/dist/util/action.js delete mode 100644 node_modules/prompts/dist/util/clear.js delete mode 100644 node_modules/prompts/dist/util/figures.js delete mode 100644 node_modules/prompts/dist/util/index.js delete mode 100644 node_modules/prompts/dist/util/lines.js delete mode 100644 node_modules/prompts/dist/util/strip.js delete mode 100644 node_modules/prompts/dist/util/style.js delete mode 100644 node_modules/prompts/dist/util/wrap.js delete mode 100644 node_modules/prompts/index.js delete mode 100644 node_modules/prompts/lib/dateparts/datepart.js delete mode 100644 node_modules/prompts/lib/dateparts/day.js delete mode 100644 node_modules/prompts/lib/dateparts/hours.js delete mode 100644 node_modules/prompts/lib/dateparts/index.js delete mode 100644 node_modules/prompts/lib/dateparts/meridiem.js delete mode 100644 node_modules/prompts/lib/dateparts/milliseconds.js delete mode 100644 node_modules/prompts/lib/dateparts/minutes.js delete mode 100644 node_modules/prompts/lib/dateparts/month.js delete mode 100644 node_modules/prompts/lib/dateparts/seconds.js delete mode 100644 node_modules/prompts/lib/dateparts/year.js delete mode 100644 node_modules/prompts/lib/elements/autocomplete.js delete mode 100644 node_modules/prompts/lib/elements/autocompleteMultiselect.js delete mode 100644 node_modules/prompts/lib/elements/confirm.js delete mode 100644 node_modules/prompts/lib/elements/date.js delete mode 100644 node_modules/prompts/lib/elements/index.js delete mode 100644 node_modules/prompts/lib/elements/multiselect.js delete mode 100644 node_modules/prompts/lib/elements/number.js delete mode 100644 node_modules/prompts/lib/elements/prompt.js delete mode 100644 node_modules/prompts/lib/elements/select.js delete mode 100644 node_modules/prompts/lib/elements/text.js delete mode 100644 node_modules/prompts/lib/elements/toggle.js delete mode 100644 node_modules/prompts/lib/index.js delete mode 100644 node_modules/prompts/lib/prompts.js delete mode 100644 node_modules/prompts/lib/util/action.js delete mode 100644 node_modules/prompts/lib/util/clear.js delete mode 100644 node_modules/prompts/lib/util/figures.js delete mode 100644 node_modules/prompts/lib/util/index.js delete mode 100644 node_modules/prompts/lib/util/lines.js delete mode 100644 node_modules/prompts/lib/util/strip.js delete mode 100644 node_modules/prompts/lib/util/style.js delete mode 100644 node_modules/prompts/lib/util/wrap.js delete mode 100644 node_modules/prompts/license delete mode 100644 node_modules/prompts/package.json delete mode 100644 node_modules/prompts/readme.md delete mode 100644 node_modules/psl/LICENSE delete mode 100644 node_modules/psl/README.md delete mode 100644 node_modules/psl/browserstack-logo.svg delete mode 100644 node_modules/psl/data/rules.json delete mode 100644 node_modules/psl/dist/psl.js delete mode 100644 node_modules/psl/dist/psl.min.js delete mode 100644 node_modules/psl/index.js delete mode 100644 node_modules/psl/package.json delete mode 100644 node_modules/pump/.travis.yml delete mode 100644 node_modules/pump/LICENSE delete mode 100644 node_modules/pump/README.md delete mode 100644 node_modules/pump/index.js delete mode 100644 node_modules/pump/package.json delete mode 100644 node_modules/pump/test-browser.js delete mode 100644 node_modules/pump/test-node.js delete mode 100644 node_modules/punycode/LICENSE-MIT.txt delete mode 100644 node_modules/punycode/README.md delete mode 100644 node_modules/punycode/package.json delete mode 100644 node_modules/punycode/punycode.es6.js delete mode 100644 node_modules/punycode/punycode.js delete mode 100644 node_modules/qs/.editorconfig delete mode 100644 node_modules/qs/.eslintignore delete mode 100644 node_modules/qs/.eslintrc delete mode 100644 node_modules/qs/CHANGELOG.md delete mode 100644 node_modules/qs/LICENSE delete mode 100644 node_modules/qs/README.md delete mode 100644 node_modules/qs/dist/qs.js delete mode 100644 node_modules/qs/lib/formats.js delete mode 100644 node_modules/qs/lib/index.js delete mode 100644 node_modules/qs/lib/parse.js delete mode 100644 node_modules/qs/lib/stringify.js delete mode 100644 node_modules/qs/lib/utils.js delete mode 100644 node_modules/qs/package.json delete mode 100644 node_modules/qs/test/.eslintrc delete mode 100644 node_modules/qs/test/index.js delete mode 100644 node_modules/qs/test/parse.js delete mode 100644 node_modules/qs/test/stringify.js delete mode 100644 node_modules/qs/test/utils.js delete mode 100644 node_modules/react-is/LICENSE delete mode 100644 node_modules/react-is/README.md delete mode 100644 node_modules/react-is/build-info.json delete mode 100644 node_modules/react-is/cjs/react-is.development.js delete mode 100644 node_modules/react-is/cjs/react-is.production.min.js delete mode 100644 node_modules/react-is/index.js delete mode 100644 node_modules/react-is/package.json delete mode 100644 node_modules/react-is/umd/react-is.development.js delete mode 100644 node_modules/react-is/umd/react-is.production.min.js delete mode 100644 node_modules/read-pkg-up/index.js delete mode 100644 node_modules/read-pkg-up/license delete mode 100644 node_modules/read-pkg-up/node_modules/read-pkg/index.js delete mode 100644 node_modules/read-pkg-up/node_modules/read-pkg/license delete mode 100644 node_modules/read-pkg-up/node_modules/read-pkg/package.json delete mode 100644 node_modules/read-pkg-up/node_modules/read-pkg/readme.md delete mode 100644 node_modules/read-pkg-up/package.json delete mode 100644 node_modules/read-pkg-up/readme.md delete mode 100644 node_modules/read-pkg/index.d.ts delete mode 100644 node_modules/read-pkg/index.js delete mode 100644 node_modules/read-pkg/license delete mode 100644 node_modules/read-pkg/node_modules/parse-json/index.js delete mode 100644 node_modules/read-pkg/node_modules/parse-json/license delete mode 100644 node_modules/read-pkg/node_modules/parse-json/package.json delete mode 100644 node_modules/read-pkg/node_modules/parse-json/readme.md delete mode 100644 node_modules/read-pkg/package.json delete mode 100644 node_modules/read-pkg/readme.md delete mode 100644 node_modules/realpath-native/LICENSE delete mode 100644 node_modules/realpath-native/README.md delete mode 100644 node_modules/realpath-native/index.d.ts delete mode 100644 node_modules/realpath-native/index.js delete mode 100644 node_modules/realpath-native/package.json delete mode 100644 node_modules/regex-not/LICENSE delete mode 100644 node_modules/regex-not/README.md delete mode 100644 node_modules/regex-not/index.js delete mode 100644 node_modules/regex-not/package.json delete mode 100644 node_modules/remove-trailing-separator/history.md delete mode 100644 node_modules/remove-trailing-separator/index.js delete mode 100644 node_modules/remove-trailing-separator/license delete mode 100644 node_modules/remove-trailing-separator/package.json delete mode 100644 node_modules/remove-trailing-separator/readme.md delete mode 100644 node_modules/repeat-element/LICENSE delete mode 100644 node_modules/repeat-element/README.md delete mode 100644 node_modules/repeat-element/index.js delete mode 100644 node_modules/repeat-element/package.json delete mode 100644 node_modules/repeat-string/LICENSE delete mode 100644 node_modules/repeat-string/README.md delete mode 100644 node_modules/repeat-string/index.js delete mode 100644 node_modules/repeat-string/package.json delete mode 100644 node_modules/request-promise-core/LICENSE delete mode 100644 node_modules/request-promise-core/README.md delete mode 100644 node_modules/request-promise-core/configure/request-next.js delete mode 100644 node_modules/request-promise-core/configure/request2.js delete mode 100644 node_modules/request-promise-core/errors.js delete mode 100644 node_modules/request-promise-core/lib/errors.js delete mode 100644 node_modules/request-promise-core/lib/plumbing.js delete mode 100644 node_modules/request-promise-core/package.json delete mode 100644 node_modules/request-promise-native/.npmignore delete mode 100644 node_modules/request-promise-native/LICENSE delete mode 100644 node_modules/request-promise-native/README.md delete mode 100644 node_modules/request-promise-native/errors.js delete mode 100644 node_modules/request-promise-native/lib/rp.js delete mode 100644 node_modules/request-promise-native/package.json delete mode 100644 node_modules/request/CHANGELOG.md delete mode 100644 node_modules/request/LICENSE delete mode 100644 node_modules/request/README.md delete mode 100644 node_modules/request/index.js delete mode 100644 node_modules/request/lib/auth.js delete mode 100644 node_modules/request/lib/cookies.js delete mode 100644 node_modules/request/lib/getProxyFromURI.js delete mode 100644 node_modules/request/lib/har.js delete mode 100644 node_modules/request/lib/hawk.js delete mode 100644 node_modules/request/lib/helpers.js delete mode 100644 node_modules/request/lib/multipart.js delete mode 100644 node_modules/request/lib/oauth.js delete mode 100644 node_modules/request/lib/querystring.js delete mode 100644 node_modules/request/lib/redirect.js delete mode 100644 node_modules/request/lib/tunnel.js delete mode 100644 node_modules/request/node_modules/punycode/LICENSE-MIT.txt delete mode 100644 node_modules/request/node_modules/punycode/README.md delete mode 100644 node_modules/request/node_modules/punycode/package.json delete mode 100644 node_modules/request/node_modules/punycode/punycode.js delete mode 100644 node_modules/request/node_modules/tough-cookie/LICENSE delete mode 100644 node_modules/request/node_modules/tough-cookie/README.md delete mode 100644 node_modules/request/node_modules/tough-cookie/lib/cookie.js delete mode 100644 node_modules/request/node_modules/tough-cookie/lib/memstore.js delete mode 100644 node_modules/request/node_modules/tough-cookie/lib/pathMatch.js delete mode 100644 node_modules/request/node_modules/tough-cookie/lib/permuteDomain.js delete mode 100644 node_modules/request/node_modules/tough-cookie/lib/pubsuffix-psl.js delete mode 100644 node_modules/request/node_modules/tough-cookie/lib/store.js delete mode 100644 node_modules/request/node_modules/tough-cookie/package.json delete mode 100644 node_modules/request/package.json delete mode 100644 node_modules/request/request.js delete mode 100644 node_modules/require-directory/.jshintrc delete mode 100644 node_modules/require-directory/.npmignore delete mode 100644 node_modules/require-directory/.travis.yml delete mode 100644 node_modules/require-directory/LICENSE delete mode 100644 node_modules/require-directory/README.markdown delete mode 100644 node_modules/require-directory/index.js delete mode 100644 node_modules/require-directory/package.json delete mode 100644 node_modules/require-main-filename/CHANGELOG.md delete mode 100644 node_modules/require-main-filename/LICENSE.txt delete mode 100644 node_modules/require-main-filename/README.md delete mode 100644 node_modules/require-main-filename/index.js delete mode 100644 node_modules/require-main-filename/package.json delete mode 100644 node_modules/resolve-cwd/index.js delete mode 100644 node_modules/resolve-cwd/license delete mode 100644 node_modules/resolve-cwd/package.json delete mode 100644 node_modules/resolve-cwd/readme.md delete mode 100644 node_modules/resolve-from/index.js delete mode 100644 node_modules/resolve-from/license delete mode 100644 node_modules/resolve-from/package.json delete mode 100644 node_modules/resolve-from/readme.md delete mode 100644 node_modules/resolve-url/.jshintrc delete mode 100644 node_modules/resolve-url/LICENSE delete mode 100644 node_modules/resolve-url/bower.json delete mode 100644 node_modules/resolve-url/changelog.md delete mode 100644 node_modules/resolve-url/component.json delete mode 100644 node_modules/resolve-url/package.json delete mode 100644 node_modules/resolve-url/readme.md delete mode 100644 node_modules/resolve-url/resolve-url.js delete mode 100644 node_modules/resolve-url/test/resolve-url.js delete mode 100644 node_modules/resolve/.editorconfig delete mode 100644 node_modules/resolve/.eslintignore delete mode 100644 node_modules/resolve/.eslintrc delete mode 100644 node_modules/resolve/.travis.yml delete mode 100644 node_modules/resolve/LICENSE delete mode 100644 node_modules/resolve/appveyor.yml delete mode 100644 node_modules/resolve/example/async.js delete mode 100644 node_modules/resolve/example/sync.js delete mode 100644 node_modules/resolve/index.js delete mode 100644 node_modules/resolve/lib/async.js delete mode 100644 node_modules/resolve/lib/caller.js delete mode 100644 node_modules/resolve/lib/core.js delete mode 100644 node_modules/resolve/lib/core.json delete mode 100644 node_modules/resolve/lib/node-modules-paths.js delete mode 100644 node_modules/resolve/lib/normalize-options.js delete mode 100644 node_modules/resolve/lib/sync.js delete mode 100644 node_modules/resolve/package.json delete mode 100644 node_modules/resolve/readme.markdown delete mode 100644 node_modules/resolve/test/.eslintrc delete mode 100644 node_modules/resolve/test/core.js delete mode 100644 node_modules/resolve/test/dotdot.js delete mode 100644 node_modules/resolve/test/dotdot/abc/index.js delete mode 100644 node_modules/resolve/test/dotdot/index.js delete mode 100644 node_modules/resolve/test/faulty_basedir.js delete mode 100644 node_modules/resolve/test/filter.js delete mode 100644 node_modules/resolve/test/filter_sync.js delete mode 100644 node_modules/resolve/test/mock.js delete mode 100644 node_modules/resolve/test/mock_sync.js delete mode 100644 node_modules/resolve/test/module_dir.js delete mode 100644 node_modules/resolve/test/module_dir/xmodules/aaa/index.js delete mode 100644 node_modules/resolve/test/module_dir/ymodules/aaa/index.js delete mode 100644 node_modules/resolve/test/module_dir/zmodules/bbb/main.js delete mode 100644 node_modules/resolve/test/module_dir/zmodules/bbb/package.json delete mode 100644 node_modules/resolve/test/node-modules-paths.js delete mode 100644 node_modules/resolve/test/node_path.js delete mode 100644 node_modules/resolve/test/node_path/x/aaa/index.js delete mode 100644 node_modules/resolve/test/node_path/x/ccc/index.js delete mode 100644 node_modules/resolve/test/node_path/y/bbb/index.js delete mode 100644 node_modules/resolve/test/node_path/y/ccc/index.js delete mode 100644 node_modules/resolve/test/nonstring.js delete mode 100644 node_modules/resolve/test/pathfilter.js delete mode 100644 node_modules/resolve/test/pathfilter/deep_ref/main.js delete mode 100644 node_modules/resolve/test/precedence.js delete mode 100644 node_modules/resolve/test/precedence/aaa.js delete mode 100644 node_modules/resolve/test/precedence/aaa/index.js delete mode 100644 node_modules/resolve/test/precedence/aaa/main.js delete mode 100644 node_modules/resolve/test/precedence/bbb.js delete mode 100644 node_modules/resolve/test/precedence/bbb/main.js delete mode 100644 node_modules/resolve/test/resolver.js delete mode 100644 node_modules/resolve/test/resolver/baz/doom.js delete mode 100644 node_modules/resolve/test/resolver/baz/package.json delete mode 100644 node_modules/resolve/test/resolver/baz/quux.js delete mode 100644 node_modules/resolve/test/resolver/browser_field/a.js delete mode 100644 node_modules/resolve/test/resolver/browser_field/b.js delete mode 100644 node_modules/resolve/test/resolver/browser_field/package.json delete mode 100644 node_modules/resolve/test/resolver/cup.coffee delete mode 100644 node_modules/resolve/test/resolver/dot_main/index.js delete mode 100644 node_modules/resolve/test/resolver/dot_main/package.json delete mode 100644 node_modules/resolve/test/resolver/dot_slash_main/index.js delete mode 100644 node_modules/resolve/test/resolver/dot_slash_main/package.json delete mode 100644 node_modules/resolve/test/resolver/foo.js delete mode 100644 node_modules/resolve/test/resolver/incorrect_main/index.js delete mode 100644 node_modules/resolve/test/resolver/incorrect_main/package.json delete mode 100644 node_modules/resolve/test/resolver/invalid_main/package.json delete mode 100644 node_modules/resolve/test/resolver/mug.coffee delete mode 100644 node_modules/resolve/test/resolver/mug.js delete mode 100644 node_modules/resolve/test/resolver/multirepo/lerna.json delete mode 100644 node_modules/resolve/test/resolver/multirepo/package.json delete mode 100644 node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js delete mode 100644 node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json delete mode 100644 node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js delete mode 100644 node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json delete mode 100644 node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js delete mode 100644 node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json delete mode 100644 node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js delete mode 100644 node_modules/resolve/test/resolver/other_path/lib/other-lib.js delete mode 100644 node_modules/resolve/test/resolver/other_path/root.js delete mode 100644 node_modules/resolve/test/resolver/quux/foo/index.js delete mode 100644 node_modules/resolve/test/resolver/same_names/foo.js delete mode 100644 node_modules/resolve/test/resolver/same_names/foo/index.js delete mode 100644 node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js delete mode 100644 node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep delete mode 100644 node_modules/resolve/test/resolver/symlinked/package/bar.js delete mode 100644 node_modules/resolve/test/resolver/symlinked/package/package.json delete mode 100644 node_modules/resolve/test/resolver/without_basedir/main.js delete mode 100644 node_modules/resolve/test/resolver_sync.js delete mode 100644 node_modules/resolve/test/shadowed_core.js delete mode 100644 node_modules/resolve/test/shadowed_core/node_modules/util/index.js delete mode 100644 node_modules/resolve/test/subdirs.js delete mode 100644 node_modules/resolve/test/symlinks.js delete mode 100644 node_modules/ret/LICENSE delete mode 100644 node_modules/ret/README.md delete mode 100644 node_modules/ret/lib/index.js delete mode 100644 node_modules/ret/lib/positions.js delete mode 100644 node_modules/ret/lib/sets.js delete mode 100644 node_modules/ret/lib/types.js delete mode 100644 node_modules/ret/lib/util.js delete mode 100644 node_modules/ret/package.json delete mode 100644 node_modules/rimraf/LICENSE delete mode 100644 node_modules/rimraf/README.md delete mode 100644 node_modules/rimraf/bin.js delete mode 100644 node_modules/rimraf/package.json delete mode 100644 node_modules/rimraf/rimraf.js delete mode 100644 node_modules/rsvp/CHANGELOG.md delete mode 100644 node_modules/rsvp/LICENSE delete mode 100644 node_modules/rsvp/README.md delete mode 100644 node_modules/rsvp/dist/es6/rsvp.es.js delete mode 100644 node_modules/rsvp/dist/es6/rsvp.es.map delete mode 100644 node_modules/rsvp/dist/rsvp.es.js delete mode 100644 node_modules/rsvp/dist/rsvp.es.map delete mode 100644 node_modules/rsvp/dist/rsvp.js delete mode 100644 node_modules/rsvp/dist/rsvp.map delete mode 100644 node_modules/rsvp/lib/rsvp.js delete mode 100644 node_modules/rsvp/lib/rsvp/-internal.js delete mode 100644 node_modules/rsvp/lib/rsvp/all-settled.js delete mode 100644 node_modules/rsvp/lib/rsvp/all.js delete mode 100644 node_modules/rsvp/lib/rsvp/asap.js delete mode 100644 node_modules/rsvp/lib/rsvp/config.js delete mode 100644 node_modules/rsvp/lib/rsvp/defer.js delete mode 100644 node_modules/rsvp/lib/rsvp/enumerator.js delete mode 100644 node_modules/rsvp/lib/rsvp/events.js delete mode 100644 node_modules/rsvp/lib/rsvp/filter.js delete mode 100644 node_modules/rsvp/lib/rsvp/hash-settled.js delete mode 100644 node_modules/rsvp/lib/rsvp/hash.js delete mode 100644 node_modules/rsvp/lib/rsvp/instrument.js delete mode 100644 node_modules/rsvp/lib/rsvp/map.js delete mode 100644 node_modules/rsvp/lib/rsvp/node.js delete mode 100644 node_modules/rsvp/lib/rsvp/promise-hash.js delete mode 100644 node_modules/rsvp/lib/rsvp/promise.js delete mode 100644 node_modules/rsvp/lib/rsvp/promise/all.js delete mode 100644 node_modules/rsvp/lib/rsvp/promise/race.js delete mode 100644 node_modules/rsvp/lib/rsvp/promise/reject.js delete mode 100644 node_modules/rsvp/lib/rsvp/promise/resolve.js delete mode 100644 node_modules/rsvp/lib/rsvp/race.js delete mode 100644 node_modules/rsvp/lib/rsvp/reject.js delete mode 100644 node_modules/rsvp/lib/rsvp/resolve.js delete mode 100644 node_modules/rsvp/lib/rsvp/rethrow.js delete mode 100644 node_modules/rsvp/lib/rsvp/then.js delete mode 100644 node_modules/rsvp/package.json delete mode 100644 node_modules/run-node/license delete mode 100644 node_modules/run-node/package.json delete mode 100644 node_modules/run-node/readme.md delete mode 100644 node_modules/run-node/run-node delete mode 100644 node_modules/safe-buffer/LICENSE delete mode 100644 node_modules/safe-buffer/README.md delete mode 100644 node_modules/safe-buffer/index.d.ts delete mode 100644 node_modules/safe-buffer/index.js delete mode 100644 node_modules/safe-buffer/package.json delete mode 100644 node_modules/safe-regex/.travis.yml delete mode 100644 node_modules/safe-regex/LICENSE delete mode 100644 node_modules/safe-regex/example/safe.js delete mode 100644 node_modules/safe-regex/index.js delete mode 100644 node_modules/safe-regex/package.json delete mode 100644 node_modules/safe-regex/readme.markdown delete mode 100644 node_modules/safe-regex/test/regex.js delete mode 100644 node_modules/safer-buffer/LICENSE delete mode 100644 node_modules/safer-buffer/Porting-Buffer.md delete mode 100644 node_modules/safer-buffer/Readme.md delete mode 100644 node_modules/safer-buffer/dangerous.js delete mode 100644 node_modules/safer-buffer/package.json delete mode 100644 node_modules/safer-buffer/safer.js delete mode 100644 node_modules/safer-buffer/tests.js delete mode 100644 node_modules/sane/README.md delete mode 100644 node_modules/sane/index.js delete mode 100644 node_modules/sane/package.json delete mode 100644 node_modules/sane/src/cli.js delete mode 100644 node_modules/sane/src/common.js delete mode 100644 node_modules/sane/src/node_watcher.js delete mode 100644 node_modules/sane/src/poll_watcher.js delete mode 100644 node_modules/sane/src/utils/recrawl-warning-dedupe.js delete mode 100644 node_modules/sane/src/watchexec_client.js delete mode 100644 node_modules/sane/src/watchexec_watcher.js delete mode 100644 node_modules/sane/src/watchman_client.js delete mode 100644 node_modules/sane/src/watchman_watcher.js delete mode 100644 node_modules/sax/LICENSE delete mode 100644 node_modules/sax/README.md delete mode 100644 node_modules/sax/lib/sax.js delete mode 100644 node_modules/sax/package.json delete mode 100644 node_modules/semver-compare/.travis.yml delete mode 100644 node_modules/semver-compare/LICENSE delete mode 100644 node_modules/semver-compare/example/cmp.js delete mode 100644 node_modules/semver-compare/example/lex.js delete mode 100644 node_modules/semver-compare/index.js delete mode 100644 node_modules/semver-compare/package.json delete mode 100644 node_modules/semver-compare/readme.markdown delete mode 100644 node_modules/semver-compare/test/cmp.js delete mode 100644 node_modules/set-blocking/CHANGELOG.md delete mode 100644 node_modules/set-blocking/LICENSE.txt delete mode 100644 node_modules/set-blocking/README.md delete mode 100644 node_modules/set-blocking/index.js delete mode 100644 node_modules/set-blocking/package.json delete mode 100644 node_modules/set-value/LICENSE delete mode 100644 node_modules/set-value/README.md delete mode 100644 node_modules/set-value/index.js delete mode 100644 node_modules/set-value/node_modules/extend-shallow/LICENSE delete mode 100644 node_modules/set-value/node_modules/extend-shallow/README.md delete mode 100644 node_modules/set-value/node_modules/extend-shallow/index.js delete mode 100644 node_modules/set-value/node_modules/extend-shallow/package.json delete mode 100644 node_modules/set-value/package.json delete mode 100644 node_modules/shebang-command/index.js delete mode 100644 node_modules/shebang-command/license delete mode 100644 node_modules/shebang-command/package.json delete mode 100644 node_modules/shebang-command/readme.md delete mode 100644 node_modules/shebang-regex/index.js delete mode 100644 node_modules/shebang-regex/license delete mode 100644 node_modules/shebang-regex/package.json delete mode 100644 node_modules/shebang-regex/readme.md delete mode 100644 node_modules/shellwords/LICENSE delete mode 100644 node_modules/shellwords/README.md delete mode 100644 node_modules/shellwords/lib/shellwords.js delete mode 100644 node_modules/shellwords/package.json delete mode 100644 node_modules/signal-exit/CHANGELOG.md delete mode 100644 node_modules/signal-exit/LICENSE.txt delete mode 100644 node_modules/signal-exit/README.md delete mode 100644 node_modules/signal-exit/index.js delete mode 100644 node_modules/signal-exit/package.json delete mode 100644 node_modules/signal-exit/signals.js delete mode 100644 node_modules/sisteransi/license delete mode 100644 node_modules/sisteransi/package.json delete mode 100644 node_modules/sisteransi/readme.md delete mode 100644 node_modules/sisteransi/src/index.js delete mode 100644 node_modules/sisteransi/src/sisteransi.d.ts delete mode 100644 node_modules/slash/index.d.ts delete mode 100644 node_modules/slash/index.js delete mode 100644 node_modules/slash/license delete mode 100644 node_modules/slash/package.json delete mode 100644 node_modules/slash/readme.md delete mode 100644 node_modules/snapdragon-node/LICENSE delete mode 100644 node_modules/snapdragon-node/README.md delete mode 100644 node_modules/snapdragon-node/index.js delete mode 100644 node_modules/snapdragon-node/node_modules/define-property/LICENSE delete mode 100644 node_modules/snapdragon-node/node_modules/define-property/README.md delete mode 100644 node_modules/snapdragon-node/node_modules/define-property/index.js delete mode 100644 node_modules/snapdragon-node/node_modules/define-property/package.json delete mode 100644 node_modules/snapdragon-node/node_modules/is-accessor-descriptor/LICENSE delete mode 100644 node_modules/snapdragon-node/node_modules/is-accessor-descriptor/README.md delete mode 100644 node_modules/snapdragon-node/node_modules/is-accessor-descriptor/index.js delete mode 100644 node_modules/snapdragon-node/node_modules/is-accessor-descriptor/package.json delete mode 100644 node_modules/snapdragon-node/node_modules/is-data-descriptor/LICENSE delete mode 100644 node_modules/snapdragon-node/node_modules/is-data-descriptor/README.md delete mode 100644 node_modules/snapdragon-node/node_modules/is-data-descriptor/index.js delete mode 100644 node_modules/snapdragon-node/node_modules/is-data-descriptor/package.json delete mode 100644 node_modules/snapdragon-node/node_modules/is-descriptor/LICENSE delete mode 100644 node_modules/snapdragon-node/node_modules/is-descriptor/README.md delete mode 100644 node_modules/snapdragon-node/node_modules/is-descriptor/index.js delete mode 100644 node_modules/snapdragon-node/node_modules/is-descriptor/package.json delete mode 100644 node_modules/snapdragon-node/package.json delete mode 100644 node_modules/snapdragon-util/LICENSE delete mode 100644 node_modules/snapdragon-util/README.md delete mode 100644 node_modules/snapdragon-util/index.js delete mode 100644 node_modules/snapdragon-util/node_modules/kind-of/LICENSE delete mode 100644 node_modules/snapdragon-util/node_modules/kind-of/README.md delete mode 100644 node_modules/snapdragon-util/node_modules/kind-of/index.js delete mode 100644 node_modules/snapdragon-util/node_modules/kind-of/package.json delete mode 100644 node_modules/snapdragon-util/package.json delete mode 100644 node_modules/snapdragon/LICENSE delete mode 100644 node_modules/snapdragon/README.md delete mode 100644 node_modules/snapdragon/index.js delete mode 100644 node_modules/snapdragon/lib/compiler.js delete mode 100644 node_modules/snapdragon/lib/parser.js delete mode 100644 node_modules/snapdragon/lib/position.js delete mode 100644 node_modules/snapdragon/lib/source-maps.js delete mode 100644 node_modules/snapdragon/lib/utils.js delete mode 100644 node_modules/snapdragon/node_modules/define-property/LICENSE delete mode 100644 node_modules/snapdragon/node_modules/define-property/README.md delete mode 100644 node_modules/snapdragon/node_modules/define-property/index.js delete mode 100644 node_modules/snapdragon/node_modules/define-property/package.json delete mode 100644 node_modules/snapdragon/node_modules/extend-shallow/LICENSE delete mode 100644 node_modules/snapdragon/node_modules/extend-shallow/README.md delete mode 100644 node_modules/snapdragon/node_modules/extend-shallow/index.js delete mode 100644 node_modules/snapdragon/node_modules/extend-shallow/package.json delete mode 100644 node_modules/snapdragon/node_modules/source-map/CHANGELOG.md delete mode 100644 node_modules/snapdragon/node_modules/source-map/LICENSE delete mode 100644 node_modules/snapdragon/node_modules/source-map/README.md delete mode 100644 node_modules/snapdragon/node_modules/source-map/dist/source-map.debug.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/dist/source-map.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/dist/source-map.min.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/dist/source-map.min.js.map delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/array-set.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/base64-vlq.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/base64.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/binary-search.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/mapping-list.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/quick-sort.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/source-map-consumer.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/source-map-generator.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/source-node.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/lib/util.js delete mode 100644 node_modules/snapdragon/node_modules/source-map/package.json delete mode 100644 node_modules/snapdragon/node_modules/source-map/source-map.js delete mode 100644 node_modules/snapdragon/package.json delete mode 100644 node_modules/source-map-resolve/.jshintrc delete mode 100644 node_modules/source-map-resolve/.travis.yml delete mode 100644 node_modules/source-map-resolve/LICENSE delete mode 100644 node_modules/source-map-resolve/bower.json delete mode 100644 node_modules/source-map-resolve/changelog.md delete mode 100644 node_modules/source-map-resolve/component.json delete mode 100644 node_modules/source-map-resolve/generate-source-map-resolve.js delete mode 100644 node_modules/source-map-resolve/lib/decode-uri-component.js delete mode 100644 node_modules/source-map-resolve/lib/resolve-url.js delete mode 100644 node_modules/source-map-resolve/lib/source-map-resolve-node.js delete mode 100644 node_modules/source-map-resolve/package.json delete mode 100644 node_modules/source-map-resolve/readme.md delete mode 100644 node_modules/source-map-resolve/source-map-resolve.js delete mode 100644 node_modules/source-map-resolve/source-map-resolve.js.template delete mode 100644 node_modules/source-map-resolve/test/common.js delete mode 100644 node_modules/source-map-resolve/test/read.js delete mode 100644 node_modules/source-map-resolve/test/source-map-resolve.js delete mode 100644 node_modules/source-map-resolve/test/windows.js delete mode 100644 node_modules/source-map-resolve/x-package.json5 delete mode 100644 node_modules/source-map-support/LICENSE.md delete mode 100644 node_modules/source-map-support/README.md delete mode 100644 node_modules/source-map-support/browser-source-map-support.js delete mode 100644 node_modules/source-map-support/package.json delete mode 100644 node_modules/source-map-support/register.js delete mode 100644 node_modules/source-map-support/source-map-support.js delete mode 100644 node_modules/source-map-url/.jshintrc delete mode 100644 node_modules/source-map-url/LICENSE delete mode 100644 node_modules/source-map-url/bower.json delete mode 100644 node_modules/source-map-url/changelog.md delete mode 100644 node_modules/source-map-url/component.json delete mode 100644 node_modules/source-map-url/package.json delete mode 100644 node_modules/source-map-url/readme.md delete mode 100644 node_modules/source-map-url/source-map-url.js delete mode 100644 node_modules/source-map-url/test/source-map-url.js delete mode 100644 node_modules/source-map-url/x-package.json5 delete mode 100644 node_modules/source-map/CHANGELOG.md delete mode 100644 node_modules/source-map/LICENSE delete mode 100644 node_modules/source-map/README.md delete mode 100644 node_modules/source-map/dist/source-map.debug.js delete mode 100644 node_modules/source-map/dist/source-map.js delete mode 100644 node_modules/source-map/dist/source-map.min.js delete mode 100644 node_modules/source-map/dist/source-map.min.js.map delete mode 100644 node_modules/source-map/lib/array-set.js delete mode 100644 node_modules/source-map/lib/base64-vlq.js delete mode 100644 node_modules/source-map/lib/base64.js delete mode 100644 node_modules/source-map/lib/binary-search.js delete mode 100644 node_modules/source-map/lib/mapping-list.js delete mode 100644 node_modules/source-map/lib/quick-sort.js delete mode 100644 node_modules/source-map/lib/source-map-consumer.js delete mode 100644 node_modules/source-map/lib/source-map-generator.js delete mode 100644 node_modules/source-map/lib/source-node.js delete mode 100644 node_modules/source-map/lib/util.js delete mode 100644 node_modules/source-map/package.json delete mode 100644 node_modules/source-map/source-map.d.ts delete mode 100644 node_modules/source-map/source-map.js delete mode 100644 node_modules/spdx-correct/LICENSE delete mode 100644 node_modules/spdx-correct/README.md delete mode 100644 node_modules/spdx-correct/index.js delete mode 100644 node_modules/spdx-correct/package.json delete mode 100644 node_modules/spdx-exceptions/README.md delete mode 100644 node_modules/spdx-exceptions/index.json delete mode 100644 node_modules/spdx-exceptions/package.json delete mode 100644 node_modules/spdx-exceptions/test.log delete mode 100644 node_modules/spdx-expression-parse/AUTHORS delete mode 100644 node_modules/spdx-expression-parse/LICENSE delete mode 100644 node_modules/spdx-expression-parse/README.md delete mode 100644 node_modules/spdx-expression-parse/index.js delete mode 100644 node_modules/spdx-expression-parse/package.json delete mode 100644 node_modules/spdx-expression-parse/parse.js delete mode 100644 node_modules/spdx-expression-parse/scan.js delete mode 100644 node_modules/spdx-license-ids/README.md delete mode 100644 node_modules/spdx-license-ids/deprecated.json delete mode 100644 node_modules/spdx-license-ids/index.json delete mode 100644 node_modules/spdx-license-ids/package.json delete mode 100644 node_modules/split-string/LICENSE delete mode 100644 node_modules/split-string/README.md delete mode 100644 node_modules/split-string/index.js delete mode 100644 node_modules/split-string/package.json delete mode 100644 node_modules/sprintf-js/.npmignore delete mode 100644 node_modules/sprintf-js/LICENSE delete mode 100644 node_modules/sprintf-js/README.md delete mode 100644 node_modules/sprintf-js/bower.json delete mode 100644 node_modules/sprintf-js/demo/angular.html delete mode 100644 node_modules/sprintf-js/dist/angular-sprintf.min.js delete mode 100644 node_modules/sprintf-js/dist/angular-sprintf.min.js.map delete mode 100644 node_modules/sprintf-js/dist/angular-sprintf.min.map delete mode 100644 node_modules/sprintf-js/dist/sprintf.min.js delete mode 100644 node_modules/sprintf-js/dist/sprintf.min.js.map delete mode 100644 node_modules/sprintf-js/dist/sprintf.min.map delete mode 100644 node_modules/sprintf-js/gruntfile.js delete mode 100644 node_modules/sprintf-js/package.json delete mode 100644 node_modules/sprintf-js/src/angular-sprintf.js delete mode 100644 node_modules/sprintf-js/src/sprintf.js delete mode 100644 node_modules/sprintf-js/test/test.js delete mode 100644 node_modules/sshpk/.npmignore delete mode 100644 node_modules/sshpk/.travis.yml delete mode 100644 node_modules/sshpk/LICENSE delete mode 100644 node_modules/sshpk/README.md delete mode 100644 node_modules/sshpk/bin/sshpk-conv delete mode 100644 node_modules/sshpk/bin/sshpk-sign delete mode 100644 node_modules/sshpk/bin/sshpk-verify delete mode 100644 node_modules/sshpk/lib/algs.js delete mode 100644 node_modules/sshpk/lib/certificate.js delete mode 100644 node_modules/sshpk/lib/dhe.js delete mode 100644 node_modules/sshpk/lib/ed-compat.js delete mode 100644 node_modules/sshpk/lib/errors.js delete mode 100644 node_modules/sshpk/lib/fingerprint.js delete mode 100644 node_modules/sshpk/lib/formats/auto.js delete mode 100644 node_modules/sshpk/lib/formats/dnssec.js delete mode 100644 node_modules/sshpk/lib/formats/openssh-cert.js delete mode 100644 node_modules/sshpk/lib/formats/pem.js delete mode 100644 node_modules/sshpk/lib/formats/pkcs1.js delete mode 100644 node_modules/sshpk/lib/formats/pkcs8.js delete mode 100644 node_modules/sshpk/lib/formats/putty.js delete mode 100644 node_modules/sshpk/lib/formats/rfc4253.js delete mode 100644 node_modules/sshpk/lib/formats/ssh-private.js delete mode 100644 node_modules/sshpk/lib/formats/ssh.js delete mode 100644 node_modules/sshpk/lib/formats/x509-pem.js delete mode 100644 node_modules/sshpk/lib/formats/x509.js delete mode 100644 node_modules/sshpk/lib/identity.js delete mode 100644 node_modules/sshpk/lib/index.js delete mode 100644 node_modules/sshpk/lib/key.js delete mode 100644 node_modules/sshpk/lib/private-key.js delete mode 100644 node_modules/sshpk/lib/signature.js delete mode 100644 node_modules/sshpk/lib/ssh-buffer.js delete mode 100644 node_modules/sshpk/lib/utils.js delete mode 100644 node_modules/sshpk/man/man1/sshpk-conv.1 delete mode 100644 node_modules/sshpk/man/man1/sshpk-sign.1 delete mode 100644 node_modules/sshpk/man/man1/sshpk-verify.1 delete mode 100644 node_modules/sshpk/package.json delete mode 100644 node_modules/stack-utils/index.js delete mode 100644 node_modules/stack-utils/license delete mode 100644 node_modules/stack-utils/package.json delete mode 100644 node_modules/stack-utils/readme.md delete mode 100644 node_modules/static-extend/LICENSE delete mode 100644 node_modules/static-extend/index.js delete mode 100644 node_modules/static-extend/node_modules/define-property/LICENSE delete mode 100644 node_modules/static-extend/node_modules/define-property/README.md delete mode 100644 node_modules/static-extend/node_modules/define-property/index.js delete mode 100644 node_modules/static-extend/node_modules/define-property/package.json delete mode 100644 node_modules/static-extend/package.json delete mode 100644 node_modules/stealthy-require/.npmignore delete mode 100644 node_modules/stealthy-require/LICENSE delete mode 100644 node_modules/stealthy-require/README.md delete mode 100644 node_modules/stealthy-require/lib/index.js delete mode 100644 node_modules/stealthy-require/package.json delete mode 100644 node_modules/string-length/index.js delete mode 100644 node_modules/string-length/license delete mode 100644 node_modules/string-length/node_modules/ansi-regex/index.js delete mode 100644 node_modules/string-length/node_modules/ansi-regex/license delete mode 100644 node_modules/string-length/node_modules/ansi-regex/package.json delete mode 100644 node_modules/string-length/node_modules/ansi-regex/readme.md delete mode 100644 node_modules/string-length/node_modules/strip-ansi/index.js delete mode 100644 node_modules/string-length/node_modules/strip-ansi/license delete mode 100644 node_modules/string-length/node_modules/strip-ansi/package.json delete mode 100644 node_modules/string-length/node_modules/strip-ansi/readme.md delete mode 100644 node_modules/string-length/package.json delete mode 100644 node_modules/string-length/readme.md delete mode 100644 node_modules/string-width/index.js delete mode 100644 node_modules/string-width/license delete mode 100644 node_modules/string-width/package.json delete mode 100644 node_modules/string-width/readme.md delete mode 100644 node_modules/string.prototype.trimleft/.eslintrc delete mode 100644 node_modules/string.prototype.trimleft/.jscs.json delete mode 100644 node_modules/string.prototype.trimleft/.npmignore delete mode 100644 node_modules/string.prototype.trimleft/.travis.yml delete mode 100644 node_modules/string.prototype.trimleft/CHANGELOG.md delete mode 100644 node_modules/string.prototype.trimleft/LICENSE delete mode 100644 node_modules/string.prototype.trimleft/README.md delete mode 100644 node_modules/string.prototype.trimleft/implementation.js delete mode 100644 node_modules/string.prototype.trimleft/index.js delete mode 100644 node_modules/string.prototype.trimleft/package.json delete mode 100644 node_modules/string.prototype.trimleft/polyfill.js delete mode 100644 node_modules/string.prototype.trimleft/shim.js delete mode 100644 node_modules/string.prototype.trimleft/test/index.js delete mode 100644 node_modules/string.prototype.trimleft/test/shimmed.js delete mode 100644 node_modules/string.prototype.trimleft/test/tests.js delete mode 100644 node_modules/string.prototype.trimright/.eslintrc delete mode 100644 node_modules/string.prototype.trimright/.jscs.json delete mode 100644 node_modules/string.prototype.trimright/.npmignore delete mode 100644 node_modules/string.prototype.trimright/.travis.yml delete mode 100644 node_modules/string.prototype.trimright/CHANGELOG.md delete mode 100644 node_modules/string.prototype.trimright/LICENSE delete mode 100644 node_modules/string.prototype.trimright/README.md delete mode 100644 node_modules/string.prototype.trimright/implementation.js delete mode 100644 node_modules/string.prototype.trimright/index.js delete mode 100644 node_modules/string.prototype.trimright/package.json delete mode 100644 node_modules/string.prototype.trimright/polyfill.js delete mode 100644 node_modules/string.prototype.trimright/shim.js delete mode 100644 node_modules/string.prototype.trimright/test/index.js delete mode 100644 node_modules/string.prototype.trimright/test/shimmed.js delete mode 100644 node_modules/string.prototype.trimright/test/tests.js delete mode 100644 node_modules/strip-ansi/index.d.ts delete mode 100644 node_modules/strip-ansi/index.js delete mode 100644 node_modules/strip-ansi/license delete mode 100644 node_modules/strip-ansi/package.json delete mode 100644 node_modules/strip-ansi/readme.md delete mode 100644 node_modules/strip-bom/index.js delete mode 100644 node_modules/strip-bom/license delete mode 100644 node_modules/strip-bom/package.json delete mode 100644 node_modules/strip-bom/readme.md delete mode 100644 node_modules/strip-eof/index.js delete mode 100644 node_modules/strip-eof/license delete mode 100644 node_modules/strip-eof/package.json delete mode 100644 node_modules/strip-eof/readme.md delete mode 100644 node_modules/supports-color/browser.js delete mode 100644 node_modules/supports-color/index.js delete mode 100644 node_modules/supports-color/license delete mode 100644 node_modules/supports-color/package.json delete mode 100644 node_modules/supports-color/readme.md delete mode 100644 node_modules/symbol-tree/LICENSE delete mode 100644 node_modules/symbol-tree/README.md delete mode 100644 node_modules/symbol-tree/lib/SymbolTree.js delete mode 100644 node_modules/symbol-tree/lib/SymbolTreeNode.js delete mode 100644 node_modules/symbol-tree/lib/TreeIterator.js delete mode 100644 node_modules/symbol-tree/lib/TreePosition.js delete mode 100644 node_modules/symbol-tree/package.json delete mode 100644 node_modules/test-exclude/CHANGELOG.md delete mode 100644 node_modules/test-exclude/LICENSE.txt delete mode 100644 node_modules/test-exclude/README.md delete mode 100644 node_modules/test-exclude/index.js delete mode 100644 node_modules/test-exclude/package.json delete mode 100644 node_modules/throat/LICENSE delete mode 100644 node_modules/throat/README.md delete mode 100644 node_modules/throat/index.d.ts delete mode 100644 node_modules/throat/index.js delete mode 100644 node_modules/throat/index.js.flow delete mode 100644 node_modules/throat/package.json delete mode 100644 node_modules/tmpl/.travis.yml delete mode 100644 node_modules/tmpl/lib/tmpl.js delete mode 100644 node_modules/tmpl/license delete mode 100644 node_modules/tmpl/package.json delete mode 100644 node_modules/tmpl/readme.md delete mode 100644 node_modules/to-fast-properties/index.js delete mode 100644 node_modules/to-fast-properties/license delete mode 100644 node_modules/to-fast-properties/package.json delete mode 100644 node_modules/to-fast-properties/readme.md delete mode 100644 node_modules/to-object-path/LICENSE delete mode 100644 node_modules/to-object-path/README.md delete mode 100644 node_modules/to-object-path/index.js delete mode 100644 node_modules/to-object-path/node_modules/kind-of/LICENSE delete mode 100644 node_modules/to-object-path/node_modules/kind-of/README.md delete mode 100644 node_modules/to-object-path/node_modules/kind-of/index.js delete mode 100644 node_modules/to-object-path/node_modules/kind-of/package.json delete mode 100644 node_modules/to-object-path/package.json delete mode 100644 node_modules/to-regex-range/LICENSE delete mode 100644 node_modules/to-regex-range/README.md delete mode 100644 node_modules/to-regex-range/index.js delete mode 100644 node_modules/to-regex-range/package.json delete mode 100644 node_modules/to-regex/LICENSE delete mode 100644 node_modules/to-regex/README.md delete mode 100644 node_modules/to-regex/index.js delete mode 100644 node_modules/to-regex/package.json delete mode 100644 node_modules/tough-cookie/LICENSE delete mode 100644 node_modules/tough-cookie/README.md delete mode 100644 node_modules/tough-cookie/lib/cookie.js delete mode 100644 node_modules/tough-cookie/lib/memstore.js delete mode 100644 node_modules/tough-cookie/lib/pathMatch.js delete mode 100644 node_modules/tough-cookie/lib/permuteDomain.js delete mode 100644 node_modules/tough-cookie/lib/pubsuffix-psl.js delete mode 100644 node_modules/tough-cookie/lib/store.js delete mode 100644 node_modules/tough-cookie/lib/version.js delete mode 100644 node_modules/tough-cookie/package.json delete mode 100644 node_modules/tr46/LICENSE.md delete mode 100644 node_modules/tr46/README.md delete mode 100644 node_modules/tr46/index.js delete mode 100644 node_modules/tr46/lib/mappingTable.json delete mode 100644 node_modules/tr46/lib/regexes.js delete mode 100644 node_modules/tr46/package.json delete mode 100644 node_modules/trim-right/index.js delete mode 100644 node_modules/trim-right/license delete mode 100644 node_modules/trim-right/package.json delete mode 100644 node_modules/trim-right/readme.md delete mode 100644 node_modules/ts-jest/.gitattributes delete mode 100644 node_modules/ts-jest/.ts-jest-digest delete mode 100644 node_modules/ts-jest/CHANGELOG.md delete mode 100644 node_modules/ts-jest/CONTRIBUTING.md delete mode 100644 node_modules/ts-jest/LICENSE.md delete mode 100644 node_modules/ts-jest/README.md delete mode 100644 node_modules/ts-jest/cli.js delete mode 100644 node_modules/ts-jest/dist/cli/config/init.d.ts delete mode 100644 node_modules/ts-jest/dist/cli/config/init.js delete mode 100644 node_modules/ts-jest/dist/cli/config/migrate.d.ts delete mode 100644 node_modules/ts-jest/dist/cli/config/migrate.js delete mode 100644 node_modules/ts-jest/dist/cli/help.d.ts delete mode 100644 node_modules/ts-jest/dist/cli/help.js delete mode 100644 node_modules/ts-jest/dist/cli/helpers/presets.d.ts delete mode 100644 node_modules/ts-jest/dist/cli/helpers/presets.js delete mode 100644 node_modules/ts-jest/dist/cli/index.d.ts delete mode 100644 node_modules/ts-jest/dist/cli/index.js delete mode 100644 node_modules/ts-jest/dist/compiler.d.ts delete mode 100644 node_modules/ts-jest/dist/compiler.js delete mode 100644 node_modules/ts-jest/dist/config/config-set.d.ts delete mode 100644 node_modules/ts-jest/dist/config/config-set.js delete mode 100644 node_modules/ts-jest/dist/config/create-jest-preset.d.ts delete mode 100644 node_modules/ts-jest/dist/config/create-jest-preset.js delete mode 100644 node_modules/ts-jest/dist/config/paths-to-module-name-mapper.d.ts delete mode 100644 node_modules/ts-jest/dist/config/paths-to-module-name-mapper.js delete mode 100644 node_modules/ts-jest/dist/index.d.ts delete mode 100644 node_modules/ts-jest/dist/index.js delete mode 100644 node_modules/ts-jest/dist/transformers/hoist-jest.d.ts delete mode 100644 node_modules/ts-jest/dist/transformers/hoist-jest.js delete mode 100644 node_modules/ts-jest/dist/transformers/index.d.ts delete mode 100644 node_modules/ts-jest/dist/transformers/index.js delete mode 100644 node_modules/ts-jest/dist/ts-jest-transformer.d.ts delete mode 100644 node_modules/ts-jest/dist/ts-jest-transformer.js delete mode 100644 node_modules/ts-jest/dist/types.d.ts delete mode 100644 node_modules/ts-jest/dist/types.js delete mode 100644 node_modules/ts-jest/dist/util/backports.d.ts delete mode 100644 node_modules/ts-jest/dist/util/backports.js delete mode 100644 node_modules/ts-jest/dist/util/exported.d.ts delete mode 100644 node_modules/ts-jest/dist/util/exported.js delete mode 100644 node_modules/ts-jest/dist/util/get-package-version.d.ts delete mode 100644 node_modules/ts-jest/dist/util/get-package-version.js delete mode 100644 node_modules/ts-jest/dist/util/importer.d.ts delete mode 100644 node_modules/ts-jest/dist/util/importer.js delete mode 100644 node_modules/ts-jest/dist/util/json.d.ts delete mode 100644 node_modules/ts-jest/dist/util/json.js delete mode 100644 node_modules/ts-jest/dist/util/jsonable-value.d.ts delete mode 100644 node_modules/ts-jest/dist/util/jsonable-value.js delete mode 100644 node_modules/ts-jest/dist/util/logger.d.ts delete mode 100644 node_modules/ts-jest/dist/util/logger.js delete mode 100644 node_modules/ts-jest/dist/util/memoize.d.ts delete mode 100644 node_modules/ts-jest/dist/util/memoize.js delete mode 100644 node_modules/ts-jest/dist/util/messages.d.ts delete mode 100644 node_modules/ts-jest/dist/util/messages.js delete mode 100644 node_modules/ts-jest/dist/util/normalize-slashes.d.ts delete mode 100644 node_modules/ts-jest/dist/util/normalize-slashes.js delete mode 100644 node_modules/ts-jest/dist/util/sha1.d.ts delete mode 100644 node_modules/ts-jest/dist/util/sha1.js delete mode 100644 node_modules/ts-jest/dist/util/testing.d.ts delete mode 100644 node_modules/ts-jest/dist/util/testing.js delete mode 100644 node_modules/ts-jest/dist/util/ts-error.d.ts delete mode 100644 node_modules/ts-jest/dist/util/ts-error.js delete mode 100644 node_modules/ts-jest/dist/util/version-checkers.d.ts delete mode 100644 node_modules/ts-jest/dist/util/version-checkers.js delete mode 100644 node_modules/ts-jest/icon.png delete mode 100644 node_modules/ts-jest/jest-preset.js delete mode 100644 node_modules/ts-jest/node_modules/.bin/semver delete mode 100644 node_modules/ts-jest/node_modules/.bin/semver.cmd delete mode 100644 node_modules/ts-jest/node_modules/camelcase/index.js delete mode 100644 node_modules/ts-jest/node_modules/camelcase/license delete mode 100644 node_modules/ts-jest/node_modules/camelcase/package.json delete mode 100644 node_modules/ts-jest/node_modules/camelcase/readme.md delete mode 100644 node_modules/ts-jest/node_modules/semver/CHANGELOG.md delete mode 100644 node_modules/ts-jest/node_modules/semver/LICENSE delete mode 100644 node_modules/ts-jest/node_modules/semver/README.md delete mode 100644 node_modules/ts-jest/node_modules/semver/bin/semver delete mode 100644 node_modules/ts-jest/node_modules/semver/package.json delete mode 100644 node_modules/ts-jest/node_modules/semver/range.bnf delete mode 100644 node_modules/ts-jest/node_modules/semver/semver.js delete mode 100644 node_modules/ts-jest/node_modules/yargs-parser/CHANGELOG.md delete mode 100644 node_modules/ts-jest/node_modules/yargs-parser/LICENSE.txt delete mode 100644 node_modules/ts-jest/node_modules/yargs-parser/README.md delete mode 100644 node_modules/ts-jest/node_modules/yargs-parser/index.js delete mode 100644 node_modules/ts-jest/node_modules/yargs-parser/lib/tokenize-arg-string.js delete mode 100644 node_modules/ts-jest/node_modules/yargs-parser/package.json delete mode 100644 node_modules/ts-jest/package.json delete mode 100644 node_modules/ts-jest/preprocessor.js delete mode 100644 node_modules/ts-jest/presets/create.js delete mode 100644 node_modules/ts-jest/presets/default/jest-preset.js delete mode 100644 node_modules/ts-jest/presets/index.d.ts delete mode 100644 node_modules/ts-jest/presets/index.js delete mode 100644 node_modules/ts-jest/presets/js-with-babel/jest-preset.js delete mode 100644 node_modules/ts-jest/presets/js-with-ts/jest-preset.js delete mode 100644 node_modules/ts-jest/utils/index.d.ts delete mode 100644 node_modules/ts-jest/utils/index.js delete mode 100644 node_modules/tunnel-agent/LICENSE delete mode 100644 node_modules/tunnel-agent/README.md delete mode 100644 node_modules/tunnel-agent/index.js delete mode 100644 node_modules/tunnel-agent/package.json delete mode 100644 node_modules/tweetnacl/.npmignore delete mode 100644 node_modules/tweetnacl/AUTHORS.md delete mode 100644 node_modules/tweetnacl/CHANGELOG.md delete mode 100644 node_modules/tweetnacl/LICENSE delete mode 100644 node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md delete mode 100644 node_modules/tweetnacl/README.md delete mode 100644 node_modules/tweetnacl/nacl-fast.js delete mode 100644 node_modules/tweetnacl/nacl-fast.min.js delete mode 100644 node_modules/tweetnacl/nacl.d.ts delete mode 100644 node_modules/tweetnacl/nacl.js delete mode 100644 node_modules/tweetnacl/nacl.min.js delete mode 100644 node_modules/tweetnacl/package.json delete mode 100644 node_modules/type-check/LICENSE delete mode 100644 node_modules/type-check/README.md delete mode 100644 node_modules/type-check/lib/check.js delete mode 100644 node_modules/type-check/lib/index.js delete mode 100644 node_modules/type-check/lib/parse-type.js delete mode 100644 node_modules/type-check/package.json delete mode 100644 node_modules/type-fest/index.d.ts delete mode 100644 node_modules/type-fest/license delete mode 100644 node_modules/type-fest/package.json delete mode 100644 node_modules/type-fest/readme.md delete mode 100644 node_modules/type-fest/source/basic.d.ts delete mode 100644 node_modules/type-fest/source/except.d.ts delete mode 100644 node_modules/type-fest/source/literal-union.d.ts delete mode 100644 node_modules/type-fest/source/merge-exclusive.d.ts delete mode 100644 node_modules/type-fest/source/merge.d.ts delete mode 100644 node_modules/type-fest/source/mutable.d.ts delete mode 100644 node_modules/type-fest/source/package-json.d.ts delete mode 100644 node_modules/type-fest/source/promisable.d.ts delete mode 100644 node_modules/type-fest/source/readonly-deep.d.ts delete mode 100644 node_modules/type-fest/source/require-at-least-one.d.ts delete mode 100644 node_modules/uglify-js/LICENSE delete mode 100644 node_modules/uglify-js/README.md delete mode 100644 node_modules/uglify-js/bin/uglifyjs delete mode 100644 node_modules/uglify-js/lib/ast.js delete mode 100644 node_modules/uglify-js/lib/compress.js delete mode 100644 node_modules/uglify-js/lib/minify.js delete mode 100644 node_modules/uglify-js/lib/mozilla-ast.js delete mode 100644 node_modules/uglify-js/lib/output.js delete mode 100644 node_modules/uglify-js/lib/parse.js delete mode 100644 node_modules/uglify-js/lib/propmangle.js delete mode 100644 node_modules/uglify-js/lib/scope.js delete mode 100644 node_modules/uglify-js/lib/sourcemap.js delete mode 100644 node_modules/uglify-js/lib/transform.js delete mode 100644 node_modules/uglify-js/lib/utils.js delete mode 100644 node_modules/uglify-js/package.json delete mode 100644 node_modules/uglify-js/tools/domprops.json delete mode 100644 node_modules/uglify-js/tools/exit.js delete mode 100644 node_modules/uglify-js/tools/exports.js delete mode 100644 node_modules/uglify-js/tools/node.js delete mode 100644 node_modules/uglify-js/tools/props.html delete mode 100644 node_modules/union-value/LICENSE delete mode 100644 node_modules/union-value/README.md delete mode 100644 node_modules/union-value/index.js delete mode 100644 node_modules/union-value/package.json delete mode 100644 node_modules/unset-value/LICENSE delete mode 100644 node_modules/unset-value/README.md delete mode 100644 node_modules/unset-value/index.js delete mode 100644 node_modules/unset-value/node_modules/has-value/LICENSE delete mode 100644 node_modules/unset-value/node_modules/has-value/README.md delete mode 100644 node_modules/unset-value/node_modules/has-value/index.js delete mode 100644 node_modules/unset-value/node_modules/has-value/node_modules/isobject/LICENSE delete mode 100644 node_modules/unset-value/node_modules/has-value/node_modules/isobject/README.md delete mode 100644 node_modules/unset-value/node_modules/has-value/node_modules/isobject/index.js delete mode 100644 node_modules/unset-value/node_modules/has-value/node_modules/isobject/package.json delete mode 100644 node_modules/unset-value/node_modules/has-value/package.json delete mode 100644 node_modules/unset-value/node_modules/has-values/LICENSE delete mode 100644 node_modules/unset-value/node_modules/has-values/README.md delete mode 100644 node_modules/unset-value/node_modules/has-values/index.js delete mode 100644 node_modules/unset-value/node_modules/has-values/package.json delete mode 100644 node_modules/unset-value/package.json delete mode 100644 node_modules/uri-js/README.md delete mode 100644 node_modules/uri-js/bower.json delete mode 100644 node_modules/uri-js/dist/es5/uri.all.d.ts delete mode 100644 node_modules/uri-js/dist/es5/uri.all.js delete mode 100644 node_modules/uri-js/dist/es5/uri.all.js.map delete mode 100644 node_modules/uri-js/dist/es5/uri.all.min.d.ts delete mode 100644 node_modules/uri-js/dist/es5/uri.all.min.js delete mode 100644 node_modules/uri-js/dist/es5/uri.all.min.js.map delete mode 100644 node_modules/uri-js/dist/esnext/index.d.ts delete mode 100644 node_modules/uri-js/dist/esnext/index.js delete mode 100644 node_modules/uri-js/dist/esnext/index.js.map delete mode 100644 node_modules/uri-js/dist/esnext/regexps-iri.d.ts delete mode 100644 node_modules/uri-js/dist/esnext/regexps-iri.js delete mode 100644 node_modules/uri-js/dist/esnext/regexps-iri.js.map delete mode 100644 node_modules/uri-js/dist/esnext/regexps-uri.d.ts delete mode 100644 node_modules/uri-js/dist/esnext/regexps-uri.js delete mode 100644 node_modules/uri-js/dist/esnext/regexps-uri.js.map delete mode 100644 node_modules/uri-js/dist/esnext/schemes/http.d.ts delete mode 100644 node_modules/uri-js/dist/esnext/schemes/http.js delete mode 100644 node_modules/uri-js/dist/esnext/schemes/http.js.map delete mode 100644 node_modules/uri-js/dist/esnext/schemes/https.d.ts delete mode 100644 node_modules/uri-js/dist/esnext/schemes/https.js delete mode 100644 node_modules/uri-js/dist/esnext/schemes/https.js.map delete mode 100644 node_modules/uri-js/dist/esnext/schemes/mailto.d.ts delete mode 100644 node_modules/uri-js/dist/esnext/schemes/mailto.js delete mode 100644 node_modules/uri-js/dist/esnext/schemes/mailto.js.map delete mode 100644 node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts delete mode 100644 node_modules/uri-js/dist/esnext/schemes/urn-uuid.js delete mode 100644 node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map delete mode 100644 node_modules/uri-js/dist/esnext/schemes/urn.d.ts delete mode 100644 node_modules/uri-js/dist/esnext/schemes/urn.js delete mode 100644 node_modules/uri-js/dist/esnext/schemes/urn.js.map delete mode 100644 node_modules/uri-js/dist/esnext/uri.d.ts delete mode 100644 node_modules/uri-js/dist/esnext/uri.js delete mode 100644 node_modules/uri-js/dist/esnext/uri.js.map delete mode 100644 node_modules/uri-js/dist/esnext/util.d.ts delete mode 100644 node_modules/uri-js/dist/esnext/util.js delete mode 100644 node_modules/uri-js/dist/esnext/util.js.map delete mode 100644 node_modules/uri-js/package.json delete mode 100644 node_modules/uri-js/rollup.config.js delete mode 100644 node_modules/uri-js/src/index.ts delete mode 100644 node_modules/uri-js/src/punycode.d.ts delete mode 100644 node_modules/uri-js/src/regexps-iri.ts delete mode 100644 node_modules/uri-js/src/regexps-uri.ts delete mode 100644 node_modules/uri-js/src/schemes/http.ts delete mode 100644 node_modules/uri-js/src/schemes/https.ts delete mode 100644 node_modules/uri-js/src/schemes/mailto.ts delete mode 100644 node_modules/uri-js/src/schemes/urn-uuid.ts delete mode 100644 node_modules/uri-js/src/schemes/urn.ts delete mode 100644 node_modules/uri-js/src/uri.ts delete mode 100644 node_modules/uri-js/src/util.ts delete mode 100644 node_modules/uri-js/tests/qunit.css delete mode 100644 node_modules/uri-js/tests/qunit.js delete mode 100644 node_modules/uri-js/tests/test-es5-min.html delete mode 100644 node_modules/uri-js/tests/test-es5.html delete mode 100644 node_modules/uri-js/tests/tests.js delete mode 100644 node_modules/uri-js/tsconfig.json delete mode 100644 node_modules/uri-js/yarn.lock delete mode 100644 node_modules/urix/.jshintrc delete mode 100644 node_modules/urix/LICENSE delete mode 100644 node_modules/urix/index.js delete mode 100644 node_modules/urix/package.json delete mode 100644 node_modules/urix/readme.md delete mode 100644 node_modules/urix/test/index.js delete mode 100644 node_modules/use/LICENSE delete mode 100644 node_modules/use/README.md delete mode 100644 node_modules/use/index.js delete mode 100644 node_modules/use/package.json delete mode 100644 node_modules/util.promisify/.eslintrc delete mode 100644 node_modules/util.promisify/.npmignore delete mode 100644 node_modules/util.promisify/.travis.yml delete mode 100644 node_modules/util.promisify/CHANGELOG.md delete mode 100644 node_modules/util.promisify/LICENSE delete mode 100644 node_modules/util.promisify/README.md delete mode 100644 node_modules/util.promisify/implementation.js delete mode 100644 node_modules/util.promisify/index.js delete mode 100644 node_modules/util.promisify/package.json delete mode 100644 node_modules/util.promisify/polyfill.js delete mode 100644 node_modules/util.promisify/shim.js delete mode 100644 node_modules/validate-npm-package-license/LICENSE delete mode 100644 node_modules/validate-npm-package-license/README.md delete mode 100644 node_modules/validate-npm-package-license/index.js delete mode 100644 node_modules/validate-npm-package-license/package.json delete mode 100644 node_modules/verror/.npmignore delete mode 100644 node_modules/verror/CHANGES.md delete mode 100644 node_modules/verror/CONTRIBUTING.md delete mode 100644 node_modules/verror/LICENSE delete mode 100644 node_modules/verror/README.md delete mode 100644 node_modules/verror/lib/verror.js delete mode 100644 node_modules/verror/package.json delete mode 100644 node_modules/w3c-hr-time/CHANGELOG.md delete mode 100644 node_modules/w3c-hr-time/README.md delete mode 100644 node_modules/w3c-hr-time/index.js delete mode 100644 node_modules/w3c-hr-time/lib/calculate-clock-offset.js delete mode 100644 node_modules/w3c-hr-time/lib/clock-is-accurate.js delete mode 100644 node_modules/w3c-hr-time/lib/global-monotonic-clock.js delete mode 100644 node_modules/w3c-hr-time/lib/performance.js delete mode 100644 node_modules/w3c-hr-time/lib/utils.js delete mode 100644 node_modules/w3c-hr-time/package.json delete mode 100644 node_modules/walker/.travis.yml delete mode 100644 node_modules/walker/LICENSE delete mode 100644 node_modules/walker/lib/walker.js delete mode 100644 node_modules/walker/package.json delete mode 100644 node_modules/walker/readme.md delete mode 100644 node_modules/webidl-conversions/LICENSE.md delete mode 100644 node_modules/webidl-conversions/README.md delete mode 100644 node_modules/webidl-conversions/lib/index.js delete mode 100644 node_modules/webidl-conversions/package.json delete mode 100644 node_modules/whatwg-encoding/LICENSE.txt delete mode 100644 node_modules/whatwg-encoding/README.md delete mode 100644 node_modules/whatwg-encoding/lib/labels-to-names.json delete mode 100644 node_modules/whatwg-encoding/lib/supported-names.json delete mode 100644 node_modules/whatwg-encoding/lib/whatwg-encoding.js delete mode 100644 node_modules/whatwg-encoding/package.json delete mode 100644 node_modules/whatwg-mimetype/LICENSE.txt delete mode 100644 node_modules/whatwg-mimetype/README.md delete mode 100644 node_modules/whatwg-mimetype/lib/mime-type.js delete mode 100644 node_modules/whatwg-mimetype/lib/parser.js delete mode 100644 node_modules/whatwg-mimetype/lib/serializer.js delete mode 100644 node_modules/whatwg-mimetype/lib/utils.js delete mode 100644 node_modules/whatwg-mimetype/package.json delete mode 100644 node_modules/whatwg-url/LICENSE.txt delete mode 100644 node_modules/whatwg-url/README.md delete mode 100644 node_modules/whatwg-url/lib/URL-impl.js delete mode 100644 node_modules/whatwg-url/lib/URL.js delete mode 100644 node_modules/whatwg-url/lib/URLSearchParams-impl.js delete mode 100644 node_modules/whatwg-url/lib/URLSearchParams.js delete mode 100644 node_modules/whatwg-url/lib/infra.js delete mode 100644 node_modules/whatwg-url/lib/public-api.js delete mode 100644 node_modules/whatwg-url/lib/url-state-machine.js delete mode 100644 node_modules/whatwg-url/lib/urlencoded.js delete mode 100644 node_modules/whatwg-url/lib/utils.js delete mode 100644 node_modules/whatwg-url/package.json delete mode 100644 node_modules/which-module/CHANGELOG.md delete mode 100644 node_modules/which-module/LICENSE delete mode 100644 node_modules/which-module/README.md delete mode 100644 node_modules/which-module/index.js delete mode 100644 node_modules/which-module/package.json delete mode 100644 node_modules/which/CHANGELOG.md delete mode 100644 node_modules/which/LICENSE delete mode 100644 node_modules/which/README.md delete mode 100644 node_modules/which/bin/which delete mode 100644 node_modules/which/package.json delete mode 100644 node_modules/which/which.js delete mode 100644 node_modules/wordwrap/LICENSE delete mode 100644 node_modules/wordwrap/README.markdown delete mode 100644 node_modules/wordwrap/example/center.js delete mode 100644 node_modules/wordwrap/example/meat.js delete mode 100644 node_modules/wordwrap/index.js delete mode 100644 node_modules/wordwrap/package.json delete mode 100644 node_modules/wordwrap/test/break.js delete mode 100644 node_modules/wordwrap/test/idleness.txt delete mode 100644 node_modules/wordwrap/test/wrap.js delete mode 100644 node_modules/wrap-ansi/index.js delete mode 100644 node_modules/wrap-ansi/license delete mode 100644 node_modules/wrap-ansi/package.json delete mode 100644 node_modules/wrap-ansi/readme.md delete mode 100644 node_modules/wrappy/LICENSE delete mode 100644 node_modules/wrappy/README.md delete mode 100644 node_modules/wrappy/package.json delete mode 100644 node_modules/wrappy/wrappy.js delete mode 100644 node_modules/write-file-atomic/CHANGELOG.md delete mode 100644 node_modules/write-file-atomic/LICENSE delete mode 100644 node_modules/write-file-atomic/README.md delete mode 100644 node_modules/write-file-atomic/index.js delete mode 100644 node_modules/write-file-atomic/package.json delete mode 100644 node_modules/ws/LICENSE delete mode 100644 node_modules/ws/README.md delete mode 100644 node_modules/ws/index.js delete mode 100644 node_modules/ws/lib/buffer-util.js delete mode 100644 node_modules/ws/lib/constants.js delete mode 100644 node_modules/ws/lib/event-target.js delete mode 100644 node_modules/ws/lib/extension.js delete mode 100644 node_modules/ws/lib/permessage-deflate.js delete mode 100644 node_modules/ws/lib/receiver.js delete mode 100644 node_modules/ws/lib/sender.js delete mode 100644 node_modules/ws/lib/validation.js delete mode 100644 node_modules/ws/lib/websocket-server.js delete mode 100644 node_modules/ws/lib/websocket.js delete mode 100644 node_modules/ws/package.json delete mode 100644 node_modules/xml-name-validator/LICENSE.txt delete mode 100644 node_modules/xml-name-validator/README.md delete mode 100644 node_modules/xml-name-validator/lib/generated-parser.js delete mode 100644 node_modules/xml-name-validator/lib/grammar.pegjs delete mode 100644 node_modules/xml-name-validator/lib/xml-name-validator.js delete mode 100644 node_modules/xml-name-validator/package.json delete mode 100644 node_modules/y18n/CHANGELOG.md delete mode 100644 node_modules/y18n/LICENSE delete mode 100644 node_modules/y18n/README.md delete mode 100644 node_modules/y18n/index.js delete mode 100644 node_modules/y18n/package.json delete mode 100644 node_modules/yargs-parser/CHANGELOG.md delete mode 100644 node_modules/yargs-parser/LICENSE.txt delete mode 100644 node_modules/yargs-parser/README.md delete mode 100644 node_modules/yargs-parser/index.js delete mode 100644 node_modules/yargs-parser/lib/tokenize-arg-string.js delete mode 100644 node_modules/yargs-parser/package.json delete mode 100644 node_modules/yargs/CHANGELOG.md delete mode 100644 node_modules/yargs/LICENSE delete mode 100644 node_modules/yargs/README.md delete mode 100644 node_modules/yargs/index.js delete mode 100644 node_modules/yargs/lib/apply-extends.js delete mode 100644 node_modules/yargs/lib/argsert.js delete mode 100644 node_modules/yargs/lib/command.js delete mode 100644 node_modules/yargs/lib/completion-templates.js delete mode 100644 node_modules/yargs/lib/completion.js delete mode 100644 node_modules/yargs/lib/decamelize.js delete mode 100644 node_modules/yargs/lib/is-promise.js delete mode 100644 node_modules/yargs/lib/levenshtein.js delete mode 100644 node_modules/yargs/lib/middleware.js delete mode 100644 node_modules/yargs/lib/obj-filter.js delete mode 100644 node_modules/yargs/lib/usage.js delete mode 100644 node_modules/yargs/lib/validation.js delete mode 100644 node_modules/yargs/lib/yerror.js delete mode 100644 node_modules/yargs/locales/be.json delete mode 100644 node_modules/yargs/locales/de.json delete mode 100644 node_modules/yargs/locales/en.json delete mode 100644 node_modules/yargs/locales/es.json delete mode 100644 node_modules/yargs/locales/fr.json delete mode 100644 node_modules/yargs/locales/hi.json delete mode 100644 node_modules/yargs/locales/hu.json delete mode 100644 node_modules/yargs/locales/id.json delete mode 100644 node_modules/yargs/locales/it.json delete mode 100644 node_modules/yargs/locales/ja.json delete mode 100644 node_modules/yargs/locales/ko.json delete mode 100644 node_modules/yargs/locales/nb.json delete mode 100644 node_modules/yargs/locales/nl.json delete mode 100644 node_modules/yargs/locales/nn.json delete mode 100644 node_modules/yargs/locales/pirate.json delete mode 100644 node_modules/yargs/locales/pl.json delete mode 100644 node_modules/yargs/locales/pt.json delete mode 100644 node_modules/yargs/locales/pt_BR.json delete mode 100644 node_modules/yargs/locales/ru.json delete mode 100644 node_modules/yargs/locales/th.json delete mode 100644 node_modules/yargs/locales/tr.json delete mode 100644 node_modules/yargs/locales/zh_CN.json delete mode 100644 node_modules/yargs/locales/zh_TW.json delete mode 100644 node_modules/yargs/package.json delete mode 100644 node_modules/yargs/yargs.js diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 50c567c8..88d6d37f 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -5,7 +5,7 @@ jobs: name: Run runs-on: ${{ matrix.operating-system }} strategy: - max-parallel: 15 + max-parallel: 6 matrix: operating-system: [ubuntu-latest, windows-latest, macOS-latest] php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3'] @@ -25,3 +25,6 @@ jobs: run: node lib/install.js env: php-version: ${{ matrix.php-versions }} + extension-csv: "mbstring, curl, mysqli, json, xml, xdebug, pcov, phpdbg" + - name: Testing + run: php -m diff --git a/README.md b/README.md index 90410735..79886681 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ GitHub Actions status

-This action sets up a php environment along with composer on multiple platforms for use in github actions. +This action sets up a php environment along with composer and required PHP extensions on multiple platforms for use in github actions. # PHP Version Support - 5.6 @@ -18,6 +18,12 @@ This action sets up a php environment along with composer on multiple platforms - Windows (windows-latest) - MacOS (macOS-latest) +# PHP Extension Support +- On linux extensions which have the package in apt are installed. +- On Windows and MacOS pecl extensions are installed. +- Extensions which are installed along with PHP if specified are enabled. +- Extensions which cannot be installed gracefully leave an error message in the logs, the action is not interruped. + # Usage See [action.yml](action.yml) @@ -31,10 +37,13 @@ steps: uses: shivammathur/setup-php@master with: php-version: 7.3 + extension-csv: mbstring, xdebug - name: Check PHP Version run: php -v - name: Check Composer Version run: composer -V +- name: Check PHP Extensions + run: php -m ``` Matrix Testing: @@ -55,8 +64,13 @@ jobs: uses: shivammathur/setup-php@master with: php-version: ${{ matrix.php-versions }} + extension-csv: mbstring, xdebug - name: Check PHP Version run: php -v + - name: Check Composer Version + run: php -m + - name: Check PHP Extensions + run: php -m ``` diff --git a/action.yml b/action.yml index e5271762..4f4efebe 100644 --- a/action.yml +++ b/action.yml @@ -6,7 +6,9 @@ branding: color: 'purple' inputs: php-version: - description: 'PHP version to install.' + description: 'PHP version to be installed.' + extension-csv: + description: '(Optional) Comma seperated list of PHP extensions to be installed.' runs: using: 'node12' main: 'lib/install.js' diff --git a/lib/install.js b/lib/install.js index 4c1689f7..ee1e8e18 100644 --- a/lib/install.js +++ b/lib/install.js @@ -18,59 +18,108 @@ var __importStar = (this && this.__importStar) || function (mod) { Object.defineProperty(exports, "__esModule", { value: true }); const core = __importStar(require("@actions/core")); const exec_1 = require("@actions/exec/lib/exec"); -const fs = require('fs'); -let darwin = `echo $1 -ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" -brew unlink php -brew tap exolnet/homebrew-deprecated -brew tap homebrew/homebrew-php -brew install php@$1 -brew link --force --overwrite php@$1 -curl -sS https://getcomposer.org/installer | php -chmod +x composer.phar -mv composer.phar /usr/local/bin/composer -php -v -composer -V`; -let linux = `sudo add-apt-repository ppa:ondrej/php -y -sudo apt update -y -sudo apt install -y php$1 curl -sudo update-alternatives --set php /usr/bin/php$1 -sudo curl -s https://getcomposer.org/installer | php -sudo mv composer.phar /usr/local/bin/composer -php -v -composer -V`; -let windows = `param ( - [Parameter(Mandatory=$true)][string]$version = "7.3" -) - -echo "Installing NuGet" -Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -if($version -lt '7.0') { - echo "Installing Visual C++" - Install-Module -Name VcRedist -Force - New-Item -Path C:\\Temp\\VcRedist -ItemType Directory - Get-VcList | Save-VcRedist -Path C:\\Temp\\VcRedist - $VcList = Get-VcList - Install-VcRedist -Path C:\\Temp\\VcRedist -VcList $VcList -Silent +const path = __importStar(require("path")); +const httpm = __importStar(require("typed-rest-client/HttpClient")); +const fs = __importStar(require("fs")); +/* +Read the scripts +*/ +let darwin = fs.readFileSync(path.join(__dirname, '../src/darwin.sh'), 'utf8'); +let linux = fs.readFileSync(path.join(__dirname, '../src/linux.sh'), 'utf8'); +let windows = fs.readFileSync(path.join(__dirname, '../src/windows.ps1'), 'utf8'); +/* +Credit: https://github.com/Atinux +*/ +function asyncForEach(array, callback) { + return __awaiter(this, void 0, void 0, function* () { + for (let index = 0; index < array.length; index++) { + yield callback(array[index], index, array); + } + }); } -echo "Installing PhpManager" -Install-Module -Name PhpManager -Force -Scope CurrentUser -echo "Installing PHP" -Uninstall-Php C:\\tools\\php -Install-Php -Version $version -Architecture x86 -ThreadSafe $true -Path C:\\tools\\php$version -TimeZone UTC -echo "Switch PHP" -(Get-PhpSwitcher).targets -Initialize-PhpSwitcher -Alias C:\\tools\\php -Scope CurrentUser -Force -Add-PhpToSwitcher -Name $version -Path C:\\tools\\php$version -Force -Switch-Php $version -Force -echo "Housekeeping in PHP.ini, enabling openssl" -Move-item -Path C:\\tools\\php$version\\php.ini-development -Destination C:\\tools\\php$version\\php.ini -Force -Add-Content C:\\tools\\php$version\\php.ini "extension=C:\\tools\\php$version\\ext\\php_openssl.dll" -Add-Content C:\\tools\\php$version\\php.ini "date.timezone = 'UTC'" -echo "Installing Composer" -Install-Composer -Scope System -Path C:\\tools\\php -php -v -composer -V`; +/* +Enable functions which are installed but not enabled +*/ +function enableExtension(extension) { + return __awaiter(this, void 0, void 0, function* () { + windows += `try { + $ext_dir = Get-PhpIniKey extension_dir + $exist = Test-Path -Path $ext_dir\\php_${extension}.dll + $enabled = php -r "if (in_array('${extension}', get_loaded_extensions())) {echo 'yes';} else {echo 'no';}" + if($enabled -eq 'no' -and $exist) { + Enable-PhpExtension ${extension} C:\\tools\\php$version + } +} catch [Exception] { + echo $_ +}\n`; + let shell_code = `ext_dir=$(php -i | grep "extension_dir" | sed -e "s|.*=>\s*||") +enabled=$(php -r "if (in_array('${extension}', get_loaded_extensions())) {echo 'yes';} else {echo 'no';}") +if [ "$enabled" == 'no' ] && [ test -f "$ext_dir/${extension}.so" ]; then + echo "extension=${extension}.so" >> 'php -i | grep "Loaded Configuration" | sed -e "s|.*:\s*||"' +fi\n`; + linux += shell_code; + darwin += shell_code; + }); +} +/* +Install and enable extensions +*/ +function addExtension(extension_csv, version) { + return __awaiter(this, void 0, void 0, function* () { + let extensions = extension_csv + .split(',') + .map(function (extension) { + return extension + .trim() + .replace('php-', '') + .replace('php_', ''); + }); + linux += '\n'; + windows += '\n'; + darwin += '\n'; + yield asyncForEach(extensions, function (extension) { + return __awaiter(this, void 0, void 0, function* () { + enableExtension(extension); + linux += + 'sudo apt install -y php' + + version + + '-' + + extension + + ' || echo "Couldn\'t find extension php' + + version + + '-' + + extension + + '"\n'; + const http = new httpm.HttpClient('shivammathur/php-setup', [], { + allowRetries: true, + maxRetries: 2 + }); + const response = yield http.get('https://pecl.php.net/package/' + extension); + if (response.message.statusCode == 200) { + windows += + 'try { Install-PhpExtension ' + + extension + + ' } catch [Exception] { echo $_; echo "Could not install extension: "' + + extension + + ' }\n'; + darwin += + 'pecl install ' + + extension + + ' || echo "Couldn\'t find extension: ' + + extension + + '"\n'; + } + else { + console.log('Cannot find pecl extension: ' + extension); + } + }); + }); + linux += 'sudo apt autoremove -y'; + }); +} +/* +Write final script which runs +*/ function createScript(filename, version) { return __awaiter(this, void 0, void 0, function* () { let script = ''; @@ -91,6 +140,9 @@ function createScript(filename, version) { }); }); } +/* +Run the script +*/ function run() { return __awaiter(this, void 0, void 0, function* () { try { @@ -99,6 +151,14 @@ function run() { version = core.getInput('php-version', { required: true }); } console.log('Input: ' + version); + let extension_csv = process.env['extension-csv']; + if (!extension_csv) { + extension_csv = core.getInput('extension-csv'); + } + if (extension_csv) { + console.log('Input: ' + extension_csv); + yield addExtension(extension_csv, version); + } let os_version = process.platform; if (os_version == 'darwin') { yield createScript('darwin.sh', version); @@ -120,6 +180,7 @@ function run() { } }); } -run().then(() => { +// call the run function +run().then(function () { console.log('done'); }); diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn deleted file mode 100644 index 558ebb98..00000000 --- a/node_modules/.bin/acorn +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../acorn/bin/acorn" "$@" - ret=$? -else - node "$basedir/../acorn/bin/acorn" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/acorn.cmd b/node_modules/.bin/acorn.cmd deleted file mode 100644 index 45c0c3d0..00000000 --- a/node_modules/.bin/acorn.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\acorn\bin\acorn" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\acorn\bin\acorn" %* -) \ No newline at end of file diff --git a/node_modules/.bin/atob b/node_modules/.bin/atob deleted file mode 100644 index 50896794..00000000 --- a/node_modules/.bin/atob +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../atob/bin/atob.js" "$@" - ret=$? -else - node "$basedir/../atob/bin/atob.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/atob.cmd b/node_modules/.bin/atob.cmd deleted file mode 100644 index 34edc9aa..00000000 --- a/node_modules/.bin/atob.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\atob\bin\atob.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\atob\bin\atob.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/escodegen b/node_modules/.bin/escodegen deleted file mode 100644 index 4e46a489..00000000 --- a/node_modules/.bin/escodegen +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../escodegen/bin/escodegen.js" "$@" - ret=$? -else - node "$basedir/../escodegen/bin/escodegen.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/escodegen.cmd b/node_modules/.bin/escodegen.cmd deleted file mode 100644 index 8ffe3938..00000000 --- a/node_modules/.bin/escodegen.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\escodegen\bin\escodegen.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\escodegen\bin\escodegen.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/esgenerate b/node_modules/.bin/esgenerate deleted file mode 100644 index 5d097c36..00000000 --- a/node_modules/.bin/esgenerate +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../escodegen/bin/esgenerate.js" "$@" - ret=$? -else - node "$basedir/../escodegen/bin/esgenerate.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/esgenerate.cmd b/node_modules/.bin/esgenerate.cmd deleted file mode 100644 index 39593ad6..00000000 --- a/node_modules/.bin/esgenerate.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\escodegen\bin\esgenerate.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\escodegen\bin\esgenerate.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/esparse b/node_modules/.bin/esparse deleted file mode 100644 index 25255271..00000000 --- a/node_modules/.bin/esparse +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../esprima/bin/esparse.js" "$@" - ret=$? -else - node "$basedir/../esprima/bin/esparse.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/esparse.cmd b/node_modules/.bin/esparse.cmd deleted file mode 100644 index 064f58e3..00000000 --- a/node_modules/.bin/esparse.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\esprima\bin\esparse.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\esprima\bin\esparse.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/esvalidate b/node_modules/.bin/esvalidate deleted file mode 100644 index 2137cd5c..00000000 --- a/node_modules/.bin/esvalidate +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../esprima/bin/esvalidate.js" "$@" - ret=$? -else - node "$basedir/../esprima/bin/esvalidate.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/esvalidate.cmd b/node_modules/.bin/esvalidate.cmd deleted file mode 100644 index 8dfaec08..00000000 --- a/node_modules/.bin/esvalidate.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\esprima\bin\esvalidate.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\esprima\bin\esvalidate.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/handlebars b/node_modules/.bin/handlebars deleted file mode 100644 index a7dd0507..00000000 --- a/node_modules/.bin/handlebars +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../handlebars/bin/handlebars" "$@" - ret=$? -else - node "$basedir/../handlebars/bin/handlebars" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/handlebars.cmd b/node_modules/.bin/handlebars.cmd deleted file mode 100644 index 0738f3e7..00000000 --- a/node_modules/.bin/handlebars.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\handlebars\bin\handlebars" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\handlebars\bin\handlebars" %* -) \ No newline at end of file diff --git a/node_modules/.bin/husky-upgrade b/node_modules/.bin/husky-upgrade deleted file mode 100644 index cce59356..00000000 --- a/node_modules/.bin/husky-upgrade +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../husky/lib/upgrader/bin.js" "$@" - ret=$? -else - node "$basedir/../husky/lib/upgrader/bin.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/husky-upgrade.cmd b/node_modules/.bin/husky-upgrade.cmd deleted file mode 100644 index 06ec6440..00000000 --- a/node_modules/.bin/husky-upgrade.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\husky\lib\upgrader\bin.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\husky\lib\upgrader\bin.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/import-local-fixture b/node_modules/.bin/import-local-fixture deleted file mode 100644 index ceb37d3d..00000000 --- a/node_modules/.bin/import-local-fixture +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../import-local/fixtures/cli.js" "$@" - ret=$? -else - node "$basedir/../import-local/fixtures/cli.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/import-local-fixture.cmd b/node_modules/.bin/import-local-fixture.cmd deleted file mode 100644 index c3f354bb..00000000 --- a/node_modules/.bin/import-local-fixture.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\import-local\fixtures\cli.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\import-local\fixtures\cli.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/is-ci b/node_modules/.bin/is-ci deleted file mode 100644 index bc5605a8..00000000 --- a/node_modules/.bin/is-ci +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../is-ci/bin.js" "$@" - ret=$? -else - node "$basedir/../is-ci/bin.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/is-ci.cmd b/node_modules/.bin/is-ci.cmd deleted file mode 100644 index a68da492..00000000 --- a/node_modules/.bin/is-ci.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\is-ci\bin.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\is-ci\bin.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/jest b/node_modules/.bin/jest deleted file mode 100644 index fefabc5b..00000000 --- a/node_modules/.bin/jest +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../jest/bin/jest.js" "$@" - ret=$? -else - node "$basedir/../jest/bin/jest.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/jest-runtime b/node_modules/.bin/jest-runtime deleted file mode 100644 index aced78d5..00000000 --- a/node_modules/.bin/jest-runtime +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../jest-runtime/bin/jest-runtime.js" "$@" - ret=$? -else - node "$basedir/../jest-runtime/bin/jest-runtime.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/jest-runtime.cmd b/node_modules/.bin/jest-runtime.cmd deleted file mode 100644 index a15fbbb6..00000000 --- a/node_modules/.bin/jest-runtime.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\jest-runtime\bin\jest-runtime.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\jest-runtime\bin\jest-runtime.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/jest.cmd b/node_modules/.bin/jest.cmd deleted file mode 100644 index 09fbc343..00000000 --- a/node_modules/.bin/jest.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\jest\bin\jest.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\jest\bin\jest.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/js-yaml b/node_modules/.bin/js-yaml deleted file mode 100644 index 460d9df4..00000000 --- a/node_modules/.bin/js-yaml +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../js-yaml/bin/js-yaml.js" "$@" - ret=$? -else - node "$basedir/../js-yaml/bin/js-yaml.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/js-yaml.cmd b/node_modules/.bin/js-yaml.cmd deleted file mode 100644 index ae8e7bc2..00000000 --- a/node_modules/.bin/js-yaml.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\js-yaml\bin\js-yaml.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\js-yaml\bin\js-yaml.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/jsesc b/node_modules/.bin/jsesc deleted file mode 100644 index e59ea439..00000000 --- a/node_modules/.bin/jsesc +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../jsesc/bin/jsesc" "$@" - ret=$? -else - node "$basedir/../jsesc/bin/jsesc" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/jsesc.cmd b/node_modules/.bin/jsesc.cmd deleted file mode 100644 index 66206eaa..00000000 --- a/node_modules/.bin/jsesc.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\jsesc\bin\jsesc" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\jsesc\bin\jsesc" %* -) \ No newline at end of file diff --git a/node_modules/.bin/json5 b/node_modules/.bin/json5 deleted file mode 100644 index 71e29db4..00000000 --- a/node_modules/.bin/json5 +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../json5/lib/cli.js" "$@" - ret=$? -else - node "$basedir/../json5/lib/cli.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/json5.cmd b/node_modules/.bin/json5.cmd deleted file mode 100644 index 4ef655f8..00000000 --- a/node_modules/.bin/json5.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\json5\lib\cli.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\json5\lib\cli.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/loose-envify b/node_modules/.bin/loose-envify deleted file mode 100644 index 0939216f..00000000 --- a/node_modules/.bin/loose-envify +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../loose-envify/cli.js" "$@" - ret=$? -else - node "$basedir/../loose-envify/cli.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/loose-envify.cmd b/node_modules/.bin/loose-envify.cmd deleted file mode 100644 index 6238bbb2..00000000 --- a/node_modules/.bin/loose-envify.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\loose-envify\cli.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\loose-envify\cli.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp deleted file mode 100644 index 4b004672..00000000 --- a/node_modules/.bin/mkdirp +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@" - ret=$? -else - node "$basedir/../mkdirp/bin/cmd.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/mkdirp.cmd b/node_modules/.bin/mkdirp.cmd deleted file mode 100644 index 0d2cdd7c..00000000 --- a/node_modules/.bin/mkdirp.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\mkdirp\bin\cmd.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\mkdirp\bin\cmd.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/parser b/node_modules/.bin/parser deleted file mode 100644 index 59257856..00000000 --- a/node_modules/.bin/parser +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../@babel/parser/bin/babel-parser.js" "$@" - ret=$? -else - node "$basedir/../@babel/parser/bin/babel-parser.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/parser.cmd b/node_modules/.bin/parser.cmd deleted file mode 100644 index bbadb812..00000000 --- a/node_modules/.bin/parser.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\@babel\parser\bin\babel-parser.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\@babel\parser\bin\babel-parser.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/prettier b/node_modules/.bin/prettier deleted file mode 100644 index 4c8ec825..00000000 --- a/node_modules/.bin/prettier +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../prettier/bin-prettier.js" "$@" - ret=$? -else - node "$basedir/../prettier/bin-prettier.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/prettier.cmd b/node_modules/.bin/prettier.cmd deleted file mode 100644 index a6e910c8..00000000 --- a/node_modules/.bin/prettier.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\prettier\bin-prettier.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\prettier\bin-prettier.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/rimraf b/node_modules/.bin/rimraf deleted file mode 100644 index 3cebd6e8..00000000 --- a/node_modules/.bin/rimraf +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../rimraf/bin.js" "$@" - ret=$? -else - node "$basedir/../rimraf/bin.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/rimraf.cmd b/node_modules/.bin/rimraf.cmd deleted file mode 100644 index 9333ec64..00000000 --- a/node_modules/.bin/rimraf.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\rimraf\bin.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\rimraf\bin.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/run-node b/node_modules/.bin/run-node deleted file mode 100644 index 1efacac8..00000000 --- a/node_modules/.bin/run-node +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/bash" ]; then - "$basedir/bash" "$basedir/../run-node/run-node" "$@" - ret=$? -else - bash "$basedir/../run-node/run-node" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/run-node.cmd b/node_modules/.bin/run-node.cmd deleted file mode 100644 index 5c085ecd..00000000 --- a/node_modules/.bin/run-node.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\bash.exe" ( - "%~dp0\bash.exe" "%~dp0\..\run-node\run-node" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - bash "%~dp0\..\run-node\run-node" %* -) \ No newline at end of file diff --git a/node_modules/.bin/sane b/node_modules/.bin/sane deleted file mode 100644 index 08433d19..00000000 --- a/node_modules/.bin/sane +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../sane/src/cli.js" "$@" - ret=$? -else - node "$basedir/../sane/src/cli.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/sane.cmd b/node_modules/.bin/sane.cmd deleted file mode 100644 index 5cdb931e..00000000 --- a/node_modules/.bin/sane.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\sane\src\cli.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\sane\src\cli.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/sshpk-conv b/node_modules/.bin/sshpk-conv deleted file mode 100644 index c9c2987e..00000000 --- a/node_modules/.bin/sshpk-conv +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../sshpk/bin/sshpk-conv" "$@" - ret=$? -else - node "$basedir/../sshpk/bin/sshpk-conv" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/sshpk-conv.cmd b/node_modules/.bin/sshpk-conv.cmd deleted file mode 100644 index dde70b02..00000000 --- a/node_modules/.bin/sshpk-conv.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-conv" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\sshpk\bin\sshpk-conv" %* -) \ No newline at end of file diff --git a/node_modules/.bin/sshpk-sign b/node_modules/.bin/sshpk-sign deleted file mode 100644 index 1a921248..00000000 --- a/node_modules/.bin/sshpk-sign +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../sshpk/bin/sshpk-sign" "$@" - ret=$? -else - node "$basedir/../sshpk/bin/sshpk-sign" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/sshpk-sign.cmd b/node_modules/.bin/sshpk-sign.cmd deleted file mode 100644 index 45025ec1..00000000 --- a/node_modules/.bin/sshpk-sign.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-sign" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\sshpk\bin\sshpk-sign" %* -) \ No newline at end of file diff --git a/node_modules/.bin/sshpk-verify b/node_modules/.bin/sshpk-verify deleted file mode 100644 index 597a66b8..00000000 --- a/node_modules/.bin/sshpk-verify +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../sshpk/bin/sshpk-verify" "$@" - ret=$? -else - node "$basedir/../sshpk/bin/sshpk-verify" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/sshpk-verify.cmd b/node_modules/.bin/sshpk-verify.cmd deleted file mode 100644 index 1b5fc0c1..00000000 --- a/node_modules/.bin/sshpk-verify.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\sshpk\bin\sshpk-verify" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\sshpk\bin\sshpk-verify" %* -) \ No newline at end of file diff --git a/node_modules/.bin/ts-jest b/node_modules/.bin/ts-jest deleted file mode 100644 index 8a21bf22..00000000 --- a/node_modules/.bin/ts-jest +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../ts-jest/cli.js" "$@" - ret=$? -else - node "$basedir/../ts-jest/cli.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/ts-jest.cmd b/node_modules/.bin/ts-jest.cmd deleted file mode 100644 index 460b13ab..00000000 --- a/node_modules/.bin/ts-jest.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\ts-jest\cli.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\ts-jest\cli.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/uglifyjs b/node_modules/.bin/uglifyjs deleted file mode 100644 index de7b74f6..00000000 --- a/node_modules/.bin/uglifyjs +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../uglify-js/bin/uglifyjs" "$@" - ret=$? -else - node "$basedir/../uglify-js/bin/uglifyjs" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/uglifyjs.cmd b/node_modules/.bin/uglifyjs.cmd deleted file mode 100644 index 3306013e..00000000 --- a/node_modules/.bin/uglifyjs.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\uglify-js\bin\uglifyjs" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\uglify-js\bin\uglifyjs" %* -) \ No newline at end of file diff --git a/node_modules/.bin/watch b/node_modules/.bin/watch deleted file mode 100644 index f349c6c0..00000000 --- a/node_modules/.bin/watch +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../@cnakazawa/watch/cli.js" "$@" - ret=$? -else - node "$basedir/../@cnakazawa/watch/cli.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/watch.cmd b/node_modules/.bin/watch.cmd deleted file mode 100644 index b6e86aef..00000000 --- a/node_modules/.bin/watch.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\@cnakazawa\watch\cli.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\@cnakazawa\watch\cli.js" %* -) \ No newline at end of file diff --git a/node_modules/.bin/which b/node_modules/.bin/which deleted file mode 100644 index cbe872c6..00000000 --- a/node_modules/.bin/which +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../which/bin/which" "$@" - ret=$? -else - node "$basedir/../which/bin/which" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/which.cmd b/node_modules/.bin/which.cmd deleted file mode 100644 index 588f44d6..00000000 --- a/node_modules/.bin/which.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\which\bin\which" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\which\bin\which" %* -) \ No newline at end of file diff --git a/node_modules/@babel/code-frame/LICENSE b/node_modules/@babel/code-frame/LICENSE deleted file mode 100644 index f31575ec..00000000 --- a/node_modules/@babel/code-frame/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/code-frame/README.md b/node_modules/@babel/code-frame/README.md deleted file mode 100644 index 185f93d2..00000000 --- a/node_modules/@babel/code-frame/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/code-frame - -> Generate errors that contain a code frame that point to source locations. - -See our website [@babel/code-frame](https://babeljs.io/docs/en/next/babel-code-frame.html) for more information. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/code-frame -``` - -or using yarn: - -```sh -yarn add @babel/code-frame --dev -``` diff --git a/node_modules/@babel/code-frame/lib/index.js b/node_modules/@babel/code-frame/lib/index.js deleted file mode 100644 index 35176fbc..00000000 --- a/node_modules/@babel/code-frame/lib/index.js +++ /dev/null @@ -1,173 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.codeFrameColumns = codeFrameColumns; -exports.default = _default; - -function _highlight() { - const data = _interopRequireWildcard(require("@babel/highlight")); - - _highlight = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -let deprecationWarningShown = false; - -function getDefs(chalk) { - return { - gutter: chalk.grey, - marker: chalk.red.bold, - message: chalk.red.bold - }; -} - -const NEWLINE = /\r\n|[\n\r\u2028\u2029]/; - -function getMarkerLines(loc, source, opts) { - const startLoc = Object.assign({ - column: 0, - line: -1 - }, loc.start); - const endLoc = Object.assign({}, startLoc, loc.end); - const { - linesAbove = 2, - linesBelow = 3 - } = opts || {}; - const startLine = startLoc.line; - const startColumn = startLoc.column; - const endLine = endLoc.line; - const endColumn = endLoc.column; - let start = Math.max(startLine - (linesAbove + 1), 0); - let end = Math.min(source.length, endLine + linesBelow); - - if (startLine === -1) { - start = 0; - } - - if (endLine === -1) { - end = source.length; - } - - const lineDiff = endLine - startLine; - const markerLines = {}; - - if (lineDiff) { - for (let i = 0; i <= lineDiff; i++) { - const lineNumber = i + startLine; - - if (!startColumn) { - markerLines[lineNumber] = true; - } else if (i === 0) { - const sourceLength = source[lineNumber - 1].length; - markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; - } else if (i === lineDiff) { - markerLines[lineNumber] = [0, endColumn]; - } else { - const sourceLength = source[lineNumber - i].length; - markerLines[lineNumber] = [0, sourceLength]; - } - } - } else { - if (startColumn === endColumn) { - if (startColumn) { - markerLines[startLine] = [startColumn, 0]; - } else { - markerLines[startLine] = true; - } - } else { - markerLines[startLine] = [startColumn, endColumn - startColumn]; - } - } - - return { - start, - end, - markerLines - }; -} - -function codeFrameColumns(rawLines, loc, opts = {}) { - const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight().shouldHighlight)(opts); - const chalk = (0, _highlight().getChalk)(opts); - const defs = getDefs(chalk); - - const maybeHighlight = (chalkFn, string) => { - return highlighted ? chalkFn(string) : string; - }; - - const lines = rawLines.split(NEWLINE); - const { - start, - end, - markerLines - } = getMarkerLines(loc, lines, opts); - const hasColumns = loc.start && typeof loc.start.column === "number"; - const numberMaxWidth = String(end).length; - const highlightedLines = highlighted ? (0, _highlight().default)(rawLines, opts) : rawLines; - let frame = highlightedLines.split(NEWLINE).slice(start, end).map((line, index) => { - const number = start + 1 + index; - const paddedNumber = ` ${number}`.slice(-numberMaxWidth); - const gutter = ` ${paddedNumber} | `; - const hasMarker = markerLines[number]; - const lastMarkerLine = !markerLines[number + 1]; - - if (hasMarker) { - let markerLine = ""; - - if (Array.isArray(hasMarker)) { - const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); - const numberOfMarkers = hasMarker[1] || 1; - markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join(""); - - if (lastMarkerLine && opts.message) { - markerLine += " " + maybeHighlight(defs.message, opts.message); - } - } - - return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); - } else { - return ` ${maybeHighlight(defs.gutter, gutter)}${line}`; - } - }).join("\n"); - - if (opts.message && !hasColumns) { - frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`; - } - - if (highlighted) { - return chalk.reset(frame); - } else { - return frame; - } -} - -function _default(rawLines, lineNumber, colNumber, opts = {}) { - if (!deprecationWarningShown) { - deprecationWarningShown = true; - const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; - - if (process.emitWarning) { - process.emitWarning(message, "DeprecationWarning"); - } else { - const deprecationError = new Error(message); - deprecationError.name = "DeprecationWarning"; - console.warn(new Error(message)); - } - } - - colNumber = Math.max(colNumber, 0); - const location = { - start: { - column: colNumber, - line: lineNumber - } - }; - return codeFrameColumns(rawLines, location, opts); -} \ No newline at end of file diff --git a/node_modules/@babel/code-frame/package.json b/node_modules/@babel/code-frame/package.json deleted file mode 100644 index 374508d0..00000000 --- a/node_modules/@babel/code-frame/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_args": [ - [ - "@babel/code-frame@7.5.5", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@babel/code-frame@7.5.5", - "_id": "@babel/code-frame@7.5.5", - "_inBundle": false, - "_integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", - "_location": "/@babel/code-frame", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/code-frame@7.5.5", - "name": "@babel/code-frame", - "escapedName": "@babel%2fcode-frame", - "scope": "@babel", - "rawSpec": "7.5.5", - "saveSpec": null, - "fetchSpec": "7.5.5" - }, - "_requiredBy": [ - "/@babel/core", - "/@babel/template", - "/@babel/traverse", - "/jest-message-util", - "/read-pkg/parse-json" - ], - "_resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "_spec": "7.5.5", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "dependencies": { - "@babel/highlight": "^7.0.0" - }, - "description": "Generate errors that contain a code frame that point to source locations.", - "devDependencies": { - "chalk": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/code-frame", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-code-frame" - }, - "version": "7.5.5" -} diff --git a/node_modules/@babel/core/LICENSE b/node_modules/@babel/core/LICENSE deleted file mode 100644 index f31575ec..00000000 --- a/node_modules/@babel/core/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/core/README.md b/node_modules/@babel/core/README.md deleted file mode 100644 index 9b4b63dc..00000000 --- a/node_modules/@babel/core/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/core - -> Babel compiler core. - -See our website [@babel/core](https://babeljs.io/docs/en/next/babel-core.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen) associated with this package. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/core -``` - -or using yarn: - -```sh -yarn add @babel/core --dev -``` diff --git a/node_modules/@babel/core/lib/config/caching.js b/node_modules/@babel/core/lib/config/caching.js deleted file mode 100644 index 35f127ad..00000000 --- a/node_modules/@babel/core/lib/config/caching.js +++ /dev/null @@ -1,199 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.makeStrongCache = makeStrongCache; -exports.makeWeakCache = makeWeakCache; -exports.assertSimpleType = assertSimpleType; - -function makeStrongCache(handler) { - return makeCachedFunction(new Map(), handler); -} - -function makeWeakCache(handler) { - return makeCachedFunction(new WeakMap(), handler); -} - -function makeCachedFunction(callCache, handler) { - return function cachedFunction(arg, data) { - let cachedValue = callCache.get(arg); - - if (cachedValue) { - for (const _ref of cachedValue) { - const { - value, - valid - } = _ref; - if (valid(data)) return value; - } - } - - const cache = new CacheConfigurator(data); - const value = handler(arg, cache); - if (!cache.configured()) cache.forever(); - cache.deactivate(); - - switch (cache.mode()) { - case "forever": - cachedValue = [{ - value, - valid: () => true - }]; - callCache.set(arg, cachedValue); - break; - - case "invalidate": - cachedValue = [{ - value, - valid: cache.validator() - }]; - callCache.set(arg, cachedValue); - break; - - case "valid": - if (cachedValue) { - cachedValue.push({ - value, - valid: cache.validator() - }); - } else { - cachedValue = [{ - value, - valid: cache.validator() - }]; - callCache.set(arg, cachedValue); - } - - } - - return value; - }; -} - -class CacheConfigurator { - constructor(data) { - this._active = true; - this._never = false; - this._forever = false; - this._invalidate = false; - this._configured = false; - this._pairs = []; - this._data = data; - } - - simple() { - return makeSimpleConfigurator(this); - } - - mode() { - if (this._never) return "never"; - if (this._forever) return "forever"; - if (this._invalidate) return "invalidate"; - return "valid"; - } - - forever() { - if (!this._active) { - throw new Error("Cannot change caching after evaluation has completed."); - } - - if (this._never) { - throw new Error("Caching has already been configured with .never()"); - } - - this._forever = true; - this._configured = true; - } - - never() { - if (!this._active) { - throw new Error("Cannot change caching after evaluation has completed."); - } - - if (this._forever) { - throw new Error("Caching has already been configured with .forever()"); - } - - this._never = true; - this._configured = true; - } - - using(handler) { - if (!this._active) { - throw new Error("Cannot change caching after evaluation has completed."); - } - - if (this._never || this._forever) { - throw new Error("Caching has already been configured with .never or .forever()"); - } - - this._configured = true; - const key = handler(this._data); - - this._pairs.push([key, handler]); - - return key; - } - - invalidate(handler) { - if (!this._active) { - throw new Error("Cannot change caching after evaluation has completed."); - } - - if (this._never || this._forever) { - throw new Error("Caching has already been configured with .never or .forever()"); - } - - this._invalidate = true; - this._configured = true; - const key = handler(this._data); - - this._pairs.push([key, handler]); - - return key; - } - - validator() { - const pairs = this._pairs; - return data => pairs.every(([key, fn]) => key === fn(data)); - } - - deactivate() { - this._active = false; - } - - configured() { - return this._configured; - } - -} - -function makeSimpleConfigurator(cache) { - function cacheFn(val) { - if (typeof val === "boolean") { - if (val) cache.forever();else cache.never(); - return; - } - - return cache.using(() => assertSimpleType(val())); - } - - cacheFn.forever = () => cache.forever(); - - cacheFn.never = () => cache.never(); - - cacheFn.using = cb => cache.using(() => assertSimpleType(cb())); - - cacheFn.invalidate = cb => cache.invalidate(() => assertSimpleType(cb())); - - return cacheFn; -} - -function assertSimpleType(value) { - if (value != null && typeof value !== "string" && typeof value !== "boolean" && typeof value !== "number") { - throw new Error("Cache keys must be either string, boolean, number, null, or undefined."); - } - - return value; -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/config-chain.js b/node_modules/@babel/core/lib/config/config-chain.js deleted file mode 100644 index 8531aae5..00000000 --- a/node_modules/@babel/core/lib/config/config-chain.js +++ /dev/null @@ -1,439 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.buildPresetChain = buildPresetChain; -exports.buildRootChain = buildRootChain; -exports.buildPresetChainWalker = void 0; - -function _path() { - const data = _interopRequireDefault(require("path")); - - _path = function () { - return data; - }; - - return data; -} - -function _debug() { - const data = _interopRequireDefault(require("debug")); - - _debug = function () { - return data; - }; - - return data; -} - -var _options = require("./validation/options"); - -var _patternToRegex = _interopRequireDefault(require("./pattern-to-regex")); - -var _files = require("./files"); - -var _caching = require("./caching"); - -var _configDescriptors = require("./config-descriptors"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const debug = (0, _debug().default)("babel:config:config-chain"); - -function buildPresetChain(arg, context) { - const chain = buildPresetChainWalker(arg, context); - if (!chain) return null; - return { - plugins: dedupDescriptors(chain.plugins), - presets: dedupDescriptors(chain.presets), - options: chain.options.map(o => normalizeOptions(o)) - }; -} - -const buildPresetChainWalker = makeChainWalker({ - init: arg => arg, - root: preset => loadPresetDescriptors(preset), - env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName), - overrides: (preset, index) => loadPresetOverridesDescriptors(preset)(index), - overridesEnv: (preset, index, envName) => loadPresetOverridesEnvDescriptors(preset)(index)(envName) -}); -exports.buildPresetChainWalker = buildPresetChainWalker; -const loadPresetDescriptors = (0, _caching.makeWeakCache)(preset => buildRootDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors)); -const loadPresetEnvDescriptors = (0, _caching.makeWeakCache)(preset => (0, _caching.makeStrongCache)(envName => buildEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, envName))); -const loadPresetOverridesDescriptors = (0, _caching.makeWeakCache)(preset => (0, _caching.makeStrongCache)(index => buildOverrideDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index))); -const loadPresetOverridesEnvDescriptors = (0, _caching.makeWeakCache)(preset => (0, _caching.makeStrongCache)(index => (0, _caching.makeStrongCache)(envName => buildOverrideEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index, envName)))); - -function buildRootChain(opts, context) { - const programmaticChain = loadProgrammaticChain({ - options: opts, - dirname: context.cwd - }, context); - if (!programmaticChain) return null; - let configFile; - - if (typeof opts.configFile === "string") { - configFile = (0, _files.loadConfig)(opts.configFile, context.cwd, context.envName, context.caller); - } else if (opts.configFile !== false) { - configFile = (0, _files.findRootConfig)(context.root, context.envName, context.caller); - } - - let { - babelrc, - babelrcRoots - } = opts; - let babelrcRootsDirectory = context.cwd; - const configFileChain = emptyChain(); - - if (configFile) { - const validatedFile = validateConfigFile(configFile); - const result = loadFileChain(validatedFile, context); - if (!result) return null; - - if (babelrc === undefined) { - babelrc = validatedFile.options.babelrc; - } - - if (babelrcRoots === undefined) { - babelrcRootsDirectory = validatedFile.dirname; - babelrcRoots = validatedFile.options.babelrcRoots; - } - - mergeChain(configFileChain, result); - } - - const pkgData = typeof context.filename === "string" ? (0, _files.findPackageData)(context.filename) : null; - let ignoreFile, babelrcFile; - const fileChain = emptyChain(); - - if ((babelrc === true || babelrc === undefined) && pkgData && babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)) { - ({ - ignore: ignoreFile, - config: babelrcFile - } = (0, _files.findRelativeConfig)(pkgData, context.envName, context.caller)); - - if (ignoreFile && shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname)) { - return null; - } - - if (babelrcFile) { - const result = loadFileChain(validateBabelrcFile(babelrcFile), context); - if (!result) return null; - mergeChain(fileChain, result); - } - } - - const chain = mergeChain(mergeChain(mergeChain(emptyChain(), configFileChain), fileChain), programmaticChain); - return { - plugins: dedupDescriptors(chain.plugins), - presets: dedupDescriptors(chain.presets), - options: chain.options.map(o => normalizeOptions(o)), - ignore: ignoreFile || undefined, - babelrc: babelrcFile || undefined, - config: configFile || undefined - }; -} - -function babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory) { - if (typeof babelrcRoots === "boolean") return babelrcRoots; - const absoluteRoot = context.root; - - if (babelrcRoots === undefined) { - return pkgData.directories.indexOf(absoluteRoot) !== -1; - } - - let babelrcPatterns = babelrcRoots; - if (!Array.isArray(babelrcPatterns)) babelrcPatterns = [babelrcPatterns]; - babelrcPatterns = babelrcPatterns.map(pat => { - return typeof pat === "string" ? _path().default.resolve(babelrcRootsDirectory, pat) : pat; - }); - - if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) { - return pkgData.directories.indexOf(absoluteRoot) !== -1; - } - - return babelrcPatterns.some(pat => { - if (typeof pat === "string") { - pat = (0, _patternToRegex.default)(pat, babelrcRootsDirectory); - } - - return pkgData.directories.some(directory => { - return matchPattern(pat, babelrcRootsDirectory, directory, context); - }); - }); -} - -const validateConfigFile = (0, _caching.makeWeakCache)(file => ({ - filepath: file.filepath, - dirname: file.dirname, - options: (0, _options.validate)("configfile", file.options) -})); -const validateBabelrcFile = (0, _caching.makeWeakCache)(file => ({ - filepath: file.filepath, - dirname: file.dirname, - options: (0, _options.validate)("babelrcfile", file.options) -})); -const validateExtendFile = (0, _caching.makeWeakCache)(file => ({ - filepath: file.filepath, - dirname: file.dirname, - options: (0, _options.validate)("extendsfile", file.options) -})); -const loadProgrammaticChain = makeChainWalker({ - root: input => buildRootDescriptors(input, "base", _configDescriptors.createCachedDescriptors), - env: (input, envName) => buildEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, envName), - overrides: (input, index) => buildOverrideDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index), - overridesEnv: (input, index, envName) => buildOverrideEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index, envName) -}); -const loadFileChain = makeChainWalker({ - root: file => loadFileDescriptors(file), - env: (file, envName) => loadFileEnvDescriptors(file)(envName), - overrides: (file, index) => loadFileOverridesDescriptors(file)(index), - overridesEnv: (file, index, envName) => loadFileOverridesEnvDescriptors(file)(index)(envName) -}); -const loadFileDescriptors = (0, _caching.makeWeakCache)(file => buildRootDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors)); -const loadFileEnvDescriptors = (0, _caching.makeWeakCache)(file => (0, _caching.makeStrongCache)(envName => buildEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, envName))); -const loadFileOverridesDescriptors = (0, _caching.makeWeakCache)(file => (0, _caching.makeStrongCache)(index => buildOverrideDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index))); -const loadFileOverridesEnvDescriptors = (0, _caching.makeWeakCache)(file => (0, _caching.makeStrongCache)(index => (0, _caching.makeStrongCache)(envName => buildOverrideEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index, envName)))); - -function buildRootDescriptors({ - dirname, - options -}, alias, descriptors) { - return descriptors(dirname, options, alias); -} - -function buildEnvDescriptors({ - dirname, - options -}, alias, descriptors, envName) { - const opts = options.env && options.env[envName]; - return opts ? descriptors(dirname, opts, `${alias}.env["${envName}"]`) : null; -} - -function buildOverrideDescriptors({ - dirname, - options -}, alias, descriptors, index) { - const opts = options.overrides && options.overrides[index]; - if (!opts) throw new Error("Assertion failure - missing override"); - return descriptors(dirname, opts, `${alias}.overrides[${index}]`); -} - -function buildOverrideEnvDescriptors({ - dirname, - options -}, alias, descriptors, index, envName) { - const override = options.overrides && options.overrides[index]; - if (!override) throw new Error("Assertion failure - missing override"); - const opts = override.env && override.env[envName]; - return opts ? descriptors(dirname, opts, `${alias}.overrides[${index}].env["${envName}"]`) : null; -} - -function makeChainWalker({ - root, - env, - overrides, - overridesEnv -}) { - return (input, context, files = new Set()) => { - const { - dirname - } = input; - const flattenedConfigs = []; - const rootOpts = root(input); - - if (configIsApplicable(rootOpts, dirname, context)) { - flattenedConfigs.push(rootOpts); - const envOpts = env(input, context.envName); - - if (envOpts && configIsApplicable(envOpts, dirname, context)) { - flattenedConfigs.push(envOpts); - } - - (rootOpts.options.overrides || []).forEach((_, index) => { - const overrideOps = overrides(input, index); - - if (configIsApplicable(overrideOps, dirname, context)) { - flattenedConfigs.push(overrideOps); - const overrideEnvOpts = overridesEnv(input, index, context.envName); - - if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname, context)) { - flattenedConfigs.push(overrideEnvOpts); - } - } - }); - } - - if (flattenedConfigs.some(({ - options: { - ignore, - only - } - }) => shouldIgnore(context, ignore, only, dirname))) { - return null; - } - - const chain = emptyChain(); - - for (const op of flattenedConfigs) { - if (!mergeExtendsChain(chain, op.options, dirname, context, files)) { - return null; - } - - mergeChainOpts(chain, op); - } - - return chain; - }; -} - -function mergeExtendsChain(chain, opts, dirname, context, files) { - if (opts.extends === undefined) return true; - const file = (0, _files.loadConfig)(opts.extends, dirname, context.envName, context.caller); - - if (files.has(file)) { - throw new Error(`Configuration cycle detected loading ${file.filepath}.\n` + `File already loaded following the config chain:\n` + Array.from(files, file => ` - ${file.filepath}`).join("\n")); - } - - files.add(file); - const fileChain = loadFileChain(validateExtendFile(file), context, files); - files.delete(file); - if (!fileChain) return false; - mergeChain(chain, fileChain); - return true; -} - -function mergeChain(target, source) { - target.options.push(...source.options); - target.plugins.push(...source.plugins); - target.presets.push(...source.presets); - return target; -} - -function mergeChainOpts(target, { - options, - plugins, - presets -}) { - target.options.push(options); - target.plugins.push(...plugins()); - target.presets.push(...presets()); - return target; -} - -function emptyChain() { - return { - options: [], - presets: [], - plugins: [] - }; -} - -function normalizeOptions(opts) { - const options = Object.assign({}, opts); - delete options.extends; - delete options.env; - delete options.overrides; - delete options.plugins; - delete options.presets; - delete options.passPerPreset; - delete options.ignore; - delete options.only; - delete options.test; - delete options.include; - delete options.exclude; - - if (options.hasOwnProperty("sourceMap")) { - options.sourceMaps = options.sourceMap; - delete options.sourceMap; - } - - return options; -} - -function dedupDescriptors(items) { - const map = new Map(); - const descriptors = []; - - for (const item of items) { - if (typeof item.value === "function") { - const fnKey = item.value; - let nameMap = map.get(fnKey); - - if (!nameMap) { - nameMap = new Map(); - map.set(fnKey, nameMap); - } - - let desc = nameMap.get(item.name); - - if (!desc) { - desc = { - value: item - }; - descriptors.push(desc); - if (!item.ownPass) nameMap.set(item.name, desc); - } else { - desc.value = item; - } - } else { - descriptors.push({ - value: item - }); - } - } - - return descriptors.reduce((acc, desc) => { - acc.push(desc.value); - return acc; - }, []); -} - -function configIsApplicable({ - options -}, dirname, context) { - return (options.test === undefined || configFieldIsApplicable(context, options.test, dirname)) && (options.include === undefined || configFieldIsApplicable(context, options.include, dirname)) && (options.exclude === undefined || !configFieldIsApplicable(context, options.exclude, dirname)); -} - -function configFieldIsApplicable(context, test, dirname) { - const patterns = Array.isArray(test) ? test : [test]; - return matchesPatterns(context, patterns, dirname); -} - -function shouldIgnore(context, ignore, only, dirname) { - if (ignore && matchesPatterns(context, ignore, dirname)) { - debug("Ignored %o because it matched one of %O from %o", context.filename, ignore, dirname); - return true; - } - - if (only && !matchesPatterns(context, only, dirname)) { - debug("Ignored %o because it failed to match one of %O from %o", context.filename, only, dirname); - return true; - } - - return false; -} - -function matchesPatterns(context, patterns, dirname) { - return patterns.some(pattern => matchPattern(pattern, dirname, context.filename, context)); -} - -function matchPattern(pattern, dirname, pathToTest, context) { - if (typeof pattern === "function") { - return !!pattern(pathToTest, { - dirname, - envName: context.envName, - caller: context.caller - }); - } - - if (typeof pathToTest !== "string") { - throw new Error(`Configuration contains string/RegExp pattern, but no filename was passed to Babel`); - } - - if (typeof pattern === "string") { - pattern = (0, _patternToRegex.default)(pattern, dirname); - } - - return pattern.test(pathToTest); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/config-descriptors.js b/node_modules/@babel/core/lib/config/config-descriptors.js deleted file mode 100644 index 49964742..00000000 --- a/node_modules/@babel/core/lib/config/config-descriptors.js +++ /dev/null @@ -1,210 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.createCachedDescriptors = createCachedDescriptors; -exports.createUncachedDescriptors = createUncachedDescriptors; -exports.createDescriptor = createDescriptor; - -var _files = require("./files"); - -var _item = require("./item"); - -var _caching = require("./caching"); - -function isEqualDescriptor(a, b) { - return a.name === b.name && a.value === b.value && a.options === b.options && a.dirname === b.dirname && a.alias === b.alias && a.ownPass === b.ownPass && (a.file && a.file.request) === (b.file && b.file.request) && (a.file && a.file.resolved) === (b.file && b.file.resolved); -} - -function createCachedDescriptors(dirname, options, alias) { - const { - plugins, - presets, - passPerPreset - } = options; - return { - options, - plugins: plugins ? () => createCachedPluginDescriptors(plugins, dirname)(alias) : () => [], - presets: presets ? () => createCachedPresetDescriptors(presets, dirname)(alias)(!!passPerPreset) : () => [] - }; -} - -function createUncachedDescriptors(dirname, options, alias) { - let plugins; - let presets; - return { - options, - plugins: () => { - if (!plugins) { - plugins = createPluginDescriptors(options.plugins || [], dirname, alias); - } - - return plugins; - }, - presets: () => { - if (!presets) { - presets = createPresetDescriptors(options.presets || [], dirname, alias, !!options.passPerPreset); - } - - return presets; - } - }; -} - -const PRESET_DESCRIPTOR_CACHE = new WeakMap(); -const createCachedPresetDescriptors = (0, _caching.makeWeakCache)((items, cache) => { - const dirname = cache.using(dir => dir); - return (0, _caching.makeStrongCache)(alias => (0, _caching.makeStrongCache)(passPerPreset => createPresetDescriptors(items, dirname, alias, passPerPreset).map(desc => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc)))); -}); -const PLUGIN_DESCRIPTOR_CACHE = new WeakMap(); -const createCachedPluginDescriptors = (0, _caching.makeWeakCache)((items, cache) => { - const dirname = cache.using(dir => dir); - return (0, _caching.makeStrongCache)(alias => createPluginDescriptors(items, dirname, alias).map(desc => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc))); -}); -const DEFAULT_OPTIONS = {}; - -function loadCachedDescriptor(cache, desc) { - const { - value, - options = DEFAULT_OPTIONS - } = desc; - if (options === false) return desc; - let cacheByOptions = cache.get(value); - - if (!cacheByOptions) { - cacheByOptions = new WeakMap(); - cache.set(value, cacheByOptions); - } - - let possibilities = cacheByOptions.get(options); - - if (!possibilities) { - possibilities = []; - cacheByOptions.set(options, possibilities); - } - - if (possibilities.indexOf(desc) === -1) { - const matches = possibilities.filter(possibility => isEqualDescriptor(possibility, desc)); - - if (matches.length > 0) { - return matches[0]; - } - - possibilities.push(desc); - } - - return desc; -} - -function createPresetDescriptors(items, dirname, alias, passPerPreset) { - return createDescriptors("preset", items, dirname, alias, passPerPreset); -} - -function createPluginDescriptors(items, dirname, alias) { - return createDescriptors("plugin", items, dirname, alias); -} - -function createDescriptors(type, items, dirname, alias, ownPass) { - const descriptors = items.map((item, index) => createDescriptor(item, dirname, { - type, - alias: `${alias}$${index}`, - ownPass: !!ownPass - })); - assertNoDuplicates(descriptors); - return descriptors; -} - -function createDescriptor(pair, dirname, { - type, - alias, - ownPass -}) { - const desc = (0, _item.getItemDescriptor)(pair); - - if (desc) { - return desc; - } - - let name; - let options; - let value = pair; - - if (Array.isArray(value)) { - if (value.length === 3) { - [value, options, name] = value; - } else { - [value, options] = value; - } - } - - let file = undefined; - let filepath = null; - - if (typeof value === "string") { - if (typeof type !== "string") { - throw new Error("To resolve a string-based item, the type of item must be given"); - } - - const resolver = type === "plugin" ? _files.loadPlugin : _files.loadPreset; - const request = value; - ({ - filepath, - value - } = resolver(value, dirname)); - file = { - request, - resolved: filepath - }; - } - - if (!value) { - throw new Error(`Unexpected falsy value: ${String(value)}`); - } - - if (typeof value === "object" && value.__esModule) { - if (value.default) { - value = value.default; - } else { - throw new Error("Must export a default export when using ES6 modules."); - } - } - - if (typeof value !== "object" && typeof value !== "function") { - throw new Error(`Unsupported format: ${typeof value}. Expected an object or a function.`); - } - - if (filepath !== null && typeof value === "object" && value) { - throw new Error(`Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}`); - } - - return { - name, - alias: filepath || alias, - value, - options, - dirname, - ownPass, - file - }; -} - -function assertNoDuplicates(items) { - const map = new Map(); - - for (const item of items) { - if (typeof item.value !== "function") continue; - let nameMap = map.get(item.value); - - if (!nameMap) { - nameMap = new Set(); - map.set(item.value, nameMap); - } - - if (nameMap.has(item.name)) { - throw new Error([`Duplicate plugin/preset detected.`, `If you'd like to use two separate instances of a plugin,`, `they need separate names, e.g.`, ``, ` plugins: [`, ` ['some-plugin', {}],`, ` ['some-plugin', {}, 'some unique name'],`, ` ]`].join("\n")); - } - - nameMap.add(item.name); - } -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/configuration.js b/node_modules/@babel/core/lib/config/files/configuration.js deleted file mode 100644 index 5436e311..00000000 --- a/node_modules/@babel/core/lib/config/files/configuration.js +++ /dev/null @@ -1,323 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.findConfigUpwards = findConfigUpwards; -exports.findRelativeConfig = findRelativeConfig; -exports.findRootConfig = findRootConfig; -exports.loadConfig = loadConfig; - -function _debug() { - const data = _interopRequireDefault(require("debug")); - - _debug = function () { - return data; - }; - - return data; -} - -function _path() { - const data = _interopRequireDefault(require("path")); - - _path = function () { - return data; - }; - - return data; -} - -function _fs() { - const data = _interopRequireDefault(require("fs")); - - _fs = function () { - return data; - }; - - return data; -} - -function _json() { - const data = _interopRequireDefault(require("json5")); - - _json = function () { - return data; - }; - - return data; -} - -function _resolve() { - const data = _interopRequireDefault(require("resolve")); - - _resolve = function () { - return data; - }; - - return data; -} - -var _caching = require("../caching"); - -var _configApi = _interopRequireDefault(require("../helpers/config-api")); - -var _utils = require("./utils"); - -var _patternToRegex = _interopRequireDefault(require("../pattern-to-regex")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const debug = (0, _debug().default)("babel:config:loading:files:configuration"); -const BABEL_CONFIG_JS_FILENAME = "babel.config.js"; -const BABELRC_FILENAME = ".babelrc"; -const BABELRC_JS_FILENAME = ".babelrc.js"; -const BABELIGNORE_FILENAME = ".babelignore"; - -function findConfigUpwards(rootDir) { - let dirname = rootDir; - - while (true) { - if (_fs().default.existsSync(_path().default.join(dirname, BABEL_CONFIG_JS_FILENAME))) { - return dirname; - } - - const nextDir = _path().default.dirname(dirname); - - if (dirname === nextDir) break; - dirname = nextDir; - } - - return null; -} - -function findRelativeConfig(packageData, envName, caller) { - let config = null; - let ignore = null; - - const dirname = _path().default.dirname(packageData.filepath); - - for (const loc of packageData.directories) { - if (!config) { - config = [BABELRC_FILENAME, BABELRC_JS_FILENAME].reduce((previousConfig, name) => { - const filepath = _path().default.join(loc, name); - - const config = readConfig(filepath, envName, caller); - - if (config && previousConfig) { - throw new Error(`Multiple configuration files found. Please remove one:\n` + ` - ${_path().default.basename(previousConfig.filepath)}\n` + ` - ${name}\n` + `from ${loc}`); - } - - return config || previousConfig; - }, null); - const pkgConfig = packageData.pkg && packageData.pkg.dirname === loc ? packageToBabelConfig(packageData.pkg) : null; - - if (pkgConfig) { - if (config) { - throw new Error(`Multiple configuration files found. Please remove one:\n` + ` - ${_path().default.basename(pkgConfig.filepath)}#babel\n` + ` - ${_path().default.basename(config.filepath)}\n` + `from ${loc}`); - } - - config = pkgConfig; - } - - if (config) { - debug("Found configuration %o from %o.", config.filepath, dirname); - } - } - - if (!ignore) { - const ignoreLoc = _path().default.join(loc, BABELIGNORE_FILENAME); - - ignore = readIgnoreConfig(ignoreLoc); - - if (ignore) { - debug("Found ignore %o from %o.", ignore.filepath, dirname); - } - } - } - - return { - config, - ignore - }; -} - -function findRootConfig(dirname, envName, caller) { - const filepath = _path().default.resolve(dirname, BABEL_CONFIG_JS_FILENAME); - - const conf = readConfig(filepath, envName, caller); - - if (conf) { - debug("Found root config %o in %o.", BABEL_CONFIG_JS_FILENAME, dirname); - } - - return conf; -} - -function loadConfig(name, dirname, envName, caller) { - const filepath = _resolve().default.sync(name, { - basedir: dirname - }); - - const conf = readConfig(filepath, envName, caller); - - if (!conf) { - throw new Error(`Config file ${filepath} contains no configuration data`); - } - - debug("Loaded config %o from %o.", name, dirname); - return conf; -} - -function readConfig(filepath, envName, caller) { - return _path().default.extname(filepath) === ".js" ? readConfigJS(filepath, { - envName, - caller - }) : readConfigJSON5(filepath); -} - -const LOADING_CONFIGS = new Set(); -const readConfigJS = (0, _caching.makeStrongCache)((filepath, cache) => { - if (!_fs().default.existsSync(filepath)) { - cache.forever(); - return null; - } - - if (LOADING_CONFIGS.has(filepath)) { - cache.never(); - debug("Auto-ignoring usage of config %o.", filepath); - return { - filepath, - dirname: _path().default.dirname(filepath), - options: {} - }; - } - - let options; - - try { - LOADING_CONFIGS.add(filepath); - - const configModule = require(filepath); - - options = configModule && configModule.__esModule ? configModule.default || undefined : configModule; - } catch (err) { - err.message = `${filepath}: Error while loading config - ${err.message}`; - throw err; - } finally { - LOADING_CONFIGS.delete(filepath); - } - - if (typeof options === "function") { - options = options((0, _configApi.default)(cache)); - if (!cache.configured()) throwConfigError(); - } - - if (!options || typeof options !== "object" || Array.isArray(options)) { - throw new Error(`${filepath}: Configuration should be an exported JavaScript object.`); - } - - if (typeof options.then === "function") { - throw new Error(`You appear to be using an async configuration, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously return your config.`); - } - - return { - filepath, - dirname: _path().default.dirname(filepath), - options - }; -}); -const packageToBabelConfig = (0, _caching.makeWeakCache)(file => { - const babel = file.options["babel"]; - if (typeof babel === "undefined") return null; - - if (typeof babel !== "object" || Array.isArray(babel) || babel === null) { - throw new Error(`${file.filepath}: .babel property must be an object`); - } - - return { - filepath: file.filepath, - dirname: file.dirname, - options: babel - }; -}); -const readConfigJSON5 = (0, _utils.makeStaticFileCache)((filepath, content) => { - let options; - - try { - options = _json().default.parse(content); - } catch (err) { - err.message = `${filepath}: Error while parsing config - ${err.message}`; - throw err; - } - - if (!options) throw new Error(`${filepath}: No config detected`); - - if (typeof options !== "object") { - throw new Error(`${filepath}: Config returned typeof ${typeof options}`); - } - - if (Array.isArray(options)) { - throw new Error(`${filepath}: Expected config object but found array`); - } - - return { - filepath, - dirname: _path().default.dirname(filepath), - options - }; -}); -const readIgnoreConfig = (0, _utils.makeStaticFileCache)((filepath, content) => { - const ignoreDir = _path().default.dirname(filepath); - - const ignorePatterns = content.split("\n").map(line => line.replace(/#(.*?)$/, "").trim()).filter(line => !!line); - - for (const pattern of ignorePatterns) { - if (pattern[0] === "!") { - throw new Error(`Negation of file paths is not supported.`); - } - } - - return { - filepath, - dirname: _path().default.dirname(filepath), - ignore: ignorePatterns.map(pattern => (0, _patternToRegex.default)(pattern, ignoreDir)) - }; -}); - -function throwConfigError() { - throw new Error(`\ -Caching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured -for various types of caching, using the first param of their handler functions: - -module.exports = function(api) { - // The API exposes the following: - - // Cache the returned value forever and don't call this function again. - api.cache(true); - - // Don't cache at all. Not recommended because it will be very slow. - api.cache(false); - - // Cached based on the value of some function. If this function returns a value different from - // a previously-encountered value, the plugins will re-evaluate. - var env = api.cache(() => process.env.NODE_ENV); - - // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for - // any possible NODE_ENV value that might come up during plugin execution. - var isProd = api.cache(() => process.env.NODE_ENV === "production"); - - // .cache(fn) will perform a linear search though instances to find the matching plugin based - // based on previous instantiated plugins. If you want to recreate the plugin and discard the - // previous instance whenever something changes, you may use: - var isProd = api.cache.invalidate(() => process.env.NODE_ENV === "production"); - - // Note, we also expose the following more-verbose versions of the above examples: - api.cache.forever(); // api.cache(true) - api.cache.never(); // api.cache(false) - api.cache.using(fn); // api.cache(fn) - - // Return the value that will be cached. - return { }; -};`); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/index-browser.js b/node_modules/@babel/core/lib/config/files/index-browser.js deleted file mode 100644 index b8e91417..00000000 --- a/node_modules/@babel/core/lib/config/files/index-browser.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.findConfigUpwards = findConfigUpwards; -exports.findPackageData = findPackageData; -exports.findRelativeConfig = findRelativeConfig; -exports.findRootConfig = findRootConfig; -exports.loadConfig = loadConfig; -exports.resolvePlugin = resolvePlugin; -exports.resolvePreset = resolvePreset; -exports.loadPlugin = loadPlugin; -exports.loadPreset = loadPreset; - -function findConfigUpwards(rootDir) { - return null; -} - -function findPackageData(filepath) { - return { - filepath, - directories: [], - pkg: null, - isPackage: false - }; -} - -function findRelativeConfig(pkgData, envName, caller) { - return { - pkg: null, - config: null, - ignore: null - }; -} - -function findRootConfig(dirname, envName, caller) { - return null; -} - -function loadConfig(name, dirname, envName, caller) { - throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`); -} - -function resolvePlugin(name, dirname) { - return null; -} - -function resolvePreset(name, dirname) { - return null; -} - -function loadPlugin(name, dirname) { - throw new Error(`Cannot load plugin ${name} relative to ${dirname} in a browser`); -} - -function loadPreset(name, dirname) { - throw new Error(`Cannot load preset ${name} relative to ${dirname} in a browser`); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/index.js b/node_modules/@babel/core/lib/config/files/index.js deleted file mode 100644 index 3d5453b6..00000000 --- a/node_modules/@babel/core/lib/config/files/index.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "findPackageData", { - enumerable: true, - get: function () { - return _package.findPackageData; - } -}); -Object.defineProperty(exports, "findConfigUpwards", { - enumerable: true, - get: function () { - return _configuration.findConfigUpwards; - } -}); -Object.defineProperty(exports, "findRelativeConfig", { - enumerable: true, - get: function () { - return _configuration.findRelativeConfig; - } -}); -Object.defineProperty(exports, "findRootConfig", { - enumerable: true, - get: function () { - return _configuration.findRootConfig; - } -}); -Object.defineProperty(exports, "loadConfig", { - enumerable: true, - get: function () { - return _configuration.loadConfig; - } -}); -Object.defineProperty(exports, "resolvePlugin", { - enumerable: true, - get: function () { - return _plugins.resolvePlugin; - } -}); -Object.defineProperty(exports, "resolvePreset", { - enumerable: true, - get: function () { - return _plugins.resolvePreset; - } -}); -Object.defineProperty(exports, "loadPlugin", { - enumerable: true, - get: function () { - return _plugins.loadPlugin; - } -}); -Object.defineProperty(exports, "loadPreset", { - enumerable: true, - get: function () { - return _plugins.loadPreset; - } -}); - -var _package = require("./package"); - -var _configuration = require("./configuration"); - -var _plugins = require("./plugins"); - -({}); \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/package.js b/node_modules/@babel/core/lib/config/files/package.js deleted file mode 100644 index c0f8988b..00000000 --- a/node_modules/@babel/core/lib/config/files/package.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.findPackageData = findPackageData; - -function _path() { - const data = _interopRequireDefault(require("path")); - - _path = function () { - return data; - }; - - return data; -} - -var _utils = require("./utils"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const PACKAGE_FILENAME = "package.json"; - -function findPackageData(filepath) { - let pkg = null; - const directories = []; - let isPackage = true; - - let dirname = _path().default.dirname(filepath); - - while (!pkg && _path().default.basename(dirname) !== "node_modules") { - directories.push(dirname); - pkg = readConfigPackage(_path().default.join(dirname, PACKAGE_FILENAME)); - - const nextLoc = _path().default.dirname(dirname); - - if (dirname === nextLoc) { - isPackage = false; - break; - } - - dirname = nextLoc; - } - - return { - filepath, - directories, - pkg, - isPackage - }; -} - -const readConfigPackage = (0, _utils.makeStaticFileCache)((filepath, content) => { - let options; - - try { - options = JSON.parse(content); - } catch (err) { - err.message = `${filepath}: Error while parsing JSON - ${err.message}`; - throw err; - } - - if (typeof options !== "object") { - throw new Error(`${filepath}: Config returned typeof ${typeof options}`); - } - - if (Array.isArray(options)) { - throw new Error(`${filepath}: Expected config object but found array`); - } - - return { - filepath, - dirname: _path().default.dirname(filepath), - options - }; -}); \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/plugins.js b/node_modules/@babel/core/lib/config/files/plugins.js deleted file mode 100644 index 264682ca..00000000 --- a/node_modules/@babel/core/lib/config/files/plugins.js +++ /dev/null @@ -1,169 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.resolvePlugin = resolvePlugin; -exports.resolvePreset = resolvePreset; -exports.loadPlugin = loadPlugin; -exports.loadPreset = loadPreset; - -function _debug() { - const data = _interopRequireDefault(require("debug")); - - _debug = function () { - return data; - }; - - return data; -} - -function _resolve() { - const data = _interopRequireDefault(require("resolve")); - - _resolve = function () { - return data; - }; - - return data; -} - -function _path() { - const data = _interopRequireDefault(require("path")); - - _path = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const debug = (0, _debug().default)("babel:config:loading:files:plugins"); -const EXACT_RE = /^module:/; -const BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-plugin-)/; -const BABEL_PRESET_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-preset-)/; -const BABEL_PLUGIN_ORG_RE = /^(@babel\/)(?!plugin-|[^/]+\/)/; -const BABEL_PRESET_ORG_RE = /^(@babel\/)(?!preset-|[^/]+\/)/; -const OTHER_PLUGIN_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-plugin(?:-|\/|$)|[^/]+\/)/; -const OTHER_PRESET_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-preset(?:-|\/|$)|[^/]+\/)/; -const OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/; - -function resolvePlugin(name, dirname) { - return resolveStandardizedName("plugin", name, dirname); -} - -function resolvePreset(name, dirname) { - return resolveStandardizedName("preset", name, dirname); -} - -function loadPlugin(name, dirname) { - const filepath = resolvePlugin(name, dirname); - - if (!filepath) { - throw new Error(`Plugin ${name} not found relative to ${dirname}`); - } - - const value = requireModule("plugin", filepath); - debug("Loaded plugin %o from %o.", name, dirname); - return { - filepath, - value - }; -} - -function loadPreset(name, dirname) { - const filepath = resolvePreset(name, dirname); - - if (!filepath) { - throw new Error(`Preset ${name} not found relative to ${dirname}`); - } - - const value = requireModule("preset", filepath); - debug("Loaded preset %o from %o.", name, dirname); - return { - filepath, - value - }; -} - -function standardizeName(type, name) { - if (_path().default.isAbsolute(name)) return name; - const isPreset = type === "preset"; - return name.replace(isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE, `babel-${type}-`).replace(isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE, `$1${type}-`).replace(isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE, `$1babel-${type}-`).replace(OTHER_ORG_DEFAULT_RE, `$1/babel-${type}`).replace(EXACT_RE, ""); -} - -function resolveStandardizedName(type, name, dirname = process.cwd()) { - const standardizedName = standardizeName(type, name); - - try { - return _resolve().default.sync(standardizedName, { - basedir: dirname - }); - } catch (e) { - if (e.code !== "MODULE_NOT_FOUND") throw e; - - if (standardizedName !== name) { - let resolvedOriginal = false; - - try { - _resolve().default.sync(name, { - basedir: dirname - }); - - resolvedOriginal = true; - } catch (e2) {} - - if (resolvedOriginal) { - e.message += `\n- If you want to resolve "${name}", use "module:${name}"`; - } - } - - let resolvedBabel = false; - - try { - _resolve().default.sync(standardizeName(type, "@babel/" + name), { - basedir: dirname - }); - - resolvedBabel = true; - } catch (e2) {} - - if (resolvedBabel) { - e.message += `\n- Did you mean "@babel/${name}"?`; - } - - let resolvedOppositeType = false; - const oppositeType = type === "preset" ? "plugin" : "preset"; - - try { - _resolve().default.sync(standardizeName(oppositeType, name), { - basedir: dirname - }); - - resolvedOppositeType = true; - } catch (e2) {} - - if (resolvedOppositeType) { - e.message += `\n- Did you accidentally pass a ${oppositeType} as a ${type}?`; - } - - throw e; - } -} - -const LOADING_MODULES = new Set(); - -function requireModule(type, name) { - if (LOADING_MODULES.has(name)) { - throw new Error(`Reentrant ${type} detected trying to load "${name}". This module is not ignored ` + "and is trying to load itself while compiling itself, leading to a dependency cycle. " + 'We recommend adding it to your "ignore" list in your babelrc, or to a .babelignore.'); - } - - try { - LOADING_MODULES.add(name); - return require(name); - } finally { - LOADING_MODULES.delete(name); - } -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/files/types.js b/node_modules/@babel/core/lib/config/files/types.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/@babel/core/lib/config/files/utils.js b/node_modules/@babel/core/lib/config/files/utils.js deleted file mode 100644 index 56749ef4..00000000 --- a/node_modules/@babel/core/lib/config/files/utils.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.makeStaticFileCache = makeStaticFileCache; - -function _fs() { - const data = _interopRequireDefault(require("fs")); - - _fs = function () { - return data; - }; - - return data; -} - -var _caching = require("../caching"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function makeStaticFileCache(fn) { - return (0, _caching.makeStrongCache)((filepath, cache) => { - if (cache.invalidate(() => fileMtime(filepath)) === null) { - cache.forever(); - return null; - } - - return fn(filepath, _fs().default.readFileSync(filepath, "utf8")); - }); -} - -function fileMtime(filepath) { - try { - return +_fs().default.statSync(filepath).mtime; - } catch (e) { - if (e.code !== "ENOENT" && e.code !== "ENOTDIR") throw e; - } - - return null; -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/full.js b/node_modules/@babel/core/lib/config/full.js deleted file mode 100644 index e453924a..00000000 --- a/node_modules/@babel/core/lib/config/full.js +++ /dev/null @@ -1,258 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = loadFullConfig; - -var _util = require("./util"); - -var context = _interopRequireWildcard(require("../index")); - -var _plugin = _interopRequireDefault(require("./plugin")); - -var _item = require("./item"); - -var _configChain = require("./config-chain"); - -function _traverse() { - const data = _interopRequireDefault(require("@babel/traverse")); - - _traverse = function () { - return data; - }; - - return data; -} - -var _caching = require("./caching"); - -var _options = require("./validation/options"); - -var _plugins = require("./validation/plugins"); - -var _configApi = _interopRequireDefault(require("./helpers/config-api")); - -var _partial = _interopRequireDefault(require("./partial")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function loadFullConfig(inputOpts) { - const result = (0, _partial.default)(inputOpts); - - if (!result) { - return null; - } - - const { - options, - context - } = result; - const optionDefaults = {}; - const passes = [[]]; - - try { - const { - plugins, - presets - } = options; - - if (!plugins || !presets) { - throw new Error("Assertion failure - plugins and presets exist"); - } - - const ignored = function recurseDescriptors(config, pass) { - const plugins = config.plugins.reduce((acc, descriptor) => { - if (descriptor.options !== false) { - acc.push(loadPluginDescriptor(descriptor, context)); - } - - return acc; - }, []); - const presets = config.presets.reduce((acc, descriptor) => { - if (descriptor.options !== false) { - acc.push({ - preset: loadPresetDescriptor(descriptor, context), - pass: descriptor.ownPass ? [] : pass - }); - } - - return acc; - }, []); - - if (presets.length > 0) { - passes.splice(1, 0, ...presets.map(o => o.pass).filter(p => p !== pass)); - - for (const _ref of presets) { - const { - preset, - pass - } = _ref; - if (!preset) return true; - const ignored = recurseDescriptors({ - plugins: preset.plugins, - presets: preset.presets - }, pass); - if (ignored) return true; - preset.options.forEach(opts => { - (0, _util.mergeOptions)(optionDefaults, opts); - }); - } - } - - if (plugins.length > 0) { - pass.unshift(...plugins); - } - }({ - plugins: plugins.map(item => { - const desc = (0, _item.getItemDescriptor)(item); - - if (!desc) { - throw new Error("Assertion failure - must be config item"); - } - - return desc; - }), - presets: presets.map(item => { - const desc = (0, _item.getItemDescriptor)(item); - - if (!desc) { - throw new Error("Assertion failure - must be config item"); - } - - return desc; - }) - }, passes[0]); - - if (ignored) return null; - } catch (e) { - if (!/^\[BABEL\]/.test(e.message)) { - e.message = `[BABEL] ${context.filename || "unknown"}: ${e.message}`; - } - - throw e; - } - - const opts = optionDefaults; - (0, _util.mergeOptions)(opts, options); - opts.plugins = passes[0]; - opts.presets = passes.slice(1).filter(plugins => plugins.length > 0).map(plugins => ({ - plugins - })); - opts.passPerPreset = opts.presets.length > 0; - return { - options: opts, - passes: passes - }; -} - -const loadDescriptor = (0, _caching.makeWeakCache)(({ - value, - options, - dirname, - alias -}, cache) => { - if (options === false) throw new Error("Assertion failure"); - options = options || {}; - let item = value; - - if (typeof value === "function") { - const api = Object.assign({}, context, (0, _configApi.default)(cache)); - - try { - item = value(api, options, dirname); - } catch (e) { - if (alias) { - e.message += ` (While processing: ${JSON.stringify(alias)})`; - } - - throw e; - } - } - - if (!item || typeof item !== "object") { - throw new Error("Plugin/Preset did not return an object."); - } - - if (typeof item.then === "function") { - throw new Error(`You appear to be using an async plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, ` + `you may need to upgrade your @babel/core version.`); - } - - return { - value: item, - options, - dirname, - alias - }; -}); - -function loadPluginDescriptor(descriptor, context) { - if (descriptor.value instanceof _plugin.default) { - if (descriptor.options) { - throw new Error("Passed options to an existing Plugin instance will not work."); - } - - return descriptor.value; - } - - return instantiatePlugin(loadDescriptor(descriptor, context), context); -} - -const instantiatePlugin = (0, _caching.makeWeakCache)(({ - value, - options, - dirname, - alias -}, cache) => { - const pluginObj = (0, _plugins.validatePluginObject)(value); - const plugin = Object.assign({}, pluginObj); - - if (plugin.visitor) { - plugin.visitor = _traverse().default.explode(Object.assign({}, plugin.visitor)); - } - - if (plugin.inherits) { - const inheritsDescriptor = { - name: undefined, - alias: `${alias}$inherits`, - value: plugin.inherits, - options, - dirname - }; - const inherits = cache.invalidate(data => loadPluginDescriptor(inheritsDescriptor, data)); - plugin.pre = chain(inherits.pre, plugin.pre); - plugin.post = chain(inherits.post, plugin.post); - plugin.manipulateOptions = chain(inherits.manipulateOptions, plugin.manipulateOptions); - plugin.visitor = _traverse().default.visitors.merge([inherits.visitor || {}, plugin.visitor || {}]); - } - - return new _plugin.default(plugin, options, alias); -}); - -const loadPresetDescriptor = (descriptor, context) => { - return (0, _configChain.buildPresetChain)(instantiatePreset(loadDescriptor(descriptor, context)), context); -}; - -const instantiatePreset = (0, _caching.makeWeakCache)(({ - value, - dirname, - alias -}) => { - return { - options: (0, _options.validate)("preset", value), - alias, - dirname - }; -}); - -function chain(a, b) { - const fns = [a, b].filter(Boolean); - if (fns.length <= 1) return fns[0]; - return function (...args) { - for (const fn of fns) { - fn.apply(this, args); - } - }; -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/helpers/config-api.js b/node_modules/@babel/core/lib/config/helpers/config-api.js deleted file mode 100644 index b988c055..00000000 --- a/node_modules/@babel/core/lib/config/helpers/config-api.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = makeAPI; - -function _semver() { - const data = _interopRequireDefault(require("semver")); - - _semver = function () { - return data; - }; - - return data; -} - -var _ = require("../../"); - -var _caching = require("../caching"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function makeAPI(cache) { - const env = value => cache.using(data => { - if (typeof value === "undefined") return data.envName; - - if (typeof value === "function") { - return (0, _caching.assertSimpleType)(value(data.envName)); - } - - if (!Array.isArray(value)) value = [value]; - return value.some(entry => { - if (typeof entry !== "string") { - throw new Error("Unexpected non-string value"); - } - - return entry === data.envName; - }); - }); - - const caller = cb => cache.using(data => (0, _caching.assertSimpleType)(cb(data.caller))); - - return { - version: _.version, - cache: cache.simple(), - env, - async: () => false, - caller, - assertVersion, - tokTypes: undefined - }; -} - -function assertVersion(range) { - if (typeof range === "number") { - if (!Number.isInteger(range)) { - throw new Error("Expected string or integer value."); - } - - range = `^${range}.0.0-0`; - } - - if (typeof range !== "string") { - throw new Error("Expected string or integer value."); - } - - if (_semver().default.satisfies(_.version, range)) return; - const limit = Error.stackTraceLimit; - - if (typeof limit === "number" && limit < 25) { - Error.stackTraceLimit = 25; - } - - const err = new Error(`Requires Babel "${range}", but was loaded with "${_.version}". ` + `If you are sure you have a compatible version of @babel/core, ` + `it is likely that something in your build process is loading the ` + `wrong version. Inspect the stack trace of this error to look for ` + `the first entry that doesn't mention "@babel/core" or "babel-core" ` + `to see what is calling Babel.`); - - if (typeof limit === "number") { - Error.stackTraceLimit = limit; - } - - throw Object.assign(err, { - code: "BABEL_VERSION_UNSUPPORTED", - version: _.version, - range - }); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/helpers/environment.js b/node_modules/@babel/core/lib/config/helpers/environment.js deleted file mode 100644 index e4bfdbc7..00000000 --- a/node_modules/@babel/core/lib/config/helpers/environment.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getEnv = getEnv; - -function getEnv(defaultValue = "development") { - return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue; -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/index.js b/node_modules/@babel/core/lib/config/index.js deleted file mode 100644 index 65127b2a..00000000 --- a/node_modules/@babel/core/lib/config/index.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.loadOptions = loadOptions; -Object.defineProperty(exports, "default", { - enumerable: true, - get: function () { - return _full.default; - } -}); -Object.defineProperty(exports, "loadPartialConfig", { - enumerable: true, - get: function () { - return _partial.loadPartialConfig; - } -}); - -var _full = _interopRequireDefault(require("./full")); - -var _partial = require("./partial"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function loadOptions(opts) { - const config = (0, _full.default)(opts); - return config ? config.options : null; -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/item.js b/node_modules/@babel/core/lib/config/item.js deleted file mode 100644 index 11f25ac1..00000000 --- a/node_modules/@babel/core/lib/config/item.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.createItemFromDescriptor = createItemFromDescriptor; -exports.createConfigItem = createConfigItem; -exports.getItemDescriptor = getItemDescriptor; - -function _path() { - const data = _interopRequireDefault(require("path")); - - _path = function () { - return data; - }; - - return data; -} - -var _configDescriptors = require("./config-descriptors"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function createItemFromDescriptor(desc) { - return new ConfigItem(desc); -} - -function createConfigItem(value, { - dirname = ".", - type -} = {}) { - const descriptor = (0, _configDescriptors.createDescriptor)(value, _path().default.resolve(dirname), { - type, - alias: "programmatic item" - }); - return createItemFromDescriptor(descriptor); -} - -function getItemDescriptor(item) { - if (item instanceof ConfigItem) { - return item._descriptor; - } - - return undefined; -} - -class ConfigItem { - constructor(descriptor) { - this._descriptor = descriptor; - Object.defineProperty(this, "_descriptor", { - enumerable: false - }); - this.value = this._descriptor.value; - this.options = this._descriptor.options; - this.dirname = this._descriptor.dirname; - this.name = this._descriptor.name; - this.file = this._descriptor.file ? { - request: this._descriptor.file.request, - resolved: this._descriptor.file.resolved - } : undefined; - Object.freeze(this); - } - -} - -Object.freeze(ConfigItem.prototype); \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/partial.js b/node_modules/@babel/core/lib/config/partial.js deleted file mode 100644 index 050ad983..00000000 --- a/node_modules/@babel/core/lib/config/partial.js +++ /dev/null @@ -1,141 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = loadPrivatePartialConfig; -exports.loadPartialConfig = loadPartialConfig; - -function _path() { - const data = _interopRequireDefault(require("path")); - - _path = function () { - return data; - }; - - return data; -} - -var _plugin = _interopRequireDefault(require("./plugin")); - -var _util = require("./util"); - -var _item = require("./item"); - -var _configChain = require("./config-chain"); - -var _environment = require("./helpers/environment"); - -var _options = require("./validation/options"); - -var _files = require("./files"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function resolveRootMode(rootDir, rootMode) { - switch (rootMode) { - case "root": - return rootDir; - - case "upward-optional": - { - const upwardRootDir = (0, _files.findConfigUpwards)(rootDir); - return upwardRootDir === null ? rootDir : upwardRootDir; - } - - case "upward": - { - const upwardRootDir = (0, _files.findConfigUpwards)(rootDir); - if (upwardRootDir !== null) return upwardRootDir; - throw Object.assign(new Error(`Babel was run with rootMode:"upward" but a root could not ` + `be found when searching upward from "${rootDir}"`), { - code: "BABEL_ROOT_NOT_FOUND", - dirname: rootDir - }); - } - - default: - throw new Error(`Assertion failure - unknown rootMode value`); - } -} - -function loadPrivatePartialConfig(inputOpts) { - if (inputOpts != null && (typeof inputOpts !== "object" || Array.isArray(inputOpts))) { - throw new Error("Babel options must be an object, null, or undefined"); - } - - const args = inputOpts ? (0, _options.validate)("arguments", inputOpts) : {}; - const { - envName = (0, _environment.getEnv)(), - cwd = ".", - root: rootDir = ".", - rootMode = "root", - caller - } = args; - - const absoluteCwd = _path().default.resolve(cwd); - - const absoluteRootDir = resolveRootMode(_path().default.resolve(absoluteCwd, rootDir), rootMode); - const context = { - filename: typeof args.filename === "string" ? _path().default.resolve(cwd, args.filename) : undefined, - cwd: absoluteCwd, - root: absoluteRootDir, - envName, - caller - }; - const configChain = (0, _configChain.buildRootChain)(args, context); - if (!configChain) return null; - const options = {}; - configChain.options.forEach(opts => { - (0, _util.mergeOptions)(options, opts); - }); - options.babelrc = false; - options.configFile = false; - options.passPerPreset = false; - options.envName = context.envName; - options.cwd = context.cwd; - options.root = context.root; - options.filename = typeof context.filename === "string" ? context.filename : undefined; - options.plugins = configChain.plugins.map(descriptor => (0, _item.createItemFromDescriptor)(descriptor)); - options.presets = configChain.presets.map(descriptor => (0, _item.createItemFromDescriptor)(descriptor)); - return { - options, - context, - ignore: configChain.ignore, - babelrc: configChain.babelrc, - config: configChain.config - }; -} - -function loadPartialConfig(inputOpts) { - const result = loadPrivatePartialConfig(inputOpts); - if (!result) return null; - const { - options, - babelrc, - ignore, - config - } = result; - (options.plugins || []).forEach(item => { - if (item.value instanceof _plugin.default) { - throw new Error("Passing cached plugin instances is not supported in " + "babel.loadPartialConfig()"); - } - }); - return new PartialConfig(options, babelrc ? babelrc.filepath : undefined, ignore ? ignore.filepath : undefined, config ? config.filepath : undefined); -} - -class PartialConfig { - constructor(options, babelrc, ignore, config) { - this.options = options; - this.babelignore = ignore; - this.babelrc = babelrc; - this.config = config; - Object.freeze(this); - } - - hasFilesystemConfig() { - return this.babelrc !== undefined || this.config !== undefined; - } - -} - -Object.freeze(PartialConfig.prototype); \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/pattern-to-regex.js b/node_modules/@babel/core/lib/config/pattern-to-regex.js deleted file mode 100644 index b80f4b67..00000000 --- a/node_modules/@babel/core/lib/config/pattern-to-regex.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = pathToPattern; - -function _path() { - const data = _interopRequireDefault(require("path")); - - _path = function () { - return data; - }; - - return data; -} - -function _escapeRegExp() { - const data = _interopRequireDefault(require("lodash/escapeRegExp")); - - _escapeRegExp = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const sep = `\\${_path().default.sep}`; -const endSep = `(?:${sep}|$)`; -const substitution = `[^${sep}]+`; -const starPat = `(?:${substitution}${sep})`; -const starPatLast = `(?:${substitution}${endSep})`; -const starStarPat = `${starPat}*?`; -const starStarPatLast = `${starPat}*?${starPatLast}?`; - -function pathToPattern(pattern, dirname) { - const parts = _path().default.resolve(dirname, pattern).split(_path().default.sep); - - return new RegExp(["^", ...parts.map((part, i) => { - const last = i === parts.length - 1; - if (part === "**") return last ? starStarPatLast : starStarPat; - if (part === "*") return last ? starPatLast : starPat; - - if (part.indexOf("*.") === 0) { - return substitution + (0, _escapeRegExp().default)(part.slice(1)) + (last ? endSep : sep); - } - - return (0, _escapeRegExp().default)(part) + (last ? endSep : sep); - })].join("")); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/plugin.js b/node_modules/@babel/core/lib/config/plugin.js deleted file mode 100644 index 3c780708..00000000 --- a/node_modules/@babel/core/lib/config/plugin.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -class Plugin { - constructor(plugin, options, key) { - this.key = plugin.name || key; - this.manipulateOptions = plugin.manipulateOptions; - this.post = plugin.post; - this.pre = plugin.pre; - this.visitor = plugin.visitor || {}; - this.parserOverride = plugin.parserOverride; - this.generatorOverride = plugin.generatorOverride; - this.options = options; - } - -} - -exports.default = Plugin; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/util.js b/node_modules/@babel/core/lib/config/util.js deleted file mode 100644 index 40e3b0b5..00000000 --- a/node_modules/@babel/core/lib/config/util.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.mergeOptions = mergeOptions; - -function mergeOptions(target, source) { - for (const k of Object.keys(source)) { - if (k === "parserOpts" && source.parserOpts) { - const parserOpts = source.parserOpts; - const targetObj = target.parserOpts = target.parserOpts || {}; - mergeDefaultFields(targetObj, parserOpts); - } else if (k === "generatorOpts" && source.generatorOpts) { - const generatorOpts = source.generatorOpts; - const targetObj = target.generatorOpts = target.generatorOpts || {}; - mergeDefaultFields(targetObj, generatorOpts); - } else { - const val = source[k]; - if (val !== undefined) target[k] = val; - } - } -} - -function mergeDefaultFields(target, source) { - for (const k of Object.keys(source)) { - const val = source[k]; - if (val !== undefined) target[k] = val; - } -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/validation/option-assertions.js b/node_modules/@babel/core/lib/config/validation/option-assertions.js deleted file mode 100644 index d339aad0..00000000 --- a/node_modules/@babel/core/lib/config/validation/option-assertions.js +++ /dev/null @@ -1,268 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.msg = msg; -exports.access = access; -exports.assertRootMode = assertRootMode; -exports.assertSourceMaps = assertSourceMaps; -exports.assertCompact = assertCompact; -exports.assertSourceType = assertSourceType; -exports.assertCallerMetadata = assertCallerMetadata; -exports.assertInputSourceMap = assertInputSourceMap; -exports.assertString = assertString; -exports.assertFunction = assertFunction; -exports.assertBoolean = assertBoolean; -exports.assertObject = assertObject; -exports.assertArray = assertArray; -exports.assertIgnoreList = assertIgnoreList; -exports.assertConfigApplicableTest = assertConfigApplicableTest; -exports.assertConfigFileSearch = assertConfigFileSearch; -exports.assertBabelrcSearch = assertBabelrcSearch; -exports.assertPluginList = assertPluginList; - -function msg(loc) { - switch (loc.type) { - case "root": - return ``; - - case "env": - return `${msg(loc.parent)}.env["${loc.name}"]`; - - case "overrides": - return `${msg(loc.parent)}.overrides[${loc.index}]`; - - case "option": - return `${msg(loc.parent)}.${loc.name}`; - - case "access": - return `${msg(loc.parent)}[${JSON.stringify(loc.name)}]`; - - default: - throw new Error(`Assertion failure: Unknown type ${loc.type}`); - } -} - -function access(loc, name) { - return { - type: "access", - name, - parent: loc - }; -} - -function assertRootMode(loc, value) { - if (value !== undefined && value !== "root" && value !== "upward" && value !== "upward-optional") { - throw new Error(`${msg(loc)} must be a "root", "upward", "upward-optional" or undefined`); - } - - return value; -} - -function assertSourceMaps(loc, value) { - if (value !== undefined && typeof value !== "boolean" && value !== "inline" && value !== "both") { - throw new Error(`${msg(loc)} must be a boolean, "inline", "both", or undefined`); - } - - return value; -} - -function assertCompact(loc, value) { - if (value !== undefined && typeof value !== "boolean" && value !== "auto") { - throw new Error(`${msg(loc)} must be a boolean, "auto", or undefined`); - } - - return value; -} - -function assertSourceType(loc, value) { - if (value !== undefined && value !== "module" && value !== "script" && value !== "unambiguous") { - throw new Error(`${msg(loc)} must be "module", "script", "unambiguous", or undefined`); - } - - return value; -} - -function assertCallerMetadata(loc, value) { - const obj = assertObject(loc, value); - - if (obj) { - if (typeof obj["name"] !== "string") { - throw new Error(`${msg(loc)} set but does not contain "name" property string`); - } - - for (const prop of Object.keys(obj)) { - const propLoc = access(loc, prop); - const value = obj[prop]; - - if (value != null && typeof value !== "boolean" && typeof value !== "string" && typeof value !== "number") { - throw new Error(`${msg(propLoc)} must be null, undefined, a boolean, a string, or a number.`); - } - } - } - - return value; -} - -function assertInputSourceMap(loc, value) { - if (value !== undefined && typeof value !== "boolean" && (typeof value !== "object" || !value)) { - throw new Error(`${msg(loc)} must be a boolean, object, or undefined`); - } - - return value; -} - -function assertString(loc, value) { - if (value !== undefined && typeof value !== "string") { - throw new Error(`${msg(loc)} must be a string, or undefined`); - } - - return value; -} - -function assertFunction(loc, value) { - if (value !== undefined && typeof value !== "function") { - throw new Error(`${msg(loc)} must be a function, or undefined`); - } - - return value; -} - -function assertBoolean(loc, value) { - if (value !== undefined && typeof value !== "boolean") { - throw new Error(`${msg(loc)} must be a boolean, or undefined`); - } - - return value; -} - -function assertObject(loc, value) { - if (value !== undefined && (typeof value !== "object" || Array.isArray(value) || !value)) { - throw new Error(`${msg(loc)} must be an object, or undefined`); - } - - return value; -} - -function assertArray(loc, value) { - if (value != null && !Array.isArray(value)) { - throw new Error(`${msg(loc)} must be an array, or undefined`); - } - - return value; -} - -function assertIgnoreList(loc, value) { - const arr = assertArray(loc, value); - - if (arr) { - arr.forEach((item, i) => assertIgnoreItem(access(loc, i), item)); - } - - return arr; -} - -function assertIgnoreItem(loc, value) { - if (typeof value !== "string" && typeof value !== "function" && !(value instanceof RegExp)) { - throw new Error(`${msg(loc)} must be an array of string/Function/RegExp values, or undefined`); - } - - return value; -} - -function assertConfigApplicableTest(loc, value) { - if (value === undefined) return value; - - if (Array.isArray(value)) { - value.forEach((item, i) => { - if (!checkValidTest(item)) { - throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`); - } - }); - } else if (!checkValidTest(value)) { - throw new Error(`${msg(loc)} must be a string/Function/RegExp, or an array of those`); - } - - return value; -} - -function checkValidTest(value) { - return typeof value === "string" || typeof value === "function" || value instanceof RegExp; -} - -function assertConfigFileSearch(loc, value) { - if (value !== undefined && typeof value !== "boolean" && typeof value !== "string") { - throw new Error(`${msg(loc)} must be a undefined, a boolean, a string, ` + `got ${JSON.stringify(value)}`); - } - - return value; -} - -function assertBabelrcSearch(loc, value) { - if (value === undefined || typeof value === "boolean") return value; - - if (Array.isArray(value)) { - value.forEach((item, i) => { - if (!checkValidTest(item)) { - throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`); - } - }); - } else if (!checkValidTest(value)) { - throw new Error(`${msg(loc)} must be a undefined, a boolean, a string/Function/RegExp ` + `or an array of those, got ${JSON.stringify(value)}`); - } - - return value; -} - -function assertPluginList(loc, value) { - const arr = assertArray(loc, value); - - if (arr) { - arr.forEach((item, i) => assertPluginItem(access(loc, i), item)); - } - - return arr; -} - -function assertPluginItem(loc, value) { - if (Array.isArray(value)) { - if (value.length === 0) { - throw new Error(`${msg(loc)} must include an object`); - } - - if (value.length > 3) { - throw new Error(`${msg(loc)} may only be a two-tuple or three-tuple`); - } - - assertPluginTarget(access(loc, 0), value[0]); - - if (value.length > 1) { - const opts = value[1]; - - if (opts !== undefined && opts !== false && (typeof opts !== "object" || Array.isArray(opts) || opts === null)) { - throw new Error(`${msg(access(loc, 1))} must be an object, false, or undefined`); - } - } - - if (value.length === 3) { - const name = value[2]; - - if (name !== undefined && typeof name !== "string") { - throw new Error(`${msg(access(loc, 2))} must be a string, or undefined`); - } - } - } else { - assertPluginTarget(loc, value); - } - - return value; -} - -function assertPluginTarget(loc, value) { - if ((typeof value !== "object" || !value) && typeof value !== "string" && typeof value !== "function") { - throw new Error(`${msg(loc)} must be a string, object, function`); - } - - return value; -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/validation/options.js b/node_modules/@babel/core/lib/config/validation/options.js deleted file mode 100644 index 0c06acfa..00000000 --- a/node_modules/@babel/core/lib/config/validation/options.js +++ /dev/null @@ -1,188 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.validate = validate; - -var _plugin = _interopRequireDefault(require("../plugin")); - -var _removed = _interopRequireDefault(require("./removed")); - -var _optionAssertions = require("./option-assertions"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const ROOT_VALIDATORS = { - cwd: _optionAssertions.assertString, - root: _optionAssertions.assertString, - rootMode: _optionAssertions.assertRootMode, - configFile: _optionAssertions.assertConfigFileSearch, - caller: _optionAssertions.assertCallerMetadata, - filename: _optionAssertions.assertString, - filenameRelative: _optionAssertions.assertString, - code: _optionAssertions.assertBoolean, - ast: _optionAssertions.assertBoolean, - envName: _optionAssertions.assertString -}; -const BABELRC_VALIDATORS = { - babelrc: _optionAssertions.assertBoolean, - babelrcRoots: _optionAssertions.assertBabelrcSearch -}; -const NONPRESET_VALIDATORS = { - extends: _optionAssertions.assertString, - ignore: _optionAssertions.assertIgnoreList, - only: _optionAssertions.assertIgnoreList -}; -const COMMON_VALIDATORS = { - inputSourceMap: _optionAssertions.assertInputSourceMap, - presets: _optionAssertions.assertPluginList, - plugins: _optionAssertions.assertPluginList, - passPerPreset: _optionAssertions.assertBoolean, - env: assertEnvSet, - overrides: assertOverridesList, - test: _optionAssertions.assertConfigApplicableTest, - include: _optionAssertions.assertConfigApplicableTest, - exclude: _optionAssertions.assertConfigApplicableTest, - retainLines: _optionAssertions.assertBoolean, - comments: _optionAssertions.assertBoolean, - shouldPrintComment: _optionAssertions.assertFunction, - compact: _optionAssertions.assertCompact, - minified: _optionAssertions.assertBoolean, - auxiliaryCommentBefore: _optionAssertions.assertString, - auxiliaryCommentAfter: _optionAssertions.assertString, - sourceType: _optionAssertions.assertSourceType, - wrapPluginVisitorMethod: _optionAssertions.assertFunction, - highlightCode: _optionAssertions.assertBoolean, - sourceMaps: _optionAssertions.assertSourceMaps, - sourceMap: _optionAssertions.assertSourceMaps, - sourceFileName: _optionAssertions.assertString, - sourceRoot: _optionAssertions.assertString, - getModuleId: _optionAssertions.assertFunction, - moduleRoot: _optionAssertions.assertString, - moduleIds: _optionAssertions.assertBoolean, - moduleId: _optionAssertions.assertString, - parserOpts: _optionAssertions.assertObject, - generatorOpts: _optionAssertions.assertObject -}; - -function getSource(loc) { - return loc.type === "root" ? loc.source : getSource(loc.parent); -} - -function validate(type, opts) { - return validateNested({ - type: "root", - source: type - }, opts); -} - -function validateNested(loc, opts) { - const type = getSource(loc); - assertNoDuplicateSourcemap(opts); - Object.keys(opts).forEach(key => { - const optLoc = { - type: "option", - name: key, - parent: loc - }; - - if (type === "preset" && NONPRESET_VALIDATORS[key]) { - throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is not allowed in preset options`); - } - - if (type !== "arguments" && ROOT_VALIDATORS[key]) { - throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is only allowed in root programmatic options`); - } - - if (type !== "arguments" && type !== "configfile" && BABELRC_VALIDATORS[key]) { - if (type === "babelrcfile" || type === "extendsfile") { - throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is not allowed in .babelrc or "extends"ed files, only in root programmatic options, ` + `or babel.config.js/config file options`); - } - - throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is only allowed in root programmatic options, or babel.config.js/config file options`); - } - - const validator = COMMON_VALIDATORS[key] || NONPRESET_VALIDATORS[key] || BABELRC_VALIDATORS[key] || ROOT_VALIDATORS[key] || throwUnknownError; - validator(optLoc, opts[key]); - }); - return opts; -} - -function throwUnknownError(loc) { - const key = loc.name; - - if (_removed.default[key]) { - const { - message, - version = 5 - } = _removed.default[key]; - throw new ReferenceError(`Using removed Babel ${version} option: ${(0, _optionAssertions.msg)(loc)} - ${message}`); - } else { - const unknownOptErr = `Unknown option: ${(0, _optionAssertions.msg)(loc)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`; - throw new ReferenceError(unknownOptErr); - } -} - -function has(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); -} - -function assertNoDuplicateSourcemap(opts) { - if (has(opts, "sourceMap") && has(opts, "sourceMaps")) { - throw new Error(".sourceMap is an alias for .sourceMaps, cannot use both"); - } -} - -function assertEnvSet(loc, value) { - if (loc.parent.type === "env") { - throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside of another .env block`); - } - - const parent = loc.parent; - const obj = (0, _optionAssertions.assertObject)(loc, value); - - if (obj) { - for (const envName of Object.keys(obj)) { - const env = (0, _optionAssertions.assertObject)((0, _optionAssertions.access)(loc, envName), obj[envName]); - if (!env) continue; - const envLoc = { - type: "env", - name: envName, - parent - }; - validateNested(envLoc, env); - } - } - - return obj; -} - -function assertOverridesList(loc, value) { - if (loc.parent.type === "env") { - throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside an .env block`); - } - - if (loc.parent.type === "overrides") { - throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside an .overrides block`); - } - - const parent = loc.parent; - const arr = (0, _optionAssertions.assertArray)(loc, value); - - if (arr) { - for (const [index, item] of arr.entries()) { - const objLoc = (0, _optionAssertions.access)(loc, index); - const env = (0, _optionAssertions.assertObject)(objLoc, item); - if (!env) throw new Error(`${(0, _optionAssertions.msg)(objLoc)} must be an object`); - const overridesLoc = { - type: "overrides", - index, - parent - }; - validateNested(overridesLoc, env); - } - } - - return arr; -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/validation/plugins.js b/node_modules/@babel/core/lib/config/validation/plugins.js deleted file mode 100644 index 73b498cd..00000000 --- a/node_modules/@babel/core/lib/config/validation/plugins.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.validatePluginObject = validatePluginObject; - -var _optionAssertions = require("./option-assertions"); - -const VALIDATORS = { - name: _optionAssertions.assertString, - manipulateOptions: _optionAssertions.assertFunction, - pre: _optionAssertions.assertFunction, - post: _optionAssertions.assertFunction, - inherits: _optionAssertions.assertFunction, - visitor: assertVisitorMap, - parserOverride: _optionAssertions.assertFunction, - generatorOverride: _optionAssertions.assertFunction -}; - -function assertVisitorMap(key, value) { - const obj = (0, _optionAssertions.assertObject)(key, value); - - if (obj) { - Object.keys(obj).forEach(prop => assertVisitorHandler(prop, obj[prop])); - - if (obj.enter || obj.exit) { - throw new Error(`.${key} cannot contain catch-all "enter" or "exit" handlers. Please target individual nodes.`); - } - } - - return obj; -} - -function assertVisitorHandler(key, value) { - if (value && typeof value === "object") { - Object.keys(value).forEach(handler => { - if (handler !== "enter" && handler !== "exit") { - throw new Error(`.visitor["${key}"] may only have .enter and/or .exit handlers.`); - } - }); - } else if (typeof value !== "function") { - throw new Error(`.visitor["${key}"] must be a function`); - } - - return value; -} - -function validatePluginObject(obj) { - Object.keys(obj).forEach(key => { - const validator = VALIDATORS[key]; - if (validator) validator(key, obj[key]);else throw new Error(`.${key} is not a valid Plugin property`); - }); - return obj; -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/config/validation/removed.js b/node_modules/@babel/core/lib/config/validation/removed.js deleted file mode 100644 index f0fcd7de..00000000 --- a/node_modules/@babel/core/lib/config/validation/removed.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _default = { - auxiliaryComment: { - message: "Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`" - }, - blacklist: { - message: "Put the specific transforms you want in the `plugins` option" - }, - breakConfig: { - message: "This is not a necessary option in Babel 6" - }, - experimental: { - message: "Put the specific transforms you want in the `plugins` option" - }, - externalHelpers: { - message: "Use the `external-helpers` plugin instead. " + "Check out http://babeljs.io/docs/plugins/external-helpers/" - }, - extra: { - message: "" - }, - jsxPragma: { - message: "use the `pragma` option in the `react-jsx` plugin. " + "Check out http://babeljs.io/docs/plugins/transform-react-jsx/" - }, - loose: { - message: "Specify the `loose` option for the relevant plugin you are using " + "or use a preset that sets the option." - }, - metadataUsedHelpers: { - message: "Not required anymore as this is enabled by default" - }, - modules: { - message: "Use the corresponding module transform plugin in the `plugins` option. " + "Check out http://babeljs.io/docs/plugins/#modules" - }, - nonStandard: { - message: "Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. " + "Also check out the react preset http://babeljs.io/docs/plugins/preset-react/" - }, - optional: { - message: "Put the specific transforms you want in the `plugins` option" - }, - sourceMapName: { - message: "The `sourceMapName` option has been removed because it makes more sense for the " + "tooling that calls Babel to assign `map.file` themselves." - }, - stage: { - message: "Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets" - }, - whitelist: { - message: "Put the specific transforms you want in the `plugins` option" - }, - resolveModuleSource: { - version: 6, - message: "Use `babel-plugin-module-resolver@3`'s 'resolvePath' options" - }, - metadata: { - version: 6, - message: "Generated plugin metadata is always included in the output result" - }, - sourceMapTarget: { - version: 6, - message: "The `sourceMapTarget` option has been removed because it makes more sense for the tooling " + "that calls Babel to assign `map.file` themselves." - } -}; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/index.js b/node_modules/@babel/core/lib/index.js deleted file mode 100644 index aa0b43e9..00000000 --- a/node_modules/@babel/core/lib/index.js +++ /dev/null @@ -1,240 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Plugin = Plugin; -Object.defineProperty(exports, "File", { - enumerable: true, - get: function () { - return _file.default; - } -}); -Object.defineProperty(exports, "buildExternalHelpers", { - enumerable: true, - get: function () { - return _buildExternalHelpers.default; - } -}); -Object.defineProperty(exports, "resolvePlugin", { - enumerable: true, - get: function () { - return _files.resolvePlugin; - } -}); -Object.defineProperty(exports, "resolvePreset", { - enumerable: true, - get: function () { - return _files.resolvePreset; - } -}); -Object.defineProperty(exports, "version", { - enumerable: true, - get: function () { - return _package.version; - } -}); -Object.defineProperty(exports, "getEnv", { - enumerable: true, - get: function () { - return _environment.getEnv; - } -}); -Object.defineProperty(exports, "tokTypes", { - enumerable: true, - get: function () { - return _parser().tokTypes; - } -}); -Object.defineProperty(exports, "traverse", { - enumerable: true, - get: function () { - return _traverse().default; - } -}); -Object.defineProperty(exports, "template", { - enumerable: true, - get: function () { - return _template().default; - } -}); -Object.defineProperty(exports, "createConfigItem", { - enumerable: true, - get: function () { - return _item.createConfigItem; - } -}); -Object.defineProperty(exports, "loadPartialConfig", { - enumerable: true, - get: function () { - return _config.loadPartialConfig; - } -}); -Object.defineProperty(exports, "loadOptions", { - enumerable: true, - get: function () { - return _config.loadOptions; - } -}); -Object.defineProperty(exports, "transform", { - enumerable: true, - get: function () { - return _transform.transform; - } -}); -Object.defineProperty(exports, "transformSync", { - enumerable: true, - get: function () { - return _transform.transformSync; - } -}); -Object.defineProperty(exports, "transformAsync", { - enumerable: true, - get: function () { - return _transform.transformAsync; - } -}); -Object.defineProperty(exports, "transformFile", { - enumerable: true, - get: function () { - return _transformFile.transformFile; - } -}); -Object.defineProperty(exports, "transformFileSync", { - enumerable: true, - get: function () { - return _transformFile.transformFileSync; - } -}); -Object.defineProperty(exports, "transformFileAsync", { - enumerable: true, - get: function () { - return _transformFile.transformFileAsync; - } -}); -Object.defineProperty(exports, "transformFromAst", { - enumerable: true, - get: function () { - return _transformAst.transformFromAst; - } -}); -Object.defineProperty(exports, "transformFromAstSync", { - enumerable: true, - get: function () { - return _transformAst.transformFromAstSync; - } -}); -Object.defineProperty(exports, "transformFromAstAsync", { - enumerable: true, - get: function () { - return _transformAst.transformFromAstAsync; - } -}); -Object.defineProperty(exports, "parse", { - enumerable: true, - get: function () { - return _parse.parse; - } -}); -Object.defineProperty(exports, "parseSync", { - enumerable: true, - get: function () { - return _parse.parseSync; - } -}); -Object.defineProperty(exports, "parseAsync", { - enumerable: true, - get: function () { - return _parse.parseAsync; - } -}); -exports.types = exports.OptionManager = exports.DEFAULT_EXTENSIONS = void 0; - -var _file = _interopRequireDefault(require("./transformation/file/file")); - -var _buildExternalHelpers = _interopRequireDefault(require("./tools/build-external-helpers")); - -var _files = require("./config/files"); - -var _package = require("../package.json"); - -var _environment = require("./config/helpers/environment"); - -function _types() { - const data = _interopRequireWildcard(require("@babel/types")); - - _types = function () { - return data; - }; - - return data; -} - -Object.defineProperty(exports, "types", { - enumerable: true, - get: function () { - return _types(); - } -}); - -function _parser() { - const data = require("@babel/parser"); - - _parser = function () { - return data; - }; - - return data; -} - -function _traverse() { - const data = _interopRequireDefault(require("@babel/traverse")); - - _traverse = function () { - return data; - }; - - return data; -} - -function _template() { - const data = _interopRequireDefault(require("@babel/template")); - - _template = function () { - return data; - }; - - return data; -} - -var _item = require("./config/item"); - -var _config = require("./config"); - -var _transform = require("./transform"); - -var _transformFile = require("./transform-file"); - -var _transformAst = require("./transform-ast"); - -var _parse = require("./parse"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs"]); -exports.DEFAULT_EXTENSIONS = DEFAULT_EXTENSIONS; - -class OptionManager { - init(opts) { - return (0, _config.loadOptions)(opts); - } - -} - -exports.OptionManager = OptionManager; - -function Plugin(alias) { - throw new Error(`The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/parse.js b/node_modules/@babel/core/lib/parse.js deleted file mode 100644 index 8f1bf2e2..00000000 --- a/node_modules/@babel/core/lib/parse.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.parseSync = parseSync; -exports.parseAsync = parseAsync; -exports.parse = void 0; - -var _config = _interopRequireDefault(require("./config")); - -var _normalizeFile = _interopRequireDefault(require("./transformation/normalize-file")); - -var _normalizeOpts = _interopRequireDefault(require("./transformation/normalize-opts")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const parse = function parse(code, opts, callback) { - if (typeof opts === "function") { - callback = opts; - opts = undefined; - } - - if (callback === undefined) return parseSync(code, opts); - const config = (0, _config.default)(opts); - - if (config === null) { - return null; - } - - const cb = callback; - process.nextTick(() => { - let ast = null; - - try { - const cfg = (0, _config.default)(opts); - if (cfg === null) return cb(null, null); - ast = (0, _normalizeFile.default)(cfg.passes, (0, _normalizeOpts.default)(cfg), code).ast; - } catch (err) { - return cb(err); - } - - cb(null, ast); - }); -}; - -exports.parse = parse; - -function parseSync(code, opts) { - const config = (0, _config.default)(opts); - - if (config === null) { - return null; - } - - return (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code).ast; -} - -function parseAsync(code, opts) { - return new Promise((res, rej) => { - parse(code, opts, (err, result) => { - if (err == null) res(result);else rej(err); - }); - }); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/tools/build-external-helpers.js b/node_modules/@babel/core/lib/tools/build-external-helpers.js deleted file mode 100644 index 5e06a3bf..00000000 --- a/node_modules/@babel/core/lib/tools/build-external-helpers.js +++ /dev/null @@ -1,143 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; - -function helpers() { - const data = _interopRequireWildcard(require("@babel/helpers")); - - helpers = function () { - return data; - }; - - return data; -} - -function _generator() { - const data = _interopRequireDefault(require("@babel/generator")); - - _generator = function () { - return data; - }; - - return data; -} - -function _template() { - const data = _interopRequireDefault(require("@babel/template")); - - _template = function () { - return data; - }; - - return data; -} - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const buildUmdWrapper = replacements => _template().default` - (function (root, factory) { - if (typeof define === "function" && define.amd) { - define(AMD_ARGUMENTS, factory); - } else if (typeof exports === "object") { - factory(COMMON_ARGUMENTS); - } else { - factory(BROWSER_ARGUMENTS); - } - })(UMD_ROOT, function (FACTORY_PARAMETERS) { - FACTORY_BODY - }); - `(replacements); - -function buildGlobal(whitelist) { - const namespace = t().identifier("babelHelpers"); - const body = []; - const container = t().functionExpression(null, [t().identifier("global")], t().blockStatement(body)); - const tree = t().program([t().expressionStatement(t().callExpression(container, [t().conditionalExpression(t().binaryExpression("===", t().unaryExpression("typeof", t().identifier("global")), t().stringLiteral("undefined")), t().identifier("self"), t().identifier("global"))]))]); - body.push(t().variableDeclaration("var", [t().variableDeclarator(namespace, t().assignmentExpression("=", t().memberExpression(t().identifier("global"), namespace), t().objectExpression([])))])); - buildHelpers(body, namespace, whitelist); - return tree; -} - -function buildModule(whitelist) { - const body = []; - const refs = buildHelpers(body, null, whitelist); - body.unshift(t().exportNamedDeclaration(null, Object.keys(refs).map(name => { - return t().exportSpecifier(t().cloneNode(refs[name]), t().identifier(name)); - }))); - return t().program(body, [], "module"); -} - -function buildUmd(whitelist) { - const namespace = t().identifier("babelHelpers"); - const body = []; - body.push(t().variableDeclaration("var", [t().variableDeclarator(namespace, t().identifier("global"))])); - buildHelpers(body, namespace, whitelist); - return t().program([buildUmdWrapper({ - FACTORY_PARAMETERS: t().identifier("global"), - BROWSER_ARGUMENTS: t().assignmentExpression("=", t().memberExpression(t().identifier("root"), namespace), t().objectExpression([])), - COMMON_ARGUMENTS: t().identifier("exports"), - AMD_ARGUMENTS: t().arrayExpression([t().stringLiteral("exports")]), - FACTORY_BODY: body, - UMD_ROOT: t().identifier("this") - })]); -} - -function buildVar(whitelist) { - const namespace = t().identifier("babelHelpers"); - const body = []; - body.push(t().variableDeclaration("var", [t().variableDeclarator(namespace, t().objectExpression([]))])); - const tree = t().program(body); - buildHelpers(body, namespace, whitelist); - body.push(t().expressionStatement(namespace)); - return tree; -} - -function buildHelpers(body, namespace, whitelist) { - const getHelperReference = name => { - return namespace ? t().memberExpression(namespace, t().identifier(name)) : t().identifier(`_${name}`); - }; - - const refs = {}; - helpers().list.forEach(function (name) { - if (whitelist && whitelist.indexOf(name) < 0) return; - const ref = refs[name] = getHelperReference(name); - const { - nodes - } = helpers().get(name, getHelperReference, ref); - body.push(...nodes); - }); - return refs; -} - -function _default(whitelist, outputType = "global") { - let tree; - const build = { - global: buildGlobal, - module: buildModule, - umd: buildUmd, - var: buildVar - }[outputType]; - - if (build) { - tree = build(whitelist); - } else { - throw new Error(`Unsupported output type ${outputType}`); - } - - return (0, _generator().default)(tree).code; -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform-ast.js b/node_modules/@babel/core/lib/transform-ast.js deleted file mode 100644 index 05161cf1..00000000 --- a/node_modules/@babel/core/lib/transform-ast.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.transformFromAstSync = transformFromAstSync; -exports.transformFromAstAsync = transformFromAstAsync; -exports.transformFromAst = void 0; - -var _config = _interopRequireDefault(require("./config")); - -var _transformation = require("./transformation"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const transformFromAst = function transformFromAst(ast, code, opts, callback) { - if (typeof opts === "function") { - callback = opts; - opts = undefined; - } - - if (callback === undefined) return transformFromAstSync(ast, code, opts); - const cb = callback; - process.nextTick(() => { - let cfg; - - try { - cfg = (0, _config.default)(opts); - if (cfg === null) return cb(null, null); - } catch (err) { - return cb(err); - } - - if (!ast) return cb(new Error("No AST given")); - (0, _transformation.runAsync)(cfg, code, ast, cb); - }); -}; - -exports.transformFromAst = transformFromAst; - -function transformFromAstSync(ast, code, opts) { - const config = (0, _config.default)(opts); - if (config === null) return null; - if (!ast) throw new Error("No AST given"); - return (0, _transformation.runSync)(config, code, ast); -} - -function transformFromAstAsync(ast, code, opts) { - return new Promise((res, rej) => { - transformFromAst(ast, code, opts, (err, result) => { - if (err == null) res(result);else rej(err); - }); - }); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform-file-browser.js b/node_modules/@babel/core/lib/transform-file-browser.js deleted file mode 100644 index 6442c982..00000000 --- a/node_modules/@babel/core/lib/transform-file-browser.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.transformFileSync = transformFileSync; -exports.transformFileAsync = transformFileAsync; -exports.transformFile = void 0; - -const transformFile = function transformFile(filename, opts, callback) { - if (typeof opts === "function") { - callback = opts; - } - - callback(new Error("Transforming files is not supported in browsers"), null); -}; - -exports.transformFile = transformFile; - -function transformFileSync() { - throw new Error("Transforming files is not supported in browsers"); -} - -function transformFileAsync() { - return Promise.reject(new Error("Transforming files is not supported in browsers")); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform-file.js b/node_modules/@babel/core/lib/transform-file.js deleted file mode 100644 index 74423aa7..00000000 --- a/node_modules/@babel/core/lib/transform-file.js +++ /dev/null @@ -1,91 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.transformFileSync = transformFileSync; -exports.transformFileAsync = transformFileAsync; -exports.transformFile = void 0; - -function _fs() { - const data = _interopRequireDefault(require("fs")); - - _fs = function () { - return data; - }; - - return data; -} - -var _config = _interopRequireDefault(require("./config")); - -var _transformation = require("./transformation"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -({}); - -const transformFile = function transformFile(filename, opts, callback) { - let options; - - if (typeof opts === "function") { - callback = opts; - opts = undefined; - } - - if (opts == null) { - options = { - filename - }; - } else if (opts && typeof opts === "object") { - options = Object.assign({}, opts, { - filename - }); - } - - process.nextTick(() => { - let cfg; - - try { - cfg = (0, _config.default)(options); - if (cfg === null) return callback(null, null); - } catch (err) { - return callback(err); - } - - const config = cfg; - - _fs().default.readFile(filename, "utf8", function (err, code) { - if (err) return callback(err, null); - (0, _transformation.runAsync)(config, code, null, callback); - }); - }); -}; - -exports.transformFile = transformFile; - -function transformFileSync(filename, opts) { - let options; - - if (opts == null) { - options = { - filename - }; - } else if (opts && typeof opts === "object") { - options = Object.assign({}, opts, { - filename - }); - } - - const config = (0, _config.default)(options); - if (config === null) return null; - return (0, _transformation.runSync)(config, _fs().default.readFileSync(filename, "utf8")); -} - -function transformFileAsync(filename, opts) { - return new Promise((res, rej) => { - transformFile(filename, opts, (err, result) => { - if (err == null) res(result);else rej(err); - }); - }); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transform.js b/node_modules/@babel/core/lib/transform.js deleted file mode 100644 index 34332fcc..00000000 --- a/node_modules/@babel/core/lib/transform.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.transformSync = transformSync; -exports.transformAsync = transformAsync; -exports.transform = void 0; - -var _config = _interopRequireDefault(require("./config")); - -var _transformation = require("./transformation"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const transform = function transform(code, opts, callback) { - if (typeof opts === "function") { - callback = opts; - opts = undefined; - } - - if (callback === undefined) return transformSync(code, opts); - const cb = callback; - process.nextTick(() => { - let cfg; - - try { - cfg = (0, _config.default)(opts); - if (cfg === null) return cb(null, null); - } catch (err) { - return cb(err); - } - - (0, _transformation.runAsync)(cfg, code, null, cb); - }); -}; - -exports.transform = transform; - -function transformSync(code, opts) { - const config = (0, _config.default)(opts); - if (config === null) return null; - return (0, _transformation.runSync)(config, code); -} - -function transformAsync(code, opts) { - return new Promise((res, rej) => { - transform(code, opts, (err, result) => { - if (err == null) res(result);else rej(err); - }); - }); -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js b/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js deleted file mode 100644 index 49273a2a..00000000 --- a/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = loadBlockHoistPlugin; - -function _sortBy() { - const data = _interopRequireDefault(require("lodash/sortBy")); - - _sortBy = function () { - return data; - }; - - return data; -} - -var _config = _interopRequireDefault(require("../config")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -let LOADED_PLUGIN; - -function loadBlockHoistPlugin() { - if (!LOADED_PLUGIN) { - const config = (0, _config.default)({ - babelrc: false, - configFile: false, - plugins: [blockHoistPlugin] - }); - LOADED_PLUGIN = config ? config.passes[0][0] : undefined; - if (!LOADED_PLUGIN) throw new Error("Assertion failure"); - } - - return LOADED_PLUGIN; -} - -const blockHoistPlugin = { - name: "internal.blockHoist", - visitor: { - Block: { - exit({ - node - }) { - let hasChange = false; - - for (let i = 0; i < node.body.length; i++) { - const bodyNode = node.body[i]; - - if (bodyNode && bodyNode._blockHoist != null) { - hasChange = true; - break; - } - } - - if (!hasChange) return; - node.body = (0, _sortBy().default)(node.body, function (bodyNode) { - let priority = bodyNode && bodyNode._blockHoist; - if (priority == null) priority = 1; - if (priority === true) priority = 2; - return -1 * priority; - }); - } - - } - } -}; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/file/file.js b/node_modules/@babel/core/lib/transformation/file/file.js deleted file mode 100644 index 6348561c..00000000 --- a/node_modules/@babel/core/lib/transformation/file/file.js +++ /dev/null @@ -1,267 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function helpers() { - const data = _interopRequireWildcard(require("@babel/helpers")); - - helpers = function () { - return data; - }; - - return data; -} - -function _traverse() { - const data = _interopRequireWildcard(require("@babel/traverse")); - - _traverse = function () { - return data; - }; - - return data; -} - -function _codeFrame() { - const data = require("@babel/code-frame"); - - _codeFrame = function () { - return data; - }; - - return data; -} - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _semver() { - const data = _interopRequireDefault(require("semver")); - - _semver = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const errorVisitor = { - enter(path, state) { - const loc = path.node.loc; - - if (loc) { - state.loc = loc; - path.stop(); - } - } - -}; - -class File { - constructor(options, { - code, - ast, - inputMap - }) { - this._map = new Map(); - this.declarations = {}; - this.path = null; - this.ast = {}; - this.metadata = {}; - this.code = ""; - this.inputMap = null; - this.hub = { - file: this, - getCode: () => this.code, - getScope: () => this.scope, - addHelper: this.addHelper.bind(this), - buildError: this.buildCodeFrameError.bind(this) - }; - this.opts = options; - this.code = code; - this.ast = ast; - this.inputMap = inputMap; - this.path = _traverse().NodePath.get({ - hub: this.hub, - parentPath: null, - parent: this.ast, - container: this.ast, - key: "program" - }).setContext(); - this.scope = this.path.scope; - } - - get shebang() { - const { - interpreter - } = this.path.node; - return interpreter ? interpreter.value : ""; - } - - set shebang(value) { - if (value) { - this.path.get("interpreter").replaceWith(t().interpreterDirective(value)); - } else { - this.path.get("interpreter").remove(); - } - } - - set(key, val) { - if (key === "helpersNamespace") { - throw new Error("Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility." + "If you are using @babel/plugin-external-helpers you will need to use a newer " + "version than the one you currently have installed. " + "If you have your own implementation, you'll want to explore using 'helperGenerator' " + "alongside 'file.availableHelper()'."); - } - - this._map.set(key, val); - } - - get(key) { - return this._map.get(key); - } - - has(key) { - return this._map.has(key); - } - - getModuleName() { - const { - filename, - filenameRelative = filename, - moduleId, - moduleIds = !!moduleId, - getModuleId, - sourceRoot: sourceRootTmp, - moduleRoot = sourceRootTmp, - sourceRoot = moduleRoot - } = this.opts; - if (!moduleIds) return null; - - if (moduleId != null && !getModuleId) { - return moduleId; - } - - let moduleName = moduleRoot != null ? moduleRoot + "/" : ""; - - if (filenameRelative) { - const sourceRootReplacer = sourceRoot != null ? new RegExp("^" + sourceRoot + "/?") : ""; - moduleName += filenameRelative.replace(sourceRootReplacer, "").replace(/\.(\w*?)$/, ""); - } - - moduleName = moduleName.replace(/\\/g, "/"); - - if (getModuleId) { - return getModuleId(moduleName) || moduleName; - } else { - return moduleName; - } - } - - addImport() { - throw new Error("This API has been removed. If you're looking for this " + "functionality in Babel 7, you should import the " + "'@babel/helper-module-imports' module and use the functions exposed " + " from that module, such as 'addNamed' or 'addDefault'."); - } - - availableHelper(name, versionRange) { - let minVersion; - - try { - minVersion = helpers().minVersion(name); - } catch (err) { - if (err.code !== "BABEL_HELPER_UNKNOWN") throw err; - return false; - } - - if (typeof versionRange !== "string") return true; - if (_semver().default.valid(versionRange)) versionRange = `^${versionRange}`; - return !_semver().default.intersects(`<${minVersion}`, versionRange) && !_semver().default.intersects(`>=8.0.0`, versionRange); - } - - addHelper(name) { - const declar = this.declarations[name]; - if (declar) return t().cloneNode(declar); - const generator = this.get("helperGenerator"); - - if (generator) { - const res = generator(name); - if (res) return res; - } - - helpers().ensure(name); - const uid = this.declarations[name] = this.scope.generateUidIdentifier(name); - const dependencies = {}; - - for (const dep of helpers().getDependencies(name)) { - dependencies[dep] = this.addHelper(dep); - } - - const { - nodes, - globals - } = helpers().get(name, dep => dependencies[dep], uid, Object.keys(this.scope.getAllBindings())); - globals.forEach(name => { - if (this.path.scope.hasBinding(name, true)) { - this.path.scope.rename(name); - } - }); - nodes.forEach(node => { - node._compact = true; - }); - this.path.unshiftContainer("body", nodes); - this.path.get("body").forEach(path => { - if (nodes.indexOf(path.node) === -1) return; - if (path.isVariableDeclaration()) this.scope.registerDeclaration(path); - }); - return uid; - } - - addTemplateObject() { - throw new Error("This function has been moved into the template literal transform itself."); - } - - buildCodeFrameError(node, msg, Error = SyntaxError) { - let loc = node && (node.loc || node._loc); - msg = `${this.opts.filename}: ${msg}`; - - if (!loc && node) { - const state = { - loc: null - }; - (0, _traverse().default)(node, errorVisitor, this.scope, state); - loc = state.loc; - let txt = "This is an error on an internal node. Probably an internal error."; - if (loc) txt += " Location has been estimated."; - msg += ` (${txt})`; - } - - if (loc) { - const { - highlightCode = true - } = this.opts; - msg += "\n" + (0, _codeFrame().codeFrameColumns)(this.code, { - start: { - line: loc.start.line, - column: loc.start.column + 1 - } - }, { - highlightCode - }); - } - - return new Error(msg); - } - -} - -exports.default = File; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/file/generate.js b/node_modules/@babel/core/lib/transformation/file/generate.js deleted file mode 100644 index 6be495ce..00000000 --- a/node_modules/@babel/core/lib/transformation/file/generate.js +++ /dev/null @@ -1,89 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = generateCode; - -function _convertSourceMap() { - const data = _interopRequireDefault(require("convert-source-map")); - - _convertSourceMap = function () { - return data; - }; - - return data; -} - -function _generator() { - const data = _interopRequireDefault(require("@babel/generator")); - - _generator = function () { - return data; - }; - - return data; -} - -var _mergeMap = _interopRequireDefault(require("./merge-map")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function generateCode(pluginPasses, file) { - const { - opts, - ast, - code, - inputMap - } = file; - const results = []; - - for (const plugins of pluginPasses) { - for (const plugin of plugins) { - const { - generatorOverride - } = plugin; - - if (generatorOverride) { - const result = generatorOverride(ast, opts.generatorOpts, code, _generator().default); - if (result !== undefined) results.push(result); - } - } - } - - let result; - - if (results.length === 0) { - result = (0, _generator().default)(ast, opts.generatorOpts, code); - } else if (results.length === 1) { - result = results[0]; - - if (typeof result.then === "function") { - throw new Error(`You appear to be using an async parser plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, ` + `you may need to upgrade your @babel/core version.`); - } - } else { - throw new Error("More than one plugin attempted to override codegen."); - } - - let { - code: outputCode, - map: outputMap - } = result; - - if (outputMap && inputMap) { - outputMap = (0, _mergeMap.default)(inputMap.toObject(), outputMap); - } - - if (opts.sourceMaps === "inline" || opts.sourceMaps === "both") { - outputCode += "\n" + _convertSourceMap().default.fromObject(outputMap).toComment(); - } - - if (opts.sourceMaps === "inline") { - outputMap = null; - } - - return { - outputCode, - outputMap - }; -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/file/merge-map.js b/node_modules/@babel/core/lib/transformation/file/merge-map.js deleted file mode 100644 index a92b9ed0..00000000 --- a/node_modules/@babel/core/lib/transformation/file/merge-map.js +++ /dev/null @@ -1,255 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = mergeSourceMap; - -function _sourceMap() { - const data = _interopRequireDefault(require("source-map")); - - _sourceMap = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function mergeSourceMap(inputMap, map) { - const input = buildMappingData(inputMap); - const output = buildMappingData(map); - const mergedGenerator = new (_sourceMap().default.SourceMapGenerator)(); - - for (const _ref of input.sources) { - const { - source - } = _ref; - - if (typeof source.content === "string") { - mergedGenerator.setSourceContent(source.path, source.content); - } - } - - if (output.sources.length === 1) { - const defaultSource = output.sources[0]; - const insertedMappings = new Map(); - eachInputGeneratedRange(input, (generated, original, source) => { - eachOverlappingGeneratedOutputRange(defaultSource, generated, item => { - const key = makeMappingKey(item); - if (insertedMappings.has(key)) return; - insertedMappings.set(key, item); - mergedGenerator.addMapping({ - source: source.path, - original: { - line: original.line, - column: original.columnStart - }, - generated: { - line: item.line, - column: item.columnStart - }, - name: original.name - }); - }); - }); - - for (const item of insertedMappings.values()) { - if (item.columnEnd === Infinity) { - continue; - } - - const clearItem = { - line: item.line, - columnStart: item.columnEnd - }; - const key = makeMappingKey(clearItem); - - if (insertedMappings.has(key)) { - continue; - } - - mergedGenerator.addMapping({ - generated: { - line: clearItem.line, - column: clearItem.columnStart - } - }); - } - } - - const result = mergedGenerator.toJSON(); - - if (typeof input.sourceRoot === "string") { - result.sourceRoot = input.sourceRoot; - } - - return result; -} - -function makeMappingKey(item) { - return `${item.line}/${item.columnStart}`; -} - -function eachOverlappingGeneratedOutputRange(outputFile, inputGeneratedRange, callback) { - const overlappingOriginal = filterApplicableOriginalRanges(outputFile, inputGeneratedRange); - - for (const _ref2 of overlappingOriginal) { - const { - generated - } = _ref2; - - for (const item of generated) { - callback(item); - } - } -} - -function filterApplicableOriginalRanges({ - mappings -}, { - line, - columnStart, - columnEnd -}) { - return filterSortedArray(mappings, ({ - original: outOriginal - }) => { - if (line > outOriginal.line) return -1; - if (line < outOriginal.line) return 1; - if (columnStart >= outOriginal.columnEnd) return -1; - if (columnEnd <= outOriginal.columnStart) return 1; - return 0; - }); -} - -function eachInputGeneratedRange(map, callback) { - for (const _ref3 of map.sources) { - const { - source, - mappings - } = _ref3; - - for (const _ref4 of mappings) { - const { - original, - generated - } = _ref4; - - for (const item of generated) { - callback(item, original, source); - } - } - } -} - -function buildMappingData(map) { - const consumer = new (_sourceMap().default.SourceMapConsumer)(Object.assign({}, map, { - sourceRoot: null - })); - const sources = new Map(); - const mappings = new Map(); - let last = null; - consumer.computeColumnSpans(); - consumer.eachMapping(m => { - if (m.originalLine === null) return; - let source = sources.get(m.source); - - if (!source) { - source = { - path: m.source, - content: consumer.sourceContentFor(m.source, true) - }; - sources.set(m.source, source); - } - - let sourceData = mappings.get(source); - - if (!sourceData) { - sourceData = { - source, - mappings: [] - }; - mappings.set(source, sourceData); - } - - const obj = { - line: m.originalLine, - columnStart: m.originalColumn, - columnEnd: Infinity, - name: m.name - }; - - if (last && last.source === source && last.mapping.line === m.originalLine) { - last.mapping.columnEnd = m.originalColumn; - } - - last = { - source, - mapping: obj - }; - sourceData.mappings.push({ - original: obj, - generated: consumer.allGeneratedPositionsFor({ - source: m.source, - line: m.originalLine, - column: m.originalColumn - }).map(item => ({ - line: item.line, - columnStart: item.column, - columnEnd: item.lastColumn + 1 - })) - }); - }, null, _sourceMap().default.SourceMapConsumer.ORIGINAL_ORDER); - return { - file: map.file, - sourceRoot: map.sourceRoot, - sources: Array.from(mappings.values()) - }; -} - -function findInsertionLocation(array, callback) { - let left = 0; - let right = array.length; - - while (left < right) { - const mid = Math.floor((left + right) / 2); - const item = array[mid]; - const result = callback(item); - - if (result === 0) { - left = mid; - break; - } - - if (result >= 0) { - right = mid; - } else { - left = mid + 1; - } - } - - let i = left; - - if (i < array.length) { - while (i >= 0 && callback(array[i]) >= 0) { - i--; - } - - return i + 1; - } - - return i; -} - -function filterSortedArray(array, callback) { - const start = findInsertionLocation(array, callback); - const results = []; - - for (let i = start; i < array.length && callback(array[i]) === 0; i++) { - results.push(array[i]); - } - - return results; -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/index.js b/node_modules/@babel/core/lib/transformation/index.js deleted file mode 100644 index b14697aa..00000000 --- a/node_modules/@babel/core/lib/transformation/index.js +++ /dev/null @@ -1,106 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.runAsync = runAsync; -exports.runSync = runSync; - -function _traverse() { - const data = _interopRequireDefault(require("@babel/traverse")); - - _traverse = function () { - return data; - }; - - return data; -} - -var _pluginPass = _interopRequireDefault(require("./plugin-pass")); - -var _blockHoistPlugin = _interopRequireDefault(require("./block-hoist-plugin")); - -var _normalizeOpts = _interopRequireDefault(require("./normalize-opts")); - -var _normalizeFile = _interopRequireDefault(require("./normalize-file")); - -var _generate = _interopRequireDefault(require("./file/generate")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function runAsync(config, code, ast, callback) { - let result; - - try { - result = runSync(config, code, ast); - } catch (err) { - return callback(err); - } - - return callback(null, result); -} - -function runSync(config, code, ast) { - const file = (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code, ast); - transformFile(file, config.passes); - const opts = file.opts; - const { - outputCode, - outputMap - } = opts.code !== false ? (0, _generate.default)(config.passes, file) : {}; - return { - metadata: file.metadata, - options: opts, - ast: opts.ast === true ? file.ast : null, - code: outputCode === undefined ? null : outputCode, - map: outputMap === undefined ? null : outputMap, - sourceType: file.ast.program.sourceType - }; -} - -function transformFile(file, pluginPasses) { - for (const pluginPairs of pluginPasses) { - const passPairs = []; - const passes = []; - const visitors = []; - - for (const plugin of pluginPairs.concat([(0, _blockHoistPlugin.default)()])) { - const pass = new _pluginPass.default(file, plugin.key, plugin.options); - passPairs.push([plugin, pass]); - passes.push(pass); - visitors.push(plugin.visitor); - } - - for (const [plugin, pass] of passPairs) { - const fn = plugin.pre; - - if (fn) { - const result = fn.call(pass, file); - - if (isThenable(result)) { - throw new Error(`You appear to be using an plugin with an async .pre, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`); - } - } - } - - const visitor = _traverse().default.visitors.merge(visitors, passes, file.opts.wrapPluginVisitorMethod); - - (0, _traverse().default)(file.ast, visitor, file.scope); - - for (const [plugin, pass] of passPairs) { - const fn = plugin.post; - - if (fn) { - const result = fn.call(pass, file); - - if (isThenable(result)) { - throw new Error(`You appear to be using an plugin with an async .post, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`); - } - } - } - } -} - -function isThenable(val) { - return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function"; -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/normalize-file.js b/node_modules/@babel/core/lib/transformation/normalize-file.js deleted file mode 100644 index fbe3b587..00000000 --- a/node_modules/@babel/core/lib/transformation/normalize-file.js +++ /dev/null @@ -1,211 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = normalizeFile; - -function _path() { - const data = _interopRequireDefault(require("path")); - - _path = function () { - return data; - }; - - return data; -} - -function _debug() { - const data = _interopRequireDefault(require("debug")); - - _debug = function () { - return data; - }; - - return data; -} - -function _cloneDeep() { - const data = _interopRequireDefault(require("lodash/cloneDeep")); - - _cloneDeep = function () { - return data; - }; - - return data; -} - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _convertSourceMap() { - const data = _interopRequireDefault(require("convert-source-map")); - - _convertSourceMap = function () { - return data; - }; - - return data; -} - -function _parser() { - const data = require("@babel/parser"); - - _parser = function () { - return data; - }; - - return data; -} - -function _codeFrame() { - const data = require("@babel/code-frame"); - - _codeFrame = function () { - return data; - }; - - return data; -} - -var _file = _interopRequireDefault(require("./file/file")); - -var _missingPluginHelper = _interopRequireDefault(require("./util/missing-plugin-helper")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const debug = (0, _debug().default)("babel:transform:file"); - -function normalizeFile(pluginPasses, options, code, ast) { - code = `${code || ""}`; - let inputMap = null; - - if (options.inputSourceMap !== false) { - if (typeof options.inputSourceMap === "object") { - inputMap = _convertSourceMap().default.fromObject(options.inputSourceMap); - } - - if (!inputMap) { - try { - inputMap = _convertSourceMap().default.fromSource(code); - - if (inputMap) { - code = _convertSourceMap().default.removeComments(code); - } - } catch (err) { - debug("discarding unknown inline input sourcemap", err); - code = _convertSourceMap().default.removeComments(code); - } - } - - if (!inputMap) { - if (typeof options.filename === "string") { - try { - inputMap = _convertSourceMap().default.fromMapFileSource(code, _path().default.dirname(options.filename)); - - if (inputMap) { - code = _convertSourceMap().default.removeMapFileComments(code); - } - } catch (err) { - debug("discarding unknown file input sourcemap", err); - code = _convertSourceMap().default.removeMapFileComments(code); - } - } else { - debug("discarding un-loadable file input sourcemap"); - code = _convertSourceMap().default.removeMapFileComments(code); - } - } - } - - if (ast) { - if (ast.type === "Program") { - ast = t().file(ast, [], []); - } else if (ast.type !== "File") { - throw new Error("AST root must be a Program or File node"); - } - - ast = (0, _cloneDeep().default)(ast); - } else { - ast = parser(pluginPasses, options, code); - } - - return new _file.default(options, { - code, - ast, - inputMap - }); -} - -function parser(pluginPasses, { - parserOpts, - highlightCode = true, - filename = "unknown" -}, code) { - try { - const results = []; - - for (const plugins of pluginPasses) { - for (const plugin of plugins) { - const { - parserOverride - } = plugin; - - if (parserOverride) { - const ast = parserOverride(code, parserOpts, _parser().parse); - if (ast !== undefined) results.push(ast); - } - } - } - - if (results.length === 0) { - return (0, _parser().parse)(code, parserOpts); - } else if (results.length === 1) { - if (typeof results[0].then === "function") { - throw new Error(`You appear to be using an async codegen plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`); - } - - return results[0]; - } - - throw new Error("More than one plugin attempted to override parsing."); - } catch (err) { - if (err.code === "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED") { - err.message += "\nConsider renaming the file to '.mjs', or setting sourceType:module " + "or sourceType:unambiguous in your Babel config for this file."; - } - - const { - loc, - missingPlugin - } = err; - - if (loc) { - const codeFrame = (0, _codeFrame().codeFrameColumns)(code, { - start: { - line: loc.line, - column: loc.column + 1 - } - }, { - highlightCode - }); - - if (missingPlugin) { - err.message = `${filename}: ` + (0, _missingPluginHelper.default)(missingPlugin[0], loc, codeFrame); - } else { - err.message = `${filename}: ${err.message}\n\n` + codeFrame; - } - - err.code = "BABEL_PARSE_ERROR"; - } - - throw err; - } -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/normalize-opts.js b/node_modules/@babel/core/lib/transformation/normalize-opts.js deleted file mode 100644 index 1465ad69..00000000 --- a/node_modules/@babel/core/lib/transformation/normalize-opts.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = normalizeOptions; - -function _path() { - const data = _interopRequireDefault(require("path")); - - _path = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function normalizeOptions(config) { - const { - filename, - cwd, - filenameRelative = typeof filename === "string" ? _path().default.relative(cwd, filename) : "unknown", - sourceType = "module", - inputSourceMap, - sourceMaps = !!inputSourceMap, - moduleRoot, - sourceRoot = moduleRoot, - sourceFileName = _path().default.basename(filenameRelative), - comments = true, - compact = "auto" - } = config.options; - const opts = config.options; - const options = Object.assign({}, opts, { - parserOpts: Object.assign({ - sourceType: _path().default.extname(filenameRelative) === ".mjs" ? "module" : sourceType, - sourceFileName: filename, - plugins: [] - }, opts.parserOpts), - generatorOpts: Object.assign({ - filename, - auxiliaryCommentBefore: opts.auxiliaryCommentBefore, - auxiliaryCommentAfter: opts.auxiliaryCommentAfter, - retainLines: opts.retainLines, - comments, - shouldPrintComment: opts.shouldPrintComment, - compact, - minified: opts.minified, - sourceMaps, - sourceRoot, - sourceFileName - }, opts.generatorOpts) - }); - - for (const plugins of config.passes) { - for (const plugin of plugins) { - if (plugin.manipulateOptions) { - plugin.manipulateOptions(options, options.parserOpts); - } - } - } - - return options; -} \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/plugin-pass.js b/node_modules/@babel/core/lib/transformation/plugin-pass.js deleted file mode 100644 index 2c746d1d..00000000 --- a/node_modules/@babel/core/lib/transformation/plugin-pass.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -class PluginPass { - constructor(file, key, options) { - this._map = new Map(); - this.key = key; - this.file = file; - this.opts = options || {}; - this.cwd = file.opts.cwd; - this.filename = file.opts.filename; - } - - set(key, val) { - this._map.set(key, val); - } - - get(key) { - return this._map.get(key); - } - - availableHelper(name, versionRange) { - return this.file.availableHelper(name, versionRange); - } - - addHelper(name) { - return this.file.addHelper(name); - } - - addImport() { - return this.file.addImport(); - } - - getModuleName() { - return this.file.getModuleName(); - } - - buildCodeFrameError(node, msg, Error) { - return this.file.buildCodeFrameError(node, msg, Error); - } - -} - -exports.default = PluginPass; \ No newline at end of file diff --git a/node_modules/@babel/core/lib/transformation/util/missing-plugin-helper.js b/node_modules/@babel/core/lib/transformation/util/missing-plugin-helper.js deleted file mode 100644 index 93ebb8df..00000000 --- a/node_modules/@babel/core/lib/transformation/util/missing-plugin-helper.js +++ /dev/null @@ -1,239 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = generateMissingPluginMessage; -const pluginNameMap = { - classProperties: { - syntax: { - name: "@babel/plugin-syntax-class-properties", - url: "https://git.io/vb4yQ" - }, - transform: { - name: "@babel/plugin-proposal-class-properties", - url: "https://git.io/vb4SL" - } - }, - decorators: { - syntax: { - name: "@babel/plugin-syntax-decorators", - url: "https://git.io/vb4y9" - }, - transform: { - name: "@babel/plugin-proposal-decorators", - url: "https://git.io/vb4ST" - } - }, - doExpressions: { - syntax: { - name: "@babel/plugin-syntax-do-expressions", - url: "https://git.io/vb4yh" - }, - transform: { - name: "@babel/plugin-proposal-do-expressions", - url: "https://git.io/vb4S3" - } - }, - dynamicImport: { - syntax: { - name: "@babel/plugin-syntax-dynamic-import", - url: "https://git.io/vb4Sv" - } - }, - exportDefaultFrom: { - syntax: { - name: "@babel/plugin-syntax-export-default-from", - url: "https://git.io/vb4SO" - }, - transform: { - name: "@babel/plugin-proposal-export-default-from", - url: "https://git.io/vb4yH" - } - }, - exportNamespaceFrom: { - syntax: { - name: "@babel/plugin-syntax-export-namespace-from", - url: "https://git.io/vb4Sf" - }, - transform: { - name: "@babel/plugin-proposal-export-namespace-from", - url: "https://git.io/vb4SG" - } - }, - flow: { - syntax: { - name: "@babel/plugin-syntax-flow", - url: "https://git.io/vb4yb" - }, - transform: { - name: "@babel/plugin-transform-flow-strip-types", - url: "https://git.io/vb49g" - } - }, - functionBind: { - syntax: { - name: "@babel/plugin-syntax-function-bind", - url: "https://git.io/vb4y7" - }, - transform: { - name: "@babel/plugin-proposal-function-bind", - url: "https://git.io/vb4St" - } - }, - functionSent: { - syntax: { - name: "@babel/plugin-syntax-function-sent", - url: "https://git.io/vb4yN" - }, - transform: { - name: "@babel/plugin-proposal-function-sent", - url: "https://git.io/vb4SZ" - } - }, - importMeta: { - syntax: { - name: "@babel/plugin-syntax-import-meta", - url: "https://git.io/vbKK6" - } - }, - jsx: { - syntax: { - name: "@babel/plugin-syntax-jsx", - url: "https://git.io/vb4yA" - }, - transform: { - name: "@babel/plugin-transform-react-jsx", - url: "https://git.io/vb4yd" - } - }, - logicalAssignment: { - syntax: { - name: "@babel/plugin-syntax-logical-assignment-operators", - url: "https://git.io/vAlBp" - }, - transform: { - name: "@babel/plugin-proposal-logical-assignment-operators", - url: "https://git.io/vAlRe" - } - }, - nullishCoalescingOperator: { - syntax: { - name: "@babel/plugin-syntax-nullish-coalescing-operator", - url: "https://git.io/vb4yx" - }, - transform: { - name: "@babel/plugin-proposal-nullish-coalescing-operator", - url: "https://git.io/vb4Se" - } - }, - numericSeparator: { - syntax: { - name: "@babel/plugin-syntax-numeric-separator", - url: "https://git.io/vb4Sq" - }, - transform: { - name: "@babel/plugin-proposal-numeric-separator", - url: "https://git.io/vb4yS" - } - }, - optionalChaining: { - syntax: { - name: "@babel/plugin-syntax-optional-chaining", - url: "https://git.io/vb4Sc" - }, - transform: { - name: "@babel/plugin-proposal-optional-chaining", - url: "https://git.io/vb4Sk" - } - }, - pipelineOperator: { - syntax: { - name: "@babel/plugin-syntax-pipeline-operator", - url: "https://git.io/vb4yj" - }, - transform: { - name: "@babel/plugin-proposal-pipeline-operator", - url: "https://git.io/vb4SU" - } - }, - throwExpressions: { - syntax: { - name: "@babel/plugin-syntax-throw-expressions", - url: "https://git.io/vb4SJ" - }, - transform: { - name: "@babel/plugin-proposal-throw-expressions", - url: "https://git.io/vb4yF" - } - }, - typescript: { - syntax: { - name: "@babel/plugin-syntax-typescript", - url: "https://git.io/vb4SC" - }, - transform: { - name: "@babel/plugin-transform-typescript", - url: "https://git.io/vb4Sm" - } - }, - asyncGenerators: { - syntax: { - name: "@babel/plugin-syntax-async-generators", - url: "https://git.io/vb4SY" - }, - transform: { - name: "@babel/plugin-proposal-async-generator-functions", - url: "https://git.io/vb4yp" - } - }, - objectRestSpread: { - syntax: { - name: "@babel/plugin-syntax-object-rest-spread", - url: "https://git.io/vb4y5" - }, - transform: { - name: "@babel/plugin-proposal-object-rest-spread", - url: "https://git.io/vb4Ss" - } - }, - optionalCatchBinding: { - syntax: { - name: "@babel/plugin-syntax-optional-catch-binding", - url: "https://git.io/vb4Sn" - }, - transform: { - name: "@babel/plugin-proposal-optional-catch-binding", - url: "https://git.io/vb4SI" - } - } -}; - -const getNameURLCombination = ({ - name, - url -}) => `${name} (${url})`; - -function generateMissingPluginMessage(missingPluginName, loc, codeFrame) { - let helpMessage = `Support for the experimental syntax '${missingPluginName}' isn't currently enabled ` + `(${loc.line}:${loc.column + 1}):\n\n` + codeFrame; - const pluginInfo = pluginNameMap[missingPluginName]; - - if (pluginInfo) { - const { - syntax: syntaxPlugin, - transform: transformPlugin - } = pluginInfo; - - if (syntaxPlugin) { - if (transformPlugin) { - const transformPluginInfo = getNameURLCombination(transformPlugin); - helpMessage += `\n\nAdd ${transformPluginInfo} to the 'plugins' section of your Babel config ` + `to enable transformation.`; - } else { - const syntaxPluginInfo = getNameURLCombination(syntaxPlugin); - helpMessage += `\n\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config ` + `to enable parsing.`; - } - } - } - - return helpMessage; -} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/.bin/semver b/node_modules/@babel/core/node_modules/.bin/semver deleted file mode 100644 index d592e693..00000000 --- a/node_modules/@babel/core/node_modules/.bin/semver +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../semver/bin/semver" "$@" - ret=$? -else - node "$basedir/../semver/bin/semver" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/@babel/core/node_modules/.bin/semver.cmd b/node_modules/@babel/core/node_modules/.bin/semver.cmd deleted file mode 100644 index 37c00a46..00000000 --- a/node_modules/@babel/core/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\semver\bin\semver" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\semver\bin\semver" %* -) \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/debug/CHANGELOG.md b/node_modules/@babel/core/node_modules/debug/CHANGELOG.md deleted file mode 100644 index 820d21e3..00000000 --- a/node_modules/@babel/core/node_modules/debug/CHANGELOG.md +++ /dev/null @@ -1,395 +0,0 @@ - -3.1.0 / 2017-09-26 -================== - - * Add `DEBUG_HIDE_DATE` env var (#486) - * Remove ReDoS regexp in %o formatter (#504) - * Remove "component" from package.json - * Remove `component.json` - * Ignore package-lock.json - * Examples: fix colors printout - * Fix: browser detection - * Fix: spelling mistake (#496, @EdwardBetts) - -3.0.1 / 2017-08-24 -================== - - * Fix: Disable colors in Edge and Internet Explorer (#489) - -3.0.0 / 2017-08-08 -================== - - * Breaking: Remove DEBUG_FD (#406) - * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418) - * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408) - * Addition: document `enabled` flag (#465) - * Addition: add 256 colors mode (#481) - * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440) - * Update: component: update "ms" to v2.0.0 - * Update: separate the Node and Browser tests in Travis-CI - * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots - * Update: separate Node.js and web browser examples for organization - * Update: update "browserify" to v14.4.0 - * Fix: fix Readme typo (#473) - -2.6.9 / 2017-09-22 -================== - - * remove ReDoS regexp in %o formatter (#504) - -2.6.8 / 2017-05-18 -================== - - * Fix: Check for undefined on browser globals (#462, @marbemac) - -2.6.7 / 2017-05-16 -================== - - * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) - * Fix: Inline extend function in node implementation (#452, @dougwilson) - * Docs: Fix typo (#455, @msasad) - -2.6.5 / 2017-04-27 -================== - - * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) - * Misc: clean up browser reference checks (#447, @thebigredgeek) - * Misc: add npm-debug.log to .gitignore (@thebigredgeek) - - -2.6.4 / 2017-04-20 -================== - - * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) - * Chore: ignore bower.json in npm installations. (#437, @joaovieira) - * Misc: update "ms" to v0.7.3 (@tootallnate) - -2.6.3 / 2017-03-13 -================== - - * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) - * Docs: Changelog fix (@thebigredgeek) - -2.6.2 / 2017-03-10 -================== - - * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) - * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) - * Docs: Add Slackin invite badge (@tootallnate) - -2.6.1 / 2017-02-10 -================== - - * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error - * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) - * Fix: IE8 "Expected identifier" error (#414, @vgoma) - * Fix: Namespaces would not disable once enabled (#409, @musikov) - -2.6.0 / 2016-12-28 -================== - - * Fix: added better null pointer checks for browser useColors (@thebigredgeek) - * Improvement: removed explicit `window.debug` export (#404, @tootallnate) - * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) - -2.5.2 / 2016-12-25 -================== - - * Fix: reference error on window within webworkers (#393, @KlausTrainer) - * Docs: fixed README typo (#391, @lurch) - * Docs: added notice about v3 api discussion (@thebigredgeek) - -2.5.1 / 2016-12-20 -================== - - * Fix: babel-core compatibility - -2.5.0 / 2016-12-20 -================== - - * Fix: wrong reference in bower file (@thebigredgeek) - * Fix: webworker compatibility (@thebigredgeek) - * Fix: output formatting issue (#388, @kribblo) - * Fix: babel-loader compatibility (#383, @escwald) - * Misc: removed built asset from repo and publications (@thebigredgeek) - * Misc: moved source files to /src (#378, @yamikuronue) - * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) - * Test: coveralls integration (#378, @yamikuronue) - * Docs: simplified language in the opening paragraph (#373, @yamikuronue) - -2.4.5 / 2016-12-17 -================== - - * Fix: `navigator` undefined in Rhino (#376, @jochenberger) - * Fix: custom log function (#379, @hsiliev) - * Improvement: bit of cleanup + linting fixes (@thebigredgeek) - * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) - * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) - -2.4.4 / 2016-12-14 -================== - - * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) - -2.4.3 / 2016-12-14 -================== - - * Fix: navigation.userAgent error for react native (#364, @escwald) - -2.4.2 / 2016-12-14 -================== - - * Fix: browser colors (#367, @tootallnate) - * Misc: travis ci integration (@thebigredgeek) - * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) - -2.4.1 / 2016-12-13 -================== - - * Fix: typo that broke the package (#356) - -2.4.0 / 2016-12-13 -================== - - * Fix: bower.json references unbuilt src entry point (#342, @justmatt) - * Fix: revert "handle regex special characters" (@tootallnate) - * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) - * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) - * Improvement: allow colors in workers (#335, @botverse) - * Improvement: use same color for same namespace. (#338, @lchenay) - -2.3.3 / 2016-11-09 -================== - - * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) - * Fix: Returning `localStorage` saved values (#331, Levi Thomason) - * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) - -2.3.2 / 2016-11-09 -================== - - * Fix: be super-safe in index.js as well (@TooTallNate) - * Fix: should check whether process exists (Tom Newby) - -2.3.1 / 2016-11-09 -================== - - * Fix: Added electron compatibility (#324, @paulcbetts) - * Improvement: Added performance optimizations (@tootallnate) - * Readme: Corrected PowerShell environment variable example (#252, @gimre) - * Misc: Removed yarn lock file from source control (#321, @fengmk2) - -2.3.0 / 2016-11-07 -================== - - * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) - * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) - * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) - * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) - * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) - * Package: Update "ms" to 0.7.2 (#315, @DevSide) - * Package: removed superfluous version property from bower.json (#207 @kkirsche) - * Readme: fix USE_COLORS to DEBUG_COLORS - * Readme: Doc fixes for format string sugar (#269, @mlucool) - * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) - * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) - * Readme: better docs for browser support (#224, @matthewmueller) - * Tooling: Added yarn integration for development (#317, @thebigredgeek) - * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) - * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) - * Misc: Updated contributors (@thebigredgeek) - -2.2.0 / 2015-05-09 -================== - - * package: update "ms" to v0.7.1 (#202, @dougwilson) - * README: add logging to file example (#193, @DanielOchoa) - * README: fixed a typo (#191, @amir-s) - * browser: expose `storage` (#190, @stephenmathieson) - * Makefile: add a `distclean` target (#189, @stephenmathieson) - -2.1.3 / 2015-03-13 -================== - - * Updated stdout/stderr example (#186) - * Updated example/stdout.js to match debug current behaviour - * Renamed example/stderr.js to stdout.js - * Update Readme.md (#184) - * replace high intensity foreground color for bold (#182, #183) - -2.1.2 / 2015-03-01 -================== - - * dist: recompile - * update "ms" to v0.7.0 - * package: update "browserify" to v9.0.3 - * component: fix "ms.js" repo location - * changed bower package name - * updated documentation about using debug in a browser - * fix: security error on safari (#167, #168, @yields) - -2.1.1 / 2014-12-29 -================== - - * browser: use `typeof` to check for `console` existence - * browser: check for `console.log` truthiness (fix IE 8/9) - * browser: add support for Chrome apps - * Readme: added Windows usage remarks - * Add `bower.json` to properly support bower install - -2.1.0 / 2014-10-15 -================== - - * node: implement `DEBUG_FD` env variable support - * package: update "browserify" to v6.1.0 - * package: add "license" field to package.json (#135, @panuhorsmalahti) - -2.0.0 / 2014-09-01 -================== - - * package: update "browserify" to v5.11.0 - * node: use stderr rather than stdout for logging (#29, @stephenmathieson) - -1.0.4 / 2014-07-15 -================== - - * dist: recompile - * example: remove `console.info()` log usage - * example: add "Content-Type" UTF-8 header to browser example - * browser: place %c marker after the space character - * browser: reset the "content" color via `color: inherit` - * browser: add colors support for Firefox >= v31 - * debug: prefer an instance `log()` function over the global one (#119) - * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) - -1.0.3 / 2014-07-09 -================== - - * Add support for multiple wildcards in namespaces (#122, @seegno) - * browser: fix lint - -1.0.2 / 2014-06-10 -================== - - * browser: update color palette (#113, @gscottolson) - * common: make console logging function configurable (#108, @timoxley) - * node: fix %o colors on old node <= 0.8.x - * Makefile: find node path using shell/which (#109, @timoxley) - -1.0.1 / 2014-06-06 -================== - - * browser: use `removeItem()` to clear localStorage - * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) - * package: add "contributors" section - * node: fix comment typo - * README: list authors - -1.0.0 / 2014-06-04 -================== - - * make ms diff be global, not be scope - * debug: ignore empty strings in enable() - * node: make DEBUG_COLORS able to disable coloring - * *: export the `colors` array - * npmignore: don't publish the `dist` dir - * Makefile: refactor to use browserify - * package: add "browserify" as a dev dependency - * Readme: add Web Inspector Colors section - * node: reset terminal color for the debug content - * node: map "%o" to `util.inspect()` - * browser: map "%j" to `JSON.stringify()` - * debug: add custom "formatters" - * debug: use "ms" module for humanizing the diff - * Readme: add "bash" syntax highlighting - * browser: add Firebug color support - * browser: add colors for WebKit browsers - * node: apply log to `console` - * rewrite: abstract common logic for Node & browsers - * add .jshintrc file - -0.8.1 / 2014-04-14 -================== - - * package: re-add the "component" section - -0.8.0 / 2014-03-30 -================== - - * add `enable()` method for nodejs. Closes #27 - * change from stderr to stdout - * remove unnecessary index.js file - -0.7.4 / 2013-11-13 -================== - - * remove "browserify" key from package.json (fixes something in browserify) - -0.7.3 / 2013-10-30 -================== - - * fix: catch localStorage security error when cookies are blocked (Chrome) - * add debug(err) support. Closes #46 - * add .browser prop to package.json. Closes #42 - -0.7.2 / 2013-02-06 -================== - - * fix package.json - * fix: Mobile Safari (private mode) is broken with debug - * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript - -0.7.1 / 2013-02-05 -================== - - * add repository URL to package.json - * add DEBUG_COLORED to force colored output - * add browserify support - * fix component. Closes #24 - -0.7.0 / 2012-05-04 -================== - - * Added .component to package.json - * Added debug.component.js build - -0.6.0 / 2012-03-16 -================== - - * Added support for "-" prefix in DEBUG [Vinay Pulim] - * Added `.enabled` flag to the node version [TooTallNate] - -0.5.0 / 2012-02-02 -================== - - * Added: humanize diffs. Closes #8 - * Added `debug.disable()` to the CS variant - * Removed padding. Closes #10 - * Fixed: persist client-side variant again. Closes #9 - -0.4.0 / 2012-02-01 -================== - - * Added browser variant support for older browsers [TooTallNate] - * Added `debug.enable('project:*')` to browser variant [TooTallNate] - * Added padding to diff (moved it to the right) - -0.3.0 / 2012-01-26 -================== - - * Added millisecond diff when isatty, otherwise UTC string - -0.2.0 / 2012-01-22 -================== - - * Added wildcard support - -0.1.0 / 2011-12-02 -================== - - * Added: remove colors unless stderr isatty [TooTallNate] - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/@babel/core/node_modules/debug/LICENSE b/node_modules/@babel/core/node_modules/debug/LICENSE deleted file mode 100644 index 658c933d..00000000 --- a/node_modules/@babel/core/node_modules/debug/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/@babel/core/node_modules/debug/README.md b/node_modules/@babel/core/node_modules/debug/README.md deleted file mode 100644 index 88dae35d..00000000 --- a/node_modules/@babel/core/node_modules/debug/README.md +++ /dev/null @@ -1,455 +0,0 @@ -# debug -[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - - - -A tiny JavaScript debugging utility modelled after Node.js core's debugging -technique. Works in Node.js and web browsers. - -## Installation - -```bash -$ npm install debug -``` - -## Usage - -`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. - -Example [_app.js_](./examples/node/app.js): - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %o', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example [_worker.js_](./examples/node/worker.js): - -```js -var a = require('debug')('worker:a') - , b = require('debug')('worker:b'); - -function work() { - a('doing lots of uninteresting work'); - setTimeout(work, Math.random() * 1000); -} - -work(); - -function workb() { - b('doing some work'); - setTimeout(workb, Math.random() * 2000); -} - -workb(); -``` - -The `DEBUG` environment variable is then used to enable these based on space or -comma-delimited names. - -Here are some examples: - -screen shot 2017-08-08 at 12 53 04 pm -screen shot 2017-08-08 at 12 53 38 pm -screen shot 2017-08-08 at 12 53 25 pm - -#### Windows command prompt notes - -##### CMD - -On Windows the environment variable is set using the `set` command. - -```cmd -set DEBUG=*,-not_this -``` - -Example: - -```cmd -set DEBUG=* & node app.js -``` - -##### PowerShell (VS Code default) - -PowerShell uses different syntax to set environment variables. - -```cmd -$env:DEBUG = "*,-not_this" -``` - -Example: - -```cmd -$env:DEBUG='app';node app.js -``` - -Then, run the program to be debugged as usual. - -npm script example: -```js - "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", -``` - -## Namespace Colors - -Every debug instance has a color generated for it based on its namespace name. -This helps when visually parsing the debug output to identify which debug instance -a debug line belongs to. - -#### Node.js - -In Node.js, colors are enabled when stderr is a TTY. You also _should_ install -the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, -otherwise debug will only use a small handful of basic colors. - - - -#### Web Browser - -Colors are also enabled on "Web Inspectors" that understand the `%c` formatting -option. These are WebKit web inspectors, Firefox ([since version -31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) -and the Firebug plugin for Firefox (any version). - - - - -## Millisecond diff - -When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - - -When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: - - - - -## Conventions - -If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. - -## Wildcards - -The `*` character may be used as a wildcard. Suppose for example your library has -debuggers named "connect:bodyParser", "connect:compress", "connect:session", -instead of listing all three with -`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do -`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - -You can also exclude specific debuggers by prefixing them with a "-" character. -For example, `DEBUG=*,-connect:*` would include all debuggers except those -starting with "connect:". - -## Environment Variables - -When running through Node.js, you can set a few environment variables that will -change the behavior of the debug logging: - -| Name | Purpose | -|-----------|-------------------------------------------------| -| `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | -| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | -| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - - -__Note:__ The environment variables beginning with `DEBUG_` end up being -converted into an Options object that gets used with `%o`/`%O` formatters. -See the Node.js documentation for -[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) -for the complete list. - -## Formatters - -Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. -Below are the officially supported formatters: - -| Formatter | Representation | -|-----------|----------------| -| `%O` | Pretty-print an Object on multiple lines. | -| `%o` | Pretty-print an Object all on a single line. | -| `%s` | String. | -| `%d` | Number (both integer and float). | -| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | -| `%%` | Single percent sign ('%'). This does not consume an argument. | - - -### Custom formatters - -You can add custom formatters by extending the `debug.formatters` object. -For example, if you wanted to add support for rendering a Buffer as hex with -`%h`, you could do something like: - -```js -const createDebug = require('debug') -createDebug.formatters.h = (v) => { - return v.toString('hex') -} - -// …elsewhere -const debug = createDebug('foo') -debug('this is hex: %h', new Buffer('hello world')) -// foo this is hex: 68656c6c6f20776f726c6421 +0ms -``` - - -## Browser Support - -You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), -or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), -if you don't want to build it yourself. - -Debug's enable state is currently persisted by `localStorage`. -Consider the situation shown below where you have `worker:a` and `worker:b`, -and wish to debug both. You can enable this using `localStorage.debug`: - -```js -localStorage.debug = 'worker:*' -``` - -And then refresh the page. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - - -## Output streams - - By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: - -Example [_stdout.js_](./examples/node/stdout.js): - -```js -var debug = require('debug'); -var error = debug('app:error'); - -// by default stderr is used -error('goes to stderr!'); - -var log = debug('app:log'); -// set this namespace to log via console.log -log.log = console.log.bind(console); // don't forget to bind to console! -log('goes to stdout'); -error('still goes to stderr!'); - -// set all output to go via console.info -// overrides all per-namespace log settings -debug.log = console.info.bind(console); -error('now goes to stdout via console.info'); -log('still goes to stdout, but via console.info now'); -``` - -## Extend -You can simply extend debugger -```js -const log = require('debug')('auth'); - -//creates new debug instance with extended namespace -const logSign = log.extend('sign'); -const logLogin = log.extend('login'); - -log('hello'); // auth hello -logSign('hello'); //auth:sign hello -logLogin('hello'); //auth:login hello -``` - -## Set dynamically - -You can also enable debug dynamically by calling the `enable()` method : - -```js -let debug = require('debug'); - -console.log(1, debug.enabled('test')); - -debug.enable('test'); -console.log(2, debug.enabled('test')); - -debug.disable(); -console.log(3, debug.enabled('test')); - -``` - -print : -``` -1 false -2 true -3 false -``` - -Usage : -`enable(namespaces)` -`namespaces` can include modes separated by a colon and wildcards. - -Note that calling `enable()` completely overrides previously set DEBUG variable : - -``` -$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' -=> false -``` - -`disable()` - -Will disable all namespaces. The functions returns the namespaces currently -enabled (and skipped). This can be useful if you want to disable debugging -temporarily without knowing what was enabled to begin with. - -For example: - -```js -let debug = require('debug'); -debug.enable('foo:*,-foo:bar'); -let namespaces = debug.disable(); -debug.enable(namespaces); -``` - -Note: There is no guarantee that the string will be identical to the initial -enable string, but semantically they will be identical. - -## Checking whether a debug target is enabled - -After you've created a debug instance, you can determine whether or not it is -enabled by checking the `enabled` property: - -```javascript -const debug = require('debug')('http'); - -if (debug.enabled) { - // do stuff... -} -``` - -You can also manually toggle this property to force the debug instance to be -enabled or disabled. - - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - - Andrew Rhyne - -## Backers - -Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Sponsors - -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## License - -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/core/node_modules/debug/dist/debug.js b/node_modules/@babel/core/node_modules/debug/dist/debug.js deleted file mode 100644 index 89ad0c21..00000000 --- a/node_modules/@babel/core/node_modules/debug/dist/debug.js +++ /dev/null @@ -1,912 +0,0 @@ -"use strict"; - -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } - -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -(function (f) { - if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") { - module.exports = f(); - } else if (typeof define === "function" && define.amd) { - define([], f); - } else { - var g; - - if (typeof window !== "undefined") { - g = window; - } else if (typeof global !== "undefined") { - g = global; - } else if (typeof self !== "undefined") { - g = self; - } else { - g = this; - } - - g.debug = f(); - } -})(function () { - var define, module, exports; - return function () { - function r(e, n, t) { - function o(i, f) { - if (!n[i]) { - if (!e[i]) { - var c = "function" == typeof require && require; - if (!f && c) return c(i, !0); - if (u) return u(i, !0); - var a = new Error("Cannot find module '" + i + "'"); - throw a.code = "MODULE_NOT_FOUND", a; - } - - var p = n[i] = { - exports: {} - }; - e[i][0].call(p.exports, function (r) { - var n = e[i][1][r]; - return o(n || r); - }, p, p.exports, r, e, n, t); - } - - return n[i].exports; - } - - for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) { - o(t[i]); - } - - return o; - } - - return r; - }()({ - 1: [function (require, module, exports) { - /** - * Helpers. - */ - var s = 1000; - var m = s * 60; - var h = m * 60; - var d = h * 24; - var w = d * 7; - var y = d * 365.25; - /** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - - module.exports = function (val, options) { - options = options || {}; - - var type = _typeof(val); - - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isNaN(val) === false) { - return options.long ? fmtLong(val) : fmtShort(val); - } - - throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val)); - }; - /** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - - - function parse(str) { - str = String(str); - - if (str.length > 100) { - return; - } - - var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); - - if (!match) { - return; - } - - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - - case 'weeks': - case 'week': - case 'w': - return n * w; - - case 'days': - case 'day': - case 'd': - return n * d; - - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - - default: - return undefined; - } - } - /** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - - - function fmtShort(ms) { - var msAbs = Math.abs(ms); - - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - - return ms + 'ms'; - } - /** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - - - function fmtLong(ms) { - var msAbs = Math.abs(ms); - - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - - return ms + ' ms'; - } - /** - * Pluralization helper. - */ - - - function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); - } - }, {}], - 2: [function (require, module, exports) { - // shim for using process in browser - var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it - // don't break things. But we need to wrap it in a try catch in case it is - // wrapped in strict mode code which doesn't define any globals. It's inside a - // function because try/catches deoptimize in certain engines. - - var cachedSetTimeout; - var cachedClearTimeout; - - function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); - } - - function defaultClearTimeout() { - throw new Error('clearTimeout has not been defined'); - } - - (function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } - })(); - - function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } // if setTimeout wasn't available but was latter defined - - - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch (e) { - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch (e) { - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - } - - function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } // if clearTimeout wasn't available but was latter defined - - - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e) { - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e) { - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - } - - var queue = []; - var draining = false; - var currentQueue; - var queueIndex = -1; - - function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - - draining = false; - - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - - if (queue.length) { - drainQueue(); - } - } - - function drainQueue() { - if (draining) { - return; - } - - var timeout = runTimeout(cleanUpNextTick); - draining = true; - var len = queue.length; - - while (len) { - currentQueue = queue; - queue = []; - - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - - queueIndex = -1; - len = queue.length; - } - - currentQueue = null; - draining = false; - runClearTimeout(timeout); - } - - process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - - queue.push(new Item(fun, args)); - - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } - }; // v8 likes predictible objects - - - function Item(fun, array) { - this.fun = fun; - this.array = array; - } - - Item.prototype.run = function () { - this.fun.apply(null, this.array); - }; - - process.title = 'browser'; - process.browser = true; - process.env = {}; - process.argv = []; - process.version = ''; // empty string to avoid regexp issues - - process.versions = {}; - - function noop() {} - - process.on = noop; - process.addListener = noop; - process.once = noop; - process.off = noop; - process.removeListener = noop; - process.removeAllListeners = noop; - process.emit = noop; - process.prependListener = noop; - process.prependOnceListener = noop; - - process.listeners = function (name) { - return []; - }; - - process.binding = function (name) { - throw new Error('process.binding is not supported'); - }; - - process.cwd = function () { - return '/'; - }; - - process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); - }; - - process.umask = function () { - return 0; - }; - }, {}], - 3: [function (require, module, exports) { - /** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require('ms'); - Object.keys(env).forEach(function (key) { - createDebug[key] = env[key]; - }); - /** - * Active `debug` instances. - */ - - createDebug.instances = []; - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - - createDebug.formatters = {}; - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - - function selectColor(namespace) { - var hash = 0; - - for (var i = 0; i < namespace.length; i++) { - hash = (hash << 5) - hash + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - - createDebug.selectColor = selectColor; - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - - function createDebug(namespace) { - var prevTime; - - function debug() { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - // Disabled? - if (!debug.enabled) { - return; - } - - var self = debug; // Set `diff` timestamp - - var curr = Number(new Date()); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } // Apply any `formatters` transformations - - - var index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return match; - } - - index++; - var formatter = createDebug.formatters[format]; - - if (typeof formatter === 'function') { - var val = args[index]; - match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format` - - args.splice(index, 1); - index--; - } - - return match; - }); // Apply env-specific formatting (colors, etc.) - - createDebug.formatArgs.call(self, args); - var logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.enabled = createDebug.enabled(namespace); - debug.useColors = createDebug.useColors(); - debug.color = selectColor(namespace); - debug.destroy = destroy; - debug.extend = extend; // Debug.formatArgs = formatArgs; - // debug.rawLog = rawLog; - // env-specific initialization logic for debug instances - - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - createDebug.instances.push(debug); - return debug; - } - - function destroy() { - var index = createDebug.instances.indexOf(this); - - if (index !== -1) { - createDebug.instances.splice(index, 1); - return true; - } - - return false; - } - - function extend(namespace, delimiter) { - var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - - - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.names = []; - createDebug.skips = []; - var i; - var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - var len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } - - namespaces = split[i].replace(/\*/g, '.*?'); - - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - - for (i = 0; i < createDebug.instances.length; i++) { - var instance = createDebug.instances[i]; - instance.enabled = createDebug.enabled(instance.namespace); - } - } - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - - - function disable() { - var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) { - return '-' + namespace; - }))).join(','); - createDebug.enable(''); - return namespaces; - } - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - - - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } - - var i; - var len; - - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } - - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } - - return false; - } - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - - - function toNamespace(regexp) { - return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*'); - } - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - - - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - - return val; - } - - createDebug.enable(createDebug.load()); - return createDebug; - } - - module.exports = setup; - }, { - "ms": 1 - }], - 4: [function (require, module, exports) { - (function (process) { - /* eslint-env browser */ - - /** - * This is the web browser implementation of `debug()`. - */ - exports.log = log; - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.storage = localstorage(); - /** - * Colors. - */ - - 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']; - /** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - // eslint-disable-next-line complexity - - function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } // Internet Explorer and Edge do not support colors. - - - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - - - return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 - typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker - typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); - } - /** - * Colorize log arguments if enabled. - * - * @api public - */ - - - function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - var c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - - var index = 0; - var lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, function (match) { - if (match === '%%') { - return; - } - - index++; - - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - args.splice(lastC, 0, c); - } - /** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". - * - * @api public - */ - - - function log() { - var _console; - - // This hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments); - } - /** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - - - function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) {// Swallow - // XXX (@Qix-) should we be logging these? - } - } - /** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - - - function load() { - var r; - - try { - r = exports.storage.getItem('debug'); - } catch (error) {} // Swallow - // XXX (@Qix-) should we be logging these? - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - - - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; - } - /** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - - - function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) {// Swallow - // XXX (@Qix-) should we be logging these? - } - } - - module.exports = require('./common')(exports); - var formatters = module.exports.formatters; - /** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - - formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } - }; - }).call(this, require('_process')); - }, { - "./common": 3, - "_process": 2 - }] - }, {}, [4])(4); -}); diff --git a/node_modules/@babel/core/node_modules/debug/package.json b/node_modules/@babel/core/node_modules/debug/package.json deleted file mode 100644 index 0f0719e6..00000000 --- a/node_modules/@babel/core/node_modules/debug/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_args": [ - [ - "debug@4.1.1", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "debug@4.1.1", - "_id": "debug@4.1.1", - "_inBundle": false, - "_integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "_location": "/@babel/core/debug", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "debug@4.1.1", - "name": "debug", - "escapedName": "debug", - "rawSpec": "4.1.1", - "saveSpec": null, - "fetchSpec": "4.1.1" - }, - "_requiredBy": [ - "/@babel/core" - ], - "_resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "_spec": "4.1.1", - "_where": "E:\\python\\setup-php", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "browser": "./src/browser.js", - "bugs": { - "url": "https://github.com/visionmedia/debug/issues" - }, - "contributors": [ - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io" - }, - { - "name": "Andrew Rhyne", - "email": "rhyneandrew@gmail.com" - } - ], - "dependencies": { - "ms": "^2.1.1" - }, - "description": "small debugging utility", - "devDependencies": { - "@babel/cli": "^7.0.0", - "@babel/core": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "browserify": "14.4.0", - "chai": "^3.5.0", - "concurrently": "^3.1.0", - "coveralls": "^3.0.2", - "istanbul": "^0.4.5", - "karma": "^3.0.0", - "karma-chai": "^0.1.0", - "karma-mocha": "^1.3.0", - "karma-phantomjs-launcher": "^1.0.2", - "mocha": "^5.2.0", - "mocha-lcov-reporter": "^1.2.0", - "rimraf": "^2.5.4", - "xo": "^0.23.0" - }, - "files": [ - "src", - "dist/debug.js", - "LICENSE", - "README.md" - ], - "homepage": "https://github.com/visionmedia/debug#readme", - "keywords": [ - "debug", - "log", - "debugger" - ], - "license": "MIT", - "main": "./src/index.js", - "name": "debug", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "scripts": { - "build": "npm run build:debug && npm run build:test", - "build:debug": "babel -o dist/debug.js dist/debug.es6.js > dist/debug.js", - "build:test": "babel -d dist test.js", - "clean": "rimraf dist coverage", - "lint": "xo", - "prebuild:debug": "mkdir -p dist && browserify --standalone debug -o dist/debug.es6.js .", - "pretest:browser": "npm run build", - "test": "npm run test:node && npm run test:browser", - "test:browser": "karma start --single-run", - "test:coverage": "cat ./coverage/lcov.info | coveralls", - "test:node": "istanbul cover _mocha -- test.js" - }, - "unpkg": "./dist/debug.js", - "version": "4.1.1" -} diff --git a/node_modules/@babel/core/node_modules/debug/src/browser.js b/node_modules/@babel/core/node_modules/debug/src/browser.js deleted file mode 100644 index 5f34c0d0..00000000 --- a/node_modules/@babel/core/node_modules/debug/src/browser.js +++ /dev/null @@ -1,264 +0,0 @@ -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ - -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); - -/** - * Colors. - */ - -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' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". - * - * @api public - */ -function log(...args) { - // This hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return typeof console === 'object' && - console.log && - console.log(...args); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug'); - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; diff --git a/node_modules/@babel/core/node_modules/debug/src/common.js b/node_modules/@babel/core/node_modules/debug/src/common.js deleted file mode 100644 index 2f82b8dc..00000000 --- a/node_modules/@babel/core/node_modules/debug/src/common.js +++ /dev/null @@ -1,266 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require('ms'); - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * Active `debug` instances. - */ - createDebug.instances = []; - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } - - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return match; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.enabled = createDebug.enabled(namespace); - debug.useColors = createDebug.useColors(); - debug.color = selectColor(namespace); - debug.destroy = destroy; - debug.extend = extend; - // Debug.formatArgs = formatArgs; - // debug.rawLog = rawLog; - - // env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - createDebug.instances.push(debug); - - return debug; - } - - function destroy() { - const index = createDebug.instances.indexOf(this); - if (index !== -1) { - createDebug.instances.splice(index, 1); - return true; - } - return false; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - - createDebug.names = []; - createDebug.skips = []; - - let i; - const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - const len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } - - namespaces = split[i].replace(/\*/g, '.*?'); - - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - - for (i = 0; i < createDebug.instances.length; i++) { - const instance = createDebug.instances[i]; - instance.enabled = createDebug.enabled(instance.namespace); - } - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } - - let i; - let len; - - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } - - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } - - return false; - } - - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - function toNamespace(regexp) { - return regexp.toString() - .substring(2, regexp.toString().length - 2) - .replace(/\.\*\?$/, '*'); - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - - createDebug.enable(createDebug.load()); - - return createDebug; -} - -module.exports = setup; diff --git a/node_modules/@babel/core/node_modules/debug/src/index.js b/node_modules/@babel/core/node_modules/debug/src/index.js deleted file mode 100644 index bf4c57f2..00000000 --- a/node_modules/@babel/core/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/node_modules/@babel/core/node_modules/debug/src/node.js b/node_modules/@babel/core/node_modules/debug/src/node.js deleted file mode 100644 index 5e1f1541..00000000 --- a/node_modules/@babel/core/node_modules/debug/src/node.js +++ /dev/null @@ -1,257 +0,0 @@ -/** - * Module dependencies. - */ - -const tty = require('tty'); -const util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - */ - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = require('supports-color'); - - if (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) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} - -/** - * Invokes `util.format()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.format(...args) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init(debug) { - debug.inspectOpts = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .replace(/\s*\n\s*/g, ' '); -}; - -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; diff --git a/node_modules/@babel/core/node_modules/ms/index.js b/node_modules/@babel/core/node_modules/ms/index.js deleted file mode 100644 index c4498bcc..00000000 --- a/node_modules/@babel/core/node_modules/ms/index.js +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); -} diff --git a/node_modules/@babel/core/node_modules/ms/license.md b/node_modules/@babel/core/node_modules/ms/license.md deleted file mode 100644 index 69b61253..00000000 --- a/node_modules/@babel/core/node_modules/ms/license.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Zeit, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@babel/core/node_modules/ms/package.json b/node_modules/@babel/core/node_modules/ms/package.json deleted file mode 100644 index 6d90c225..00000000 --- a/node_modules/@babel/core/node_modules/ms/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_args": [ - [ - "ms@2.1.2", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "ms@2.1.2", - "_id": "ms@2.1.2", - "_inBundle": false, - "_integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "_location": "/@babel/core/ms", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "ms@2.1.2", - "name": "ms", - "escapedName": "ms", - "rawSpec": "2.1.2", - "saveSpec": null, - "fetchSpec": "2.1.2" - }, - "_requiredBy": [ - "/@babel/core/debug" - ], - "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "_spec": "2.1.2", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/zeit/ms/issues" - }, - "description": "Tiny millisecond conversion utility", - "devDependencies": { - "eslint": "4.12.1", - "expect.js": "0.3.1", - "husky": "0.14.3", - "lint-staged": "5.0.0", - "mocha": "4.0.1" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - } - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/zeit/ms#readme", - "license": "MIT", - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write", - "git add" - ] - }, - "main": "./index", - "name": "ms", - "repository": { - "type": "git", - "url": "git+https://github.com/zeit/ms.git" - }, - "scripts": { - "lint": "eslint lib/* bin/*", - "precommit": "lint-staged", - "test": "mocha tests.js" - }, - "version": "2.1.2" -} diff --git a/node_modules/@babel/core/node_modules/ms/readme.md b/node_modules/@babel/core/node_modules/ms/readme.md deleted file mode 100644 index 9a1996b1..00000000 --- a/node_modules/@babel/core/node_modules/ms/readme.md +++ /dev/null @@ -1,60 +0,0 @@ -# ms - -[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) -[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/zeit) - -Use this package to easily convert various time formats to milliseconds. - -## Examples - -```js -ms('2 days') // 172800000 -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2.5 hrs') // 9000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('1y') // 31557600000 -ms('100') // 100 -ms('-3 days') // -259200000 -ms('-1h') // -3600000 -ms('-200') // -200 -``` - -### Convert from Milliseconds - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(-3 * 60000) // "-3m" -ms(ms('10 hours')) // "10h" -``` - -### Time Format Written-Out - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(-3 * 60000, { long: true }) // "-3 minutes" -ms(ms('10 hours'), { long: true }) // "10 hours" -``` - -## Features - -- Works both in [Node.js](https://nodejs.org) and in the browser -- If a number is supplied to `ms`, a string with a unit is returned -- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) -- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned - -## Related Packages - -- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. - -## Caught a Bug? - -1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device -2. Link the package to the global module directory: `npm link` -3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! - -As always, you can run the tests using: `npm test` diff --git a/node_modules/@babel/core/node_modules/semver/CHANGELOG.md b/node_modules/@babel/core/node_modules/semver/CHANGELOG.md deleted file mode 100644 index 66304fdd..00000000 --- a/node_modules/@babel/core/node_modules/semver/CHANGELOG.md +++ /dev/null @@ -1,39 +0,0 @@ -# changes log - -## 5.7 - -* Add `minVersion` method - -## 5.6 - -* Move boolean `loose` param to an options object, with - backwards-compatibility protection. -* Add ability to opt out of special prerelease version handling with - the `includePrerelease` option flag. - -## 5.5 - -* Add version coercion capabilities - -## 5.4 - -* Add intersection checking - -## 5.3 - -* Add `minSatisfying` method - -## 5.2 - -* Add `prerelease(v)` that returns prerelease components - -## 5.1 - -* Add Backus-Naur for ranges -* Remove excessively cute inspection methods - -## 5.0 - -* Remove AMD/Browserified build artifacts -* Fix ltr and gtr when using the `*` range -* Fix for range `*` with a prerelease identifier diff --git a/node_modules/@babel/core/node_modules/semver/LICENSE b/node_modules/@babel/core/node_modules/semver/LICENSE deleted file mode 100644 index 19129e31..00000000 --- a/node_modules/@babel/core/node_modules/semver/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@babel/core/node_modules/semver/README.md b/node_modules/@babel/core/node_modules/semver/README.md deleted file mode 100644 index f8dfa5a0..00000000 --- a/node_modules/@babel/core/node_modules/semver/README.md +++ /dev/null @@ -1,412 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Install - -```bash -npm install --save semver -```` - -## Usage - -As a node module: - -```js -const semver = require('semver') - -semver.valid('1.2.3') // '1.2.3' -semver.valid('a.b.c') // null -semver.clean(' =v1.2.3 ') // '1.2.3' -semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true -semver.gt('1.2.3', '9.8.7') // false -semver.lt('1.2.3', '9.8.7') // true -semver.minVersion('>=1.0.0') // '1.0.0' -semver.valid(semver.coerce('v2')) // '2.0.0' -semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' -``` - -As a command-line utility: - -``` -$ semver -h - -A JavaScript implementation of the https://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] [ [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range - Print versions that match the specified range. - --i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. - Only one version may be specified. - ---preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --p --include-prerelease - Always include prerelease versions in range matching - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them. -``` - -## Versions - -A "version" is described by the `v2.0.0` specification found at -. - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Ranges - -A `version range` is a set of `comparators` which specify versions -that satisfy the range. - -A `comparator` is composed of an `operator` and a `version`. The set -of primitive `operators` is: - -* `<` Less than -* `<=` Less than or equal to -* `>` Greater than -* `>=` Greater than or equal to -* `=` Equal. If no operator is specified, then equality is assumed, - so this operator is optional, but MAY be included. - -For example, the comparator `>=1.2.7` would match the versions -`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` -or `1.1.0`. - -Comparators can be joined by whitespace to form a `comparator set`, -which is satisfied by the **intersection** of all of the comparators -it includes. - -A range is composed of one or more comparator sets, joined by `||`. A -version matches a range if and only if every comparator in at least -one of the `||`-separated comparator sets is satisfied by the version. - -For example, the range `>=1.2.7 <1.3.0` would match the versions -`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, -or `1.1.0`. - -The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, -`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. - -### Prerelease Tags - -If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same `[major, minor, patch]` tuple also has a -prerelease tag. - -For example, the range `>1.2.3-alpha.3` would be allowed to match the -version `1.2.3-alpha.7`, but it would *not* be satisfied by -`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater -than" `1.2.3-alpha.3` according to the SemVer sort rules. The version -range only accepts prerelease tags on the `1.2.3` version. The -version `3.4.5` *would* satisfy the range, because it does not have a -prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. - -The purpose for this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range matching -semantics. - -Second, a user who has opted into using a prerelease version has -clearly indicated the intent to use *that specific* set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the *next* set of prerelease versions. - -Note that this behavior can be suppressed (treating all prerelease -versions as if they were normal versions, for the purpose of range -matching) by setting the `includePrerelease` flag on the options -object to any -[functions](https://github.com/npm/node-semver#functions) that do -range matching. - -#### Prerelease Identifiers - -The method `.inc` takes an additional `identifier` string argument that -will append the value of the string as a prerelease identifier: - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta') -// '1.2.4-beta.0' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -1.2.4-beta.0 -``` - -Which then can be used to increment further: - -```bash -$ semver 1.2.4-beta.0 -i prerelease -1.2.4-beta.1 -``` - -### Advanced Range Syntax - -Advanced range syntax desugars to primitive comparators in -deterministic ways. - -Advanced ranges may be combined in the same way as primitive -comparators using white space or `||`. - -#### Hyphen Ranges `X.Y.Z - A.B.C` - -Specifies an inclusive set. - -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` - -If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes. - -* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` - -If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts. - -* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` -* `1.2.3 - 2` := `>=1.2.3 <3.0.0` - -#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` - -Any of `X`, `x`, or `*` may be used to "stand in" for one of the -numeric values in the `[major, minor, patch]` tuple. - -* `*` := `>=0.0.0` (Any version satisfies) -* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) -* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) - -A partial version range is treated as an X-Range, so the special -character is in fact optional. - -* `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0` -* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` - -#### Tilde Ranges `~1.2.3` `~1.2` `~1` - -Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not. - -* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` -* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) -* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` -* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) -* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) -* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. - -#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` - -Allows changes that do not modify the left-most non-zero digit in the -`[major, minor, patch]` tuple. In other words, this allows patch and -minor updates for versions `1.0.0` and above, patch updates for -versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. - -Many authors treat a `0.x` version as if the `x` were the major -"breaking-change" indicator. - -Caret ranges are ideal when an author may make breaking changes -between `0.2.4` and `0.3.0` releases, which is a common practice. -However, it presumes that there will *not* be breaking changes between -`0.2.4` and `0.2.5`. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices. - -* `^1.2.3` := `>=1.2.3 <2.0.0` -* `^0.2.3` := `>=0.2.3 <0.3.0` -* `^0.0.3` := `>=0.0.3 <0.0.4` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. -* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the - `0.0.3` version *only* will be allowed, if they are greater than or - equal to `beta`. So, `0.0.3-pr.2` would be allowed. - -When parsing caret ranges, a missing `patch` value desugars to the -number `0`, but will allow flexibility within that value, even if the -major and minor versions are both `0`. - -* `^1.2.x` := `>=1.2.0 <2.0.0` -* `^0.0.x` := `>=0.0.0 <0.1.0` -* `^0.0` := `>=0.0.0 <0.1.0` - -A missing `minor` and `patch` values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero. - -* `^1.x` := `>=1.0.0 <2.0.0` -* `^0.x` := `>=0.0.0 <1.0.0` - -### Range Grammar - -Putting all this together, here is a Backus-Naur grammar for ranges, -for the benefit of parser authors: - -```bnf -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ -``` - -## Functions - -All methods and classes take a final `options` object argument. All -options in this object are `false` by default. The options supported -are: - -- `loose` Be more forgiving about not-quite-valid semver strings. - (Any resulting output will always be 100% strict compliant, of - course.) For backwards compatibility reasons, if the `options` - argument is a boolean value instead of an object, it is interpreted - to be the `loose` param. -- `includePrerelease` Set to suppress the [default - behavior](https://github.com/npm/node-semver#prerelease-tags) of - excluding prerelease tagged versions from ranges unless they are - explicitly opted into. - -Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse. - -* `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, release)`: Return the version incremented by the release - type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, or `prerelease`), or null if it's not valid - * `premajor` in one call will bump the version up to the next major - version and down to a prerelease of that major version. - `preminor`, and `prepatch` work the same way. - * If called from a non-prerelease version, the `prerelease` will work the - same as `prepatch`. It increments the patch version, then makes a - prerelease. If the input version is already a prerelease it simply - increments it. -* `prerelease(v)`: Returns an array of prerelease components, or null - if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` -* `major(v)`: Return the major version number. -* `minor(v)`: Return the minor version number. -* `patch(v)`: Return the patch version number. -* `intersects(r1, r2, loose)`: Return true if the two supplied ranges - or comparators intersect. -* `parse(v)`: Attempt to parse a string as a semantic version, returning either - a `SemVer` object or `null`. - -### Comparison - -* `gt(v1, v2)`: `v1 > v2` -* `gte(v1, v2)`: `v1 >= v2` -* `lt(v1, v2)`: `v1 < v2` -* `lte(v1, v2)`: `v1 <= v2` -* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. -* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions - in descending order when passed to `Array.sort()`. -* `diff(v1, v2)`: Returns difference between two versions by the release type - (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), - or null if the versions are the same. - -### Comparators - -* `intersects(comparator)`: Return true if the comparators intersect - -### Ranges - -* `validRange(range)`: Return the valid range or null if it's not valid -* `satisfies(version, range)`: Return true if the version satisfies the - range. -* `maxSatisfying(versions, range)`: Return the highest version in the list - that satisfies the range, or `null` if none of them do. -* `minSatisfying(versions, range)`: Return the lowest version in the list - that satisfies the range, or `null` if none of them do. -* `minVersion(range)`: Return the lowest version that can possibly match - the given range. -* `gtr(version, range)`: Return `true` if version is greater than all the - versions possible in the range. -* `ltr(version, range)`: Return `true` if version is less than all the - versions possible in the range. -* `outside(version, range, hilo)`: Return true if the version is outside - the bounds of the range in either the high or low direction. The - `hilo` argument must be either the string `'>'` or `'<'`. (This is - the function called by `gtr` and `ltr`.) -* `intersects(range)`: Return true if any of the ranges comparators intersect - -Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, *or* satisfy a range! For -example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` -until `2.0.0`, so the version `1.2.10` would not be greater than the -range (because `2.0.1` satisfies, which is higher), nor less than the -range (since `1.2.8` satisfies, which is lower), and it also does not -satisfy the range. - -If you want to know if a version satisfies or does not satisfy a -range, use the `satisfies(version, range)` function. - -### Coercion - -* `coerce(version)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver string to -semver. It looks for the first digit in a string, and consumes all -remaining characters which satisfy at least a partial semver (e.g., `1`, -`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer -versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All -surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes -`3.4.0`). Only text which lacks digits will fail coercion (`version one` -is not valid). The maximum length for any semver component considered for -coercion is 16 characters; longer components will be ignored -(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any -semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value -components are invalid (`9999999999999999.4.7.4` is likely invalid). diff --git a/node_modules/@babel/core/node_modules/semver/bin/semver b/node_modules/@babel/core/node_modules/semver/bin/semver deleted file mode 100644 index 801e77f1..00000000 --- a/node_modules/@babel/core/node_modules/semver/bin/semver +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - -var versions = [] - -var range = [] - -var inc = null - -var version = require('../package.json').version - -var loose = false - -var includePrerelease = false - -var coerce = false - -var identifier - -var semver = require('../semver') - -var reverse = false - -var options = {} - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a = argv.shift() - var indexOfEqualSign = a.indexOf('=') - if (indexOfEqualSign !== -1) { - a = a.slice(0, indexOfEqualSign) - argv.unshift(a.slice(indexOfEqualSign + 1)) - } - switch (a) { - case '-rv': case '-rev': case '--rev': case '--reverse': - reverse = true - break - case '-l': case '--loose': - loose = true - break - case '-p': case '--include-prerelease': - includePrerelease = true - break - case '-v': case '--version': - versions.push(argv.shift()) - break - case '-i': case '--inc': case '--increment': - switch (argv[0]) { - case 'major': case 'minor': case 'patch': case 'prerelease': - case 'premajor': case 'preminor': case 'prepatch': - inc = argv.shift() - break - default: - inc = 'patch' - break - } - break - case '--preid': - identifier = argv.shift() - break - case '-r': case '--range': - range.push(argv.shift()) - break - case '-c': case '--coerce': - coerce = true - break - case '-h': case '--help': case '-?': - return help() - default: - versions.push(a) - break - } - } - - var options = { loose: loose, includePrerelease: includePrerelease } - - versions = versions.map(function (v) { - return coerce ? (semver.coerce(v) || { version: v }).version : v - }).filter(function (v) { - return semver.valid(v) - }) - if (!versions.length) return fail() - if (inc && (versions.length !== 1 || range.length)) { return failInc() } - - for (var i = 0, l = range.length; i < l; i++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i], options) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function failInc () { - console.error('--inc can only be used on a single version with no range') - fail() -} - -function fail () { process.exit(1) } - -function success () { - var compare = reverse ? 'rcompare' : 'compare' - versions.sort(function (a, b) { - return semver[compare](a, b, options) - }).map(function (v) { - return semver.clean(v, options) - }).map(function (v) { - return inc ? semver.inc(v, inc, options, identifier) : v - }).forEach(function (v, i, _) { console.log(v) }) -} - -function help () { - console.log(['SemVer ' + version, - '', - 'A JavaScript implementation of the https://semver.org/ specification', - 'Copyright Isaac Z. Schlueter', - '', - 'Usage: semver [options] [ [...]]', - 'Prints valid versions sorted by SemVer precedence', - '', - 'Options:', - '-r --range ', - ' Print versions that match the specified range.', - '', - '-i --increment []', - ' Increment a version by the specified level. Level can', - ' be one of: major, minor, patch, premajor, preminor,', - " prepatch, or prerelease. Default level is 'patch'.", - ' Only one version may be specified.', - '', - '--preid ', - ' Identifier to be used to prefix premajor, preminor,', - ' prepatch or prerelease version increments.', - '', - '-l --loose', - ' Interpret versions and ranges loosely', - '', - '-p --include-prerelease', - ' Always include prerelease versions in range matching', - '', - '-c --coerce', - ' Coerce a string into SemVer if possible', - ' (does not imply --loose)', - '', - 'Program exits successfully if any valid version satisfies', - 'all supplied ranges, and prints all satisfying versions.', - '', - 'If no satisfying versions are found, then exits failure.', - '', - 'Versions are printed in ascending order, so supplying', - 'multiple versions to the utility will just sort them.' - ].join('\n')) -} diff --git a/node_modules/@babel/core/node_modules/semver/package.json b/node_modules/@babel/core/node_modules/semver/package.json deleted file mode 100644 index 8bc1098c..00000000 --- a/node_modules/@babel/core/node_modules/semver/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_args": [ - [ - "semver@5.7.1", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "semver@5.7.1", - "_id": "semver@5.7.1", - "_inBundle": false, - "_integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "_location": "/@babel/core/semver", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "semver@5.7.1", - "name": "semver", - "escapedName": "semver", - "rawSpec": "5.7.1", - "saveSpec": null, - "fetchSpec": "5.7.1" - }, - "_requiredBy": [ - "/@babel/core" - ], - "_resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "_spec": "5.7.1", - "_where": "E:\\python\\setup-php", - "bin": { - "semver": "./bin/semver" - }, - "bugs": { - "url": "https://github.com/npm/node-semver/issues" - }, - "description": "The semantic version parser used by npm.", - "devDependencies": { - "tap": "^13.0.0-rc.18" - }, - "files": [ - "bin", - "range.bnf", - "semver.js" - ], - "homepage": "https://github.com/npm/node-semver#readme", - "license": "ISC", - "main": "semver.js", - "name": "semver", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/node-semver.git" - }, - "scripts": { - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap" - }, - "tap": { - "check-coverage": true - }, - "version": "5.7.1" -} diff --git a/node_modules/@babel/core/node_modules/semver/range.bnf b/node_modules/@babel/core/node_modules/semver/range.bnf deleted file mode 100644 index d4c6ae0d..00000000 --- a/node_modules/@babel/core/node_modules/semver/range.bnf +++ /dev/null @@ -1,16 +0,0 @@ -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | [1-9] ( [0-9] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/@babel/core/node_modules/semver/semver.js b/node_modules/@babel/core/node_modules/semver/semver.js deleted file mode 100644 index d315d5d6..00000000 --- a/node_modules/@babel/core/node_modules/semver/semver.js +++ /dev/null @@ -1,1483 +0,0 @@ -exports = module.exports = SemVer - -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) - } -} else { - debug = function () {} -} - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' - -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 - -// The actual regexps go on exports.re -var re = exports.re = [] -var src = exports.src = [] -var R = 0 - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++ -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' -var NUMERICIDENTIFIERLOOSE = R++ -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+' - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++ -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++ -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')' - -var MAINVERSIONLOOSE = R++ -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')' - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++ -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -var PRERELEASEIDENTIFIERLOOSE = R++ -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++ -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' - -var PRERELEASELOOSE = R++ -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++ -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+' - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++ -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++ -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?' - -src[FULL] = '^' + FULLPLAIN + '$' - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?' - -var LOOSE = R++ -src[LOOSE] = '^' + LOOSEPLAIN + '$' - -var GTLT = R++ -src[GTLT] = '((?:<|>)?=?)' - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++ -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -var XRANGEIDENTIFIER = R++ -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' - -var XRANGEPLAIN = R++ -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGEPLAINLOOSE = R++ -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGE = R++ -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' -var XRANGELOOSE = R++ -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++ -src[LONETILDE] = '(?:~>?)' - -var TILDETRIM = R++ -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') -var tildeTrimReplace = '$1~' - -var TILDE = R++ -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' -var TILDELOOSE = R++ -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++ -src[LONECARET] = '(?:\\^)' - -var CARETTRIM = R++ -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') -var caretTrimReplace = '$1^' - -var CARET = R++ -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' -var CARETLOOSE = R++ -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++ -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' -var COMPARATOR = R++ -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++ -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') -var comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++ -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$' - -var HYPHENRANGELOOSE = R++ -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$' - -// Star ranges basically just allow anything at all. -var STAR = R++ -src[STAR] = '(<|>)?=?\\s*\\*' - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) - } -} - -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - var r = options.loose ? re[LOOSE] : re[FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} - -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} - -exports.SemVer = SemVer - -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } - - if (!(this instanceof SemVer)) { - return new SemVer(version, options) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - - var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL]) - - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() -} - -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} - -SemVer.prototype.toString = function () { - return this.version -} - -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return this.compareMain(other) || this.comparePre(other) -} - -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} - -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - var i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error('invalid increment argument: ' + release) - } - this.format() - this.raw = this.version - return this -} - -exports.inc = inc -function inc (version, release, loose, identifier) { - if (typeof (loose) === 'string') { - identifier = loose - loose = undefined - } - - try { - return new SemVer(version, loose).inc(release, identifier).version - } catch (er) { - return null - } -} - -exports.diff = diff -function diff (version1, version2) { - if (eq(version1, version2)) { - return null - } else { - var v1 = parse(version1) - var v2 = parse(version2) - var prefix = '' - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre' - var defaultResult = 'prerelease' - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} - -exports.compareIdentifiers = compareIdentifiers - -var numeric = /^[0-9]+$/ -function compareIdentifiers (a, b) { - var anum = numeric.test(a) - var bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -exports.rcompareIdentifiers = rcompareIdentifiers -function rcompareIdentifiers (a, b) { - return compareIdentifiers(b, a) -} - -exports.major = major -function major (a, loose) { - return new SemVer(a, loose).major -} - -exports.minor = minor -function minor (a, loose) { - return new SemVer(a, loose).minor -} - -exports.patch = patch -function patch (a, loose) { - return new SemVer(a, loose).patch -} - -exports.compare = compare -function compare (a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)) -} - -exports.compareLoose = compareLoose -function compareLoose (a, b) { - return compare(a, b, true) -} - -exports.rcompare = rcompare -function rcompare (a, b, loose) { - return compare(b, a, loose) -} - -exports.sort = sort -function sort (list, loose) { - return list.sort(function (a, b) { - return exports.compare(a, b, loose) - }) -} - -exports.rsort = rsort -function rsort (list, loose) { - return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) - }) -} - -exports.gt = gt -function gt (a, b, loose) { - return compare(a, b, loose) > 0 -} - -exports.lt = lt -function lt (a, b, loose) { - return compare(a, b, loose) < 0 -} - -exports.eq = eq -function eq (a, b, loose) { - return compare(a, b, loose) === 0 -} - -exports.neq = neq -function neq (a, b, loose) { - return compare(a, b, loose) !== 0 -} - -exports.gte = gte -function gte (a, b, loose) { - return compare(a, b, loose) >= 0 -} - -exports.lte = lte -function lte (a, b, loose) { - return compare(a, b, loose) <= 0 -} - -exports.cmp = cmp -function cmp (a, op, b, loose) { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError('Invalid operator: ' + op) - } -} - -exports.Comparator = Comparator -function Comparator (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - if (!(this instanceof Comparator)) { - return new Comparator(comp, options) - } - - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) -} - -var ANY = {} -Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var m = comp.match(r) - - if (!m) { - throw new TypeError('Invalid comparator: ' + comp) - } - - this.operator = m[1] - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } -} - -Comparator.prototype.toString = function () { - return this.value -} - -Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY) { - return true - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - return cmp(version, this.operator, this.semver, this.options) -} - -Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - var rangeTmp - - if (this.operator === '') { - rangeTmp = new Range(comp.value, options) - return satisfies(this.value, rangeTmp, options) - } else if (comp.operator === '') { - rangeTmp = new Range(this.value, options) - return satisfies(comp.semver, rangeTmp, options) - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - var sameSemVer = this.semver.version === comp.semver.version - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')) - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')) - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan -} - -exports.Range = Range -function Range (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (range instanceof Range) { - if (range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - return new Range(range.value, options) - } - - if (!(this instanceof Range)) { - return new Range(range, options) - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First, split based on boolean or || - this.raw = range - this.set = range.split(/\s*\|\|\s*/).map(function (range) { - return this.parseRange(range.trim()) - }, this).filter(function (c) { - // throw out any that are not relevant for whatever reason - return c.length - }) - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range) - } - - this.format() -} - -Range.prototype.format = function () { - this.range = this.set.map(function (comps) { - return comps.join(' ').trim() - }).join('||').trim() - return this.range -} - -Range.prototype.toString = function () { - return this.range -} - -Range.prototype.parseRange = function (range) { - var loose = this.options.loose - range = range.trim() - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE] - range = range.replace(hr, hyphenReplace) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[COMPARATORTRIM]) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace) - - // normalize spaces - range = range.split(/\s+/).join(' ') - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR] - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options) - }, this).join(' ').split(/\s+/) - if (this.options.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function (comp) { - return !!comp.match(compRe) - }) - } - set = set.map(function (comp) { - return new Comparator(comp, this.options) - }, this) - - return set -} - -Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - }) - }) -} - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators -function toComparators (range, options) { - return new Range(range, options).set.map(function (comp) { - return comp.map(function (c) { - return c.value - }).join(' ').trim().split(' ') - }) -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator (comp, options) { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -function isX (id) { - return !id || id.toLowerCase() === 'x' || id === '*' -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options) - }).join(' ') -} - -function replaceTilde (comp, options) { - var r = options.loose ? re[TILDELOOSE] : re[TILDE] - return comp.replace(r, function (_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else if (pr) { - debug('replaceTilde pr', pr) - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } else { - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options) - }).join(' ') -} - -function replaceCaret (comp, options) { - debug('caret', comp, options) - var r = options.loose ? re[CARETLOOSE] : re[CARET] - return comp.replace(r, function (_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - if (M === '0') { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else { - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + (+M + 1) + '.0.0' - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0' - } - } - - debug('caret return', ret) - return ret - }) -} - -function replaceXRanges (comp, options) { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options) - }).join(' ') -} - -function replaceXRange (comp, options) { - comp = comp.trim() - var r = options.loose ? re[XRANGELOOSE] : re[XRANGE] - return comp.replace(r, function (ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - var xM = isX(M) - var xm = xM || isX(m) - var xp = xm || isX(p) - var anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - ret = gtlt + M + '.' + m + '.' + p - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars (comp, options) { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], '') -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = '>=' + fM + '.0.0' - } else if (isX(fp)) { - from = '>=' + fM + '.' + fm + '.0' - } else { - from = '>=' + from - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = '<' + (+tM + 1) + '.0.0' - } else if (isX(tp)) { - to = '<' + tM + '.' + (+tm + 1) + '.0' - } else if (tpr) { - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr - } else { - to = '<=' + to - } - - return (from + ' ' + to).trim() -} - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false -} - -function testSet (set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - -exports.satisfies = satisfies -function satisfies (version, range, options) { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} - -exports.maxSatisfying = maxSatisfying -function maxSatisfying (versions, range, options) { - var max = null - var maxSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} - -exports.minSatisfying = minSatisfying -function minSatisfying (versions, range, options) { - var min = null - var minSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} - -exports.minVersion = minVersion -function minVersion (range, loose) { - range = new Range(range, loose) - - var minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error('Unexpected operation: ' + comparator.operator) - } - }) - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} - -exports.validRange = validRange -function validRange (range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr -function ltr (version, range, options) { - return outside(version, range, '<', options) -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr -function gtr (version, range, options) { - return outside(version, range, '>', options) -} - -exports.outside = outside -function outside (version, range, hilo, options) { - version = new SemVer(version, options) - range = new Range(range, options) - - var gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - var high = null - var low = null - - comparators.forEach(function (comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -exports.prerelease = prerelease -function prerelease (version, options) { - var parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} - -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} - -exports.coerce = coerce -function coerce (version) { - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - var match = version.match(re[COERCE]) - - if (match == null) { - return null - } - - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) -} diff --git a/node_modules/@babel/core/node_modules/source-map/CHANGELOG.md b/node_modules/@babel/core/node_modules/source-map/CHANGELOG.md deleted file mode 100644 index 3a8c066c..00000000 --- a/node_modules/@babel/core/node_modules/source-map/CHANGELOG.md +++ /dev/null @@ -1,301 +0,0 @@ -# Change Log - -## 0.5.6 - -* Fix for regression when people were using numbers as names in source maps. See - #236. - -## 0.5.5 - -* Fix "regression" of unsupported, implementation behavior that half the world - happens to have come to depend on. See #235. - -* Fix regression involving function hoisting in SpiderMonkey. See #233. - -## 0.5.4 - -* Large performance improvements to source-map serialization. See #228 and #229. - -## 0.5.3 - -* Do not include unnecessary distribution files. See - commit ef7006f8d1647e0a83fdc60f04f5a7ca54886f86. - -## 0.5.2 - -* Include browser distributions of the library in package.json's `files`. See - issue #212. - -## 0.5.1 - -* Fix latent bugs in IndexedSourceMapConsumer.prototype._parseMappings. See - ff05274becc9e6e1295ed60f3ea090d31d843379. - -## 0.5.0 - -* Node 0.8 is no longer supported. - -* Use webpack instead of dryice for bundling. - -* Big speedups serializing source maps. See pull request #203. - -* Fix a bug with `SourceMapConsumer.prototype.sourceContentFor` and sources that - explicitly start with the source root. See issue #199. - -## 0.4.4 - -* Fix an issue where using a `SourceMapGenerator` after having created a - `SourceMapConsumer` from it via `SourceMapConsumer.fromSourceMap` failed. See - issue #191. - -* Fix an issue with where `SourceMapGenerator` would mistakenly consider - different mappings as duplicates of each other and avoid generating them. See - issue #192. - -## 0.4.3 - -* A very large number of performance improvements, particularly when parsing - source maps. Collectively about 75% of time shaved off of the source map - parsing benchmark! - -* Fix a bug in `SourceMapConsumer.prototype.allGeneratedPositionsFor` and fuzzy - searching in the presence of a column option. See issue #177. - -* Fix a bug with joining a source and its source root when the source is above - the root. See issue #182. - -* Add the `SourceMapConsumer.prototype.hasContentsOfAllSources` method to - determine when all sources' contents are inlined into the source map. See - issue #190. - -## 0.4.2 - -* Add an `.npmignore` file so that the benchmarks aren't pulled down by - dependent projects. Issue #169. - -* Add an optional `column` argument to - `SourceMapConsumer.prototype.allGeneratedPositionsFor` and better handle lines - with no mappings. Issues #172 and #173. - -## 0.4.1 - -* Fix accidentally defining a global variable. #170. - -## 0.4.0 - -* The default direction for fuzzy searching was changed back to its original - direction. See #164. - -* There is now a `bias` option you can supply to `SourceMapConsumer` to control - the fuzzy searching direction. See #167. - -* About an 8% speed up in parsing source maps. See #159. - -* Added a benchmark for parsing and generating source maps. - -## 0.3.0 - -* Change the default direction that searching for positions fuzzes when there is - not an exact match. See #154. - -* Support for environments using json2.js for JSON serialization. See #156. - -## 0.2.0 - -* Support for consuming "indexed" source maps which do not have any remote - sections. See pull request #127. This introduces a minor backwards - incompatibility if you are monkey patching `SourceMapConsumer.prototype` - methods. - -## 0.1.43 - -* Performance improvements for `SourceMapGenerator` and `SourceNode`. See issue - #148 for some discussion and issues #150, #151, and #152 for implementations. - -## 0.1.42 - -* Fix an issue where `SourceNode`s from different versions of the source-map - library couldn't be used in conjunction with each other. See issue #142. - -## 0.1.41 - -* Fix a bug with getting the source content of relative sources with a "./" - prefix. See issue #145 and [Bug 1090768](bugzil.la/1090768). - -* Add the `SourceMapConsumer.prototype.computeColumnSpans` method to compute the - column span of each mapping. - -* Add the `SourceMapConsumer.prototype.allGeneratedPositionsFor` method to find - all generated positions associated with a given original source and line. - -## 0.1.40 - -* Performance improvements for parsing source maps in SourceMapConsumer. - -## 0.1.39 - -* Fix a bug where setting a source's contents to null before any source content - had been set before threw a TypeError. See issue #131. - -## 0.1.38 - -* Fix a bug where finding relative paths from an empty path were creating - absolute paths. See issue #129. - -## 0.1.37 - -* Fix a bug where if the source root was an empty string, relative source paths - would turn into absolute source paths. Issue #124. - -## 0.1.36 - -* Allow the `names` mapping property to be an empty string. Issue #121. - -## 0.1.35 - -* A third optional parameter was added to `SourceNode.fromStringWithSourceMap` - to specify a path that relative sources in the second parameter should be - relative to. Issue #105. - -* If no file property is given to a `SourceMapGenerator`, then the resulting - source map will no longer have a `null` file property. The property will - simply not exist. Issue #104. - -* Fixed a bug where consecutive newlines were ignored in `SourceNode`s. - Issue #116. - -## 0.1.34 - -* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103. - -* Fix bug involving source contents and the - `SourceMapGenerator.prototype.applySourceMap`. Issue #100. - -## 0.1.33 - -* Fix some edge cases surrounding path joining and URL resolution. - -* Add a third parameter for relative path to - `SourceMapGenerator.prototype.applySourceMap`. - -* Fix issues with mappings and EOLs. - -## 0.1.32 - -* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns - (issue 92). - -* Fixed test runner to actually report number of failed tests as its process - exit code. - -* Fixed a typo when reporting bad mappings (issue 87). - -## 0.1.31 - -* Delay parsing the mappings in SourceMapConsumer until queried for a source - location. - -* Support Sass source maps (which at the time of writing deviate from the spec - in small ways) in SourceMapConsumer. - -## 0.1.30 - -* Do not join source root with a source, when the source is a data URI. - -* Extend the test runner to allow running single specific test files at a time. - -* Performance improvements in `SourceNode.prototype.walk` and - `SourceMapConsumer.prototype.eachMapping`. - -* Source map browser builds will now work inside Workers. - -* Better error messages when attempting to add an invalid mapping to a - `SourceMapGenerator`. - -## 0.1.29 - -* Allow duplicate entries in the `names` and `sources` arrays of source maps - (usually from TypeScript) we are parsing. Fixes github issue 72. - -## 0.1.28 - -* Skip duplicate mappings when creating source maps from SourceNode; github - issue 75. - -## 0.1.27 - -* Don't throw an error when the `file` property is missing in SourceMapConsumer, - we don't use it anyway. - -## 0.1.26 - -* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70. - -## 0.1.25 - -* Make compatible with browserify - -## 0.1.24 - -* Fix issue with absolute paths and `file://` URIs. See - https://bugzilla.mozilla.org/show_bug.cgi?id=885597 - -## 0.1.23 - -* Fix issue with absolute paths and sourcesContent, github issue 64. - -## 0.1.22 - -* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21. - -## 0.1.21 - -* Fixed handling of sources that start with a slash so that they are relative to - the source root's host. - -## 0.1.20 - -* Fixed github issue #43: absolute URLs aren't joined with the source root - anymore. - -## 0.1.19 - -* Using Travis CI to run tests. - -## 0.1.18 - -* Fixed a bug in the handling of sourceRoot. - -## 0.1.17 - -* Added SourceNode.fromStringWithSourceMap. - -## 0.1.16 - -* Added missing documentation. - -* Fixed the generating of empty mappings in SourceNode. - -## 0.1.15 - -* Added SourceMapGenerator.applySourceMap. - -## 0.1.14 - -* The sourceRoot is now handled consistently. - -## 0.1.13 - -* Added SourceMapGenerator.fromSourceMap. - -## 0.1.12 - -* SourceNode now generates empty mappings too. - -## 0.1.11 - -* Added name support to SourceNode. - -## 0.1.10 - -* Added sourcesContent support to the customer and generator. diff --git a/node_modules/@babel/core/node_modules/source-map/LICENSE b/node_modules/@babel/core/node_modules/source-map/LICENSE deleted file mode 100644 index ed1b7cf2..00000000 --- a/node_modules/@babel/core/node_modules/source-map/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ - -Copyright (c) 2009-2011, Mozilla Foundation and contributors -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 names of the Mozilla Foundation nor the names of project - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@babel/core/node_modules/source-map/README.md b/node_modules/@babel/core/node_modules/source-map/README.md deleted file mode 100644 index 32813394..00000000 --- a/node_modules/@babel/core/node_modules/source-map/README.md +++ /dev/null @@ -1,729 +0,0 @@ -# Source Map - -[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) - -[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map) - -This is a library to generate and consume the source map format -[described here][format]. - -[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit - -## Use with Node - - $ npm install source-map - -## Use on the Web - - - --------------------------------------------------------------------------------- - - - - - -## Table of Contents - -- [Examples](#examples) - - [Consuming a source map](#consuming-a-source-map) - - [Generating a source map](#generating-a-source-map) - - [With SourceNode (high level API)](#with-sourcenode-high-level-api) - - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) -- [API](#api) - - [SourceMapConsumer](#sourcemapconsumer) - - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) - - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) - - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) - - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) - - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) - - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) - - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) - - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) - - [SourceMapGenerator](#sourcemapgenerator) - - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) - - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) - - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) - - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) - - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) - - [SourceNode](#sourcenode) - - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) - - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) - - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) - - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) - - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) - - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) - - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) - - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) - - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) - - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) - - - -## Examples - -### Consuming a source map - -```js -var rawSourceMap = { - version: 3, - file: 'min.js', - names: ['bar', 'baz', 'n'], - sources: ['one.js', 'two.js'], - sourceRoot: 'http://example.com/www/js/', - mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' -}; - -var smc = new SourceMapConsumer(rawSourceMap); - -console.log(smc.sources); -// [ 'http://example.com/www/js/one.js', -// 'http://example.com/www/js/two.js' ] - -console.log(smc.originalPositionFor({ - line: 2, - column: 28 -})); -// { source: 'http://example.com/www/js/two.js', -// line: 2, -// column: 10, -// name: 'n' } - -console.log(smc.generatedPositionFor({ - source: 'http://example.com/www/js/two.js', - line: 2, - column: 10 -})); -// { line: 2, column: 28 } - -smc.eachMapping(function (m) { - // ... -}); -``` - -### Generating a source map - -In depth guide: -[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) - -#### With SourceNode (high level API) - -```js -function compile(ast) { - switch (ast.type) { - case 'BinaryExpression': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - [compile(ast.left), " + ", compile(ast.right)] - ); - case 'Literal': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - String(ast.value) - ); - // ... - default: - throw new Error("Bad AST"); - } -} - -var ast = parse("40 + 2", "add.js"); -console.log(compile(ast).toStringWithSourceMap({ - file: 'add.js' -})); -// { code: '40 + 2', -// map: [object SourceMapGenerator] } -``` - -#### With SourceMapGenerator (low level API) - -```js -var map = new SourceMapGenerator({ - file: "source-mapped.js" -}); - -map.addMapping({ - generated: { - line: 10, - column: 35 - }, - source: "foo.js", - original: { - line: 33, - column: 2 - }, - name: "christopher" -}); - -console.log(map.toString()); -// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' -``` - -## API - -Get a reference to the module: - -```js -// Node.js -var sourceMap = require('source-map'); - -// Browser builds -var sourceMap = window.sourceMap; - -// Inside Firefox -const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); -``` - -### SourceMapConsumer - -A SourceMapConsumer instance represents a parsed source map which we can query -for information about the original file positions by giving it a file position -in the generated source. - -#### new SourceMapConsumer(rawSourceMap) - -The only parameter is the raw source map (either as a string which can be -`JSON.parse`'d, or an object). According to the spec, source maps have the -following attributes: - -* `version`: Which version of the source map spec this map is following. - -* `sources`: An array of URLs to the original source files. - -* `names`: An array of identifiers which can be referenced by individual - mappings. - -* `sourceRoot`: Optional. The URL root from which all sources are relative. - -* `sourcesContent`: Optional. An array of contents of the original source files. - -* `mappings`: A string of base64 VLQs which contain the actual mappings. - -* `file`: Optional. The generated filename this source map is associated with. - -```js -var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); -``` - -#### SourceMapConsumer.prototype.computeColumnSpans() - -Compute the last column for each generated mapping. The last column is -inclusive. - -```js -// Before: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] - -consumer.computeColumnSpans(); - -// After: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1, -// lastColumn: 9 }, -// { line: 2, -// column: 10, -// lastColumn: 19 }, -// { line: 2, -// column: 20, -// lastColumn: Infinity } ] - -``` - -#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) - -Returns the original source, line, and column information for the generated -source's line and column positions provided. The only argument is an object with -the following properties: - -* `line`: The line number in the generated source. - -* `column`: The column number in the generated source. - -* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or - `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest - element that is smaller than or greater than the one we are searching for, - respectively, if the exact element cannot be found. Defaults to - `SourceMapConsumer.GREATEST_LOWER_BOUND`. - -and an object is returned with the following properties: - -* `source`: The original source file, or null if this information is not - available. - -* `line`: The line number in the original source, or null if this information is - not available. - -* `column`: The column number in the original source, or null if this - information is not available. - -* `name`: The original identifier, or null if this information is not available. - -```js -consumer.originalPositionFor({ line: 2, column: 10 }) -// { source: 'foo.coffee', -// line: 2, -// column: 2, -// name: null } - -consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) -// { source: null, -// line: null, -// column: null, -// name: null } -``` - -#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) - -Returns the generated line and column information for the original source, -line, and column positions provided. The only argument is an object with -the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. - -* `column`: The column number in the original source. - -and an object is returned with the following properties: - -* `line`: The line number in the generated source, or null. - -* `column`: The column number in the generated source, or null. - -```js -consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) -// { line: 1, -// column: 56 } -``` - -#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) - -Returns all generated line and column information for the original source, line, -and column provided. If no column is provided, returns all mappings -corresponding to a either the line we are searching for or the next closest line -that has any mappings. Otherwise, returns all mappings corresponding to the -given line and either the column we are searching for or the next closest column -that has any offsets. - -The only argument is an object with the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. - -* `column`: Optional. The column number in the original source. - -and an array of objects is returned, each with the following properties: - -* `line`: The line number in the generated source, or null. - -* `column`: The column number in the generated source, or null. - -```js -consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] -``` - -#### SourceMapConsumer.prototype.hasContentsOfAllSources() - -Return true if we have the embedded source content for every source listed in -the source map, false otherwise. - -In other words, if this method returns `true`, then -`consumer.sourceContentFor(s)` will succeed for every source `s` in -`consumer.sources`. - -```js -// ... -if (consumer.hasContentsOfAllSources()) { - consumerReadyCallback(consumer); -} else { - fetchSources(consumer, consumerReadyCallback); -} -// ... -``` - -#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) - -Returns the original source content for the source provided. The only -argument is the URL of the original source file. - -If the source content for the given source is not found, then an error is -thrown. Optionally, pass `true` as the second param to have `null` returned -instead. - -```js -consumer.sources -// [ "my-cool-lib.clj" ] - -consumer.sourceContentFor("my-cool-lib.clj") -// "..." - -consumer.sourceContentFor("this is not in the source map"); -// Error: "this is not in the source map" is not in the source map - -consumer.sourceContentFor("this is not in the source map", true); -// null -``` - -#### SourceMapConsumer.prototype.eachMapping(callback, context, order) - -Iterate over each mapping between an original source/line/column and a -generated line/column in this source map. - -* `callback`: The function that is called with each mapping. Mappings have the - form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, - name }` - -* `context`: Optional. If specified, this object will be the value of `this` - every time that `callback` is called. - -* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or - `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over - the mappings sorted by the generated file's line/column order or the - original's source/line/column order, respectively. Defaults to - `SourceMapConsumer.GENERATED_ORDER`. - -```js -consumer.eachMapping(function (m) { console.log(m); }) -// ... -// { source: 'illmatic.js', -// generatedLine: 1, -// generatedColumn: 0, -// originalLine: 1, -// originalColumn: 0, -// name: null } -// { source: 'illmatic.js', -// generatedLine: 2, -// generatedColumn: 0, -// originalLine: 2, -// originalColumn: 0, -// name: null } -// ... -``` -### SourceMapGenerator - -An instance of the SourceMapGenerator represents a source map which is being -built incrementally. - -#### new SourceMapGenerator([startOfSourceMap]) - -You may pass an object with the following properties: - -* `file`: The filename of the generated source that this source map is - associated with. - -* `sourceRoot`: A root for all relative URLs in this source map. - -* `skipValidation`: Optional. When `true`, disables validation of mappings as - they are added. This can improve performance but should be used with - discretion, as a last resort. Even then, one should avoid using this flag when - running tests, if possible. - -```js -var generator = new sourceMap.SourceMapGenerator({ - file: "my-generated-javascript-file.js", - sourceRoot: "http://example.com/app/js/" -}); -``` - -#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) - -Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. - -* `sourceMapConsumer` The SourceMap. - -```js -var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer); -``` - -#### SourceMapGenerator.prototype.addMapping(mapping) - -Add a single mapping from original source line and column to the generated -source's line and column for this source map being created. The mapping object -should have the following properties: - -* `generated`: An object with the generated line and column positions. - -* `original`: An object with the original line and column positions. - -* `source`: The original source file (relative to the sourceRoot). - -* `name`: An optional original token name for this mapping. - -```js -generator.addMapping({ - source: "module-one.scm", - original: { line: 128, column: 0 }, - generated: { line: 3, column: 456 } -}) -``` - -#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for an original source file. - -* `sourceFile` the URL of the original source file. - -* `sourceContent` the content of the source file. - -```js -generator.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) - -Applies a SourceMap for a source file to the SourceMap. -Each mapping to the supplied source file is rewritten using the -supplied SourceMap. Note: The resolution for the resulting mappings -is the minimum of this map and the supplied map. - -* `sourceMapConsumer`: The SourceMap to be applied. - -* `sourceFile`: Optional. The filename of the source file. - If omitted, sourceMapConsumer.file will be used, if it exists. - Otherwise an error will be thrown. - -* `sourceMapPath`: Optional. The dirname of the path to the SourceMap - to be applied. If relative, it is relative to the SourceMap. - - This parameter is needed when the two SourceMaps aren't in the same - directory, and the SourceMap to be applied contains relative source - paths. If so, those relative source paths need to be rewritten - relative to the SourceMap. - - If omitted, it is assumed that both SourceMaps are in the same directory, - thus not needing any rewriting. (Supplying `'.'` has the same effect.) - -#### SourceMapGenerator.prototype.toString() - -Renders the source map being generated to a string. - -```js -generator.toString() -// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' -``` - -### SourceNode - -SourceNodes provide a way to abstract over interpolating and/or concatenating -snippets of generated JavaScript source code, while maintaining the line and -column information associated between those snippets and the original source -code. This is useful as the final intermediate representation a compiler might -use before outputting the generated JS and source map. - -#### new SourceNode([line, column, source[, chunk[, name]]]) - -* `line`: The original line number associated with this source node, or null if - it isn't associated with an original line. - -* `column`: The original column number associated with this source node, or null - if it isn't associated with an original column. - -* `source`: The original source's filename; null if no filename is provided. - -* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see - below. - -* `name`: Optional. The original identifier. - -```js -var node = new SourceNode(1, 2, "a.cpp", [ - new SourceNode(3, 4, "b.cpp", "extern int status;\n"), - new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), - new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), -]); -``` - -#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) - -Creates a SourceNode from generated code and a SourceMapConsumer. - -* `code`: The generated code - -* `sourceMapConsumer` The SourceMap for the generated code - -* `relativePath` The optional path that relative sources in `sourceMapConsumer` - should be relative to. - -```js -var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); -var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), - consumer); -``` - -#### SourceNode.prototype.add(chunk) - -Add a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.add(" + "); -node.add(otherNode); -node.add([leftHandOperandNode, " + ", rightHandOperandNode]); -``` - -#### SourceNode.prototype.prepend(chunk) - -Prepend a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.prepend("/** Build Id: f783haef86324gf **/\n\n"); -``` - -#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for a source file. This will be added to the -`SourceMap` in the `sourcesContent` field. - -* `sourceFile`: The filename of the source file - -* `sourceContent`: The content of the source file - -```js -node.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceNode.prototype.walk(fn) - -Walk over the tree of JS snippets in this node and its children. The walking -function is called once for each snippet of JS and is passed that snippet and -the its original associated source's line/column location. - -* `fn`: The traversal function. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.walk(function (code, loc) { console.log("WALK:", code, loc); }) -// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } -// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } -// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } -// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } -``` - -#### SourceNode.prototype.walkSourceContents(fn) - -Walk over the tree of SourceNodes. The walking function is called for each -source file content and is passed the filename and source content. - -* `fn`: The traversal function. - -```js -var a = new SourceNode(1, 2, "a.js", "generated from a"); -a.setSourceContent("a.js", "original a"); -var b = new SourceNode(1, 2, "b.js", "generated from b"); -b.setSourceContent("b.js", "original b"); -var c = new SourceNode(1, 2, "c.js", "generated from c"); -c.setSourceContent("c.js", "original c"); - -var node = new SourceNode(null, null, null, [a, b, c]); -node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) -// WALK: a.js : original a -// WALK: b.js : original b -// WALK: c.js : original c -``` - -#### SourceNode.prototype.join(sep) - -Like `Array.prototype.join` except for SourceNodes. Inserts the separator -between each of this source node's children. - -* `sep`: The separator. - -```js -var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); -var operand = new SourceNode(3, 4, "a.rs", "="); -var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); - -var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); -var joinedNode = node.join(" "); -``` - -#### SourceNode.prototype.replaceRight(pattern, replacement) - -Call `String.prototype.replace` on the very right-most source snippet. Useful -for trimming white space from the end of a source node, etc. - -* `pattern`: The pattern to replace. - -* `replacement`: The thing to replace the pattern with. - -```js -// Trim trailing white space. -node.replaceRight(/\s*$/, ""); -``` - -#### SourceNode.prototype.toString() - -Return the string representation of this source node. Walks over the tree and -concatenates all the various snippets together to one string. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toString() -// 'unodostresquatro' -``` - -#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) - -Returns the string representation of this tree of source nodes, plus a -SourceMapGenerator which contains all the mappings between the generated and -original sources. - -The arguments are the same as those to `new SourceMapGenerator`. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toStringWithSourceMap({ file: "my-output-file.js" }) -// { code: 'unodostresquatro', -// map: [object SourceMapGenerator] } -``` diff --git a/node_modules/@babel/core/node_modules/source-map/dist/source-map.debug.js b/node_modules/@babel/core/node_modules/source-map/dist/source-map.debug.js deleted file mode 100644 index b5ab6382..00000000 --- a/node_modules/@babel/core/node_modules/source-map/dist/source-map.debug.js +++ /dev/null @@ -1,3091 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. 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 Google 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 THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCBlNDczOGZjNzJhN2IyMzAzOTg4OSIsIndlYnBhY2s6Ly8vLi9zb3VyY2UtbWFwLmpzIiwid2VicGFjazovLy8uL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LXZscS5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LmpzIiwid2VicGFjazovLy8uL2xpYi91dGlsLmpzIiwid2VicGFjazovLy8uL2xpYi9hcnJheS1zZXQuanMiLCJ3ZWJwYWNrOi8vLy4vbGliL21hcHBpbmctbGlzdC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmluYXJ5LXNlYXJjaC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvcXVpY2stc29ydC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW5vZGUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsQ0FBQztBQUNELE87QUNWQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSx1QkFBZTtBQUNmO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOzs7QUFHQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOzs7Ozs7O0FDdENBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNQQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxVQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUEsTUFBSztBQUNMO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxRQUFPO0FBQ1A7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsMkNBQTBDLFNBQVM7QUFDbkQ7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOzs7Ozs7O0FDL1pBLGlCQUFnQixvQkFBb0I7QUFDcEM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDREQUEyRDtBQUMzRCxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFHOztBQUVIO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRzs7QUFFSDtBQUNBO0FBQ0E7Ozs7Ozs7QUMzSUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWdCO0FBQ2hCLGlCQUFnQjs7QUFFaEIsb0JBQW1CO0FBQ25CLHFCQUFvQjs7QUFFcEIsaUJBQWdCO0FBQ2hCLGlCQUFnQjs7QUFFaEIsaUJBQWdCO0FBQ2hCLGtCQUFpQjs7QUFFakI7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNsRUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0EsSUFBRztBQUNIO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsK0NBQThDLFFBQVE7QUFDdEQ7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxFQUFDOztBQUVEO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBLDRCQUEyQixRQUFRO0FBQ25DO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNoYUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdUNBQXNDLFNBQVM7QUFDL0M7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFHO0FBQ0g7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7Ozs7OztBQ3hIQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWdCO0FBQ2hCOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQUc7QUFDSDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7Ozs7OztBQzlFQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSx1REFBc0Q7QUFDdEQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSxFQUFDOztBQUVEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsRUFBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQSxvQkFBbUI7QUFDbkI7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFlBQVc7O0FBRVg7QUFDQTtBQUNBLFFBQU87QUFDUDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsWUFBVzs7QUFFWDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsNEJBQTJCLE1BQU07QUFDakM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSx1REFBc0Q7QUFDdEQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7O0FBRUw7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBLHVEQUFzRCxZQUFZO0FBQ2xFO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBLEVBQUM7O0FBRUQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0Esb0NBQW1DO0FBQ25DO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSwwQkFBeUIsY0FBYztBQUN2QztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esd0JBQXVCLHdDQUF3QztBQUMvRDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsZ0RBQStDLG1CQUFtQixFQUFFO0FBQ3BFOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGtCQUFpQixvQkFBb0I7QUFDckM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDhCQUE2QixNQUFNO0FBQ25DO0FBQ0EsUUFBTztBQUNQO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdURBQXNEO0FBQ3REOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxRQUFPO0FBQ1A7QUFDQTtBQUNBLElBQUc7QUFDSDs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQiwyQkFBMkI7QUFDOUMsc0JBQXFCLCtDQUErQztBQUNwRTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsRUFBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsUUFBTztBQUNQOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esb0JBQW1CLDJCQUEyQjtBQUM5Qzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxvQkFBbUIsMkJBQTJCO0FBQzlDOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQiwyQkFBMkI7QUFDOUM7QUFDQTtBQUNBLHNCQUFxQiw0QkFBNEI7QUFDakQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBOzs7Ozs7O0FDempDQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7Ozs7OztBQzlHQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFlBQVcsTUFBTTtBQUNqQjtBQUNBLFlBQVcsT0FBTztBQUNsQjtBQUNBLFlBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE1BQU07QUFDakI7QUFDQSxZQUFXLFNBQVM7QUFDcEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQixPQUFPO0FBQzFCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE1BQU07QUFDakI7QUFDQSxZQUFXLFNBQVM7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQ2pIQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLOztBQUVMOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxrQ0FBaUMsUUFBUTtBQUN6QztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSw4Q0FBNkMsU0FBUztBQUN0RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBLHVDQUFzQztBQUN0QztBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxnQkFBZSxXQUFXO0FBQzFCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxnREFBK0MsU0FBUztBQUN4RDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLDBDQUF5QyxTQUFTO0FBQ2xEO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsWUFBVztBQUNYO0FBQ0E7QUFDQTtBQUNBLFlBQVc7QUFDWDtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQSw2Q0FBNEMsY0FBYztBQUMxRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsY0FBYTtBQUNiO0FBQ0E7QUFDQTtBQUNBLGNBQWE7QUFDYjtBQUNBLFlBQVc7QUFDWDtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQSxJQUFHO0FBQ0g7QUFDQTtBQUNBLElBQUc7O0FBRUgsV0FBVTtBQUNWOztBQUVBIiwiZmlsZSI6InNvdXJjZS1tYXAuZGVidWcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIoZnVuY3Rpb24gd2VicGFja1VuaXZlcnNhbE1vZHVsZURlZmluaXRpb24ocm9vdCwgZmFjdG9yeSkge1xuXHRpZih0eXBlb2YgZXhwb3J0cyA9PT0gJ29iamVjdCcgJiYgdHlwZW9mIG1vZHVsZSA9PT0gJ29iamVjdCcpXG5cdFx0bW9kdWxlLmV4cG9ydHMgPSBmYWN0b3J5KCk7XG5cdGVsc2UgaWYodHlwZW9mIGRlZmluZSA9PT0gJ2Z1bmN0aW9uJyAmJiBkZWZpbmUuYW1kKVxuXHRcdGRlZmluZShbXSwgZmFjdG9yeSk7XG5cdGVsc2UgaWYodHlwZW9mIGV4cG9ydHMgPT09ICdvYmplY3QnKVxuXHRcdGV4cG9ydHNbXCJzb3VyY2VNYXBcIl0gPSBmYWN0b3J5KCk7XG5cdGVsc2Vcblx0XHRyb290W1wic291cmNlTWFwXCJdID0gZmFjdG9yeSgpO1xufSkodGhpcywgZnVuY3Rpb24oKSB7XG5yZXR1cm4gXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHdlYnBhY2svdW5pdmVyc2FsTW9kdWxlRGVmaW5pdGlvbiIsIiBcdC8vIFRoZSBtb2R1bGUgY2FjaGVcbiBcdHZhciBpbnN0YWxsZWRNb2R1bGVzID0ge307XG5cbiBcdC8vIFRoZSByZXF1aXJlIGZ1bmN0aW9uXG4gXHRmdW5jdGlvbiBfX3dlYnBhY2tfcmVxdWlyZV9fKG1vZHVsZUlkKSB7XG5cbiBcdFx0Ly8gQ2hlY2sgaWYgbW9kdWxlIGlzIGluIGNhY2hlXG4gXHRcdGlmKGluc3RhbGxlZE1vZHVsZXNbbW9kdWxlSWRdKVxuIFx0XHRcdHJldHVybiBpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXS5leHBvcnRzO1xuXG4gXHRcdC8vIENyZWF0ZSBhIG5ldyBtb2R1bGUgKGFuZCBwdXQgaXQgaW50byB0aGUgY2FjaGUpXG4gXHRcdHZhciBtb2R1bGUgPSBpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXSA9IHtcbiBcdFx0XHRleHBvcnRzOiB7fSxcbiBcdFx0XHRpZDogbW9kdWxlSWQsXG4gXHRcdFx0bG9hZGVkOiBmYWxzZVxuIFx0XHR9O1xuXG4gXHRcdC8vIEV4ZWN1dGUgdGhlIG1vZHVsZSBmdW5jdGlvblxuIFx0XHRtb2R1bGVzW21vZHVsZUlkXS5jYWxsKG1vZHVsZS5leHBvcnRzLCBtb2R1bGUsIG1vZHVsZS5leHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKTtcblxuIFx0XHQvLyBGbGFnIHRoZSBtb2R1bGUgYXMgbG9hZGVkXG4gXHRcdG1vZHVsZS5sb2FkZWQgPSB0cnVlO1xuXG4gXHRcdC8vIFJldHVybiB0aGUgZXhwb3J0cyBvZiB0aGUgbW9kdWxlXG4gXHRcdHJldHVybiBtb2R1bGUuZXhwb3J0cztcbiBcdH1cblxuXG4gXHQvLyBleHBvc2UgdGhlIG1vZHVsZXMgb2JqZWN0IChfX3dlYnBhY2tfbW9kdWxlc19fKVxuIFx0X193ZWJwYWNrX3JlcXVpcmVfXy5tID0gbW9kdWxlcztcblxuIFx0Ly8gZXhwb3NlIHRoZSBtb2R1bGUgY2FjaGVcbiBcdF9fd2VicGFja19yZXF1aXJlX18uYyA9IGluc3RhbGxlZE1vZHVsZXM7XG5cbiBcdC8vIF9fd2VicGFja19wdWJsaWNfcGF0aF9fXG4gXHRfX3dlYnBhY2tfcmVxdWlyZV9fLnAgPSBcIlwiO1xuXG4gXHQvLyBMb2FkIGVudHJ5IG1vZHVsZSBhbmQgcmV0dXJuIGV4cG9ydHNcbiBcdHJldHVybiBfX3dlYnBhY2tfcmVxdWlyZV9fKDApO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHdlYnBhY2svYm9vdHN0cmFwIGU0NzM4ZmM3MmE3YjIzMDM5ODg5IiwiLypcbiAqIENvcHlyaWdodCAyMDA5LTIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFLnR4dCBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuZXhwb3J0cy5Tb3VyY2VNYXBHZW5lcmF0b3IgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvcicpLlNvdXJjZU1hcEdlbmVyYXRvcjtcbmV4cG9ydHMuU291cmNlTWFwQ29uc3VtZXIgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2UtbWFwLWNvbnN1bWVyJykuU291cmNlTWFwQ29uc3VtZXI7XG5leHBvcnRzLlNvdXJjZU5vZGUgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2Utbm9kZScpLlNvdXJjZU5vZGU7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL3NvdXJjZS1tYXAuanNcbi8vIG1vZHVsZSBpZCA9IDBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgYmFzZTY0VkxRID0gcmVxdWlyZSgnLi9iYXNlNjQtdmxxJyk7XG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIEFycmF5U2V0ID0gcmVxdWlyZSgnLi9hcnJheS1zZXQnKS5BcnJheVNldDtcbnZhciBNYXBwaW5nTGlzdCA9IHJlcXVpcmUoJy4vbWFwcGluZy1saXN0JykuTWFwcGluZ0xpc3Q7XG5cbi8qKlxuICogQW4gaW5zdGFuY2Ugb2YgdGhlIFNvdXJjZU1hcEdlbmVyYXRvciByZXByZXNlbnRzIGEgc291cmNlIG1hcCB3aGljaCBpc1xuICogYmVpbmcgYnVpbHQgaW5jcmVtZW50YWxseS4gWW91IG1heSBwYXNzIGFuIG9iamVjdCB3aXRoIHRoZSBmb2xsb3dpbmdcbiAqIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGZpbGU6IFRoZSBmaWxlbmFtZSBvZiB0aGUgZ2VuZXJhdGVkIHNvdXJjZS5cbiAqICAgLSBzb3VyY2VSb290OiBBIHJvb3QgZm9yIGFsbCByZWxhdGl2ZSBVUkxzIGluIHRoaXMgc291cmNlIG1hcC5cbiAqL1xuZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yKGFBcmdzKSB7XG4gIGlmICghYUFyZ3MpIHtcbiAgICBhQXJncyA9IHt9O1xuICB9XG4gIHRoaXMuX2ZpbGUgPSB1dGlsLmdldEFyZyhhQXJncywgJ2ZpbGUnLCBudWxsKTtcbiAgdGhpcy5fc291cmNlUm9vdCA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlUm9vdCcsIG51bGwpO1xuICB0aGlzLl9za2lwVmFsaWRhdGlvbiA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc2tpcFZhbGlkYXRpb24nLCBmYWxzZSk7XG4gIHRoaXMuX3NvdXJjZXMgPSBuZXcgQXJyYXlTZXQoKTtcbiAgdGhpcy5fbmFtZXMgPSBuZXcgQXJyYXlTZXQoKTtcbiAgdGhpcy5fbWFwcGluZ3MgPSBuZXcgTWFwcGluZ0xpc3QoKTtcbiAgdGhpcy5fc291cmNlc0NvbnRlbnRzID0gbnVsbDtcbn1cblxuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogQ3JlYXRlcyBhIG5ldyBTb3VyY2VNYXBHZW5lcmF0b3IgYmFzZWQgb24gYSBTb3VyY2VNYXBDb25zdW1lclxuICpcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIFNvdXJjZU1hcC5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLmZyb21Tb3VyY2VNYXAgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfZnJvbVNvdXJjZU1hcChhU291cmNlTWFwQ29uc3VtZXIpIHtcbiAgICB2YXIgc291cmNlUm9vdCA9IGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VSb290O1xuICAgIHZhciBnZW5lcmF0b3IgPSBuZXcgU291cmNlTWFwR2VuZXJhdG9yKHtcbiAgICAgIGZpbGU6IGFTb3VyY2VNYXBDb25zdW1lci5maWxlLFxuICAgICAgc291cmNlUm9vdDogc291cmNlUm9vdFxuICAgIH0pO1xuICAgIGFTb3VyY2VNYXBDb25zdW1lci5lYWNoTWFwcGluZyhmdW5jdGlvbiAobWFwcGluZykge1xuICAgICAgdmFyIG5ld01hcHBpbmcgPSB7XG4gICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgIGxpbmU6IG1hcHBpbmcuZ2VuZXJhdGVkTGluZSxcbiAgICAgICAgICBjb2x1bW46IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uXG4gICAgICAgIH1cbiAgICAgIH07XG5cbiAgICAgIGlmIChtYXBwaW5nLnNvdXJjZSAhPSBudWxsKSB7XG4gICAgICAgIG5ld01hcHBpbmcuc291cmNlID0gbWFwcGluZy5zb3VyY2U7XG4gICAgICAgIGlmIChzb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgICAgICBuZXdNYXBwaW5nLnNvdXJjZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgbmV3TWFwcGluZy5zb3VyY2UpO1xuICAgICAgICB9XG5cbiAgICAgICAgbmV3TWFwcGluZy5vcmlnaW5hbCA9IHtcbiAgICAgICAgICBsaW5lOiBtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICBjb2x1bW46IG1hcHBpbmcub3JpZ2luYWxDb2x1bW5cbiAgICAgICAgfTtcblxuICAgICAgICBpZiAobWFwcGluZy5uYW1lICE9IG51bGwpIHtcbiAgICAgICAgICBuZXdNYXBwaW5nLm5hbWUgPSBtYXBwaW5nLm5hbWU7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgZ2VuZXJhdG9yLmFkZE1hcHBpbmcobmV3TWFwcGluZyk7XG4gICAgfSk7XG4gICAgYVNvdXJjZU1hcENvbnN1bWVyLnNvdXJjZXMuZm9yRWFjaChmdW5jdGlvbiAoc291cmNlRmlsZSkge1xuICAgICAgdmFyIGNvbnRlbnQgPSBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlQ29udGVudEZvcihzb3VyY2VGaWxlKTtcbiAgICAgIGlmIChjb250ZW50ICE9IG51bGwpIHtcbiAgICAgICAgZ2VuZXJhdG9yLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG4gICAgcmV0dXJuIGdlbmVyYXRvcjtcbiAgfTtcblxuLyoqXG4gKiBBZGQgYSBzaW5nbGUgbWFwcGluZyBmcm9tIG9yaWdpbmFsIHNvdXJjZSBsaW5lIGFuZCBjb2x1bW4gdG8gdGhlIGdlbmVyYXRlZFxuICogc291cmNlJ3MgbGluZSBhbmQgY29sdW1uIGZvciB0aGlzIHNvdXJjZSBtYXAgYmVpbmcgY3JlYXRlZC4gVGhlIG1hcHBpbmdcbiAqIG9iamVjdCBzaG91bGQgaGF2ZSB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGdlbmVyYXRlZDogQW4gb2JqZWN0IHdpdGggdGhlIGdlbmVyYXRlZCBsaW5lIGFuZCBjb2x1bW4gcG9zaXRpb25zLlxuICogICAtIG9yaWdpbmFsOiBBbiBvYmplY3Qgd2l0aCB0aGUgb3JpZ2luYWwgbGluZSBhbmQgY29sdW1uIHBvc2l0aW9ucy5cbiAqICAgLSBzb3VyY2U6IFRoZSBvcmlnaW5hbCBzb3VyY2UgZmlsZSAocmVsYXRpdmUgdG8gdGhlIHNvdXJjZVJvb3QpLlxuICogICAtIG5hbWU6IEFuIG9wdGlvbmFsIG9yaWdpbmFsIHRva2VuIG5hbWUgZm9yIHRoaXMgbWFwcGluZy5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5hZGRNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX2FkZE1hcHBpbmcoYUFyZ3MpIHtcbiAgICB2YXIgZ2VuZXJhdGVkID0gdXRpbC5nZXRBcmcoYUFyZ3MsICdnZW5lcmF0ZWQnKTtcbiAgICB2YXIgb3JpZ2luYWwgPSB1dGlsLmdldEFyZyhhQXJncywgJ29yaWdpbmFsJywgbnVsbCk7XG4gICAgdmFyIHNvdXJjZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJywgbnVsbCk7XG4gICAgdmFyIG5hbWUgPSB1dGlsLmdldEFyZyhhQXJncywgJ25hbWUnLCBudWxsKTtcblxuICAgIGlmICghdGhpcy5fc2tpcFZhbGlkYXRpb24pIHtcbiAgICAgIHRoaXMuX3ZhbGlkYXRlTWFwcGluZyhnZW5lcmF0ZWQsIG9yaWdpbmFsLCBzb3VyY2UsIG5hbWUpO1xuICAgIH1cblxuICAgIGlmIChzb3VyY2UgIT0gbnVsbCkge1xuICAgICAgc291cmNlID0gU3RyaW5nKHNvdXJjZSk7XG4gICAgICBpZiAoIXRoaXMuX3NvdXJjZXMuaGFzKHNvdXJjZSkpIHtcbiAgICAgICAgdGhpcy5fc291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAobmFtZSAhPSBudWxsKSB7XG4gICAgICBuYW1lID0gU3RyaW5nKG5hbWUpO1xuICAgICAgaWYgKCF0aGlzLl9uYW1lcy5oYXMobmFtZSkpIHtcbiAgICAgICAgdGhpcy5fbmFtZXMuYWRkKG5hbWUpO1xuICAgICAgfVxuICAgIH1cblxuICAgIHRoaXMuX21hcHBpbmdzLmFkZCh7XG4gICAgICBnZW5lcmF0ZWRMaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgIGdlbmVyYXRlZENvbHVtbjogZ2VuZXJhdGVkLmNvbHVtbixcbiAgICAgIG9yaWdpbmFsTGluZTogb3JpZ2luYWwgIT0gbnVsbCAmJiBvcmlnaW5hbC5saW5lLFxuICAgICAgb3JpZ2luYWxDb2x1bW46IG9yaWdpbmFsICE9IG51bGwgJiYgb3JpZ2luYWwuY29sdW1uLFxuICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICBuYW1lOiBuYW1lXG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogU2V0IHRoZSBzb3VyY2UgY29udGVudCBmb3IgYSBzb3VyY2UgZmlsZS5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5zZXRTb3VyY2VDb250ZW50ID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX3NldFNvdXJjZUNvbnRlbnQoYVNvdXJjZUZpbGUsIGFTb3VyY2VDb250ZW50KSB7XG4gICAgdmFyIHNvdXJjZSA9IGFTb3VyY2VGaWxlO1xuICAgIGlmICh0aGlzLl9zb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgIHNvdXJjZSA9IHV0aWwucmVsYXRpdmUodGhpcy5fc291cmNlUm9vdCwgc291cmNlKTtcbiAgICB9XG5cbiAgICBpZiAoYVNvdXJjZUNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgLy8gQWRkIHRoZSBzb3VyY2UgY29udGVudCB0byB0aGUgX3NvdXJjZXNDb250ZW50cyBtYXAuXG4gICAgICAvLyBDcmVhdGUgYSBuZXcgX3NvdXJjZXNDb250ZW50cyBtYXAgaWYgdGhlIHByb3BlcnR5IGlzIG51bGwuXG4gICAgICBpZiAoIXRoaXMuX3NvdXJjZXNDb250ZW50cykge1xuICAgICAgICB0aGlzLl9zb3VyY2VzQ29udGVudHMgPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICAgICAgfVxuICAgICAgdGhpcy5fc291cmNlc0NvbnRlbnRzW3V0aWwudG9TZXRTdHJpbmcoc291cmNlKV0gPSBhU291cmNlQ29udGVudDtcbiAgICB9IGVsc2UgaWYgKHRoaXMuX3NvdXJjZXNDb250ZW50cykge1xuICAgICAgLy8gUmVtb3ZlIHRoZSBzb3VyY2UgZmlsZSBmcm9tIHRoZSBfc291cmNlc0NvbnRlbnRzIG1hcC5cbiAgICAgIC8vIElmIHRoZSBfc291cmNlc0NvbnRlbnRzIG1hcCBpcyBlbXB0eSwgc2V0IHRoZSBwcm9wZXJ0eSB0byBudWxsLlxuICAgICAgZGVsZXRlIHRoaXMuX3NvdXJjZXNDb250ZW50c1t1dGlsLnRvU2V0U3RyaW5nKHNvdXJjZSldO1xuICAgICAgaWYgKE9iamVjdC5rZXlzKHRoaXMuX3NvdXJjZXNDb250ZW50cykubGVuZ3RoID09PSAwKSB7XG4gICAgICAgIHRoaXMuX3NvdXJjZXNDb250ZW50cyA9IG51bGw7XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4vKipcbiAqIEFwcGxpZXMgdGhlIG1hcHBpbmdzIG9mIGEgc3ViLXNvdXJjZS1tYXAgZm9yIGEgc3BlY2lmaWMgc291cmNlIGZpbGUgdG8gdGhlXG4gKiBzb3VyY2UgbWFwIGJlaW5nIGdlbmVyYXRlZC4gRWFjaCBtYXBwaW5nIHRvIHRoZSBzdXBwbGllZCBzb3VyY2UgZmlsZSBpc1xuICogcmV3cml0dGVuIHVzaW5nIHRoZSBzdXBwbGllZCBzb3VyY2UgbWFwLiBOb3RlOiBUaGUgcmVzb2x1dGlvbiBmb3IgdGhlXG4gKiByZXN1bHRpbmcgbWFwcGluZ3MgaXMgdGhlIG1pbmltaXVtIG9mIHRoaXMgbWFwIGFuZCB0aGUgc3VwcGxpZWQgbWFwLlxuICpcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIHNvdXJjZSBtYXAgdG8gYmUgYXBwbGllZC5cbiAqIEBwYXJhbSBhU291cmNlRmlsZSBPcHRpb25hbC4gVGhlIGZpbGVuYW1lIG9mIHRoZSBzb3VyY2UgZmlsZS5cbiAqICAgICAgICBJZiBvbWl0dGVkLCBTb3VyY2VNYXBDb25zdW1lcidzIGZpbGUgcHJvcGVydHkgd2lsbCBiZSB1c2VkLlxuICogQHBhcmFtIGFTb3VyY2VNYXBQYXRoIE9wdGlvbmFsLiBUaGUgZGlybmFtZSBvZiB0aGUgcGF0aCB0byB0aGUgc291cmNlIG1hcFxuICogICAgICAgIHRvIGJlIGFwcGxpZWQuIElmIHJlbGF0aXZlLCBpdCBpcyByZWxhdGl2ZSB0byB0aGUgU291cmNlTWFwQ29uc3VtZXIuXG4gKiAgICAgICAgVGhpcyBwYXJhbWV0ZXIgaXMgbmVlZGVkIHdoZW4gdGhlIHR3byBzb3VyY2UgbWFwcyBhcmVuJ3QgaW4gdGhlIHNhbWVcbiAqICAgICAgICBkaXJlY3RvcnksIGFuZCB0aGUgc291cmNlIG1hcCB0byBiZSBhcHBsaWVkIGNvbnRhaW5zIHJlbGF0aXZlIHNvdXJjZVxuICogICAgICAgIHBhdGhzLiBJZiBzbywgdGhvc2UgcmVsYXRpdmUgc291cmNlIHBhdGhzIG5lZWQgdG8gYmUgcmV3cml0dGVuXG4gKiAgICAgICAgcmVsYXRpdmUgdG8gdGhlIFNvdXJjZU1hcEdlbmVyYXRvci5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5hcHBseVNvdXJjZU1hcCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9hcHBseVNvdXJjZU1hcChhU291cmNlTWFwQ29uc3VtZXIsIGFTb3VyY2VGaWxlLCBhU291cmNlTWFwUGF0aCkge1xuICAgIHZhciBzb3VyY2VGaWxlID0gYVNvdXJjZUZpbGU7XG4gICAgLy8gSWYgYVNvdXJjZUZpbGUgaXMgb21pdHRlZCwgd2Ugd2lsbCB1c2UgdGhlIGZpbGUgcHJvcGVydHkgb2YgdGhlIFNvdXJjZU1hcFxuICAgIGlmIChhU291cmNlRmlsZSA9PSBudWxsKSB7XG4gICAgICBpZiAoYVNvdXJjZU1hcENvbnN1bWVyLmZpbGUgPT0gbnVsbCkge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgJ1NvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUuYXBwbHlTb3VyY2VNYXAgcmVxdWlyZXMgZWl0aGVyIGFuIGV4cGxpY2l0IHNvdXJjZSBmaWxlLCAnICtcbiAgICAgICAgICAnb3IgdGhlIHNvdXJjZSBtYXBcXCdzIFwiZmlsZVwiIHByb3BlcnR5LiBCb3RoIHdlcmUgb21pdHRlZC4nXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgICBzb3VyY2VGaWxlID0gYVNvdXJjZU1hcENvbnN1bWVyLmZpbGU7XG4gICAgfVxuICAgIHZhciBzb3VyY2VSb290ID0gdGhpcy5fc291cmNlUm9vdDtcbiAgICAvLyBNYWtlIFwic291cmNlRmlsZVwiIHJlbGF0aXZlIGlmIGFuIGFic29sdXRlIFVybCBpcyBwYXNzZWQuXG4gICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgc291cmNlRmlsZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgc291cmNlRmlsZSk7XG4gICAgfVxuICAgIC8vIEFwcGx5aW5nIHRoZSBTb3VyY2VNYXAgY2FuIGFkZCBhbmQgcmVtb3ZlIGl0ZW1zIGZyb20gdGhlIHNvdXJjZXMgYW5kXG4gICAgLy8gdGhlIG5hbWVzIGFycmF5LlxuICAgIHZhciBuZXdTb3VyY2VzID0gbmV3IEFycmF5U2V0KCk7XG4gICAgdmFyIG5ld05hbWVzID0gbmV3IEFycmF5U2V0KCk7XG5cbiAgICAvLyBGaW5kIG1hcHBpbmdzIGZvciB0aGUgXCJzb3VyY2VGaWxlXCJcbiAgICB0aGlzLl9tYXBwaW5ncy51bnNvcnRlZEZvckVhY2goZnVuY3Rpb24gKG1hcHBpbmcpIHtcbiAgICAgIGlmIChtYXBwaW5nLnNvdXJjZSA9PT0gc291cmNlRmlsZSAmJiBtYXBwaW5nLm9yaWdpbmFsTGluZSAhPSBudWxsKSB7XG4gICAgICAgIC8vIENoZWNrIGlmIGl0IGNhbiBiZSBtYXBwZWQgYnkgdGhlIHNvdXJjZSBtYXAsIHRoZW4gdXBkYXRlIHRoZSBtYXBwaW5nLlxuICAgICAgICB2YXIgb3JpZ2luYWwgPSBhU291cmNlTWFwQ29uc3VtZXIub3JpZ2luYWxQb3NpdGlvbkZvcih7XG4gICAgICAgICAgbGluZTogbWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgICAgY29sdW1uOiBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgIH0pO1xuICAgICAgICBpZiAob3JpZ2luYWwuc291cmNlICE9IG51bGwpIHtcbiAgICAgICAgICAvLyBDb3B5IG1hcHBpbmdcbiAgICAgICAgICBtYXBwaW5nLnNvdXJjZSA9IG9yaWdpbmFsLnNvdXJjZTtcbiAgICAgICAgICBpZiAoYVNvdXJjZU1hcFBhdGggIT0gbnVsbCkge1xuICAgICAgICAgICAgbWFwcGluZy5zb3VyY2UgPSB1dGlsLmpvaW4oYVNvdXJjZU1hcFBhdGgsIG1hcHBpbmcuc291cmNlKVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBtYXBwaW5nLnNvdXJjZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgbWFwcGluZy5zb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsTGluZSA9IG9yaWdpbmFsLmxpbmU7XG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbiA9IG9yaWdpbmFsLmNvbHVtbjtcbiAgICAgICAgICBpZiAob3JpZ2luYWwubmFtZSAhPSBudWxsKSB7XG4gICAgICAgICAgICBtYXBwaW5nLm5hbWUgPSBvcmlnaW5hbC5uYW1lO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICB2YXIgc291cmNlID0gbWFwcGluZy5zb3VyY2U7XG4gICAgICBpZiAoc291cmNlICE9IG51bGwgJiYgIW5ld1NvdXJjZXMuaGFzKHNvdXJjZSkpIHtcbiAgICAgICAgbmV3U291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgIH1cblxuICAgICAgdmFyIG5hbWUgPSBtYXBwaW5nLm5hbWU7XG4gICAgICBpZiAobmFtZSAhPSBudWxsICYmICFuZXdOYW1lcy5oYXMobmFtZSkpIHtcbiAgICAgICAgbmV3TmFtZXMuYWRkKG5hbWUpO1xuICAgICAgfVxuXG4gICAgfSwgdGhpcyk7XG4gICAgdGhpcy5fc291cmNlcyA9IG5ld1NvdXJjZXM7XG4gICAgdGhpcy5fbmFtZXMgPSBuZXdOYW1lcztcblxuICAgIC8vIENvcHkgc291cmNlc0NvbnRlbnRzIG9mIGFwcGxpZWQgbWFwLlxuICAgIGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VzLmZvckVhY2goZnVuY3Rpb24gKHNvdXJjZUZpbGUpIHtcbiAgICAgIHZhciBjb250ZW50ID0gYVNvdXJjZU1hcENvbnN1bWVyLnNvdXJjZUNvbnRlbnRGb3Ioc291cmNlRmlsZSk7XG4gICAgICBpZiAoY29udGVudCAhPSBudWxsKSB7XG4gICAgICAgIGlmIChhU291cmNlTWFwUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwuam9pbihhU291cmNlTWFwUGF0aCwgc291cmNlRmlsZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZUZpbGUgPSB1dGlsLnJlbGF0aXZlKHNvdXJjZVJvb3QsIHNvdXJjZUZpbGUpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBjb250ZW50KTtcbiAgICAgIH1cbiAgICB9LCB0aGlzKTtcbiAgfTtcblxuLyoqXG4gKiBBIG1hcHBpbmcgY2FuIGhhdmUgb25lIG9mIHRoZSB0aHJlZSBsZXZlbHMgb2YgZGF0YTpcbiAqXG4gKiAgIDEuIEp1c3QgdGhlIGdlbmVyYXRlZCBwb3NpdGlvbi5cbiAqICAgMi4gVGhlIEdlbmVyYXRlZCBwb3NpdGlvbiwgb3JpZ2luYWwgcG9zaXRpb24sIGFuZCBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIDMuIEdlbmVyYXRlZCBhbmQgb3JpZ2luYWwgcG9zaXRpb24sIG9yaWdpbmFsIHNvdXJjZSwgYXMgd2VsbCBhcyBhIG5hbWVcbiAqICAgICAgdG9rZW4uXG4gKlxuICogVG8gbWFpbnRhaW4gY29uc2lzdGVuY3ksIHdlIHZhbGlkYXRlIHRoYXQgYW55IG5ldyBtYXBwaW5nIGJlaW5nIGFkZGVkIGZhbGxzXG4gKiBpbiB0byBvbmUgb2YgdGhlc2UgY2F0ZWdvcmllcy5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fdmFsaWRhdGVNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX3ZhbGlkYXRlTWFwcGluZyhhR2VuZXJhdGVkLCBhT3JpZ2luYWwsIGFTb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYU5hbWUpIHtcbiAgICAvLyBXaGVuIGFPcmlnaW5hbCBpcyB0cnV0aHkgYnV0IGhhcyBlbXB0eSB2YWx1ZXMgZm9yIC5saW5lIGFuZCAuY29sdW1uLFxuICAgIC8vIGl0IGlzIG1vc3QgbGlrZWx5IGEgcHJvZ3JhbW1lciBlcnJvci4gSW4gdGhpcyBjYXNlIHdlIHRocm93IGEgdmVyeVxuICAgIC8vIHNwZWNpZmljIGVycm9yIG1lc3NhZ2UgdG8gdHJ5IHRvIGd1aWRlIHRoZW0gdGhlIHJpZ2h0IHdheS5cbiAgICAvLyBGb3IgZXhhbXBsZTogaHR0cHM6Ly9naXRodWIuY29tL1BvbHltZXIvcG9seW1lci1idW5kbGVyL3B1bGwvNTE5XG4gICAgaWYgKGFPcmlnaW5hbCAmJiB0eXBlb2YgYU9yaWdpbmFsLmxpbmUgIT09ICdudW1iZXInICYmIHR5cGVvZiBhT3JpZ2luYWwuY29sdW1uICE9PSAnbnVtYmVyJykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAnb3JpZ2luYWwubGluZSBhbmQgb3JpZ2luYWwuY29sdW1uIGFyZSBub3QgbnVtYmVycyAtLSB5b3UgcHJvYmFibHkgbWVhbnQgdG8gb21pdCAnICtcbiAgICAgICAgICAgICd0aGUgb3JpZ2luYWwgbWFwcGluZyBlbnRpcmVseSBhbmQgb25seSBtYXAgdGhlIGdlbmVyYXRlZCBwb3NpdGlvbi4gSWYgc28sIHBhc3MgJyArXG4gICAgICAgICAgICAnbnVsbCBmb3IgdGhlIG9yaWdpbmFsIG1hcHBpbmcgaW5zdGVhZCBvZiBhbiBvYmplY3Qgd2l0aCBlbXB0eSBvciBudWxsIHZhbHVlcy4nXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgaWYgKGFHZW5lcmF0ZWQgJiYgJ2xpbmUnIGluIGFHZW5lcmF0ZWQgJiYgJ2NvbHVtbicgaW4gYUdlbmVyYXRlZFxuICAgICAgICAmJiBhR2VuZXJhdGVkLmxpbmUgPiAwICYmIGFHZW5lcmF0ZWQuY29sdW1uID49IDBcbiAgICAgICAgJiYgIWFPcmlnaW5hbCAmJiAhYVNvdXJjZSAmJiAhYU5hbWUpIHtcbiAgICAgIC8vIENhc2UgMS5cbiAgICAgIHJldHVybjtcbiAgICB9XG4gICAgZWxzZSBpZiAoYUdlbmVyYXRlZCAmJiAnbGluZScgaW4gYUdlbmVyYXRlZCAmJiAnY29sdW1uJyBpbiBhR2VuZXJhdGVkXG4gICAgICAgICAgICAgJiYgYU9yaWdpbmFsICYmICdsaW5lJyBpbiBhT3JpZ2luYWwgJiYgJ2NvbHVtbicgaW4gYU9yaWdpbmFsXG4gICAgICAgICAgICAgJiYgYUdlbmVyYXRlZC5saW5lID4gMCAmJiBhR2VuZXJhdGVkLmNvbHVtbiA+PSAwXG4gICAgICAgICAgICAgJiYgYU9yaWdpbmFsLmxpbmUgPiAwICYmIGFPcmlnaW5hbC5jb2x1bW4gPj0gMFxuICAgICAgICAgICAgICYmIGFTb3VyY2UpIHtcbiAgICAgIC8vIENhc2VzIDIgYW5kIDMuXG4gICAgICByZXR1cm47XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdJbnZhbGlkIG1hcHBpbmc6ICcgKyBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgIGdlbmVyYXRlZDogYUdlbmVyYXRlZCxcbiAgICAgICAgc291cmNlOiBhU291cmNlLFxuICAgICAgICBvcmlnaW5hbDogYU9yaWdpbmFsLFxuICAgICAgICBuYW1lOiBhTmFtZVxuICAgICAgfSkpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBTZXJpYWxpemUgdGhlIGFjY3VtdWxhdGVkIG1hcHBpbmdzIGluIHRvIHRoZSBzdHJlYW0gb2YgYmFzZSA2NCBWTFFzXG4gKiBzcGVjaWZpZWQgYnkgdGhlIHNvdXJjZSBtYXAgZm9ybWF0LlxuICovXG5Tb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLl9zZXJpYWxpemVNYXBwaW5ncyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9zZXJpYWxpemVNYXBwaW5ncygpIHtcbiAgICB2YXIgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuICAgIHZhciBwcmV2aW91c0dlbmVyYXRlZExpbmUgPSAxO1xuICAgIHZhciBwcmV2aW91c09yaWdpbmFsQ29sdW1uID0gMDtcbiAgICB2YXIgcHJldmlvdXNPcmlnaW5hbExpbmUgPSAwO1xuICAgIHZhciBwcmV2aW91c05hbWUgPSAwO1xuICAgIHZhciBwcmV2aW91c1NvdXJjZSA9IDA7XG4gICAgdmFyIHJlc3VsdCA9ICcnO1xuICAgIHZhciBuZXh0O1xuICAgIHZhciBtYXBwaW5nO1xuICAgIHZhciBuYW1lSWR4O1xuICAgIHZhciBzb3VyY2VJZHg7XG5cbiAgICB2YXIgbWFwcGluZ3MgPSB0aGlzLl9tYXBwaW5ncy50b0FycmF5KCk7XG4gICAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IG1hcHBpbmdzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICBtYXBwaW5nID0gbWFwcGluZ3NbaV07XG4gICAgICBuZXh0ID0gJydcblxuICAgICAgaWYgKG1hcHBpbmcuZ2VuZXJhdGVkTGluZSAhPT0gcHJldmlvdXNHZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uID0gMDtcbiAgICAgICAgd2hpbGUgKG1hcHBpbmcuZ2VuZXJhdGVkTGluZSAhPT0gcHJldmlvdXNHZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgbmV4dCArPSAnOyc7XG4gICAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRMaW5lKys7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBpZiAoaSA+IDApIHtcbiAgICAgICAgICBpZiAoIXV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQobWFwcGluZywgbWFwcGluZ3NbaSAtIDFdKSkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIG5leHQgKz0gJywnO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLmdlbmVyYXRlZENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c0dlbmVyYXRlZENvbHVtbik7XG4gICAgICBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2VJZHggPSB0aGlzLl9zb3VyY2VzLmluZGV4T2YobWFwcGluZy5zb3VyY2UpO1xuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUoc291cmNlSWR4IC0gcHJldmlvdXNTb3VyY2UpO1xuICAgICAgICBwcmV2aW91c1NvdXJjZSA9IHNvdXJjZUlkeDtcblxuICAgICAgICAvLyBsaW5lcyBhcmUgc3RvcmVkIDAtYmFzZWQgaW4gU291cmNlTWFwIHNwZWMgdmVyc2lvbiAzXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsTGluZSAtIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c09yaWdpbmFsTGluZSk7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmUgLSAxO1xuXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbENvbHVtbik7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIGlmIChtYXBwaW5nLm5hbWUgIT0gbnVsbCkge1xuICAgICAgICAgIG5hbWVJZHggPSB0aGlzLl9uYW1lcy5pbmRleE9mKG1hcHBpbmcubmFtZSk7XG4gICAgICAgICAgbmV4dCArPSBiYXNlNjRWTFEuZW5jb2RlKG5hbWVJZHggLSBwcmV2aW91c05hbWUpO1xuICAgICAgICAgIHByZXZpb3VzTmFtZSA9IG5hbWVJZHg7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgcmVzdWx0ICs9IG5leHQ7XG4gICAgfVxuXG4gICAgcmV0dXJuIHJlc3VsdDtcbiAgfTtcblxuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fZ2VuZXJhdGVTb3VyY2VzQ29udGVudCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9nZW5lcmF0ZVNvdXJjZXNDb250ZW50KGFTb3VyY2VzLCBhU291cmNlUm9vdCkge1xuICAgIHJldHVybiBhU291cmNlcy5tYXAoZnVuY3Rpb24gKHNvdXJjZSkge1xuICAgICAgaWYgKCF0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICBpZiAoYVNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2UgPSB1dGlsLnJlbGF0aXZlKGFTb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgfVxuICAgICAgdmFyIGtleSA9IHV0aWwudG9TZXRTdHJpbmcoc291cmNlKTtcbiAgICAgIHJldHVybiBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwodGhpcy5fc291cmNlc0NvbnRlbnRzLCBrZXkpXG4gICAgICAgID8gdGhpcy5fc291cmNlc0NvbnRlbnRzW2tleV1cbiAgICAgICAgOiBudWxsO1xuICAgIH0sIHRoaXMpO1xuICB9O1xuXG4vKipcbiAqIEV4dGVybmFsaXplIHRoZSBzb3VyY2UgbWFwLlxuICovXG5Tb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLnRvSlNPTiA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl90b0pTT04oKSB7XG4gICAgdmFyIG1hcCA9IHtcbiAgICAgIHZlcnNpb246IHRoaXMuX3ZlcnNpb24sXG4gICAgICBzb3VyY2VzOiB0aGlzLl9zb3VyY2VzLnRvQXJyYXkoKSxcbiAgICAgIG5hbWVzOiB0aGlzLl9uYW1lcy50b0FycmF5KCksXG4gICAgICBtYXBwaW5nczogdGhpcy5fc2VyaWFsaXplTWFwcGluZ3MoKVxuICAgIH07XG4gICAgaWYgKHRoaXMuX2ZpbGUgIT0gbnVsbCkge1xuICAgICAgbWFwLmZpbGUgPSB0aGlzLl9maWxlO1xuICAgIH1cbiAgICBpZiAodGhpcy5fc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBtYXAuc291cmNlUm9vdCA9IHRoaXMuX3NvdXJjZVJvb3Q7XG4gICAgfVxuICAgIGlmICh0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgIG1hcC5zb3VyY2VzQ29udGVudCA9IHRoaXMuX2dlbmVyYXRlU291cmNlc0NvbnRlbnQobWFwLnNvdXJjZXMsIG1hcC5zb3VyY2VSb290KTtcbiAgICB9XG5cbiAgICByZXR1cm4gbWFwO1xuICB9O1xuXG4vKipcbiAqIFJlbmRlciB0aGUgc291cmNlIG1hcCBiZWluZyBnZW5lcmF0ZWQgdG8gYSBzdHJpbmcuXG4gKi9cblNvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUudG9TdHJpbmcgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfdG9TdHJpbmcoKSB7XG4gICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHRoaXMudG9KU09OKCkpO1xuICB9O1xuXG5leHBvcnRzLlNvdXJjZU1hcEdlbmVyYXRvciA9IFNvdXJjZU1hcEdlbmVyYXRvcjtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL3NvdXJjZS1tYXAtZ2VuZXJhdG9yLmpzXG4vLyBtb2R1bGUgaWQgPSAxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKlxuICogQmFzZWQgb24gdGhlIEJhc2UgNjQgVkxRIGltcGxlbWVudGF0aW9uIGluIENsb3N1cmUgQ29tcGlsZXI6XG4gKiBodHRwczovL2NvZGUuZ29vZ2xlLmNvbS9wL2Nsb3N1cmUtY29tcGlsZXIvc291cmNlL2Jyb3dzZS90cnVuay9zcmMvY29tL2dvb2dsZS9kZWJ1Z2dpbmcvc291cmNlbWFwL0Jhc2U2NFZMUS5qYXZhXG4gKlxuICogQ29weXJpZ2h0IDIwMTEgVGhlIENsb3N1cmUgQ29tcGlsZXIgQXV0aG9ycy4gQWxsIHJpZ2h0cyByZXNlcnZlZC5cbiAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dFxuICogbW9kaWZpY2F0aW9uLCBhcmUgcGVybWl0dGVkIHByb3ZpZGVkIHRoYXQgdGhlIGZvbGxvd2luZyBjb25kaXRpb25zIGFyZVxuICogbWV0OlxuICpcbiAqICAqIFJlZGlzdHJpYnV0aW9ucyBvZiBzb3VyY2UgY29kZSBtdXN0IHJldGFpbiB0aGUgYWJvdmUgY29weXJpZ2h0XG4gKiAgICBub3RpY2UsIHRoaXMgbGlzdCBvZiBjb25kaXRpb25zIGFuZCB0aGUgZm9sbG93aW5nIGRpc2NsYWltZXIuXG4gKiAgKiBSZWRpc3RyaWJ1dGlvbnMgaW4gYmluYXJ5IGZvcm0gbXVzdCByZXByb2R1Y2UgdGhlIGFib3ZlXG4gKiAgICBjb3B5cmlnaHQgbm90aWNlLCB0aGlzIGxpc3Qgb2YgY29uZGl0aW9ucyBhbmQgdGhlIGZvbGxvd2luZ1xuICogICAgZGlzY2xhaW1lciBpbiB0aGUgZG9jdW1lbnRhdGlvbiBhbmQvb3Igb3RoZXIgbWF0ZXJpYWxzIHByb3ZpZGVkXG4gKiAgICB3aXRoIHRoZSBkaXN0cmlidXRpb24uXG4gKiAgKiBOZWl0aGVyIHRoZSBuYW1lIG9mIEdvb2dsZSBJbmMuIG5vciB0aGUgbmFtZXMgb2YgaXRzXG4gKiAgICBjb250cmlidXRvcnMgbWF5IGJlIHVzZWQgdG8gZW5kb3JzZSBvciBwcm9tb3RlIHByb2R1Y3RzIGRlcml2ZWRcbiAqICAgIGZyb20gdGhpcyBzb2Z0d2FyZSB3aXRob3V0IHNwZWNpZmljIHByaW9yIHdyaXR0ZW4gcGVybWlzc2lvbi5cbiAqXG4gKiBUSElTIFNPRlRXQVJFIElTIFBST1ZJREVEIEJZIFRIRSBDT1BZUklHSFQgSE9MREVSUyBBTkQgQ09OVFJJQlVUT1JTXG4gKiBcIkFTIElTXCIgQU5EIEFOWSBFWFBSRVNTIE9SIElNUExJRUQgV0FSUkFOVElFUywgSU5DTFVESU5HLCBCVVQgTk9UXG4gKiBMSU1JVEVEIFRPLCBUSEUgSU1QTElFRCBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWSBBTkQgRklUTkVTUyBGT1JcbiAqIEEgUEFSVElDVUxBUiBQVVJQT1NFIEFSRSBESVNDTEFJTUVELiBJTiBOTyBFVkVOVCBTSEFMTCBUSEUgQ09QWVJJR0hUXG4gKiBPV05FUiBPUiBDT05UUklCVVRPUlMgQkUgTElBQkxFIEZPUiBBTlkgRElSRUNULCBJTkRJUkVDVCwgSU5DSURFTlRBTCxcbiAqIFNQRUNJQUwsIEVYRU1QTEFSWSwgT1IgQ09OU0VRVUVOVElBTCBEQU1BR0VTIChJTkNMVURJTkcsIEJVVCBOT1RcbiAqIExJTUlURUQgVE8sIFBST0NVUkVNRU5UIE9GIFNVQlNUSVRVVEUgR09PRFMgT1IgU0VSVklDRVM7IExPU1MgT0YgVVNFLFxuICogREFUQSwgT1IgUFJPRklUUzsgT1IgQlVTSU5FU1MgSU5URVJSVVBUSU9OKSBIT1dFVkVSIENBVVNFRCBBTkQgT04gQU5ZXG4gKiBUSEVPUlkgT0YgTElBQklMSVRZLCBXSEVUSEVSIElOIENPTlRSQUNULCBTVFJJQ1QgTElBQklMSVRZLCBPUiBUT1JUXG4gKiAoSU5DTFVESU5HIE5FR0xJR0VOQ0UgT1IgT1RIRVJXSVNFKSBBUklTSU5HIElOIEFOWSBXQVkgT1VUIE9GIFRIRSBVU0VcbiAqIE9GIFRISVMgU09GVFdBUkUsIEVWRU4gSUYgQURWSVNFRCBPRiBUSEUgUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0UuXG4gKi9cblxudmFyIGJhc2U2NCA9IHJlcXVpcmUoJy4vYmFzZTY0Jyk7XG5cbi8vIEEgc2luZ2xlIGJhc2UgNjQgZGlnaXQgY2FuIGNvbnRhaW4gNiBiaXRzIG9mIGRhdGEuIEZvciB0aGUgYmFzZSA2NCB2YXJpYWJsZVxuLy8gbGVuZ3RoIHF1YW50aXRpZXMgd2UgdXNlIGluIHRoZSBzb3VyY2UgbWFwIHNwZWMsIHRoZSBmaXJzdCBiaXQgaXMgdGhlIHNpZ24sXG4vLyB0aGUgbmV4dCBmb3VyIGJpdHMgYXJlIHRoZSBhY3R1YWwgdmFsdWUsIGFuZCB0aGUgNnRoIGJpdCBpcyB0aGVcbi8vIGNvbnRpbnVhdGlvbiBiaXQuIFRoZSBjb250aW51YXRpb24gYml0IHRlbGxzIHVzIHdoZXRoZXIgdGhlcmUgYXJlIG1vcmVcbi8vIGRpZ2l0cyBpbiB0aGlzIHZhbHVlIGZvbGxvd2luZyB0aGlzIGRpZ2l0LlxuLy9cbi8vICAgQ29udGludWF0aW9uXG4vLyAgIHwgICAgU2lnblxuLy8gICB8ICAgIHxcbi8vICAgViAgICBWXG4vLyAgIDEwMTAxMVxuXG52YXIgVkxRX0JBU0VfU0hJRlQgPSA1O1xuXG4vLyBiaW5hcnk6IDEwMDAwMFxudmFyIFZMUV9CQVNFID0gMSA8PCBWTFFfQkFTRV9TSElGVDtcblxuLy8gYmluYXJ5OiAwMTExMTFcbnZhciBWTFFfQkFTRV9NQVNLID0gVkxRX0JBU0UgLSAxO1xuXG4vLyBiaW5hcnk6IDEwMDAwMFxudmFyIFZMUV9DT05USU5VQVRJT05fQklUID0gVkxRX0JBU0U7XG5cbi8qKlxuICogQ29udmVydHMgZnJvbSBhIHR3by1jb21wbGVtZW50IHZhbHVlIHRvIGEgdmFsdWUgd2hlcmUgdGhlIHNpZ24gYml0IGlzXG4gKiBwbGFjZWQgaW4gdGhlIGxlYXN0IHNpZ25pZmljYW50IGJpdC4gIEZvciBleGFtcGxlLCBhcyBkZWNpbWFsczpcbiAqICAgMSBiZWNvbWVzIDIgKDEwIGJpbmFyeSksIC0xIGJlY29tZXMgMyAoMTEgYmluYXJ5KVxuICogICAyIGJlY29tZXMgNCAoMTAwIGJpbmFyeSksIC0yIGJlY29tZXMgNSAoMTAxIGJpbmFyeSlcbiAqL1xuZnVuY3Rpb24gdG9WTFFTaWduZWQoYVZhbHVlKSB7XG4gIHJldHVybiBhVmFsdWUgPCAwXG4gICAgPyAoKC1hVmFsdWUpIDw8IDEpICsgMVxuICAgIDogKGFWYWx1ZSA8PCAxKSArIDA7XG59XG5cbi8qKlxuICogQ29udmVydHMgdG8gYSB0d28tY29tcGxlbWVudCB2YWx1ZSBmcm9tIGEgdmFsdWUgd2hlcmUgdGhlIHNpZ24gYml0IGlzXG4gKiBwbGFjZWQgaW4gdGhlIGxlYXN0IHNpZ25pZmljYW50IGJpdC4gIEZvciBleGFtcGxlLCBhcyBkZWNpbWFsczpcbiAqICAgMiAoMTAgYmluYXJ5KSBiZWNvbWVzIDEsIDMgKDExIGJpbmFyeSkgYmVjb21lcyAtMVxuICogICA0ICgxMDAgYmluYXJ5KSBiZWNvbWVzIDIsIDUgKDEwMSBiaW5hcnkpIGJlY29tZXMgLTJcbiAqL1xuZnVuY3Rpb24gZnJvbVZMUVNpZ25lZChhVmFsdWUpIHtcbiAgdmFyIGlzTmVnYXRpdmUgPSAoYVZhbHVlICYgMSkgPT09IDE7XG4gIHZhciBzaGlmdGVkID0gYVZhbHVlID4+IDE7XG4gIHJldHVybiBpc05lZ2F0aXZlXG4gICAgPyAtc2hpZnRlZFxuICAgIDogc2hpZnRlZDtcbn1cblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBiYXNlIDY0IFZMUSBlbmNvZGVkIHZhbHVlLlxuICovXG5leHBvcnRzLmVuY29kZSA9IGZ1bmN0aW9uIGJhc2U2NFZMUV9lbmNvZGUoYVZhbHVlKSB7XG4gIHZhciBlbmNvZGVkID0gXCJcIjtcbiAgdmFyIGRpZ2l0O1xuXG4gIHZhciB2bHEgPSB0b1ZMUVNpZ25lZChhVmFsdWUpO1xuXG4gIGRvIHtcbiAgICBkaWdpdCA9IHZscSAmIFZMUV9CQVNFX01BU0s7XG4gICAgdmxxID4+Pj0gVkxRX0JBU0VfU0hJRlQ7XG4gICAgaWYgKHZscSA+IDApIHtcbiAgICAgIC8vIFRoZXJlIGFyZSBzdGlsbCBtb3JlIGRpZ2l0cyBpbiB0aGlzIHZhbHVlLCBzbyB3ZSBtdXN0IG1ha2Ugc3VyZSB0aGVcbiAgICAgIC8vIGNvbnRpbnVhdGlvbiBiaXQgaXMgbWFya2VkLlxuICAgICAgZGlnaXQgfD0gVkxRX0NPTlRJTlVBVElPTl9CSVQ7XG4gICAgfVxuICAgIGVuY29kZWQgKz0gYmFzZTY0LmVuY29kZShkaWdpdCk7XG4gIH0gd2hpbGUgKHZscSA+IDApO1xuXG4gIHJldHVybiBlbmNvZGVkO1xufTtcblxuLyoqXG4gKiBEZWNvZGVzIHRoZSBuZXh0IGJhc2UgNjQgVkxRIHZhbHVlIGZyb20gdGhlIGdpdmVuIHN0cmluZyBhbmQgcmV0dXJucyB0aGVcbiAqIHZhbHVlIGFuZCB0aGUgcmVzdCBvZiB0aGUgc3RyaW5nIHZpYSB0aGUgb3V0IHBhcmFtZXRlci5cbiAqL1xuZXhwb3J0cy5kZWNvZGUgPSBmdW5jdGlvbiBiYXNlNjRWTFFfZGVjb2RlKGFTdHIsIGFJbmRleCwgYU91dFBhcmFtKSB7XG4gIHZhciBzdHJMZW4gPSBhU3RyLmxlbmd0aDtcbiAgdmFyIHJlc3VsdCA9IDA7XG4gIHZhciBzaGlmdCA9IDA7XG4gIHZhciBjb250aW51YXRpb24sIGRpZ2l0O1xuXG4gIGRvIHtcbiAgICBpZiAoYUluZGV4ID49IHN0ckxlbikge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiRXhwZWN0ZWQgbW9yZSBkaWdpdHMgaW4gYmFzZSA2NCBWTFEgdmFsdWUuXCIpO1xuICAgIH1cblxuICAgIGRpZ2l0ID0gYmFzZTY0LmRlY29kZShhU3RyLmNoYXJDb2RlQXQoYUluZGV4KyspKTtcbiAgICBpZiAoZGlnaXQgPT09IC0xKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoXCJJbnZhbGlkIGJhc2U2NCBkaWdpdDogXCIgKyBhU3RyLmNoYXJBdChhSW5kZXggLSAxKSk7XG4gICAgfVxuXG4gICAgY29udGludWF0aW9uID0gISEoZGlnaXQgJiBWTFFfQ09OVElOVUFUSU9OX0JJVCk7XG4gICAgZGlnaXQgJj0gVkxRX0JBU0VfTUFTSztcbiAgICByZXN1bHQgPSByZXN1bHQgKyAoZGlnaXQgPDwgc2hpZnQpO1xuICAgIHNoaWZ0ICs9IFZMUV9CQVNFX1NISUZUO1xuICB9IHdoaWxlIChjb250aW51YXRpb24pO1xuXG4gIGFPdXRQYXJhbS52YWx1ZSA9IGZyb21WTFFTaWduZWQocmVzdWx0KTtcbiAgYU91dFBhcmFtLnJlc3QgPSBhSW5kZXg7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmFzZTY0LXZscS5qc1xuLy8gbW9kdWxlIGlkID0gMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciBpbnRUb0NoYXJNYXAgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLycuc3BsaXQoJycpO1xuXG4vKipcbiAqIEVuY29kZSBhbiBpbnRlZ2VyIGluIHRoZSByYW5nZSBvZiAwIHRvIDYzIHRvIGEgc2luZ2xlIGJhc2UgNjQgZGlnaXQuXG4gKi9cbmV4cG9ydHMuZW5jb2RlID0gZnVuY3Rpb24gKG51bWJlcikge1xuICBpZiAoMCA8PSBudW1iZXIgJiYgbnVtYmVyIDwgaW50VG9DaGFyTWFwLmxlbmd0aCkge1xuICAgIHJldHVybiBpbnRUb0NoYXJNYXBbbnVtYmVyXTtcbiAgfVxuICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiTXVzdCBiZSBiZXR3ZWVuIDAgYW5kIDYzOiBcIiArIG51bWJlcik7XG59O1xuXG4vKipcbiAqIERlY29kZSBhIHNpbmdsZSBiYXNlIDY0IGNoYXJhY3RlciBjb2RlIGRpZ2l0IHRvIGFuIGludGVnZXIuIFJldHVybnMgLTEgb25cbiAqIGZhaWx1cmUuXG4gKi9cbmV4cG9ydHMuZGVjb2RlID0gZnVuY3Rpb24gKGNoYXJDb2RlKSB7XG4gIHZhciBiaWdBID0gNjU7ICAgICAvLyAnQSdcbiAgdmFyIGJpZ1ogPSA5MDsgICAgIC8vICdaJ1xuXG4gIHZhciBsaXR0bGVBID0gOTc7ICAvLyAnYSdcbiAgdmFyIGxpdHRsZVogPSAxMjI7IC8vICd6J1xuXG4gIHZhciB6ZXJvID0gNDg7ICAgICAvLyAnMCdcbiAgdmFyIG5pbmUgPSA1NzsgICAgIC8vICc5J1xuXG4gIHZhciBwbHVzID0gNDM7ICAgICAvLyAnKydcbiAgdmFyIHNsYXNoID0gNDc7ICAgIC8vICcvJ1xuXG4gIHZhciBsaXR0bGVPZmZzZXQgPSAyNjtcbiAgdmFyIG51bWJlck9mZnNldCA9IDUyO1xuXG4gIC8vIDAgLSAyNTogQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpcbiAgaWYgKGJpZ0EgPD0gY2hhckNvZGUgJiYgY2hhckNvZGUgPD0gYmlnWikge1xuICAgIHJldHVybiAoY2hhckNvZGUgLSBiaWdBKTtcbiAgfVxuXG4gIC8vIDI2IC0gNTE6IGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6XG4gIGlmIChsaXR0bGVBIDw9IGNoYXJDb2RlICYmIGNoYXJDb2RlIDw9IGxpdHRsZVopIHtcbiAgICByZXR1cm4gKGNoYXJDb2RlIC0gbGl0dGxlQSArIGxpdHRsZU9mZnNldCk7XG4gIH1cblxuICAvLyA1MiAtIDYxOiAwMTIzNDU2Nzg5XG4gIGlmICh6ZXJvIDw9IGNoYXJDb2RlICYmIGNoYXJDb2RlIDw9IG5pbmUpIHtcbiAgICByZXR1cm4gKGNoYXJDb2RlIC0gemVybyArIG51bWJlck9mZnNldCk7XG4gIH1cblxuICAvLyA2MjogK1xuICBpZiAoY2hhckNvZGUgPT0gcGx1cykge1xuICAgIHJldHVybiA2MjtcbiAgfVxuXG4gIC8vIDYzOiAvXG4gIGlmIChjaGFyQ29kZSA9PSBzbGFzaCkge1xuICAgIHJldHVybiA2MztcbiAgfVxuXG4gIC8vIEludmFsaWQgYmFzZTY0IGRpZ2l0LlxuICByZXR1cm4gLTE7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmFzZTY0LmpzXG4vLyBtb2R1bGUgaWQgPSAzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKi9cblxuLyoqXG4gKiBUaGlzIGlzIGEgaGVscGVyIGZ1bmN0aW9uIGZvciBnZXR0aW5nIHZhbHVlcyBmcm9tIHBhcmFtZXRlci9vcHRpb25zXG4gKiBvYmplY3RzLlxuICpcbiAqIEBwYXJhbSBhcmdzIFRoZSBvYmplY3Qgd2UgYXJlIGV4dHJhY3RpbmcgdmFsdWVzIGZyb21cbiAqIEBwYXJhbSBuYW1lIFRoZSBuYW1lIG9mIHRoZSBwcm9wZXJ0eSB3ZSBhcmUgZ2V0dGluZy5cbiAqIEBwYXJhbSBkZWZhdWx0VmFsdWUgQW4gb3B0aW9uYWwgdmFsdWUgdG8gcmV0dXJuIGlmIHRoZSBwcm9wZXJ0eSBpcyBtaXNzaW5nXG4gKiBmcm9tIHRoZSBvYmplY3QuIElmIHRoaXMgaXMgbm90IHNwZWNpZmllZCBhbmQgdGhlIHByb3BlcnR5IGlzIG1pc3NpbmcsIGFuXG4gKiBlcnJvciB3aWxsIGJlIHRocm93bi5cbiAqL1xuZnVuY3Rpb24gZ2V0QXJnKGFBcmdzLCBhTmFtZSwgYURlZmF1bHRWYWx1ZSkge1xuICBpZiAoYU5hbWUgaW4gYUFyZ3MpIHtcbiAgICByZXR1cm4gYUFyZ3NbYU5hbWVdO1xuICB9IGVsc2UgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDMpIHtcbiAgICByZXR1cm4gYURlZmF1bHRWYWx1ZTtcbiAgfSBlbHNlIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ1wiJyArIGFOYW1lICsgJ1wiIGlzIGEgcmVxdWlyZWQgYXJndW1lbnQuJyk7XG4gIH1cbn1cbmV4cG9ydHMuZ2V0QXJnID0gZ2V0QXJnO1xuXG52YXIgdXJsUmVnZXhwID0gL14oPzooW1xcdytcXC0uXSspOik/XFwvXFwvKD86KFxcdys6XFx3KylAKT8oW1xcdy5dKikoPzo6KFxcZCspKT8oXFxTKikkLztcbnZhciBkYXRhVXJsUmVnZXhwID0gL15kYXRhOi4rXFwsLiskLztcblxuZnVuY3Rpb24gdXJsUGFyc2UoYVVybCkge1xuICB2YXIgbWF0Y2ggPSBhVXJsLm1hdGNoKHVybFJlZ2V4cCk7XG4gIGlmICghbWF0Y2gpIHtcbiAgICByZXR1cm4gbnVsbDtcbiAgfVxuICByZXR1cm4ge1xuICAgIHNjaGVtZTogbWF0Y2hbMV0sXG4gICAgYXV0aDogbWF0Y2hbMl0sXG4gICAgaG9zdDogbWF0Y2hbM10sXG4gICAgcG9ydDogbWF0Y2hbNF0sXG4gICAgcGF0aDogbWF0Y2hbNV1cbiAgfTtcbn1cbmV4cG9ydHMudXJsUGFyc2UgPSB1cmxQYXJzZTtcblxuZnVuY3Rpb24gdXJsR2VuZXJhdGUoYVBhcnNlZFVybCkge1xuICB2YXIgdXJsID0gJyc7XG4gIGlmIChhUGFyc2VkVXJsLnNjaGVtZSkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLnNjaGVtZSArICc6JztcbiAgfVxuICB1cmwgKz0gJy8vJztcbiAgaWYgKGFQYXJzZWRVcmwuYXV0aCkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLmF1dGggKyAnQCc7XG4gIH1cbiAgaWYgKGFQYXJzZWRVcmwuaG9zdCkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLmhvc3Q7XG4gIH1cbiAgaWYgKGFQYXJzZWRVcmwucG9ydCkge1xuICAgIHVybCArPSBcIjpcIiArIGFQYXJzZWRVcmwucG9ydFxuICB9XG4gIGlmIChhUGFyc2VkVXJsLnBhdGgpIHtcbiAgICB1cmwgKz0gYVBhcnNlZFVybC5wYXRoO1xuICB9XG4gIHJldHVybiB1cmw7XG59XG5leHBvcnRzLnVybEdlbmVyYXRlID0gdXJsR2VuZXJhdGU7XG5cbi8qKlxuICogTm9ybWFsaXplcyBhIHBhdGgsIG9yIHRoZSBwYXRoIHBvcnRpb24gb2YgYSBVUkw6XG4gKlxuICogLSBSZXBsYWNlcyBjb25zZWN1dGl2ZSBzbGFzaGVzIHdpdGggb25lIHNsYXNoLlxuICogLSBSZW1vdmVzIHVubmVjZXNzYXJ5ICcuJyBwYXJ0cy5cbiAqIC0gUmVtb3ZlcyB1bm5lY2Vzc2FyeSAnPGRpcj4vLi4nIHBhcnRzLlxuICpcbiAqIEJhc2VkIG9uIGNvZGUgaW4gdGhlIE5vZGUuanMgJ3BhdGgnIGNvcmUgbW9kdWxlLlxuICpcbiAqIEBwYXJhbSBhUGF0aCBUaGUgcGF0aCBvciB1cmwgdG8gbm9ybWFsaXplLlxuICovXG5mdW5jdGlvbiBub3JtYWxpemUoYVBhdGgpIHtcbiAgdmFyIHBhdGggPSBhUGF0aDtcbiAgdmFyIHVybCA9IHVybFBhcnNlKGFQYXRoKTtcbiAgaWYgKHVybCkge1xuICAgIGlmICghdXJsLnBhdGgpIHtcbiAgICAgIHJldHVybiBhUGF0aDtcbiAgICB9XG4gICAgcGF0aCA9IHVybC5wYXRoO1xuICB9XG4gIHZhciBpc0Fic29sdXRlID0gZXhwb3J0cy5pc0Fic29sdXRlKHBhdGgpO1xuXG4gIHZhciBwYXJ0cyA9IHBhdGguc3BsaXQoL1xcLysvKTtcbiAgZm9yICh2YXIgcGFydCwgdXAgPSAwLCBpID0gcGFydHMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICBwYXJ0ID0gcGFydHNbaV07XG4gICAgaWYgKHBhcnQgPT09ICcuJykge1xuICAgICAgcGFydHMuc3BsaWNlKGksIDEpO1xuICAgIH0gZWxzZSBpZiAocGFydCA9PT0gJy4uJykge1xuICAgICAgdXArKztcbiAgICB9IGVsc2UgaWYgKHVwID4gMCkge1xuICAgICAgaWYgKHBhcnQgPT09ICcnKSB7XG4gICAgICAgIC8vIFRoZSBmaXJzdCBwYXJ0IGlzIGJsYW5rIGlmIHRoZSBwYXRoIGlzIGFic29sdXRlLiBUcnlpbmcgdG8gZ29cbiAgICAgICAgLy8gYWJvdmUgdGhlIHJvb3QgaXMgYSBuby1vcC4gVGhlcmVmb3JlIHdlIGNhbiByZW1vdmUgYWxsICcuLicgcGFydHNcbiAgICAgICAgLy8gZGlyZWN0bHkgYWZ0ZXIgdGhlIHJvb3QuXG4gICAgICAgIHBhcnRzLnNwbGljZShpICsgMSwgdXApO1xuICAgICAgICB1cCA9IDA7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBwYXJ0cy5zcGxpY2UoaSwgMik7XG4gICAgICAgIHVwLS07XG4gICAgICB9XG4gICAgfVxuICB9XG4gIHBhdGggPSBwYXJ0cy5qb2luKCcvJyk7XG5cbiAgaWYgKHBhdGggPT09ICcnKSB7XG4gICAgcGF0aCA9IGlzQWJzb2x1dGUgPyAnLycgOiAnLic7XG4gIH1cblxuICBpZiAodXJsKSB7XG4gICAgdXJsLnBhdGggPSBwYXRoO1xuICAgIHJldHVybiB1cmxHZW5lcmF0ZSh1cmwpO1xuICB9XG4gIHJldHVybiBwYXRoO1xufVxuZXhwb3J0cy5ub3JtYWxpemUgPSBub3JtYWxpemU7XG5cbi8qKlxuICogSm9pbnMgdHdvIHBhdGhzL1VSTHMuXG4gKlxuICogQHBhcmFtIGFSb290IFRoZSByb290IHBhdGggb3IgVVJMLlxuICogQHBhcmFtIGFQYXRoIFRoZSBwYXRoIG9yIFVSTCB0byBiZSBqb2luZWQgd2l0aCB0aGUgcm9vdC5cbiAqXG4gKiAtIElmIGFQYXRoIGlzIGEgVVJMIG9yIGEgZGF0YSBVUkksIGFQYXRoIGlzIHJldHVybmVkLCB1bmxlc3MgYVBhdGggaXMgYVxuICogICBzY2hlbWUtcmVsYXRpdmUgVVJMOiBUaGVuIHRoZSBzY2hlbWUgb2YgYVJvb3QsIGlmIGFueSwgaXMgcHJlcGVuZGVkXG4gKiAgIGZpcnN0LlxuICogLSBPdGhlcndpc2UgYVBhdGggaXMgYSBwYXRoLiBJZiBhUm9vdCBpcyBhIFVSTCwgdGhlbiBpdHMgcGF0aCBwb3J0aW9uXG4gKiAgIGlzIHVwZGF0ZWQgd2l0aCB0aGUgcmVzdWx0IGFuZCBhUm9vdCBpcyByZXR1cm5lZC4gT3RoZXJ3aXNlIHRoZSByZXN1bHRcbiAqICAgaXMgcmV0dXJuZWQuXG4gKiAgIC0gSWYgYVBhdGggaXMgYWJzb2x1dGUsIHRoZSByZXN1bHQgaXMgYVBhdGguXG4gKiAgIC0gT3RoZXJ3aXNlIHRoZSB0d28gcGF0aHMgYXJlIGpvaW5lZCB3aXRoIGEgc2xhc2guXG4gKiAtIEpvaW5pbmcgZm9yIGV4YW1wbGUgJ2h0dHA6Ly8nIGFuZCAnd3d3LmV4YW1wbGUuY29tJyBpcyBhbHNvIHN1cHBvcnRlZC5cbiAqL1xuZnVuY3Rpb24gam9pbihhUm9vdCwgYVBhdGgpIHtcbiAgaWYgKGFSb290ID09PSBcIlwiKSB7XG4gICAgYVJvb3QgPSBcIi5cIjtcbiAgfVxuICBpZiAoYVBhdGggPT09IFwiXCIpIHtcbiAgICBhUGF0aCA9IFwiLlwiO1xuICB9XG4gIHZhciBhUGF0aFVybCA9IHVybFBhcnNlKGFQYXRoKTtcbiAgdmFyIGFSb290VXJsID0gdXJsUGFyc2UoYVJvb3QpO1xuICBpZiAoYVJvb3RVcmwpIHtcbiAgICBhUm9vdCA9IGFSb290VXJsLnBhdGggfHwgJy8nO1xuICB9XG5cbiAgLy8gYGpvaW4oZm9vLCAnLy93d3cuZXhhbXBsZS5vcmcnKWBcbiAgaWYgKGFQYXRoVXJsICYmICFhUGF0aFVybC5zY2hlbWUpIHtcbiAgICBpZiAoYVJvb3RVcmwpIHtcbiAgICAgIGFQYXRoVXJsLnNjaGVtZSA9IGFSb290VXJsLnNjaGVtZTtcbiAgICB9XG4gICAgcmV0dXJuIHVybEdlbmVyYXRlKGFQYXRoVXJsKTtcbiAgfVxuXG4gIGlmIChhUGF0aFVybCB8fCBhUGF0aC5tYXRjaChkYXRhVXJsUmVnZXhwKSkge1xuICAgIHJldHVybiBhUGF0aDtcbiAgfVxuXG4gIC8vIGBqb2luKCdodHRwOi8vJywgJ3d3dy5leGFtcGxlLmNvbScpYFxuICBpZiAoYVJvb3RVcmwgJiYgIWFSb290VXJsLmhvc3QgJiYgIWFSb290VXJsLnBhdGgpIHtcbiAgICBhUm9vdFVybC5ob3N0ID0gYVBhdGg7XG4gICAgcmV0dXJuIHVybEdlbmVyYXRlKGFSb290VXJsKTtcbiAgfVxuXG4gIHZhciBqb2luZWQgPSBhUGF0aC5jaGFyQXQoMCkgPT09ICcvJ1xuICAgID8gYVBhdGhcbiAgICA6IG5vcm1hbGl6ZShhUm9vdC5yZXBsYWNlKC9cXC8rJC8sICcnKSArICcvJyArIGFQYXRoKTtcblxuICBpZiAoYVJvb3RVcmwpIHtcbiAgICBhUm9vdFVybC5wYXRoID0gam9pbmVkO1xuICAgIHJldHVybiB1cmxHZW5lcmF0ZShhUm9vdFVybCk7XG4gIH1cbiAgcmV0dXJuIGpvaW5lZDtcbn1cbmV4cG9ydHMuam9pbiA9IGpvaW47XG5cbmV4cG9ydHMuaXNBYnNvbHV0ZSA9IGZ1bmN0aW9uIChhUGF0aCkge1xuICByZXR1cm4gYVBhdGguY2hhckF0KDApID09PSAnLycgfHwgISFhUGF0aC5tYXRjaCh1cmxSZWdleHApO1xufTtcblxuLyoqXG4gKiBNYWtlIGEgcGF0aCByZWxhdGl2ZSB0byBhIFVSTCBvciBhbm90aGVyIHBhdGguXG4gKlxuICogQHBhcmFtIGFSb290IFRoZSByb290IHBhdGggb3IgVVJMLlxuICogQHBhcmFtIGFQYXRoIFRoZSBwYXRoIG9yIFVSTCB0byBiZSBtYWRlIHJlbGF0aXZlIHRvIGFSb290LlxuICovXG5mdW5jdGlvbiByZWxhdGl2ZShhUm9vdCwgYVBhdGgpIHtcbiAgaWYgKGFSb290ID09PSBcIlwiKSB7XG4gICAgYVJvb3QgPSBcIi5cIjtcbiAgfVxuXG4gIGFSb290ID0gYVJvb3QucmVwbGFjZSgvXFwvJC8sICcnKTtcblxuICAvLyBJdCBpcyBwb3NzaWJsZSBmb3IgdGhlIHBhdGggdG8gYmUgYWJvdmUgdGhlIHJvb3QuIEluIHRoaXMgY2FzZSwgc2ltcGx5XG4gIC8vIGNoZWNraW5nIHdoZXRoZXIgdGhlIHJvb3QgaXMgYSBwcmVmaXggb2YgdGhlIHBhdGggd29uJ3Qgd29yay4gSW5zdGVhZCwgd2VcbiAgLy8gbmVlZCB0byByZW1vdmUgY29tcG9uZW50cyBmcm9tIHRoZSByb290IG9uZSBieSBvbmUsIHVudGlsIGVpdGhlciB3ZSBmaW5kXG4gIC8vIGEgcHJlZml4IHRoYXQgZml0cywgb3Igd2UgcnVuIG91dCBvZiBjb21wb25lbnRzIHRvIHJlbW92ZS5cbiAgdmFyIGxldmVsID0gMDtcbiAgd2hpbGUgKGFQYXRoLmluZGV4T2YoYVJvb3QgKyAnLycpICE9PSAwKSB7XG4gICAgdmFyIGluZGV4ID0gYVJvb3QubGFzdEluZGV4T2YoXCIvXCIpO1xuICAgIGlmIChpbmRleCA8IDApIHtcbiAgICAgIHJldHVybiBhUGF0aDtcbiAgICB9XG5cbiAgICAvLyBJZiB0aGUgb25seSBwYXJ0IG9mIHRoZSByb290IHRoYXQgaXMgbGVmdCBpcyB0aGUgc2NoZW1lIChpLmUuIGh0dHA6Ly8sXG4gICAgLy8gZmlsZTovLy8sIGV0Yy4pLCBvbmUgb3IgbW9yZSBzbGFzaGVzICgvKSwgb3Igc2ltcGx5IG5vdGhpbmcgYXQgYWxsLCB3ZVxuICAgIC8vIGhhdmUgZXhoYXVzdGVkIGFsbCBjb21wb25lbnRzLCBzbyB0aGUgcGF0aCBpcyBub3QgcmVsYXRpdmUgdG8gdGhlIHJvb3QuXG4gICAgYVJvb3QgPSBhUm9vdC5zbGljZSgwLCBpbmRleCk7XG4gICAgaWYgKGFSb290Lm1hdGNoKC9eKFteXFwvXSs6XFwvKT9cXC8qJC8pKSB7XG4gICAgICByZXR1cm4gYVBhdGg7XG4gICAgfVxuXG4gICAgKytsZXZlbDtcbiAgfVxuXG4gIC8vIE1ha2Ugc3VyZSB3ZSBhZGQgYSBcIi4uL1wiIGZvciBlYWNoIGNvbXBvbmVudCB3ZSByZW1vdmVkIGZyb20gdGhlIHJvb3QuXG4gIHJldHVybiBBcnJheShsZXZlbCArIDEpLmpvaW4oXCIuLi9cIikgKyBhUGF0aC5zdWJzdHIoYVJvb3QubGVuZ3RoICsgMSk7XG59XG5leHBvcnRzLnJlbGF0aXZlID0gcmVsYXRpdmU7XG5cbnZhciBzdXBwb3J0c051bGxQcm90byA9IChmdW5jdGlvbiAoKSB7XG4gIHZhciBvYmogPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICByZXR1cm4gISgnX19wcm90b19fJyBpbiBvYmopO1xufSgpKTtcblxuZnVuY3Rpb24gaWRlbnRpdHkgKHMpIHtcbiAgcmV0dXJuIHM7XG59XG5cbi8qKlxuICogQmVjYXVzZSBiZWhhdmlvciBnb2VzIHdhY2t5IHdoZW4geW91IHNldCBgX19wcm90b19fYCBvbiBvYmplY3RzLCB3ZVxuICogaGF2ZSB0byBwcmVmaXggYWxsIHRoZSBzdHJpbmdzIGluIG91ciBzZXQgd2l0aCBhbiBhcmJpdHJhcnkgY2hhcmFjdGVyLlxuICpcbiAqIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL3B1bGwvMzEgYW5kXG4gKiBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL2lzc3Vlcy8zMFxuICpcbiAqIEBwYXJhbSBTdHJpbmcgYVN0clxuICovXG5mdW5jdGlvbiB0b1NldFN0cmluZyhhU3RyKSB7XG4gIGlmIChpc1Byb3RvU3RyaW5nKGFTdHIpKSB7XG4gICAgcmV0dXJuICckJyArIGFTdHI7XG4gIH1cblxuICByZXR1cm4gYVN0cjtcbn1cbmV4cG9ydHMudG9TZXRTdHJpbmcgPSBzdXBwb3J0c051bGxQcm90byA/IGlkZW50aXR5IDogdG9TZXRTdHJpbmc7XG5cbmZ1bmN0aW9uIGZyb21TZXRTdHJpbmcoYVN0cikge1xuICBpZiAoaXNQcm90b1N0cmluZyhhU3RyKSkge1xuICAgIHJldHVybiBhU3RyLnNsaWNlKDEpO1xuICB9XG5cbiAgcmV0dXJuIGFTdHI7XG59XG5leHBvcnRzLmZyb21TZXRTdHJpbmcgPSBzdXBwb3J0c051bGxQcm90byA/IGlkZW50aXR5IDogZnJvbVNldFN0cmluZztcblxuZnVuY3Rpb24gaXNQcm90b1N0cmluZyhzKSB7XG4gIGlmICghcykge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHZhciBsZW5ndGggPSBzLmxlbmd0aDtcblxuICBpZiAobGVuZ3RoIDwgOSAvKiBcIl9fcHJvdG9fX1wiLmxlbmd0aCAqLykge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIGlmIChzLmNoYXJDb2RlQXQobGVuZ3RoIC0gMSkgIT09IDk1ICAvKiAnXycgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSAyKSAhPT0gOTUgIC8qICdfJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDMpICE9PSAxMTEgLyogJ28nICovIHx8XG4gICAgICBzLmNoYXJDb2RlQXQobGVuZ3RoIC0gNCkgIT09IDExNiAvKiAndCcgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSA1KSAhPT0gMTExIC8qICdvJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDYpICE9PSAxMTQgLyogJ3InICovIHx8XG4gICAgICBzLmNoYXJDb2RlQXQobGVuZ3RoIC0gNykgIT09IDExMiAvKiAncCcgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSA4KSAhPT0gOTUgIC8qICdfJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDkpICE9PSA5NSAgLyogJ18nICovKSB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG5cbiAgZm9yICh2YXIgaSA9IGxlbmd0aCAtIDEwOyBpID49IDA7IGktLSkge1xuICAgIGlmIChzLmNoYXJDb2RlQXQoaSkgIT09IDM2IC8qICckJyAqLykge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB0cnVlO1xufVxuXG4vKipcbiAqIENvbXBhcmF0b3IgYmV0d2VlbiB0d28gbWFwcGluZ3Mgd2hlcmUgdGhlIG9yaWdpbmFsIHBvc2l0aW9ucyBhcmUgY29tcGFyZWQuXG4gKlxuICogT3B0aW9uYWxseSBwYXNzIGluIGB0cnVlYCBhcyBgb25seUNvbXBhcmVHZW5lcmF0ZWRgIHRvIGNvbnNpZGVyIHR3b1xuICogbWFwcGluZ3Mgd2l0aCB0aGUgc2FtZSBvcmlnaW5hbCBzb3VyY2UvbGluZS9jb2x1bW4sIGJ1dCBkaWZmZXJlbnQgZ2VuZXJhdGVkXG4gKiBsaW5lIGFuZCBjb2x1bW4gdGhlIHNhbWUuIFVzZWZ1bCB3aGVuIHNlYXJjaGluZyBmb3IgYSBtYXBwaW5nIHdpdGggYVxuICogc3R1YmJlZCBvdXQgbWFwcGluZy5cbiAqL1xuZnVuY3Rpb24gY29tcGFyZUJ5T3JpZ2luYWxQb3NpdGlvbnMobWFwcGluZ0EsIG1hcHBpbmdCLCBvbmx5Q29tcGFyZU9yaWdpbmFsKSB7XG4gIHZhciBjbXAgPSBtYXBwaW5nQS5zb3VyY2UgLSBtYXBwaW5nQi5zb3VyY2U7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDAgfHwgb25seUNvbXBhcmVPcmlnaW5hbCkge1xuICAgIHJldHVybiBjbXA7XG4gIH1cblxuICBjbXAgPSBtYXBwaW5nQS5nZW5lcmF0ZWRDb2x1bW4gLSBtYXBwaW5nQi5nZW5lcmF0ZWRDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkTGluZSAtIG1hcHBpbmdCLmdlbmVyYXRlZExpbmU7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIG1hcHBpbmdBLm5hbWUgLSBtYXBwaW5nQi5uYW1lO1xufVxuZXhwb3J0cy5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyA9IGNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zO1xuXG4vKipcbiAqIENvbXBhcmF0b3IgYmV0d2VlbiB0d28gbWFwcGluZ3Mgd2l0aCBkZWZsYXRlZCBzb3VyY2UgYW5kIG5hbWUgaW5kaWNlcyB3aGVyZVxuICogdGhlIGdlbmVyYXRlZCBwb3NpdGlvbnMgYXJlIGNvbXBhcmVkLlxuICpcbiAqIE9wdGlvbmFsbHkgcGFzcyBpbiBgdHJ1ZWAgYXMgYG9ubHlDb21wYXJlR2VuZXJhdGVkYCB0byBjb25zaWRlciB0d29cbiAqIG1hcHBpbmdzIHdpdGggdGhlIHNhbWUgZ2VuZXJhdGVkIGxpbmUgYW5kIGNvbHVtbiwgYnV0IGRpZmZlcmVudFxuICogc291cmNlL25hbWUvb3JpZ2luYWwgbGluZSBhbmQgY29sdW1uIHRoZSBzYW1lLiBVc2VmdWwgd2hlbiBzZWFyY2hpbmcgZm9yIGFcbiAqIG1hcHBpbmcgd2l0aCBhIHN0dWJiZWQgb3V0IG1hcHBpbmcuXG4gKi9cbmZ1bmN0aW9uIGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkKG1hcHBpbmdBLCBtYXBwaW5nQiwgb25seUNvbXBhcmVHZW5lcmF0ZWQpIHtcbiAgdmFyIGNtcCA9IG1hcHBpbmdBLmdlbmVyYXRlZExpbmUgLSBtYXBwaW5nQi5nZW5lcmF0ZWRMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLmdlbmVyYXRlZENvbHVtbiAtIG1hcHBpbmdCLmdlbmVyYXRlZENvbHVtbjtcbiAgaWYgKGNtcCAhPT0gMCB8fCBvbmx5Q29tcGFyZUdlbmVyYXRlZCkge1xuICAgIHJldHVybiBjbXA7XG4gIH1cblxuICBjbXAgPSBtYXBwaW5nQS5zb3VyY2UgLSBtYXBwaW5nQi5zb3VyY2U7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIG1hcHBpbmdBLm5hbWUgLSBtYXBwaW5nQi5uYW1lO1xufVxuZXhwb3J0cy5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNEZWZsYXRlZCA9IGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkO1xuXG5mdW5jdGlvbiBzdHJjbXAoYVN0cjEsIGFTdHIyKSB7XG4gIGlmIChhU3RyMSA9PT0gYVN0cjIpIHtcbiAgICByZXR1cm4gMDtcbiAgfVxuXG4gIGlmIChhU3RyMSA+IGFTdHIyKSB7XG4gICAgcmV0dXJuIDE7XG4gIH1cblxuICByZXR1cm4gLTE7XG59XG5cbi8qKlxuICogQ29tcGFyYXRvciBiZXR3ZWVuIHR3byBtYXBwaW5ncyB3aXRoIGluZmxhdGVkIHNvdXJjZSBhbmQgbmFtZSBzdHJpbmdzIHdoZXJlXG4gKiB0aGUgZ2VuZXJhdGVkIHBvc2l0aW9ucyBhcmUgY29tcGFyZWQuXG4gKi9cbmZ1bmN0aW9uIGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0luZmxhdGVkKG1hcHBpbmdBLCBtYXBwaW5nQikge1xuICB2YXIgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkTGluZSAtIG1hcHBpbmdCLmdlbmVyYXRlZExpbmU7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkQ29sdW1uIC0gbWFwcGluZ0IuZ2VuZXJhdGVkQ29sdW1uO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IHN0cmNtcChtYXBwaW5nQS5zb3VyY2UsIG1hcHBpbmdCLnNvdXJjZSk7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIHN0cmNtcChtYXBwaW5nQS5uYW1lLCBtYXBwaW5nQi5uYW1lKTtcbn1cbmV4cG9ydHMuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQgPSBjb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL3V0aWwuanNcbi8vIG1vZHVsZSBpZCA9IDRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIGhhcyA9IE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHk7XG52YXIgaGFzTmF0aXZlTWFwID0gdHlwZW9mIE1hcCAhPT0gXCJ1bmRlZmluZWRcIjtcblxuLyoqXG4gKiBBIGRhdGEgc3RydWN0dXJlIHdoaWNoIGlzIGEgY29tYmluYXRpb24gb2YgYW4gYXJyYXkgYW5kIGEgc2V0LiBBZGRpbmcgYSBuZXdcbiAqIG1lbWJlciBpcyBPKDEpLCB0ZXN0aW5nIGZvciBtZW1iZXJzaGlwIGlzIE8oMSksIGFuZCBmaW5kaW5nIHRoZSBpbmRleCBvZiBhblxuICogZWxlbWVudCBpcyBPKDEpLiBSZW1vdmluZyBlbGVtZW50cyBmcm9tIHRoZSBzZXQgaXMgbm90IHN1cHBvcnRlZC4gT25seVxuICogc3RyaW5ncyBhcmUgc3VwcG9ydGVkIGZvciBtZW1iZXJzaGlwLlxuICovXG5mdW5jdGlvbiBBcnJheVNldCgpIHtcbiAgdGhpcy5fYXJyYXkgPSBbXTtcbiAgdGhpcy5fc2V0ID0gaGFzTmF0aXZlTWFwID8gbmV3IE1hcCgpIDogT2JqZWN0LmNyZWF0ZShudWxsKTtcbn1cblxuLyoqXG4gKiBTdGF0aWMgbWV0aG9kIGZvciBjcmVhdGluZyBBcnJheVNldCBpbnN0YW5jZXMgZnJvbSBhbiBleGlzdGluZyBhcnJheS5cbiAqL1xuQXJyYXlTZXQuZnJvbUFycmF5ID0gZnVuY3Rpb24gQXJyYXlTZXRfZnJvbUFycmF5KGFBcnJheSwgYUFsbG93RHVwbGljYXRlcykge1xuICB2YXIgc2V0ID0gbmV3IEFycmF5U2V0KCk7XG4gIGZvciAodmFyIGkgPSAwLCBsZW4gPSBhQXJyYXkubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcbiAgICBzZXQuYWRkKGFBcnJheVtpXSwgYUFsbG93RHVwbGljYXRlcyk7XG4gIH1cbiAgcmV0dXJuIHNldDtcbn07XG5cbi8qKlxuICogUmV0dXJuIGhvdyBtYW55IHVuaXF1ZSBpdGVtcyBhcmUgaW4gdGhpcyBBcnJheVNldC4gSWYgZHVwbGljYXRlcyBoYXZlIGJlZW5cbiAqIGFkZGVkLCB0aGFuIHRob3NlIGRvIG5vdCBjb3VudCB0b3dhcmRzIHRoZSBzaXplLlxuICpcbiAqIEByZXR1cm5zIE51bWJlclxuICovXG5BcnJheVNldC5wcm90b3R5cGUuc2l6ZSA9IGZ1bmN0aW9uIEFycmF5U2V0X3NpemUoKSB7XG4gIHJldHVybiBoYXNOYXRpdmVNYXAgPyB0aGlzLl9zZXQuc2l6ZSA6IE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzKHRoaXMuX3NldCkubGVuZ3RoO1xufTtcblxuLyoqXG4gKiBBZGQgdGhlIGdpdmVuIHN0cmluZyB0byB0aGlzIHNldC5cbiAqXG4gKiBAcGFyYW0gU3RyaW5nIGFTdHJcbiAqL1xuQXJyYXlTZXQucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIEFycmF5U2V0X2FkZChhU3RyLCBhQWxsb3dEdXBsaWNhdGVzKSB7XG4gIHZhciBzU3RyID0gaGFzTmF0aXZlTWFwID8gYVN0ciA6IHV0aWwudG9TZXRTdHJpbmcoYVN0cik7XG4gIHZhciBpc0R1cGxpY2F0ZSA9IGhhc05hdGl2ZU1hcCA/IHRoaXMuaGFzKGFTdHIpIDogaGFzLmNhbGwodGhpcy5fc2V0LCBzU3RyKTtcbiAgdmFyIGlkeCA9IHRoaXMuX2FycmF5Lmxlbmd0aDtcbiAgaWYgKCFpc0R1cGxpY2F0ZSB8fCBhQWxsb3dEdXBsaWNhdGVzKSB7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhU3RyKTtcbiAgfVxuICBpZiAoIWlzRHVwbGljYXRlKSB7XG4gICAgaWYgKGhhc05hdGl2ZU1hcCkge1xuICAgICAgdGhpcy5fc2V0LnNldChhU3RyLCBpZHgpO1xuICAgIH0gZWxzZSB7XG4gICAgICB0aGlzLl9zZXRbc1N0cl0gPSBpZHg7XG4gICAgfVxuICB9XG59O1xuXG4vKipcbiAqIElzIHRoZSBnaXZlbiBzdHJpbmcgYSBtZW1iZXIgb2YgdGhpcyBzZXQ/XG4gKlxuICogQHBhcmFtIFN0cmluZyBhU3RyXG4gKi9cbkFycmF5U2V0LnByb3RvdHlwZS5oYXMgPSBmdW5jdGlvbiBBcnJheVNldF9oYXMoYVN0cikge1xuICBpZiAoaGFzTmF0aXZlTWFwKSB7XG4gICAgcmV0dXJuIHRoaXMuX3NldC5oYXMoYVN0cik7XG4gIH0gZWxzZSB7XG4gICAgdmFyIHNTdHIgPSB1dGlsLnRvU2V0U3RyaW5nKGFTdHIpO1xuICAgIHJldHVybiBoYXMuY2FsbCh0aGlzLl9zZXQsIHNTdHIpO1xuICB9XG59O1xuXG4vKipcbiAqIFdoYXQgaXMgdGhlIGluZGV4IG9mIHRoZSBnaXZlbiBzdHJpbmcgaW4gdGhlIGFycmF5P1xuICpcbiAqIEBwYXJhbSBTdHJpbmcgYVN0clxuICovXG5BcnJheVNldC5wcm90b3R5cGUuaW5kZXhPZiA9IGZ1bmN0aW9uIEFycmF5U2V0X2luZGV4T2YoYVN0cikge1xuICBpZiAoaGFzTmF0aXZlTWFwKSB7XG4gICAgdmFyIGlkeCA9IHRoaXMuX3NldC5nZXQoYVN0cik7XG4gICAgaWYgKGlkeCA+PSAwKSB7XG4gICAgICAgIHJldHVybiBpZHg7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIHZhciBzU3RyID0gdXRpbC50b1NldFN0cmluZyhhU3RyKTtcbiAgICBpZiAoaGFzLmNhbGwodGhpcy5fc2V0LCBzU3RyKSkge1xuICAgICAgcmV0dXJuIHRoaXMuX3NldFtzU3RyXTtcbiAgICB9XG4gIH1cblxuICB0aHJvdyBuZXcgRXJyb3IoJ1wiJyArIGFTdHIgKyAnXCIgaXMgbm90IGluIHRoZSBzZXQuJyk7XG59O1xuXG4vKipcbiAqIFdoYXQgaXMgdGhlIGVsZW1lbnQgYXQgdGhlIGdpdmVuIGluZGV4P1xuICpcbiAqIEBwYXJhbSBOdW1iZXIgYUlkeFxuICovXG5BcnJheVNldC5wcm90b3R5cGUuYXQgPSBmdW5jdGlvbiBBcnJheVNldF9hdChhSWR4KSB7XG4gIGlmIChhSWR4ID49IDAgJiYgYUlkeCA8IHRoaXMuX2FycmF5Lmxlbmd0aCkge1xuICAgIHJldHVybiB0aGlzLl9hcnJheVthSWR4XTtcbiAgfVxuICB0aHJvdyBuZXcgRXJyb3IoJ05vIGVsZW1lbnQgaW5kZXhlZCBieSAnICsgYUlkeCk7XG59O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIGFycmF5IHJlcHJlc2VudGF0aW9uIG9mIHRoaXMgc2V0ICh3aGljaCBoYXMgdGhlIHByb3BlciBpbmRpY2VzXG4gKiBpbmRpY2F0ZWQgYnkgaW5kZXhPZikuIE5vdGUgdGhhdCB0aGlzIGlzIGEgY29weSBvZiB0aGUgaW50ZXJuYWwgYXJyYXkgdXNlZFxuICogZm9yIHN0b3JpbmcgdGhlIG1lbWJlcnMgc28gdGhhdCBubyBvbmUgY2FuIG1lc3Mgd2l0aCBpbnRlcm5hbCBzdGF0ZS5cbiAqL1xuQXJyYXlTZXQucHJvdG90eXBlLnRvQXJyYXkgPSBmdW5jdGlvbiBBcnJheVNldF90b0FycmF5KCkge1xuICByZXR1cm4gdGhpcy5fYXJyYXkuc2xpY2UoKTtcbn07XG5cbmV4cG9ydHMuQXJyYXlTZXQgPSBBcnJheVNldDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL2FycmF5LXNldC5qc1xuLy8gbW9kdWxlIGlkID0gNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTQgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciB1dGlsID0gcmVxdWlyZSgnLi91dGlsJyk7XG5cbi8qKlxuICogRGV0ZXJtaW5lIHdoZXRoZXIgbWFwcGluZ0IgaXMgYWZ0ZXIgbWFwcGluZ0Egd2l0aCByZXNwZWN0IHRvIGdlbmVyYXRlZFxuICogcG9zaXRpb24uXG4gKi9cbmZ1bmN0aW9uIGdlbmVyYXRlZFBvc2l0aW9uQWZ0ZXIobWFwcGluZ0EsIG1hcHBpbmdCKSB7XG4gIC8vIE9wdGltaXplZCBmb3IgbW9zdCBjb21tb24gY2FzZVxuICB2YXIgbGluZUEgPSBtYXBwaW5nQS5nZW5lcmF0ZWRMaW5lO1xuICB2YXIgbGluZUIgPSBtYXBwaW5nQi5nZW5lcmF0ZWRMaW5lO1xuICB2YXIgY29sdW1uQSA9IG1hcHBpbmdBLmdlbmVyYXRlZENvbHVtbjtcbiAgdmFyIGNvbHVtbkIgPSBtYXBwaW5nQi5nZW5lcmF0ZWRDb2x1bW47XG4gIHJldHVybiBsaW5lQiA+IGxpbmVBIHx8IGxpbmVCID09IGxpbmVBICYmIGNvbHVtbkIgPj0gY29sdW1uQSB8fFxuICAgICAgICAgdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZChtYXBwaW5nQSwgbWFwcGluZ0IpIDw9IDA7XG59XG5cbi8qKlxuICogQSBkYXRhIHN0cnVjdHVyZSB0byBwcm92aWRlIGEgc29ydGVkIHZpZXcgb2YgYWNjdW11bGF0ZWQgbWFwcGluZ3MgaW4gYVxuICogcGVyZm9ybWFuY2UgY29uc2Npb3VzIG1hbm5lci4gSXQgdHJhZGVzIGEgbmVnbGliYWJsZSBvdmVyaGVhZCBpbiBnZW5lcmFsXG4gKiBjYXNlIGZvciBhIGxhcmdlIHNwZWVkdXAgaW4gY2FzZSBvZiBtYXBwaW5ncyBiZWluZyBhZGRlZCBpbiBvcmRlci5cbiAqL1xuZnVuY3Rpb24gTWFwcGluZ0xpc3QoKSB7XG4gIHRoaXMuX2FycmF5ID0gW107XG4gIHRoaXMuX3NvcnRlZCA9IHRydWU7XG4gIC8vIFNlcnZlcyBhcyBpbmZpbXVtXG4gIHRoaXMuX2xhc3QgPSB7Z2VuZXJhdGVkTGluZTogLTEsIGdlbmVyYXRlZENvbHVtbjogMH07XG59XG5cbi8qKlxuICogSXRlcmF0ZSB0aHJvdWdoIGludGVybmFsIGl0ZW1zLiBUaGlzIG1ldGhvZCB0YWtlcyB0aGUgc2FtZSBhcmd1bWVudHMgdGhhdFxuICogYEFycmF5LnByb3RvdHlwZS5mb3JFYWNoYCB0YWtlcy5cbiAqXG4gKiBOT1RFOiBUaGUgb3JkZXIgb2YgdGhlIG1hcHBpbmdzIGlzIE5PVCBndWFyYW50ZWVkLlxuICovXG5NYXBwaW5nTGlzdC5wcm90b3R5cGUudW5zb3J0ZWRGb3JFYWNoID1cbiAgZnVuY3Rpb24gTWFwcGluZ0xpc3RfZm9yRWFjaChhQ2FsbGJhY2ssIGFUaGlzQXJnKSB7XG4gICAgdGhpcy5fYXJyYXkuZm9yRWFjaChhQ2FsbGJhY2ssIGFUaGlzQXJnKTtcbiAgfTtcblxuLyoqXG4gKiBBZGQgdGhlIGdpdmVuIHNvdXJjZSBtYXBwaW5nLlxuICpcbiAqIEBwYXJhbSBPYmplY3QgYU1hcHBpbmdcbiAqL1xuTWFwcGluZ0xpc3QucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIE1hcHBpbmdMaXN0X2FkZChhTWFwcGluZykge1xuICBpZiAoZ2VuZXJhdGVkUG9zaXRpb25BZnRlcih0aGlzLl9sYXN0LCBhTWFwcGluZykpIHtcbiAgICB0aGlzLl9sYXN0ID0gYU1hcHBpbmc7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhTWFwcGluZyk7XG4gIH0gZWxzZSB7XG4gICAgdGhpcy5fc29ydGVkID0gZmFsc2U7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhTWFwcGluZyk7XG4gIH1cbn07XG5cbi8qKlxuICogUmV0dXJucyB0aGUgZmxhdCwgc29ydGVkIGFycmF5IG9mIG1hcHBpbmdzLiBUaGUgbWFwcGluZ3MgYXJlIHNvcnRlZCBieVxuICogZ2VuZXJhdGVkIHBvc2l0aW9uLlxuICpcbiAqIFdBUk5JTkc6IFRoaXMgbWV0aG9kIHJldHVybnMgaW50ZXJuYWwgZGF0YSB3aXRob3V0IGNvcHlpbmcsIGZvclxuICogcGVyZm9ybWFuY2UuIFRoZSByZXR1cm4gdmFsdWUgbXVzdCBOT1QgYmUgbXV0YXRlZCwgYW5kIHNob3VsZCBiZSB0cmVhdGVkIGFzXG4gKiBhbiBpbW11dGFibGUgYm9ycm93LiBJZiB5b3Ugd2FudCB0byB0YWtlIG93bmVyc2hpcCwgeW91IG11c3QgbWFrZSB5b3VyIG93blxuICogY29weS5cbiAqL1xuTWFwcGluZ0xpc3QucHJvdG90eXBlLnRvQXJyYXkgPSBmdW5jdGlvbiBNYXBwaW5nTGlzdF90b0FycmF5KCkge1xuICBpZiAoIXRoaXMuX3NvcnRlZCkge1xuICAgIHRoaXMuX2FycmF5LnNvcnQodXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZCk7XG4gICAgdGhpcy5fc29ydGVkID0gdHJ1ZTtcbiAgfVxuICByZXR1cm4gdGhpcy5fYXJyYXk7XG59O1xuXG5leHBvcnRzLk1hcHBpbmdMaXN0ID0gTWFwcGluZ0xpc3Q7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL2xpYi9tYXBwaW5nLWxpc3QuanNcbi8vIG1vZHVsZSBpZCA9IDZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIGJpbmFyeVNlYXJjaCA9IHJlcXVpcmUoJy4vYmluYXJ5LXNlYXJjaCcpO1xudmFyIEFycmF5U2V0ID0gcmVxdWlyZSgnLi9hcnJheS1zZXQnKS5BcnJheVNldDtcbnZhciBiYXNlNjRWTFEgPSByZXF1aXJlKCcuL2Jhc2U2NC12bHEnKTtcbnZhciBxdWlja1NvcnQgPSByZXF1aXJlKCcuL3F1aWNrLXNvcnQnKS5xdWlja1NvcnQ7XG5cbmZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyKGFTb3VyY2VNYXApIHtcbiAgdmFyIHNvdXJjZU1hcCA9IGFTb3VyY2VNYXA7XG4gIGlmICh0eXBlb2YgYVNvdXJjZU1hcCA9PT0gJ3N0cmluZycpIHtcbiAgICBzb3VyY2VNYXAgPSBKU09OLnBhcnNlKGFTb3VyY2VNYXAucmVwbGFjZSgvXlxcKVxcXVxcfScvLCAnJykpO1xuICB9XG5cbiAgcmV0dXJuIHNvdXJjZU1hcC5zZWN0aW9ucyAhPSBudWxsXG4gICAgPyBuZXcgSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcClcbiAgICA6IG5ldyBCYXNpY1NvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcCk7XG59XG5cblNvdXJjZU1hcENvbnN1bWVyLmZyb21Tb3VyY2VNYXAgPSBmdW5jdGlvbihhU291cmNlTWFwKSB7XG4gIHJldHVybiBCYXNpY1NvdXJjZU1hcENvbnN1bWVyLmZyb21Tb3VyY2VNYXAoYVNvdXJjZU1hcCk7XG59XG5cbi8qKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXBwaW5nIHNwZWMgdGhhdCB3ZSBhcmUgY29uc3VtaW5nLlxuICovXG5Tb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3ZlcnNpb24gPSAzO1xuXG4vLyBgX19nZW5lcmF0ZWRNYXBwaW5nc2AgYW5kIGBfX29yaWdpbmFsTWFwcGluZ3NgIGFyZSBhcnJheXMgdGhhdCBob2xkIHRoZVxuLy8gcGFyc2VkIG1hcHBpbmcgY29vcmRpbmF0ZXMgZnJvbSB0aGUgc291cmNlIG1hcCdzIFwibWFwcGluZ3NcIiBhdHRyaWJ1dGUuIFRoZXlcbi8vIGFyZSBsYXppbHkgaW5zdGFudGlhdGVkLCBhY2Nlc3NlZCB2aWEgdGhlIGBfZ2VuZXJhdGVkTWFwcGluZ3NgIGFuZFxuLy8gYF9vcmlnaW5hbE1hcHBpbmdzYCBnZXR0ZXJzIHJlc3BlY3RpdmVseSwgYW5kIHdlIG9ubHkgcGFyc2UgdGhlIG1hcHBpbmdzXG4vLyBhbmQgY3JlYXRlIHRoZXNlIGFycmF5cyBvbmNlIHF1ZXJpZWQgZm9yIGEgc291cmNlIGxvY2F0aW9uLiBXZSBqdW1wIHRocm91Z2hcbi8vIHRoZXNlIGhvb3BzIGJlY2F1c2UgdGhlcmUgY2FuIGJlIG1hbnkgdGhvdXNhbmRzIG9mIG1hcHBpbmdzLCBhbmQgcGFyc2luZ1xuLy8gdGhlbSBpcyBleHBlbnNpdmUsIHNvIHdlIG9ubHkgd2FudCB0byBkbyBpdCBpZiB3ZSBtdXN0LlxuLy9cbi8vIEVhY2ggb2JqZWN0IGluIHRoZSBhcnJheXMgaXMgb2YgdGhlIGZvcm06XG4vL1xuLy8gICAgIHtcbi8vICAgICAgIGdlbmVyYXRlZExpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIGNvZGUsXG4vLyAgICAgICBnZW5lcmF0ZWRDb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgY29kZSxcbi8vICAgICAgIHNvdXJjZTogVGhlIHBhdGggdG8gdGhlIG9yaWdpbmFsIHNvdXJjZSBmaWxlIHRoYXQgZ2VuZXJhdGVkIHRoaXNcbi8vICAgICAgICAgICAgICAgY2h1bmsgb2YgY29kZSxcbi8vICAgICAgIG9yaWdpbmFsTGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UgdGhhdFxuLy8gICAgICAgICAgICAgICAgICAgICBjb3JyZXNwb25kcyB0byB0aGlzIGNodW5rIG9mIGdlbmVyYXRlZCBjb2RlLFxuLy8gICAgICAgb3JpZ2luYWxDb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UgdGhhdFxuLy8gICAgICAgICAgICAgICAgICAgICAgIGNvcnJlc3BvbmRzIHRvIHRoaXMgY2h1bmsgb2YgZ2VuZXJhdGVkIGNvZGUsXG4vLyAgICAgICBuYW1lOiBUaGUgbmFtZSBvZiB0aGUgb3JpZ2luYWwgc3ltYm9sIHdoaWNoIGdlbmVyYXRlZCB0aGlzIGNodW5rIG9mXG4vLyAgICAgICAgICAgICBjb2RlLlxuLy8gICAgIH1cbi8vXG4vLyBBbGwgcHJvcGVydGllcyBleGNlcHQgZm9yIGBnZW5lcmF0ZWRMaW5lYCBhbmQgYGdlbmVyYXRlZENvbHVtbmAgY2FuIGJlXG4vLyBgbnVsbGAuXG4vL1xuLy8gYF9nZW5lcmF0ZWRNYXBwaW5nc2AgaXMgb3JkZXJlZCBieSB0aGUgZ2VuZXJhdGVkIHBvc2l0aW9ucy5cbi8vXG4vLyBgX29yaWdpbmFsTWFwcGluZ3NgIGlzIG9yZGVyZWQgYnkgdGhlIG9yaWdpbmFsIHBvc2l0aW9ucy5cblxuU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBudWxsO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSwgJ19nZW5lcmF0ZWRNYXBwaW5ncycsIHtcbiAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgaWYgKCF0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MpIHtcbiAgICAgIHRoaXMuX3BhcnNlTWFwcGluZ3ModGhpcy5fbWFwcGluZ3MsIHRoaXMuc291cmNlUm9vdCk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5ncztcbiAgfVxufSk7XG5cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fX29yaWdpbmFsTWFwcGluZ3MgPSBudWxsO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSwgJ19vcmlnaW5hbE1hcHBpbmdzJywge1xuICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICBpZiAoIXRoaXMuX19vcmlnaW5hbE1hcHBpbmdzKSB7XG4gICAgICB0aGlzLl9wYXJzZU1hcHBpbmdzKHRoaXMuX21hcHBpbmdzLCB0aGlzLnNvdXJjZVJvb3QpO1xuICAgIH1cblxuICAgIHJldHVybiB0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncztcbiAgfVxufSk7XG5cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fY2hhcklzTWFwcGluZ1NlcGFyYXRvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2NoYXJJc01hcHBpbmdTZXBhcmF0b3IoYVN0ciwgaW5kZXgpIHtcbiAgICB2YXIgYyA9IGFTdHIuY2hhckF0KGluZGV4KTtcbiAgICByZXR1cm4gYyA9PT0gXCI7XCIgfHwgYyA9PT0gXCIsXCI7XG4gIH07XG5cbi8qKlxuICogUGFyc2UgdGhlIG1hcHBpbmdzIGluIGEgc3RyaW5nIGluIHRvIGEgZGF0YSBzdHJ1Y3R1cmUgd2hpY2ggd2UgY2FuIGVhc2lseVxuICogcXVlcnkgKHRoZSBvcmRlcmVkIGFycmF5cyBpbiB0aGUgYHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5nc2AgYW5kXG4gKiBgdGhpcy5fX29yaWdpbmFsTWFwcGluZ3NgIHByb3BlcnRpZXMpLlxuICovXG5Tb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9wYXJzZU1hcHBpbmdzKGFTdHIsIGFTb3VyY2VSb290KSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKFwiU3ViY2xhc3NlcyBtdXN0IGltcGxlbWVudCBfcGFyc2VNYXBwaW5nc1wiKTtcbiAgfTtcblxuU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSID0gMTtcblNvdXJjZU1hcENvbnN1bWVyLk9SSUdJTkFMX09SREVSID0gMjtcblxuU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQgPSAxO1xuU291cmNlTWFwQ29uc3VtZXIuTEVBU1RfVVBQRVJfQk9VTkQgPSAyO1xuXG4vKipcbiAqIEl0ZXJhdGUgb3ZlciBlYWNoIG1hcHBpbmcgYmV0d2VlbiBhbiBvcmlnaW5hbCBzb3VyY2UvbGluZS9jb2x1bW4gYW5kIGFcbiAqIGdlbmVyYXRlZCBsaW5lL2NvbHVtbiBpbiB0aGlzIHNvdXJjZSBtYXAuXG4gKlxuICogQHBhcmFtIEZ1bmN0aW9uIGFDYWxsYmFja1xuICogICAgICAgIFRoZSBmdW5jdGlvbiB0aGF0IGlzIGNhbGxlZCB3aXRoIGVhY2ggbWFwcGluZy5cbiAqIEBwYXJhbSBPYmplY3QgYUNvbnRleHRcbiAqICAgICAgICBPcHRpb25hbC4gSWYgc3BlY2lmaWVkLCB0aGlzIG9iamVjdCB3aWxsIGJlIHRoZSB2YWx1ZSBvZiBgdGhpc2AgZXZlcnlcbiAqICAgICAgICB0aW1lIHRoYXQgYGFDYWxsYmFja2AgaXMgY2FsbGVkLlxuICogQHBhcmFtIGFPcmRlclxuICogICAgICAgIEVpdGhlciBgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSYCBvclxuICogICAgICAgIGBTb3VyY2VNYXBDb25zdW1lci5PUklHSU5BTF9PUkRFUmAuIFNwZWNpZmllcyB3aGV0aGVyIHlvdSB3YW50IHRvXG4gKiAgICAgICAgaXRlcmF0ZSBvdmVyIHRoZSBtYXBwaW5ncyBzb3J0ZWQgYnkgdGhlIGdlbmVyYXRlZCBmaWxlJ3MgbGluZS9jb2x1bW5cbiAqICAgICAgICBvcmRlciBvciB0aGUgb3JpZ2luYWwncyBzb3VyY2UvbGluZS9jb2x1bW4gb3JkZXIsIHJlc3BlY3RpdmVseS4gRGVmYXVsdHMgdG9cbiAqICAgICAgICBgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSYC5cbiAqL1xuU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmVhY2hNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfZWFjaE1hcHBpbmcoYUNhbGxiYWNrLCBhQ29udGV4dCwgYU9yZGVyKSB7XG4gICAgdmFyIGNvbnRleHQgPSBhQ29udGV4dCB8fCBudWxsO1xuICAgIHZhciBvcmRlciA9IGFPcmRlciB8fCBTb3VyY2VNYXBDb25zdW1lci5HRU5FUkFURURfT1JERVI7XG5cbiAgICB2YXIgbWFwcGluZ3M7XG4gICAgc3dpdGNoIChvcmRlcikge1xuICAgIGNhc2UgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSOlxuICAgICAgbWFwcGluZ3MgPSB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5ncztcbiAgICAgIGJyZWFrO1xuICAgIGNhc2UgU291cmNlTWFwQ29uc3VtZXIuT1JJR0lOQUxfT1JERVI6XG4gICAgICBtYXBwaW5ncyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3M7XG4gICAgICBicmVhaztcbiAgICBkZWZhdWx0OlxuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiVW5rbm93biBvcmRlciBvZiBpdGVyYXRpb24uXCIpO1xuICAgIH1cblxuICAgIHZhciBzb3VyY2VSb290ID0gdGhpcy5zb3VyY2VSb290O1xuICAgIG1hcHBpbmdzLm1hcChmdW5jdGlvbiAobWFwcGluZykge1xuICAgICAgdmFyIHNvdXJjZSA9IG1hcHBpbmcuc291cmNlID09PSBudWxsID8gbnVsbCA6IHRoaXMuX3NvdXJjZXMuYXQobWFwcGluZy5zb3VyY2UpO1xuICAgICAgaWYgKHNvdXJjZSAhPSBudWxsICYmIHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4oc291cmNlUm9vdCwgc291cmNlKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiB7XG4gICAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgICBnZW5lcmF0ZWRMaW5lOiBtYXBwaW5nLmdlbmVyYXRlZExpbmUsXG4gICAgICAgIGdlbmVyYXRlZENvbHVtbjogbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4sXG4gICAgICAgIG9yaWdpbmFsTGluZTogbWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgIG9yaWdpbmFsQ29sdW1uOiBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uLFxuICAgICAgICBuYW1lOiBtYXBwaW5nLm5hbWUgPT09IG51bGwgPyBudWxsIDogdGhpcy5fbmFtZXMuYXQobWFwcGluZy5uYW1lKVxuICAgICAgfTtcbiAgICB9LCB0aGlzKS5mb3JFYWNoKGFDYWxsYmFjaywgY29udGV4dCk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJucyBhbGwgZ2VuZXJhdGVkIGxpbmUgYW5kIGNvbHVtbiBpbmZvcm1hdGlvbiBmb3IgdGhlIG9yaWdpbmFsIHNvdXJjZSxcbiAqIGxpbmUsIGFuZCBjb2x1bW4gcHJvdmlkZWQuIElmIG5vIGNvbHVtbiBpcyBwcm92aWRlZCwgcmV0dXJucyBhbGwgbWFwcGluZ3NcbiAqIGNvcnJlc3BvbmRpbmcgdG8gYSBlaXRoZXIgdGhlIGxpbmUgd2UgYXJlIHNlYXJjaGluZyBmb3Igb3IgdGhlIG5leHRcbiAqIGNsb3Nlc3QgbGluZSB0aGF0IGhhcyBhbnkgbWFwcGluZ3MuIE90aGVyd2lzZSwgcmV0dXJucyBhbGwgbWFwcGluZ3NcbiAqIGNvcnJlc3BvbmRpbmcgdG8gdGhlIGdpdmVuIGxpbmUgYW5kIGVpdGhlciB0aGUgY29sdW1uIHdlIGFyZSBzZWFyY2hpbmcgZm9yXG4gKiBvciB0aGUgbmV4dCBjbG9zZXN0IGNvbHVtbiB0aGF0IGhhcyBhbnkgb2Zmc2V0cy5cbiAqXG4gKiBUaGUgb25seSBhcmd1bWVudCBpcyBhbiBvYmplY3Qgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBPcHRpb25hbC4gdGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIG9yaWdpbmFsIHNvdXJjZS5cbiAqXG4gKiBhbmQgYW4gYXJyYXkgb2Ygb2JqZWN0cyBpcyByZXR1cm5lZCwgZWFjaCB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UsIG9yIG51bGwuXG4gKi9cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5hbGxHZW5lcmF0ZWRQb3NpdGlvbnNGb3IgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9hbGxHZW5lcmF0ZWRQb3NpdGlvbnNGb3IoYUFyZ3MpIHtcbiAgICB2YXIgbGluZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnbGluZScpO1xuXG4gICAgLy8gV2hlbiB0aGVyZSBpcyBubyBleGFjdCBtYXRjaCwgQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX2ZpbmRNYXBwaW5nXG4gICAgLy8gcmV0dXJucyB0aGUgaW5kZXggb2YgdGhlIGNsb3Nlc3QgbWFwcGluZyBsZXNzIHRoYW4gdGhlIG5lZWRsZS4gQnlcbiAgICAvLyBzZXR0aW5nIG5lZWRsZS5vcmlnaW5hbENvbHVtbiB0byAwLCB3ZSB0aHVzIGZpbmQgdGhlIGxhc3QgbWFwcGluZyBmb3JcbiAgICAvLyB0aGUgZ2l2ZW4gbGluZSwgcHJvdmlkZWQgc3VjaCBhIG1hcHBpbmcgZXhpc3RzLlxuICAgIHZhciBuZWVkbGUgPSB7XG4gICAgICBzb3VyY2U6IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJyksXG4gICAgICBvcmlnaW5hbExpbmU6IGxpbmUsXG4gICAgICBvcmlnaW5hbENvbHVtbjogdXRpbC5nZXRBcmcoYUFyZ3MsICdjb2x1bW4nLCAwKVxuICAgIH07XG5cbiAgICBpZiAodGhpcy5zb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgIG5lZWRsZS5zb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHRoaXMuc291cmNlUm9vdCwgbmVlZGxlLnNvdXJjZSk7XG4gICAgfVxuICAgIGlmICghdGhpcy5fc291cmNlcy5oYXMobmVlZGxlLnNvdXJjZSkpIHtcbiAgICAgIHJldHVybiBbXTtcbiAgICB9XG4gICAgbmVlZGxlLnNvdXJjZSA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihuZWVkbGUuc291cmNlKTtcblxuICAgIHZhciBtYXBwaW5ncyA9IFtdO1xuXG4gICAgdmFyIGluZGV4ID0gdGhpcy5fZmluZE1hcHBpbmcobmVlZGxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX29yaWdpbmFsTWFwcGluZ3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJvcmlnaW5hbExpbmVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9yaWdpbmFsQ29sdW1uXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXRpbC5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5hcnlTZWFyY2guTEVBU1RfVVBQRVJfQk9VTkQpO1xuICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3NbaW5kZXhdO1xuXG4gICAgICBpZiAoYUFyZ3MuY29sdW1uID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgdmFyIG9yaWdpbmFsTGluZSA9IG1hcHBpbmcub3JpZ2luYWxMaW5lO1xuXG4gICAgICAgIC8vIEl0ZXJhdGUgdW50aWwgZWl0aGVyIHdlIHJ1biBvdXQgb2YgbWFwcGluZ3MsIG9yIHdlIHJ1biBpbnRvXG4gICAgICAgIC8vIGEgbWFwcGluZyBmb3IgYSBkaWZmZXJlbnQgbGluZSB0aGFuIHRoZSBvbmUgd2UgZm91bmQuIFNpbmNlXG4gICAgICAgIC8vIG1hcHBpbmdzIGFyZSBzb3J0ZWQsIHRoaXMgaXMgZ3VhcmFudGVlZCB0byBmaW5kIGFsbCBtYXBwaW5ncyBmb3JcbiAgICAgICAgLy8gdGhlIGxpbmUgd2UgZm91bmQuXG4gICAgICAgIHdoaWxlIChtYXBwaW5nICYmIG1hcHBpbmcub3JpZ2luYWxMaW5lID09PSBvcmlnaW5hbExpbmUpIHtcbiAgICAgICAgICBtYXBwaW5ncy5wdXNoKHtcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRMaW5lJywgbnVsbCksXG4gICAgICAgICAgICBjb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRDb2x1bW4nLCBudWxsKSxcbiAgICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIG1hcHBpbmcgPSB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzWysraW5kZXhdO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgb3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIC8vIEl0ZXJhdGUgdW50aWwgZWl0aGVyIHdlIHJ1biBvdXQgb2YgbWFwcGluZ3MsIG9yIHdlIHJ1biBpbnRvXG4gICAgICAgIC8vIGEgbWFwcGluZyBmb3IgYSBkaWZmZXJlbnQgbGluZSB0aGFuIHRoZSBvbmUgd2Ugd2VyZSBzZWFyY2hpbmcgZm9yLlxuICAgICAgICAvLyBTaW5jZSBtYXBwaW5ncyBhcmUgc29ydGVkLCB0aGlzIGlzIGd1YXJhbnRlZWQgdG8gZmluZCBhbGwgbWFwcGluZ3MgZm9yXG4gICAgICAgIC8vIHRoZSBsaW5lIHdlIGFyZSBzZWFyY2hpbmcgZm9yLlxuICAgICAgICB3aGlsZSAobWFwcGluZyAmJlxuICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09IGxpbmUgJiZcbiAgICAgICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxDb2x1bW4gPT0gb3JpZ2luYWxDb2x1bW4pIHtcbiAgICAgICAgICBtYXBwaW5ncy5wdXNoKHtcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRMaW5lJywgbnVsbCksXG4gICAgICAgICAgICBjb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRDb2x1bW4nLCBudWxsKSxcbiAgICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIG1hcHBpbmcgPSB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzWysraW5kZXhdO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIG1hcHBpbmdzO1xuICB9O1xuXG5leHBvcnRzLlNvdXJjZU1hcENvbnN1bWVyID0gU291cmNlTWFwQ29uc3VtZXI7XG5cbi8qKlxuICogQSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyIGluc3RhbmNlIHJlcHJlc2VudHMgYSBwYXJzZWQgc291cmNlIG1hcCB3aGljaCB3ZSBjYW5cbiAqIHF1ZXJ5IGZvciBpbmZvcm1hdGlvbiBhYm91dCB0aGUgb3JpZ2luYWwgZmlsZSBwb3NpdGlvbnMgYnkgZ2l2aW5nIGl0IGEgZmlsZVxuICogcG9zaXRpb24gaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UuXG4gKlxuICogVGhlIG9ubHkgcGFyYW1ldGVyIGlzIHRoZSByYXcgc291cmNlIG1hcCAoZWl0aGVyIGFzIGEgSlNPTiBzdHJpbmcsIG9yXG4gKiBhbHJlYWR5IHBhcnNlZCB0byBhbiBvYmplY3QpLiBBY2NvcmRpbmcgdG8gdGhlIHNwZWMsIHNvdXJjZSBtYXBzIGhhdmUgdGhlXG4gKiBmb2xsb3dpbmcgYXR0cmlidXRlczpcbiAqXG4gKiAgIC0gdmVyc2lvbjogV2hpY2ggdmVyc2lvbiBvZiB0aGUgc291cmNlIG1hcCBzcGVjIHRoaXMgbWFwIGlzIGZvbGxvd2luZy5cbiAqICAgLSBzb3VyY2VzOiBBbiBhcnJheSBvZiBVUkxzIHRvIHRoZSBvcmlnaW5hbCBzb3VyY2UgZmlsZXMuXG4gKiAgIC0gbmFtZXM6IEFuIGFycmF5IG9mIGlkZW50aWZpZXJzIHdoaWNoIGNhbiBiZSByZWZlcnJlbmNlZCBieSBpbmRpdmlkdWFsIG1hcHBpbmdzLlxuICogICAtIHNvdXJjZVJvb3Q6IE9wdGlvbmFsLiBUaGUgVVJMIHJvb3QgZnJvbSB3aGljaCBhbGwgc291cmNlcyBhcmUgcmVsYXRpdmUuXG4gKiAgIC0gc291cmNlc0NvbnRlbnQ6IE9wdGlvbmFsLiBBbiBhcnJheSBvZiBjb250ZW50cyBvZiB0aGUgb3JpZ2luYWwgc291cmNlIGZpbGVzLlxuICogICAtIG1hcHBpbmdzOiBBIHN0cmluZyBvZiBiYXNlNjQgVkxRcyB3aGljaCBjb250YWluIHRoZSBhY3R1YWwgbWFwcGluZ3MuXG4gKiAgIC0gZmlsZTogT3B0aW9uYWwuIFRoZSBnZW5lcmF0ZWQgZmlsZSB0aGlzIHNvdXJjZSBtYXAgaXMgYXNzb2NpYXRlZCB3aXRoLlxuICpcbiAqIEhlcmUgaXMgYW4gZXhhbXBsZSBzb3VyY2UgbWFwLCB0YWtlbiBmcm9tIHRoZSBzb3VyY2UgbWFwIHNwZWNbMF06XG4gKlxuICogICAgIHtcbiAqICAgICAgIHZlcnNpb24gOiAzLFxuICogICAgICAgZmlsZTogXCJvdXQuanNcIixcbiAqICAgICAgIHNvdXJjZVJvb3QgOiBcIlwiLFxuICogICAgICAgc291cmNlczogW1wiZm9vLmpzXCIsIFwiYmFyLmpzXCJdLFxuICogICAgICAgbmFtZXM6IFtcInNyY1wiLCBcIm1hcHNcIiwgXCJhcmVcIiwgXCJmdW5cIl0sXG4gKiAgICAgICBtYXBwaW5nczogXCJBQSxBQjs7QUJDREU7XCJcbiAqICAgICB9XG4gKlxuICogWzBdOiBodHRwczovL2RvY3MuZ29vZ2xlLmNvbS9kb2N1bWVudC9kLzFVMVJHQWVoUXdSeXBVVG92RjFLUmxwaU9GemUwYi1fMmdjNmZBSDBLWTBrL2VkaXQ/cGxpPTEjXG4gKi9cbmZ1bmN0aW9uIEJhc2ljU291cmNlTWFwQ29uc3VtZXIoYVNvdXJjZU1hcCkge1xuICB2YXIgc291cmNlTWFwID0gYVNvdXJjZU1hcDtcbiAgaWYgKHR5cGVvZiBhU291cmNlTWFwID09PSAnc3RyaW5nJykge1xuICAgIHNvdXJjZU1hcCA9IEpTT04ucGFyc2UoYVNvdXJjZU1hcC5yZXBsYWNlKC9eXFwpXFxdXFx9Jy8sICcnKSk7XG4gIH1cblxuICB2YXIgdmVyc2lvbiA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ3ZlcnNpb24nKTtcbiAgdmFyIHNvdXJjZXMgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdzb3VyY2VzJyk7XG4gIC8vIFNhc3MgMy4zIGxlYXZlcyBvdXQgdGhlICduYW1lcycgYXJyYXksIHNvIHdlIGRldmlhdGUgZnJvbSB0aGUgc3BlYyAod2hpY2hcbiAgLy8gcmVxdWlyZXMgdGhlIGFycmF5KSB0byBwbGF5IG5pY2UgaGVyZS5cbiAgdmFyIG5hbWVzID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnbmFtZXMnLCBbXSk7XG4gIHZhciBzb3VyY2VSb290ID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnc291cmNlUm9vdCcsIG51bGwpO1xuICB2YXIgc291cmNlc0NvbnRlbnQgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdzb3VyY2VzQ29udGVudCcsIG51bGwpO1xuICB2YXIgbWFwcGluZ3MgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdtYXBwaW5ncycpO1xuICB2YXIgZmlsZSA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ2ZpbGUnLCBudWxsKTtcblxuICAvLyBPbmNlIGFnYWluLCBTYXNzIGRldmlhdGVzIGZyb20gdGhlIHNwZWMgYW5kIHN1cHBsaWVzIHRoZSB2ZXJzaW9uIGFzIGFcbiAgLy8gc3RyaW5nIHJhdGhlciB0aGFuIGEgbnVtYmVyLCBzbyB3ZSB1c2UgbG9vc2UgZXF1YWxpdHkgY2hlY2tpbmcgaGVyZS5cbiAgaWYgKHZlcnNpb24gIT0gdGhpcy5fdmVyc2lvbikge1xuICAgIHRocm93IG5ldyBFcnJvcignVW5zdXBwb3J0ZWQgdmVyc2lvbjogJyArIHZlcnNpb24pO1xuICB9XG5cbiAgc291cmNlcyA9IHNvdXJjZXNcbiAgICAubWFwKFN0cmluZylcbiAgICAvLyBTb21lIHNvdXJjZSBtYXBzIHByb2R1Y2UgcmVsYXRpdmUgc291cmNlIHBhdGhzIGxpa2UgXCIuL2Zvby5qc1wiIGluc3RlYWQgb2ZcbiAgICAvLyBcImZvby5qc1wiLiAgTm9ybWFsaXplIHRoZXNlIGZpcnN0IHNvIHRoYXQgZnV0dXJlIGNvbXBhcmlzb25zIHdpbGwgc3VjY2VlZC5cbiAgICAvLyBTZWUgYnVnemlsLmxhLzEwOTA3NjguXG4gICAgLm1hcCh1dGlsLm5vcm1hbGl6ZSlcbiAgICAvLyBBbHdheXMgZW5zdXJlIHRoYXQgYWJzb2x1dGUgc291cmNlcyBhcmUgaW50ZXJuYWxseSBzdG9yZWQgcmVsYXRpdmUgdG9cbiAgICAvLyB0aGUgc291cmNlIHJvb3QsIGlmIHRoZSBzb3VyY2Ugcm9vdCBpcyBhYnNvbHV0ZS4gTm90IGRvaW5nIHRoaXMgd291bGRcbiAgICAvLyBiZSBwYXJ0aWN1bGFybHkgcHJvYmxlbWF0aWMgd2hlbiB0aGUgc291cmNlIHJvb3QgaXMgYSBwcmVmaXggb2YgdGhlXG4gICAgLy8gc291cmNlICh2YWxpZCwgYnV0IHdoeT8/KS4gU2VlIGdpdGh1YiBpc3N1ZSAjMTk5IGFuZCBidWd6aWwubGEvMTE4ODk4Mi5cbiAgICAubWFwKGZ1bmN0aW9uIChzb3VyY2UpIHtcbiAgICAgIHJldHVybiBzb3VyY2VSb290ICYmIHV0aWwuaXNBYnNvbHV0ZShzb3VyY2VSb290KSAmJiB1dGlsLmlzQWJzb2x1dGUoc291cmNlKVxuICAgICAgICA/IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgc291cmNlKVxuICAgICAgICA6IHNvdXJjZTtcbiAgICB9KTtcblxuICAvLyBQYXNzIGB0cnVlYCBiZWxvdyB0byBhbGxvdyBkdXBsaWNhdGUgbmFtZXMgYW5kIHNvdXJjZXMuIFdoaWxlIHNvdXJjZSBtYXBzXG4gIC8vIGFyZSBpbnRlbmRlZCB0byBiZSBjb21wcmVzc2VkIGFuZCBkZWR1cGxpY2F0ZWQsIHRoZSBUeXBlU2NyaXB0IGNvbXBpbGVyXG4gIC8vIHNvbWV0aW1lcyBnZW5lcmF0ZXMgc291cmNlIG1hcHMgd2l0aCBkdXBsaWNhdGVzIGluIHRoZW0uIFNlZSBHaXRodWIgaXNzdWVcbiAgLy8gIzcyIGFuZCBidWd6aWwubGEvODg5NDkyLlxuICB0aGlzLl9uYW1lcyA9IEFycmF5U2V0LmZyb21BcnJheShuYW1lcy5tYXAoU3RyaW5nKSwgdHJ1ZSk7XG4gIHRoaXMuX3NvdXJjZXMgPSBBcnJheVNldC5mcm9tQXJyYXkoc291cmNlcywgdHJ1ZSk7XG5cbiAgdGhpcy5zb3VyY2VSb290ID0gc291cmNlUm9vdDtcbiAgdGhpcy5zb3VyY2VzQ29udGVudCA9IHNvdXJjZXNDb250ZW50O1xuICB0aGlzLl9tYXBwaW5ncyA9IG1hcHBpbmdzO1xuICB0aGlzLmZpbGUgPSBmaWxlO1xufVxuXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlKTtcbkJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmNvbnN1bWVyID0gU291cmNlTWFwQ29uc3VtZXI7XG5cbi8qKlxuICogQ3JlYXRlIGEgQmFzaWNTb3VyY2VNYXBDb25zdW1lciBmcm9tIGEgU291cmNlTWFwR2VuZXJhdG9yLlxuICpcbiAqIEBwYXJhbSBTb3VyY2VNYXBHZW5lcmF0b3IgYVNvdXJjZU1hcFxuICogICAgICAgIFRoZSBzb3VyY2UgbWFwIHRoYXQgd2lsbCBiZSBjb25zdW1lZC5cbiAqIEByZXR1cm5zIEJhc2ljU291cmNlTWFwQ29uc3VtZXJcbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5mcm9tU291cmNlTWFwID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfZnJvbVNvdXJjZU1hcChhU291cmNlTWFwKSB7XG4gICAgdmFyIHNtYyA9IE9iamVjdC5jcmVhdGUoQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUpO1xuXG4gICAgdmFyIG5hbWVzID0gc21jLl9uYW1lcyA9IEFycmF5U2V0LmZyb21BcnJheShhU291cmNlTWFwLl9uYW1lcy50b0FycmF5KCksIHRydWUpO1xuICAgIHZhciBzb3VyY2VzID0gc21jLl9zb3VyY2VzID0gQXJyYXlTZXQuZnJvbUFycmF5KGFTb3VyY2VNYXAuX3NvdXJjZXMudG9BcnJheSgpLCB0cnVlKTtcbiAgICBzbWMuc291cmNlUm9vdCA9IGFTb3VyY2VNYXAuX3NvdXJjZVJvb3Q7XG4gICAgc21jLnNvdXJjZXNDb250ZW50ID0gYVNvdXJjZU1hcC5fZ2VuZXJhdGVTb3VyY2VzQ29udGVudChzbWMuX3NvdXJjZXMudG9BcnJheSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc21jLnNvdXJjZVJvb3QpO1xuICAgIHNtYy5maWxlID0gYVNvdXJjZU1hcC5fZmlsZTtcblxuICAgIC8vIEJlY2F1c2Ugd2UgYXJlIG1vZGlmeWluZyB0aGUgZW50cmllcyAoYnkgY29udmVydGluZyBzdHJpbmcgc291cmNlcyBhbmRcbiAgICAvLyBuYW1lcyB0byBpbmRpY2VzIGludG8gdGhlIHNvdXJjZXMgYW5kIG5hbWVzIEFycmF5U2V0cyksIHdlIGhhdmUgdG8gbWFrZVxuICAgIC8vIGEgY29weSBvZiB0aGUgZW50cnkgb3IgZWxzZSBiYWQgdGhpbmdzIGhhcHBlbi4gU2hhcmVkIG11dGFibGUgc3RhdGVcbiAgICAvLyBzdHJpa2VzIGFnYWluISBTZWUgZ2l0aHViIGlzc3VlICMxOTEuXG5cbiAgICB2YXIgZ2VuZXJhdGVkTWFwcGluZ3MgPSBhU291cmNlTWFwLl9tYXBwaW5ncy50b0FycmF5KCkuc2xpY2UoKTtcbiAgICB2YXIgZGVzdEdlbmVyYXRlZE1hcHBpbmdzID0gc21jLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBbXTtcbiAgICB2YXIgZGVzdE9yaWdpbmFsTWFwcGluZ3MgPSBzbWMuX19vcmlnaW5hbE1hcHBpbmdzID0gW107XG5cbiAgICBmb3IgKHZhciBpID0gMCwgbGVuZ3RoID0gZ2VuZXJhdGVkTWFwcGluZ3MubGVuZ3RoOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgIHZhciBzcmNNYXBwaW5nID0gZ2VuZXJhdGVkTWFwcGluZ3NbaV07XG4gICAgICB2YXIgZGVzdE1hcHBpbmcgPSBuZXcgTWFwcGluZztcbiAgICAgIGRlc3RNYXBwaW5nLmdlbmVyYXRlZExpbmUgPSBzcmNNYXBwaW5nLmdlbmVyYXRlZExpbmU7XG4gICAgICBkZXN0TWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4gPSBzcmNNYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgaWYgKHNyY01hcHBpbmcuc291cmNlKSB7XG4gICAgICAgIGRlc3RNYXBwaW5nLnNvdXJjZSA9IHNvdXJjZXMuaW5kZXhPZihzcmNNYXBwaW5nLnNvdXJjZSk7XG4gICAgICAgIGRlc3RNYXBwaW5nLm9yaWdpbmFsTGluZSA9IHNyY01hcHBpbmcub3JpZ2luYWxMaW5lO1xuICAgICAgICBkZXN0TWFwcGluZy5vcmlnaW5hbENvbHVtbiA9IHNyY01hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgaWYgKHNyY01hcHBpbmcubmFtZSkge1xuICAgICAgICAgIGRlc3RNYXBwaW5nLm5hbWUgPSBuYW1lcy5pbmRleE9mKHNyY01hcHBpbmcubmFtZSk7XG4gICAgICAgIH1cblxuICAgICAgICBkZXN0T3JpZ2luYWxNYXBwaW5ncy5wdXNoKGRlc3RNYXBwaW5nKTtcbiAgICAgIH1cblxuICAgICAgZGVzdEdlbmVyYXRlZE1hcHBpbmdzLnB1c2goZGVzdE1hcHBpbmcpO1xuICAgIH1cblxuICAgIHF1aWNrU29ydChzbWMuX19vcmlnaW5hbE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zKTtcblxuICAgIHJldHVybiBzbWM7XG4gIH07XG5cbi8qKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXBwaW5nIHNwZWMgdGhhdCB3ZSBhcmUgY29uc3VtaW5nLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogVGhlIGxpc3Qgb2Ygb3JpZ2luYWwgc291cmNlcy5cbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KEJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLCAnc291cmNlcycsIHtcbiAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgcmV0dXJuIHRoaXMuX3NvdXJjZXMudG9BcnJheSgpLm1hcChmdW5jdGlvbiAocykge1xuICAgICAgcmV0dXJuIHRoaXMuc291cmNlUm9vdCAhPSBudWxsID8gdXRpbC5qb2luKHRoaXMuc291cmNlUm9vdCwgcykgOiBzO1xuICAgIH0sIHRoaXMpO1xuICB9XG59KTtcblxuLyoqXG4gKiBQcm92aWRlIHRoZSBKSVQgd2l0aCBhIG5pY2Ugc2hhcGUgLyBoaWRkZW4gY2xhc3MuXG4gKi9cbmZ1bmN0aW9uIE1hcHBpbmcoKSB7XG4gIHRoaXMuZ2VuZXJhdGVkTGluZSA9IDA7XG4gIHRoaXMuZ2VuZXJhdGVkQ29sdW1uID0gMDtcbiAgdGhpcy5zb3VyY2UgPSBudWxsO1xuICB0aGlzLm9yaWdpbmFsTGluZSA9IG51bGw7XG4gIHRoaXMub3JpZ2luYWxDb2x1bW4gPSBudWxsO1xuICB0aGlzLm5hbWUgPSBudWxsO1xufVxuXG4vKipcbiAqIFBhcnNlIHRoZSBtYXBwaW5ncyBpbiBhIHN0cmluZyBpbiB0byBhIGRhdGEgc3RydWN0dXJlIHdoaWNoIHdlIGNhbiBlYXNpbHlcbiAqIHF1ZXJ5ICh0aGUgb3JkZXJlZCBhcnJheXMgaW4gdGhlIGB0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3NgIGFuZFxuICogYHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzYCBwcm9wZXJ0aWVzKS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9wYXJzZU1hcHBpbmdzKGFTdHIsIGFTb3VyY2VSb290KSB7XG4gICAgdmFyIGdlbmVyYXRlZExpbmUgPSAxO1xuICAgIHZhciBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IDA7XG4gICAgdmFyIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gMDtcbiAgICB2YXIgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IDA7XG4gICAgdmFyIHByZXZpb3VzU291cmNlID0gMDtcbiAgICB2YXIgcHJldmlvdXNOYW1lID0gMDtcbiAgICB2YXIgbGVuZ3RoID0gYVN0ci5sZW5ndGg7XG4gICAgdmFyIGluZGV4ID0gMDtcbiAgICB2YXIgY2FjaGVkU2VnbWVudHMgPSB7fTtcbiAgICB2YXIgdGVtcCA9IHt9O1xuICAgIHZhciBvcmlnaW5hbE1hcHBpbmdzID0gW107XG4gICAgdmFyIGdlbmVyYXRlZE1hcHBpbmdzID0gW107XG4gICAgdmFyIG1hcHBpbmcsIHN0ciwgc2VnbWVudCwgZW5kLCB2YWx1ZTtcblxuICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgaWYgKGFTdHIuY2hhckF0KGluZGV4KSA9PT0gJzsnKSB7XG4gICAgICAgIGdlbmVyYXRlZExpbmUrKztcbiAgICAgICAgaW5kZXgrKztcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuICAgICAgfVxuICAgICAgZWxzZSBpZiAoYVN0ci5jaGFyQXQoaW5kZXgpID09PSAnLCcpIHtcbiAgICAgICAgaW5kZXgrKztcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBtYXBwaW5nID0gbmV3IE1hcHBpbmcoKTtcbiAgICAgICAgbWFwcGluZy5nZW5lcmF0ZWRMaW5lID0gZ2VuZXJhdGVkTGluZTtcblxuICAgICAgICAvLyBCZWNhdXNlIGVhY2ggb2Zmc2V0IGlzIGVuY29kZWQgcmVsYXRpdmUgdG8gdGhlIHByZXZpb3VzIG9uZSxcbiAgICAgICAgLy8gbWFueSBzZWdtZW50cyBvZnRlbiBoYXZlIHRoZSBzYW1lIGVuY29kaW5nLiBXZSBjYW4gZXhwbG9pdCB0aGlzXG4gICAgICAgIC8vIGZhY3QgYnkgY2FjaGluZyB0aGUgcGFyc2VkIHZhcmlhYmxlIGxlbmd0aCBmaWVsZHMgb2YgZWFjaCBzZWdtZW50LFxuICAgICAgICAvLyBhbGxvd2luZyB1cyB0byBhdm9pZCBhIHNlY29uZCBwYXJzZSBpZiB3ZSBlbmNvdW50ZXIgdGhlIHNhbWVcbiAgICAgICAgLy8gc2VnbWVudCBhZ2Fpbi5cbiAgICAgICAgZm9yIChlbmQgPSBpbmRleDsgZW5kIDwgbGVuZ3RoOyBlbmQrKykge1xuICAgICAgICAgIGlmICh0aGlzLl9jaGFySXNNYXBwaW5nU2VwYXJhdG9yKGFTdHIsIGVuZCkpIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzdHIgPSBhU3RyLnNsaWNlKGluZGV4LCBlbmQpO1xuXG4gICAgICAgIHNlZ21lbnQgPSBjYWNoZWRTZWdtZW50c1tzdHJdO1xuICAgICAgICBpZiAoc2VnbWVudCkge1xuICAgICAgICAgIGluZGV4ICs9IHN0ci5sZW5ndGg7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc2VnbWVudCA9IFtdO1xuICAgICAgICAgIHdoaWxlIChpbmRleCA8IGVuZCkge1xuICAgICAgICAgICAgYmFzZTY0VkxRLmRlY29kZShhU3RyLCBpbmRleCwgdGVtcCk7XG4gICAgICAgICAgICB2YWx1ZSA9IHRlbXAudmFsdWU7XG4gICAgICAgICAgICBpbmRleCA9IHRlbXAucmVzdDtcbiAgICAgICAgICAgIHNlZ21lbnQucHVzaCh2YWx1ZSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAyKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlLCBidXQgbm8gbGluZSBhbmQgY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAzKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlIGFuZCBsaW5lLCBidXQgbm8gY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY2FjaGVkU2VnbWVudHNbc3RyXSA9IHNlZ21lbnQ7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBHZW5lcmF0ZWQgY29sdW1uLlxuICAgICAgICBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiA9IHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uICsgc2VnbWVudFswXTtcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgLy8gT3JpZ2luYWwgc291cmNlLlxuICAgICAgICAgIG1hcHBpbmcuc291cmNlID0gcHJldmlvdXNTb3VyY2UgKyBzZWdtZW50WzFdO1xuICAgICAgICAgIHByZXZpb3VzU291cmNlICs9IHNlZ21lbnRbMV07XG5cbiAgICAgICAgICAvLyBPcmlnaW5hbCBsaW5lLlxuICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxMaW5lID0gcHJldmlvdXNPcmlnaW5hbExpbmUgKyBzZWdtZW50WzJdO1xuICAgICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmU7XG4gICAgICAgICAgLy8gTGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkXG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgKz0gMTtcblxuICAgICAgICAgIC8vIE9yaWdpbmFsIGNvbHVtbi5cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uID0gcHJldmlvdXNPcmlnaW5hbENvbHVtbiArIHNlZ21lbnRbM107XG4gICAgICAgICAgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IG1hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiA0KSB7XG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBuYW1lLlxuICAgICAgICAgICAgbWFwcGluZy5uYW1lID0gcHJldmlvdXNOYW1lICsgc2VnbWVudFs0XTtcbiAgICAgICAgICAgIHByZXZpb3VzTmFtZSArPSBzZWdtZW50WzRdO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGdlbmVyYXRlZE1hcHBpbmdzLnB1c2gobWFwcGluZyk7XG4gICAgICAgIGlmICh0eXBlb2YgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgb3JpZ2luYWxNYXBwaW5ncy5wdXNoKG1hcHBpbmcpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcXVpY2tTb3J0KGdlbmVyYXRlZE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkKTtcbiAgICB0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBnZW5lcmF0ZWRNYXBwaW5ncztcblxuICAgIHF1aWNrU29ydChvcmlnaW5hbE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zKTtcbiAgICB0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncyA9IG9yaWdpbmFsTWFwcGluZ3M7XG4gIH07XG5cbi8qKlxuICogRmluZCB0aGUgbWFwcGluZyB0aGF0IGJlc3QgbWF0Y2hlcyB0aGUgaHlwb3RoZXRpY2FsIFwibmVlZGxlXCIgbWFwcGluZyB0aGF0XG4gKiB3ZSBhcmUgc2VhcmNoaW5nIGZvciBpbiB0aGUgZ2l2ZW4gXCJoYXlzdGFja1wiIG9mIG1hcHBpbmdzLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fZmluZE1hcHBpbmcgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9maW5kTWFwcGluZyhhTmVlZGxlLCBhTWFwcGluZ3MsIGFMaW5lTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYUNvbHVtbk5hbWUsIGFDb21wYXJhdG9yLCBhQmlhcykge1xuICAgIC8vIFRvIHJldHVybiB0aGUgcG9zaXRpb24gd2UgYXJlIHNlYXJjaGluZyBmb3IsIHdlIG11c3QgZmlyc3QgZmluZCB0aGVcbiAgICAvLyBtYXBwaW5nIGZvciB0aGUgZ2l2ZW4gcG9zaXRpb24gYW5kIHRoZW4gcmV0dXJuIHRoZSBvcHBvc2l0ZSBwb3NpdGlvbiBpdFxuICAgIC8vIHBvaW50cyB0by4gQmVjYXVzZSB0aGUgbWFwcGluZ3MgYXJlIHNvcnRlZCwgd2UgY2FuIHVzZSBiaW5hcnkgc2VhcmNoIHRvXG4gICAgLy8gZmluZCB0aGUgYmVzdCBtYXBwaW5nLlxuXG4gICAgaWYgKGFOZWVkbGVbYUxpbmVOYW1lXSA8PSAwKSB7XG4gICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdMaW5lIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIDEsIGdvdCAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICsgYU5lZWRsZVthTGluZU5hbWVdKTtcbiAgICB9XG4gICAgaWYgKGFOZWVkbGVbYUNvbHVtbk5hbWVdIDwgMCkge1xuICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignQ29sdW1uIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIDAsIGdvdCAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICsgYU5lZWRsZVthQ29sdW1uTmFtZV0pO1xuICAgIH1cblxuICAgIHJldHVybiBiaW5hcnlTZWFyY2guc2VhcmNoKGFOZWVkbGUsIGFNYXBwaW5ncywgYUNvbXBhcmF0b3IsIGFCaWFzKTtcbiAgfTtcblxuLyoqXG4gKiBDb21wdXRlIHRoZSBsYXN0IGNvbHVtbiBmb3IgZWFjaCBnZW5lcmF0ZWQgbWFwcGluZy4gVGhlIGxhc3QgY29sdW1uIGlzXG4gKiBpbmNsdXNpdmUuXG4gKi9cbkJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmNvbXB1dGVDb2x1bW5TcGFucyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2NvbXB1dGVDb2x1bW5TcGFucygpIHtcbiAgICBmb3IgKHZhciBpbmRleCA9IDA7IGluZGV4IDwgdGhpcy5fZ2VuZXJhdGVkTWFwcGluZ3MubGVuZ3RoOyArK2luZGV4KSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX2dlbmVyYXRlZE1hcHBpbmdzW2luZGV4XTtcblxuICAgICAgLy8gTWFwcGluZ3MgZG8gbm90IGNvbnRhaW4gYSBmaWVsZCBmb3IgdGhlIGxhc3QgZ2VuZXJhdGVkIGNvbHVtbnQuIFdlXG4gICAgICAvLyBjYW4gY29tZSB1cCB3aXRoIGFuIG9wdGltaXN0aWMgZXN0aW1hdGUsIGhvd2V2ZXIsIGJ5IGFzc3VtaW5nIHRoYXRcbiAgICAgIC8vIG1hcHBpbmdzIGFyZSBjb250aWd1b3VzIChpLmUuIGdpdmVuIHR3byBjb25zZWN1dGl2ZSBtYXBwaW5ncywgdGhlXG4gICAgICAvLyBmaXJzdCBtYXBwaW5nIGVuZHMgd2hlcmUgdGhlIHNlY29uZCBvbmUgc3RhcnRzKS5cbiAgICAgIGlmIChpbmRleCArIDEgPCB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5ncy5sZW5ndGgpIHtcbiAgICAgICAgdmFyIG5leHRNYXBwaW5nID0gdGhpcy5fZ2VuZXJhdGVkTWFwcGluZ3NbaW5kZXggKyAxXTtcblxuICAgICAgICBpZiAobWFwcGluZy5nZW5lcmF0ZWRMaW5lID09PSBuZXh0TWFwcGluZy5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgbWFwcGluZy5sYXN0R2VuZXJhdGVkQ29sdW1uID0gbmV4dE1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uIC0gMTtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyBUaGUgbGFzdCBtYXBwaW5nIGZvciBlYWNoIGxpbmUgc3BhbnMgdGhlIGVudGlyZSBsaW5lLlxuICAgICAgbWFwcGluZy5sYXN0R2VuZXJhdGVkQ29sdW1uID0gSW5maW5pdHk7XG4gICAgfVxuICB9O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIG9yaWdpbmFsIHNvdXJjZSwgbGluZSwgYW5kIGNvbHVtbiBpbmZvcm1hdGlvbiBmb3IgdGhlIGdlbmVyYXRlZFxuICogc291cmNlJ3MgbGluZSBhbmQgY29sdW1uIHBvc2l0aW9ucyBwcm92aWRlZC4gVGhlIG9ubHkgYXJndW1lbnQgaXMgYW4gb2JqZWN0XG4gKiB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UuXG4gKiAgIC0gYmlhczogRWl0aGVyICdTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORCcgb3JcbiAqICAgICAnU291cmNlTWFwQ29uc3VtZXIuTEVBU1RfVVBQRVJfQk9VTkQnLiBTcGVjaWZpZXMgd2hldGhlciB0byByZXR1cm4gdGhlXG4gKiAgICAgY2xvc2VzdCBlbGVtZW50IHRoYXQgaXMgc21hbGxlciB0aGFuIG9yIGdyZWF0ZXIgdGhhbiB0aGUgb25lIHdlIGFyZVxuICogICAgIHNlYXJjaGluZyBmb3IsIHJlc3BlY3RpdmVseSwgaWYgdGhlIGV4YWN0IGVsZW1lbnQgY2Fubm90IGJlIGZvdW5kLlxuICogICAgIERlZmF1bHRzIHRvICdTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORCcuXG4gKlxuICogYW5kIGFuIG9iamVjdCBpcyByZXR1cm5lZCB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gc291cmNlOiBUaGUgb3JpZ2luYWwgc291cmNlIGZpbGUsIG9yIG51bGwuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UsIG9yIG51bGwuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLCBvciBudWxsLlxuICogICAtIG5hbWU6IFRoZSBvcmlnaW5hbCBpZGVudGlmaWVyLCBvciBudWxsLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5vcmlnaW5hbFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfb3JpZ2luYWxQb3NpdGlvbkZvcihhQXJncykge1xuICAgIHZhciBuZWVkbGUgPSB7XG4gICAgICBnZW5lcmF0ZWRMaW5lOiB1dGlsLmdldEFyZyhhQXJncywgJ2xpbmUnKSxcbiAgICAgIGdlbmVyYXRlZENvbHVtbjogdXRpbC5nZXRBcmcoYUFyZ3MsICdjb2x1bW4nKVxuICAgIH07XG5cbiAgICB2YXIgaW5kZXggPSB0aGlzLl9maW5kTWFwcGluZyhcbiAgICAgIG5lZWRsZSxcbiAgICAgIHRoaXMuX2dlbmVyYXRlZE1hcHBpbmdzLFxuICAgICAgXCJnZW5lcmF0ZWRMaW5lXCIsXG4gICAgICBcImdlbmVyYXRlZENvbHVtblwiLFxuICAgICAgdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNEZWZsYXRlZCxcbiAgICAgIHV0aWwuZ2V0QXJnKGFBcmdzLCAnYmlhcycsIFNvdXJjZU1hcENvbnN1bWVyLkdSRUFURVNUX0xPV0VSX0JPVU5EKVxuICAgICk7XG5cbiAgICBpZiAoaW5kZXggPj0gMCkge1xuICAgICAgdmFyIG1hcHBpbmcgPSB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5nc1tpbmRleF07XG5cbiAgICAgIGlmIChtYXBwaW5nLmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHZhciBzb3VyY2UgPSB1dGlsLmdldEFyZyhtYXBwaW5nLCAnc291cmNlJywgbnVsbCk7XG4gICAgICAgIGlmIChzb3VyY2UgIT09IG51bGwpIHtcbiAgICAgICAgICBzb3VyY2UgPSB0aGlzLl9zb3VyY2VzLmF0KHNvdXJjZSk7XG4gICAgICAgICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4odGhpcy5zb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YXIgbmFtZSA9IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICduYW1lJywgbnVsbCk7XG4gICAgICAgIGlmIChuYW1lICE9PSBudWxsKSB7XG4gICAgICAgICAgbmFtZSA9IHRoaXMuX25hbWVzLmF0KG5hbWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgbGluZTogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsQ29sdW1uJywgbnVsbCksXG4gICAgICAgICAgbmFtZTogbmFtZVxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBzb3VyY2U6IG51bGwsXG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgbmFtZTogbnVsbFxuICAgIH07XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5IHNvdXJjZSBpbiB0aGUgc291cmNlXG4gKiBtYXAsIGZhbHNlIG90aGVyd2lzZS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuaGFzQ29udGVudHNPZkFsbFNvdXJjZXMgPVxuICBmdW5jdGlvbiBCYXNpY1NvdXJjZU1hcENvbnN1bWVyX2hhc0NvbnRlbnRzT2ZBbGxTb3VyY2VzKCkge1xuICAgIGlmICghdGhpcy5zb3VyY2VzQ29udGVudCkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgICByZXR1cm4gdGhpcy5zb3VyY2VzQ29udGVudC5sZW5ndGggPj0gdGhpcy5fc291cmNlcy5zaXplKCkgJiZcbiAgICAgICF0aGlzLnNvdXJjZXNDb250ZW50LnNvbWUoZnVuY3Rpb24gKHNjKSB7IHJldHVybiBzYyA9PSBudWxsOyB9KTtcbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBvcmlnaW5hbCBzb3VyY2UgY29udGVudC4gVGhlIG9ubHkgYXJndW1lbnQgaXMgdGhlIHVybCBvZiB0aGVcbiAqIG9yaWdpbmFsIHNvdXJjZSBmaWxlLiBSZXR1cm5zIG51bGwgaWYgbm8gb3JpZ2luYWwgc291cmNlIGNvbnRlbnQgaXNcbiAqIGF2YWlsYWJsZS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX3NvdXJjZUNvbnRlbnRGb3IoYVNvdXJjZSwgbnVsbE9uTWlzc2luZykge1xuICAgIGlmICghdGhpcy5zb3VyY2VzQ29udGVudCkge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBhU291cmNlID0gdXRpbC5yZWxhdGl2ZSh0aGlzLnNvdXJjZVJvb3QsIGFTb3VyY2UpO1xuICAgIH1cblxuICAgIGlmICh0aGlzLl9zb3VyY2VzLmhhcyhhU291cmNlKSkge1xuICAgICAgcmV0dXJuIHRoaXMuc291cmNlc0NvbnRlbnRbdGhpcy5fc291cmNlcy5pbmRleE9mKGFTb3VyY2UpXTtcbiAgICB9XG5cbiAgICB2YXIgdXJsO1xuICAgIGlmICh0aGlzLnNvdXJjZVJvb3QgIT0gbnVsbFxuICAgICAgICAmJiAodXJsID0gdXRpbC51cmxQYXJzZSh0aGlzLnNvdXJjZVJvb3QpKSkge1xuICAgICAgLy8gWFhYOiBmaWxlOi8vIFVSSXMgYW5kIGFic29sdXRlIHBhdGhzIGxlYWQgdG8gdW5leHBlY3RlZCBiZWhhdmlvciBmb3JcbiAgICAgIC8vIG1hbnkgdXNlcnMuIFdlIGNhbiBoZWxwIHRoZW0gb3V0IHdoZW4gdGhleSBleHBlY3QgZmlsZTovLyBVUklzIHRvXG4gICAgICAvLyBiZWhhdmUgbGlrZSBpdCB3b3VsZCBpZiB0aGV5IHdlcmUgcnVubmluZyBhIGxvY2FsIEhUVFAgc2VydmVyLiBTZWVcbiAgICAgIC8vIGh0dHBzOi8vYnVnemlsbGEubW96aWxsYS5vcmcvc2hvd19idWcuY2dpP2lkPTg4NTU5Ny5cbiAgICAgIHZhciBmaWxlVXJpQWJzUGF0aCA9IGFTb3VyY2UucmVwbGFjZSgvXmZpbGU6XFwvXFwvLywgXCJcIik7XG4gICAgICBpZiAodXJsLnNjaGVtZSA9PSBcImZpbGVcIlxuICAgICAgICAgICYmIHRoaXMuX3NvdXJjZXMuaGFzKGZpbGVVcmlBYnNQYXRoKSkge1xuICAgICAgICByZXR1cm4gdGhpcy5zb3VyY2VzQ29udGVudFt0aGlzLl9zb3VyY2VzLmluZGV4T2YoZmlsZVVyaUFic1BhdGgpXVxuICAgICAgfVxuXG4gICAgICBpZiAoKCF1cmwucGF0aCB8fCB1cmwucGF0aCA9PSBcIi9cIilcbiAgICAgICAgICAmJiB0aGlzLl9zb3VyY2VzLmhhcyhcIi9cIiArIGFTb3VyY2UpKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnNvdXJjZXNDb250ZW50W3RoaXMuX3NvdXJjZXMuaW5kZXhPZihcIi9cIiArIGFTb3VyY2UpXTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBUaGlzIGZ1bmN0aW9uIGlzIHVzZWQgcmVjdXJzaXZlbHkgZnJvbVxuICAgIC8vIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvci4gSW4gdGhhdCBjYXNlLCB3ZVxuICAgIC8vIGRvbid0IHdhbnQgdG8gdGhyb3cgaWYgd2UgY2FuJ3QgZmluZCB0aGUgc291cmNlIC0gd2UganVzdCB3YW50IHRvXG4gICAgLy8gcmV0dXJuIG51bGwsIHNvIHdlIHByb3ZpZGUgYSBmbGFnIHRvIGV4aXQgZ3JhY2VmdWxseS5cbiAgICBpZiAobnVsbE9uTWlzc2luZykge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdcIicgKyBhU291cmNlICsgJ1wiIGlzIG5vdCBpbiB0aGUgU291cmNlTWFwLicpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBnZW5lcmF0ZWQgbGluZSBhbmQgY29sdW1uIGluZm9ybWF0aW9uIGZvciB0aGUgb3JpZ2luYWwgc291cmNlLFxuICogbGluZSwgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdCB3aXRoXG4gKiB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLlxuICogICAtIGJpYXM6IEVpdGhlciAnU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQnIG9yXG4gKiAgICAgJ1NvdXJjZU1hcENvbnN1bWVyLkxFQVNUX1VQUEVSX0JPVU5EJy4gU3BlY2lmaWVzIHdoZXRoZXIgdG8gcmV0dXJuIHRoZVxuICogICAgIGNsb3Nlc3QgZWxlbWVudCB0aGF0IGlzIHNtYWxsZXIgdGhhbiBvciBncmVhdGVyIHRoYW4gdGhlIG9uZSB3ZSBhcmVcbiAqICAgICBzZWFyY2hpbmcgZm9yLCByZXNwZWN0aXZlbHksIGlmIHRoZSBleGFjdCBlbGVtZW50IGNhbm5vdCBiZSBmb3VuZC5cbiAqICAgICBEZWZhdWx0cyB0byAnU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQnLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5nZW5lcmF0ZWRQb3NpdGlvbkZvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2dlbmVyYXRlZFBvc2l0aW9uRm9yKGFBcmdzKSB7XG4gICAgdmFyIHNvdXJjZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJyk7XG4gICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBzb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHRoaXMuc291cmNlUm9vdCwgc291cmNlKTtcbiAgICB9XG4gICAgaWYgKCF0aGlzLl9zb3VyY2VzLmhhcyhzb3VyY2UpKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBsaW5lOiBudWxsLFxuICAgICAgICBjb2x1bW46IG51bGwsXG4gICAgICAgIGxhc3RDb2x1bW46IG51bGxcbiAgICAgIH07XG4gICAgfVxuICAgIHNvdXJjZSA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihzb3VyY2UpO1xuXG4gICAgdmFyIG5lZWRsZSA9IHtcbiAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgb3JpZ2luYWxMaW5lOiB1dGlsLmdldEFyZyhhQXJncywgJ2xpbmUnKSxcbiAgICAgIG9yaWdpbmFsQ29sdW1uOiB1dGlsLmdldEFyZyhhQXJncywgJ2NvbHVtbicpXG4gICAgfTtcblxuICAgIHZhciBpbmRleCA9IHRoaXMuX2ZpbmRNYXBwaW5nKFxuICAgICAgbmVlZGxlLFxuICAgICAgdGhpcy5fb3JpZ2luYWxNYXBwaW5ncyxcbiAgICAgIFwib3JpZ2luYWxMaW5lXCIsXG4gICAgICBcIm9yaWdpbmFsQ29sdW1uXCIsXG4gICAgICB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zLFxuICAgICAgdXRpbC5nZXRBcmcoYUFyZ3MsICdiaWFzJywgU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQpXG4gICAgKTtcblxuICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3NbaW5kZXhdO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgPT09IG5lZWRsZS5zb3VyY2UpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBsaW5lOiB1dGlsLmdldEFyZyhtYXBwaW5nLCAnZ2VuZXJhdGVkTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ2dlbmVyYXRlZENvbHVtbicsIG51bGwpLFxuICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgbGluZTogbnVsbCxcbiAgICAgIGNvbHVtbjogbnVsbCxcbiAgICAgIGxhc3RDb2x1bW46IG51bGxcbiAgICB9O1xuICB9O1xuXG5leHBvcnRzLkJhc2ljU291cmNlTWFwQ29uc3VtZXIgPSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyO1xuXG4vKipcbiAqIEFuIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lciBpbnN0YW5jZSByZXByZXNlbnRzIGEgcGFyc2VkIHNvdXJjZSBtYXAgd2hpY2hcbiAqIHdlIGNhbiBxdWVyeSBmb3IgaW5mb3JtYXRpb24uIEl0IGRpZmZlcnMgZnJvbSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyIGluXG4gKiB0aGF0IGl0IHRha2VzIFwiaW5kZXhlZFwiIHNvdXJjZSBtYXBzIChpLmUuIG9uZXMgd2l0aCBhIFwic2VjdGlvbnNcIiBmaWVsZCkgYXNcbiAqIGlucHV0LlxuICpcbiAqIFRoZSBvbmx5IHBhcmFtZXRlciBpcyBhIHJhdyBzb3VyY2UgbWFwIChlaXRoZXIgYXMgYSBKU09OIHN0cmluZywgb3IgYWxyZWFkeVxuICogcGFyc2VkIHRvIGFuIG9iamVjdCkuIEFjY29yZGluZyB0byB0aGUgc3BlYyBmb3IgaW5kZXhlZCBzb3VyY2UgbWFwcywgdGhleVxuICogaGF2ZSB0aGUgZm9sbG93aW5nIGF0dHJpYnV0ZXM6XG4gKlxuICogICAtIHZlcnNpb246IFdoaWNoIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXAgc3BlYyB0aGlzIG1hcCBpcyBmb2xsb3dpbmcuXG4gKiAgIC0gZmlsZTogT3B0aW9uYWwuIFRoZSBnZW5lcmF0ZWQgZmlsZSB0aGlzIHNvdXJjZSBtYXAgaXMgYXNzb2NpYXRlZCB3aXRoLlxuICogICAtIHNlY3Rpb25zOiBBIGxpc3Qgb2Ygc2VjdGlvbiBkZWZpbml0aW9ucy5cbiAqXG4gKiBFYWNoIHZhbHVlIHVuZGVyIHRoZSBcInNlY3Rpb25zXCIgZmllbGQgaGFzIHR3byBmaWVsZHM6XG4gKiAgIC0gb2Zmc2V0OiBUaGUgb2Zmc2V0IGludG8gdGhlIG9yaWdpbmFsIHNwZWNpZmllZCBhdCB3aGljaCB0aGlzIHNlY3Rpb25cbiAqICAgICAgIGJlZ2lucyB0byBhcHBseSwgZGVmaW5lZCBhcyBhbiBvYmplY3Qgd2l0aCBhIFwibGluZVwiIGFuZCBcImNvbHVtblwiXG4gKiAgICAgICBmaWVsZC5cbiAqICAgLSBtYXA6IEEgc291cmNlIG1hcCBkZWZpbml0aW9uLiBUaGlzIHNvdXJjZSBtYXAgY291bGQgYWxzbyBiZSBpbmRleGVkLFxuICogICAgICAgYnV0IGRvZXNuJ3QgaGF2ZSB0byBiZS5cbiAqXG4gKiBJbnN0ZWFkIG9mIHRoZSBcIm1hcFwiIGZpZWxkLCBpdCdzIGFsc28gcG9zc2libGUgdG8gaGF2ZSBhIFwidXJsXCIgZmllbGRcbiAqIHNwZWNpZnlpbmcgYSBVUkwgdG8gcmV0cmlldmUgYSBzb3VyY2UgbWFwIGZyb20sIGJ1dCB0aGF0J3MgY3VycmVudGx5XG4gKiB1bnN1cHBvcnRlZC5cbiAqXG4gKiBIZXJlJ3MgYW4gZXhhbXBsZSBzb3VyY2UgbWFwLCB0YWtlbiBmcm9tIHRoZSBzb3VyY2UgbWFwIHNwZWNbMF0sIGJ1dFxuICogbW9kaWZpZWQgdG8gb21pdCBhIHNlY3Rpb24gd2hpY2ggdXNlcyB0aGUgXCJ1cmxcIiBmaWVsZC5cbiAqXG4gKiAge1xuICogICAgdmVyc2lvbiA6IDMsXG4gKiAgICBmaWxlOiBcImFwcC5qc1wiLFxuICogICAgc2VjdGlvbnM6IFt7XG4gKiAgICAgIG9mZnNldDoge2xpbmU6MTAwLCBjb2x1bW46MTB9LFxuICogICAgICBtYXA6IHtcbiAqICAgICAgICB2ZXJzaW9uIDogMyxcbiAqICAgICAgICBmaWxlOiBcInNlY3Rpb24uanNcIixcbiAqICAgICAgICBzb3VyY2VzOiBbXCJmb28uanNcIiwgXCJiYXIuanNcIl0sXG4gKiAgICAgICAgbmFtZXM6IFtcInNyY1wiLCBcIm1hcHNcIiwgXCJhcmVcIiwgXCJmdW5cIl0sXG4gKiAgICAgICAgbWFwcGluZ3M6IFwiQUFBQSxFOztBQkNERTtcIlxuICogICAgICB9XG4gKiAgICB9XSxcbiAqICB9XG4gKlxuICogWzBdOiBodHRwczovL2RvY3MuZ29vZ2xlLmNvbS9kb2N1bWVudC9kLzFVMVJHQWVoUXdSeXBVVG92RjFLUmxwaU9GemUwYi1fMmdjNmZBSDBLWTBrL2VkaXQjaGVhZGluZz1oLjUzNWVzM3hlcHJndFxuICovXG5mdW5jdGlvbiBJbmRleGVkU291cmNlTWFwQ29uc3VtZXIoYVNvdXJjZU1hcCkge1xuICB2YXIgc291cmNlTWFwID0gYVNvdXJjZU1hcDtcbiAgaWYgKHR5cGVvZiBhU291cmNlTWFwID09PSAnc3RyaW5nJykge1xuICAgIHNvdXJjZU1hcCA9IEpTT04ucGFyc2UoYVNvdXJjZU1hcC5yZXBsYWNlKC9eXFwpXFxdXFx9Jy8sICcnKSk7XG4gIH1cblxuICB2YXIgdmVyc2lvbiA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ3ZlcnNpb24nKTtcbiAgdmFyIHNlY3Rpb25zID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnc2VjdGlvbnMnKTtcblxuICBpZiAodmVyc2lvbiAhPSB0aGlzLl92ZXJzaW9uKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdVbnN1cHBvcnRlZCB2ZXJzaW9uOiAnICsgdmVyc2lvbik7XG4gIH1cblxuICB0aGlzLl9zb3VyY2VzID0gbmV3IEFycmF5U2V0KCk7XG4gIHRoaXMuX25hbWVzID0gbmV3IEFycmF5U2V0KCk7XG5cbiAgdmFyIGxhc3RPZmZzZXQgPSB7XG4gICAgbGluZTogLTEsXG4gICAgY29sdW1uOiAwXG4gIH07XG4gIHRoaXMuX3NlY3Rpb25zID0gc2VjdGlvbnMubWFwKGZ1bmN0aW9uIChzKSB7XG4gICAgaWYgKHMudXJsKSB7XG4gICAgICAvLyBUaGUgdXJsIGZpZWxkIHdpbGwgcmVxdWlyZSBzdXBwb3J0IGZvciBhc3luY2hyb25pY2l0eS5cbiAgICAgIC8vIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL2lzc3Vlcy8xNlxuICAgICAgdGhyb3cgbmV3IEVycm9yKCdTdXBwb3J0IGZvciB1cmwgZmllbGQgaW4gc2VjdGlvbnMgbm90IGltcGxlbWVudGVkLicpO1xuICAgIH1cbiAgICB2YXIgb2Zmc2V0ID0gdXRpbC5nZXRBcmcocywgJ29mZnNldCcpO1xuICAgIHZhciBvZmZzZXRMaW5lID0gdXRpbC5nZXRBcmcob2Zmc2V0LCAnbGluZScpO1xuICAgIHZhciBvZmZzZXRDb2x1bW4gPSB1dGlsLmdldEFyZyhvZmZzZXQsICdjb2x1bW4nKTtcblxuICAgIGlmIChvZmZzZXRMaW5lIDwgbGFzdE9mZnNldC5saW5lIHx8XG4gICAgICAgIChvZmZzZXRMaW5lID09PSBsYXN0T2Zmc2V0LmxpbmUgJiYgb2Zmc2V0Q29sdW1uIDwgbGFzdE9mZnNldC5jb2x1bW4pKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ1NlY3Rpb24gb2Zmc2V0cyBtdXN0IGJlIG9yZGVyZWQgYW5kIG5vbi1vdmVybGFwcGluZy4nKTtcbiAgICB9XG4gICAgbGFzdE9mZnNldCA9IG9mZnNldDtcblxuICAgIHJldHVybiB7XG4gICAgICBnZW5lcmF0ZWRPZmZzZXQ6IHtcbiAgICAgICAgLy8gVGhlIG9mZnNldCBmaWVsZHMgYXJlIDAtYmFzZWQsIGJ1dCB3ZSB1c2UgMS1iYXNlZCBpbmRpY2VzIHdoZW5cbiAgICAgICAgLy8gZW5jb2RpbmcvZGVjb2RpbmcgZnJvbSBWTFEuXG4gICAgICAgIGdlbmVyYXRlZExpbmU6IG9mZnNldExpbmUgKyAxLFxuICAgICAgICBnZW5lcmF0ZWRDb2x1bW46IG9mZnNldENvbHVtbiArIDFcbiAgICAgIH0sXG4gICAgICBjb25zdW1lcjogbmV3IFNvdXJjZU1hcENvbnN1bWVyKHV0aWwuZ2V0QXJnKHMsICdtYXAnKSlcbiAgICB9XG4gIH0pO1xufVxuXG5JbmRleGVkU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUpO1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5jb25zdHJ1Y3RvciA9IFNvdXJjZU1hcENvbnN1bWVyO1xuXG4vKipcbiAqIFRoZSB2ZXJzaW9uIG9mIHRoZSBzb3VyY2UgbWFwcGluZyBzcGVjIHRoYXQgd2UgYXJlIGNvbnN1bWluZy5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogVGhlIGxpc3Qgb2Ygb3JpZ2luYWwgc291cmNlcy5cbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUsICdzb3VyY2VzJywge1xuICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgc291cmNlcyA9IFtdO1xuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5fc2VjdGlvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdGhpcy5fc2VjdGlvbnNbaV0uY29uc3VtZXIuc291cmNlcy5sZW5ndGg7IGorKykge1xuICAgICAgICBzb3VyY2VzLnB1c2godGhpcy5fc2VjdGlvbnNbaV0uY29uc3VtZXIuc291cmNlc1tqXSk7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBzb3VyY2VzO1xuICB9XG59KTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBvcmlnaW5hbCBzb3VyY2UsIGxpbmUsIGFuZCBjb2x1bW4gaW5mb3JtYXRpb24gZm9yIHRoZSBnZW5lcmF0ZWRcbiAqIHNvdXJjZSdzIGxpbmUgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdFxuICogd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZS5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIG9yaWdpbmFsIHNvdXJjZSBmaWxlLCBvciBudWxsLlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLCBvciBudWxsLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIG9yaWdpbmFsIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBuYW1lOiBUaGUgb3JpZ2luYWwgaWRlbnRpZmllciwgb3IgbnVsbC5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5vcmlnaW5hbFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyX29yaWdpbmFsUG9zaXRpb25Gb3IoYUFyZ3MpIHtcbiAgICB2YXIgbmVlZGxlID0ge1xuICAgICAgZ2VuZXJhdGVkTGluZTogdXRpbC5nZXRBcmcoYUFyZ3MsICdsaW5lJyksXG4gICAgICBnZW5lcmF0ZWRDb2x1bW46IHV0aWwuZ2V0QXJnKGFBcmdzLCAnY29sdW1uJylcbiAgICB9O1xuXG4gICAgLy8gRmluZCB0aGUgc2VjdGlvbiBjb250YWluaW5nIHRoZSBnZW5lcmF0ZWQgcG9zaXRpb24gd2UncmUgdHJ5aW5nIHRvIG1hcFxuICAgIC8vIHRvIGFuIG9yaWdpbmFsIHBvc2l0aW9uLlxuICAgIHZhciBzZWN0aW9uSW5kZXggPSBiaW5hcnlTZWFyY2guc2VhcmNoKG5lZWRsZSwgdGhpcy5fc2VjdGlvbnMsXG4gICAgICBmdW5jdGlvbihuZWVkbGUsIHNlY3Rpb24pIHtcbiAgICAgICAgdmFyIGNtcCA9IG5lZWRsZS5nZW5lcmF0ZWRMaW5lIC0gc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZTtcbiAgICAgICAgaWYgKGNtcCkge1xuICAgICAgICAgIHJldHVybiBjbXA7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gKG5lZWRsZS5nZW5lcmF0ZWRDb2x1bW4gLVxuICAgICAgICAgICAgICAgIHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbik7XG4gICAgICB9KTtcbiAgICB2YXIgc2VjdGlvbiA9IHRoaXMuX3NlY3Rpb25zW3NlY3Rpb25JbmRleF07XG5cbiAgICBpZiAoIXNlY3Rpb24pIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHNvdXJjZTogbnVsbCxcbiAgICAgICAgbGluZTogbnVsbCxcbiAgICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgICBuYW1lOiBudWxsXG4gICAgICB9O1xuICAgIH1cblxuICAgIHJldHVybiBzZWN0aW9uLmNvbnN1bWVyLm9yaWdpbmFsUG9zaXRpb25Gb3Ioe1xuICAgICAgbGluZTogbmVlZGxlLmdlbmVyYXRlZExpbmUgLVxuICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSAtIDEpLFxuICAgICAgY29sdW1uOiBuZWVkbGUuZ2VuZXJhdGVkQ29sdW1uIC1cbiAgICAgICAgKHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lXG4gICAgICAgICA/IHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbiAtIDFcbiAgICAgICAgIDogMCksXG4gICAgICBiaWFzOiBhQXJncy5iaWFzXG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5IHNvdXJjZSBpbiB0aGUgc291cmNlXG4gKiBtYXAsIGZhbHNlIG90aGVyd2lzZS5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5oYXNDb250ZW50c09mQWxsU291cmNlcyA9XG4gIGZ1bmN0aW9uIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lcl9oYXNDb250ZW50c09mQWxsU291cmNlcygpIHtcbiAgICByZXR1cm4gdGhpcy5fc2VjdGlvbnMuZXZlcnkoZnVuY3Rpb24gKHMpIHtcbiAgICAgIHJldHVybiBzLmNvbnN1bWVyLmhhc0NvbnRlbnRzT2ZBbGxTb3VyY2VzKCk7XG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJucyB0aGUgb3JpZ2luYWwgc291cmNlIGNvbnRlbnQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIHRoZSB1cmwgb2YgdGhlXG4gKiBvcmlnaW5hbCBzb3VyY2UgZmlsZS4gUmV0dXJucyBudWxsIGlmIG5vIG9yaWdpbmFsIHNvdXJjZSBjb250ZW50IGlzXG4gKiBhdmFpbGFibGUuXG4gKi9cbkluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvciA9XG4gIGZ1bmN0aW9uIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lcl9zb3VyY2VDb250ZW50Rm9yKGFTb3VyY2UsIG51bGxPbk1pc3NpbmcpIHtcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuX3NlY3Rpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICB2YXIgc2VjdGlvbiA9IHRoaXMuX3NlY3Rpb25zW2ldO1xuXG4gICAgICB2YXIgY29udGVudCA9IHNlY3Rpb24uY29uc3VtZXIuc291cmNlQ29udGVudEZvcihhU291cmNlLCB0cnVlKTtcbiAgICAgIGlmIChjb250ZW50KSB7XG4gICAgICAgIHJldHVybiBjb250ZW50O1xuICAgICAgfVxuICAgIH1cbiAgICBpZiAobnVsbE9uTWlzc2luZykge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdcIicgKyBhU291cmNlICsgJ1wiIGlzIG5vdCBpbiB0aGUgU291cmNlTWFwLicpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBnZW5lcmF0ZWQgbGluZSBhbmQgY29sdW1uIGluZm9ybWF0aW9uIGZvciB0aGUgb3JpZ2luYWwgc291cmNlLFxuICogbGluZSwgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdCB3aXRoXG4gKiB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICovXG5JbmRleGVkU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmdlbmVyYXRlZFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyX2dlbmVyYXRlZFBvc2l0aW9uRm9yKGFBcmdzKSB7XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgdmFyIHNlY3Rpb24gPSB0aGlzLl9zZWN0aW9uc1tpXTtcblxuICAgICAgLy8gT25seSBjb25zaWRlciB0aGlzIHNlY3Rpb24gaWYgdGhlIHJlcXVlc3RlZCBzb3VyY2UgaXMgaW4gdGhlIGxpc3Qgb2ZcbiAgICAgIC8vIHNvdXJjZXMgb2YgdGhlIGNvbnN1bWVyLlxuICAgICAgaWYgKHNlY3Rpb24uY29uc3VtZXIuc291cmNlcy5pbmRleE9mKHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJykpID09PSAtMSkge1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cbiAgICAgIHZhciBnZW5lcmF0ZWRQb3NpdGlvbiA9IHNlY3Rpb24uY29uc3VtZXIuZ2VuZXJhdGVkUG9zaXRpb25Gb3IoYUFyZ3MpO1xuICAgICAgaWYgKGdlbmVyYXRlZFBvc2l0aW9uKSB7XG4gICAgICAgIHZhciByZXQgPSB7XG4gICAgICAgICAgbGluZTogZ2VuZXJhdGVkUG9zaXRpb24ubGluZSArXG4gICAgICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSAtIDEpLFxuICAgICAgICAgIGNvbHVtbjogZ2VuZXJhdGVkUG9zaXRpb24uY29sdW1uICtcbiAgICAgICAgICAgIChzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRMaW5lID09PSBnZW5lcmF0ZWRQb3NpdGlvbi5saW5lXG4gICAgICAgICAgICAgPyBzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRDb2x1bW4gLSAxXG4gICAgICAgICAgICAgOiAwKVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsXG4gICAgfTtcbiAgfTtcblxuLyoqXG4gKiBQYXJzZSB0aGUgbWFwcGluZ3MgaW4gYSBzdHJpbmcgaW4gdG8gYSBkYXRhIHN0cnVjdHVyZSB3aGljaCB3ZSBjYW4gZWFzaWx5XG4gKiBxdWVyeSAodGhlIG9yZGVyZWQgYXJyYXlzIGluIHRoZSBgdGhpcy5fX2dlbmVyYXRlZE1hcHBpbmdzYCBhbmRcbiAqIGB0aGlzLl9fb3JpZ2luYWxNYXBwaW5nc2AgcHJvcGVydGllcykuXG4gKi9cbkluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBJbmRleGVkU291cmNlTWFwQ29uc3VtZXJfcGFyc2VNYXBwaW5ncyhhU3RyLCBhU291cmNlUm9vdCkge1xuICAgIHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5ncyA9IFtdO1xuICAgIHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzID0gW107XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgdmFyIHNlY3Rpb24gPSB0aGlzLl9zZWN0aW9uc1tpXTtcbiAgICAgIHZhciBzZWN0aW9uTWFwcGluZ3MgPSBzZWN0aW9uLmNvbnN1bWVyLl9nZW5lcmF0ZWRNYXBwaW5ncztcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgc2VjdGlvbk1hcHBpbmdzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgIHZhciBtYXBwaW5nID0gc2VjdGlvbk1hcHBpbmdzW2pdO1xuXG4gICAgICAgIHZhciBzb3VyY2UgPSBzZWN0aW9uLmNvbnN1bWVyLl9zb3VyY2VzLmF0KG1hcHBpbmcuc291cmNlKTtcbiAgICAgICAgaWYgKHNlY3Rpb24uY29uc3VtZXIuc291cmNlUm9vdCAhPT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZSA9IHV0aWwuam9pbihzZWN0aW9uLmNvbnN1bWVyLnNvdXJjZVJvb3QsIHNvdXJjZSk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5fc291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgICAgc291cmNlID0gdGhpcy5fc291cmNlcy5pbmRleE9mKHNvdXJjZSk7XG5cbiAgICAgICAgdmFyIG5hbWUgPSBzZWN0aW9uLmNvbnN1bWVyLl9uYW1lcy5hdChtYXBwaW5nLm5hbWUpO1xuICAgICAgICB0aGlzLl9uYW1lcy5hZGQobmFtZSk7XG4gICAgICAgIG5hbWUgPSB0aGlzLl9uYW1lcy5pbmRleE9mKG5hbWUpO1xuXG4gICAgICAgIC8vIFRoZSBtYXBwaW5ncyBjb21pbmcgZnJvbSB0aGUgY29uc3VtZXIgZm9yIHRoZSBzZWN0aW9uIGhhdmVcbiAgICAgICAgLy8gZ2VuZXJhdGVkIHBvc2l0aW9ucyByZWxhdGl2ZSB0byB0aGUgc3RhcnQgb2YgdGhlIHNlY3Rpb24sIHNvIHdlXG4gICAgICAgIC8vIG5lZWQgdG8gb2Zmc2V0IHRoZW0gdG8gYmUgcmVsYXRpdmUgdG8gdGhlIHN0YXJ0IG9mIHRoZSBjb25jYXRlbmF0ZWRcbiAgICAgICAgLy8gZ2VuZXJhdGVkIGZpbGUuXG4gICAgICAgIHZhciBhZGp1c3RlZE1hcHBpbmcgPSB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgZ2VuZXJhdGVkTGluZTogbWFwcGluZy5nZW5lcmF0ZWRMaW5lICtcbiAgICAgICAgICAgIChzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRMaW5lIC0gMSksXG4gICAgICAgICAgZ2VuZXJhdGVkQ29sdW1uOiBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiArXG4gICAgICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSA9PT0gbWFwcGluZy5nZW5lcmF0ZWRMaW5lXG4gICAgICAgICAgICA/IHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbiAtIDFcbiAgICAgICAgICAgIDogMCksXG4gICAgICAgICAgb3JpZ2luYWxMaW5lOiBtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICBvcmlnaW5hbENvbHVtbjogbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICBuYW1lOiBuYW1lXG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy5fX2dlbmVyYXRlZE1hcHBpbmdzLnB1c2goYWRqdXN0ZWRNYXBwaW5nKTtcbiAgICAgICAgaWYgKHR5cGVvZiBhZGp1c3RlZE1hcHBpbmcub3JpZ2luYWxMaW5lID09PSAnbnVtYmVyJykge1xuICAgICAgICAgIHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzLnB1c2goYWRqdXN0ZWRNYXBwaW5nKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIHF1aWNrU29ydCh0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MsIHV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zRGVmbGF0ZWQpO1xuICAgIHF1aWNrU29ydCh0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncywgdXRpbC5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyk7XG4gIH07XG5cbmV4cG9ydHMuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyID0gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qc1xuLy8gbW9kdWxlIGlkID0gN1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbmV4cG9ydHMuR1JFQVRFU1RfTE9XRVJfQk9VTkQgPSAxO1xuZXhwb3J0cy5MRUFTVF9VUFBFUl9CT1VORCA9IDI7XG5cbi8qKlxuICogUmVjdXJzaXZlIGltcGxlbWVudGF0aW9uIG9mIGJpbmFyeSBzZWFyY2guXG4gKlxuICogQHBhcmFtIGFMb3cgSW5kaWNlcyBoZXJlIGFuZCBsb3dlciBkbyBub3QgY29udGFpbiB0aGUgbmVlZGxlLlxuICogQHBhcmFtIGFIaWdoIEluZGljZXMgaGVyZSBhbmQgaGlnaGVyIGRvIG5vdCBjb250YWluIHRoZSBuZWVkbGUuXG4gKiBAcGFyYW0gYU5lZWRsZSBUaGUgZWxlbWVudCBiZWluZyBzZWFyY2hlZCBmb3IuXG4gKiBAcGFyYW0gYUhheXN0YWNrIFRoZSBub24tZW1wdHkgYXJyYXkgYmVpbmcgc2VhcmNoZWQuXG4gKiBAcGFyYW0gYUNvbXBhcmUgRnVuY3Rpb24gd2hpY2ggdGFrZXMgdHdvIGVsZW1lbnRzIGFuZCByZXR1cm5zIC0xLCAwLCBvciAxLlxuICogQHBhcmFtIGFCaWFzIEVpdGhlciAnYmluYXJ5U2VhcmNoLkdSRUFURVNUX0xPV0VSX0JPVU5EJyBvclxuICogICAgICdiaW5hcnlTZWFyY2guTEVBU1RfVVBQRVJfQk9VTkQnLiBTcGVjaWZpZXMgd2hldGhlciB0byByZXR1cm4gdGhlXG4gKiAgICAgY2xvc2VzdCBlbGVtZW50IHRoYXQgaXMgc21hbGxlciB0aGFuIG9yIGdyZWF0ZXIgdGhhbiB0aGUgb25lIHdlIGFyZVxuICogICAgIHNlYXJjaGluZyBmb3IsIHJlc3BlY3RpdmVseSwgaWYgdGhlIGV4YWN0IGVsZW1lbnQgY2Fubm90IGJlIGZvdW5kLlxuICovXG5mdW5jdGlvbiByZWN1cnNpdmVTZWFyY2goYUxvdywgYUhpZ2gsIGFOZWVkbGUsIGFIYXlzdGFjaywgYUNvbXBhcmUsIGFCaWFzKSB7XG4gIC8vIFRoaXMgZnVuY3Rpb24gdGVybWluYXRlcyB3aGVuIG9uZSBvZiB0aGUgZm9sbG93aW5nIGlzIHRydWU6XG4gIC8vXG4gIC8vICAgMS4gV2UgZmluZCB0aGUgZXhhY3QgZWxlbWVudCB3ZSBhcmUgbG9va2luZyBmb3IuXG4gIC8vXG4gIC8vICAgMi4gV2UgZGlkIG5vdCBmaW5kIHRoZSBleGFjdCBlbGVtZW50LCBidXQgd2UgY2FuIHJldHVybiB0aGUgaW5kZXggb2ZcbiAgLy8gICAgICB0aGUgbmV4dC1jbG9zZXN0IGVsZW1lbnQuXG4gIC8vXG4gIC8vICAgMy4gV2UgZGlkIG5vdCBmaW5kIHRoZSBleGFjdCBlbGVtZW50LCBhbmQgdGhlcmUgaXMgbm8gbmV4dC1jbG9zZXN0XG4gIC8vICAgICAgZWxlbWVudCB0aGFuIHRoZSBvbmUgd2UgYXJlIHNlYXJjaGluZyBmb3IsIHNvIHdlIHJldHVybiAtMS5cbiAgdmFyIG1pZCA9IE1hdGguZmxvb3IoKGFIaWdoIC0gYUxvdykgLyAyKSArIGFMb3c7XG4gIHZhciBjbXAgPSBhQ29tcGFyZShhTmVlZGxlLCBhSGF5c3RhY2tbbWlkXSwgdHJ1ZSk7XG4gIGlmIChjbXAgPT09IDApIHtcbiAgICAvLyBGb3VuZCB0aGUgZWxlbWVudCB3ZSBhcmUgbG9va2luZyBmb3IuXG4gICAgcmV0dXJuIG1pZDtcbiAgfVxuICBlbHNlIGlmIChjbXAgPiAwKSB7XG4gICAgLy8gT3VyIG5lZWRsZSBpcyBncmVhdGVyIHRoYW4gYUhheXN0YWNrW21pZF0uXG4gICAgaWYgKGFIaWdoIC0gbWlkID4gMSkge1xuICAgICAgLy8gVGhlIGVsZW1lbnQgaXMgaW4gdGhlIHVwcGVyIGhhbGYuXG4gICAgICByZXR1cm4gcmVjdXJzaXZlU2VhcmNoKG1pZCwgYUhpZ2gsIGFOZWVkbGUsIGFIYXlzdGFjaywgYUNvbXBhcmUsIGFCaWFzKTtcbiAgICB9XG5cbiAgICAvLyBUaGUgZXhhY3QgbmVlZGxlIGVsZW1lbnQgd2FzIG5vdCBmb3VuZCBpbiB0aGlzIGhheXN0YWNrLiBEZXRlcm1pbmUgaWZcbiAgICAvLyB3ZSBhcmUgaW4gdGVybWluYXRpb24gY2FzZSAoMykgb3IgKDIpIGFuZCByZXR1cm4gdGhlIGFwcHJvcHJpYXRlIHRoaW5nLlxuICAgIGlmIChhQmlhcyA9PSBleHBvcnRzLkxFQVNUX1VQUEVSX0JPVU5EKSB7XG4gICAgICByZXR1cm4gYUhpZ2ggPCBhSGF5c3RhY2subGVuZ3RoID8gYUhpZ2ggOiAtMTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIG1pZDtcbiAgICB9XG4gIH1cbiAgZWxzZSB7XG4gICAgLy8gT3VyIG5lZWRsZSBpcyBsZXNzIHRoYW4gYUhheXN0YWNrW21pZF0uXG4gICAgaWYgKG1pZCAtIGFMb3cgPiAxKSB7XG4gICAgICAvLyBUaGUgZWxlbWVudCBpcyBpbiB0aGUgbG93ZXIgaGFsZi5cbiAgICAgIHJldHVybiByZWN1cnNpdmVTZWFyY2goYUxvdywgbWlkLCBhTmVlZGxlLCBhSGF5c3RhY2ssIGFDb21wYXJlLCBhQmlhcyk7XG4gICAgfVxuXG4gICAgLy8gd2UgYXJlIGluIHRlcm1pbmF0aW9uIGNhc2UgKDMpIG9yICgyKSBhbmQgcmV0dXJuIHRoZSBhcHByb3ByaWF0ZSB0aGluZy5cbiAgICBpZiAoYUJpYXMgPT0gZXhwb3J0cy5MRUFTVF9VUFBFUl9CT1VORCkge1xuICAgICAgcmV0dXJuIG1pZDtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGFMb3cgPCAwID8gLTEgOiBhTG93O1xuICAgIH1cbiAgfVxufVxuXG4vKipcbiAqIFRoaXMgaXMgYW4gaW1wbGVtZW50YXRpb24gb2YgYmluYXJ5IHNlYXJjaCB3aGljaCB3aWxsIGFsd2F5cyB0cnkgYW5kIHJldHVyblxuICogdGhlIGluZGV4IG9mIHRoZSBjbG9zZXN0IGVsZW1lbnQgaWYgdGhlcmUgaXMgbm8gZXhhY3QgaGl0LiBUaGlzIGlzIGJlY2F1c2VcbiAqIG1hcHBpbmdzIGJldHdlZW4gb3JpZ2luYWwgYW5kIGdlbmVyYXRlZCBsaW5lL2NvbCBwYWlycyBhcmUgc2luZ2xlIHBvaW50cyxcbiAqIGFuZCB0aGVyZSBpcyBhbiBpbXBsaWNpdCByZWdpb24gYmV0d2VlbiBlYWNoIG9mIHRoZW0sIHNvIGEgbWlzcyBqdXN0IG1lYW5zXG4gKiB0aGF0IHlvdSBhcmVuJ3Qgb24gdGhlIHZlcnkgc3RhcnQgb2YgYSByZWdpb24uXG4gKlxuICogQHBhcmFtIGFOZWVkbGUgVGhlIGVsZW1lbnQgeW91IGFyZSBsb29raW5nIGZvci5cbiAqIEBwYXJhbSBhSGF5c3RhY2sgVGhlIGFycmF5IHRoYXQgaXMgYmVpbmcgc2VhcmNoZWQuXG4gKiBAcGFyYW0gYUNvbXBhcmUgQSBmdW5jdGlvbiB3aGljaCB0YWtlcyB0aGUgbmVlZGxlIGFuZCBhbiBlbGVtZW50IGluIHRoZVxuICogICAgIGFycmF5IGFuZCByZXR1cm5zIC0xLCAwLCBvciAxIGRlcGVuZGluZyBvbiB3aGV0aGVyIHRoZSBuZWVkbGUgaXMgbGVzc1xuICogICAgIHRoYW4sIGVxdWFsIHRvLCBvciBncmVhdGVyIHRoYW4gdGhlIGVsZW1lbnQsIHJlc3BlY3RpdmVseS5cbiAqIEBwYXJhbSBhQmlhcyBFaXRoZXIgJ2JpbmFyeVNlYXJjaC5HUkVBVEVTVF9MT1dFUl9CT1VORCcgb3JcbiAqICAgICAnYmluYXJ5U2VhcmNoLkxFQVNUX1VQUEVSX0JPVU5EJy4gU3BlY2lmaWVzIHdoZXRoZXIgdG8gcmV0dXJuIHRoZVxuICogICAgIGNsb3Nlc3QgZWxlbWVudCB0aGF0IGlzIHNtYWxsZXIgdGhhbiBvciBncmVhdGVyIHRoYW4gdGhlIG9uZSB3ZSBhcmVcbiAqICAgICBzZWFyY2hpbmcgZm9yLCByZXNwZWN0aXZlbHksIGlmIHRoZSBleGFjdCBlbGVtZW50IGNhbm5vdCBiZSBmb3VuZC5cbiAqICAgICBEZWZhdWx0cyB0byAnYmluYXJ5U2VhcmNoLkdSRUFURVNUX0xPV0VSX0JPVU5EJy5cbiAqL1xuZXhwb3J0cy5zZWFyY2ggPSBmdW5jdGlvbiBzZWFyY2goYU5lZWRsZSwgYUhheXN0YWNrLCBhQ29tcGFyZSwgYUJpYXMpIHtcbiAgaWYgKGFIYXlzdGFjay5sZW5ndGggPT09IDApIHtcbiAgICByZXR1cm4gLTE7XG4gIH1cblxuICB2YXIgaW5kZXggPSByZWN1cnNpdmVTZWFyY2goLTEsIGFIYXlzdGFjay5sZW5ndGgsIGFOZWVkbGUsIGFIYXlzdGFjayxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFDb21wYXJlLCBhQmlhcyB8fCBleHBvcnRzLkdSRUFURVNUX0xPV0VSX0JPVU5EKTtcbiAgaWYgKGluZGV4IDwgMCkge1xuICAgIHJldHVybiAtMTtcbiAgfVxuXG4gIC8vIFdlIGhhdmUgZm91bmQgZWl0aGVyIHRoZSBleGFjdCBlbGVtZW50LCBvciB0aGUgbmV4dC1jbG9zZXN0IGVsZW1lbnQgdGhhblxuICAvLyB0aGUgb25lIHdlIGFyZSBzZWFyY2hpbmcgZm9yLiBIb3dldmVyLCB0aGVyZSBtYXkgYmUgbW9yZSB0aGFuIG9uZSBzdWNoXG4gIC8vIGVsZW1lbnQuIE1ha2Ugc3VyZSB3ZSBhbHdheXMgcmV0dXJuIHRoZSBzbWFsbGVzdCBvZiB0aGVzZS5cbiAgd2hpbGUgKGluZGV4IC0gMSA+PSAwKSB7XG4gICAgaWYgKGFDb21wYXJlKGFIYXlzdGFja1tpbmRleF0sIGFIYXlzdGFja1tpbmRleCAtIDFdLCB0cnVlKSAhPT0gMCkge1xuICAgICAgYnJlYWs7XG4gICAgfVxuICAgIC0taW5kZXg7XG4gIH1cblxuICByZXR1cm4gaW5kZXg7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmluYXJ5LXNlYXJjaC5qc1xuLy8gbW9kdWxlIGlkID0gOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbi8vIEl0IHR1cm5zIG91dCB0aGF0IHNvbWUgKG1vc3Q/KSBKYXZhU2NyaXB0IGVuZ2luZXMgZG9uJ3Qgc2VsZi1ob3N0XG4vLyBgQXJyYXkucHJvdG90eXBlLnNvcnRgLiBUaGlzIG1ha2VzIHNlbnNlIGJlY2F1c2UgQysrIHdpbGwgbGlrZWx5IHJlbWFpblxuLy8gZmFzdGVyIHRoYW4gSlMgd2hlbiBkb2luZyByYXcgQ1BVLWludGVuc2l2ZSBzb3J0aW5nLiBIb3dldmVyLCB3aGVuIHVzaW5nIGFcbi8vIGN1c3RvbSBjb21wYXJhdG9yIGZ1bmN0aW9uLCBjYWxsaW5nIGJhY2sgYW5kIGZvcnRoIGJldHdlZW4gdGhlIFZNJ3MgQysrIGFuZFxuLy8gSklUJ2QgSlMgaXMgcmF0aGVyIHNsb3cgKmFuZCogbG9zZXMgSklUIHR5cGUgaW5mb3JtYXRpb24sIHJlc3VsdGluZyBpblxuLy8gd29yc2UgZ2VuZXJhdGVkIGNvZGUgZm9yIHRoZSBjb21wYXJhdG9yIGZ1bmN0aW9uIHRoYW4gd291bGQgYmUgb3B0aW1hbC4gSW5cbi8vIGZhY3QsIHdoZW4gc29ydGluZyB3aXRoIGEgY29tcGFyYXRvciwgdGhlc2UgY29zdHMgb3V0d2VpZ2ggdGhlIGJlbmVmaXRzIG9mXG4vLyBzb3J0aW5nIGluIEMrKy4gQnkgdXNpbmcgb3VyIG93biBKUy1pbXBsZW1lbnRlZCBRdWljayBTb3J0IChiZWxvdyksIHdlIGdldFxuLy8gYSB+MzUwMG1zIG1lYW4gc3BlZWQtdXAgaW4gYGJlbmNoL2JlbmNoLmh0bWxgLlxuXG4vKipcbiAqIFN3YXAgdGhlIGVsZW1lbnRzIGluZGV4ZWQgYnkgYHhgIGFuZCBgeWAgaW4gdGhlIGFycmF5IGBhcnlgLlxuICpcbiAqIEBwYXJhbSB7QXJyYXl9IGFyeVxuICogICAgICAgIFRoZSBhcnJheS5cbiAqIEBwYXJhbSB7TnVtYmVyfSB4XG4gKiAgICAgICAgVGhlIGluZGV4IG9mIHRoZSBmaXJzdCBpdGVtLlxuICogQHBhcmFtIHtOdW1iZXJ9IHlcbiAqICAgICAgICBUaGUgaW5kZXggb2YgdGhlIHNlY29uZCBpdGVtLlxuICovXG5mdW5jdGlvbiBzd2FwKGFyeSwgeCwgeSkge1xuICB2YXIgdGVtcCA9IGFyeVt4XTtcbiAgYXJ5W3hdID0gYXJ5W3ldO1xuICBhcnlbeV0gPSB0ZW1wO1xufVxuXG4vKipcbiAqIFJldHVybnMgYSByYW5kb20gaW50ZWdlciB3aXRoaW4gdGhlIHJhbmdlIGBsb3cgLi4gaGlnaGAgaW5jbHVzaXZlLlxuICpcbiAqIEBwYXJhbSB7TnVtYmVyfSBsb3dcbiAqICAgICAgICBUaGUgbG93ZXIgYm91bmQgb24gdGhlIHJhbmdlLlxuICogQHBhcmFtIHtOdW1iZXJ9IGhpZ2hcbiAqICAgICAgICBUaGUgdXBwZXIgYm91bmQgb24gdGhlIHJhbmdlLlxuICovXG5mdW5jdGlvbiByYW5kb21JbnRJblJhbmdlKGxvdywgaGlnaCkge1xuICByZXR1cm4gTWF0aC5yb3VuZChsb3cgKyAoTWF0aC5yYW5kb20oKSAqIChoaWdoIC0gbG93KSkpO1xufVxuXG4vKipcbiAqIFRoZSBRdWljayBTb3J0IGFsZ29yaXRobS5cbiAqXG4gKiBAcGFyYW0ge0FycmF5fSBhcnlcbiAqICAgICAgICBBbiBhcnJheSB0byBzb3J0LlxuICogQHBhcmFtIHtmdW5jdGlvbn0gY29tcGFyYXRvclxuICogICAgICAgIEZ1bmN0aW9uIHRvIHVzZSB0byBjb21wYXJlIHR3byBpdGVtcy5cbiAqIEBwYXJhbSB7TnVtYmVyfSBwXG4gKiAgICAgICAgU3RhcnQgaW5kZXggb2YgdGhlIGFycmF5XG4gKiBAcGFyYW0ge051bWJlcn0gclxuICogICAgICAgIEVuZCBpbmRleCBvZiB0aGUgYXJyYXlcbiAqL1xuZnVuY3Rpb24gZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBwLCByKSB7XG4gIC8vIElmIG91ciBsb3dlciBib3VuZCBpcyBsZXNzIHRoYW4gb3VyIHVwcGVyIGJvdW5kLCB3ZSAoMSkgcGFydGl0aW9uIHRoZVxuICAvLyBhcnJheSBpbnRvIHR3byBwaWVjZXMgYW5kICgyKSByZWN1cnNlIG9uIGVhY2ggaGFsZi4gSWYgaXQgaXMgbm90LCB0aGlzIGlzXG4gIC8vIHRoZSBlbXB0eSBhcnJheSBhbmQgb3VyIGJhc2UgY2FzZS5cblxuICBpZiAocCA8IHIpIHtcbiAgICAvLyAoMSkgUGFydGl0aW9uaW5nLlxuICAgIC8vXG4gICAgLy8gVGhlIHBhcnRpdGlvbmluZyBjaG9vc2VzIGEgcGl2b3QgYmV0d2VlbiBgcGAgYW5kIGByYCBhbmQgbW92ZXMgYWxsXG4gICAgLy8gZWxlbWVudHMgdGhhdCBhcmUgbGVzcyB0aGFuIG9yIGVxdWFsIHRvIHRoZSBwaXZvdCB0byB0aGUgYmVmb3JlIGl0LCBhbmRcbiAgICAvLyBhbGwgdGhlIGVsZW1lbnRzIHRoYXQgYXJlIGdyZWF0ZXIgdGhhbiBpdCBhZnRlciBpdC4gVGhlIGVmZmVjdCBpcyB0aGF0XG4gICAgLy8gb25jZSBwYXJ0aXRpb24gaXMgZG9uZSwgdGhlIHBpdm90IGlzIGluIHRoZSBleGFjdCBwbGFjZSBpdCB3aWxsIGJlIHdoZW5cbiAgICAvLyB0aGUgYXJyYXkgaXMgcHV0IGluIHNvcnRlZCBvcmRlciwgYW5kIGl0IHdpbGwgbm90IG5lZWQgdG8gYmUgbW92ZWRcbiAgICAvLyBhZ2Fpbi4gVGhpcyBydW5zIGluIE8obikgdGltZS5cblxuICAgIC8vIEFsd2F5cyBjaG9vc2UgYSByYW5kb20gcGl2b3Qgc28gdGhhdCBhbiBpbnB1dCBhcnJheSB3aGljaCBpcyByZXZlcnNlXG4gICAgLy8gc29ydGVkIGRvZXMgbm90IGNhdXNlIE8obl4yKSBydW5uaW5nIHRpbWUuXG4gICAgdmFyIHBpdm90SW5kZXggPSByYW5kb21JbnRJblJhbmdlKHAsIHIpO1xuICAgIHZhciBpID0gcCAtIDE7XG5cbiAgICBzd2FwKGFyeSwgcGl2b3RJbmRleCwgcik7XG4gICAgdmFyIHBpdm90ID0gYXJ5W3JdO1xuXG4gICAgLy8gSW1tZWRpYXRlbHkgYWZ0ZXIgYGpgIGlzIGluY3JlbWVudGVkIGluIHRoaXMgbG9vcCwgdGhlIGZvbGxvd2luZyBob2xkXG4gICAgLy8gdHJ1ZTpcbiAgICAvL1xuICAgIC8vICAgKiBFdmVyeSBlbGVtZW50IGluIGBhcnlbcCAuLiBpXWAgaXMgbGVzcyB0aGFuIG9yIGVxdWFsIHRvIHRoZSBwaXZvdC5cbiAgICAvL1xuICAgIC8vICAgKiBFdmVyeSBlbGVtZW50IGluIGBhcnlbaSsxIC4uIGotMV1gIGlzIGdyZWF0ZXIgdGhhbiB0aGUgcGl2b3QuXG4gICAgZm9yICh2YXIgaiA9IHA7IGogPCByOyBqKyspIHtcbiAgICAgIGlmIChjb21wYXJhdG9yKGFyeVtqXSwgcGl2b3QpIDw9IDApIHtcbiAgICAgICAgaSArPSAxO1xuICAgICAgICBzd2FwKGFyeSwgaSwgaik7XG4gICAgICB9XG4gICAgfVxuXG4gICAgc3dhcChhcnksIGkgKyAxLCBqKTtcbiAgICB2YXIgcSA9IGkgKyAxO1xuXG4gICAgLy8gKDIpIFJlY3Vyc2Ugb24gZWFjaCBoYWxmLlxuXG4gICAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBwLCBxIC0gMSk7XG4gICAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBxICsgMSwgcik7XG4gIH1cbn1cblxuLyoqXG4gKiBTb3J0IHRoZSBnaXZlbiBhcnJheSBpbi1wbGFjZSB3aXRoIHRoZSBnaXZlbiBjb21wYXJhdG9yIGZ1bmN0aW9uLlxuICpcbiAqIEBwYXJhbSB7QXJyYXl9IGFyeVxuICogICAgICAgIEFuIGFycmF5IHRvIHNvcnQuXG4gKiBAcGFyYW0ge2Z1bmN0aW9ufSBjb21wYXJhdG9yXG4gKiAgICAgICAgRnVuY3Rpb24gdG8gdXNlIHRvIGNvbXBhcmUgdHdvIGl0ZW1zLlxuICovXG5leHBvcnRzLnF1aWNrU29ydCA9IGZ1bmN0aW9uIChhcnksIGNvbXBhcmF0b3IpIHtcbiAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCAwLCBhcnkubGVuZ3RoIC0gMSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvcXVpY2stc29ydC5qc1xuLy8gbW9kdWxlIGlkID0gOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciBTb3VyY2VNYXBHZW5lcmF0b3IgPSByZXF1aXJlKCcuL3NvdXJjZS1tYXAtZ2VuZXJhdG9yJykuU291cmNlTWFwR2VuZXJhdG9yO1xudmFyIHV0aWwgPSByZXF1aXJlKCcuL3V0aWwnKTtcblxuLy8gTWF0Y2hlcyBhIFdpbmRvd3Mtc3R5bGUgYFxcclxcbmAgbmV3bGluZSBvciBhIGBcXG5gIG5ld2xpbmUgdXNlZCBieSBhbGwgb3RoZXJcbi8vIG9wZXJhdGluZyBzeXN0ZW1zIHRoZXNlIGRheXMgKGNhcHR1cmluZyB0aGUgcmVzdWx0KS5cbnZhciBSRUdFWF9ORVdMSU5FID0gLyhcXHI/XFxuKS87XG5cbi8vIE5ld2xpbmUgY2hhcmFjdGVyIGNvZGUgZm9yIGNoYXJDb2RlQXQoKSBjb21wYXJpc29uc1xudmFyIE5FV0xJTkVfQ09ERSA9IDEwO1xuXG4vLyBQcml2YXRlIHN5bWJvbCBmb3IgaWRlbnRpZnlpbmcgYFNvdXJjZU5vZGVgcyB3aGVuIG11bHRpcGxlIHZlcnNpb25zIG9mXG4vLyB0aGUgc291cmNlLW1hcCBsaWJyYXJ5IGFyZSBsb2FkZWQuIFRoaXMgTVVTVCBOT1QgQ0hBTkdFIGFjcm9zc1xuLy8gdmVyc2lvbnMhXG52YXIgaXNTb3VyY2VOb2RlID0gXCIkJCRpc1NvdXJjZU5vZGUkJCRcIjtcblxuLyoqXG4gKiBTb3VyY2VOb2RlcyBwcm92aWRlIGEgd2F5IHRvIGFic3RyYWN0IG92ZXIgaW50ZXJwb2xhdGluZy9jb25jYXRlbmF0aW5nXG4gKiBzbmlwcGV0cyBvZiBnZW5lcmF0ZWQgSmF2YVNjcmlwdCBzb3VyY2UgY29kZSB3aGlsZSBtYWludGFpbmluZyB0aGUgbGluZSBhbmRcbiAqIGNvbHVtbiBpbmZvcm1hdGlvbiBhc3NvY2lhdGVkIHdpdGggdGhlIG9yaWdpbmFsIHNvdXJjZSBjb2RlLlxuICpcbiAqIEBwYXJhbSBhTGluZSBUaGUgb3JpZ2luYWwgbGluZSBudW1iZXIuXG4gKiBAcGFyYW0gYUNvbHVtbiBUaGUgb3JpZ2luYWwgY29sdW1uIG51bWJlci5cbiAqIEBwYXJhbSBhU291cmNlIFRoZSBvcmlnaW5hbCBzb3VyY2UncyBmaWxlbmFtZS5cbiAqIEBwYXJhbSBhQ2h1bmtzIE9wdGlvbmFsLiBBbiBhcnJheSBvZiBzdHJpbmdzIHdoaWNoIGFyZSBzbmlwcGV0cyBvZlxuICogICAgICAgIGdlbmVyYXRlZCBKUywgb3Igb3RoZXIgU291cmNlTm9kZXMuXG4gKiBAcGFyYW0gYU5hbWUgVGhlIG9yaWdpbmFsIGlkZW50aWZpZXIuXG4gKi9cbmZ1bmN0aW9uIFNvdXJjZU5vZGUoYUxpbmUsIGFDb2x1bW4sIGFTb3VyY2UsIGFDaHVua3MsIGFOYW1lKSB7XG4gIHRoaXMuY2hpbGRyZW4gPSBbXTtcbiAgdGhpcy5zb3VyY2VDb250ZW50cyA9IHt9O1xuICB0aGlzLmxpbmUgPSBhTGluZSA9PSBudWxsID8gbnVsbCA6IGFMaW5lO1xuICB0aGlzLmNvbHVtbiA9IGFDb2x1bW4gPT0gbnVsbCA/IG51bGwgOiBhQ29sdW1uO1xuICB0aGlzLnNvdXJjZSA9IGFTb3VyY2UgPT0gbnVsbCA/IG51bGwgOiBhU291cmNlO1xuICB0aGlzLm5hbWUgPSBhTmFtZSA9PSBudWxsID8gbnVsbCA6IGFOYW1lO1xuICB0aGlzW2lzU291cmNlTm9kZV0gPSB0cnVlO1xuICBpZiAoYUNodW5rcyAhPSBudWxsKSB0aGlzLmFkZChhQ2h1bmtzKTtcbn1cblxuLyoqXG4gKiBDcmVhdGVzIGEgU291cmNlTm9kZSBmcm9tIGdlbmVyYXRlZCBjb2RlIGFuZCBhIFNvdXJjZU1hcENvbnN1bWVyLlxuICpcbiAqIEBwYXJhbSBhR2VuZXJhdGVkQ29kZSBUaGUgZ2VuZXJhdGVkIGNvZGVcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIFNvdXJjZU1hcCBmb3IgdGhlIGdlbmVyYXRlZCBjb2RlXG4gKiBAcGFyYW0gYVJlbGF0aXZlUGF0aCBPcHRpb25hbC4gVGhlIHBhdGggdGhhdCByZWxhdGl2ZSBzb3VyY2VzIGluIHRoZVxuICogICAgICAgIFNvdXJjZU1hcENvbnN1bWVyIHNob3VsZCBiZSByZWxhdGl2ZSB0by5cbiAqL1xuU291cmNlTm9kZS5mcm9tU3RyaW5nV2l0aFNvdXJjZU1hcCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU5vZGVfZnJvbVN0cmluZ1dpdGhTb3VyY2VNYXAoYUdlbmVyYXRlZENvZGUsIGFTb3VyY2VNYXBDb25zdW1lciwgYVJlbGF0aXZlUGF0aCkge1xuICAgIC8vIFRoZSBTb3VyY2VOb2RlIHdlIHdhbnQgdG8gZmlsbCB3aXRoIHRoZSBnZW5lcmF0ZWQgY29kZVxuICAgIC8vIGFuZCB0aGUgU291cmNlTWFwXG4gICAgdmFyIG5vZGUgPSBuZXcgU291cmNlTm9kZSgpO1xuXG4gICAgLy8gQWxsIGV2ZW4gaW5kaWNlcyBvZiB0aGlzIGFycmF5IGFyZSBvbmUgbGluZSBvZiB0aGUgZ2VuZXJhdGVkIGNvZGUsXG4gICAgLy8gd2hpbGUgYWxsIG9kZCBpbmRpY2VzIGFyZSB0aGUgbmV3bGluZXMgYmV0d2VlbiB0d28gYWRqYWNlbnQgbGluZXNcbiAgICAvLyAoc2luY2UgYFJFR0VYX05FV0xJTkVgIGNhcHR1cmVzIGl0cyBtYXRjaCkuXG4gICAgLy8gUHJvY2Vzc2VkIGZyYWdtZW50cyBhcmUgYWNjZXNzZWQgYnkgY2FsbGluZyBgc2hpZnROZXh0TGluZWAuXG4gICAgdmFyIHJlbWFpbmluZ0xpbmVzID0gYUdlbmVyYXRlZENvZGUuc3BsaXQoUkVHRVhfTkVXTElORSk7XG4gICAgdmFyIHJlbWFpbmluZ0xpbmVzSW5kZXggPSAwO1xuICAgIHZhciBzaGlmdE5leHRMaW5lID0gZnVuY3Rpb24oKSB7XG4gICAgICB2YXIgbGluZUNvbnRlbnRzID0gZ2V0TmV4dExpbmUoKTtcbiAgICAgIC8vIFRoZSBsYXN0IGxpbmUgb2YgYSBmaWxlIG1pZ2h0IG5vdCBoYXZlIGEgbmV3bGluZS5cbiAgICAgIHZhciBuZXdMaW5lID0gZ2V0TmV4dExpbmUoKSB8fCBcIlwiO1xuICAgICAgcmV0dXJuIGxpbmVDb250ZW50cyArIG5ld0xpbmU7XG5cbiAgICAgIGZ1bmN0aW9uIGdldE5leHRMaW5lKCkge1xuICAgICAgICByZXR1cm4gcmVtYWluaW5nTGluZXNJbmRleCA8IHJlbWFpbmluZ0xpbmVzLmxlbmd0aCA/XG4gICAgICAgICAgICByZW1haW5pbmdMaW5lc1tyZW1haW5pbmdMaW5lc0luZGV4KytdIDogdW5kZWZpbmVkO1xuICAgICAgfVxuICAgIH07XG5cbiAgICAvLyBXZSBuZWVkIHRvIHJlbWVtYmVyIHRoZSBwb3NpdGlvbiBvZiBcInJlbWFpbmluZ0xpbmVzXCJcbiAgICB2YXIgbGFzdEdlbmVyYXRlZExpbmUgPSAxLCBsYXN0R2VuZXJhdGVkQ29sdW1uID0gMDtcblxuICAgIC8vIFRoZSBnZW5lcmF0ZSBTb3VyY2VOb2RlcyB3ZSBuZWVkIGEgY29kZSByYW5nZS5cbiAgICAvLyBUbyBleHRyYWN0IGl0IGN1cnJlbnQgYW5kIGxhc3QgbWFwcGluZyBpcyB1c2VkLlxuICAgIC8vIEhlcmUgd2Ugc3RvcmUgdGhlIGxhc3QgbWFwcGluZy5cbiAgICB2YXIgbGFzdE1hcHBpbmcgPSBudWxsO1xuXG4gICAgYVNvdXJjZU1hcENvbnN1bWVyLmVhY2hNYXBwaW5nKGZ1bmN0aW9uIChtYXBwaW5nKSB7XG4gICAgICBpZiAobGFzdE1hcHBpbmcgIT09IG51bGwpIHtcbiAgICAgICAgLy8gV2UgYWRkIHRoZSBjb2RlIGZyb20gXCJsYXN0TWFwcGluZ1wiIHRvIFwibWFwcGluZ1wiOlxuICAgICAgICAvLyBGaXJzdCBjaGVjayBpZiB0aGVyZSBpcyBhIG5ldyBsaW5lIGluIGJldHdlZW4uXG4gICAgICAgIGlmIChsYXN0R2VuZXJhdGVkTGluZSA8IG1hcHBpbmcuZ2VuZXJhdGVkTGluZSkge1xuICAgICAgICAgIC8vIEFzc29jaWF0ZSBmaXJzdCBsaW5lIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgICAgYWRkTWFwcGluZ1dpdGhDb2RlKGxhc3RNYXBwaW5nLCBzaGlmdE5leHRMaW5lKCkpO1xuICAgICAgICAgIGxhc3RHZW5lcmF0ZWRMaW5lKys7XG4gICAgICAgICAgbGFzdEdlbmVyYXRlZENvbHVtbiA9IDA7XG4gICAgICAgICAgLy8gVGhlIHJlbWFpbmluZyBjb2RlIGlzIGFkZGVkIHdpdGhvdXQgbWFwcGluZ1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIFRoZXJlIGlzIG5vIG5ldyBsaW5lIGluIGJldHdlZW4uXG4gICAgICAgICAgLy8gQXNzb2NpYXRlIHRoZSBjb2RlIGJldHdlZW4gXCJsYXN0R2VuZXJhdGVkQ29sdW1uXCIgYW5kXG4gICAgICAgICAgLy8gXCJtYXBwaW5nLmdlbmVyYXRlZENvbHVtblwiIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgICAgdmFyIG5leHRMaW5lID0gcmVtYWluaW5nTGluZXNbcmVtYWluaW5nTGluZXNJbmRleF07XG4gICAgICAgICAgdmFyIGNvZGUgPSBuZXh0TGluZS5zdWJzdHIoMCwgbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4gLVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RHZW5lcmF0ZWRDb2x1bW4pO1xuICAgICAgICAgIHJlbWFpbmluZ0xpbmVzW3JlbWFpbmluZ0xpbmVzSW5kZXhdID0gbmV4dExpbmUuc3Vic3RyKG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uIC1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uKTtcbiAgICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uID0gbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW47XG4gICAgICAgICAgYWRkTWFwcGluZ1dpdGhDb2RlKGxhc3RNYXBwaW5nLCBjb2RlKTtcbiAgICAgICAgICAvLyBObyBtb3JlIHJlbWFpbmluZyBjb2RlLCBjb250aW51ZVxuICAgICAgICAgIGxhc3RNYXBwaW5nID0gbWFwcGluZztcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIC8vIFdlIGFkZCB0aGUgZ2VuZXJhdGVkIGNvZGUgdW50aWwgdGhlIGZpcnN0IG1hcHBpbmdcbiAgICAgIC8vIHRvIHRoZSBTb3VyY2VOb2RlIHdpdGhvdXQgYW55IG1hcHBpbmcuXG4gICAgICAvLyBFYWNoIGxpbmUgaXMgYWRkZWQgYXMgc2VwYXJhdGUgc3RyaW5nLlxuICAgICAgd2hpbGUgKGxhc3RHZW5lcmF0ZWRMaW5lIDwgbWFwcGluZy5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIG5vZGUuYWRkKHNoaWZ0TmV4dExpbmUoKSk7XG4gICAgICAgIGxhc3RHZW5lcmF0ZWRMaW5lKys7XG4gICAgICB9XG4gICAgICBpZiAobGFzdEdlbmVyYXRlZENvbHVtbiA8IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uKSB7XG4gICAgICAgIHZhciBuZXh0TGluZSA9IHJlbWFpbmluZ0xpbmVzW3JlbWFpbmluZ0xpbmVzSW5kZXhdO1xuICAgICAgICBub2RlLmFkZChuZXh0TGluZS5zdWJzdHIoMCwgbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4pKTtcbiAgICAgICAgcmVtYWluaW5nTGluZXNbcmVtYWluaW5nTGluZXNJbmRleF0gPSBuZXh0TGluZS5zdWJzdHIobWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4pO1xuICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uID0gbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW47XG4gICAgICB9XG4gICAgICBsYXN0TWFwcGluZyA9IG1hcHBpbmc7XG4gICAgfSwgdGhpcyk7XG4gICAgLy8gV2UgaGF2ZSBwcm9jZXNzZWQgYWxsIG1hcHBpbmdzLlxuICAgIGlmIChyZW1haW5pbmdMaW5lc0luZGV4IDwgcmVtYWluaW5nTGluZXMubGVuZ3RoKSB7XG4gICAgICBpZiAobGFzdE1hcHBpbmcpIHtcbiAgICAgICAgLy8gQXNzb2NpYXRlIHRoZSByZW1haW5pbmcgY29kZSBpbiB0aGUgY3VycmVudCBsaW5lIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgIGFkZE1hcHBpbmdXaXRoQ29kZShsYXN0TWFwcGluZywgc2hpZnROZXh0TGluZSgpKTtcbiAgICAgIH1cbiAgICAgIC8vIGFuZCBhZGQgdGhlIHJlbWFpbmluZyBsaW5lcyB3aXRob3V0IGFueSBtYXBwaW5nXG4gICAgICBub2RlLmFkZChyZW1haW5pbmdMaW5lcy5zcGxpY2UocmVtYWluaW5nTGluZXNJbmRleCkuam9pbihcIlwiKSk7XG4gICAgfVxuXG4gICAgLy8gQ29weSBzb3VyY2VzQ29udGVudCBpbnRvIFNvdXJjZU5vZGVcbiAgICBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlcy5mb3JFYWNoKGZ1bmN0aW9uIChzb3VyY2VGaWxlKSB7XG4gICAgICB2YXIgY29udGVudCA9IGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VDb250ZW50Rm9yKHNvdXJjZUZpbGUpO1xuICAgICAgaWYgKGNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgICBpZiAoYVJlbGF0aXZlUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBzb3VyY2VGaWxlKTtcbiAgICAgICAgfVxuICAgICAgICBub2RlLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gbm9kZTtcblxuICAgIGZ1bmN0aW9uIGFkZE1hcHBpbmdXaXRoQ29kZShtYXBwaW5nLCBjb2RlKSB7XG4gICAgICBpZiAobWFwcGluZyA9PT0gbnVsbCB8fCBtYXBwaW5nLnNvdXJjZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIG5vZGUuYWRkKGNvZGUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICA/IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICA6IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtIGFDaHVuayBBIHN0cmluZyBzbmlwcGV0IG9mIGdlbmVyYXRlZCBKUyBjb2RlLCBhbm90aGVyIGluc3RhbmNlIG9mXG4gKiAgICAgICAgU291cmNlTm9kZSwgb3IgYW4gYXJyYXkgd2hlcmUgZWFjaCBtZW1iZXIgaXMgb25lIG9mIHRob3NlIHRoaW5ncy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gU291cmNlTm9kZV9hZGQoYUNodW5rKSB7XG4gIGlmIChBcnJheS5pc0FycmF5KGFDaHVuaykpIHtcbiAgICBhQ2h1bmsuZm9yRWFjaChmdW5jdGlvbiAoY2h1bmspIHtcbiAgICAgIHRoaXMuYWRkKGNodW5rKTtcbiAgICB9LCB0aGlzKTtcbiAgfVxuICBlbHNlIGlmIChhQ2h1bmtbaXNTb3VyY2VOb2RlXSB8fCB0eXBlb2YgYUNodW5rID09PSBcInN0cmluZ1wiKSB7XG4gICAgaWYgKGFDaHVuaykge1xuICAgICAgdGhpcy5jaGlsZHJlbi5wdXNoKGFDaHVuayk7XG4gICAgfVxuICB9XG4gIGVsc2Uge1xuICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICBcIkV4cGVjdGVkIGEgU291cmNlTm9kZSwgc3RyaW5nLCBvciBhbiBhcnJheSBvZiBTb3VyY2VOb2RlcyBhbmQgc3RyaW5ncy4gR290IFwiICsgYUNodW5rXG4gICAgKTtcbiAgfVxuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoZSBiZWdpbm5pbmcgb2YgdGhpcyBzb3VyY2Ugbm9kZS5cbiAqXG4gKiBAcGFyYW0gYUNodW5rIEEgc3RyaW5nIHNuaXBwZXQgb2YgZ2VuZXJhdGVkIEpTIGNvZGUsIGFub3RoZXIgaW5zdGFuY2Ugb2ZcbiAqICAgICAgICBTb3VyY2VOb2RlLCBvciBhbiBhcnJheSB3aGVyZSBlYWNoIG1lbWJlciBpcyBvbmUgb2YgdGhvc2UgdGhpbmdzLlxuICovXG5Tb3VyY2VOb2RlLnByb3RvdHlwZS5wcmVwZW5kID0gZnVuY3Rpb24gU291cmNlTm9kZV9wcmVwZW5kKGFDaHVuaykge1xuICBpZiAoQXJyYXkuaXNBcnJheShhQ2h1bmspKSB7XG4gICAgZm9yICh2YXIgaSA9IGFDaHVuay5sZW5ndGgtMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgIHRoaXMucHJlcGVuZChhQ2h1bmtbaV0pO1xuICAgIH1cbiAgfVxuICBlbHNlIGlmIChhQ2h1bmtbaXNTb3VyY2VOb2RlXSB8fCB0eXBlb2YgYUNodW5rID09PSBcInN0cmluZ1wiKSB7XG4gICAgdGhpcy5jaGlsZHJlbi51bnNoaWZ0KGFDaHVuayk7XG4gIH1cbiAgZWxzZSB7XG4gICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgIFwiRXhwZWN0ZWQgYSBTb3VyY2VOb2RlLCBzdHJpbmcsIG9yIGFuIGFycmF5IG9mIFNvdXJjZU5vZGVzIGFuZCBzdHJpbmdzLiBHb3QgXCIgKyBhQ2h1bmtcbiAgICApO1xuICB9XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBXYWxrIG92ZXIgdGhlIHRyZWUgb2YgSlMgc25pcHBldHMgaW4gdGhpcyBub2RlIGFuZCBpdHMgY2hpbGRyZW4uIFRoZVxuICogd2Fsa2luZyBmdW5jdGlvbiBpcyBjYWxsZWQgb25jZSBmb3IgZWFjaCBzbmlwcGV0IG9mIEpTIGFuZCBpcyBwYXNzZWQgdGhhdFxuICogc25pcHBldCBhbmQgdGhlIGl0cyBvcmlnaW5hbCBhc3NvY2lhdGVkIHNvdXJjZSdzIGxpbmUvY29sdW1uIGxvY2F0aW9uLlxuICpcbiAqIEBwYXJhbSBhRm4gVGhlIHRyYXZlcnNhbCBmdW5jdGlvbi5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUud2FsayA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfd2FsayhhRm4pIHtcbiAgdmFyIGNodW5rO1xuICBmb3IgKHZhciBpID0gMCwgbGVuID0gdGhpcy5jaGlsZHJlbi5sZW5ndGg7IGkgPCBsZW47IGkrKykge1xuICAgIGNodW5rID0gdGhpcy5jaGlsZHJlbltpXTtcbiAgICBpZiAoY2h1bmtbaXNTb3VyY2VOb2RlXSkge1xuICAgICAgY2h1bmsud2FsayhhRm4pO1xuICAgIH1cbiAgICBlbHNlIHtcbiAgICAgIGlmIChjaHVuayAhPT0gJycpIHtcbiAgICAgICAgYUZuKGNodW5rLCB7IHNvdXJjZTogdGhpcy5zb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgICBsaW5lOiB0aGlzLmxpbmUsXG4gICAgICAgICAgICAgICAgICAgICBjb2x1bW46IHRoaXMuY29sdW1uLFxuICAgICAgICAgICAgICAgICAgICAgbmFtZTogdGhpcy5uYW1lIH0pO1xuICAgICAgfVxuICAgIH1cbiAgfVxufTtcblxuLyoqXG4gKiBMaWtlIGBTdHJpbmcucHJvdG90eXBlLmpvaW5gIGV4Y2VwdCBmb3IgU291cmNlTm9kZXMuIEluc2VydHMgYGFTdHJgIGJldHdlZW5cbiAqIGVhY2ggb2YgYHRoaXMuY2hpbGRyZW5gLlxuICpcbiAqIEBwYXJhbSBhU2VwIFRoZSBzZXBhcmF0b3IuXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLmpvaW4gPSBmdW5jdGlvbiBTb3VyY2VOb2RlX2pvaW4oYVNlcCkge1xuICB2YXIgbmV3Q2hpbGRyZW47XG4gIHZhciBpO1xuICB2YXIgbGVuID0gdGhpcy5jaGlsZHJlbi5sZW5ndGg7XG4gIGlmIChsZW4gPiAwKSB7XG4gICAgbmV3Q2hpbGRyZW4gPSBbXTtcbiAgICBmb3IgKGkgPSAwOyBpIDwgbGVuLTE7IGkrKykge1xuICAgICAgbmV3Q2hpbGRyZW4ucHVzaCh0aGlzLmNoaWxkcmVuW2ldKTtcbiAgICAgIG5ld0NoaWxkcmVuLnB1c2goYVNlcCk7XG4gICAgfVxuICAgIG5ld0NoaWxkcmVuLnB1c2godGhpcy5jaGlsZHJlbltpXSk7XG4gICAgdGhpcy5jaGlsZHJlbiA9IG5ld0NoaWxkcmVuO1xuICB9XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBDYWxsIFN0cmluZy5wcm90b3R5cGUucmVwbGFjZSBvbiB0aGUgdmVyeSByaWdodC1tb3N0IHNvdXJjZSBzbmlwcGV0LiBVc2VmdWxcbiAqIGZvciB0cmltbWluZyB3aGl0ZXNwYWNlIGZyb20gdGhlIGVuZCBvZiBhIHNvdXJjZSBub2RlLCBldGMuXG4gKlxuICogQHBhcmFtIGFQYXR0ZXJuIFRoZSBwYXR0ZXJuIHRvIHJlcGxhY2UuXG4gKiBAcGFyYW0gYVJlcGxhY2VtZW50IFRoZSB0aGluZyB0byByZXBsYWNlIHRoZSBwYXR0ZXJuIHdpdGguXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLnJlcGxhY2VSaWdodCA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfcmVwbGFjZVJpZ2h0KGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpIHtcbiAgdmFyIGxhc3RDaGlsZCA9IHRoaXMuY2hpbGRyZW5bdGhpcy5jaGlsZHJlbi5sZW5ndGggLSAxXTtcbiAgaWYgKGxhc3RDaGlsZFtpc1NvdXJjZU5vZGVdKSB7XG4gICAgbGFzdENoaWxkLnJlcGxhY2VSaWdodChhUGF0dGVybiwgYVJlcGxhY2VtZW50KTtcbiAgfVxuICBlbHNlIGlmICh0eXBlb2YgbGFzdENoaWxkID09PSAnc3RyaW5nJykge1xuICAgIHRoaXMuY2hpbGRyZW5bdGhpcy5jaGlsZHJlbi5sZW5ndGggLSAxXSA9IGxhc3RDaGlsZC5yZXBsYWNlKGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpO1xuICB9XG4gIGVsc2Uge1xuICAgIHRoaXMuY2hpbGRyZW4ucHVzaCgnJy5yZXBsYWNlKGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpKTtcbiAgfVxuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogU2V0IHRoZSBzb3VyY2UgY29udGVudCBmb3IgYSBzb3VyY2UgZmlsZS4gVGhpcyB3aWxsIGJlIGFkZGVkIHRvIHRoZSBTb3VyY2VNYXBHZW5lcmF0b3JcbiAqIGluIHRoZSBzb3VyY2VzQ29udGVudCBmaWVsZC5cbiAqXG4gKiBAcGFyYW0gYVNvdXJjZUZpbGUgVGhlIGZpbGVuYW1lIG9mIHRoZSBzb3VyY2UgZmlsZVxuICogQHBhcmFtIGFTb3VyY2VDb250ZW50IFRoZSBjb250ZW50IG9mIHRoZSBzb3VyY2UgZmlsZVxuICovXG5Tb3VyY2VOb2RlLnByb3RvdHlwZS5zZXRTb3VyY2VDb250ZW50ID1cbiAgZnVuY3Rpb24gU291cmNlTm9kZV9zZXRTb3VyY2VDb250ZW50KGFTb3VyY2VGaWxlLCBhU291cmNlQ29udGVudCkge1xuICAgIHRoaXMuc291cmNlQ29udGVudHNbdXRpbC50b1NldFN0cmluZyhhU291cmNlRmlsZSldID0gYVNvdXJjZUNvbnRlbnQ7XG4gIH07XG5cbi8qKlxuICogV2FsayBvdmVyIHRoZSB0cmVlIG9mIFNvdXJjZU5vZGVzLiBUaGUgd2Fsa2luZyBmdW5jdGlvbiBpcyBjYWxsZWQgZm9yIGVhY2hcbiAqIHNvdXJjZSBmaWxlIGNvbnRlbnQgYW5kIGlzIHBhc3NlZCB0aGUgZmlsZW5hbWUgYW5kIHNvdXJjZSBjb250ZW50LlxuICpcbiAqIEBwYXJhbSBhRm4gVGhlIHRyYXZlcnNhbCBmdW5jdGlvbi5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUud2Fsa1NvdXJjZUNvbnRlbnRzID1cbiAgZnVuY3Rpb24gU291cmNlTm9kZV93YWxrU291cmNlQ29udGVudHMoYUZuKSB7XG4gICAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IHRoaXMuY2hpbGRyZW4ubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcbiAgICAgIGlmICh0aGlzLmNoaWxkcmVuW2ldW2lzU291cmNlTm9kZV0pIHtcbiAgICAgICAgdGhpcy5jaGlsZHJlbltpXS53YWxrU291cmNlQ29udGVudHMoYUZuKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICB2YXIgc291cmNlcyA9IE9iamVjdC5rZXlzKHRoaXMuc291cmNlQ29udGVudHMpO1xuICAgIGZvciAodmFyIGkgPSAwLCBsZW4gPSBzb3VyY2VzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICBhRm4odXRpbC5mcm9tU2V0U3RyaW5nKHNvdXJjZXNbaV0pLCB0aGlzLnNvdXJjZUNvbnRlbnRzW3NvdXJjZXNbaV1dKTtcbiAgICB9XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRoZSBzdHJpbmcgcmVwcmVzZW50YXRpb24gb2YgdGhpcyBzb3VyY2Ugbm9kZS4gV2Fsa3Mgb3ZlciB0aGUgdHJlZVxuICogYW5kIGNvbmNhdGVuYXRlcyBhbGwgdGhlIHZhcmlvdXMgc25pcHBldHMgdG9nZXRoZXIgdG8gb25lIHN0cmluZy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiBTb3VyY2VOb2RlX3RvU3RyaW5nKCkge1xuICB2YXIgc3RyID0gXCJcIjtcbiAgdGhpcy53YWxrKGZ1bmN0aW9uIChjaHVuaykge1xuICAgIHN0ciArPSBjaHVuaztcbiAgfSk7XG4gIHJldHVybiBzdHI7XG59O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIHN0cmluZyByZXByZXNlbnRhdGlvbiBvZiB0aGlzIHNvdXJjZSBub2RlIGFsb25nIHdpdGggYSBzb3VyY2VcbiAqIG1hcC5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUudG9TdHJpbmdXaXRoU291cmNlTWFwID0gZnVuY3Rpb24gU291cmNlTm9kZV90b1N0cmluZ1dpdGhTb3VyY2VNYXAoYUFyZ3MpIHtcbiAgdmFyIGdlbmVyYXRlZCA9IHtcbiAgICBjb2RlOiBcIlwiLFxuICAgIGxpbmU6IDEsXG4gICAgY29sdW1uOiAwXG4gIH07XG4gIHZhciBtYXAgPSBuZXcgU291cmNlTWFwR2VuZXJhdG9yKGFBcmdzKTtcbiAgdmFyIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgdmFyIGxhc3RPcmlnaW5hbFNvdXJjZSA9IG51bGw7XG4gIHZhciBsYXN0T3JpZ2luYWxMaW5lID0gbnVsbDtcbiAgdmFyIGxhc3RPcmlnaW5hbENvbHVtbiA9IG51bGw7XG4gIHZhciBsYXN0T3JpZ2luYWxOYW1lID0gbnVsbDtcbiAgdGhpcy53YWxrKGZ1bmN0aW9uIChjaHVuaywgb3JpZ2luYWwpIHtcbiAgICBnZW5lcmF0ZWQuY29kZSArPSBjaHVuaztcbiAgICBpZiAob3JpZ2luYWwuc291cmNlICE9PSBudWxsXG4gICAgICAgICYmIG9yaWdpbmFsLmxpbmUgIT09IG51bGxcbiAgICAgICAgJiYgb3JpZ2luYWwuY29sdW1uICE9PSBudWxsKSB7XG4gICAgICBpZihsYXN0T3JpZ2luYWxTb3VyY2UgIT09IG9yaWdpbmFsLnNvdXJjZVxuICAgICAgICAgfHwgbGFzdE9yaWdpbmFsTGluZSAhPT0gb3JpZ2luYWwubGluZVxuICAgICAgICAgfHwgbGFzdE9yaWdpbmFsQ29sdW1uICE9PSBvcmlnaW5hbC5jb2x1bW5cbiAgICAgICAgIHx8IGxhc3RPcmlnaW5hbE5hbWUgIT09IG9yaWdpbmFsLm5hbWUpIHtcbiAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgIHNvdXJjZTogb3JpZ2luYWwuc291cmNlLFxuICAgICAgICAgIG9yaWdpbmFsOiB7XG4gICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgY29sdW1uOiBvcmlnaW5hbC5jb2x1bW5cbiAgICAgICAgICB9LFxuICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgbGluZTogZ2VuZXJhdGVkLmxpbmUsXG4gICAgICAgICAgICBjb2x1bW46IGdlbmVyYXRlZC5jb2x1bW5cbiAgICAgICAgICB9LFxuICAgICAgICAgIG5hbWU6IG9yaWdpbmFsLm5hbWVcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBvcmlnaW5hbC5zb3VyY2U7XG4gICAgICBsYXN0T3JpZ2luYWxMaW5lID0gb3JpZ2luYWwubGluZTtcbiAgICAgIGxhc3RPcmlnaW5hbENvbHVtbiA9IG9yaWdpbmFsLmNvbHVtbjtcbiAgICAgIGxhc3RPcmlnaW5hbE5hbWUgPSBvcmlnaW5hbC5uYW1lO1xuICAgICAgc291cmNlTWFwcGluZ0FjdGl2ZSA9IHRydWU7XG4gICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICBtYXAuYWRkTWFwcGluZyh7XG4gICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgIGxpbmU6IGdlbmVyYXRlZC5saW5lLFxuICAgICAgICAgIGNvbHVtbjogZ2VuZXJhdGVkLmNvbHVtblxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGxhc3RPcmlnaW5hbFNvdXJjZSA9IG51bGw7XG4gICAgICBzb3VyY2VNYXBwaW5nQWN0aXZlID0gZmFsc2U7XG4gICAgfVxuICAgIGZvciAodmFyIGlkeCA9IDAsIGxlbmd0aCA9IGNodW5rLmxlbmd0aDsgaWR4IDwgbGVuZ3RoOyBpZHgrKykge1xuICAgICAgaWYgKGNodW5rLmNoYXJDb2RlQXQoaWR4KSA9PT0gTkVXTElORV9DT0RFKSB7XG4gICAgICAgIGdlbmVyYXRlZC5saW5lKys7XG4gICAgICAgIGdlbmVyYXRlZC5jb2x1bW4gPSAwO1xuICAgICAgICAvLyBNYXBwaW5ncyBlbmQgYXQgZW9sXG4gICAgICAgIGlmIChpZHggKyAxID09PSBsZW5ndGgpIHtcbiAgICAgICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBudWxsO1xuICAgICAgICAgIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgICAgICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgICAgc291cmNlOiBvcmlnaW5hbC5zb3VyY2UsXG4gICAgICAgICAgICBvcmlnaW5hbDoge1xuICAgICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcbiAgdGhpcy53YWxrU291cmNlQ29udGVudHMoZnVuY3Rpb24gKHNvdXJjZUZpbGUsIHNvdXJjZUNvbnRlbnQpIHtcbiAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHsgY29kZTogZ2VuZXJhdGVkLmNvZGUsIG1hcDogbWFwIH07XG59O1xuXG5leHBvcnRzLlNvdXJjZU5vZGUgPSBTb3VyY2VOb2RlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW5vZGUuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/source-map/dist/source-map.js b/node_modules/@babel/core/node_modules/source-map/dist/source-map.js deleted file mode 100644 index 4e630e29..00000000 --- a/node_modules/@babel/core/node_modules/source-map/dist/source-map.js +++ /dev/null @@ -1,3090 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. 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 Google 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 THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/source-map/dist/source-map.min.js b/node_modules/@babel/core/node_modules/source-map/dist/source-map.min.js deleted file mode 100644 index f2a46bd0..00000000 --- a/node_modules/@babel/core/node_modules/source-map/dist/source-map.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&r.setSourceContent(n,t)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),f=0,d=h.length;f0){if(!i.compareByGeneratedPositionsInflated(n,h[f-1]))continue;e+=","}e+=o.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(t=this._sources.indexOf(n.source),e+=o.encode(t-g),g=t,e+=o.encode(n.originalLine-1-l),l=n.originalLine-1,e+=o.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(r=this._names.indexOf(n.name),e+=o.encode(r-c),c=r)),p+=e}return p},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return e<0?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(_))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return e}function l(e){return g(e)?"$"+e:e}function c(e){return g(e)?e.slice(1):e}function g(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,n,r){var t=e.source-n.source;return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:e.name-n.name))))}function h(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=e.source-n.source,0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:e.name-n.name))))}function f(e,n){return e===n?0:e>n?1:-1}function d(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=f(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:f(e.name,n.name)))))}n.getArg=r;var m=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,_=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(m)},n.relative=a;var v=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=v?u:l,n.fromSetString=v?u:c,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d},function(e,n,r){function t(){this._array=[],this._set=s?new Map:Object.create(null)}var o=r(4),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;o=0)return n}else{var r=o.toSetString(e);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&er||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e){var n=e;return"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=n.sections?new s(n):new o(n)}function o(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),t=a.getArg(n,"sources"),o=a.getArg(n,"names",[]),i=a.getArg(n,"sourceRoot",null),s=a.getArg(n,"sourcesContent",null),u=a.getArg(n,"mappings"),c=a.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);t=t.map(String).map(a.normalize).map(function(e){return i&&a.isAbsolute(i)&&a.isAbsolute(e)?a.relative(i,e):e}),this._names=l.fromArray(o.map(String),!0),this._sources=l.fromArray(t,!0),this.sourceRoot=i,this.sourcesContent=s,this._mappings=u,this.file=c}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),o=a.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var i={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=a.getArg(e,"offset"),r=a.getArg(n,"line"),o=a.getArg(n,"column");if(r=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.fromSourceMap=function(e){var n=Object.create(o.prototype),r=n._names=l.fromArray(e._names.toArray(),!0),t=n._sources=l.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var s=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=s.length;p1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),S.push(r),"number"==typeof r.originalLine&&A.push(r)}g(S,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,g(A,a.compareByOriginalPositions),this.__originalMappings=A},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=a.join(this.sourceRoot,i)));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=a.urlParse(this.sourceRoot))){var t=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};n=this._sources.indexOf(n);var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(i=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;r0){for(n=[],r=0;r 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\n\t else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t };\n\t\n\t/**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\tSourceMapGenerator.prototype._serializeMappings =\n\t function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var next;\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = ''\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t next += ',';\n\t }\n\t }\n\t\n\t next += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t next += base64VLQ.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t\n\t // lines are stored 0-based in SourceMap spec version 3\n\t next += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t next += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t next += base64VLQ.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\t\n\t result += next;\n\t }\n\t\n\t return result;\n\t };\n\t\n\tSourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t/**\n\t * Externalize the source map.\n\t */\n\tSourceMapGenerator.prototype.toJSON =\n\t function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t/**\n\t * Render the source map being generated to a string.\n\t */\n\tSourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\texports.SourceMapGenerator = SourceMapGenerator;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t\n\tvar base64 = __webpack_require__(3);\n\t\n\t// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t// length quantities we use in the source map spec, the first bit is the sign,\n\t// the next four bits are the actual value, and the 6th bit is the\n\t// continuation bit. The continuation bit tells us whether there are more\n\t// digits in this value following this digit.\n\t//\n\t// Continuation\n\t// | Sign\n\t// | |\n\t// V V\n\t// 101011\n\t\n\tvar VLQ_BASE_SHIFT = 5;\n\t\n\t// binary: 100000\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t// binary: 011111\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t// binary: 100000\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t/**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t}\n\t\n\t/**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t}\n\t\n\t/**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\texports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t};\n\t\n\t/**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\texports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t/**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\texports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\t\n\t/**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\texports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t/**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\tfunction getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}\n\texports.getArg = getArg;\n\t\n\tvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\n\tvar dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\tfunction urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t}\n\texports.urlParse = urlParse;\n\t\n\tfunction urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t}\n\texports.urlGenerate = urlGenerate;\n\t\n\t/**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consecutive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\tfunction normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}\n\texports.normalize = normalize;\n\t\n\t/**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\tfunction join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t}\n\texports.join = join;\n\t\n\texports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n\t};\n\t\n\t/**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\tfunction relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t}\n\texports.relative = relative;\n\t\n\tvar supportsNullProto = (function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t}());\n\t\n\tfunction identity (s) {\n\t return s;\n\t}\n\t\n\t/**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\tfunction toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\t\n\t return aStr;\n\t}\n\texports.toSetString = supportsNullProto ? identity : toSetString;\n\t\n\tfunction fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\t\n\t return aStr;\n\t}\n\texports.fromSetString = supportsNullProto ? identity : fromSetString;\n\t\n\tfunction isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\t\n\t var length = s.length;\n\t\n\t if (length < 9 /* \"__proto__\".length */) {\n\t return false;\n\t }\n\t\n\t if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n\t s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n\t s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n\t s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 9) !== 95 /* '_' */) {\n\t return false;\n\t }\n\t\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36 /* '$' */) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\tfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t/**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\tfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\tfunction strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\tfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\t\n\t/**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\tfunction ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\t\n\t/**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\tArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t};\n\t\n\t/**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\tArraySet.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\t\n\t/**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t if (hasNativeMap) {\n\t this._set.set(aStr, idx);\n\t } else {\n\t this._set[sStr] = idx;\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.has = function ArraySet_has(aStr) {\n\t if (hasNativeMap) {\n\t return this._set.has(aStr);\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t return has.call(this._set, sStr);\n\t }\n\t};\n\t\n\t/**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t if (has.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\t\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\t\n\t/**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\tArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\t\n\t/**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\tArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\t\n\texports.ArraySet = ArraySet;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\t\n\t/**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\t\n\t/**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\tfunction MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t}\n\t\n\t/**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\tMappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t/**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\tMappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t};\n\t\n\t/**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\tMappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t};\n\t\n\texports.MappingList = MappingList;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar binarySearch = __webpack_require__(8);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar base64VLQ = __webpack_require__(2);\n\tvar quickSort = __webpack_require__(9).quickSort;\n\t\n\tfunction SourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap)\n\t : new BasicSourceMapConsumer(sourceMap);\n\t}\n\t\n\tSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n\t}\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tSourceMapConsumer.prototype._version = 3;\n\t\n\t// `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t// are lazily instantiated, accessed via the `_generatedMappings` and\n\t// `_originalMappings` getters respectively, and we only parse the mappings\n\t// and create these arrays once queried for a source location. We jump through\n\t// these hoops because there can be many thousands of mappings, and parsing\n\t// them is expensive, so we only want to do it if we must.\n\t//\n\t// Each object in the arrays is of the form:\n\t//\n\t// {\n\t// generatedLine: The line number in the generated code,\n\t// generatedColumn: The column number in the generated code,\n\t// source: The path to the original source file that generated this\n\t// chunk of code,\n\t// originalLine: The line number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// originalColumn: The column number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// name: The name of the original symbol which generated this chunk of\n\t// code.\n\t// }\n\t//\n\t// All properties except for `generatedLine` and `generatedColumn` can be\n\t// `null`.\n\t//\n\t// `_generatedMappings` is ordered by the generated positions.\n\t//\n\t// `_originalMappings` is ordered by the original positions.\n\t\n\tSourceMapConsumer.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\tSourceMapConsumer.GENERATED_ORDER = 1;\n\tSourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\tSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\tSourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t if (source != null && sourceRoot != null) {\n\t source = util.join(sourceRoot, source);\n\t }\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t/**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: Optional. the column number in the original source.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tSourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t if (this.sourceRoot != null) {\n\t needle.source = util.relative(this.sourceRoot, needle.source);\n\t }\n\t if (!this._sources.has(needle.source)) {\n\t return [];\n\t }\n\t needle.source = this._sources.indexOf(needle.source);\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\texports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t/**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The only parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\tfunction BasicSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t sources = sources\n\t .map(String)\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this.file = file;\n\t}\n\t\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t/**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @returns BasicSourceMapConsumer\n\t */\n\tBasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tBasicSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._sources.toArray().map(function (s) {\n\t return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n\t }, this);\n\t }\n\t});\n\t\n\t/**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tBasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t/**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\tBasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t/**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\tBasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t if (this.sourceRoot != null) {\n\t source = util.join(this.sourceRoot, source);\n\t }\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tBasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t if (this.sourceRoot != null) {\n\t aSource = util.relative(this.sourceRoot, aSource);\n\t }\n\t\n\t if (this._sources.has(aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(aSource)];\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t if (this.sourceRoot != null) {\n\t source = util.relative(this.sourceRoot, source);\n\t }\n\t if (!this._sources.has(source)) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t source = this._sources.indexOf(source);\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\texports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t/**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The only parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\tfunction IndexedSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n\t }\n\t });\n\t}\n\t\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t});\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tIndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tIndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t if (section.consumer.sourceRoot !== null) {\n\t source = util.join(section.consumer.sourceRoot, source);\n\t }\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\texports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\texports.GREATEST_LOWER_BOUND = 1;\n\texports.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\tfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\texports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t// It turns out that some (most?) JavaScript engines don't self-host\n\t// `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t// faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t// custom comparator function, calling back and forth between the VM's C++ and\n\t// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t// worse generated code for the comparator function than would be optimal. In\n\t// fact, when sorting with a comparator, these costs outweigh the benefits of\n\t// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t// a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t/**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\t\n\t/**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t}\n\t\n\t/**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\t\n\t/**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\texports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\tvar util = __webpack_require__(4);\n\t\n\t// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t// operating systems these days (capturing the result).\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t// Newline character code for charCodeAt() comparisons\n\tvar NEWLINE_CODE = 10;\n\t\n\t// Private symbol for identifying `SourceNode`s when multiple versions of\n\t// the source-map library are loaded. This MUST NOT CHANGE across\n\t// versions!\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t/**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\tfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\t\n\t/**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\tSourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are accessed by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\t var shiftNextLine = function() {\n\t var lineContents = getNextLine();\n\t // The last line of a file might not have a newline.\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\t\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ?\n\t remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\tSourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\tSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\tSourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t/**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t/**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\tSourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\t\n\t/**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\tSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t};\n\t\n\texports.SourceNode = SourceNode;\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// source-map.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 42c329f865e32e011afb","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./source-map.js\n// module id = 0\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-generator.js\n// module id = 1\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64-vlq.js\n// module id = 2\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64.js\n// module id = 3\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/util.js\n// module id = 4\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/array-set.js\n// module id = 5\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/mapping-list.js\n// module id = 6\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap)\n : new BasicSourceMapConsumer(sourceMap);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n if (source != null && sourceRoot != null) {\n source = util.join(sourceRoot, source);\n }\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: Optional. the column number in the original source.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n if (this.sourceRoot != null) {\n needle.source = util.relative(this.sourceRoot, needle.source);\n }\n if (!this._sources.has(needle.source)) {\n return [];\n }\n needle.source = this._sources.indexOf(needle.source);\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The only parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._sources.toArray().map(function (s) {\n return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n }, this);\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n if (this.sourceRoot != null) {\n source = util.join(this.sourceRoot, source);\n }\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n if (this.sourceRoot != null) {\n aSource = util.relative(this.sourceRoot, aSource);\n }\n\n if (this._sources.has(aSource)) {\n return this.sourcesContent[this._sources.indexOf(aSource)];\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + aSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n if (this.sourceRoot != null) {\n source = util.relative(this.sourceRoot, source);\n }\n if (!this._sources.has(source)) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n source = this._sources.indexOf(source);\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The only parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if (section.consumer.sourceRoot !== null) {\n source = util.join(section.consumer.sourceRoot, source);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-consumer.js\n// module id = 7\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/binary-search.js\n// module id = 8\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/quick-sort.js\n// module id = 9\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex];\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex];\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-node.js\n// module id = 10\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/@babel/core/node_modules/source-map/lib/array-set.js b/node_modules/@babel/core/node_modules/source-map/lib/array-set.js deleted file mode 100644 index fbd5c81c..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/array-set.js +++ /dev/null @@ -1,121 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var has = Object.prototype.hasOwnProperty; -var hasNativeMap = typeof Map !== "undefined"; - -/** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ -function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); -} - -/** - * Static method for creating ArraySet instances from an existing array. - */ -ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; -}; - -/** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ -ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; -}; - -/** - * Add the given string to this set. - * - * @param String aStr - */ -ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } -}; - -/** - * Is the given string a member of this set? - * - * @param String aStr - */ -ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } -}; - -/** - * What is the index of the given string in the array? - * - * @param String aStr - */ -ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); -}; - -/** - * What is the element at the given index? - * - * @param Number aIdx - */ -ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); -}; - -/** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ -ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); -}; - -exports.ArraySet = ArraySet; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/base64-vlq.js b/node_modules/@babel/core/node_modules/source-map/lib/base64-vlq.js deleted file mode 100644 index 612b4040..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/base64-vlq.js +++ /dev/null @@ -1,140 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. 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 Google 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 THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -var base64 = require('./base64'); - -// A single base 64 digit can contain 6 bits of data. For the base 64 variable -// length quantities we use in the source map spec, the first bit is the sign, -// the next four bits are the actual value, and the 6th bit is the -// continuation bit. The continuation bit tells us whether there are more -// digits in this value following this digit. -// -// Continuation -// | Sign -// | | -// V V -// 101011 - -var VLQ_BASE_SHIFT = 5; - -// binary: 100000 -var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - -// binary: 011111 -var VLQ_BASE_MASK = VLQ_BASE - 1; - -// binary: 100000 -var VLQ_CONTINUATION_BIT = VLQ_BASE; - -/** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ -function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; -} - -/** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ -function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; -} - -/** - * Returns the base 64 VLQ encoded value. - */ -exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; -}; - -/** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ -exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; -}; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/base64.js b/node_modules/@babel/core/node_modules/source-map/lib/base64.js deleted file mode 100644 index 8aa86b30..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/base64.js +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - -/** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ -exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); -}; - -/** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ -exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; -}; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/binary-search.js b/node_modules/@babel/core/node_modules/source-map/lib/binary-search.js deleted file mode 100644 index 010ac941..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/binary-search.js +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -exports.GREATEST_LOWER_BOUND = 1; -exports.LEAST_UPPER_BOUND = 2; - -/** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ -function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } -} - -/** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ -exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; -}; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/mapping-list.js b/node_modules/@babel/core/node_modules/source-map/lib/mapping-list.js deleted file mode 100644 index 06d1274a..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/mapping-list.js +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); - -/** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ -function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; -} - -/** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ -function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; -} - -/** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ -MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - -/** - * Add the given source mapping. - * - * @param Object aMapping - */ -MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } -}; - -/** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ -MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; -}; - -exports.MappingList = MappingList; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/quick-sort.js b/node_modules/@babel/core/node_modules/source-map/lib/quick-sort.js deleted file mode 100644 index 6a7caadb..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/quick-sort.js +++ /dev/null @@ -1,114 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -// It turns out that some (most?) JavaScript engines don't self-host -// `Array.prototype.sort`. This makes sense because C++ will likely remain -// faster than JS when doing raw CPU-intensive sorting. However, when using a -// custom comparator function, calling back and forth between the VM's C++ and -// JIT'd JS is rather slow *and* loses JIT type information, resulting in -// worse generated code for the comparator function than would be optimal. In -// fact, when sorting with a comparator, these costs outweigh the benefits of -// sorting in C++. By using our own JS-implemented Quick Sort (below), we get -// a ~3500ms mean speed-up in `bench/bench.html`. - -/** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ -function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; -} - -/** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ -function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); -} - -/** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ -function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } -} - -/** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ -exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); -}; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/source-map-consumer.js b/node_modules/@babel/core/node_modules/source-map/lib/source-map-consumer.js deleted file mode 100644 index 6abcc280..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/source-map-consumer.js +++ /dev/null @@ -1,1082 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var binarySearch = require('./binary-search'); -var ArraySet = require('./array-set').ArraySet; -var base64VLQ = require('./base64-vlq'); -var quickSort = require('./quick-sort').quickSort; - -function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); -} - -SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); -} - -/** - * The version of the source mapping spec that we are consuming. - */ -SourceMapConsumer.prototype._version = 3; - -// `__generatedMappings` and `__originalMappings` are arrays that hold the -// parsed mapping coordinates from the source map's "mappings" attribute. They -// are lazily instantiated, accessed via the `_generatedMappings` and -// `_originalMappings` getters respectively, and we only parse the mappings -// and create these arrays once queried for a source location. We jump through -// these hoops because there can be many thousands of mappings, and parsing -// them is expensive, so we only want to do it if we must. -// -// Each object in the arrays is of the form: -// -// { -// generatedLine: The line number in the generated code, -// generatedColumn: The column number in the generated code, -// source: The path to the original source file that generated this -// chunk of code, -// originalLine: The line number in the original source that -// corresponds to this chunk of generated code, -// originalColumn: The column number in the original source that -// corresponds to this chunk of generated code, -// name: The name of the original symbol which generated this chunk of -// code. -// } -// -// All properties except for `generatedLine` and `generatedColumn` can be -// `null`. -// -// `_generatedMappings` is ordered by the generated positions. -// -// `_originalMappings` is ordered by the original positions. - -SourceMapConsumer.prototype.__generatedMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } -}); - -SourceMapConsumer.prototype.__originalMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } -}); - -SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - -SourceMapConsumer.GENERATED_ORDER = 1; -SourceMapConsumer.ORIGINAL_ORDER = 2; - -SourceMapConsumer.GREATEST_LOWER_BOUND = 1; -SourceMapConsumer.LEAST_UPPER_BOUND = 2; - -/** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ -SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - -/** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - -exports.SourceMapConsumer = SourceMapConsumer; - -/** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ -function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; -} - -BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - -/** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ -BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - -/** - * The version of the source mapping spec that we are consuming. - */ -BasicSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } -}); - -/** - * Provide the JIT with a nice shape / hidden class. - */ -function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; -} - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - -/** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ -BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - -/** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ -BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ -BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - -exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - -/** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ -function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); -} - -IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - -/** - * The version of the source mapping spec that we are consuming. - */ -IndexedSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } -}); - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ -IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - -exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/source-map-generator.js b/node_modules/@babel/core/node_modules/source-map/lib/source-map-generator.js deleted file mode 100644 index aff1e7fb..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/source-map-generator.js +++ /dev/null @@ -1,416 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var base64VLQ = require('./base64-vlq'); -var util = require('./util'); -var ArraySet = require('./array-set').ArraySet; -var MappingList = require('./mapping-list').MappingList; - -/** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ -function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; -} - -SourceMapGenerator.prototype._version = 3; - -/** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ -SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - -/** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ -SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - -/** - * Set the source content for a source file. - */ -SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - -/** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ -SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - -/** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ -SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - -/** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ -SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - -SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - -/** - * Externalize the source map. - */ -SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - -/** - * Render the source map being generated to a string. - */ -SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - -exports.SourceMapGenerator = SourceMapGenerator; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/source-node.js b/node_modules/@babel/core/node_modules/source-map/lib/source-node.js deleted file mode 100644 index d196a53f..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/source-node.js +++ /dev/null @@ -1,413 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; -var util = require('./util'); - -// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other -// operating systems these days (capturing the result). -var REGEX_NEWLINE = /(\r?\n)/; - -// Newline character code for charCodeAt() comparisons -var NEWLINE_CODE = 10; - -// Private symbol for identifying `SourceNode`s when multiple versions of -// the source-map library are loaded. This MUST NOT CHANGE across -// versions! -var isSourceNode = "$$$isSourceNode$$$"; - -/** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ -function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); -} - -/** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ -SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - -/** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } -}; - -/** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ -SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; -}; - -/** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ -SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; -}; - -/** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ -SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - -/** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - -/** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ -SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; -}; - -/** - * Returns the string representation of this source node along with a source - * map. - */ -SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; -}; - -exports.SourceNode = SourceNode; diff --git a/node_modules/@babel/core/node_modules/source-map/lib/util.js b/node_modules/@babel/core/node_modules/source-map/lib/util.js deleted file mode 100644 index 44e0e452..00000000 --- a/node_modules/@babel/core/node_modules/source-map/lib/util.js +++ /dev/null @@ -1,417 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ -function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } -} -exports.getArg = getArg; - -var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; -var dataUrlRegexp = /^data:.+\,.+$/; - -function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; -} -exports.urlParse = urlParse; - -function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; -} -exports.urlGenerate = urlGenerate; - -/** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ -function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; -} -exports.normalize = normalize; - -/** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ -function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; -} -exports.join = join; - -exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); -}; - -/** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ -function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); -} -exports.relative = relative; - -var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); -}()); - -function identity (s) { - return s; -} - -/** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ -function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; -} -exports.toSetString = supportsNullProto ? identity : toSetString; - -function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; -} -exports.fromSetString = supportsNullProto ? identity : fromSetString; - -function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; -} - -/** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ -function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; -} -exports.compareByOriginalPositions = compareByOriginalPositions; - -/** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ -function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; -} -exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - -function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; -} - -/** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ -function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; diff --git a/node_modules/@babel/core/node_modules/source-map/package.json b/node_modules/@babel/core/node_modules/source-map/package.json deleted file mode 100644 index d35973f9..00000000 --- a/node_modules/@babel/core/node_modules/source-map/package.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "_args": [ - [ - "source-map@0.5.7", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "source-map@0.5.7", - "_id": "source-map@0.5.7", - "_inBundle": false, - "_integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "_location": "/@babel/core/source-map", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "source-map@0.5.7", - "name": "source-map", - "escapedName": "source-map", - "rawSpec": "0.5.7", - "saveSpec": null, - "fetchSpec": "0.5.7" - }, - "_requiredBy": [ - "/@babel/core" - ], - "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "_spec": "0.5.7", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Nick Fitzgerald", - "email": "nfitzgerald@mozilla.com" - }, - "bugs": { - "url": "https://github.com/mozilla/source-map/issues" - }, - "contributors": [ - { - "name": "Tobias Koppers", - "email": "tobias.koppers@googlemail.com" - }, - { - "name": "Duncan Beevers", - "email": "duncan@dweebd.com" - }, - { - "name": "Stephen Crane", - "email": "scrane@mozilla.com" - }, - { - "name": "Ryan Seddon", - "email": "seddon.ryan@gmail.com" - }, - { - "name": "Miles Elam", - "email": "miles.elam@deem.com" - }, - { - "name": "Mihai Bazon", - "email": "mihai.bazon@gmail.com" - }, - { - "name": "Michael Ficarra", - "email": "github.public.email@michael.ficarra.me" - }, - { - "name": "Todd Wolfson", - "email": "todd@twolfson.com" - }, - { - "name": "Alexander Solovyov", - "email": "alexander@solovyov.net" - }, - { - "name": "Felix Gnass", - "email": "fgnass@gmail.com" - }, - { - "name": "Conrad Irwin", - "email": "conrad.irwin@gmail.com" - }, - { - "name": "usrbincc", - "email": "usrbincc@yahoo.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Chase Douglas", - "email": "chase@newrelic.com" - }, - { - "name": "Evan Wallace", - "email": "evan.exe@gmail.com" - }, - { - "name": "Heather Arthur", - "email": "fayearthur@gmail.com" - }, - { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Simon Lydell", - "email": "simon.lydell@gmail.com" - }, - { - "name": "Jmeas Smith", - "email": "jellyes2@gmail.com" - }, - { - "name": "Michael Z Goddard", - "email": "mzgoddard@gmail.com" - }, - { - "name": "azu", - "email": "azu@users.noreply.github.com" - }, - { - "name": "John Gozde", - "email": "john@gozde.ca" - }, - { - "name": "Adam Kirkton", - "email": "akirkton@truefitinnovation.com" - }, - { - "name": "Chris Montgomery", - "email": "christopher.montgomery@dowjones.com" - }, - { - "name": "J. Ryan Stinnett", - "email": "jryans@gmail.com" - }, - { - "name": "Jack Herrington", - "email": "jherrington@walmartlabs.com" - }, - { - "name": "Chris Truter", - "email": "jeffpalentine@gmail.com" - }, - { - "name": "Daniel Espeset", - "email": "daniel@danielespeset.com" - }, - { - "name": "Jamie Wong", - "email": "jamie.lf.wong@gmail.com" - }, - { - "name": "Eddy Bruël", - "email": "ejpbruel@mozilla.com" - }, - { - "name": "Hawken Rives", - "email": "hawkrives@gmail.com" - }, - { - "name": "Gilad Peleg", - "email": "giladp007@gmail.com" - }, - { - "name": "djchie", - "email": "djchie.dev@gmail.com" - }, - { - "name": "Gary Ye", - "email": "garysye@gmail.com" - }, - { - "name": "Nicolas Lalevée", - "email": "nicolas.lalevee@hibnet.org" - } - ], - "description": "Generates and consumes source maps", - "devDependencies": { - "doctoc": "^0.15.0", - "webpack": "^1.12.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "source-map.js", - "lib/", - "dist/source-map.debug.js", - "dist/source-map.js", - "dist/source-map.min.js", - "dist/source-map.min.js.map" - ], - "homepage": "https://github.com/mozilla/source-map", - "license": "BSD-3-Clause", - "main": "./source-map.js", - "name": "source-map", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/mozilla/source-map.git" - }, - "scripts": { - "build": "webpack --color", - "test": "npm run build && node test/run-tests.js", - "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" - }, - "typings": "source-map", - "version": "0.5.7" -} diff --git a/node_modules/@babel/core/node_modules/source-map/source-map.js b/node_modules/@babel/core/node_modules/source-map/source-map.js deleted file mode 100644 index bc88fe82..00000000 --- a/node_modules/@babel/core/node_modules/source-map/source-map.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ -exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; -exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; -exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/node_modules/@babel/core/package.json b/node_modules/@babel/core/package.json deleted file mode 100644 index 5bec6e0e..00000000 --- a/node_modules/@babel/core/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "_args": [ - [ - "@babel/core@7.5.5", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@babel/core@7.5.5", - "_id": "@babel/core@7.5.5", - "_inBundle": false, - "_integrity": "sha512-i4qoSr2KTtce0DmkuuQBV4AuQgGPUcPXMr9L5MyYAtk06z068lQ10a4O009fe5OB/DfNV+h+qqT7ddNV8UnRjg==", - "_location": "/@babel/core", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/core@7.5.5", - "name": "@babel/core", - "escapedName": "@babel%2fcore", - "scope": "@babel", - "rawSpec": "7.5.5", - "saveSpec": null, - "fetchSpec": "7.5.5" - }, - "_requiredBy": [ - "/@jest/transform", - "/jest-config" - ], - "_resolved": "https://registry.npmjs.org/@babel/core/-/core-7.5.5.tgz", - "_spec": "7.5.5", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "browser": { - "./lib/config/files/index.js": "./lib/config/files/index-browser.js", - "./lib/transform-file.js": "./lib/transform-file-browser.js" - }, - "dependencies": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.5.5", - "@babel/helpers": "^7.5.5", - "@babel/parser": "^7.5.5", - "@babel/template": "^7.4.4", - "@babel/traverse": "^7.5.5", - "@babel/types": "^7.5.5", - "convert-source-map": "^1.1.0", - "debug": "^4.1.0", - "json5": "^2.1.0", - "lodash": "^4.17.13", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - }, - "description": "Babel compiler core.", - "devDependencies": { - "@babel/helper-transform-fixture-test-runner": "^7.5.5", - "@babel/register": "^7.5.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", - "homepage": "https://babeljs.io/", - "keywords": [ - "6to5", - "babel", - "classes", - "const", - "es6", - "harmony", - "let", - "modules", - "transpile", - "transpiler", - "var", - "babel-core", - "compiler" - ], - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/core", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-core" - }, - "version": "7.5.5" -} diff --git a/node_modules/@babel/generator/LICENSE b/node_modules/@babel/generator/LICENSE deleted file mode 100644 index f31575ec..00000000 --- a/node_modules/@babel/generator/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/generator/README.md b/node_modules/@babel/generator/README.md deleted file mode 100644 index fc980b16..00000000 --- a/node_modules/@babel/generator/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/generator - -> Turns an AST into code. - -See our website [@babel/generator](https://babeljs.io/docs/en/next/babel-generator.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20generator%22+is%3Aopen) associated with this package. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/generator -``` - -or using yarn: - -```sh -yarn add @babel/generator --dev -``` diff --git a/node_modules/@babel/generator/lib/buffer.js b/node_modules/@babel/generator/lib/buffer.js deleted file mode 100644 index 8a800148..00000000 --- a/node_modules/@babel/generator/lib/buffer.js +++ /dev/null @@ -1,257 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function _trimRight() { - const data = _interopRequireDefault(require("trim-right")); - - _trimRight = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const SPACES_RE = /^[ \t]+$/; - -class Buffer { - constructor(map) { - this._map = null; - this._buf = []; - this._last = ""; - this._queue = []; - this._position = { - line: 1, - column: 0 - }; - this._sourcePosition = { - identifierName: null, - line: null, - column: null, - filename: null - }; - this._disallowedPop = null; - this._map = map; - } - - get() { - this._flush(); - - const map = this._map; - const result = { - code: (0, _trimRight().default)(this._buf.join("")), - map: null, - rawMappings: map && map.getRawMappings() - }; - - if (map) { - Object.defineProperty(result, "map", { - configurable: true, - enumerable: true, - - get() { - return this.map = map.get(); - }, - - set(value) { - Object.defineProperty(this, "map", { - value, - writable: true - }); - } - - }); - } - - return result; - } - - append(str) { - this._flush(); - - const { - line, - column, - filename, - identifierName, - force - } = this._sourcePosition; - - this._append(str, line, column, identifierName, filename, force); - } - - queue(str) { - if (str === "\n") { - while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) { - this._queue.shift(); - } - } - - const { - line, - column, - filename, - identifierName, - force - } = this._sourcePosition; - - this._queue.unshift([str, line, column, identifierName, filename, force]); - } - - _flush() { - let item; - - while (item = this._queue.pop()) this._append(...item); - } - - _append(str, line, column, identifierName, filename, force) { - if (this._map && str[0] !== "\n") { - this._map.mark(this._position.line, this._position.column, line, column, identifierName, filename, force); - } - - this._buf.push(str); - - this._last = str[str.length - 1]; - - for (let i = 0; i < str.length; i++) { - if (str[i] === "\n") { - this._position.line++; - this._position.column = 0; - } else { - this._position.column++; - } - } - } - - removeTrailingNewline() { - if (this._queue.length > 0 && this._queue[0][0] === "\n") { - this._queue.shift(); - } - } - - removeLastSemicolon() { - if (this._queue.length > 0 && this._queue[0][0] === ";") { - this._queue.shift(); - } - } - - endsWith(suffix) { - if (suffix.length === 1) { - let last; - - if (this._queue.length > 0) { - const str = this._queue[0][0]; - last = str[str.length - 1]; - } else { - last = this._last; - } - - return last === suffix; - } - - const end = this._last + this._queue.reduce((acc, item) => item[0] + acc, ""); - - if (suffix.length <= end.length) { - return end.slice(-suffix.length) === suffix; - } - - return false; - } - - hasContent() { - return this._queue.length > 0 || !!this._last; - } - - exactSource(loc, cb) { - this.source("start", loc, true); - cb(); - this.source("end", loc); - - this._disallowPop("start", loc); - } - - source(prop, loc, force) { - if (prop && !loc) return; - - this._normalizePosition(prop, loc, this._sourcePosition, force); - } - - withSource(prop, loc, cb) { - if (!this._map) return cb(); - const originalLine = this._sourcePosition.line; - const originalColumn = this._sourcePosition.column; - const originalFilename = this._sourcePosition.filename; - const originalIdentifierName = this._sourcePosition.identifierName; - this.source(prop, loc); - cb(); - - if ((!this._sourcePosition.force || this._sourcePosition.line !== originalLine || this._sourcePosition.column !== originalColumn || this._sourcePosition.filename !== originalFilename) && (!this._disallowedPop || this._disallowedPop.line !== originalLine || this._disallowedPop.column !== originalColumn || this._disallowedPop.filename !== originalFilename)) { - this._sourcePosition.line = originalLine; - this._sourcePosition.column = originalColumn; - this._sourcePosition.filename = originalFilename; - this._sourcePosition.identifierName = originalIdentifierName; - this._sourcePosition.force = false; - this._disallowedPop = null; - } - } - - _disallowPop(prop, loc) { - if (prop && !loc) return; - this._disallowedPop = this._normalizePosition(prop, loc); - } - - _normalizePosition(prop, loc, targetObj, force) { - const pos = loc ? loc[prop] : null; - - if (targetObj === undefined) { - targetObj = { - identifierName: null, - line: null, - column: null, - filename: null, - force: false - }; - } - - const origLine = targetObj.line; - const origColumn = targetObj.column; - const origFilename = targetObj.filename; - targetObj.identifierName = prop === "start" && loc && loc.identifierName || null; - targetObj.line = pos ? pos.line : null; - targetObj.column = pos ? pos.column : null; - targetObj.filename = loc && loc.filename || null; - - if (force || targetObj.line !== origLine || targetObj.column !== origColumn || targetObj.filename !== origFilename) { - targetObj.force = force; - } - - return targetObj; - } - - getCurrentColumn() { - const extra = this._queue.reduce((acc, item) => item[0] + acc, ""); - - const lastIndex = extra.lastIndexOf("\n"); - return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex; - } - - getCurrentLine() { - const extra = this._queue.reduce((acc, item) => item[0] + acc, ""); - - let count = 0; - - for (let i = 0; i < extra.length; i++) { - if (extra[i] === "\n") count++; - } - - return this._position.line + count; - } - -} - -exports.default = Buffer; \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/base.js b/node_modules/@babel/generator/lib/generators/base.js deleted file mode 100644 index f8e2130b..00000000 --- a/node_modules/@babel/generator/lib/generators/base.js +++ /dev/null @@ -1,97 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.File = File; -exports.Program = Program; -exports.BlockStatement = BlockStatement; -exports.Noop = Noop; -exports.Directive = Directive; -exports.DirectiveLiteral = DirectiveLiteral; -exports.InterpreterDirective = InterpreterDirective; -exports.Placeholder = Placeholder; - -function File(node) { - if (node.program) { - this.print(node.program.interpreter, node); - } - - this.print(node.program, node); -} - -function Program(node) { - this.printInnerComments(node, false); - this.printSequence(node.directives, node); - if (node.directives && node.directives.length) this.newline(); - this.printSequence(node.body, node); -} - -function BlockStatement(node) { - this.token("{"); - this.printInnerComments(node); - const hasDirectives = node.directives && node.directives.length; - - if (node.body.length || hasDirectives) { - this.newline(); - this.printSequence(node.directives, node, { - indent: true - }); - if (hasDirectives) this.newline(); - this.printSequence(node.body, node, { - indent: true - }); - this.removeTrailingNewline(); - this.source("end", node.loc); - if (!this.endsWith("\n")) this.newline(); - this.rightBrace(); - } else { - this.source("end", node.loc); - this.token("}"); - } -} - -function Noop() {} - -function Directive(node) { - this.print(node.value, node); - this.semicolon(); -} - -const unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/; -const unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/; - -function DirectiveLiteral(node) { - const raw = this.getPossibleRaw(node); - - if (raw != null) { - this.token(raw); - return; - } - - const { - value - } = node; - - if (!unescapedDoubleQuoteRE.test(value)) { - this.token(`"${value}"`); - } else if (!unescapedSingleQuoteRE.test(value)) { - this.token(`'${value}'`); - } else { - throw new Error("Malformed AST: it is not possible to print a directive containing" + " both unescaped single and double quotes."); - } -} - -function InterpreterDirective(node) { - this.token(`#!${node.value}\n`); -} - -function Placeholder(node) { - this.token("%%"); - this.print(node.name); - this.token("%%"); - - if (node.expectedNode === "Statement") { - this.semicolon(); - } -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/classes.js b/node_modules/@babel/generator/lib/generators/classes.js deleted file mode 100644 index 7f54632a..00000000 --- a/node_modules/@babel/generator/lib/generators/classes.js +++ /dev/null @@ -1,190 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration; -exports.ClassBody = ClassBody; -exports.ClassProperty = ClassProperty; -exports.ClassPrivateProperty = ClassPrivateProperty; -exports.ClassMethod = ClassMethod; -exports.ClassPrivateMethod = ClassPrivateMethod; -exports._classMethodHead = _classMethodHead; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function ClassDeclaration(node, parent) { - if (!this.format.decoratorsBeforeExport || !t().isExportDefaultDeclaration(parent) && !t().isExportNamedDeclaration(parent)) { - this.printJoin(node.decorators, node); - } - - if (node.declare) { - this.word("declare"); - this.space(); - } - - if (node.abstract) { - this.word("abstract"); - this.space(); - } - - this.word("class"); - - if (node.id) { - this.space(); - this.print(node.id, node); - } - - this.print(node.typeParameters, node); - - if (node.superClass) { - this.space(); - this.word("extends"); - this.space(); - this.print(node.superClass, node); - this.print(node.superTypeParameters, node); - } - - if (node.implements) { - this.space(); - this.word("implements"); - this.space(); - this.printList(node.implements, node); - } - - this.space(); - this.print(node.body, node); -} - -function ClassBody(node) { - this.token("{"); - this.printInnerComments(node); - - if (node.body.length === 0) { - this.token("}"); - } else { - this.newline(); - this.indent(); - this.printSequence(node.body, node); - this.dedent(); - if (!this.endsWith("\n")) this.newline(); - this.rightBrace(); - } -} - -function ClassProperty(node) { - this.printJoin(node.decorators, node); - - if (node.accessibility) { - this.word(node.accessibility); - this.space(); - } - - if (node.static) { - this.word("static"); - this.space(); - } - - if (node.abstract) { - this.word("abstract"); - this.space(); - } - - if (node.readonly) { - this.word("readonly"); - this.space(); - } - - if (node.computed) { - this.token("["); - this.print(node.key, node); - this.token("]"); - } else { - this._variance(node); - - this.print(node.key, node); - } - - if (node.optional) { - this.token("?"); - } - - if (node.definite) { - this.token("!"); - } - - this.print(node.typeAnnotation, node); - - if (node.value) { - this.space(); - this.token("="); - this.space(); - this.print(node.value, node); - } - - this.semicolon(); -} - -function ClassPrivateProperty(node) { - if (node.static) { - this.word("static"); - this.space(); - } - - this.print(node.key, node); - this.print(node.typeAnnotation, node); - - if (node.value) { - this.space(); - this.token("="); - this.space(); - this.print(node.value, node); - } - - this.semicolon(); -} - -function ClassMethod(node) { - this._classMethodHead(node); - - this.space(); - this.print(node.body, node); -} - -function ClassPrivateMethod(node) { - this._classMethodHead(node); - - this.space(); - this.print(node.body, node); -} - -function _classMethodHead(node) { - this.printJoin(node.decorators, node); - - if (node.accessibility) { - this.word(node.accessibility); - this.space(); - } - - if (node.abstract) { - this.word("abstract"); - this.space(); - } - - if (node.static) { - this.word("static"); - this.space(); - } - - this._methodHead(node); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/expressions.js b/node_modules/@babel/generator/lib/generators/expressions.js deleted file mode 100644 index 45efa98e..00000000 --- a/node_modules/@babel/generator/lib/generators/expressions.js +++ /dev/null @@ -1,292 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.UnaryExpression = UnaryExpression; -exports.DoExpression = DoExpression; -exports.ParenthesizedExpression = ParenthesizedExpression; -exports.UpdateExpression = UpdateExpression; -exports.ConditionalExpression = ConditionalExpression; -exports.NewExpression = NewExpression; -exports.SequenceExpression = SequenceExpression; -exports.ThisExpression = ThisExpression; -exports.Super = Super; -exports.Decorator = Decorator; -exports.OptionalMemberExpression = OptionalMemberExpression; -exports.OptionalCallExpression = OptionalCallExpression; -exports.CallExpression = CallExpression; -exports.Import = Import; -exports.EmptyStatement = EmptyStatement; -exports.ExpressionStatement = ExpressionStatement; -exports.AssignmentPattern = AssignmentPattern; -exports.LogicalExpression = exports.BinaryExpression = exports.AssignmentExpression = AssignmentExpression; -exports.BindExpression = BindExpression; -exports.MemberExpression = MemberExpression; -exports.MetaProperty = MetaProperty; -exports.PrivateName = PrivateName; -exports.AwaitExpression = exports.YieldExpression = void 0; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -var n = _interopRequireWildcard(require("../node")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function UnaryExpression(node) { - if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || node.operator === "throw") { - this.word(node.operator); - this.space(); - } else { - this.token(node.operator); - } - - this.print(node.argument, node); -} - -function DoExpression(node) { - this.word("do"); - this.space(); - this.print(node.body, node); -} - -function ParenthesizedExpression(node) { - this.token("("); - this.print(node.expression, node); - this.token(")"); -} - -function UpdateExpression(node) { - if (node.prefix) { - this.token(node.operator); - this.print(node.argument, node); - } else { - this.startTerminatorless(true); - this.print(node.argument, node); - this.endTerminatorless(); - this.token(node.operator); - } -} - -function ConditionalExpression(node) { - this.print(node.test, node); - this.space(); - this.token("?"); - this.space(); - this.print(node.consequent, node); - this.space(); - this.token(":"); - this.space(); - this.print(node.alternate, node); -} - -function NewExpression(node, parent) { - this.word("new"); - this.space(); - this.print(node.callee, node); - - if (this.format.minified && node.arguments.length === 0 && !node.optional && !t().isCallExpression(parent, { - callee: node - }) && !t().isMemberExpression(parent) && !t().isNewExpression(parent)) { - return; - } - - this.print(node.typeArguments, node); - this.print(node.typeParameters, node); - - if (node.optional) { - this.token("?."); - } - - this.token("("); - this.printList(node.arguments, node); - this.token(")"); -} - -function SequenceExpression(node) { - this.printList(node.expressions, node); -} - -function ThisExpression() { - this.word("this"); -} - -function Super() { - this.word("super"); -} - -function Decorator(node) { - this.token("@"); - this.print(node.expression, node); - this.newline(); -} - -function OptionalMemberExpression(node) { - this.print(node.object, node); - - if (!node.computed && t().isMemberExpression(node.property)) { - throw new TypeError("Got a MemberExpression for MemberExpression property"); - } - - let computed = node.computed; - - if (t().isLiteral(node.property) && typeof node.property.value === "number") { - computed = true; - } - - if (node.optional) { - this.token("?."); - } - - if (computed) { - this.token("["); - this.print(node.property, node); - this.token("]"); - } else { - if (!node.optional) { - this.token("."); - } - - this.print(node.property, node); - } -} - -function OptionalCallExpression(node) { - this.print(node.callee, node); - this.print(node.typeArguments, node); - this.print(node.typeParameters, node); - - if (node.optional) { - this.token("?."); - } - - this.token("("); - this.printList(node.arguments, node); - this.token(")"); -} - -function CallExpression(node) { - this.print(node.callee, node); - this.print(node.typeArguments, node); - this.print(node.typeParameters, node); - this.token("("); - this.printList(node.arguments, node); - this.token(")"); -} - -function Import() { - this.word("import"); -} - -function buildYieldAwait(keyword) { - return function (node) { - this.word(keyword); - - if (node.delegate) { - this.token("*"); - } - - if (node.argument) { - this.space(); - const terminatorState = this.startTerminatorless(); - this.print(node.argument, node); - this.endTerminatorless(terminatorState); - } - }; -} - -const YieldExpression = buildYieldAwait("yield"); -exports.YieldExpression = YieldExpression; -const AwaitExpression = buildYieldAwait("await"); -exports.AwaitExpression = AwaitExpression; - -function EmptyStatement() { - this.semicolon(true); -} - -function ExpressionStatement(node) { - this.print(node.expression, node); - this.semicolon(); -} - -function AssignmentPattern(node) { - this.print(node.left, node); - if (node.left.optional) this.token("?"); - this.print(node.left.typeAnnotation, node); - this.space(); - this.token("="); - this.space(); - this.print(node.right, node); -} - -function AssignmentExpression(node, parent) { - const parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent); - - if (parens) { - this.token("("); - } - - this.print(node.left, node); - this.space(); - - if (node.operator === "in" || node.operator === "instanceof") { - this.word(node.operator); - } else { - this.token(node.operator); - } - - this.space(); - this.print(node.right, node); - - if (parens) { - this.token(")"); - } -} - -function BindExpression(node) { - this.print(node.object, node); - this.token("::"); - this.print(node.callee, node); -} - -function MemberExpression(node) { - this.print(node.object, node); - - if (!node.computed && t().isMemberExpression(node.property)) { - throw new TypeError("Got a MemberExpression for MemberExpression property"); - } - - let computed = node.computed; - - if (t().isLiteral(node.property) && typeof node.property.value === "number") { - computed = true; - } - - if (computed) { - this.token("["); - this.print(node.property, node); - this.token("]"); - } else { - this.token("."); - this.print(node.property, node); - } -} - -function MetaProperty(node) { - this.print(node.meta, node); - this.token("."); - this.print(node.property, node); -} - -function PrivateName(node) { - this.token("#"); - this.print(node.id, node); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/flow.js b/node_modules/@babel/generator/lib/generators/flow.js deleted file mode 100644 index 8853fd8a..00000000 --- a/node_modules/@babel/generator/lib/generators/flow.js +++ /dev/null @@ -1,639 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.AnyTypeAnnotation = AnyTypeAnnotation; -exports.ArrayTypeAnnotation = ArrayTypeAnnotation; -exports.BooleanTypeAnnotation = BooleanTypeAnnotation; -exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation; -exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation; -exports.DeclareClass = DeclareClass; -exports.DeclareFunction = DeclareFunction; -exports.InferredPredicate = InferredPredicate; -exports.DeclaredPredicate = DeclaredPredicate; -exports.DeclareInterface = DeclareInterface; -exports.DeclareModule = DeclareModule; -exports.DeclareModuleExports = DeclareModuleExports; -exports.DeclareTypeAlias = DeclareTypeAlias; -exports.DeclareOpaqueType = DeclareOpaqueType; -exports.DeclareVariable = DeclareVariable; -exports.DeclareExportDeclaration = DeclareExportDeclaration; -exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration; -exports.ExistsTypeAnnotation = ExistsTypeAnnotation; -exports.FunctionTypeAnnotation = FunctionTypeAnnotation; -exports.FunctionTypeParam = FunctionTypeParam; -exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends; -exports._interfaceish = _interfaceish; -exports._variance = _variance; -exports.InterfaceDeclaration = InterfaceDeclaration; -exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation; -exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation; -exports.MixedTypeAnnotation = MixedTypeAnnotation; -exports.EmptyTypeAnnotation = EmptyTypeAnnotation; -exports.NullableTypeAnnotation = NullableTypeAnnotation; -exports.NumberTypeAnnotation = NumberTypeAnnotation; -exports.StringTypeAnnotation = StringTypeAnnotation; -exports.ThisTypeAnnotation = ThisTypeAnnotation; -exports.TupleTypeAnnotation = TupleTypeAnnotation; -exports.TypeofTypeAnnotation = TypeofTypeAnnotation; -exports.TypeAlias = TypeAlias; -exports.TypeAnnotation = TypeAnnotation; -exports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation; -exports.TypeParameter = TypeParameter; -exports.OpaqueType = OpaqueType; -exports.ObjectTypeAnnotation = ObjectTypeAnnotation; -exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot; -exports.ObjectTypeCallProperty = ObjectTypeCallProperty; -exports.ObjectTypeIndexer = ObjectTypeIndexer; -exports.ObjectTypeProperty = ObjectTypeProperty; -exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty; -exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier; -exports.UnionTypeAnnotation = UnionTypeAnnotation; -exports.TypeCastExpression = TypeCastExpression; -exports.Variance = Variance; -exports.VoidTypeAnnotation = VoidTypeAnnotation; -Object.defineProperty(exports, "NumberLiteralTypeAnnotation", { - enumerable: true, - get: function () { - return _types2.NumericLiteral; - } -}); -Object.defineProperty(exports, "StringLiteralTypeAnnotation", { - enumerable: true, - get: function () { - return _types2.StringLiteral; - } -}); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -var _modules = require("./modules"); - -var _types2 = require("./types"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function AnyTypeAnnotation() { - this.word("any"); -} - -function ArrayTypeAnnotation(node) { - this.print(node.elementType, node); - this.token("["); - this.token("]"); -} - -function BooleanTypeAnnotation() { - this.word("boolean"); -} - -function BooleanLiteralTypeAnnotation(node) { - this.word(node.value ? "true" : "false"); -} - -function NullLiteralTypeAnnotation() { - this.word("null"); -} - -function DeclareClass(node, parent) { - if (!t().isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - - this.word("class"); - this.space(); - - this._interfaceish(node); -} - -function DeclareFunction(node, parent) { - if (!t().isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - - this.word("function"); - this.space(); - this.print(node.id, node); - this.print(node.id.typeAnnotation.typeAnnotation, node); - - if (node.predicate) { - this.space(); - this.print(node.predicate, node); - } - - this.semicolon(); -} - -function InferredPredicate() { - this.token("%"); - this.word("checks"); -} - -function DeclaredPredicate(node) { - this.token("%"); - this.word("checks"); - this.token("("); - this.print(node.value, node); - this.token(")"); -} - -function DeclareInterface(node) { - this.word("declare"); - this.space(); - this.InterfaceDeclaration(node); -} - -function DeclareModule(node) { - this.word("declare"); - this.space(); - this.word("module"); - this.space(); - this.print(node.id, node); - this.space(); - this.print(node.body, node); -} - -function DeclareModuleExports(node) { - this.word("declare"); - this.space(); - this.word("module"); - this.token("."); - this.word("exports"); - this.print(node.typeAnnotation, node); -} - -function DeclareTypeAlias(node) { - this.word("declare"); - this.space(); - this.TypeAlias(node); -} - -function DeclareOpaqueType(node, parent) { - if (!t().isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - - this.OpaqueType(node); -} - -function DeclareVariable(node, parent) { - if (!t().isDeclareExportDeclaration(parent)) { - this.word("declare"); - this.space(); - } - - this.word("var"); - this.space(); - this.print(node.id, node); - this.print(node.id.typeAnnotation, node); - this.semicolon(); -} - -function DeclareExportDeclaration(node) { - this.word("declare"); - this.space(); - this.word("export"); - this.space(); - - if (node.default) { - this.word("default"); - this.space(); - } - - FlowExportDeclaration.apply(this, arguments); -} - -function DeclareExportAllDeclaration() { - this.word("declare"); - this.space(); - - _modules.ExportAllDeclaration.apply(this, arguments); -} - -function FlowExportDeclaration(node) { - if (node.declaration) { - const declar = node.declaration; - this.print(declar, node); - if (!t().isStatement(declar)) this.semicolon(); - } else { - this.token("{"); - - if (node.specifiers.length) { - this.space(); - this.printList(node.specifiers, node); - this.space(); - } - - this.token("}"); - - if (node.source) { - this.space(); - this.word("from"); - this.space(); - this.print(node.source, node); - } - - this.semicolon(); - } -} - -function ExistsTypeAnnotation() { - this.token("*"); -} - -function FunctionTypeAnnotation(node, parent) { - this.print(node.typeParameters, node); - this.token("("); - this.printList(node.params, node); - - if (node.rest) { - if (node.params.length) { - this.token(","); - this.space(); - } - - this.token("..."); - this.print(node.rest, node); - } - - this.token(")"); - - if (parent.type === "ObjectTypeCallProperty" || parent.type === "DeclareFunction" || parent.type === "ObjectTypeProperty" && parent.method) { - this.token(":"); - } else { - this.space(); - this.token("=>"); - } - - this.space(); - this.print(node.returnType, node); -} - -function FunctionTypeParam(node) { - this.print(node.name, node); - if (node.optional) this.token("?"); - - if (node.name) { - this.token(":"); - this.space(); - } - - this.print(node.typeAnnotation, node); -} - -function InterfaceExtends(node) { - this.print(node.id, node); - this.print(node.typeParameters, node); -} - -function _interfaceish(node) { - this.print(node.id, node); - this.print(node.typeParameters, node); - - if (node.extends.length) { - this.space(); - this.word("extends"); - this.space(); - this.printList(node.extends, node); - } - - if (node.mixins && node.mixins.length) { - this.space(); - this.word("mixins"); - this.space(); - this.printList(node.mixins, node); - } - - if (node.implements && node.implements.length) { - this.space(); - this.word("implements"); - this.space(); - this.printList(node.implements, node); - } - - this.space(); - this.print(node.body, node); -} - -function _variance(node) { - if (node.variance) { - if (node.variance.kind === "plus") { - this.token("+"); - } else if (node.variance.kind === "minus") { - this.token("-"); - } - } -} - -function InterfaceDeclaration(node) { - this.word("interface"); - this.space(); - - this._interfaceish(node); -} - -function andSeparator() { - this.space(); - this.token("&"); - this.space(); -} - -function InterfaceTypeAnnotation(node) { - this.word("interface"); - - if (node.extends && node.extends.length) { - this.space(); - this.word("extends"); - this.space(); - this.printList(node.extends, node); - } - - this.space(); - this.print(node.body, node); -} - -function IntersectionTypeAnnotation(node) { - this.printJoin(node.types, node, { - separator: andSeparator - }); -} - -function MixedTypeAnnotation() { - this.word("mixed"); -} - -function EmptyTypeAnnotation() { - this.word("empty"); -} - -function NullableTypeAnnotation(node) { - this.token("?"); - this.print(node.typeAnnotation, node); -} - -function NumberTypeAnnotation() { - this.word("number"); -} - -function StringTypeAnnotation() { - this.word("string"); -} - -function ThisTypeAnnotation() { - this.word("this"); -} - -function TupleTypeAnnotation(node) { - this.token("["); - this.printList(node.types, node); - this.token("]"); -} - -function TypeofTypeAnnotation(node) { - this.word("typeof"); - this.space(); - this.print(node.argument, node); -} - -function TypeAlias(node) { - this.word("type"); - this.space(); - this.print(node.id, node); - this.print(node.typeParameters, node); - this.space(); - this.token("="); - this.space(); - this.print(node.right, node); - this.semicolon(); -} - -function TypeAnnotation(node) { - this.token(":"); - this.space(); - if (node.optional) this.token("?"); - this.print(node.typeAnnotation, node); -} - -function TypeParameterInstantiation(node) { - this.token("<"); - this.printList(node.params, node, {}); - this.token(">"); -} - -function TypeParameter(node) { - this._variance(node); - - this.word(node.name); - - if (node.bound) { - this.print(node.bound, node); - } - - if (node.default) { - this.space(); - this.token("="); - this.space(); - this.print(node.default, node); - } -} - -function OpaqueType(node) { - this.word("opaque"); - this.space(); - this.word("type"); - this.space(); - this.print(node.id, node); - this.print(node.typeParameters, node); - - if (node.supertype) { - this.token(":"); - this.space(); - this.print(node.supertype, node); - } - - if (node.impltype) { - this.space(); - this.token("="); - this.space(); - this.print(node.impltype, node); - } - - this.semicolon(); -} - -function ObjectTypeAnnotation(node) { - if (node.exact) { - this.token("{|"); - } else { - this.token("{"); - } - - const props = node.properties.concat(node.callProperties || [], node.indexers || [], node.internalSlots || []); - - if (props.length) { - this.space(); - this.printJoin(props, node, { - addNewlines(leading) { - if (leading && !props[0]) return 1; - }, - - indent: true, - statement: true, - iterator: () => { - if (props.length !== 1 || node.inexact) { - this.token(","); - this.space(); - } - } - }); - this.space(); - } - - if (node.inexact) { - this.indent(); - this.token("..."); - - if (props.length) { - this.newline(); - } - - this.dedent(); - } - - if (node.exact) { - this.token("|}"); - } else { - this.token("}"); - } -} - -function ObjectTypeInternalSlot(node) { - if (node.static) { - this.word("static"); - this.space(); - } - - this.token("["); - this.token("["); - this.print(node.id, node); - this.token("]"); - this.token("]"); - if (node.optional) this.token("?"); - - if (!node.method) { - this.token(":"); - this.space(); - } - - this.print(node.value, node); -} - -function ObjectTypeCallProperty(node) { - if (node.static) { - this.word("static"); - this.space(); - } - - this.print(node.value, node); -} - -function ObjectTypeIndexer(node) { - if (node.static) { - this.word("static"); - this.space(); - } - - this._variance(node); - - this.token("["); - - if (node.id) { - this.print(node.id, node); - this.token(":"); - this.space(); - } - - this.print(node.key, node); - this.token("]"); - this.token(":"); - this.space(); - this.print(node.value, node); -} - -function ObjectTypeProperty(node) { - if (node.proto) { - this.word("proto"); - this.space(); - } - - if (node.static) { - this.word("static"); - this.space(); - } - - this._variance(node); - - this.print(node.key, node); - if (node.optional) this.token("?"); - - if (!node.method) { - this.token(":"); - this.space(); - } - - this.print(node.value, node); -} - -function ObjectTypeSpreadProperty(node) { - this.token("..."); - this.print(node.argument, node); -} - -function QualifiedTypeIdentifier(node) { - this.print(node.qualification, node); - this.token("."); - this.print(node.id, node); -} - -function orSeparator() { - this.space(); - this.token("|"); - this.space(); -} - -function UnionTypeAnnotation(node) { - this.printJoin(node.types, node, { - separator: orSeparator - }); -} - -function TypeCastExpression(node) { - this.token("("); - this.print(node.expression, node); - this.print(node.typeAnnotation, node); - this.token(")"); -} - -function Variance(node) { - if (node.kind === "plus") { - this.token("+"); - } else { - this.token("-"); - } -} - -function VoidTypeAnnotation() { - this.word("void"); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/index.js b/node_modules/@babel/generator/lib/generators/index.js deleted file mode 100644 index f2b4ceca..00000000 --- a/node_modules/@babel/generator/lib/generators/index.js +++ /dev/null @@ -1,137 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _templateLiterals = require("./template-literals"); - -Object.keys(_templateLiterals).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _templateLiterals[key]; - } - }); -}); - -var _expressions = require("./expressions"); - -Object.keys(_expressions).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _expressions[key]; - } - }); -}); - -var _statements = require("./statements"); - -Object.keys(_statements).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _statements[key]; - } - }); -}); - -var _classes = require("./classes"); - -Object.keys(_classes).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _classes[key]; - } - }); -}); - -var _methods = require("./methods"); - -Object.keys(_methods).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _methods[key]; - } - }); -}); - -var _modules = require("./modules"); - -Object.keys(_modules).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _modules[key]; - } - }); -}); - -var _types = require("./types"); - -Object.keys(_types).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _types[key]; - } - }); -}); - -var _flow = require("./flow"); - -Object.keys(_flow).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _flow[key]; - } - }); -}); - -var _base = require("./base"); - -Object.keys(_base).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _base[key]; - } - }); -}); - -var _jsx = require("./jsx"); - -Object.keys(_jsx).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _jsx[key]; - } - }); -}); - -var _typescript = require("./typescript"); - -Object.keys(_typescript).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _typescript[key]; - } - }); -}); \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/jsx.js b/node_modules/@babel/generator/lib/generators/jsx.js deleted file mode 100644 index 48509139..00000000 --- a/node_modules/@babel/generator/lib/generators/jsx.js +++ /dev/null @@ -1,145 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.JSXAttribute = JSXAttribute; -exports.JSXIdentifier = JSXIdentifier; -exports.JSXNamespacedName = JSXNamespacedName; -exports.JSXMemberExpression = JSXMemberExpression; -exports.JSXSpreadAttribute = JSXSpreadAttribute; -exports.JSXExpressionContainer = JSXExpressionContainer; -exports.JSXSpreadChild = JSXSpreadChild; -exports.JSXText = JSXText; -exports.JSXElement = JSXElement; -exports.JSXOpeningElement = JSXOpeningElement; -exports.JSXClosingElement = JSXClosingElement; -exports.JSXEmptyExpression = JSXEmptyExpression; -exports.JSXFragment = JSXFragment; -exports.JSXOpeningFragment = JSXOpeningFragment; -exports.JSXClosingFragment = JSXClosingFragment; - -function JSXAttribute(node) { - this.print(node.name, node); - - if (node.value) { - this.token("="); - this.print(node.value, node); - } -} - -function JSXIdentifier(node) { - this.word(node.name); -} - -function JSXNamespacedName(node) { - this.print(node.namespace, node); - this.token(":"); - this.print(node.name, node); -} - -function JSXMemberExpression(node) { - this.print(node.object, node); - this.token("."); - this.print(node.property, node); -} - -function JSXSpreadAttribute(node) { - this.token("{"); - this.token("..."); - this.print(node.argument, node); - this.token("}"); -} - -function JSXExpressionContainer(node) { - this.token("{"); - this.print(node.expression, node); - this.token("}"); -} - -function JSXSpreadChild(node) { - this.token("{"); - this.token("..."); - this.print(node.expression, node); - this.token("}"); -} - -function JSXText(node) { - const raw = this.getPossibleRaw(node); - - if (raw != null) { - this.token(raw); - } else { - this.token(node.value); - } -} - -function JSXElement(node) { - const open = node.openingElement; - this.print(open, node); - if (open.selfClosing) return; - this.indent(); - - for (const child of node.children) { - this.print(child, node); - } - - this.dedent(); - this.print(node.closingElement, node); -} - -function spaceSeparator() { - this.space(); -} - -function JSXOpeningElement(node) { - this.token("<"); - this.print(node.name, node); - this.print(node.typeParameters, node); - - if (node.attributes.length > 0) { - this.space(); - this.printJoin(node.attributes, node, { - separator: spaceSeparator - }); - } - - if (node.selfClosing) { - this.space(); - this.token("/>"); - } else { - this.token(">"); - } -} - -function JSXClosingElement(node) { - this.token(""); -} - -function JSXEmptyExpression(node) { - this.printInnerComments(node); -} - -function JSXFragment(node) { - this.print(node.openingFragment, node); - this.indent(); - - for (const child of node.children) { - this.print(child, node); - } - - this.dedent(); - this.print(node.closingFragment, node); -} - -function JSXOpeningFragment() { - this.token("<"); - this.token(">"); -} - -function JSXClosingFragment() { - this.token(""); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/methods.js b/node_modules/@babel/generator/lib/generators/methods.js deleted file mode 100644 index 39965bac..00000000 --- a/node_modules/@babel/generator/lib/generators/methods.js +++ /dev/null @@ -1,167 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports._params = _params; -exports._parameters = _parameters; -exports._param = _param; -exports._methodHead = _methodHead; -exports._predicate = _predicate; -exports._functionHead = _functionHead; -exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression; -exports.ArrowFunctionExpression = ArrowFunctionExpression; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _params(node) { - this.print(node.typeParameters, node); - this.token("("); - - this._parameters(node.params, node); - - this.token(")"); - this.print(node.returnType, node); -} - -function _parameters(parameters, parent) { - for (let i = 0; i < parameters.length; i++) { - this._param(parameters[i], parent); - - if (i < parameters.length - 1) { - this.token(","); - this.space(); - } - } -} - -function _param(parameter, parent) { - this.printJoin(parameter.decorators, parameter); - this.print(parameter, parent); - if (parameter.optional) this.token("?"); - this.print(parameter.typeAnnotation, parameter); -} - -function _methodHead(node) { - const kind = node.kind; - const key = node.key; - - if (kind === "get" || kind === "set") { - this.word(kind); - this.space(); - } - - if (node.async) { - this.word("async"); - this.space(); - } - - if (kind === "method" || kind === "init") { - if (node.generator) { - this.token("*"); - } - } - - if (node.computed) { - this.token("["); - this.print(key, node); - this.token("]"); - } else { - this.print(key, node); - } - - if (node.optional) { - this.token("?"); - } - - this._params(node); -} - -function _predicate(node) { - if (node.predicate) { - if (!node.returnType) { - this.token(":"); - } - - this.space(); - this.print(node.predicate, node); - } -} - -function _functionHead(node) { - if (node.async) { - this.word("async"); - this.space(); - } - - this.word("function"); - if (node.generator) this.token("*"); - this.space(); - - if (node.id) { - this.print(node.id, node); - } - - this._params(node); - - this._predicate(node); -} - -function FunctionExpression(node) { - this._functionHead(node); - - this.space(); - this.print(node.body, node); -} - -function ArrowFunctionExpression(node) { - if (node.async) { - this.word("async"); - this.space(); - } - - const firstParam = node.params[0]; - - if (node.params.length === 1 && t().isIdentifier(firstParam) && !hasTypes(node, firstParam)) { - if (this.format.retainLines && node.loc && node.body.loc && node.loc.start.line < node.body.loc.start.line) { - this.token("("); - - if (firstParam.loc && firstParam.loc.start.line > node.loc.start.line) { - this.indent(); - this.print(firstParam, node); - this.dedent(); - - this._catchUp("start", node.body.loc); - } else { - this.print(firstParam, node); - } - - this.token(")"); - } else { - this.print(firstParam, node); - } - } else { - this._params(node); - } - - this._predicate(node); - - this.space(); - this.token("=>"); - this.space(); - this.print(node.body, node); -} - -function hasTypes(node, param) { - return node.typeParameters || node.returnType || param.typeAnnotation || param.optional || param.trailingComments; -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/modules.js b/node_modules/@babel/generator/lib/generators/modules.js deleted file mode 100644 index af87bd58..00000000 --- a/node_modules/@babel/generator/lib/generators/modules.js +++ /dev/null @@ -1,214 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ImportSpecifier = ImportSpecifier; -exports.ImportDefaultSpecifier = ImportDefaultSpecifier; -exports.ExportDefaultSpecifier = ExportDefaultSpecifier; -exports.ExportSpecifier = ExportSpecifier; -exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier; -exports.ExportAllDeclaration = ExportAllDeclaration; -exports.ExportNamedDeclaration = ExportNamedDeclaration; -exports.ExportDefaultDeclaration = ExportDefaultDeclaration; -exports.ImportDeclaration = ImportDeclaration; -exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function ImportSpecifier(node) { - if (node.importKind === "type" || node.importKind === "typeof") { - this.word(node.importKind); - this.space(); - } - - this.print(node.imported, node); - - if (node.local && node.local.name !== node.imported.name) { - this.space(); - this.word("as"); - this.space(); - this.print(node.local, node); - } -} - -function ImportDefaultSpecifier(node) { - this.print(node.local, node); -} - -function ExportDefaultSpecifier(node) { - this.print(node.exported, node); -} - -function ExportSpecifier(node) { - this.print(node.local, node); - - if (node.exported && node.local.name !== node.exported.name) { - this.space(); - this.word("as"); - this.space(); - this.print(node.exported, node); - } -} - -function ExportNamespaceSpecifier(node) { - this.token("*"); - this.space(); - this.word("as"); - this.space(); - this.print(node.exported, node); -} - -function ExportAllDeclaration(node) { - this.word("export"); - this.space(); - - if (node.exportKind === "type") { - this.word("type"); - this.space(); - } - - this.token("*"); - this.space(); - this.word("from"); - this.space(); - this.print(node.source, node); - this.semicolon(); -} - -function ExportNamedDeclaration(node) { - if (this.format.decoratorsBeforeExport && t().isClassDeclaration(node.declaration)) { - this.printJoin(node.declaration.decorators, node); - } - - this.word("export"); - this.space(); - ExportDeclaration.apply(this, arguments); -} - -function ExportDefaultDeclaration(node) { - if (this.format.decoratorsBeforeExport && t().isClassDeclaration(node.declaration)) { - this.printJoin(node.declaration.decorators, node); - } - - this.word("export"); - this.space(); - this.word("default"); - this.space(); - ExportDeclaration.apply(this, arguments); -} - -function ExportDeclaration(node) { - if (node.declaration) { - const declar = node.declaration; - this.print(declar, node); - if (!t().isStatement(declar)) this.semicolon(); - } else { - if (node.exportKind === "type") { - this.word("type"); - this.space(); - } - - const specifiers = node.specifiers.slice(0); - let hasSpecial = false; - - while (true) { - const first = specifiers[0]; - - if (t().isExportDefaultSpecifier(first) || t().isExportNamespaceSpecifier(first)) { - hasSpecial = true; - this.print(specifiers.shift(), node); - - if (specifiers.length) { - this.token(","); - this.space(); - } - } else { - break; - } - } - - if (specifiers.length || !specifiers.length && !hasSpecial) { - this.token("{"); - - if (specifiers.length) { - this.space(); - this.printList(specifiers, node); - this.space(); - } - - this.token("}"); - } - - if (node.source) { - this.space(); - this.word("from"); - this.space(); - this.print(node.source, node); - } - - this.semicolon(); - } -} - -function ImportDeclaration(node) { - this.word("import"); - this.space(); - - if (node.importKind === "type" || node.importKind === "typeof") { - this.word(node.importKind); - this.space(); - } - - const specifiers = node.specifiers.slice(0); - - if (specifiers && specifiers.length) { - while (true) { - const first = specifiers[0]; - - if (t().isImportDefaultSpecifier(first) || t().isImportNamespaceSpecifier(first)) { - this.print(specifiers.shift(), node); - - if (specifiers.length) { - this.token(","); - this.space(); - } - } else { - break; - } - } - - if (specifiers.length) { - this.token("{"); - this.space(); - this.printList(specifiers, node); - this.space(); - this.token("}"); - } - - this.space(); - this.word("from"); - this.space(); - } - - this.print(node.source, node); - this.semicolon(); -} - -function ImportNamespaceSpecifier(node) { - this.token("*"); - this.space(); - this.word("as"); - this.space(); - this.print(node.local, node); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/statements.js b/node_modules/@babel/generator/lib/generators/statements.js deleted file mode 100644 index c74363de..00000000 --- a/node_modules/@babel/generator/lib/generators/statements.js +++ /dev/null @@ -1,319 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.WithStatement = WithStatement; -exports.IfStatement = IfStatement; -exports.ForStatement = ForStatement; -exports.WhileStatement = WhileStatement; -exports.DoWhileStatement = DoWhileStatement; -exports.LabeledStatement = LabeledStatement; -exports.TryStatement = TryStatement; -exports.CatchClause = CatchClause; -exports.SwitchStatement = SwitchStatement; -exports.SwitchCase = SwitchCase; -exports.DebuggerStatement = DebuggerStatement; -exports.VariableDeclaration = VariableDeclaration; -exports.VariableDeclarator = VariableDeclarator; -exports.ThrowStatement = exports.BreakStatement = exports.ReturnStatement = exports.ContinueStatement = exports.ForOfStatement = exports.ForInStatement = void 0; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function WithStatement(node) { - this.word("with"); - this.space(); - this.token("("); - this.print(node.object, node); - this.token(")"); - this.printBlock(node); -} - -function IfStatement(node) { - this.word("if"); - this.space(); - this.token("("); - this.print(node.test, node); - this.token(")"); - this.space(); - const needsBlock = node.alternate && t().isIfStatement(getLastStatement(node.consequent)); - - if (needsBlock) { - this.token("{"); - this.newline(); - this.indent(); - } - - this.printAndIndentOnComments(node.consequent, node); - - if (needsBlock) { - this.dedent(); - this.newline(); - this.token("}"); - } - - if (node.alternate) { - if (this.endsWith("}")) this.space(); - this.word("else"); - this.space(); - this.printAndIndentOnComments(node.alternate, node); - } -} - -function getLastStatement(statement) { - if (!t().isStatement(statement.body)) return statement; - return getLastStatement(statement.body); -} - -function ForStatement(node) { - this.word("for"); - this.space(); - this.token("("); - this.inForStatementInitCounter++; - this.print(node.init, node); - this.inForStatementInitCounter--; - this.token(";"); - - if (node.test) { - this.space(); - this.print(node.test, node); - } - - this.token(";"); - - if (node.update) { - this.space(); - this.print(node.update, node); - } - - this.token(")"); - this.printBlock(node); -} - -function WhileStatement(node) { - this.word("while"); - this.space(); - this.token("("); - this.print(node.test, node); - this.token(")"); - this.printBlock(node); -} - -const buildForXStatement = function (op) { - return function (node) { - this.word("for"); - this.space(); - - if (op === "of" && node.await) { - this.word("await"); - this.space(); - } - - this.token("("); - this.print(node.left, node); - this.space(); - this.word(op); - this.space(); - this.print(node.right, node); - this.token(")"); - this.printBlock(node); - }; -}; - -const ForInStatement = buildForXStatement("in"); -exports.ForInStatement = ForInStatement; -const ForOfStatement = buildForXStatement("of"); -exports.ForOfStatement = ForOfStatement; - -function DoWhileStatement(node) { - this.word("do"); - this.space(); - this.print(node.body, node); - this.space(); - this.word("while"); - this.space(); - this.token("("); - this.print(node.test, node); - this.token(")"); - this.semicolon(); -} - -function buildLabelStatement(prefix, key = "label") { - return function (node) { - this.word(prefix); - const label = node[key]; - - if (label) { - this.space(); - const isLabel = key == "label"; - const terminatorState = this.startTerminatorless(isLabel); - this.print(label, node); - this.endTerminatorless(terminatorState); - } - - this.semicolon(); - }; -} - -const ContinueStatement = buildLabelStatement("continue"); -exports.ContinueStatement = ContinueStatement; -const ReturnStatement = buildLabelStatement("return", "argument"); -exports.ReturnStatement = ReturnStatement; -const BreakStatement = buildLabelStatement("break"); -exports.BreakStatement = BreakStatement; -const ThrowStatement = buildLabelStatement("throw", "argument"); -exports.ThrowStatement = ThrowStatement; - -function LabeledStatement(node) { - this.print(node.label, node); - this.token(":"); - this.space(); - this.print(node.body, node); -} - -function TryStatement(node) { - this.word("try"); - this.space(); - this.print(node.block, node); - this.space(); - - if (node.handlers) { - this.print(node.handlers[0], node); - } else { - this.print(node.handler, node); - } - - if (node.finalizer) { - this.space(); - this.word("finally"); - this.space(); - this.print(node.finalizer, node); - } -} - -function CatchClause(node) { - this.word("catch"); - this.space(); - - if (node.param) { - this.token("("); - this.print(node.param, node); - this.token(")"); - this.space(); - } - - this.print(node.body, node); -} - -function SwitchStatement(node) { - this.word("switch"); - this.space(); - this.token("("); - this.print(node.discriminant, node); - this.token(")"); - this.space(); - this.token("{"); - this.printSequence(node.cases, node, { - indent: true, - - addNewlines(leading, cas) { - if (!leading && node.cases[node.cases.length - 1] === cas) return -1; - } - - }); - this.token("}"); -} - -function SwitchCase(node) { - if (node.test) { - this.word("case"); - this.space(); - this.print(node.test, node); - this.token(":"); - } else { - this.word("default"); - this.token(":"); - } - - if (node.consequent.length) { - this.newline(); - this.printSequence(node.consequent, node, { - indent: true - }); - } -} - -function DebuggerStatement() { - this.word("debugger"); - this.semicolon(); -} - -function variableDeclarationIndent() { - this.token(","); - this.newline(); - if (this.endsWith("\n")) for (let i = 0; i < 4; i++) this.space(true); -} - -function constDeclarationIndent() { - this.token(","); - this.newline(); - if (this.endsWith("\n")) for (let i = 0; i < 6; i++) this.space(true); -} - -function VariableDeclaration(node, parent) { - if (node.declare) { - this.word("declare"); - this.space(); - } - - this.word(node.kind); - this.space(); - let hasInits = false; - - if (!t().isFor(parent)) { - for (const declar of node.declarations) { - if (declar.init) { - hasInits = true; - } - } - } - - let separator; - - if (hasInits) { - separator = node.kind === "const" ? constDeclarationIndent : variableDeclarationIndent; - } - - this.printList(node.declarations, node, { - separator - }); - - if (t().isFor(parent)) { - if (parent.left === node || parent.init === node) return; - } - - this.semicolon(); -} - -function VariableDeclarator(node) { - this.print(node.id, node); - if (node.definite) this.token("!"); - this.print(node.id.typeAnnotation, node); - - if (node.init) { - this.space(); - this.token("="); - this.space(); - this.print(node.init, node); - } -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/template-literals.js b/node_modules/@babel/generator/lib/generators/template-literals.js deleted file mode 100644 index 05433036..00000000 --- a/node_modules/@babel/generator/lib/generators/template-literals.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.TaggedTemplateExpression = TaggedTemplateExpression; -exports.TemplateElement = TemplateElement; -exports.TemplateLiteral = TemplateLiteral; - -function TaggedTemplateExpression(node) { - this.print(node.tag, node); - this.print(node.typeParameters, node); - this.print(node.quasi, node); -} - -function TemplateElement(node, parent) { - const isFirst = parent.quasis[0] === node; - const isLast = parent.quasis[parent.quasis.length - 1] === node; - const value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${"); - this.token(value); -} - -function TemplateLiteral(node) { - const quasis = node.quasis; - - for (let i = 0; i < quasis.length; i++) { - this.print(quasis[i], node); - - if (i + 1 < quasis.length) { - this.print(node.expressions[i], node); - } - } -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/types.js b/node_modules/@babel/generator/lib/generators/types.js deleted file mode 100644 index 12ae494f..00000000 --- a/node_modules/@babel/generator/lib/generators/types.js +++ /dev/null @@ -1,198 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Identifier = Identifier; -exports.ArgumentPlaceholder = ArgumentPlaceholder; -exports.SpreadElement = exports.RestElement = RestElement; -exports.ObjectPattern = exports.ObjectExpression = ObjectExpression; -exports.ObjectMethod = ObjectMethod; -exports.ObjectProperty = ObjectProperty; -exports.ArrayPattern = exports.ArrayExpression = ArrayExpression; -exports.RegExpLiteral = RegExpLiteral; -exports.BooleanLiteral = BooleanLiteral; -exports.NullLiteral = NullLiteral; -exports.NumericLiteral = NumericLiteral; -exports.StringLiteral = StringLiteral; -exports.BigIntLiteral = BigIntLiteral; -exports.PipelineTopicExpression = PipelineTopicExpression; -exports.PipelineBareFunction = PipelineBareFunction; -exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _jsesc() { - const data = _interopRequireDefault(require("jsesc")); - - _jsesc = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function Identifier(node) { - this.exactSource(node.loc, () => { - this.word(node.name); - }); -} - -function ArgumentPlaceholder() { - this.token("?"); -} - -function RestElement(node) { - this.token("..."); - this.print(node.argument, node); -} - -function ObjectExpression(node) { - const props = node.properties; - this.token("{"); - this.printInnerComments(node); - - if (props.length) { - this.space(); - this.printList(props, node, { - indent: true, - statement: true - }); - this.space(); - } - - this.token("}"); -} - -function ObjectMethod(node) { - this.printJoin(node.decorators, node); - - this._methodHead(node); - - this.space(); - this.print(node.body, node); -} - -function ObjectProperty(node) { - this.printJoin(node.decorators, node); - - if (node.computed) { - this.token("["); - this.print(node.key, node); - this.token("]"); - } else { - if (t().isAssignmentPattern(node.value) && t().isIdentifier(node.key) && node.key.name === node.value.left.name) { - this.print(node.value, node); - return; - } - - this.print(node.key, node); - - if (node.shorthand && t().isIdentifier(node.key) && t().isIdentifier(node.value) && node.key.name === node.value.name) { - return; - } - } - - this.token(":"); - this.space(); - this.print(node.value, node); -} - -function ArrayExpression(node) { - const elems = node.elements; - const len = elems.length; - this.token("["); - this.printInnerComments(node); - - for (let i = 0; i < elems.length; i++) { - const elem = elems[i]; - - if (elem) { - if (i > 0) this.space(); - this.print(elem, node); - if (i < len - 1) this.token(","); - } else { - this.token(","); - } - } - - this.token("]"); -} - -function RegExpLiteral(node) { - this.word(`/${node.pattern}/${node.flags}`); -} - -function BooleanLiteral(node) { - this.word(node.value ? "true" : "false"); -} - -function NullLiteral() { - this.word("null"); -} - -function NumericLiteral(node) { - const raw = this.getPossibleRaw(node); - const value = node.value + ""; - - if (raw == null) { - this.number(value); - } else if (this.format.minified) { - this.number(raw.length < value.length ? raw : value); - } else { - this.number(raw); - } -} - -function StringLiteral(node) { - const raw = this.getPossibleRaw(node); - - if (!this.format.minified && raw != null) { - this.token(raw); - return; - } - - const opts = this.format.jsescOption; - - if (this.format.jsonCompatibleStrings) { - opts.json = true; - } - - const val = (0, _jsesc().default)(node.value, opts); - return this.token(val); -} - -function BigIntLiteral(node) { - const raw = this.getPossibleRaw(node); - - if (!this.format.minified && raw != null) { - this.token(raw); - return; - } - - this.token(node.value); -} - -function PipelineTopicExpression(node) { - this.print(node.expression, node); -} - -function PipelineBareFunction(node) { - this.print(node.callee, node); -} - -function PipelinePrimaryTopicReference() { - this.token("#"); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/generators/typescript.js b/node_modules/@babel/generator/lib/generators/typescript.js deleted file mode 100644 index 0355057d..00000000 --- a/node_modules/@babel/generator/lib/generators/typescript.js +++ /dev/null @@ -1,715 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.TSTypeAnnotation = TSTypeAnnotation; -exports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation; -exports.TSTypeParameter = TSTypeParameter; -exports.TSParameterProperty = TSParameterProperty; -exports.TSDeclareFunction = TSDeclareFunction; -exports.TSDeclareMethod = TSDeclareMethod; -exports.TSQualifiedName = TSQualifiedName; -exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration; -exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration; -exports.TSPropertySignature = TSPropertySignature; -exports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName; -exports.TSMethodSignature = TSMethodSignature; -exports.TSIndexSignature = TSIndexSignature; -exports.TSAnyKeyword = TSAnyKeyword; -exports.TSUnknownKeyword = TSUnknownKeyword; -exports.TSNumberKeyword = TSNumberKeyword; -exports.TSObjectKeyword = TSObjectKeyword; -exports.TSBooleanKeyword = TSBooleanKeyword; -exports.TSStringKeyword = TSStringKeyword; -exports.TSSymbolKeyword = TSSymbolKeyword; -exports.TSVoidKeyword = TSVoidKeyword; -exports.TSUndefinedKeyword = TSUndefinedKeyword; -exports.TSNullKeyword = TSNullKeyword; -exports.TSNeverKeyword = TSNeverKeyword; -exports.TSThisType = TSThisType; -exports.TSFunctionType = TSFunctionType; -exports.TSConstructorType = TSConstructorType; -exports.tsPrintFunctionOrConstructorType = tsPrintFunctionOrConstructorType; -exports.TSTypeReference = TSTypeReference; -exports.TSTypePredicate = TSTypePredicate; -exports.TSTypeQuery = TSTypeQuery; -exports.TSTypeLiteral = TSTypeLiteral; -exports.tsPrintTypeLiteralOrInterfaceBody = tsPrintTypeLiteralOrInterfaceBody; -exports.tsPrintBraced = tsPrintBraced; -exports.TSArrayType = TSArrayType; -exports.TSTupleType = TSTupleType; -exports.TSOptionalType = TSOptionalType; -exports.TSRestType = TSRestType; -exports.TSUnionType = TSUnionType; -exports.TSIntersectionType = TSIntersectionType; -exports.tsPrintUnionOrIntersectionType = tsPrintUnionOrIntersectionType; -exports.TSConditionalType = TSConditionalType; -exports.TSInferType = TSInferType; -exports.TSParenthesizedType = TSParenthesizedType; -exports.TSTypeOperator = TSTypeOperator; -exports.TSIndexedAccessType = TSIndexedAccessType; -exports.TSMappedType = TSMappedType; -exports.TSLiteralType = TSLiteralType; -exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments; -exports.TSInterfaceDeclaration = TSInterfaceDeclaration; -exports.TSInterfaceBody = TSInterfaceBody; -exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration; -exports.TSAsExpression = TSAsExpression; -exports.TSTypeAssertion = TSTypeAssertion; -exports.TSEnumDeclaration = TSEnumDeclaration; -exports.TSEnumMember = TSEnumMember; -exports.TSModuleDeclaration = TSModuleDeclaration; -exports.TSModuleBlock = TSModuleBlock; -exports.TSImportType = TSImportType; -exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration; -exports.TSExternalModuleReference = TSExternalModuleReference; -exports.TSNonNullExpression = TSNonNullExpression; -exports.TSExportAssignment = TSExportAssignment; -exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration; -exports.tsPrintSignatureDeclarationBase = tsPrintSignatureDeclarationBase; - -function TSTypeAnnotation(node) { - this.token(":"); - this.space(); - if (node.optional) this.token("?"); - this.print(node.typeAnnotation, node); -} - -function TSTypeParameterInstantiation(node) { - this.token("<"); - this.printList(node.params, node, {}); - this.token(">"); -} - -function TSTypeParameter(node) { - this.word(node.name); - - if (node.constraint) { - this.space(); - this.word("extends"); - this.space(); - this.print(node.constraint, node); - } - - if (node.default) { - this.space(); - this.token("="); - this.space(); - this.print(node.default, node); - } -} - -function TSParameterProperty(node) { - if (node.accessibility) { - this.word(node.accessibility); - this.space(); - } - - if (node.readonly) { - this.word("readonly"); - this.space(); - } - - this._param(node.parameter); -} - -function TSDeclareFunction(node) { - if (node.declare) { - this.word("declare"); - this.space(); - } - - this._functionHead(node); - - this.token(";"); -} - -function TSDeclareMethod(node) { - this._classMethodHead(node); - - this.token(";"); -} - -function TSQualifiedName(node) { - this.print(node.left, node); - this.token("."); - this.print(node.right, node); -} - -function TSCallSignatureDeclaration(node) { - this.tsPrintSignatureDeclarationBase(node); -} - -function TSConstructSignatureDeclaration(node) { - this.word("new"); - this.space(); - this.tsPrintSignatureDeclarationBase(node); -} - -function TSPropertySignature(node) { - const { - readonly, - initializer - } = node; - - if (readonly) { - this.word("readonly"); - this.space(); - } - - this.tsPrintPropertyOrMethodName(node); - this.print(node.typeAnnotation, node); - - if (initializer) { - this.space(); - this.token("="); - this.space(); - this.print(initializer, node); - } - - this.token(";"); -} - -function tsPrintPropertyOrMethodName(node) { - if (node.computed) { - this.token("["); - } - - this.print(node.key, node); - - if (node.computed) { - this.token("]"); - } - - if (node.optional) { - this.token("?"); - } -} - -function TSMethodSignature(node) { - this.tsPrintPropertyOrMethodName(node); - this.tsPrintSignatureDeclarationBase(node); - this.token(";"); -} - -function TSIndexSignature(node) { - const { - readonly - } = node; - - if (readonly) { - this.word("readonly"); - this.space(); - } - - this.token("["); - - this._parameters(node.parameters, node); - - this.token("]"); - this.print(node.typeAnnotation, node); - this.token(";"); -} - -function TSAnyKeyword() { - this.word("any"); -} - -function TSUnknownKeyword() { - this.word("unknown"); -} - -function TSNumberKeyword() { - this.word("number"); -} - -function TSObjectKeyword() { - this.word("object"); -} - -function TSBooleanKeyword() { - this.word("boolean"); -} - -function TSStringKeyword() { - this.word("string"); -} - -function TSSymbolKeyword() { - this.word("symbol"); -} - -function TSVoidKeyword() { - this.word("void"); -} - -function TSUndefinedKeyword() { - this.word("undefined"); -} - -function TSNullKeyword() { - this.word("null"); -} - -function TSNeverKeyword() { - this.word("never"); -} - -function TSThisType() { - this.word("this"); -} - -function TSFunctionType(node) { - this.tsPrintFunctionOrConstructorType(node); -} - -function TSConstructorType(node) { - this.word("new"); - this.space(); - this.tsPrintFunctionOrConstructorType(node); -} - -function tsPrintFunctionOrConstructorType(node) { - const { - typeParameters, - parameters - } = node; - this.print(typeParameters, node); - this.token("("); - - this._parameters(parameters, node); - - this.token(")"); - this.space(); - this.token("=>"); - this.space(); - this.print(node.typeAnnotation.typeAnnotation, node); -} - -function TSTypeReference(node) { - this.print(node.typeName, node); - this.print(node.typeParameters, node); -} - -function TSTypePredicate(node) { - this.print(node.parameterName); - this.space(); - this.word("is"); - this.space(); - this.print(node.typeAnnotation.typeAnnotation); -} - -function TSTypeQuery(node) { - this.word("typeof"); - this.space(); - this.print(node.exprName); -} - -function TSTypeLiteral(node) { - this.tsPrintTypeLiteralOrInterfaceBody(node.members, node); -} - -function tsPrintTypeLiteralOrInterfaceBody(members, node) { - this.tsPrintBraced(members, node); -} - -function tsPrintBraced(members, node) { - this.token("{"); - - if (members.length) { - this.indent(); - this.newline(); - - for (const member of members) { - this.print(member, node); - this.newline(); - } - - this.dedent(); - this.rightBrace(); - } else { - this.token("}"); - } -} - -function TSArrayType(node) { - this.print(node.elementType, node); - this.token("[]"); -} - -function TSTupleType(node) { - this.token("["); - this.printList(node.elementTypes, node); - this.token("]"); -} - -function TSOptionalType(node) { - this.print(node.typeAnnotation, node); - this.token("?"); -} - -function TSRestType(node) { - this.token("..."); - this.print(node.typeAnnotation, node); -} - -function TSUnionType(node) { - this.tsPrintUnionOrIntersectionType(node, "|"); -} - -function TSIntersectionType(node) { - this.tsPrintUnionOrIntersectionType(node, "&"); -} - -function tsPrintUnionOrIntersectionType(node, sep) { - this.printJoin(node.types, node, { - separator() { - this.space(); - this.token(sep); - this.space(); - } - - }); -} - -function TSConditionalType(node) { - this.print(node.checkType); - this.space(); - this.word("extends"); - this.space(); - this.print(node.extendsType); - this.space(); - this.token("?"); - this.space(); - this.print(node.trueType); - this.space(); - this.token(":"); - this.space(); - this.print(node.falseType); -} - -function TSInferType(node) { - this.token("infer"); - this.space(); - this.print(node.typeParameter); -} - -function TSParenthesizedType(node) { - this.token("("); - this.print(node.typeAnnotation, node); - this.token(")"); -} - -function TSTypeOperator(node) { - this.token(node.operator); - this.space(); - this.print(node.typeAnnotation, node); -} - -function TSIndexedAccessType(node) { - this.print(node.objectType, node); - this.token("["); - this.print(node.indexType, node); - this.token("]"); -} - -function TSMappedType(node) { - const { - readonly, - typeParameter, - optional - } = node; - this.token("{"); - this.space(); - - if (readonly) { - tokenIfPlusMinus(this, readonly); - this.word("readonly"); - this.space(); - } - - this.token("["); - this.word(typeParameter.name); - this.space(); - this.word("in"); - this.space(); - this.print(typeParameter.constraint, typeParameter); - this.token("]"); - - if (optional) { - tokenIfPlusMinus(this, optional); - this.token("?"); - } - - this.token(":"); - this.space(); - this.print(node.typeAnnotation, node); - this.space(); - this.token("}"); -} - -function tokenIfPlusMinus(self, tok) { - if (tok !== true) { - self.token(tok); - } -} - -function TSLiteralType(node) { - this.print(node.literal, node); -} - -function TSExpressionWithTypeArguments(node) { - this.print(node.expression, node); - this.print(node.typeParameters, node); -} - -function TSInterfaceDeclaration(node) { - const { - declare, - id, - typeParameters, - extends: extendz, - body - } = node; - - if (declare) { - this.word("declare"); - this.space(); - } - - this.word("interface"); - this.space(); - this.print(id, node); - this.print(typeParameters, node); - - if (extendz) { - this.space(); - this.word("extends"); - this.space(); - this.printList(extendz, node); - } - - this.space(); - this.print(body, node); -} - -function TSInterfaceBody(node) { - this.tsPrintTypeLiteralOrInterfaceBody(node.body, node); -} - -function TSTypeAliasDeclaration(node) { - const { - declare, - id, - typeParameters, - typeAnnotation - } = node; - - if (declare) { - this.word("declare"); - this.space(); - } - - this.word("type"); - this.space(); - this.print(id, node); - this.print(typeParameters, node); - this.space(); - this.token("="); - this.space(); - this.print(typeAnnotation, node); - this.token(";"); -} - -function TSAsExpression(node) { - const { - expression, - typeAnnotation - } = node; - this.print(expression, node); - this.space(); - this.word("as"); - this.space(); - this.print(typeAnnotation, node); -} - -function TSTypeAssertion(node) { - const { - typeAnnotation, - expression - } = node; - this.token("<"); - this.print(typeAnnotation, node); - this.token(">"); - this.space(); - this.print(expression, node); -} - -function TSEnumDeclaration(node) { - const { - declare, - const: isConst, - id, - members - } = node; - - if (declare) { - this.word("declare"); - this.space(); - } - - if (isConst) { - this.word("const"); - this.space(); - } - - this.word("enum"); - this.space(); - this.print(id, node); - this.space(); - this.tsPrintBraced(members, node); -} - -function TSEnumMember(node) { - const { - id, - initializer - } = node; - this.print(id, node); - - if (initializer) { - this.space(); - this.token("="); - this.space(); - this.print(initializer, node); - } - - this.token(","); -} - -function TSModuleDeclaration(node) { - const { - declare, - id - } = node; - - if (declare) { - this.word("declare"); - this.space(); - } - - if (!node.global) { - this.word(id.type === "Identifier" ? "namespace" : "module"); - this.space(); - } - - this.print(id, node); - - if (!node.body) { - this.token(";"); - return; - } - - let body = node.body; - - while (body.type === "TSModuleDeclaration") { - this.token("."); - this.print(body.id, body); - body = body.body; - } - - this.space(); - this.print(body, node); -} - -function TSModuleBlock(node) { - this.tsPrintBraced(node.body, node); -} - -function TSImportType(node) { - const { - argument, - qualifier, - typeParameters - } = node; - this.word("import"); - this.token("("); - this.print(argument, node); - this.token(")"); - - if (qualifier) { - this.token("."); - this.print(qualifier, node); - } - - if (typeParameters) { - this.print(typeParameters, node); - } -} - -function TSImportEqualsDeclaration(node) { - const { - isExport, - id, - moduleReference - } = node; - - if (isExport) { - this.word("export"); - this.space(); - } - - this.word("import"); - this.space(); - this.print(id, node); - this.space(); - this.token("="); - this.space(); - this.print(moduleReference, node); - this.token(";"); -} - -function TSExternalModuleReference(node) { - this.token("require("); - this.print(node.expression, node); - this.token(")"); -} - -function TSNonNullExpression(node) { - this.print(node.expression, node); - this.token("!"); -} - -function TSExportAssignment(node) { - this.word("export"); - this.space(); - this.token("="); - this.space(); - this.print(node.expression, node); - this.token(";"); -} - -function TSNamespaceExportDeclaration(node) { - this.word("export"); - this.space(); - this.word("as"); - this.space(); - this.word("namespace"); - this.space(); - this.print(node.id, node); -} - -function tsPrintSignatureDeclarationBase(node) { - const { - typeParameters, - parameters - } = node; - this.print(typeParameters, node); - this.token("("); - - this._parameters(parameters, node); - - this.token(")"); - this.print(node.typeAnnotation, node); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/index.js b/node_modules/@babel/generator/lib/index.js deleted file mode 100644 index fcdb288b..00000000 --- a/node_modules/@babel/generator/lib/index.js +++ /dev/null @@ -1,92 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; -exports.CodeGenerator = void 0; - -var _sourceMap = _interopRequireDefault(require("./source-map")); - -var _printer = _interopRequireDefault(require("./printer")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -class Generator extends _printer.default { - constructor(ast, opts = {}, code) { - const format = normalizeOptions(code, opts); - const map = opts.sourceMaps ? new _sourceMap.default(opts, code) : null; - super(format, map); - this.ast = ast; - } - - generate() { - return super.generate(this.ast); - } - -} - -function normalizeOptions(code, opts) { - const format = { - auxiliaryCommentBefore: opts.auxiliaryCommentBefore, - auxiliaryCommentAfter: opts.auxiliaryCommentAfter, - shouldPrintComment: opts.shouldPrintComment, - retainLines: opts.retainLines, - retainFunctionParens: opts.retainFunctionParens, - comments: opts.comments == null || opts.comments, - compact: opts.compact, - minified: opts.minified, - concise: opts.concise, - jsonCompatibleStrings: opts.jsonCompatibleStrings, - indent: { - adjustMultilineComment: true, - style: " ", - base: 0 - }, - decoratorsBeforeExport: !!opts.decoratorsBeforeExport, - jsescOption: Object.assign({ - quotes: "double", - wrap: true - }, opts.jsescOption) - }; - - if (format.minified) { - format.compact = true; - - format.shouldPrintComment = format.shouldPrintComment || (() => format.comments); - } else { - format.shouldPrintComment = format.shouldPrintComment || (value => format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0); - } - - if (format.compact === "auto") { - format.compact = code.length > 500000; - - if (format.compact) { - console.error("[BABEL] Note: The code generator has deoptimised the styling of " + `${opts.filename} as it exceeds the max of ${"500KB"}.`); - } - } - - if (format.compact) { - format.indent.adjustMultilineComment = false; - } - - return format; -} - -class CodeGenerator { - constructor(ast, opts, code) { - this._generator = new Generator(ast, opts, code); - } - - generate() { - return this._generator.generate(); - } - -} - -exports.CodeGenerator = CodeGenerator; - -function _default(ast, opts, code) { - const gen = new Generator(ast, opts, code); - return gen.generate(); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/node/index.js b/node_modules/@babel/generator/lib/node/index.js deleted file mode 100644 index bef46f0e..00000000 --- a/node_modules/@babel/generator/lib/node/index.js +++ /dev/null @@ -1,117 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.needsWhitespace = needsWhitespace; -exports.needsWhitespaceBefore = needsWhitespaceBefore; -exports.needsWhitespaceAfter = needsWhitespaceAfter; -exports.needsParens = needsParens; - -var whitespace = _interopRequireWildcard(require("./whitespace")); - -var parens = _interopRequireWildcard(require("./parentheses")); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function expandAliases(obj) { - const newObj = {}; - - function add(type, func) { - const fn = newObj[type]; - newObj[type] = fn ? function (node, parent, stack) { - const result = fn(node, parent, stack); - return result == null ? func(node, parent, stack) : result; - } : func; - } - - for (const type of Object.keys(obj)) { - const aliases = t().FLIPPED_ALIAS_KEYS[type]; - - if (aliases) { - for (const alias of aliases) { - add(alias, obj[type]); - } - } else { - add(type, obj[type]); - } - } - - return newObj; -} - -const expandedParens = expandAliases(parens); -const expandedWhitespaceNodes = expandAliases(whitespace.nodes); -const expandedWhitespaceList = expandAliases(whitespace.list); - -function find(obj, node, parent, printStack) { - const fn = obj[node.type]; - return fn ? fn(node, parent, printStack) : null; -} - -function isOrHasCallExpression(node) { - if (t().isCallExpression(node)) { - return true; - } - - if (t().isMemberExpression(node)) { - return isOrHasCallExpression(node.object) || !node.computed && isOrHasCallExpression(node.property); - } else { - return false; - } -} - -function needsWhitespace(node, parent, type) { - if (!node) return 0; - - if (t().isExpressionStatement(node)) { - node = node.expression; - } - - let linesInfo = find(expandedWhitespaceNodes, node, parent); - - if (!linesInfo) { - const items = find(expandedWhitespaceList, node, parent); - - if (items) { - for (let i = 0; i < items.length; i++) { - linesInfo = needsWhitespace(items[i], node, type); - if (linesInfo) break; - } - } - } - - if (typeof linesInfo === "object" && linesInfo !== null) { - return linesInfo[type] || 0; - } - - return 0; -} - -function needsWhitespaceBefore(node, parent) { - return needsWhitespace(node, parent, "before"); -} - -function needsWhitespaceAfter(node, parent) { - return needsWhitespace(node, parent, "after"); -} - -function needsParens(node, parent, printStack) { - if (!parent) return false; - - if (t().isNewExpression(parent) && parent.callee === node) { - if (isOrHasCallExpression(node)) return true; - } - - return find(expandedParens, node, parent, printStack); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/node/parentheses.js b/node_modules/@babel/generator/lib/node/parentheses.js deleted file mode 100644 index 3f98dc18..00000000 --- a/node_modules/@babel/generator/lib/node/parentheses.js +++ /dev/null @@ -1,253 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.NullableTypeAnnotation = NullableTypeAnnotation; -exports.FunctionTypeAnnotation = FunctionTypeAnnotation; -exports.UpdateExpression = UpdateExpression; -exports.ObjectExpression = ObjectExpression; -exports.DoExpression = DoExpression; -exports.Binary = Binary; -exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation; -exports.TSAsExpression = TSAsExpression; -exports.TSTypeAssertion = TSTypeAssertion; -exports.TSIntersectionType = exports.TSUnionType = TSUnionType; -exports.BinaryExpression = BinaryExpression; -exports.SequenceExpression = SequenceExpression; -exports.AwaitExpression = exports.YieldExpression = YieldExpression; -exports.ClassExpression = ClassExpression; -exports.UnaryLike = UnaryLike; -exports.FunctionExpression = FunctionExpression; -exports.ArrowFunctionExpression = ArrowFunctionExpression; -exports.ConditionalExpression = ConditionalExpression; -exports.OptionalMemberExpression = OptionalMemberExpression; -exports.AssignmentExpression = AssignmentExpression; -exports.NewExpression = NewExpression; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const PRECEDENCE = { - "||": 0, - "&&": 1, - "|": 2, - "^": 3, - "&": 4, - "==": 5, - "===": 5, - "!=": 5, - "!==": 5, - "<": 6, - ">": 6, - "<=": 6, - ">=": 6, - in: 6, - instanceof: 6, - ">>": 7, - "<<": 7, - ">>>": 7, - "+": 8, - "-": 8, - "*": 9, - "/": 9, - "%": 9, - "**": 10 -}; - -const isClassExtendsClause = (node, parent) => (t().isClassDeclaration(parent) || t().isClassExpression(parent)) && parent.superClass === node; - -function NullableTypeAnnotation(node, parent) { - return t().isArrayTypeAnnotation(parent); -} - -function FunctionTypeAnnotation(node, parent) { - return t().isUnionTypeAnnotation(parent) || t().isIntersectionTypeAnnotation(parent) || t().isArrayTypeAnnotation(parent); -} - -function UpdateExpression(node, parent) { - return t().isMemberExpression(parent, { - object: node - }) || t().isCallExpression(parent, { - callee: node - }) || t().isNewExpression(parent, { - callee: node - }) || isClassExtendsClause(node, parent); -} - -function ObjectExpression(node, parent, printStack) { - return isFirstInStatement(printStack, { - considerArrow: true - }); -} - -function DoExpression(node, parent, printStack) { - return isFirstInStatement(printStack); -} - -function Binary(node, parent) { - if (node.operator === "**" && t().isBinaryExpression(parent, { - operator: "**" - })) { - return parent.left === node; - } - - if (isClassExtendsClause(node, parent)) { - return true; - } - - if ((t().isCallExpression(parent) || t().isNewExpression(parent)) && parent.callee === node || t().isUnaryLike(parent) || t().isMemberExpression(parent) && parent.object === node || t().isAwaitExpression(parent)) { - return true; - } - - if (t().isBinary(parent)) { - const parentOp = parent.operator; - const parentPos = PRECEDENCE[parentOp]; - const nodeOp = node.operator; - const nodePos = PRECEDENCE[nodeOp]; - - if (parentPos === nodePos && parent.right === node && !t().isLogicalExpression(parent) || parentPos > nodePos) { - return true; - } - } - - return false; -} - -function UnionTypeAnnotation(node, parent) { - return t().isArrayTypeAnnotation(parent) || t().isNullableTypeAnnotation(parent) || t().isIntersectionTypeAnnotation(parent) || t().isUnionTypeAnnotation(parent); -} - -function TSAsExpression() { - return true; -} - -function TSTypeAssertion() { - return true; -} - -function TSUnionType(node, parent) { - return t().isTSArrayType(parent) || t().isTSOptionalType(parent) || t().isTSIntersectionType(parent) || t().isTSUnionType(parent) || t().isTSRestType(parent); -} - -function BinaryExpression(node, parent) { - return node.operator === "in" && (t().isVariableDeclarator(parent) || t().isFor(parent)); -} - -function SequenceExpression(node, parent) { - if (t().isForStatement(parent) || t().isThrowStatement(parent) || t().isReturnStatement(parent) || t().isIfStatement(parent) && parent.test === node || t().isWhileStatement(parent) && parent.test === node || t().isForInStatement(parent) && parent.right === node || t().isSwitchStatement(parent) && parent.discriminant === node || t().isExpressionStatement(parent) && parent.expression === node) { - return false; - } - - return true; -} - -function YieldExpression(node, parent) { - return t().isBinary(parent) || t().isUnaryLike(parent) || t().isCallExpression(parent) || t().isMemberExpression(parent) || t().isNewExpression(parent) || t().isAwaitExpression(parent) && t().isYieldExpression(node) || t().isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent); -} - -function ClassExpression(node, parent, printStack) { - return isFirstInStatement(printStack, { - considerDefaultExports: true - }); -} - -function UnaryLike(node, parent) { - return t().isMemberExpression(parent, { - object: node - }) || t().isCallExpression(parent, { - callee: node - }) || t().isNewExpression(parent, { - callee: node - }) || t().isBinaryExpression(parent, { - operator: "**", - left: node - }) || isClassExtendsClause(node, parent); -} - -function FunctionExpression(node, parent, printStack) { - return isFirstInStatement(printStack, { - considerDefaultExports: true - }); -} - -function ArrowFunctionExpression(node, parent) { - return t().isExportDeclaration(parent) || ConditionalExpression(node, parent); -} - -function ConditionalExpression(node, parent) { - if (t().isUnaryLike(parent) || t().isBinary(parent) || t().isConditionalExpression(parent, { - test: node - }) || t().isAwaitExpression(parent) || t().isOptionalMemberExpression(parent) || t().isTaggedTemplateExpression(parent) || t().isTSTypeAssertion(parent) || t().isTSAsExpression(parent)) { - return true; - } - - return UnaryLike(node, parent); -} - -function OptionalMemberExpression(node, parent) { - return t().isCallExpression(parent) || t().isMemberExpression(parent); -} - -function AssignmentExpression(node) { - if (t().isObjectPattern(node.left)) { - return true; - } else { - return ConditionalExpression(...arguments); - } -} - -function NewExpression(node, parent) { - return isClassExtendsClause(node, parent); -} - -function isFirstInStatement(printStack, { - considerArrow = false, - considerDefaultExports = false -} = {}) { - let i = printStack.length - 1; - let node = printStack[i]; - i--; - let parent = printStack[i]; - - while (i > 0) { - if (t().isExpressionStatement(parent, { - expression: node - }) || t().isTaggedTemplateExpression(parent) || considerDefaultExports && t().isExportDefaultDeclaration(parent, { - declaration: node - }) || considerArrow && t().isArrowFunctionExpression(parent, { - body: node - })) { - return true; - } - - if (t().isCallExpression(parent, { - callee: node - }) || t().isSequenceExpression(parent) && parent.expressions[0] === node || t().isMemberExpression(parent, { - object: node - }) || t().isConditional(parent, { - test: node - }) || t().isBinary(parent, { - left: node - }) || t().isAssignmentExpression(parent, { - left: node - })) { - node = parent; - i--; - parent = printStack[i]; - } else { - return false; - } - } - - return false; -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/node/whitespace.js b/node_modules/@babel/generator/lib/node/whitespace.js deleted file mode 100644 index 06121860..00000000 --- a/node_modules/@babel/generator/lib/node/whitespace.js +++ /dev/null @@ -1,192 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.list = exports.nodes = void 0; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function crawl(node, state = {}) { - if (t().isMemberExpression(node)) { - crawl(node.object, state); - if (node.computed) crawl(node.property, state); - } else if (t().isBinary(node) || t().isAssignmentExpression(node)) { - crawl(node.left, state); - crawl(node.right, state); - } else if (t().isCallExpression(node)) { - state.hasCall = true; - crawl(node.callee, state); - } else if (t().isFunction(node)) { - state.hasFunction = true; - } else if (t().isIdentifier(node)) { - state.hasHelper = state.hasHelper || isHelper(node.callee); - } - - return state; -} - -function isHelper(node) { - if (t().isMemberExpression(node)) { - return isHelper(node.object) || isHelper(node.property); - } else if (t().isIdentifier(node)) { - return node.name === "require" || node.name[0] === "_"; - } else if (t().isCallExpression(node)) { - return isHelper(node.callee); - } else if (t().isBinary(node) || t().isAssignmentExpression(node)) { - return t().isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right); - } else { - return false; - } -} - -function isType(node) { - return t().isLiteral(node) || t().isObjectExpression(node) || t().isArrayExpression(node) || t().isIdentifier(node) || t().isMemberExpression(node); -} - -const nodes = { - AssignmentExpression(node) { - const state = crawl(node.right); - - if (state.hasCall && state.hasHelper || state.hasFunction) { - return { - before: state.hasFunction, - after: true - }; - } - }, - - SwitchCase(node, parent) { - return { - before: node.consequent.length || parent.cases[0] === node, - after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node - }; - }, - - LogicalExpression(node) { - if (t().isFunction(node.left) || t().isFunction(node.right)) { - return { - after: true - }; - } - }, - - Literal(node) { - if (node.value === "use strict") { - return { - after: true - }; - } - }, - - CallExpression(node) { - if (t().isFunction(node.callee) || isHelper(node)) { - return { - before: true, - after: true - }; - } - }, - - VariableDeclaration(node) { - for (let i = 0; i < node.declarations.length; i++) { - const declar = node.declarations[i]; - let enabled = isHelper(declar.id) && !isType(declar.init); - - if (!enabled) { - const state = crawl(declar.init); - enabled = isHelper(declar.init) && state.hasCall || state.hasFunction; - } - - if (enabled) { - return { - before: true, - after: true - }; - } - } - }, - - IfStatement(node) { - if (t().isBlockStatement(node.consequent)) { - return { - before: true, - after: true - }; - } - } - -}; -exports.nodes = nodes; - -nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function (node, parent) { - if (parent.properties[0] === node) { - return { - before: true - }; - } -}; - -nodes.ObjectTypeCallProperty = function (node, parent) { - if (parent.callProperties[0] === node && (!parent.properties || !parent.properties.length)) { - return { - before: true - }; - } -}; - -nodes.ObjectTypeIndexer = function (node, parent) { - if (parent.indexers[0] === node && (!parent.properties || !parent.properties.length) && (!parent.callProperties || !parent.callProperties.length)) { - return { - before: true - }; - } -}; - -nodes.ObjectTypeInternalSlot = function (node, parent) { - if (parent.internalSlots[0] === node && (!parent.properties || !parent.properties.length) && (!parent.callProperties || !parent.callProperties.length) && (!parent.indexers || !parent.indexers.length)) { - return { - before: true - }; - } -}; - -const list = { - VariableDeclaration(node) { - return node.declarations.map(decl => decl.init); - }, - - ArrayExpression(node) { - return node.elements; - }, - - ObjectExpression(node) { - return node.properties; - } - -}; -exports.list = list; -[["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function ([type, amounts]) { - if (typeof amounts === "boolean") { - amounts = { - after: amounts, - before: amounts - }; - } - - [type].concat(t().FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) { - nodes[type] = function () { - return amounts; - }; - }); -}); \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/printer.js b/node_modules/@babel/generator/lib/printer.js deleted file mode 100644 index 9458169f..00000000 --- a/node_modules/@babel/generator/lib/printer.js +++ /dev/null @@ -1,501 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function _isInteger() { - const data = _interopRequireDefault(require("lodash/isInteger")); - - _isInteger = function () { - return data; - }; - - return data; -} - -function _repeat() { - const data = _interopRequireDefault(require("lodash/repeat")); - - _repeat = function () { - return data; - }; - - return data; -} - -var _buffer = _interopRequireDefault(require("./buffer")); - -var n = _interopRequireWildcard(require("./node")); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -var generatorFunctions = _interopRequireWildcard(require("./generators")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const SCIENTIFIC_NOTATION = /e/i; -const ZERO_DECIMAL_INTEGER = /\.0+$/; -const NON_DECIMAL_LITERAL = /^0[box]/; - -class Printer { - constructor(format, map) { - this.inForStatementInitCounter = 0; - this._printStack = []; - this._indent = 0; - this._insideAux = false; - this._printedCommentStarts = {}; - this._parenPushNewlineState = null; - this._noLineTerminator = false; - this._printAuxAfterOnNextUserNode = false; - this._printedComments = new WeakSet(); - this._endsWithInteger = false; - this._endsWithWord = false; - this.format = format || {}; - this._buf = new _buffer.default(map); - } - - generate(ast) { - this.print(ast); - - this._maybeAddAuxComment(); - - return this._buf.get(); - } - - indent() { - if (this.format.compact || this.format.concise) return; - this._indent++; - } - - dedent() { - if (this.format.compact || this.format.concise) return; - this._indent--; - } - - semicolon(force = false) { - this._maybeAddAuxComment(); - - this._append(";", !force); - } - - rightBrace() { - if (this.format.minified) { - this._buf.removeLastSemicolon(); - } - - this.token("}"); - } - - space(force = false) { - if (this.format.compact) return; - - if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) { - this._space(); - } - } - - word(str) { - if (this._endsWithWord || this.endsWith("/") && str.indexOf("/") === 0) { - this._space(); - } - - this._maybeAddAuxComment(); - - this._append(str); - - this._endsWithWord = true; - } - - number(str) { - this.word(str); - this._endsWithInteger = (0, _isInteger().default)(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== "."; - } - - token(str) { - if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) { - this._space(); - } - - this._maybeAddAuxComment(); - - this._append(str); - } - - newline(i) { - if (this.format.retainLines || this.format.compact) return; - - if (this.format.concise) { - this.space(); - return; - } - - if (this.endsWith("\n\n")) return; - if (typeof i !== "number") i = 1; - i = Math.min(2, i); - if (this.endsWith("{\n") || this.endsWith(":\n")) i--; - if (i <= 0) return; - - for (let j = 0; j < i; j++) { - this._newline(); - } - } - - endsWith(str) { - return this._buf.endsWith(str); - } - - removeTrailingNewline() { - this._buf.removeTrailingNewline(); - } - - exactSource(loc, cb) { - this._catchUp("start", loc); - - this._buf.exactSource(loc, cb); - } - - source(prop, loc) { - this._catchUp(prop, loc); - - this._buf.source(prop, loc); - } - - withSource(prop, loc, cb) { - this._catchUp(prop, loc); - - this._buf.withSource(prop, loc, cb); - } - - _space() { - this._append(" ", true); - } - - _newline() { - this._append("\n", true); - } - - _append(str, queue = false) { - this._maybeAddParen(str); - - this._maybeIndent(str); - - if (queue) this._buf.queue(str);else this._buf.append(str); - this._endsWithWord = false; - this._endsWithInteger = false; - } - - _maybeIndent(str) { - if (this._indent && this.endsWith("\n") && str[0] !== "\n") { - this._buf.queue(this._getIndent()); - } - } - - _maybeAddParen(str) { - const parenPushNewlineState = this._parenPushNewlineState; - if (!parenPushNewlineState) return; - this._parenPushNewlineState = null; - let i; - - for (i = 0; i < str.length && str[i] === " "; i++) continue; - - if (i === str.length) return; - const cha = str[i]; - - if (cha !== "\n") { - if (cha !== "/") return; - if (i + 1 === str.length) return; - const chaPost = str[i + 1]; - if (chaPost !== "/" && chaPost !== "*") return; - } - - this.token("("); - this.indent(); - parenPushNewlineState.printed = true; - } - - _catchUp(prop, loc) { - if (!this.format.retainLines) return; - const pos = loc ? loc[prop] : null; - - if (pos && pos.line !== null) { - const count = pos.line - this._buf.getCurrentLine(); - - for (let i = 0; i < count; i++) { - this._newline(); - } - } - } - - _getIndent() { - return (0, _repeat().default)(this.format.indent.style, this._indent); - } - - startTerminatorless(isLabel = false) { - if (isLabel) { - this._noLineTerminator = true; - return null; - } else { - return this._parenPushNewlineState = { - printed: false - }; - } - } - - endTerminatorless(state) { - this._noLineTerminator = false; - - if (state && state.printed) { - this.dedent(); - this.newline(); - this.token(")"); - } - } - - print(node, parent) { - if (!node) return; - const oldConcise = this.format.concise; - - if (node._compact) { - this.format.concise = true; - } - - const printMethod = this[node.type]; - - if (!printMethod) { - throw new ReferenceError(`unknown node of type ${JSON.stringify(node.type)} with constructor ${JSON.stringify(node && node.constructor.name)}`); - } - - this._printStack.push(node); - - const oldInAux = this._insideAux; - this._insideAux = !node.loc; - - this._maybeAddAuxComment(this._insideAux && !oldInAux); - - let needsParens = n.needsParens(node, parent, this._printStack); - - if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) { - needsParens = true; - } - - if (needsParens) this.token("("); - - this._printLeadingComments(node); - - const loc = t().isProgram(node) || t().isFile(node) ? null : node.loc; - this.withSource("start", loc, () => { - printMethod.call(this, node, parent); - }); - - this._printTrailingComments(node); - - if (needsParens) this.token(")"); - - this._printStack.pop(); - - this.format.concise = oldConcise; - this._insideAux = oldInAux; - } - - _maybeAddAuxComment(enteredPositionlessNode) { - if (enteredPositionlessNode) this._printAuxBeforeComment(); - if (!this._insideAux) this._printAuxAfterComment(); - } - - _printAuxBeforeComment() { - if (this._printAuxAfterOnNextUserNode) return; - this._printAuxAfterOnNextUserNode = true; - const comment = this.format.auxiliaryCommentBefore; - - if (comment) { - this._printComment({ - type: "CommentBlock", - value: comment - }); - } - } - - _printAuxAfterComment() { - if (!this._printAuxAfterOnNextUserNode) return; - this._printAuxAfterOnNextUserNode = false; - const comment = this.format.auxiliaryCommentAfter; - - if (comment) { - this._printComment({ - type: "CommentBlock", - value: comment - }); - } - } - - getPossibleRaw(node) { - const extra = node.extra; - - if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) { - return extra.raw; - } - } - - printJoin(nodes, parent, opts = {}) { - if (!nodes || !nodes.length) return; - if (opts.indent) this.indent(); - const newlineOpts = { - addNewlines: opts.addNewlines - }; - - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (!node) continue; - if (opts.statement) this._printNewline(true, node, parent, newlineOpts); - this.print(node, parent); - - if (opts.iterator) { - opts.iterator(node, i); - } - - if (opts.separator && i < nodes.length - 1) { - opts.separator.call(this); - } - - if (opts.statement) this._printNewline(false, node, parent, newlineOpts); - } - - if (opts.indent) this.dedent(); - } - - printAndIndentOnComments(node, parent) { - const indent = node.leadingComments && node.leadingComments.length > 0; - if (indent) this.indent(); - this.print(node, parent); - if (indent) this.dedent(); - } - - printBlock(parent) { - const node = parent.body; - - if (!t().isEmptyStatement(node)) { - this.space(); - } - - this.print(node, parent); - } - - _printTrailingComments(node) { - this._printComments(this._getComments(false, node)); - } - - _printLeadingComments(node) { - this._printComments(this._getComments(true, node)); - } - - printInnerComments(node, indent = true) { - if (!node.innerComments || !node.innerComments.length) return; - if (indent) this.indent(); - - this._printComments(node.innerComments); - - if (indent) this.dedent(); - } - - printSequence(nodes, parent, opts = {}) { - opts.statement = true; - return this.printJoin(nodes, parent, opts); - } - - printList(items, parent, opts = {}) { - if (opts.separator == null) { - opts.separator = commaSeparator; - } - - return this.printJoin(items, parent, opts); - } - - _printNewline(leading, node, parent, opts) { - if (this.format.retainLines || this.format.compact) return; - - if (this.format.concise) { - this.space(); - return; - } - - let lines = 0; - - if (this._buf.hasContent()) { - if (!leading) lines++; - if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0; - const needs = leading ? n.needsWhitespaceBefore : n.needsWhitespaceAfter; - if (needs(node, parent)) lines++; - } - - this.newline(lines); - } - - _getComments(leading, node) { - return node && (leading ? node.leadingComments : node.trailingComments) || []; - } - - _printComment(comment) { - if (!this.format.shouldPrintComment(comment.value)) return; - if (comment.ignore) return; - if (this._printedComments.has(comment)) return; - - this._printedComments.add(comment); - - if (comment.start != null) { - if (this._printedCommentStarts[comment.start]) return; - this._printedCommentStarts[comment.start] = true; - } - - const isBlockComment = comment.type === "CommentBlock"; - this.newline(this._buf.hasContent() && !this._noLineTerminator && isBlockComment ? 1 : 0); - if (!this.endsWith("[") && !this.endsWith("{")) this.space(); - let val = !isBlockComment && !this._noLineTerminator ? `//${comment.value}\n` : `/*${comment.value}*/`; - - if (isBlockComment && this.format.indent.adjustMultilineComment) { - const offset = comment.loc && comment.loc.start.column; - - if (offset) { - const newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g"); - val = val.replace(newlineRegex, "\n"); - } - - const indentSize = Math.max(this._getIndent().length, this._buf.getCurrentColumn()); - val = val.replace(/\n(?!$)/g, `\n${(0, _repeat().default)(" ", indentSize)}`); - } - - if (this.endsWith("/")) this._space(); - this.withSource("start", comment.loc, () => { - this._append(val); - }); - this.newline(isBlockComment && !this._noLineTerminator ? 1 : 0); - } - - _printComments(comments) { - if (!comments || !comments.length) return; - - for (const comment of comments) { - this._printComment(comment); - } - } - -} - -exports.default = Printer; -Object.assign(Printer.prototype, generatorFunctions); - -function commaSeparator() { - this.token(","); - this.space(); -} \ No newline at end of file diff --git a/node_modules/@babel/generator/lib/source-map.js b/node_modules/@babel/generator/lib/source-map.js deleted file mode 100644 index 12b70308..00000000 --- a/node_modules/@babel/generator/lib/source-map.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function _sourceMap() { - const data = _interopRequireDefault(require("source-map")); - - _sourceMap = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -class SourceMap { - constructor(opts, code) { - this._cachedMap = null; - this._code = code; - this._opts = opts; - this._rawMappings = []; - } - - get() { - if (!this._cachedMap) { - const map = this._cachedMap = new (_sourceMap().default.SourceMapGenerator)({ - sourceRoot: this._opts.sourceRoot - }); - const code = this._code; - - if (typeof code === "string") { - map.setSourceContent(this._opts.sourceFileName, code); - } else if (typeof code === "object") { - Object.keys(code).forEach(sourceFileName => { - map.setSourceContent(sourceFileName, code[sourceFileName]); - }); - } - - this._rawMappings.forEach(map.addMapping, map); - } - - return this._cachedMap.toJSON(); - } - - getRawMappings() { - return this._rawMappings.slice(); - } - - mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) { - if (this._lastGenLine !== generatedLine && line === null) return; - - if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) { - return; - } - - this._cachedMap = null; - this._lastGenLine = generatedLine; - this._lastSourceLine = line; - this._lastSourceColumn = column; - - this._rawMappings.push({ - name: identifierName || undefined, - generated: { - line: generatedLine, - column: generatedColumn - }, - source: line == null ? undefined : filename || this._opts.sourceFileName, - original: line == null ? undefined : { - line: line, - column: column - } - }); - } - -} - -exports.default = SourceMap; \ No newline at end of file diff --git a/node_modules/@babel/generator/node_modules/source-map/CHANGELOG.md b/node_modules/@babel/generator/node_modules/source-map/CHANGELOG.md deleted file mode 100644 index 3a8c066c..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/CHANGELOG.md +++ /dev/null @@ -1,301 +0,0 @@ -# Change Log - -## 0.5.6 - -* Fix for regression when people were using numbers as names in source maps. See - #236. - -## 0.5.5 - -* Fix "regression" of unsupported, implementation behavior that half the world - happens to have come to depend on. See #235. - -* Fix regression involving function hoisting in SpiderMonkey. See #233. - -## 0.5.4 - -* Large performance improvements to source-map serialization. See #228 and #229. - -## 0.5.3 - -* Do not include unnecessary distribution files. See - commit ef7006f8d1647e0a83fdc60f04f5a7ca54886f86. - -## 0.5.2 - -* Include browser distributions of the library in package.json's `files`. See - issue #212. - -## 0.5.1 - -* Fix latent bugs in IndexedSourceMapConsumer.prototype._parseMappings. See - ff05274becc9e6e1295ed60f3ea090d31d843379. - -## 0.5.0 - -* Node 0.8 is no longer supported. - -* Use webpack instead of dryice for bundling. - -* Big speedups serializing source maps. See pull request #203. - -* Fix a bug with `SourceMapConsumer.prototype.sourceContentFor` and sources that - explicitly start with the source root. See issue #199. - -## 0.4.4 - -* Fix an issue where using a `SourceMapGenerator` after having created a - `SourceMapConsumer` from it via `SourceMapConsumer.fromSourceMap` failed. See - issue #191. - -* Fix an issue with where `SourceMapGenerator` would mistakenly consider - different mappings as duplicates of each other and avoid generating them. See - issue #192. - -## 0.4.3 - -* A very large number of performance improvements, particularly when parsing - source maps. Collectively about 75% of time shaved off of the source map - parsing benchmark! - -* Fix a bug in `SourceMapConsumer.prototype.allGeneratedPositionsFor` and fuzzy - searching in the presence of a column option. See issue #177. - -* Fix a bug with joining a source and its source root when the source is above - the root. See issue #182. - -* Add the `SourceMapConsumer.prototype.hasContentsOfAllSources` method to - determine when all sources' contents are inlined into the source map. See - issue #190. - -## 0.4.2 - -* Add an `.npmignore` file so that the benchmarks aren't pulled down by - dependent projects. Issue #169. - -* Add an optional `column` argument to - `SourceMapConsumer.prototype.allGeneratedPositionsFor` and better handle lines - with no mappings. Issues #172 and #173. - -## 0.4.1 - -* Fix accidentally defining a global variable. #170. - -## 0.4.0 - -* The default direction for fuzzy searching was changed back to its original - direction. See #164. - -* There is now a `bias` option you can supply to `SourceMapConsumer` to control - the fuzzy searching direction. See #167. - -* About an 8% speed up in parsing source maps. See #159. - -* Added a benchmark for parsing and generating source maps. - -## 0.3.0 - -* Change the default direction that searching for positions fuzzes when there is - not an exact match. See #154. - -* Support for environments using json2.js for JSON serialization. See #156. - -## 0.2.0 - -* Support for consuming "indexed" source maps which do not have any remote - sections. See pull request #127. This introduces a minor backwards - incompatibility if you are monkey patching `SourceMapConsumer.prototype` - methods. - -## 0.1.43 - -* Performance improvements for `SourceMapGenerator` and `SourceNode`. See issue - #148 for some discussion and issues #150, #151, and #152 for implementations. - -## 0.1.42 - -* Fix an issue where `SourceNode`s from different versions of the source-map - library couldn't be used in conjunction with each other. See issue #142. - -## 0.1.41 - -* Fix a bug with getting the source content of relative sources with a "./" - prefix. See issue #145 and [Bug 1090768](bugzil.la/1090768). - -* Add the `SourceMapConsumer.prototype.computeColumnSpans` method to compute the - column span of each mapping. - -* Add the `SourceMapConsumer.prototype.allGeneratedPositionsFor` method to find - all generated positions associated with a given original source and line. - -## 0.1.40 - -* Performance improvements for parsing source maps in SourceMapConsumer. - -## 0.1.39 - -* Fix a bug where setting a source's contents to null before any source content - had been set before threw a TypeError. See issue #131. - -## 0.1.38 - -* Fix a bug where finding relative paths from an empty path were creating - absolute paths. See issue #129. - -## 0.1.37 - -* Fix a bug where if the source root was an empty string, relative source paths - would turn into absolute source paths. Issue #124. - -## 0.1.36 - -* Allow the `names` mapping property to be an empty string. Issue #121. - -## 0.1.35 - -* A third optional parameter was added to `SourceNode.fromStringWithSourceMap` - to specify a path that relative sources in the second parameter should be - relative to. Issue #105. - -* If no file property is given to a `SourceMapGenerator`, then the resulting - source map will no longer have a `null` file property. The property will - simply not exist. Issue #104. - -* Fixed a bug where consecutive newlines were ignored in `SourceNode`s. - Issue #116. - -## 0.1.34 - -* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103. - -* Fix bug involving source contents and the - `SourceMapGenerator.prototype.applySourceMap`. Issue #100. - -## 0.1.33 - -* Fix some edge cases surrounding path joining and URL resolution. - -* Add a third parameter for relative path to - `SourceMapGenerator.prototype.applySourceMap`. - -* Fix issues with mappings and EOLs. - -## 0.1.32 - -* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns - (issue 92). - -* Fixed test runner to actually report number of failed tests as its process - exit code. - -* Fixed a typo when reporting bad mappings (issue 87). - -## 0.1.31 - -* Delay parsing the mappings in SourceMapConsumer until queried for a source - location. - -* Support Sass source maps (which at the time of writing deviate from the spec - in small ways) in SourceMapConsumer. - -## 0.1.30 - -* Do not join source root with a source, when the source is a data URI. - -* Extend the test runner to allow running single specific test files at a time. - -* Performance improvements in `SourceNode.prototype.walk` and - `SourceMapConsumer.prototype.eachMapping`. - -* Source map browser builds will now work inside Workers. - -* Better error messages when attempting to add an invalid mapping to a - `SourceMapGenerator`. - -## 0.1.29 - -* Allow duplicate entries in the `names` and `sources` arrays of source maps - (usually from TypeScript) we are parsing. Fixes github issue 72. - -## 0.1.28 - -* Skip duplicate mappings when creating source maps from SourceNode; github - issue 75. - -## 0.1.27 - -* Don't throw an error when the `file` property is missing in SourceMapConsumer, - we don't use it anyway. - -## 0.1.26 - -* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70. - -## 0.1.25 - -* Make compatible with browserify - -## 0.1.24 - -* Fix issue with absolute paths and `file://` URIs. See - https://bugzilla.mozilla.org/show_bug.cgi?id=885597 - -## 0.1.23 - -* Fix issue with absolute paths and sourcesContent, github issue 64. - -## 0.1.22 - -* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21. - -## 0.1.21 - -* Fixed handling of sources that start with a slash so that they are relative to - the source root's host. - -## 0.1.20 - -* Fixed github issue #43: absolute URLs aren't joined with the source root - anymore. - -## 0.1.19 - -* Using Travis CI to run tests. - -## 0.1.18 - -* Fixed a bug in the handling of sourceRoot. - -## 0.1.17 - -* Added SourceNode.fromStringWithSourceMap. - -## 0.1.16 - -* Added missing documentation. - -* Fixed the generating of empty mappings in SourceNode. - -## 0.1.15 - -* Added SourceMapGenerator.applySourceMap. - -## 0.1.14 - -* The sourceRoot is now handled consistently. - -## 0.1.13 - -* Added SourceMapGenerator.fromSourceMap. - -## 0.1.12 - -* SourceNode now generates empty mappings too. - -## 0.1.11 - -* Added name support to SourceNode. - -## 0.1.10 - -* Added sourcesContent support to the customer and generator. diff --git a/node_modules/@babel/generator/node_modules/source-map/LICENSE b/node_modules/@babel/generator/node_modules/source-map/LICENSE deleted file mode 100644 index ed1b7cf2..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ - -Copyright (c) 2009-2011, Mozilla Foundation and contributors -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 names of the Mozilla Foundation nor the names of project - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@babel/generator/node_modules/source-map/README.md b/node_modules/@babel/generator/node_modules/source-map/README.md deleted file mode 100644 index 32813394..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/README.md +++ /dev/null @@ -1,729 +0,0 @@ -# Source Map - -[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) - -[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map) - -This is a library to generate and consume the source map format -[described here][format]. - -[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit - -## Use with Node - - $ npm install source-map - -## Use on the Web - - - --------------------------------------------------------------------------------- - - - - - -## Table of Contents - -- [Examples](#examples) - - [Consuming a source map](#consuming-a-source-map) - - [Generating a source map](#generating-a-source-map) - - [With SourceNode (high level API)](#with-sourcenode-high-level-api) - - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) -- [API](#api) - - [SourceMapConsumer](#sourcemapconsumer) - - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) - - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) - - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) - - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) - - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) - - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) - - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) - - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) - - [SourceMapGenerator](#sourcemapgenerator) - - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) - - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) - - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) - - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) - - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) - - [SourceNode](#sourcenode) - - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) - - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) - - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) - - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) - - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) - - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) - - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) - - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) - - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) - - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) - - - -## Examples - -### Consuming a source map - -```js -var rawSourceMap = { - version: 3, - file: 'min.js', - names: ['bar', 'baz', 'n'], - sources: ['one.js', 'two.js'], - sourceRoot: 'http://example.com/www/js/', - mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' -}; - -var smc = new SourceMapConsumer(rawSourceMap); - -console.log(smc.sources); -// [ 'http://example.com/www/js/one.js', -// 'http://example.com/www/js/two.js' ] - -console.log(smc.originalPositionFor({ - line: 2, - column: 28 -})); -// { source: 'http://example.com/www/js/two.js', -// line: 2, -// column: 10, -// name: 'n' } - -console.log(smc.generatedPositionFor({ - source: 'http://example.com/www/js/two.js', - line: 2, - column: 10 -})); -// { line: 2, column: 28 } - -smc.eachMapping(function (m) { - // ... -}); -``` - -### Generating a source map - -In depth guide: -[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) - -#### With SourceNode (high level API) - -```js -function compile(ast) { - switch (ast.type) { - case 'BinaryExpression': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - [compile(ast.left), " + ", compile(ast.right)] - ); - case 'Literal': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - String(ast.value) - ); - // ... - default: - throw new Error("Bad AST"); - } -} - -var ast = parse("40 + 2", "add.js"); -console.log(compile(ast).toStringWithSourceMap({ - file: 'add.js' -})); -// { code: '40 + 2', -// map: [object SourceMapGenerator] } -``` - -#### With SourceMapGenerator (low level API) - -```js -var map = new SourceMapGenerator({ - file: "source-mapped.js" -}); - -map.addMapping({ - generated: { - line: 10, - column: 35 - }, - source: "foo.js", - original: { - line: 33, - column: 2 - }, - name: "christopher" -}); - -console.log(map.toString()); -// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' -``` - -## API - -Get a reference to the module: - -```js -// Node.js -var sourceMap = require('source-map'); - -// Browser builds -var sourceMap = window.sourceMap; - -// Inside Firefox -const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); -``` - -### SourceMapConsumer - -A SourceMapConsumer instance represents a parsed source map which we can query -for information about the original file positions by giving it a file position -in the generated source. - -#### new SourceMapConsumer(rawSourceMap) - -The only parameter is the raw source map (either as a string which can be -`JSON.parse`'d, or an object). According to the spec, source maps have the -following attributes: - -* `version`: Which version of the source map spec this map is following. - -* `sources`: An array of URLs to the original source files. - -* `names`: An array of identifiers which can be referenced by individual - mappings. - -* `sourceRoot`: Optional. The URL root from which all sources are relative. - -* `sourcesContent`: Optional. An array of contents of the original source files. - -* `mappings`: A string of base64 VLQs which contain the actual mappings. - -* `file`: Optional. The generated filename this source map is associated with. - -```js -var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); -``` - -#### SourceMapConsumer.prototype.computeColumnSpans() - -Compute the last column for each generated mapping. The last column is -inclusive. - -```js -// Before: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] - -consumer.computeColumnSpans(); - -// After: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1, -// lastColumn: 9 }, -// { line: 2, -// column: 10, -// lastColumn: 19 }, -// { line: 2, -// column: 20, -// lastColumn: Infinity } ] - -``` - -#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) - -Returns the original source, line, and column information for the generated -source's line and column positions provided. The only argument is an object with -the following properties: - -* `line`: The line number in the generated source. - -* `column`: The column number in the generated source. - -* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or - `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest - element that is smaller than or greater than the one we are searching for, - respectively, if the exact element cannot be found. Defaults to - `SourceMapConsumer.GREATEST_LOWER_BOUND`. - -and an object is returned with the following properties: - -* `source`: The original source file, or null if this information is not - available. - -* `line`: The line number in the original source, or null if this information is - not available. - -* `column`: The column number in the original source, or null if this - information is not available. - -* `name`: The original identifier, or null if this information is not available. - -```js -consumer.originalPositionFor({ line: 2, column: 10 }) -// { source: 'foo.coffee', -// line: 2, -// column: 2, -// name: null } - -consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) -// { source: null, -// line: null, -// column: null, -// name: null } -``` - -#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) - -Returns the generated line and column information for the original source, -line, and column positions provided. The only argument is an object with -the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. - -* `column`: The column number in the original source. - -and an object is returned with the following properties: - -* `line`: The line number in the generated source, or null. - -* `column`: The column number in the generated source, or null. - -```js -consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) -// { line: 1, -// column: 56 } -``` - -#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) - -Returns all generated line and column information for the original source, line, -and column provided. If no column is provided, returns all mappings -corresponding to a either the line we are searching for or the next closest line -that has any mappings. Otherwise, returns all mappings corresponding to the -given line and either the column we are searching for or the next closest column -that has any offsets. - -The only argument is an object with the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. - -* `column`: Optional. The column number in the original source. - -and an array of objects is returned, each with the following properties: - -* `line`: The line number in the generated source, or null. - -* `column`: The column number in the generated source, or null. - -```js -consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] -``` - -#### SourceMapConsumer.prototype.hasContentsOfAllSources() - -Return true if we have the embedded source content for every source listed in -the source map, false otherwise. - -In other words, if this method returns `true`, then -`consumer.sourceContentFor(s)` will succeed for every source `s` in -`consumer.sources`. - -```js -// ... -if (consumer.hasContentsOfAllSources()) { - consumerReadyCallback(consumer); -} else { - fetchSources(consumer, consumerReadyCallback); -} -// ... -``` - -#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) - -Returns the original source content for the source provided. The only -argument is the URL of the original source file. - -If the source content for the given source is not found, then an error is -thrown. Optionally, pass `true` as the second param to have `null` returned -instead. - -```js -consumer.sources -// [ "my-cool-lib.clj" ] - -consumer.sourceContentFor("my-cool-lib.clj") -// "..." - -consumer.sourceContentFor("this is not in the source map"); -// Error: "this is not in the source map" is not in the source map - -consumer.sourceContentFor("this is not in the source map", true); -// null -``` - -#### SourceMapConsumer.prototype.eachMapping(callback, context, order) - -Iterate over each mapping between an original source/line/column and a -generated line/column in this source map. - -* `callback`: The function that is called with each mapping. Mappings have the - form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, - name }` - -* `context`: Optional. If specified, this object will be the value of `this` - every time that `callback` is called. - -* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or - `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over - the mappings sorted by the generated file's line/column order or the - original's source/line/column order, respectively. Defaults to - `SourceMapConsumer.GENERATED_ORDER`. - -```js -consumer.eachMapping(function (m) { console.log(m); }) -// ... -// { source: 'illmatic.js', -// generatedLine: 1, -// generatedColumn: 0, -// originalLine: 1, -// originalColumn: 0, -// name: null } -// { source: 'illmatic.js', -// generatedLine: 2, -// generatedColumn: 0, -// originalLine: 2, -// originalColumn: 0, -// name: null } -// ... -``` -### SourceMapGenerator - -An instance of the SourceMapGenerator represents a source map which is being -built incrementally. - -#### new SourceMapGenerator([startOfSourceMap]) - -You may pass an object with the following properties: - -* `file`: The filename of the generated source that this source map is - associated with. - -* `sourceRoot`: A root for all relative URLs in this source map. - -* `skipValidation`: Optional. When `true`, disables validation of mappings as - they are added. This can improve performance but should be used with - discretion, as a last resort. Even then, one should avoid using this flag when - running tests, if possible. - -```js -var generator = new sourceMap.SourceMapGenerator({ - file: "my-generated-javascript-file.js", - sourceRoot: "http://example.com/app/js/" -}); -``` - -#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) - -Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. - -* `sourceMapConsumer` The SourceMap. - -```js -var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer); -``` - -#### SourceMapGenerator.prototype.addMapping(mapping) - -Add a single mapping from original source line and column to the generated -source's line and column for this source map being created. The mapping object -should have the following properties: - -* `generated`: An object with the generated line and column positions. - -* `original`: An object with the original line and column positions. - -* `source`: The original source file (relative to the sourceRoot). - -* `name`: An optional original token name for this mapping. - -```js -generator.addMapping({ - source: "module-one.scm", - original: { line: 128, column: 0 }, - generated: { line: 3, column: 456 } -}) -``` - -#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for an original source file. - -* `sourceFile` the URL of the original source file. - -* `sourceContent` the content of the source file. - -```js -generator.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) - -Applies a SourceMap for a source file to the SourceMap. -Each mapping to the supplied source file is rewritten using the -supplied SourceMap. Note: The resolution for the resulting mappings -is the minimum of this map and the supplied map. - -* `sourceMapConsumer`: The SourceMap to be applied. - -* `sourceFile`: Optional. The filename of the source file. - If omitted, sourceMapConsumer.file will be used, if it exists. - Otherwise an error will be thrown. - -* `sourceMapPath`: Optional. The dirname of the path to the SourceMap - to be applied. If relative, it is relative to the SourceMap. - - This parameter is needed when the two SourceMaps aren't in the same - directory, and the SourceMap to be applied contains relative source - paths. If so, those relative source paths need to be rewritten - relative to the SourceMap. - - If omitted, it is assumed that both SourceMaps are in the same directory, - thus not needing any rewriting. (Supplying `'.'` has the same effect.) - -#### SourceMapGenerator.prototype.toString() - -Renders the source map being generated to a string. - -```js -generator.toString() -// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' -``` - -### SourceNode - -SourceNodes provide a way to abstract over interpolating and/or concatenating -snippets of generated JavaScript source code, while maintaining the line and -column information associated between those snippets and the original source -code. This is useful as the final intermediate representation a compiler might -use before outputting the generated JS and source map. - -#### new SourceNode([line, column, source[, chunk[, name]]]) - -* `line`: The original line number associated with this source node, or null if - it isn't associated with an original line. - -* `column`: The original column number associated with this source node, or null - if it isn't associated with an original column. - -* `source`: The original source's filename; null if no filename is provided. - -* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see - below. - -* `name`: Optional. The original identifier. - -```js -var node = new SourceNode(1, 2, "a.cpp", [ - new SourceNode(3, 4, "b.cpp", "extern int status;\n"), - new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), - new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), -]); -``` - -#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) - -Creates a SourceNode from generated code and a SourceMapConsumer. - -* `code`: The generated code - -* `sourceMapConsumer` The SourceMap for the generated code - -* `relativePath` The optional path that relative sources in `sourceMapConsumer` - should be relative to. - -```js -var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); -var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), - consumer); -``` - -#### SourceNode.prototype.add(chunk) - -Add a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.add(" + "); -node.add(otherNode); -node.add([leftHandOperandNode, " + ", rightHandOperandNode]); -``` - -#### SourceNode.prototype.prepend(chunk) - -Prepend a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.prepend("/** Build Id: f783haef86324gf **/\n\n"); -``` - -#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for a source file. This will be added to the -`SourceMap` in the `sourcesContent` field. - -* `sourceFile`: The filename of the source file - -* `sourceContent`: The content of the source file - -```js -node.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceNode.prototype.walk(fn) - -Walk over the tree of JS snippets in this node and its children. The walking -function is called once for each snippet of JS and is passed that snippet and -the its original associated source's line/column location. - -* `fn`: The traversal function. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.walk(function (code, loc) { console.log("WALK:", code, loc); }) -// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } -// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } -// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } -// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } -``` - -#### SourceNode.prototype.walkSourceContents(fn) - -Walk over the tree of SourceNodes. The walking function is called for each -source file content and is passed the filename and source content. - -* `fn`: The traversal function. - -```js -var a = new SourceNode(1, 2, "a.js", "generated from a"); -a.setSourceContent("a.js", "original a"); -var b = new SourceNode(1, 2, "b.js", "generated from b"); -b.setSourceContent("b.js", "original b"); -var c = new SourceNode(1, 2, "c.js", "generated from c"); -c.setSourceContent("c.js", "original c"); - -var node = new SourceNode(null, null, null, [a, b, c]); -node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) -// WALK: a.js : original a -// WALK: b.js : original b -// WALK: c.js : original c -``` - -#### SourceNode.prototype.join(sep) - -Like `Array.prototype.join` except for SourceNodes. Inserts the separator -between each of this source node's children. - -* `sep`: The separator. - -```js -var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); -var operand = new SourceNode(3, 4, "a.rs", "="); -var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); - -var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); -var joinedNode = node.join(" "); -``` - -#### SourceNode.prototype.replaceRight(pattern, replacement) - -Call `String.prototype.replace` on the very right-most source snippet. Useful -for trimming white space from the end of a source node, etc. - -* `pattern`: The pattern to replace. - -* `replacement`: The thing to replace the pattern with. - -```js -// Trim trailing white space. -node.replaceRight(/\s*$/, ""); -``` - -#### SourceNode.prototype.toString() - -Return the string representation of this source node. Walks over the tree and -concatenates all the various snippets together to one string. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toString() -// 'unodostresquatro' -``` - -#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) - -Returns the string representation of this tree of source nodes, plus a -SourceMapGenerator which contains all the mappings between the generated and -original sources. - -The arguments are the same as those to `new SourceMapGenerator`. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toStringWithSourceMap({ file: "my-output-file.js" }) -// { code: 'unodostresquatro', -// map: [object SourceMapGenerator] } -``` diff --git a/node_modules/@babel/generator/node_modules/source-map/dist/source-map.debug.js b/node_modules/@babel/generator/node_modules/source-map/dist/source-map.debug.js deleted file mode 100644 index b5ab6382..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/dist/source-map.debug.js +++ /dev/null @@ -1,3091 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. 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 Google 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 THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCBlNDczOGZjNzJhN2IyMzAzOTg4OSIsIndlYnBhY2s6Ly8vLi9zb3VyY2UtbWFwLmpzIiwid2VicGFjazovLy8uL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LXZscS5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LmpzIiwid2VicGFjazovLy8uL2xpYi91dGlsLmpzIiwid2VicGFjazovLy8uL2xpYi9hcnJheS1zZXQuanMiLCJ3ZWJwYWNrOi8vLy4vbGliL21hcHBpbmctbGlzdC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmluYXJ5LXNlYXJjaC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvcXVpY2stc29ydC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW5vZGUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsQ0FBQztBQUNELE87QUNWQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSx1QkFBZTtBQUNmO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOzs7QUFHQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOzs7Ozs7O0FDdENBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNQQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxVQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUEsTUFBSztBQUNMO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxRQUFPO0FBQ1A7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsMkNBQTBDLFNBQVM7QUFDbkQ7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOzs7Ozs7O0FDL1pBLGlCQUFnQixvQkFBb0I7QUFDcEM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDREQUEyRDtBQUMzRCxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFHOztBQUVIO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRzs7QUFFSDtBQUNBO0FBQ0E7Ozs7Ozs7QUMzSUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWdCO0FBQ2hCLGlCQUFnQjs7QUFFaEIsb0JBQW1CO0FBQ25CLHFCQUFvQjs7QUFFcEIsaUJBQWdCO0FBQ2hCLGlCQUFnQjs7QUFFaEIsaUJBQWdCO0FBQ2hCLGtCQUFpQjs7QUFFakI7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNsRUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0EsSUFBRztBQUNIO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsK0NBQThDLFFBQVE7QUFDdEQ7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxFQUFDOztBQUVEO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBLDRCQUEyQixRQUFRO0FBQ25DO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7Ozs7Ozs7QUNoYUEsaUJBQWdCLG9CQUFvQjtBQUNwQztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdUNBQXNDLFNBQVM7QUFDL0M7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFHO0FBQ0g7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7Ozs7OztBQ3hIQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWdCO0FBQ2hCOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQUc7QUFDSDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7Ozs7OztBQzlFQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSx1REFBc0Q7QUFDdEQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSxFQUFDOztBQUVEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsRUFBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQSxvQkFBbUI7QUFDbkI7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFlBQVc7O0FBRVg7QUFDQTtBQUNBLFFBQU87QUFDUDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsWUFBVzs7QUFFWDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsNEJBQTJCLE1BQU07QUFDakM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSx1REFBc0Q7QUFDdEQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7O0FBRUw7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBLHVEQUFzRCxZQUFZO0FBQ2xFO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDtBQUNBLEVBQUM7O0FBRUQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0Esb0NBQW1DO0FBQ25DO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSwwQkFBeUIsY0FBYztBQUN2QztBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esd0JBQXVCLHdDQUF3QztBQUMvRDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsZ0RBQStDLG1CQUFtQixFQUFFO0FBQ3BFOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGtCQUFpQixvQkFBb0I7QUFDckM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDhCQUE2QixNQUFNO0FBQ25DO0FBQ0EsUUFBTztBQUNQO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdURBQXNEO0FBQ3REOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxRQUFPO0FBQ1A7QUFDQTtBQUNBLElBQUc7QUFDSDs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQiwyQkFBMkI7QUFDOUMsc0JBQXFCLCtDQUErQztBQUNwRTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsRUFBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsUUFBTztBQUNQOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQUs7QUFDTDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esb0JBQW1CLDJCQUEyQjtBQUM5Qzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxvQkFBbUIsMkJBQTJCO0FBQzlDOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQiwyQkFBMkI7QUFDOUM7QUFDQTtBQUNBLHNCQUFxQiw0QkFBNEI7QUFDakQ7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBOzs7Ozs7O0FDempDQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7Ozs7OztBQzlHQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFlBQVcsTUFBTTtBQUNqQjtBQUNBLFlBQVcsT0FBTztBQUNsQjtBQUNBLFlBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE1BQU07QUFDakI7QUFDQSxZQUFXLFNBQVM7QUFDcEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQSxZQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG9CQUFtQixPQUFPO0FBQzFCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxZQUFXLE1BQU07QUFDakI7QUFDQSxZQUFXLFNBQVM7QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7OztBQ2pIQSxpQkFBZ0Isb0JBQW9CO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLOztBQUVMOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBSztBQUNMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxrQ0FBaUMsUUFBUTtBQUN6QztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSw4Q0FBNkMsU0FBUztBQUN0RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxxQkFBb0I7QUFDcEI7QUFDQTtBQUNBLHVDQUFzQztBQUN0QztBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxnQkFBZSxXQUFXO0FBQzFCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxnREFBK0MsU0FBUztBQUN4RDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLDBDQUF5QyxTQUFTO0FBQ2xEO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBRztBQUNIO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsWUFBVztBQUNYO0FBQ0E7QUFDQTtBQUNBLFlBQVc7QUFDWDtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQSw2Q0FBNEMsY0FBYztBQUMxRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFVBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsY0FBYTtBQUNiO0FBQ0E7QUFDQTtBQUNBLGNBQWE7QUFDYjtBQUNBLFlBQVc7QUFDWDtBQUNBLFFBQU87QUFDUDtBQUNBO0FBQ0E7QUFDQSxJQUFHO0FBQ0g7QUFDQTtBQUNBLElBQUc7O0FBRUgsV0FBVTtBQUNWOztBQUVBIiwiZmlsZSI6InNvdXJjZS1tYXAuZGVidWcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIoZnVuY3Rpb24gd2VicGFja1VuaXZlcnNhbE1vZHVsZURlZmluaXRpb24ocm9vdCwgZmFjdG9yeSkge1xuXHRpZih0eXBlb2YgZXhwb3J0cyA9PT0gJ29iamVjdCcgJiYgdHlwZW9mIG1vZHVsZSA9PT0gJ29iamVjdCcpXG5cdFx0bW9kdWxlLmV4cG9ydHMgPSBmYWN0b3J5KCk7XG5cdGVsc2UgaWYodHlwZW9mIGRlZmluZSA9PT0gJ2Z1bmN0aW9uJyAmJiBkZWZpbmUuYW1kKVxuXHRcdGRlZmluZShbXSwgZmFjdG9yeSk7XG5cdGVsc2UgaWYodHlwZW9mIGV4cG9ydHMgPT09ICdvYmplY3QnKVxuXHRcdGV4cG9ydHNbXCJzb3VyY2VNYXBcIl0gPSBmYWN0b3J5KCk7XG5cdGVsc2Vcblx0XHRyb290W1wic291cmNlTWFwXCJdID0gZmFjdG9yeSgpO1xufSkodGhpcywgZnVuY3Rpb24oKSB7XG5yZXR1cm4gXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHdlYnBhY2svdW5pdmVyc2FsTW9kdWxlRGVmaW5pdGlvbiIsIiBcdC8vIFRoZSBtb2R1bGUgY2FjaGVcbiBcdHZhciBpbnN0YWxsZWRNb2R1bGVzID0ge307XG5cbiBcdC8vIFRoZSByZXF1aXJlIGZ1bmN0aW9uXG4gXHRmdW5jdGlvbiBfX3dlYnBhY2tfcmVxdWlyZV9fKG1vZHVsZUlkKSB7XG5cbiBcdFx0Ly8gQ2hlY2sgaWYgbW9kdWxlIGlzIGluIGNhY2hlXG4gXHRcdGlmKGluc3RhbGxlZE1vZHVsZXNbbW9kdWxlSWRdKVxuIFx0XHRcdHJldHVybiBpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXS5leHBvcnRzO1xuXG4gXHRcdC8vIENyZWF0ZSBhIG5ldyBtb2R1bGUgKGFuZCBwdXQgaXQgaW50byB0aGUgY2FjaGUpXG4gXHRcdHZhciBtb2R1bGUgPSBpbnN0YWxsZWRNb2R1bGVzW21vZHVsZUlkXSA9IHtcbiBcdFx0XHRleHBvcnRzOiB7fSxcbiBcdFx0XHRpZDogbW9kdWxlSWQsXG4gXHRcdFx0bG9hZGVkOiBmYWxzZVxuIFx0XHR9O1xuXG4gXHRcdC8vIEV4ZWN1dGUgdGhlIG1vZHVsZSBmdW5jdGlvblxuIFx0XHRtb2R1bGVzW21vZHVsZUlkXS5jYWxsKG1vZHVsZS5leHBvcnRzLCBtb2R1bGUsIG1vZHVsZS5leHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKTtcblxuIFx0XHQvLyBGbGFnIHRoZSBtb2R1bGUgYXMgbG9hZGVkXG4gXHRcdG1vZHVsZS5sb2FkZWQgPSB0cnVlO1xuXG4gXHRcdC8vIFJldHVybiB0aGUgZXhwb3J0cyBvZiB0aGUgbW9kdWxlXG4gXHRcdHJldHVybiBtb2R1bGUuZXhwb3J0cztcbiBcdH1cblxuXG4gXHQvLyBleHBvc2UgdGhlIG1vZHVsZXMgb2JqZWN0IChfX3dlYnBhY2tfbW9kdWxlc19fKVxuIFx0X193ZWJwYWNrX3JlcXVpcmVfXy5tID0gbW9kdWxlcztcblxuIFx0Ly8gZXhwb3NlIHRoZSBtb2R1bGUgY2FjaGVcbiBcdF9fd2VicGFja19yZXF1aXJlX18uYyA9IGluc3RhbGxlZE1vZHVsZXM7XG5cbiBcdC8vIF9fd2VicGFja19wdWJsaWNfcGF0aF9fXG4gXHRfX3dlYnBhY2tfcmVxdWlyZV9fLnAgPSBcIlwiO1xuXG4gXHQvLyBMb2FkIGVudHJ5IG1vZHVsZSBhbmQgcmV0dXJuIGV4cG9ydHNcbiBcdHJldHVybiBfX3dlYnBhY2tfcmVxdWlyZV9fKDApO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHdlYnBhY2svYm9vdHN0cmFwIGU0NzM4ZmM3MmE3YjIzMDM5ODg5IiwiLypcbiAqIENvcHlyaWdodCAyMDA5LTIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFLnR4dCBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuZXhwb3J0cy5Tb3VyY2VNYXBHZW5lcmF0b3IgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvcicpLlNvdXJjZU1hcEdlbmVyYXRvcjtcbmV4cG9ydHMuU291cmNlTWFwQ29uc3VtZXIgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2UtbWFwLWNvbnN1bWVyJykuU291cmNlTWFwQ29uc3VtZXI7XG5leHBvcnRzLlNvdXJjZU5vZGUgPSByZXF1aXJlKCcuL2xpYi9zb3VyY2Utbm9kZScpLlNvdXJjZU5vZGU7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL3NvdXJjZS1tYXAuanNcbi8vIG1vZHVsZSBpZCA9IDBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgYmFzZTY0VkxRID0gcmVxdWlyZSgnLi9iYXNlNjQtdmxxJyk7XG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIEFycmF5U2V0ID0gcmVxdWlyZSgnLi9hcnJheS1zZXQnKS5BcnJheVNldDtcbnZhciBNYXBwaW5nTGlzdCA9IHJlcXVpcmUoJy4vbWFwcGluZy1saXN0JykuTWFwcGluZ0xpc3Q7XG5cbi8qKlxuICogQW4gaW5zdGFuY2Ugb2YgdGhlIFNvdXJjZU1hcEdlbmVyYXRvciByZXByZXNlbnRzIGEgc291cmNlIG1hcCB3aGljaCBpc1xuICogYmVpbmcgYnVpbHQgaW5jcmVtZW50YWxseS4gWW91IG1heSBwYXNzIGFuIG9iamVjdCB3aXRoIHRoZSBmb2xsb3dpbmdcbiAqIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGZpbGU6IFRoZSBmaWxlbmFtZSBvZiB0aGUgZ2VuZXJhdGVkIHNvdXJjZS5cbiAqICAgLSBzb3VyY2VSb290OiBBIHJvb3QgZm9yIGFsbCByZWxhdGl2ZSBVUkxzIGluIHRoaXMgc291cmNlIG1hcC5cbiAqL1xuZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yKGFBcmdzKSB7XG4gIGlmICghYUFyZ3MpIHtcbiAgICBhQXJncyA9IHt9O1xuICB9XG4gIHRoaXMuX2ZpbGUgPSB1dGlsLmdldEFyZyhhQXJncywgJ2ZpbGUnLCBudWxsKTtcbiAgdGhpcy5fc291cmNlUm9vdCA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlUm9vdCcsIG51bGwpO1xuICB0aGlzLl9za2lwVmFsaWRhdGlvbiA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc2tpcFZhbGlkYXRpb24nLCBmYWxzZSk7XG4gIHRoaXMuX3NvdXJjZXMgPSBuZXcgQXJyYXlTZXQoKTtcbiAgdGhpcy5fbmFtZXMgPSBuZXcgQXJyYXlTZXQoKTtcbiAgdGhpcy5fbWFwcGluZ3MgPSBuZXcgTWFwcGluZ0xpc3QoKTtcbiAgdGhpcy5fc291cmNlc0NvbnRlbnRzID0gbnVsbDtcbn1cblxuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogQ3JlYXRlcyBhIG5ldyBTb3VyY2VNYXBHZW5lcmF0b3IgYmFzZWQgb24gYSBTb3VyY2VNYXBDb25zdW1lclxuICpcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIFNvdXJjZU1hcC5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLmZyb21Tb3VyY2VNYXAgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfZnJvbVNvdXJjZU1hcChhU291cmNlTWFwQ29uc3VtZXIpIHtcbiAgICB2YXIgc291cmNlUm9vdCA9IGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VSb290O1xuICAgIHZhciBnZW5lcmF0b3IgPSBuZXcgU291cmNlTWFwR2VuZXJhdG9yKHtcbiAgICAgIGZpbGU6IGFTb3VyY2VNYXBDb25zdW1lci5maWxlLFxuICAgICAgc291cmNlUm9vdDogc291cmNlUm9vdFxuICAgIH0pO1xuICAgIGFTb3VyY2VNYXBDb25zdW1lci5lYWNoTWFwcGluZyhmdW5jdGlvbiAobWFwcGluZykge1xuICAgICAgdmFyIG5ld01hcHBpbmcgPSB7XG4gICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgIGxpbmU6IG1hcHBpbmcuZ2VuZXJhdGVkTGluZSxcbiAgICAgICAgICBjb2x1bW46IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uXG4gICAgICAgIH1cbiAgICAgIH07XG5cbiAgICAgIGlmIChtYXBwaW5nLnNvdXJjZSAhPSBudWxsKSB7XG4gICAgICAgIG5ld01hcHBpbmcuc291cmNlID0gbWFwcGluZy5zb3VyY2U7XG4gICAgICAgIGlmIChzb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgICAgICBuZXdNYXBwaW5nLnNvdXJjZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgbmV3TWFwcGluZy5zb3VyY2UpO1xuICAgICAgICB9XG5cbiAgICAgICAgbmV3TWFwcGluZy5vcmlnaW5hbCA9IHtcbiAgICAgICAgICBsaW5lOiBtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICBjb2x1bW46IG1hcHBpbmcub3JpZ2luYWxDb2x1bW5cbiAgICAgICAgfTtcblxuICAgICAgICBpZiAobWFwcGluZy5uYW1lICE9IG51bGwpIHtcbiAgICAgICAgICBuZXdNYXBwaW5nLm5hbWUgPSBtYXBwaW5nLm5hbWU7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgZ2VuZXJhdG9yLmFkZE1hcHBpbmcobmV3TWFwcGluZyk7XG4gICAgfSk7XG4gICAgYVNvdXJjZU1hcENvbnN1bWVyLnNvdXJjZXMuZm9yRWFjaChmdW5jdGlvbiAoc291cmNlRmlsZSkge1xuICAgICAgdmFyIGNvbnRlbnQgPSBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlQ29udGVudEZvcihzb3VyY2VGaWxlKTtcbiAgICAgIGlmIChjb250ZW50ICE9IG51bGwpIHtcbiAgICAgICAgZ2VuZXJhdG9yLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG4gICAgcmV0dXJuIGdlbmVyYXRvcjtcbiAgfTtcblxuLyoqXG4gKiBBZGQgYSBzaW5nbGUgbWFwcGluZyBmcm9tIG9yaWdpbmFsIHNvdXJjZSBsaW5lIGFuZCBjb2x1bW4gdG8gdGhlIGdlbmVyYXRlZFxuICogc291cmNlJ3MgbGluZSBhbmQgY29sdW1uIGZvciB0aGlzIHNvdXJjZSBtYXAgYmVpbmcgY3JlYXRlZC4gVGhlIG1hcHBpbmdcbiAqIG9iamVjdCBzaG91bGQgaGF2ZSB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGdlbmVyYXRlZDogQW4gb2JqZWN0IHdpdGggdGhlIGdlbmVyYXRlZCBsaW5lIGFuZCBjb2x1bW4gcG9zaXRpb25zLlxuICogICAtIG9yaWdpbmFsOiBBbiBvYmplY3Qgd2l0aCB0aGUgb3JpZ2luYWwgbGluZSBhbmQgY29sdW1uIHBvc2l0aW9ucy5cbiAqICAgLSBzb3VyY2U6IFRoZSBvcmlnaW5hbCBzb3VyY2UgZmlsZSAocmVsYXRpdmUgdG8gdGhlIHNvdXJjZVJvb3QpLlxuICogICAtIG5hbWU6IEFuIG9wdGlvbmFsIG9yaWdpbmFsIHRva2VuIG5hbWUgZm9yIHRoaXMgbWFwcGluZy5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5hZGRNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX2FkZE1hcHBpbmcoYUFyZ3MpIHtcbiAgICB2YXIgZ2VuZXJhdGVkID0gdXRpbC5nZXRBcmcoYUFyZ3MsICdnZW5lcmF0ZWQnKTtcbiAgICB2YXIgb3JpZ2luYWwgPSB1dGlsLmdldEFyZyhhQXJncywgJ29yaWdpbmFsJywgbnVsbCk7XG4gICAgdmFyIHNvdXJjZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJywgbnVsbCk7XG4gICAgdmFyIG5hbWUgPSB1dGlsLmdldEFyZyhhQXJncywgJ25hbWUnLCBudWxsKTtcblxuICAgIGlmICghdGhpcy5fc2tpcFZhbGlkYXRpb24pIHtcbiAgICAgIHRoaXMuX3ZhbGlkYXRlTWFwcGluZyhnZW5lcmF0ZWQsIG9yaWdpbmFsLCBzb3VyY2UsIG5hbWUpO1xuICAgIH1cblxuICAgIGlmIChzb3VyY2UgIT0gbnVsbCkge1xuICAgICAgc291cmNlID0gU3RyaW5nKHNvdXJjZSk7XG4gICAgICBpZiAoIXRoaXMuX3NvdXJjZXMuaGFzKHNvdXJjZSkpIHtcbiAgICAgICAgdGhpcy5fc291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAobmFtZSAhPSBudWxsKSB7XG4gICAgICBuYW1lID0gU3RyaW5nKG5hbWUpO1xuICAgICAgaWYgKCF0aGlzLl9uYW1lcy5oYXMobmFtZSkpIHtcbiAgICAgICAgdGhpcy5fbmFtZXMuYWRkKG5hbWUpO1xuICAgICAgfVxuICAgIH1cblxuICAgIHRoaXMuX21hcHBpbmdzLmFkZCh7XG4gICAgICBnZW5lcmF0ZWRMaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgIGdlbmVyYXRlZENvbHVtbjogZ2VuZXJhdGVkLmNvbHVtbixcbiAgICAgIG9yaWdpbmFsTGluZTogb3JpZ2luYWwgIT0gbnVsbCAmJiBvcmlnaW5hbC5saW5lLFxuICAgICAgb3JpZ2luYWxDb2x1bW46IG9yaWdpbmFsICE9IG51bGwgJiYgb3JpZ2luYWwuY29sdW1uLFxuICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICBuYW1lOiBuYW1lXG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogU2V0IHRoZSBzb3VyY2UgY29udGVudCBmb3IgYSBzb3VyY2UgZmlsZS5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5zZXRTb3VyY2VDb250ZW50ID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX3NldFNvdXJjZUNvbnRlbnQoYVNvdXJjZUZpbGUsIGFTb3VyY2VDb250ZW50KSB7XG4gICAgdmFyIHNvdXJjZSA9IGFTb3VyY2VGaWxlO1xuICAgIGlmICh0aGlzLl9zb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgIHNvdXJjZSA9IHV0aWwucmVsYXRpdmUodGhpcy5fc291cmNlUm9vdCwgc291cmNlKTtcbiAgICB9XG5cbiAgICBpZiAoYVNvdXJjZUNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgLy8gQWRkIHRoZSBzb3VyY2UgY29udGVudCB0byB0aGUgX3NvdXJjZXNDb250ZW50cyBtYXAuXG4gICAgICAvLyBDcmVhdGUgYSBuZXcgX3NvdXJjZXNDb250ZW50cyBtYXAgaWYgdGhlIHByb3BlcnR5IGlzIG51bGwuXG4gICAgICBpZiAoIXRoaXMuX3NvdXJjZXNDb250ZW50cykge1xuICAgICAgICB0aGlzLl9zb3VyY2VzQ29udGVudHMgPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICAgICAgfVxuICAgICAgdGhpcy5fc291cmNlc0NvbnRlbnRzW3V0aWwudG9TZXRTdHJpbmcoc291cmNlKV0gPSBhU291cmNlQ29udGVudDtcbiAgICB9IGVsc2UgaWYgKHRoaXMuX3NvdXJjZXNDb250ZW50cykge1xuICAgICAgLy8gUmVtb3ZlIHRoZSBzb3VyY2UgZmlsZSBmcm9tIHRoZSBfc291cmNlc0NvbnRlbnRzIG1hcC5cbiAgICAgIC8vIElmIHRoZSBfc291cmNlc0NvbnRlbnRzIG1hcCBpcyBlbXB0eSwgc2V0IHRoZSBwcm9wZXJ0eSB0byBudWxsLlxuICAgICAgZGVsZXRlIHRoaXMuX3NvdXJjZXNDb250ZW50c1t1dGlsLnRvU2V0U3RyaW5nKHNvdXJjZSldO1xuICAgICAgaWYgKE9iamVjdC5rZXlzKHRoaXMuX3NvdXJjZXNDb250ZW50cykubGVuZ3RoID09PSAwKSB7XG4gICAgICAgIHRoaXMuX3NvdXJjZXNDb250ZW50cyA9IG51bGw7XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4vKipcbiAqIEFwcGxpZXMgdGhlIG1hcHBpbmdzIG9mIGEgc3ViLXNvdXJjZS1tYXAgZm9yIGEgc3BlY2lmaWMgc291cmNlIGZpbGUgdG8gdGhlXG4gKiBzb3VyY2UgbWFwIGJlaW5nIGdlbmVyYXRlZC4gRWFjaCBtYXBwaW5nIHRvIHRoZSBzdXBwbGllZCBzb3VyY2UgZmlsZSBpc1xuICogcmV3cml0dGVuIHVzaW5nIHRoZSBzdXBwbGllZCBzb3VyY2UgbWFwLiBOb3RlOiBUaGUgcmVzb2x1dGlvbiBmb3IgdGhlXG4gKiByZXN1bHRpbmcgbWFwcGluZ3MgaXMgdGhlIG1pbmltaXVtIG9mIHRoaXMgbWFwIGFuZCB0aGUgc3VwcGxpZWQgbWFwLlxuICpcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIHNvdXJjZSBtYXAgdG8gYmUgYXBwbGllZC5cbiAqIEBwYXJhbSBhU291cmNlRmlsZSBPcHRpb25hbC4gVGhlIGZpbGVuYW1lIG9mIHRoZSBzb3VyY2UgZmlsZS5cbiAqICAgICAgICBJZiBvbWl0dGVkLCBTb3VyY2VNYXBDb25zdW1lcidzIGZpbGUgcHJvcGVydHkgd2lsbCBiZSB1c2VkLlxuICogQHBhcmFtIGFTb3VyY2VNYXBQYXRoIE9wdGlvbmFsLiBUaGUgZGlybmFtZSBvZiB0aGUgcGF0aCB0byB0aGUgc291cmNlIG1hcFxuICogICAgICAgIHRvIGJlIGFwcGxpZWQuIElmIHJlbGF0aXZlLCBpdCBpcyByZWxhdGl2ZSB0byB0aGUgU291cmNlTWFwQ29uc3VtZXIuXG4gKiAgICAgICAgVGhpcyBwYXJhbWV0ZXIgaXMgbmVlZGVkIHdoZW4gdGhlIHR3byBzb3VyY2UgbWFwcyBhcmVuJ3QgaW4gdGhlIHNhbWVcbiAqICAgICAgICBkaXJlY3RvcnksIGFuZCB0aGUgc291cmNlIG1hcCB0byBiZSBhcHBsaWVkIGNvbnRhaW5zIHJlbGF0aXZlIHNvdXJjZVxuICogICAgICAgIHBhdGhzLiBJZiBzbywgdGhvc2UgcmVsYXRpdmUgc291cmNlIHBhdGhzIG5lZWQgdG8gYmUgcmV3cml0dGVuXG4gKiAgICAgICAgcmVsYXRpdmUgdG8gdGhlIFNvdXJjZU1hcEdlbmVyYXRvci5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5hcHBseVNvdXJjZU1hcCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9hcHBseVNvdXJjZU1hcChhU291cmNlTWFwQ29uc3VtZXIsIGFTb3VyY2VGaWxlLCBhU291cmNlTWFwUGF0aCkge1xuICAgIHZhciBzb3VyY2VGaWxlID0gYVNvdXJjZUZpbGU7XG4gICAgLy8gSWYgYVNvdXJjZUZpbGUgaXMgb21pdHRlZCwgd2Ugd2lsbCB1c2UgdGhlIGZpbGUgcHJvcGVydHkgb2YgdGhlIFNvdXJjZU1hcFxuICAgIGlmIChhU291cmNlRmlsZSA9PSBudWxsKSB7XG4gICAgICBpZiAoYVNvdXJjZU1hcENvbnN1bWVyLmZpbGUgPT0gbnVsbCkge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgJ1NvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUuYXBwbHlTb3VyY2VNYXAgcmVxdWlyZXMgZWl0aGVyIGFuIGV4cGxpY2l0IHNvdXJjZSBmaWxlLCAnICtcbiAgICAgICAgICAnb3IgdGhlIHNvdXJjZSBtYXBcXCdzIFwiZmlsZVwiIHByb3BlcnR5LiBCb3RoIHdlcmUgb21pdHRlZC4nXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgICBzb3VyY2VGaWxlID0gYVNvdXJjZU1hcENvbnN1bWVyLmZpbGU7XG4gICAgfVxuICAgIHZhciBzb3VyY2VSb290ID0gdGhpcy5fc291cmNlUm9vdDtcbiAgICAvLyBNYWtlIFwic291cmNlRmlsZVwiIHJlbGF0aXZlIGlmIGFuIGFic29sdXRlIFVybCBpcyBwYXNzZWQuXG4gICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgc291cmNlRmlsZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgc291cmNlRmlsZSk7XG4gICAgfVxuICAgIC8vIEFwcGx5aW5nIHRoZSBTb3VyY2VNYXAgY2FuIGFkZCBhbmQgcmVtb3ZlIGl0ZW1zIGZyb20gdGhlIHNvdXJjZXMgYW5kXG4gICAgLy8gdGhlIG5hbWVzIGFycmF5LlxuICAgIHZhciBuZXdTb3VyY2VzID0gbmV3IEFycmF5U2V0KCk7XG4gICAgdmFyIG5ld05hbWVzID0gbmV3IEFycmF5U2V0KCk7XG5cbiAgICAvLyBGaW5kIG1hcHBpbmdzIGZvciB0aGUgXCJzb3VyY2VGaWxlXCJcbiAgICB0aGlzLl9tYXBwaW5ncy51bnNvcnRlZEZvckVhY2goZnVuY3Rpb24gKG1hcHBpbmcpIHtcbiAgICAgIGlmIChtYXBwaW5nLnNvdXJjZSA9PT0gc291cmNlRmlsZSAmJiBtYXBwaW5nLm9yaWdpbmFsTGluZSAhPSBudWxsKSB7XG4gICAgICAgIC8vIENoZWNrIGlmIGl0IGNhbiBiZSBtYXBwZWQgYnkgdGhlIHNvdXJjZSBtYXAsIHRoZW4gdXBkYXRlIHRoZSBtYXBwaW5nLlxuICAgICAgICB2YXIgb3JpZ2luYWwgPSBhU291cmNlTWFwQ29uc3VtZXIub3JpZ2luYWxQb3NpdGlvbkZvcih7XG4gICAgICAgICAgbGluZTogbWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgICAgY29sdW1uOiBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgIH0pO1xuICAgICAgICBpZiAob3JpZ2luYWwuc291cmNlICE9IG51bGwpIHtcbiAgICAgICAgICAvLyBDb3B5IG1hcHBpbmdcbiAgICAgICAgICBtYXBwaW5nLnNvdXJjZSA9IG9yaWdpbmFsLnNvdXJjZTtcbiAgICAgICAgICBpZiAoYVNvdXJjZU1hcFBhdGggIT0gbnVsbCkge1xuICAgICAgICAgICAgbWFwcGluZy5zb3VyY2UgPSB1dGlsLmpvaW4oYVNvdXJjZU1hcFBhdGgsIG1hcHBpbmcuc291cmNlKVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBtYXBwaW5nLnNvdXJjZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgbWFwcGluZy5zb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsTGluZSA9IG9yaWdpbmFsLmxpbmU7XG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbiA9IG9yaWdpbmFsLmNvbHVtbjtcbiAgICAgICAgICBpZiAob3JpZ2luYWwubmFtZSAhPSBudWxsKSB7XG4gICAgICAgICAgICBtYXBwaW5nLm5hbWUgPSBvcmlnaW5hbC5uYW1lO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICB2YXIgc291cmNlID0gbWFwcGluZy5zb3VyY2U7XG4gICAgICBpZiAoc291cmNlICE9IG51bGwgJiYgIW5ld1NvdXJjZXMuaGFzKHNvdXJjZSkpIHtcbiAgICAgICAgbmV3U291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgIH1cblxuICAgICAgdmFyIG5hbWUgPSBtYXBwaW5nLm5hbWU7XG4gICAgICBpZiAobmFtZSAhPSBudWxsICYmICFuZXdOYW1lcy5oYXMobmFtZSkpIHtcbiAgICAgICAgbmV3TmFtZXMuYWRkKG5hbWUpO1xuICAgICAgfVxuXG4gICAgfSwgdGhpcyk7XG4gICAgdGhpcy5fc291cmNlcyA9IG5ld1NvdXJjZXM7XG4gICAgdGhpcy5fbmFtZXMgPSBuZXdOYW1lcztcblxuICAgIC8vIENvcHkgc291cmNlc0NvbnRlbnRzIG9mIGFwcGxpZWQgbWFwLlxuICAgIGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VzLmZvckVhY2goZnVuY3Rpb24gKHNvdXJjZUZpbGUpIHtcbiAgICAgIHZhciBjb250ZW50ID0gYVNvdXJjZU1hcENvbnN1bWVyLnNvdXJjZUNvbnRlbnRGb3Ioc291cmNlRmlsZSk7XG4gICAgICBpZiAoY29udGVudCAhPSBudWxsKSB7XG4gICAgICAgIGlmIChhU291cmNlTWFwUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwuam9pbihhU291cmNlTWFwUGF0aCwgc291cmNlRmlsZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZUZpbGUgPSB1dGlsLnJlbGF0aXZlKHNvdXJjZVJvb3QsIHNvdXJjZUZpbGUpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBjb250ZW50KTtcbiAgICAgIH1cbiAgICB9LCB0aGlzKTtcbiAgfTtcblxuLyoqXG4gKiBBIG1hcHBpbmcgY2FuIGhhdmUgb25lIG9mIHRoZSB0aHJlZSBsZXZlbHMgb2YgZGF0YTpcbiAqXG4gKiAgIDEuIEp1c3QgdGhlIGdlbmVyYXRlZCBwb3NpdGlvbi5cbiAqICAgMi4gVGhlIEdlbmVyYXRlZCBwb3NpdGlvbiwgb3JpZ2luYWwgcG9zaXRpb24sIGFuZCBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIDMuIEdlbmVyYXRlZCBhbmQgb3JpZ2luYWwgcG9zaXRpb24sIG9yaWdpbmFsIHNvdXJjZSwgYXMgd2VsbCBhcyBhIG5hbWVcbiAqICAgICAgdG9rZW4uXG4gKlxuICogVG8gbWFpbnRhaW4gY29uc2lzdGVuY3ksIHdlIHZhbGlkYXRlIHRoYXQgYW55IG5ldyBtYXBwaW5nIGJlaW5nIGFkZGVkIGZhbGxzXG4gKiBpbiB0byBvbmUgb2YgdGhlc2UgY2F0ZWdvcmllcy5cbiAqL1xuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fdmFsaWRhdGVNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwR2VuZXJhdG9yX3ZhbGlkYXRlTWFwcGluZyhhR2VuZXJhdGVkLCBhT3JpZ2luYWwsIGFTb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYU5hbWUpIHtcbiAgICAvLyBXaGVuIGFPcmlnaW5hbCBpcyB0cnV0aHkgYnV0IGhhcyBlbXB0eSB2YWx1ZXMgZm9yIC5saW5lIGFuZCAuY29sdW1uLFxuICAgIC8vIGl0IGlzIG1vc3QgbGlrZWx5IGEgcHJvZ3JhbW1lciBlcnJvci4gSW4gdGhpcyBjYXNlIHdlIHRocm93IGEgdmVyeVxuICAgIC8vIHNwZWNpZmljIGVycm9yIG1lc3NhZ2UgdG8gdHJ5IHRvIGd1aWRlIHRoZW0gdGhlIHJpZ2h0IHdheS5cbiAgICAvLyBGb3IgZXhhbXBsZTogaHR0cHM6Ly9naXRodWIuY29tL1BvbHltZXIvcG9seW1lci1idW5kbGVyL3B1bGwvNTE5XG4gICAgaWYgKGFPcmlnaW5hbCAmJiB0eXBlb2YgYU9yaWdpbmFsLmxpbmUgIT09ICdudW1iZXInICYmIHR5cGVvZiBhT3JpZ2luYWwuY29sdW1uICE9PSAnbnVtYmVyJykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAnb3JpZ2luYWwubGluZSBhbmQgb3JpZ2luYWwuY29sdW1uIGFyZSBub3QgbnVtYmVycyAtLSB5b3UgcHJvYmFibHkgbWVhbnQgdG8gb21pdCAnICtcbiAgICAgICAgICAgICd0aGUgb3JpZ2luYWwgbWFwcGluZyBlbnRpcmVseSBhbmQgb25seSBtYXAgdGhlIGdlbmVyYXRlZCBwb3NpdGlvbi4gSWYgc28sIHBhc3MgJyArXG4gICAgICAgICAgICAnbnVsbCBmb3IgdGhlIG9yaWdpbmFsIG1hcHBpbmcgaW5zdGVhZCBvZiBhbiBvYmplY3Qgd2l0aCBlbXB0eSBvciBudWxsIHZhbHVlcy4nXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgaWYgKGFHZW5lcmF0ZWQgJiYgJ2xpbmUnIGluIGFHZW5lcmF0ZWQgJiYgJ2NvbHVtbicgaW4gYUdlbmVyYXRlZFxuICAgICAgICAmJiBhR2VuZXJhdGVkLmxpbmUgPiAwICYmIGFHZW5lcmF0ZWQuY29sdW1uID49IDBcbiAgICAgICAgJiYgIWFPcmlnaW5hbCAmJiAhYVNvdXJjZSAmJiAhYU5hbWUpIHtcbiAgICAgIC8vIENhc2UgMS5cbiAgICAgIHJldHVybjtcbiAgICB9XG4gICAgZWxzZSBpZiAoYUdlbmVyYXRlZCAmJiAnbGluZScgaW4gYUdlbmVyYXRlZCAmJiAnY29sdW1uJyBpbiBhR2VuZXJhdGVkXG4gICAgICAgICAgICAgJiYgYU9yaWdpbmFsICYmICdsaW5lJyBpbiBhT3JpZ2luYWwgJiYgJ2NvbHVtbicgaW4gYU9yaWdpbmFsXG4gICAgICAgICAgICAgJiYgYUdlbmVyYXRlZC5saW5lID4gMCAmJiBhR2VuZXJhdGVkLmNvbHVtbiA+PSAwXG4gICAgICAgICAgICAgJiYgYU9yaWdpbmFsLmxpbmUgPiAwICYmIGFPcmlnaW5hbC5jb2x1bW4gPj0gMFxuICAgICAgICAgICAgICYmIGFTb3VyY2UpIHtcbiAgICAgIC8vIENhc2VzIDIgYW5kIDMuXG4gICAgICByZXR1cm47XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdJbnZhbGlkIG1hcHBpbmc6ICcgKyBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgIGdlbmVyYXRlZDogYUdlbmVyYXRlZCxcbiAgICAgICAgc291cmNlOiBhU291cmNlLFxuICAgICAgICBvcmlnaW5hbDogYU9yaWdpbmFsLFxuICAgICAgICBuYW1lOiBhTmFtZVxuICAgICAgfSkpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBTZXJpYWxpemUgdGhlIGFjY3VtdWxhdGVkIG1hcHBpbmdzIGluIHRvIHRoZSBzdHJlYW0gb2YgYmFzZSA2NCBWTFFzXG4gKiBzcGVjaWZpZWQgYnkgdGhlIHNvdXJjZSBtYXAgZm9ybWF0LlxuICovXG5Tb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLl9zZXJpYWxpemVNYXBwaW5ncyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9zZXJpYWxpemVNYXBwaW5ncygpIHtcbiAgICB2YXIgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuICAgIHZhciBwcmV2aW91c0dlbmVyYXRlZExpbmUgPSAxO1xuICAgIHZhciBwcmV2aW91c09yaWdpbmFsQ29sdW1uID0gMDtcbiAgICB2YXIgcHJldmlvdXNPcmlnaW5hbExpbmUgPSAwO1xuICAgIHZhciBwcmV2aW91c05hbWUgPSAwO1xuICAgIHZhciBwcmV2aW91c1NvdXJjZSA9IDA7XG4gICAgdmFyIHJlc3VsdCA9ICcnO1xuICAgIHZhciBuZXh0O1xuICAgIHZhciBtYXBwaW5nO1xuICAgIHZhciBuYW1lSWR4O1xuICAgIHZhciBzb3VyY2VJZHg7XG5cbiAgICB2YXIgbWFwcGluZ3MgPSB0aGlzLl9tYXBwaW5ncy50b0FycmF5KCk7XG4gICAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IG1hcHBpbmdzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICBtYXBwaW5nID0gbWFwcGluZ3NbaV07XG4gICAgICBuZXh0ID0gJydcblxuICAgICAgaWYgKG1hcHBpbmcuZ2VuZXJhdGVkTGluZSAhPT0gcHJldmlvdXNHZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uID0gMDtcbiAgICAgICAgd2hpbGUgKG1hcHBpbmcuZ2VuZXJhdGVkTGluZSAhPT0gcHJldmlvdXNHZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgbmV4dCArPSAnOyc7XG4gICAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRMaW5lKys7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBpZiAoaSA+IDApIHtcbiAgICAgICAgICBpZiAoIXV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQobWFwcGluZywgbWFwcGluZ3NbaSAtIDFdKSkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIG5leHQgKz0gJywnO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLmdlbmVyYXRlZENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c0dlbmVyYXRlZENvbHVtbik7XG4gICAgICBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2VJZHggPSB0aGlzLl9zb3VyY2VzLmluZGV4T2YobWFwcGluZy5zb3VyY2UpO1xuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUoc291cmNlSWR4IC0gcHJldmlvdXNTb3VyY2UpO1xuICAgICAgICBwcmV2aW91c1NvdXJjZSA9IHNvdXJjZUlkeDtcblxuICAgICAgICAvLyBsaW5lcyBhcmUgc3RvcmVkIDAtYmFzZWQgaW4gU291cmNlTWFwIHNwZWMgdmVyc2lvbiAzXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsTGluZSAtIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c09yaWdpbmFsTGluZSk7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmUgLSAxO1xuXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbENvbHVtbik7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIGlmIChtYXBwaW5nLm5hbWUgIT0gbnVsbCkge1xuICAgICAgICAgIG5hbWVJZHggPSB0aGlzLl9uYW1lcy5pbmRleE9mKG1hcHBpbmcubmFtZSk7XG4gICAgICAgICAgbmV4dCArPSBiYXNlNjRWTFEuZW5jb2RlKG5hbWVJZHggLSBwcmV2aW91c05hbWUpO1xuICAgICAgICAgIHByZXZpb3VzTmFtZSA9IG5hbWVJZHg7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgcmVzdWx0ICs9IG5leHQ7XG4gICAgfVxuXG4gICAgcmV0dXJuIHJlc3VsdDtcbiAgfTtcblxuU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS5fZ2VuZXJhdGVTb3VyY2VzQ29udGVudCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl9nZW5lcmF0ZVNvdXJjZXNDb250ZW50KGFTb3VyY2VzLCBhU291cmNlUm9vdCkge1xuICAgIHJldHVybiBhU291cmNlcy5tYXAoZnVuY3Rpb24gKHNvdXJjZSkge1xuICAgICAgaWYgKCF0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICBpZiAoYVNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2UgPSB1dGlsLnJlbGF0aXZlKGFTb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgfVxuICAgICAgdmFyIGtleSA9IHV0aWwudG9TZXRTdHJpbmcoc291cmNlKTtcbiAgICAgIHJldHVybiBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwodGhpcy5fc291cmNlc0NvbnRlbnRzLCBrZXkpXG4gICAgICAgID8gdGhpcy5fc291cmNlc0NvbnRlbnRzW2tleV1cbiAgICAgICAgOiBudWxsO1xuICAgIH0sIHRoaXMpO1xuICB9O1xuXG4vKipcbiAqIEV4dGVybmFsaXplIHRoZSBzb3VyY2UgbWFwLlxuICovXG5Tb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLnRvSlNPTiA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl90b0pTT04oKSB7XG4gICAgdmFyIG1hcCA9IHtcbiAgICAgIHZlcnNpb246IHRoaXMuX3ZlcnNpb24sXG4gICAgICBzb3VyY2VzOiB0aGlzLl9zb3VyY2VzLnRvQXJyYXkoKSxcbiAgICAgIG5hbWVzOiB0aGlzLl9uYW1lcy50b0FycmF5KCksXG4gICAgICBtYXBwaW5nczogdGhpcy5fc2VyaWFsaXplTWFwcGluZ3MoKVxuICAgIH07XG4gICAgaWYgKHRoaXMuX2ZpbGUgIT0gbnVsbCkge1xuICAgICAgbWFwLmZpbGUgPSB0aGlzLl9maWxlO1xuICAgIH1cbiAgICBpZiAodGhpcy5fc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBtYXAuc291cmNlUm9vdCA9IHRoaXMuX3NvdXJjZVJvb3Q7XG4gICAgfVxuICAgIGlmICh0aGlzLl9zb3VyY2VzQ29udGVudHMpIHtcbiAgICAgIG1hcC5zb3VyY2VzQ29udGVudCA9IHRoaXMuX2dlbmVyYXRlU291cmNlc0NvbnRlbnQobWFwLnNvdXJjZXMsIG1hcC5zb3VyY2VSb290KTtcbiAgICB9XG5cbiAgICByZXR1cm4gbWFwO1xuICB9O1xuXG4vKipcbiAqIFJlbmRlciB0aGUgc291cmNlIG1hcCBiZWluZyBnZW5lcmF0ZWQgdG8gYSBzdHJpbmcuXG4gKi9cblNvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUudG9TdHJpbmcgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfdG9TdHJpbmcoKSB7XG4gICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHRoaXMudG9KU09OKCkpO1xuICB9O1xuXG5leHBvcnRzLlNvdXJjZU1hcEdlbmVyYXRvciA9IFNvdXJjZU1hcEdlbmVyYXRvcjtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL3NvdXJjZS1tYXAtZ2VuZXJhdG9yLmpzXG4vLyBtb2R1bGUgaWQgPSAxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKlxuICogQmFzZWQgb24gdGhlIEJhc2UgNjQgVkxRIGltcGxlbWVudGF0aW9uIGluIENsb3N1cmUgQ29tcGlsZXI6XG4gKiBodHRwczovL2NvZGUuZ29vZ2xlLmNvbS9wL2Nsb3N1cmUtY29tcGlsZXIvc291cmNlL2Jyb3dzZS90cnVuay9zcmMvY29tL2dvb2dsZS9kZWJ1Z2dpbmcvc291cmNlbWFwL0Jhc2U2NFZMUS5qYXZhXG4gKlxuICogQ29weXJpZ2h0IDIwMTEgVGhlIENsb3N1cmUgQ29tcGlsZXIgQXV0aG9ycy4gQWxsIHJpZ2h0cyByZXNlcnZlZC5cbiAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dFxuICogbW9kaWZpY2F0aW9uLCBhcmUgcGVybWl0dGVkIHByb3ZpZGVkIHRoYXQgdGhlIGZvbGxvd2luZyBjb25kaXRpb25zIGFyZVxuICogbWV0OlxuICpcbiAqICAqIFJlZGlzdHJpYnV0aW9ucyBvZiBzb3VyY2UgY29kZSBtdXN0IHJldGFpbiB0aGUgYWJvdmUgY29weXJpZ2h0XG4gKiAgICBub3RpY2UsIHRoaXMgbGlzdCBvZiBjb25kaXRpb25zIGFuZCB0aGUgZm9sbG93aW5nIGRpc2NsYWltZXIuXG4gKiAgKiBSZWRpc3RyaWJ1dGlvbnMgaW4gYmluYXJ5IGZvcm0gbXVzdCByZXByb2R1Y2UgdGhlIGFib3ZlXG4gKiAgICBjb3B5cmlnaHQgbm90aWNlLCB0aGlzIGxpc3Qgb2YgY29uZGl0aW9ucyBhbmQgdGhlIGZvbGxvd2luZ1xuICogICAgZGlzY2xhaW1lciBpbiB0aGUgZG9jdW1lbnRhdGlvbiBhbmQvb3Igb3RoZXIgbWF0ZXJpYWxzIHByb3ZpZGVkXG4gKiAgICB3aXRoIHRoZSBkaXN0cmlidXRpb24uXG4gKiAgKiBOZWl0aGVyIHRoZSBuYW1lIG9mIEdvb2dsZSBJbmMuIG5vciB0aGUgbmFtZXMgb2YgaXRzXG4gKiAgICBjb250cmlidXRvcnMgbWF5IGJlIHVzZWQgdG8gZW5kb3JzZSBvciBwcm9tb3RlIHByb2R1Y3RzIGRlcml2ZWRcbiAqICAgIGZyb20gdGhpcyBzb2Z0d2FyZSB3aXRob3V0IHNwZWNpZmljIHByaW9yIHdyaXR0ZW4gcGVybWlzc2lvbi5cbiAqXG4gKiBUSElTIFNPRlRXQVJFIElTIFBST1ZJREVEIEJZIFRIRSBDT1BZUklHSFQgSE9MREVSUyBBTkQgQ09OVFJJQlVUT1JTXG4gKiBcIkFTIElTXCIgQU5EIEFOWSBFWFBSRVNTIE9SIElNUExJRUQgV0FSUkFOVElFUywgSU5DTFVESU5HLCBCVVQgTk9UXG4gKiBMSU1JVEVEIFRPLCBUSEUgSU1QTElFRCBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWSBBTkQgRklUTkVTUyBGT1JcbiAqIEEgUEFSVElDVUxBUiBQVVJQT1NFIEFSRSBESVNDTEFJTUVELiBJTiBOTyBFVkVOVCBTSEFMTCBUSEUgQ09QWVJJR0hUXG4gKiBPV05FUiBPUiBDT05UUklCVVRPUlMgQkUgTElBQkxFIEZPUiBBTlkgRElSRUNULCBJTkRJUkVDVCwgSU5DSURFTlRBTCxcbiAqIFNQRUNJQUwsIEVYRU1QTEFSWSwgT1IgQ09OU0VRVUVOVElBTCBEQU1BR0VTIChJTkNMVURJTkcsIEJVVCBOT1RcbiAqIExJTUlURUQgVE8sIFBST0NVUkVNRU5UIE9GIFNVQlNUSVRVVEUgR09PRFMgT1IgU0VSVklDRVM7IExPU1MgT0YgVVNFLFxuICogREFUQSwgT1IgUFJPRklUUzsgT1IgQlVTSU5FU1MgSU5URVJSVVBUSU9OKSBIT1dFVkVSIENBVVNFRCBBTkQgT04gQU5ZXG4gKiBUSEVPUlkgT0YgTElBQklMSVRZLCBXSEVUSEVSIElOIENPTlRSQUNULCBTVFJJQ1QgTElBQklMSVRZLCBPUiBUT1JUXG4gKiAoSU5DTFVESU5HIE5FR0xJR0VOQ0UgT1IgT1RIRVJXSVNFKSBBUklTSU5HIElOIEFOWSBXQVkgT1VUIE9GIFRIRSBVU0VcbiAqIE9GIFRISVMgU09GVFdBUkUsIEVWRU4gSUYgQURWSVNFRCBPRiBUSEUgUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0UuXG4gKi9cblxudmFyIGJhc2U2NCA9IHJlcXVpcmUoJy4vYmFzZTY0Jyk7XG5cbi8vIEEgc2luZ2xlIGJhc2UgNjQgZGlnaXQgY2FuIGNvbnRhaW4gNiBiaXRzIG9mIGRhdGEuIEZvciB0aGUgYmFzZSA2NCB2YXJpYWJsZVxuLy8gbGVuZ3RoIHF1YW50aXRpZXMgd2UgdXNlIGluIHRoZSBzb3VyY2UgbWFwIHNwZWMsIHRoZSBmaXJzdCBiaXQgaXMgdGhlIHNpZ24sXG4vLyB0aGUgbmV4dCBmb3VyIGJpdHMgYXJlIHRoZSBhY3R1YWwgdmFsdWUsIGFuZCB0aGUgNnRoIGJpdCBpcyB0aGVcbi8vIGNvbnRpbnVhdGlvbiBiaXQuIFRoZSBjb250aW51YXRpb24gYml0IHRlbGxzIHVzIHdoZXRoZXIgdGhlcmUgYXJlIG1vcmVcbi8vIGRpZ2l0cyBpbiB0aGlzIHZhbHVlIGZvbGxvd2luZyB0aGlzIGRpZ2l0LlxuLy9cbi8vICAgQ29udGludWF0aW9uXG4vLyAgIHwgICAgU2lnblxuLy8gICB8ICAgIHxcbi8vICAgViAgICBWXG4vLyAgIDEwMTAxMVxuXG52YXIgVkxRX0JBU0VfU0hJRlQgPSA1O1xuXG4vLyBiaW5hcnk6IDEwMDAwMFxudmFyIFZMUV9CQVNFID0gMSA8PCBWTFFfQkFTRV9TSElGVDtcblxuLy8gYmluYXJ5OiAwMTExMTFcbnZhciBWTFFfQkFTRV9NQVNLID0gVkxRX0JBU0UgLSAxO1xuXG4vLyBiaW5hcnk6IDEwMDAwMFxudmFyIFZMUV9DT05USU5VQVRJT05fQklUID0gVkxRX0JBU0U7XG5cbi8qKlxuICogQ29udmVydHMgZnJvbSBhIHR3by1jb21wbGVtZW50IHZhbHVlIHRvIGEgdmFsdWUgd2hlcmUgdGhlIHNpZ24gYml0IGlzXG4gKiBwbGFjZWQgaW4gdGhlIGxlYXN0IHNpZ25pZmljYW50IGJpdC4gIEZvciBleGFtcGxlLCBhcyBkZWNpbWFsczpcbiAqICAgMSBiZWNvbWVzIDIgKDEwIGJpbmFyeSksIC0xIGJlY29tZXMgMyAoMTEgYmluYXJ5KVxuICogICAyIGJlY29tZXMgNCAoMTAwIGJpbmFyeSksIC0yIGJlY29tZXMgNSAoMTAxIGJpbmFyeSlcbiAqL1xuZnVuY3Rpb24gdG9WTFFTaWduZWQoYVZhbHVlKSB7XG4gIHJldHVybiBhVmFsdWUgPCAwXG4gICAgPyAoKC1hVmFsdWUpIDw8IDEpICsgMVxuICAgIDogKGFWYWx1ZSA8PCAxKSArIDA7XG59XG5cbi8qKlxuICogQ29udmVydHMgdG8gYSB0d28tY29tcGxlbWVudCB2YWx1ZSBmcm9tIGEgdmFsdWUgd2hlcmUgdGhlIHNpZ24gYml0IGlzXG4gKiBwbGFjZWQgaW4gdGhlIGxlYXN0IHNpZ25pZmljYW50IGJpdC4gIEZvciBleGFtcGxlLCBhcyBkZWNpbWFsczpcbiAqICAgMiAoMTAgYmluYXJ5KSBiZWNvbWVzIDEsIDMgKDExIGJpbmFyeSkgYmVjb21lcyAtMVxuICogICA0ICgxMDAgYmluYXJ5KSBiZWNvbWVzIDIsIDUgKDEwMSBiaW5hcnkpIGJlY29tZXMgLTJcbiAqL1xuZnVuY3Rpb24gZnJvbVZMUVNpZ25lZChhVmFsdWUpIHtcbiAgdmFyIGlzTmVnYXRpdmUgPSAoYVZhbHVlICYgMSkgPT09IDE7XG4gIHZhciBzaGlmdGVkID0gYVZhbHVlID4+IDE7XG4gIHJldHVybiBpc05lZ2F0aXZlXG4gICAgPyAtc2hpZnRlZFxuICAgIDogc2hpZnRlZDtcbn1cblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBiYXNlIDY0IFZMUSBlbmNvZGVkIHZhbHVlLlxuICovXG5leHBvcnRzLmVuY29kZSA9IGZ1bmN0aW9uIGJhc2U2NFZMUV9lbmNvZGUoYVZhbHVlKSB7XG4gIHZhciBlbmNvZGVkID0gXCJcIjtcbiAgdmFyIGRpZ2l0O1xuXG4gIHZhciB2bHEgPSB0b1ZMUVNpZ25lZChhVmFsdWUpO1xuXG4gIGRvIHtcbiAgICBkaWdpdCA9IHZscSAmIFZMUV9CQVNFX01BU0s7XG4gICAgdmxxID4+Pj0gVkxRX0JBU0VfU0hJRlQ7XG4gICAgaWYgKHZscSA+IDApIHtcbiAgICAgIC8vIFRoZXJlIGFyZSBzdGlsbCBtb3JlIGRpZ2l0cyBpbiB0aGlzIHZhbHVlLCBzbyB3ZSBtdXN0IG1ha2Ugc3VyZSB0aGVcbiAgICAgIC8vIGNvbnRpbnVhdGlvbiBiaXQgaXMgbWFya2VkLlxuICAgICAgZGlnaXQgfD0gVkxRX0NPTlRJTlVBVElPTl9CSVQ7XG4gICAgfVxuICAgIGVuY29kZWQgKz0gYmFzZTY0LmVuY29kZShkaWdpdCk7XG4gIH0gd2hpbGUgKHZscSA+IDApO1xuXG4gIHJldHVybiBlbmNvZGVkO1xufTtcblxuLyoqXG4gKiBEZWNvZGVzIHRoZSBuZXh0IGJhc2UgNjQgVkxRIHZhbHVlIGZyb20gdGhlIGdpdmVuIHN0cmluZyBhbmQgcmV0dXJucyB0aGVcbiAqIHZhbHVlIGFuZCB0aGUgcmVzdCBvZiB0aGUgc3RyaW5nIHZpYSB0aGUgb3V0IHBhcmFtZXRlci5cbiAqL1xuZXhwb3J0cy5kZWNvZGUgPSBmdW5jdGlvbiBiYXNlNjRWTFFfZGVjb2RlKGFTdHIsIGFJbmRleCwgYU91dFBhcmFtKSB7XG4gIHZhciBzdHJMZW4gPSBhU3RyLmxlbmd0aDtcbiAgdmFyIHJlc3VsdCA9IDA7XG4gIHZhciBzaGlmdCA9IDA7XG4gIHZhciBjb250aW51YXRpb24sIGRpZ2l0O1xuXG4gIGRvIHtcbiAgICBpZiAoYUluZGV4ID49IHN0ckxlbikge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiRXhwZWN0ZWQgbW9yZSBkaWdpdHMgaW4gYmFzZSA2NCBWTFEgdmFsdWUuXCIpO1xuICAgIH1cblxuICAgIGRpZ2l0ID0gYmFzZTY0LmRlY29kZShhU3RyLmNoYXJDb2RlQXQoYUluZGV4KyspKTtcbiAgICBpZiAoZGlnaXQgPT09IC0xKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoXCJJbnZhbGlkIGJhc2U2NCBkaWdpdDogXCIgKyBhU3RyLmNoYXJBdChhSW5kZXggLSAxKSk7XG4gICAgfVxuXG4gICAgY29udGludWF0aW9uID0gISEoZGlnaXQgJiBWTFFfQ09OVElOVUFUSU9OX0JJVCk7XG4gICAgZGlnaXQgJj0gVkxRX0JBU0VfTUFTSztcbiAgICByZXN1bHQgPSByZXN1bHQgKyAoZGlnaXQgPDwgc2hpZnQpO1xuICAgIHNoaWZ0ICs9IFZMUV9CQVNFX1NISUZUO1xuICB9IHdoaWxlIChjb250aW51YXRpb24pO1xuXG4gIGFPdXRQYXJhbS52YWx1ZSA9IGZyb21WTFFTaWduZWQocmVzdWx0KTtcbiAgYU91dFBhcmFtLnJlc3QgPSBhSW5kZXg7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmFzZTY0LXZscS5qc1xuLy8gbW9kdWxlIGlkID0gMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciBpbnRUb0NoYXJNYXAgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLycuc3BsaXQoJycpO1xuXG4vKipcbiAqIEVuY29kZSBhbiBpbnRlZ2VyIGluIHRoZSByYW5nZSBvZiAwIHRvIDYzIHRvIGEgc2luZ2xlIGJhc2UgNjQgZGlnaXQuXG4gKi9cbmV4cG9ydHMuZW5jb2RlID0gZnVuY3Rpb24gKG51bWJlcikge1xuICBpZiAoMCA8PSBudW1iZXIgJiYgbnVtYmVyIDwgaW50VG9DaGFyTWFwLmxlbmd0aCkge1xuICAgIHJldHVybiBpbnRUb0NoYXJNYXBbbnVtYmVyXTtcbiAgfVxuICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiTXVzdCBiZSBiZXR3ZWVuIDAgYW5kIDYzOiBcIiArIG51bWJlcik7XG59O1xuXG4vKipcbiAqIERlY29kZSBhIHNpbmdsZSBiYXNlIDY0IGNoYXJhY3RlciBjb2RlIGRpZ2l0IHRvIGFuIGludGVnZXIuIFJldHVybnMgLTEgb25cbiAqIGZhaWx1cmUuXG4gKi9cbmV4cG9ydHMuZGVjb2RlID0gZnVuY3Rpb24gKGNoYXJDb2RlKSB7XG4gIHZhciBiaWdBID0gNjU7ICAgICAvLyAnQSdcbiAgdmFyIGJpZ1ogPSA5MDsgICAgIC8vICdaJ1xuXG4gIHZhciBsaXR0bGVBID0gOTc7ICAvLyAnYSdcbiAgdmFyIGxpdHRsZVogPSAxMjI7IC8vICd6J1xuXG4gIHZhciB6ZXJvID0gNDg7ICAgICAvLyAnMCdcbiAgdmFyIG5pbmUgPSA1NzsgICAgIC8vICc5J1xuXG4gIHZhciBwbHVzID0gNDM7ICAgICAvLyAnKydcbiAgdmFyIHNsYXNoID0gNDc7ICAgIC8vICcvJ1xuXG4gIHZhciBsaXR0bGVPZmZzZXQgPSAyNjtcbiAgdmFyIG51bWJlck9mZnNldCA9IDUyO1xuXG4gIC8vIDAgLSAyNTogQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpcbiAgaWYgKGJpZ0EgPD0gY2hhckNvZGUgJiYgY2hhckNvZGUgPD0gYmlnWikge1xuICAgIHJldHVybiAoY2hhckNvZGUgLSBiaWdBKTtcbiAgfVxuXG4gIC8vIDI2IC0gNTE6IGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6XG4gIGlmIChsaXR0bGVBIDw9IGNoYXJDb2RlICYmIGNoYXJDb2RlIDw9IGxpdHRsZVopIHtcbiAgICByZXR1cm4gKGNoYXJDb2RlIC0gbGl0dGxlQSArIGxpdHRsZU9mZnNldCk7XG4gIH1cblxuICAvLyA1MiAtIDYxOiAwMTIzNDU2Nzg5XG4gIGlmICh6ZXJvIDw9IGNoYXJDb2RlICYmIGNoYXJDb2RlIDw9IG5pbmUpIHtcbiAgICByZXR1cm4gKGNoYXJDb2RlIC0gemVybyArIG51bWJlck9mZnNldCk7XG4gIH1cblxuICAvLyA2MjogK1xuICBpZiAoY2hhckNvZGUgPT0gcGx1cykge1xuICAgIHJldHVybiA2MjtcbiAgfVxuXG4gIC8vIDYzOiAvXG4gIGlmIChjaGFyQ29kZSA9PSBzbGFzaCkge1xuICAgIHJldHVybiA2MztcbiAgfVxuXG4gIC8vIEludmFsaWQgYmFzZTY0IGRpZ2l0LlxuICByZXR1cm4gLTE7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmFzZTY0LmpzXG4vLyBtb2R1bGUgaWQgPSAzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCIsIi8qIC0qLSBNb2RlOiBqczsganMtaW5kZW50LWxldmVsOiAyOyAtKi0gKi9cbi8qXG4gKiBDb3B5cmlnaHQgMjAxMSBNb3ppbGxhIEZvdW5kYXRpb24gYW5kIGNvbnRyaWJ1dG9yc1xuICogTGljZW5zZWQgdW5kZXIgdGhlIE5ldyBCU0QgbGljZW5zZS4gU2VlIExJQ0VOU0Ugb3I6XG4gKiBodHRwOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvQlNELTMtQ2xhdXNlXG4gKi9cblxuLyoqXG4gKiBUaGlzIGlzIGEgaGVscGVyIGZ1bmN0aW9uIGZvciBnZXR0aW5nIHZhbHVlcyBmcm9tIHBhcmFtZXRlci9vcHRpb25zXG4gKiBvYmplY3RzLlxuICpcbiAqIEBwYXJhbSBhcmdzIFRoZSBvYmplY3Qgd2UgYXJlIGV4dHJhY3RpbmcgdmFsdWVzIGZyb21cbiAqIEBwYXJhbSBuYW1lIFRoZSBuYW1lIG9mIHRoZSBwcm9wZXJ0eSB3ZSBhcmUgZ2V0dGluZy5cbiAqIEBwYXJhbSBkZWZhdWx0VmFsdWUgQW4gb3B0aW9uYWwgdmFsdWUgdG8gcmV0dXJuIGlmIHRoZSBwcm9wZXJ0eSBpcyBtaXNzaW5nXG4gKiBmcm9tIHRoZSBvYmplY3QuIElmIHRoaXMgaXMgbm90IHNwZWNpZmllZCBhbmQgdGhlIHByb3BlcnR5IGlzIG1pc3NpbmcsIGFuXG4gKiBlcnJvciB3aWxsIGJlIHRocm93bi5cbiAqL1xuZnVuY3Rpb24gZ2V0QXJnKGFBcmdzLCBhTmFtZSwgYURlZmF1bHRWYWx1ZSkge1xuICBpZiAoYU5hbWUgaW4gYUFyZ3MpIHtcbiAgICByZXR1cm4gYUFyZ3NbYU5hbWVdO1xuICB9IGVsc2UgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDMpIHtcbiAgICByZXR1cm4gYURlZmF1bHRWYWx1ZTtcbiAgfSBlbHNlIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoJ1wiJyArIGFOYW1lICsgJ1wiIGlzIGEgcmVxdWlyZWQgYXJndW1lbnQuJyk7XG4gIH1cbn1cbmV4cG9ydHMuZ2V0QXJnID0gZ2V0QXJnO1xuXG52YXIgdXJsUmVnZXhwID0gL14oPzooW1xcdytcXC0uXSspOik/XFwvXFwvKD86KFxcdys6XFx3KylAKT8oW1xcdy5dKikoPzo6KFxcZCspKT8oXFxTKikkLztcbnZhciBkYXRhVXJsUmVnZXhwID0gL15kYXRhOi4rXFwsLiskLztcblxuZnVuY3Rpb24gdXJsUGFyc2UoYVVybCkge1xuICB2YXIgbWF0Y2ggPSBhVXJsLm1hdGNoKHVybFJlZ2V4cCk7XG4gIGlmICghbWF0Y2gpIHtcbiAgICByZXR1cm4gbnVsbDtcbiAgfVxuICByZXR1cm4ge1xuICAgIHNjaGVtZTogbWF0Y2hbMV0sXG4gICAgYXV0aDogbWF0Y2hbMl0sXG4gICAgaG9zdDogbWF0Y2hbM10sXG4gICAgcG9ydDogbWF0Y2hbNF0sXG4gICAgcGF0aDogbWF0Y2hbNV1cbiAgfTtcbn1cbmV4cG9ydHMudXJsUGFyc2UgPSB1cmxQYXJzZTtcblxuZnVuY3Rpb24gdXJsR2VuZXJhdGUoYVBhcnNlZFVybCkge1xuICB2YXIgdXJsID0gJyc7XG4gIGlmIChhUGFyc2VkVXJsLnNjaGVtZSkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLnNjaGVtZSArICc6JztcbiAgfVxuICB1cmwgKz0gJy8vJztcbiAgaWYgKGFQYXJzZWRVcmwuYXV0aCkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLmF1dGggKyAnQCc7XG4gIH1cbiAgaWYgKGFQYXJzZWRVcmwuaG9zdCkge1xuICAgIHVybCArPSBhUGFyc2VkVXJsLmhvc3Q7XG4gIH1cbiAgaWYgKGFQYXJzZWRVcmwucG9ydCkge1xuICAgIHVybCArPSBcIjpcIiArIGFQYXJzZWRVcmwucG9ydFxuICB9XG4gIGlmIChhUGFyc2VkVXJsLnBhdGgpIHtcbiAgICB1cmwgKz0gYVBhcnNlZFVybC5wYXRoO1xuICB9XG4gIHJldHVybiB1cmw7XG59XG5leHBvcnRzLnVybEdlbmVyYXRlID0gdXJsR2VuZXJhdGU7XG5cbi8qKlxuICogTm9ybWFsaXplcyBhIHBhdGgsIG9yIHRoZSBwYXRoIHBvcnRpb24gb2YgYSBVUkw6XG4gKlxuICogLSBSZXBsYWNlcyBjb25zZWN1dGl2ZSBzbGFzaGVzIHdpdGggb25lIHNsYXNoLlxuICogLSBSZW1vdmVzIHVubmVjZXNzYXJ5ICcuJyBwYXJ0cy5cbiAqIC0gUmVtb3ZlcyB1bm5lY2Vzc2FyeSAnPGRpcj4vLi4nIHBhcnRzLlxuICpcbiAqIEJhc2VkIG9uIGNvZGUgaW4gdGhlIE5vZGUuanMgJ3BhdGgnIGNvcmUgbW9kdWxlLlxuICpcbiAqIEBwYXJhbSBhUGF0aCBUaGUgcGF0aCBvciB1cmwgdG8gbm9ybWFsaXplLlxuICovXG5mdW5jdGlvbiBub3JtYWxpemUoYVBhdGgpIHtcbiAgdmFyIHBhdGggPSBhUGF0aDtcbiAgdmFyIHVybCA9IHVybFBhcnNlKGFQYXRoKTtcbiAgaWYgKHVybCkge1xuICAgIGlmICghdXJsLnBhdGgpIHtcbiAgICAgIHJldHVybiBhUGF0aDtcbiAgICB9XG4gICAgcGF0aCA9IHVybC5wYXRoO1xuICB9XG4gIHZhciBpc0Fic29sdXRlID0gZXhwb3J0cy5pc0Fic29sdXRlKHBhdGgpO1xuXG4gIHZhciBwYXJ0cyA9IHBhdGguc3BsaXQoL1xcLysvKTtcbiAgZm9yICh2YXIgcGFydCwgdXAgPSAwLCBpID0gcGFydHMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICBwYXJ0ID0gcGFydHNbaV07XG4gICAgaWYgKHBhcnQgPT09ICcuJykge1xuICAgICAgcGFydHMuc3BsaWNlKGksIDEpO1xuICAgIH0gZWxzZSBpZiAocGFydCA9PT0gJy4uJykge1xuICAgICAgdXArKztcbiAgICB9IGVsc2UgaWYgKHVwID4gMCkge1xuICAgICAgaWYgKHBhcnQgPT09ICcnKSB7XG4gICAgICAgIC8vIFRoZSBmaXJzdCBwYXJ0IGlzIGJsYW5rIGlmIHRoZSBwYXRoIGlzIGFic29sdXRlLiBUcnlpbmcgdG8gZ29cbiAgICAgICAgLy8gYWJvdmUgdGhlIHJvb3QgaXMgYSBuby1vcC4gVGhlcmVmb3JlIHdlIGNhbiByZW1vdmUgYWxsICcuLicgcGFydHNcbiAgICAgICAgLy8gZGlyZWN0bHkgYWZ0ZXIgdGhlIHJvb3QuXG4gICAgICAgIHBhcnRzLnNwbGljZShpICsgMSwgdXApO1xuICAgICAgICB1cCA9IDA7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBwYXJ0cy5zcGxpY2UoaSwgMik7XG4gICAgICAgIHVwLS07XG4gICAgICB9XG4gICAgfVxuICB9XG4gIHBhdGggPSBwYXJ0cy5qb2luKCcvJyk7XG5cbiAgaWYgKHBhdGggPT09ICcnKSB7XG4gICAgcGF0aCA9IGlzQWJzb2x1dGUgPyAnLycgOiAnLic7XG4gIH1cblxuICBpZiAodXJsKSB7XG4gICAgdXJsLnBhdGggPSBwYXRoO1xuICAgIHJldHVybiB1cmxHZW5lcmF0ZSh1cmwpO1xuICB9XG4gIHJldHVybiBwYXRoO1xufVxuZXhwb3J0cy5ub3JtYWxpemUgPSBub3JtYWxpemU7XG5cbi8qKlxuICogSm9pbnMgdHdvIHBhdGhzL1VSTHMuXG4gKlxuICogQHBhcmFtIGFSb290IFRoZSByb290IHBhdGggb3IgVVJMLlxuICogQHBhcmFtIGFQYXRoIFRoZSBwYXRoIG9yIFVSTCB0byBiZSBqb2luZWQgd2l0aCB0aGUgcm9vdC5cbiAqXG4gKiAtIElmIGFQYXRoIGlzIGEgVVJMIG9yIGEgZGF0YSBVUkksIGFQYXRoIGlzIHJldHVybmVkLCB1bmxlc3MgYVBhdGggaXMgYVxuICogICBzY2hlbWUtcmVsYXRpdmUgVVJMOiBUaGVuIHRoZSBzY2hlbWUgb2YgYVJvb3QsIGlmIGFueSwgaXMgcHJlcGVuZGVkXG4gKiAgIGZpcnN0LlxuICogLSBPdGhlcndpc2UgYVBhdGggaXMgYSBwYXRoLiBJZiBhUm9vdCBpcyBhIFVSTCwgdGhlbiBpdHMgcGF0aCBwb3J0aW9uXG4gKiAgIGlzIHVwZGF0ZWQgd2l0aCB0aGUgcmVzdWx0IGFuZCBhUm9vdCBpcyByZXR1cm5lZC4gT3RoZXJ3aXNlIHRoZSByZXN1bHRcbiAqICAgaXMgcmV0dXJuZWQuXG4gKiAgIC0gSWYgYVBhdGggaXMgYWJzb2x1dGUsIHRoZSByZXN1bHQgaXMgYVBhdGguXG4gKiAgIC0gT3RoZXJ3aXNlIHRoZSB0d28gcGF0aHMgYXJlIGpvaW5lZCB3aXRoIGEgc2xhc2guXG4gKiAtIEpvaW5pbmcgZm9yIGV4YW1wbGUgJ2h0dHA6Ly8nIGFuZCAnd3d3LmV4YW1wbGUuY29tJyBpcyBhbHNvIHN1cHBvcnRlZC5cbiAqL1xuZnVuY3Rpb24gam9pbihhUm9vdCwgYVBhdGgpIHtcbiAgaWYgKGFSb290ID09PSBcIlwiKSB7XG4gICAgYVJvb3QgPSBcIi5cIjtcbiAgfVxuICBpZiAoYVBhdGggPT09IFwiXCIpIHtcbiAgICBhUGF0aCA9IFwiLlwiO1xuICB9XG4gIHZhciBhUGF0aFVybCA9IHVybFBhcnNlKGFQYXRoKTtcbiAgdmFyIGFSb290VXJsID0gdXJsUGFyc2UoYVJvb3QpO1xuICBpZiAoYVJvb3RVcmwpIHtcbiAgICBhUm9vdCA9IGFSb290VXJsLnBhdGggfHwgJy8nO1xuICB9XG5cbiAgLy8gYGpvaW4oZm9vLCAnLy93d3cuZXhhbXBsZS5vcmcnKWBcbiAgaWYgKGFQYXRoVXJsICYmICFhUGF0aFVybC5zY2hlbWUpIHtcbiAgICBpZiAoYVJvb3RVcmwpIHtcbiAgICAgIGFQYXRoVXJsLnNjaGVtZSA9IGFSb290VXJsLnNjaGVtZTtcbiAgICB9XG4gICAgcmV0dXJuIHVybEdlbmVyYXRlKGFQYXRoVXJsKTtcbiAgfVxuXG4gIGlmIChhUGF0aFVybCB8fCBhUGF0aC5tYXRjaChkYXRhVXJsUmVnZXhwKSkge1xuICAgIHJldHVybiBhUGF0aDtcbiAgfVxuXG4gIC8vIGBqb2luKCdodHRwOi8vJywgJ3d3dy5leGFtcGxlLmNvbScpYFxuICBpZiAoYVJvb3RVcmwgJiYgIWFSb290VXJsLmhvc3QgJiYgIWFSb290VXJsLnBhdGgpIHtcbiAgICBhUm9vdFVybC5ob3N0ID0gYVBhdGg7XG4gICAgcmV0dXJuIHVybEdlbmVyYXRlKGFSb290VXJsKTtcbiAgfVxuXG4gIHZhciBqb2luZWQgPSBhUGF0aC5jaGFyQXQoMCkgPT09ICcvJ1xuICAgID8gYVBhdGhcbiAgICA6IG5vcm1hbGl6ZShhUm9vdC5yZXBsYWNlKC9cXC8rJC8sICcnKSArICcvJyArIGFQYXRoKTtcblxuICBpZiAoYVJvb3RVcmwpIHtcbiAgICBhUm9vdFVybC5wYXRoID0gam9pbmVkO1xuICAgIHJldHVybiB1cmxHZW5lcmF0ZShhUm9vdFVybCk7XG4gIH1cbiAgcmV0dXJuIGpvaW5lZDtcbn1cbmV4cG9ydHMuam9pbiA9IGpvaW47XG5cbmV4cG9ydHMuaXNBYnNvbHV0ZSA9IGZ1bmN0aW9uIChhUGF0aCkge1xuICByZXR1cm4gYVBhdGguY2hhckF0KDApID09PSAnLycgfHwgISFhUGF0aC5tYXRjaCh1cmxSZWdleHApO1xufTtcblxuLyoqXG4gKiBNYWtlIGEgcGF0aCByZWxhdGl2ZSB0byBhIFVSTCBvciBhbm90aGVyIHBhdGguXG4gKlxuICogQHBhcmFtIGFSb290IFRoZSByb290IHBhdGggb3IgVVJMLlxuICogQHBhcmFtIGFQYXRoIFRoZSBwYXRoIG9yIFVSTCB0byBiZSBtYWRlIHJlbGF0aXZlIHRvIGFSb290LlxuICovXG5mdW5jdGlvbiByZWxhdGl2ZShhUm9vdCwgYVBhdGgpIHtcbiAgaWYgKGFSb290ID09PSBcIlwiKSB7XG4gICAgYVJvb3QgPSBcIi5cIjtcbiAgfVxuXG4gIGFSb290ID0gYVJvb3QucmVwbGFjZSgvXFwvJC8sICcnKTtcblxuICAvLyBJdCBpcyBwb3NzaWJsZSBmb3IgdGhlIHBhdGggdG8gYmUgYWJvdmUgdGhlIHJvb3QuIEluIHRoaXMgY2FzZSwgc2ltcGx5XG4gIC8vIGNoZWNraW5nIHdoZXRoZXIgdGhlIHJvb3QgaXMgYSBwcmVmaXggb2YgdGhlIHBhdGggd29uJ3Qgd29yay4gSW5zdGVhZCwgd2VcbiAgLy8gbmVlZCB0byByZW1vdmUgY29tcG9uZW50cyBmcm9tIHRoZSByb290IG9uZSBieSBvbmUsIHVudGlsIGVpdGhlciB3ZSBmaW5kXG4gIC8vIGEgcHJlZml4IHRoYXQgZml0cywgb3Igd2UgcnVuIG91dCBvZiBjb21wb25lbnRzIHRvIHJlbW92ZS5cbiAgdmFyIGxldmVsID0gMDtcbiAgd2hpbGUgKGFQYXRoLmluZGV4T2YoYVJvb3QgKyAnLycpICE9PSAwKSB7XG4gICAgdmFyIGluZGV4ID0gYVJvb3QubGFzdEluZGV4T2YoXCIvXCIpO1xuICAgIGlmIChpbmRleCA8IDApIHtcbiAgICAgIHJldHVybiBhUGF0aDtcbiAgICB9XG5cbiAgICAvLyBJZiB0aGUgb25seSBwYXJ0IG9mIHRoZSByb290IHRoYXQgaXMgbGVmdCBpcyB0aGUgc2NoZW1lIChpLmUuIGh0dHA6Ly8sXG4gICAgLy8gZmlsZTovLy8sIGV0Yy4pLCBvbmUgb3IgbW9yZSBzbGFzaGVzICgvKSwgb3Igc2ltcGx5IG5vdGhpbmcgYXQgYWxsLCB3ZVxuICAgIC8vIGhhdmUgZXhoYXVzdGVkIGFsbCBjb21wb25lbnRzLCBzbyB0aGUgcGF0aCBpcyBub3QgcmVsYXRpdmUgdG8gdGhlIHJvb3QuXG4gICAgYVJvb3QgPSBhUm9vdC5zbGljZSgwLCBpbmRleCk7XG4gICAgaWYgKGFSb290Lm1hdGNoKC9eKFteXFwvXSs6XFwvKT9cXC8qJC8pKSB7XG4gICAgICByZXR1cm4gYVBhdGg7XG4gICAgfVxuXG4gICAgKytsZXZlbDtcbiAgfVxuXG4gIC8vIE1ha2Ugc3VyZSB3ZSBhZGQgYSBcIi4uL1wiIGZvciBlYWNoIGNvbXBvbmVudCB3ZSByZW1vdmVkIGZyb20gdGhlIHJvb3QuXG4gIHJldHVybiBBcnJheShsZXZlbCArIDEpLmpvaW4oXCIuLi9cIikgKyBhUGF0aC5zdWJzdHIoYVJvb3QubGVuZ3RoICsgMSk7XG59XG5leHBvcnRzLnJlbGF0aXZlID0gcmVsYXRpdmU7XG5cbnZhciBzdXBwb3J0c051bGxQcm90byA9IChmdW5jdGlvbiAoKSB7XG4gIHZhciBvYmogPSBPYmplY3QuY3JlYXRlKG51bGwpO1xuICByZXR1cm4gISgnX19wcm90b19fJyBpbiBvYmopO1xufSgpKTtcblxuZnVuY3Rpb24gaWRlbnRpdHkgKHMpIHtcbiAgcmV0dXJuIHM7XG59XG5cbi8qKlxuICogQmVjYXVzZSBiZWhhdmlvciBnb2VzIHdhY2t5IHdoZW4geW91IHNldCBgX19wcm90b19fYCBvbiBvYmplY3RzLCB3ZVxuICogaGF2ZSB0byBwcmVmaXggYWxsIHRoZSBzdHJpbmdzIGluIG91ciBzZXQgd2l0aCBhbiBhcmJpdHJhcnkgY2hhcmFjdGVyLlxuICpcbiAqIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL3B1bGwvMzEgYW5kXG4gKiBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL2lzc3Vlcy8zMFxuICpcbiAqIEBwYXJhbSBTdHJpbmcgYVN0clxuICovXG5mdW5jdGlvbiB0b1NldFN0cmluZyhhU3RyKSB7XG4gIGlmIChpc1Byb3RvU3RyaW5nKGFTdHIpKSB7XG4gICAgcmV0dXJuICckJyArIGFTdHI7XG4gIH1cblxuICByZXR1cm4gYVN0cjtcbn1cbmV4cG9ydHMudG9TZXRTdHJpbmcgPSBzdXBwb3J0c051bGxQcm90byA/IGlkZW50aXR5IDogdG9TZXRTdHJpbmc7XG5cbmZ1bmN0aW9uIGZyb21TZXRTdHJpbmcoYVN0cikge1xuICBpZiAoaXNQcm90b1N0cmluZyhhU3RyKSkge1xuICAgIHJldHVybiBhU3RyLnNsaWNlKDEpO1xuICB9XG5cbiAgcmV0dXJuIGFTdHI7XG59XG5leHBvcnRzLmZyb21TZXRTdHJpbmcgPSBzdXBwb3J0c051bGxQcm90byA/IGlkZW50aXR5IDogZnJvbVNldFN0cmluZztcblxuZnVuY3Rpb24gaXNQcm90b1N0cmluZyhzKSB7XG4gIGlmICghcykge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHZhciBsZW5ndGggPSBzLmxlbmd0aDtcblxuICBpZiAobGVuZ3RoIDwgOSAvKiBcIl9fcHJvdG9fX1wiLmxlbmd0aCAqLykge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIGlmIChzLmNoYXJDb2RlQXQobGVuZ3RoIC0gMSkgIT09IDk1ICAvKiAnXycgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSAyKSAhPT0gOTUgIC8qICdfJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDMpICE9PSAxMTEgLyogJ28nICovIHx8XG4gICAgICBzLmNoYXJDb2RlQXQobGVuZ3RoIC0gNCkgIT09IDExNiAvKiAndCcgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSA1KSAhPT0gMTExIC8qICdvJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDYpICE9PSAxMTQgLyogJ3InICovIHx8XG4gICAgICBzLmNoYXJDb2RlQXQobGVuZ3RoIC0gNykgIT09IDExMiAvKiAncCcgKi8gfHxcbiAgICAgIHMuY2hhckNvZGVBdChsZW5ndGggLSA4KSAhPT0gOTUgIC8qICdfJyAqLyB8fFxuICAgICAgcy5jaGFyQ29kZUF0KGxlbmd0aCAtIDkpICE9PSA5NSAgLyogJ18nICovKSB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG5cbiAgZm9yICh2YXIgaSA9IGxlbmd0aCAtIDEwOyBpID49IDA7IGktLSkge1xuICAgIGlmIChzLmNoYXJDb2RlQXQoaSkgIT09IDM2IC8qICckJyAqLykge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB0cnVlO1xufVxuXG4vKipcbiAqIENvbXBhcmF0b3IgYmV0d2VlbiB0d28gbWFwcGluZ3Mgd2hlcmUgdGhlIG9yaWdpbmFsIHBvc2l0aW9ucyBhcmUgY29tcGFyZWQuXG4gKlxuICogT3B0aW9uYWxseSBwYXNzIGluIGB0cnVlYCBhcyBgb25seUNvbXBhcmVHZW5lcmF0ZWRgIHRvIGNvbnNpZGVyIHR3b1xuICogbWFwcGluZ3Mgd2l0aCB0aGUgc2FtZSBvcmlnaW5hbCBzb3VyY2UvbGluZS9jb2x1bW4sIGJ1dCBkaWZmZXJlbnQgZ2VuZXJhdGVkXG4gKiBsaW5lIGFuZCBjb2x1bW4gdGhlIHNhbWUuIFVzZWZ1bCB3aGVuIHNlYXJjaGluZyBmb3IgYSBtYXBwaW5nIHdpdGggYVxuICogc3R1YmJlZCBvdXQgbWFwcGluZy5cbiAqL1xuZnVuY3Rpb24gY29tcGFyZUJ5T3JpZ2luYWxQb3NpdGlvbnMobWFwcGluZ0EsIG1hcHBpbmdCLCBvbmx5Q29tcGFyZU9yaWdpbmFsKSB7XG4gIHZhciBjbXAgPSBtYXBwaW5nQS5zb3VyY2UgLSBtYXBwaW5nQi5zb3VyY2U7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDAgfHwgb25seUNvbXBhcmVPcmlnaW5hbCkge1xuICAgIHJldHVybiBjbXA7XG4gIH1cblxuICBjbXAgPSBtYXBwaW5nQS5nZW5lcmF0ZWRDb2x1bW4gLSBtYXBwaW5nQi5nZW5lcmF0ZWRDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkTGluZSAtIG1hcHBpbmdCLmdlbmVyYXRlZExpbmU7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIG1hcHBpbmdBLm5hbWUgLSBtYXBwaW5nQi5uYW1lO1xufVxuZXhwb3J0cy5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyA9IGNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zO1xuXG4vKipcbiAqIENvbXBhcmF0b3IgYmV0d2VlbiB0d28gbWFwcGluZ3Mgd2l0aCBkZWZsYXRlZCBzb3VyY2UgYW5kIG5hbWUgaW5kaWNlcyB3aGVyZVxuICogdGhlIGdlbmVyYXRlZCBwb3NpdGlvbnMgYXJlIGNvbXBhcmVkLlxuICpcbiAqIE9wdGlvbmFsbHkgcGFzcyBpbiBgdHJ1ZWAgYXMgYG9ubHlDb21wYXJlR2VuZXJhdGVkYCB0byBjb25zaWRlciB0d29cbiAqIG1hcHBpbmdzIHdpdGggdGhlIHNhbWUgZ2VuZXJhdGVkIGxpbmUgYW5kIGNvbHVtbiwgYnV0IGRpZmZlcmVudFxuICogc291cmNlL25hbWUvb3JpZ2luYWwgbGluZSBhbmQgY29sdW1uIHRoZSBzYW1lLiBVc2VmdWwgd2hlbiBzZWFyY2hpbmcgZm9yIGFcbiAqIG1hcHBpbmcgd2l0aCBhIHN0dWJiZWQgb3V0IG1hcHBpbmcuXG4gKi9cbmZ1bmN0aW9uIGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkKG1hcHBpbmdBLCBtYXBwaW5nQiwgb25seUNvbXBhcmVHZW5lcmF0ZWQpIHtcbiAgdmFyIGNtcCA9IG1hcHBpbmdBLmdlbmVyYXRlZExpbmUgLSBtYXBwaW5nQi5nZW5lcmF0ZWRMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLmdlbmVyYXRlZENvbHVtbiAtIG1hcHBpbmdCLmdlbmVyYXRlZENvbHVtbjtcbiAgaWYgKGNtcCAhPT0gMCB8fCBvbmx5Q29tcGFyZUdlbmVyYXRlZCkge1xuICAgIHJldHVybiBjbXA7XG4gIH1cblxuICBjbXAgPSBtYXBwaW5nQS5zb3VyY2UgLSBtYXBwaW5nQi5zb3VyY2U7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIG1hcHBpbmdBLm5hbWUgLSBtYXBwaW5nQi5uYW1lO1xufVxuZXhwb3J0cy5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNEZWZsYXRlZCA9IGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkO1xuXG5mdW5jdGlvbiBzdHJjbXAoYVN0cjEsIGFTdHIyKSB7XG4gIGlmIChhU3RyMSA9PT0gYVN0cjIpIHtcbiAgICByZXR1cm4gMDtcbiAgfVxuXG4gIGlmIChhU3RyMSA+IGFTdHIyKSB7XG4gICAgcmV0dXJuIDE7XG4gIH1cblxuICByZXR1cm4gLTE7XG59XG5cbi8qKlxuICogQ29tcGFyYXRvciBiZXR3ZWVuIHR3byBtYXBwaW5ncyB3aXRoIGluZmxhdGVkIHNvdXJjZSBhbmQgbmFtZSBzdHJpbmdzIHdoZXJlXG4gKiB0aGUgZ2VuZXJhdGVkIHBvc2l0aW9ucyBhcmUgY29tcGFyZWQuXG4gKi9cbmZ1bmN0aW9uIGNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0luZmxhdGVkKG1hcHBpbmdBLCBtYXBwaW5nQikge1xuICB2YXIgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkTGluZSAtIG1hcHBpbmdCLmdlbmVyYXRlZExpbmU7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0EuZ2VuZXJhdGVkQ29sdW1uIC0gbWFwcGluZ0IuZ2VuZXJhdGVkQ29sdW1uO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IHN0cmNtcChtYXBwaW5nQS5zb3VyY2UsIG1hcHBpbmdCLnNvdXJjZSk7XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgY21wID0gbWFwcGluZ0Eub3JpZ2luYWxMaW5lIC0gbWFwcGluZ0Iub3JpZ2luYWxMaW5lO1xuICBpZiAoY21wICE9PSAwKSB7XG4gICAgcmV0dXJuIGNtcDtcbiAgfVxuXG4gIGNtcCA9IG1hcHBpbmdBLm9yaWdpbmFsQ29sdW1uIC0gbWFwcGluZ0Iub3JpZ2luYWxDb2x1bW47XG4gIGlmIChjbXAgIT09IDApIHtcbiAgICByZXR1cm4gY21wO1xuICB9XG5cbiAgcmV0dXJuIHN0cmNtcChtYXBwaW5nQS5uYW1lLCBtYXBwaW5nQi5uYW1lKTtcbn1cbmV4cG9ydHMuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQgPSBjb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL3V0aWwuanNcbi8vIG1vZHVsZSBpZCA9IDRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIGhhcyA9IE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHk7XG52YXIgaGFzTmF0aXZlTWFwID0gdHlwZW9mIE1hcCAhPT0gXCJ1bmRlZmluZWRcIjtcblxuLyoqXG4gKiBBIGRhdGEgc3RydWN0dXJlIHdoaWNoIGlzIGEgY29tYmluYXRpb24gb2YgYW4gYXJyYXkgYW5kIGEgc2V0LiBBZGRpbmcgYSBuZXdcbiAqIG1lbWJlciBpcyBPKDEpLCB0ZXN0aW5nIGZvciBtZW1iZXJzaGlwIGlzIE8oMSksIGFuZCBmaW5kaW5nIHRoZSBpbmRleCBvZiBhblxuICogZWxlbWVudCBpcyBPKDEpLiBSZW1vdmluZyBlbGVtZW50cyBmcm9tIHRoZSBzZXQgaXMgbm90IHN1cHBvcnRlZC4gT25seVxuICogc3RyaW5ncyBhcmUgc3VwcG9ydGVkIGZvciBtZW1iZXJzaGlwLlxuICovXG5mdW5jdGlvbiBBcnJheVNldCgpIHtcbiAgdGhpcy5fYXJyYXkgPSBbXTtcbiAgdGhpcy5fc2V0ID0gaGFzTmF0aXZlTWFwID8gbmV3IE1hcCgpIDogT2JqZWN0LmNyZWF0ZShudWxsKTtcbn1cblxuLyoqXG4gKiBTdGF0aWMgbWV0aG9kIGZvciBjcmVhdGluZyBBcnJheVNldCBpbnN0YW5jZXMgZnJvbSBhbiBleGlzdGluZyBhcnJheS5cbiAqL1xuQXJyYXlTZXQuZnJvbUFycmF5ID0gZnVuY3Rpb24gQXJyYXlTZXRfZnJvbUFycmF5KGFBcnJheSwgYUFsbG93RHVwbGljYXRlcykge1xuICB2YXIgc2V0ID0gbmV3IEFycmF5U2V0KCk7XG4gIGZvciAodmFyIGkgPSAwLCBsZW4gPSBhQXJyYXkubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcbiAgICBzZXQuYWRkKGFBcnJheVtpXSwgYUFsbG93RHVwbGljYXRlcyk7XG4gIH1cbiAgcmV0dXJuIHNldDtcbn07XG5cbi8qKlxuICogUmV0dXJuIGhvdyBtYW55IHVuaXF1ZSBpdGVtcyBhcmUgaW4gdGhpcyBBcnJheVNldC4gSWYgZHVwbGljYXRlcyBoYXZlIGJlZW5cbiAqIGFkZGVkLCB0aGFuIHRob3NlIGRvIG5vdCBjb3VudCB0b3dhcmRzIHRoZSBzaXplLlxuICpcbiAqIEByZXR1cm5zIE51bWJlclxuICovXG5BcnJheVNldC5wcm90b3R5cGUuc2l6ZSA9IGZ1bmN0aW9uIEFycmF5U2V0X3NpemUoKSB7XG4gIHJldHVybiBoYXNOYXRpdmVNYXAgPyB0aGlzLl9zZXQuc2l6ZSA6IE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzKHRoaXMuX3NldCkubGVuZ3RoO1xufTtcblxuLyoqXG4gKiBBZGQgdGhlIGdpdmVuIHN0cmluZyB0byB0aGlzIHNldC5cbiAqXG4gKiBAcGFyYW0gU3RyaW5nIGFTdHJcbiAqL1xuQXJyYXlTZXQucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIEFycmF5U2V0X2FkZChhU3RyLCBhQWxsb3dEdXBsaWNhdGVzKSB7XG4gIHZhciBzU3RyID0gaGFzTmF0aXZlTWFwID8gYVN0ciA6IHV0aWwudG9TZXRTdHJpbmcoYVN0cik7XG4gIHZhciBpc0R1cGxpY2F0ZSA9IGhhc05hdGl2ZU1hcCA/IHRoaXMuaGFzKGFTdHIpIDogaGFzLmNhbGwodGhpcy5fc2V0LCBzU3RyKTtcbiAgdmFyIGlkeCA9IHRoaXMuX2FycmF5Lmxlbmd0aDtcbiAgaWYgKCFpc0R1cGxpY2F0ZSB8fCBhQWxsb3dEdXBsaWNhdGVzKSB7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhU3RyKTtcbiAgfVxuICBpZiAoIWlzRHVwbGljYXRlKSB7XG4gICAgaWYgKGhhc05hdGl2ZU1hcCkge1xuICAgICAgdGhpcy5fc2V0LnNldChhU3RyLCBpZHgpO1xuICAgIH0gZWxzZSB7XG4gICAgICB0aGlzLl9zZXRbc1N0cl0gPSBpZHg7XG4gICAgfVxuICB9XG59O1xuXG4vKipcbiAqIElzIHRoZSBnaXZlbiBzdHJpbmcgYSBtZW1iZXIgb2YgdGhpcyBzZXQ/XG4gKlxuICogQHBhcmFtIFN0cmluZyBhU3RyXG4gKi9cbkFycmF5U2V0LnByb3RvdHlwZS5oYXMgPSBmdW5jdGlvbiBBcnJheVNldF9oYXMoYVN0cikge1xuICBpZiAoaGFzTmF0aXZlTWFwKSB7XG4gICAgcmV0dXJuIHRoaXMuX3NldC5oYXMoYVN0cik7XG4gIH0gZWxzZSB7XG4gICAgdmFyIHNTdHIgPSB1dGlsLnRvU2V0U3RyaW5nKGFTdHIpO1xuICAgIHJldHVybiBoYXMuY2FsbCh0aGlzLl9zZXQsIHNTdHIpO1xuICB9XG59O1xuXG4vKipcbiAqIFdoYXQgaXMgdGhlIGluZGV4IG9mIHRoZSBnaXZlbiBzdHJpbmcgaW4gdGhlIGFycmF5P1xuICpcbiAqIEBwYXJhbSBTdHJpbmcgYVN0clxuICovXG5BcnJheVNldC5wcm90b3R5cGUuaW5kZXhPZiA9IGZ1bmN0aW9uIEFycmF5U2V0X2luZGV4T2YoYVN0cikge1xuICBpZiAoaGFzTmF0aXZlTWFwKSB7XG4gICAgdmFyIGlkeCA9IHRoaXMuX3NldC5nZXQoYVN0cik7XG4gICAgaWYgKGlkeCA+PSAwKSB7XG4gICAgICAgIHJldHVybiBpZHg7XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIHZhciBzU3RyID0gdXRpbC50b1NldFN0cmluZyhhU3RyKTtcbiAgICBpZiAoaGFzLmNhbGwodGhpcy5fc2V0LCBzU3RyKSkge1xuICAgICAgcmV0dXJuIHRoaXMuX3NldFtzU3RyXTtcbiAgICB9XG4gIH1cblxuICB0aHJvdyBuZXcgRXJyb3IoJ1wiJyArIGFTdHIgKyAnXCIgaXMgbm90IGluIHRoZSBzZXQuJyk7XG59O1xuXG4vKipcbiAqIFdoYXQgaXMgdGhlIGVsZW1lbnQgYXQgdGhlIGdpdmVuIGluZGV4P1xuICpcbiAqIEBwYXJhbSBOdW1iZXIgYUlkeFxuICovXG5BcnJheVNldC5wcm90b3R5cGUuYXQgPSBmdW5jdGlvbiBBcnJheVNldF9hdChhSWR4KSB7XG4gIGlmIChhSWR4ID49IDAgJiYgYUlkeCA8IHRoaXMuX2FycmF5Lmxlbmd0aCkge1xuICAgIHJldHVybiB0aGlzLl9hcnJheVthSWR4XTtcbiAgfVxuICB0aHJvdyBuZXcgRXJyb3IoJ05vIGVsZW1lbnQgaW5kZXhlZCBieSAnICsgYUlkeCk7XG59O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIGFycmF5IHJlcHJlc2VudGF0aW9uIG9mIHRoaXMgc2V0ICh3aGljaCBoYXMgdGhlIHByb3BlciBpbmRpY2VzXG4gKiBpbmRpY2F0ZWQgYnkgaW5kZXhPZikuIE5vdGUgdGhhdCB0aGlzIGlzIGEgY29weSBvZiB0aGUgaW50ZXJuYWwgYXJyYXkgdXNlZFxuICogZm9yIHN0b3JpbmcgdGhlIG1lbWJlcnMgc28gdGhhdCBubyBvbmUgY2FuIG1lc3Mgd2l0aCBpbnRlcm5hbCBzdGF0ZS5cbiAqL1xuQXJyYXlTZXQucHJvdG90eXBlLnRvQXJyYXkgPSBmdW5jdGlvbiBBcnJheVNldF90b0FycmF5KCkge1xuICByZXR1cm4gdGhpcy5fYXJyYXkuc2xpY2UoKTtcbn07XG5cbmV4cG9ydHMuQXJyYXlTZXQgPSBBcnJheVNldDtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vbGliL2FycmF5LXNldC5qc1xuLy8gbW9kdWxlIGlkID0gNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTQgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciB1dGlsID0gcmVxdWlyZSgnLi91dGlsJyk7XG5cbi8qKlxuICogRGV0ZXJtaW5lIHdoZXRoZXIgbWFwcGluZ0IgaXMgYWZ0ZXIgbWFwcGluZ0Egd2l0aCByZXNwZWN0IHRvIGdlbmVyYXRlZFxuICogcG9zaXRpb24uXG4gKi9cbmZ1bmN0aW9uIGdlbmVyYXRlZFBvc2l0aW9uQWZ0ZXIobWFwcGluZ0EsIG1hcHBpbmdCKSB7XG4gIC8vIE9wdGltaXplZCBmb3IgbW9zdCBjb21tb24gY2FzZVxuICB2YXIgbGluZUEgPSBtYXBwaW5nQS5nZW5lcmF0ZWRMaW5lO1xuICB2YXIgbGluZUIgPSBtYXBwaW5nQi5nZW5lcmF0ZWRMaW5lO1xuICB2YXIgY29sdW1uQSA9IG1hcHBpbmdBLmdlbmVyYXRlZENvbHVtbjtcbiAgdmFyIGNvbHVtbkIgPSBtYXBwaW5nQi5nZW5lcmF0ZWRDb2x1bW47XG4gIHJldHVybiBsaW5lQiA+IGxpbmVBIHx8IGxpbmVCID09IGxpbmVBICYmIGNvbHVtbkIgPj0gY29sdW1uQSB8fFxuICAgICAgICAgdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZChtYXBwaW5nQSwgbWFwcGluZ0IpIDw9IDA7XG59XG5cbi8qKlxuICogQSBkYXRhIHN0cnVjdHVyZSB0byBwcm92aWRlIGEgc29ydGVkIHZpZXcgb2YgYWNjdW11bGF0ZWQgbWFwcGluZ3MgaW4gYVxuICogcGVyZm9ybWFuY2UgY29uc2Npb3VzIG1hbm5lci4gSXQgdHJhZGVzIGEgbmVnbGliYWJsZSBvdmVyaGVhZCBpbiBnZW5lcmFsXG4gKiBjYXNlIGZvciBhIGxhcmdlIHNwZWVkdXAgaW4gY2FzZSBvZiBtYXBwaW5ncyBiZWluZyBhZGRlZCBpbiBvcmRlci5cbiAqL1xuZnVuY3Rpb24gTWFwcGluZ0xpc3QoKSB7XG4gIHRoaXMuX2FycmF5ID0gW107XG4gIHRoaXMuX3NvcnRlZCA9IHRydWU7XG4gIC8vIFNlcnZlcyBhcyBpbmZpbXVtXG4gIHRoaXMuX2xhc3QgPSB7Z2VuZXJhdGVkTGluZTogLTEsIGdlbmVyYXRlZENvbHVtbjogMH07XG59XG5cbi8qKlxuICogSXRlcmF0ZSB0aHJvdWdoIGludGVybmFsIGl0ZW1zLiBUaGlzIG1ldGhvZCB0YWtlcyB0aGUgc2FtZSBhcmd1bWVudHMgdGhhdFxuICogYEFycmF5LnByb3RvdHlwZS5mb3JFYWNoYCB0YWtlcy5cbiAqXG4gKiBOT1RFOiBUaGUgb3JkZXIgb2YgdGhlIG1hcHBpbmdzIGlzIE5PVCBndWFyYW50ZWVkLlxuICovXG5NYXBwaW5nTGlzdC5wcm90b3R5cGUudW5zb3J0ZWRGb3JFYWNoID1cbiAgZnVuY3Rpb24gTWFwcGluZ0xpc3RfZm9yRWFjaChhQ2FsbGJhY2ssIGFUaGlzQXJnKSB7XG4gICAgdGhpcy5fYXJyYXkuZm9yRWFjaChhQ2FsbGJhY2ssIGFUaGlzQXJnKTtcbiAgfTtcblxuLyoqXG4gKiBBZGQgdGhlIGdpdmVuIHNvdXJjZSBtYXBwaW5nLlxuICpcbiAqIEBwYXJhbSBPYmplY3QgYU1hcHBpbmdcbiAqL1xuTWFwcGluZ0xpc3QucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIE1hcHBpbmdMaXN0X2FkZChhTWFwcGluZykge1xuICBpZiAoZ2VuZXJhdGVkUG9zaXRpb25BZnRlcih0aGlzLl9sYXN0LCBhTWFwcGluZykpIHtcbiAgICB0aGlzLl9sYXN0ID0gYU1hcHBpbmc7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhTWFwcGluZyk7XG4gIH0gZWxzZSB7XG4gICAgdGhpcy5fc29ydGVkID0gZmFsc2U7XG4gICAgdGhpcy5fYXJyYXkucHVzaChhTWFwcGluZyk7XG4gIH1cbn07XG5cbi8qKlxuICogUmV0dXJucyB0aGUgZmxhdCwgc29ydGVkIGFycmF5IG9mIG1hcHBpbmdzLiBUaGUgbWFwcGluZ3MgYXJlIHNvcnRlZCBieVxuICogZ2VuZXJhdGVkIHBvc2l0aW9uLlxuICpcbiAqIFdBUk5JTkc6IFRoaXMgbWV0aG9kIHJldHVybnMgaW50ZXJuYWwgZGF0YSB3aXRob3V0IGNvcHlpbmcsIGZvclxuICogcGVyZm9ybWFuY2UuIFRoZSByZXR1cm4gdmFsdWUgbXVzdCBOT1QgYmUgbXV0YXRlZCwgYW5kIHNob3VsZCBiZSB0cmVhdGVkIGFzXG4gKiBhbiBpbW11dGFibGUgYm9ycm93LiBJZiB5b3Ugd2FudCB0byB0YWtlIG93bmVyc2hpcCwgeW91IG11c3QgbWFrZSB5b3VyIG93blxuICogY29weS5cbiAqL1xuTWFwcGluZ0xpc3QucHJvdG90eXBlLnRvQXJyYXkgPSBmdW5jdGlvbiBNYXBwaW5nTGlzdF90b0FycmF5KCkge1xuICBpZiAoIXRoaXMuX3NvcnRlZCkge1xuICAgIHRoaXMuX2FycmF5LnNvcnQodXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZCk7XG4gICAgdGhpcy5fc29ydGVkID0gdHJ1ZTtcbiAgfVxuICByZXR1cm4gdGhpcy5fYXJyYXk7XG59O1xuXG5leHBvcnRzLk1hcHBpbmdMaXN0ID0gTWFwcGluZ0xpc3Q7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL2xpYi9tYXBwaW5nLWxpc3QuanNcbi8vIG1vZHVsZSBpZCA9IDZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLyogLSotIE1vZGU6IGpzOyBqcy1pbmRlbnQtbGV2ZWw6IDI7IC0qLSAqL1xuLypcbiAqIENvcHlyaWdodCAyMDExIE1vemlsbGEgRm91bmRhdGlvbiBhbmQgY29udHJpYnV0b3JzXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTmV3IEJTRCBsaWNlbnNlLiBTZWUgTElDRU5TRSBvcjpcbiAqIGh0dHA6Ly9vcGVuc291cmNlLm9yZy9saWNlbnNlcy9CU0QtMy1DbGF1c2VcbiAqL1xuXG52YXIgdXRpbCA9IHJlcXVpcmUoJy4vdXRpbCcpO1xudmFyIGJpbmFyeVNlYXJjaCA9IHJlcXVpcmUoJy4vYmluYXJ5LXNlYXJjaCcpO1xudmFyIEFycmF5U2V0ID0gcmVxdWlyZSgnLi9hcnJheS1zZXQnKS5BcnJheVNldDtcbnZhciBiYXNlNjRWTFEgPSByZXF1aXJlKCcuL2Jhc2U2NC12bHEnKTtcbnZhciBxdWlja1NvcnQgPSByZXF1aXJlKCcuL3F1aWNrLXNvcnQnKS5xdWlja1NvcnQ7XG5cbmZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyKGFTb3VyY2VNYXApIHtcbiAgdmFyIHNvdXJjZU1hcCA9IGFTb3VyY2VNYXA7XG4gIGlmICh0eXBlb2YgYVNvdXJjZU1hcCA9PT0gJ3N0cmluZycpIHtcbiAgICBzb3VyY2VNYXAgPSBKU09OLnBhcnNlKGFTb3VyY2VNYXAucmVwbGFjZSgvXlxcKVxcXVxcfScvLCAnJykpO1xuICB9XG5cbiAgcmV0dXJuIHNvdXJjZU1hcC5zZWN0aW9ucyAhPSBudWxsXG4gICAgPyBuZXcgSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcClcbiAgICA6IG5ldyBCYXNpY1NvdXJjZU1hcENvbnN1bWVyKHNvdXJjZU1hcCk7XG59XG5cblNvdXJjZU1hcENvbnN1bWVyLmZyb21Tb3VyY2VNYXAgPSBmdW5jdGlvbihhU291cmNlTWFwKSB7XG4gIHJldHVybiBCYXNpY1NvdXJjZU1hcENvbnN1bWVyLmZyb21Tb3VyY2VNYXAoYVNvdXJjZU1hcCk7XG59XG5cbi8qKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXBwaW5nIHNwZWMgdGhhdCB3ZSBhcmUgY29uc3VtaW5nLlxuICovXG5Tb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3ZlcnNpb24gPSAzO1xuXG4vLyBgX19nZW5lcmF0ZWRNYXBwaW5nc2AgYW5kIGBfX29yaWdpbmFsTWFwcGluZ3NgIGFyZSBhcnJheXMgdGhhdCBob2xkIHRoZVxuLy8gcGFyc2VkIG1hcHBpbmcgY29vcmRpbmF0ZXMgZnJvbSB0aGUgc291cmNlIG1hcCdzIFwibWFwcGluZ3NcIiBhdHRyaWJ1dGUuIFRoZXlcbi8vIGFyZSBsYXppbHkgaW5zdGFudGlhdGVkLCBhY2Nlc3NlZCB2aWEgdGhlIGBfZ2VuZXJhdGVkTWFwcGluZ3NgIGFuZFxuLy8gYF9vcmlnaW5hbE1hcHBpbmdzYCBnZXR0ZXJzIHJlc3BlY3RpdmVseSwgYW5kIHdlIG9ubHkgcGFyc2UgdGhlIG1hcHBpbmdzXG4vLyBhbmQgY3JlYXRlIHRoZXNlIGFycmF5cyBvbmNlIHF1ZXJpZWQgZm9yIGEgc291cmNlIGxvY2F0aW9uLiBXZSBqdW1wIHRocm91Z2hcbi8vIHRoZXNlIGhvb3BzIGJlY2F1c2UgdGhlcmUgY2FuIGJlIG1hbnkgdGhvdXNhbmRzIG9mIG1hcHBpbmdzLCBhbmQgcGFyc2luZ1xuLy8gdGhlbSBpcyBleHBlbnNpdmUsIHNvIHdlIG9ubHkgd2FudCB0byBkbyBpdCBpZiB3ZSBtdXN0LlxuLy9cbi8vIEVhY2ggb2JqZWN0IGluIHRoZSBhcnJheXMgaXMgb2YgdGhlIGZvcm06XG4vL1xuLy8gICAgIHtcbi8vICAgICAgIGdlbmVyYXRlZExpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIGNvZGUsXG4vLyAgICAgICBnZW5lcmF0ZWRDb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgY29kZSxcbi8vICAgICAgIHNvdXJjZTogVGhlIHBhdGggdG8gdGhlIG9yaWdpbmFsIHNvdXJjZSBmaWxlIHRoYXQgZ2VuZXJhdGVkIHRoaXNcbi8vICAgICAgICAgICAgICAgY2h1bmsgb2YgY29kZSxcbi8vICAgICAgIG9yaWdpbmFsTGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UgdGhhdFxuLy8gICAgICAgICAgICAgICAgICAgICBjb3JyZXNwb25kcyB0byB0aGlzIGNodW5rIG9mIGdlbmVyYXRlZCBjb2RlLFxuLy8gICAgICAgb3JpZ2luYWxDb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UgdGhhdFxuLy8gICAgICAgICAgICAgICAgICAgICAgIGNvcnJlc3BvbmRzIHRvIHRoaXMgY2h1bmsgb2YgZ2VuZXJhdGVkIGNvZGUsXG4vLyAgICAgICBuYW1lOiBUaGUgbmFtZSBvZiB0aGUgb3JpZ2luYWwgc3ltYm9sIHdoaWNoIGdlbmVyYXRlZCB0aGlzIGNodW5rIG9mXG4vLyAgICAgICAgICAgICBjb2RlLlxuLy8gICAgIH1cbi8vXG4vLyBBbGwgcHJvcGVydGllcyBleGNlcHQgZm9yIGBnZW5lcmF0ZWRMaW5lYCBhbmQgYGdlbmVyYXRlZENvbHVtbmAgY2FuIGJlXG4vLyBgbnVsbGAuXG4vL1xuLy8gYF9nZW5lcmF0ZWRNYXBwaW5nc2AgaXMgb3JkZXJlZCBieSB0aGUgZ2VuZXJhdGVkIHBvc2l0aW9ucy5cbi8vXG4vLyBgX29yaWdpbmFsTWFwcGluZ3NgIGlzIG9yZGVyZWQgYnkgdGhlIG9yaWdpbmFsIHBvc2l0aW9ucy5cblxuU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBudWxsO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSwgJ19nZW5lcmF0ZWRNYXBwaW5ncycsIHtcbiAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgaWYgKCF0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MpIHtcbiAgICAgIHRoaXMuX3BhcnNlTWFwcGluZ3ModGhpcy5fbWFwcGluZ3MsIHRoaXMuc291cmNlUm9vdCk7XG4gICAgfVxuXG4gICAgcmV0dXJuIHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5ncztcbiAgfVxufSk7XG5cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fX29yaWdpbmFsTWFwcGluZ3MgPSBudWxsO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSwgJ19vcmlnaW5hbE1hcHBpbmdzJywge1xuICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICBpZiAoIXRoaXMuX19vcmlnaW5hbE1hcHBpbmdzKSB7XG4gICAgICB0aGlzLl9wYXJzZU1hcHBpbmdzKHRoaXMuX21hcHBpbmdzLCB0aGlzLnNvdXJjZVJvb3QpO1xuICAgIH1cblxuICAgIHJldHVybiB0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncztcbiAgfVxufSk7XG5cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fY2hhcklzTWFwcGluZ1NlcGFyYXRvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2NoYXJJc01hcHBpbmdTZXBhcmF0b3IoYVN0ciwgaW5kZXgpIHtcbiAgICB2YXIgYyA9IGFTdHIuY2hhckF0KGluZGV4KTtcbiAgICByZXR1cm4gYyA9PT0gXCI7XCIgfHwgYyA9PT0gXCIsXCI7XG4gIH07XG5cbi8qKlxuICogUGFyc2UgdGhlIG1hcHBpbmdzIGluIGEgc3RyaW5nIGluIHRvIGEgZGF0YSBzdHJ1Y3R1cmUgd2hpY2ggd2UgY2FuIGVhc2lseVxuICogcXVlcnkgKHRoZSBvcmRlcmVkIGFycmF5cyBpbiB0aGUgYHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5nc2AgYW5kXG4gKiBgdGhpcy5fX29yaWdpbmFsTWFwcGluZ3NgIHByb3BlcnRpZXMpLlxuICovXG5Tb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9wYXJzZU1hcHBpbmdzKGFTdHIsIGFTb3VyY2VSb290KSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKFwiU3ViY2xhc3NlcyBtdXN0IGltcGxlbWVudCBfcGFyc2VNYXBwaW5nc1wiKTtcbiAgfTtcblxuU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSID0gMTtcblNvdXJjZU1hcENvbnN1bWVyLk9SSUdJTkFMX09SREVSID0gMjtcblxuU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQgPSAxO1xuU291cmNlTWFwQ29uc3VtZXIuTEVBU1RfVVBQRVJfQk9VTkQgPSAyO1xuXG4vKipcbiAqIEl0ZXJhdGUgb3ZlciBlYWNoIG1hcHBpbmcgYmV0d2VlbiBhbiBvcmlnaW5hbCBzb3VyY2UvbGluZS9jb2x1bW4gYW5kIGFcbiAqIGdlbmVyYXRlZCBsaW5lL2NvbHVtbiBpbiB0aGlzIHNvdXJjZSBtYXAuXG4gKlxuICogQHBhcmFtIEZ1bmN0aW9uIGFDYWxsYmFja1xuICogICAgICAgIFRoZSBmdW5jdGlvbiB0aGF0IGlzIGNhbGxlZCB3aXRoIGVhY2ggbWFwcGluZy5cbiAqIEBwYXJhbSBPYmplY3QgYUNvbnRleHRcbiAqICAgICAgICBPcHRpb25hbC4gSWYgc3BlY2lmaWVkLCB0aGlzIG9iamVjdCB3aWxsIGJlIHRoZSB2YWx1ZSBvZiBgdGhpc2AgZXZlcnlcbiAqICAgICAgICB0aW1lIHRoYXQgYGFDYWxsYmFja2AgaXMgY2FsbGVkLlxuICogQHBhcmFtIGFPcmRlclxuICogICAgICAgIEVpdGhlciBgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSYCBvclxuICogICAgICAgIGBTb3VyY2VNYXBDb25zdW1lci5PUklHSU5BTF9PUkRFUmAuIFNwZWNpZmllcyB3aGV0aGVyIHlvdSB3YW50IHRvXG4gKiAgICAgICAgaXRlcmF0ZSBvdmVyIHRoZSBtYXBwaW5ncyBzb3J0ZWQgYnkgdGhlIGdlbmVyYXRlZCBmaWxlJ3MgbGluZS9jb2x1bW5cbiAqICAgICAgICBvcmRlciBvciB0aGUgb3JpZ2luYWwncyBzb3VyY2UvbGluZS9jb2x1bW4gb3JkZXIsIHJlc3BlY3RpdmVseS4gRGVmYXVsdHMgdG9cbiAqICAgICAgICBgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSYC5cbiAqL1xuU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmVhY2hNYXBwaW5nID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfZWFjaE1hcHBpbmcoYUNhbGxiYWNrLCBhQ29udGV4dCwgYU9yZGVyKSB7XG4gICAgdmFyIGNvbnRleHQgPSBhQ29udGV4dCB8fCBudWxsO1xuICAgIHZhciBvcmRlciA9IGFPcmRlciB8fCBTb3VyY2VNYXBDb25zdW1lci5HRU5FUkFURURfT1JERVI7XG5cbiAgICB2YXIgbWFwcGluZ3M7XG4gICAgc3dpdGNoIChvcmRlcikge1xuICAgIGNhc2UgU291cmNlTWFwQ29uc3VtZXIuR0VORVJBVEVEX09SREVSOlxuICAgICAgbWFwcGluZ3MgPSB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5ncztcbiAgICAgIGJyZWFrO1xuICAgIGNhc2UgU291cmNlTWFwQ29uc3VtZXIuT1JJR0lOQUxfT1JERVI6XG4gICAgICBtYXBwaW5ncyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3M7XG4gICAgICBicmVhaztcbiAgICBkZWZhdWx0OlxuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiVW5rbm93biBvcmRlciBvZiBpdGVyYXRpb24uXCIpO1xuICAgIH1cblxuICAgIHZhciBzb3VyY2VSb290ID0gdGhpcy5zb3VyY2VSb290O1xuICAgIG1hcHBpbmdzLm1hcChmdW5jdGlvbiAobWFwcGluZykge1xuICAgICAgdmFyIHNvdXJjZSA9IG1hcHBpbmcuc291cmNlID09PSBudWxsID8gbnVsbCA6IHRoaXMuX3NvdXJjZXMuYXQobWFwcGluZy5zb3VyY2UpO1xuICAgICAgaWYgKHNvdXJjZSAhPSBudWxsICYmIHNvdXJjZVJvb3QgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4oc291cmNlUm9vdCwgc291cmNlKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiB7XG4gICAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgICBnZW5lcmF0ZWRMaW5lOiBtYXBwaW5nLmdlbmVyYXRlZExpbmUsXG4gICAgICAgIGdlbmVyYXRlZENvbHVtbjogbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4sXG4gICAgICAgIG9yaWdpbmFsTGluZTogbWFwcGluZy5vcmlnaW5hbExpbmUsXG4gICAgICAgIG9yaWdpbmFsQ29sdW1uOiBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uLFxuICAgICAgICBuYW1lOiBtYXBwaW5nLm5hbWUgPT09IG51bGwgPyBudWxsIDogdGhpcy5fbmFtZXMuYXQobWFwcGluZy5uYW1lKVxuICAgICAgfTtcbiAgICB9LCB0aGlzKS5mb3JFYWNoKGFDYWxsYmFjaywgY29udGV4dCk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJucyBhbGwgZ2VuZXJhdGVkIGxpbmUgYW5kIGNvbHVtbiBpbmZvcm1hdGlvbiBmb3IgdGhlIG9yaWdpbmFsIHNvdXJjZSxcbiAqIGxpbmUsIGFuZCBjb2x1bW4gcHJvdmlkZWQuIElmIG5vIGNvbHVtbiBpcyBwcm92aWRlZCwgcmV0dXJucyBhbGwgbWFwcGluZ3NcbiAqIGNvcnJlc3BvbmRpbmcgdG8gYSBlaXRoZXIgdGhlIGxpbmUgd2UgYXJlIHNlYXJjaGluZyBmb3Igb3IgdGhlIG5leHRcbiAqIGNsb3Nlc3QgbGluZSB0aGF0IGhhcyBhbnkgbWFwcGluZ3MuIE90aGVyd2lzZSwgcmV0dXJucyBhbGwgbWFwcGluZ3NcbiAqIGNvcnJlc3BvbmRpbmcgdG8gdGhlIGdpdmVuIGxpbmUgYW5kIGVpdGhlciB0aGUgY29sdW1uIHdlIGFyZSBzZWFyY2hpbmcgZm9yXG4gKiBvciB0aGUgbmV4dCBjbG9zZXN0IGNvbHVtbiB0aGF0IGhhcyBhbnkgb2Zmc2V0cy5cbiAqXG4gKiBUaGUgb25seSBhcmd1bWVudCBpcyBhbiBvYmplY3Qgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBPcHRpb25hbC4gdGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIG9yaWdpbmFsIHNvdXJjZS5cbiAqXG4gKiBhbmQgYW4gYXJyYXkgb2Ygb2JqZWN0cyBpcyByZXR1cm5lZCwgZWFjaCB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UsIG9yIG51bGwuXG4gKi9cblNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5hbGxHZW5lcmF0ZWRQb3NpdGlvbnNGb3IgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9hbGxHZW5lcmF0ZWRQb3NpdGlvbnNGb3IoYUFyZ3MpIHtcbiAgICB2YXIgbGluZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnbGluZScpO1xuXG4gICAgLy8gV2hlbiB0aGVyZSBpcyBubyBleGFjdCBtYXRjaCwgQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX2ZpbmRNYXBwaW5nXG4gICAgLy8gcmV0dXJucyB0aGUgaW5kZXggb2YgdGhlIGNsb3Nlc3QgbWFwcGluZyBsZXNzIHRoYW4gdGhlIG5lZWRsZS4gQnlcbiAgICAvLyBzZXR0aW5nIG5lZWRsZS5vcmlnaW5hbENvbHVtbiB0byAwLCB3ZSB0aHVzIGZpbmQgdGhlIGxhc3QgbWFwcGluZyBmb3JcbiAgICAvLyB0aGUgZ2l2ZW4gbGluZSwgcHJvdmlkZWQgc3VjaCBhIG1hcHBpbmcgZXhpc3RzLlxuICAgIHZhciBuZWVkbGUgPSB7XG4gICAgICBzb3VyY2U6IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJyksXG4gICAgICBvcmlnaW5hbExpbmU6IGxpbmUsXG4gICAgICBvcmlnaW5hbENvbHVtbjogdXRpbC5nZXRBcmcoYUFyZ3MsICdjb2x1bW4nLCAwKVxuICAgIH07XG5cbiAgICBpZiAodGhpcy5zb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgIG5lZWRsZS5zb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHRoaXMuc291cmNlUm9vdCwgbmVlZGxlLnNvdXJjZSk7XG4gICAgfVxuICAgIGlmICghdGhpcy5fc291cmNlcy5oYXMobmVlZGxlLnNvdXJjZSkpIHtcbiAgICAgIHJldHVybiBbXTtcbiAgICB9XG4gICAgbmVlZGxlLnNvdXJjZSA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihuZWVkbGUuc291cmNlKTtcblxuICAgIHZhciBtYXBwaW5ncyA9IFtdO1xuXG4gICAgdmFyIGluZGV4ID0gdGhpcy5fZmluZE1hcHBpbmcobmVlZGxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX29yaWdpbmFsTWFwcGluZ3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJvcmlnaW5hbExpbmVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9yaWdpbmFsQ29sdW1uXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXRpbC5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5hcnlTZWFyY2guTEVBU1RfVVBQRVJfQk9VTkQpO1xuICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3NbaW5kZXhdO1xuXG4gICAgICBpZiAoYUFyZ3MuY29sdW1uID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgdmFyIG9yaWdpbmFsTGluZSA9IG1hcHBpbmcub3JpZ2luYWxMaW5lO1xuXG4gICAgICAgIC8vIEl0ZXJhdGUgdW50aWwgZWl0aGVyIHdlIHJ1biBvdXQgb2YgbWFwcGluZ3MsIG9yIHdlIHJ1biBpbnRvXG4gICAgICAgIC8vIGEgbWFwcGluZyBmb3IgYSBkaWZmZXJlbnQgbGluZSB0aGFuIHRoZSBvbmUgd2UgZm91bmQuIFNpbmNlXG4gICAgICAgIC8vIG1hcHBpbmdzIGFyZSBzb3J0ZWQsIHRoaXMgaXMgZ3VhcmFudGVlZCB0byBmaW5kIGFsbCBtYXBwaW5ncyBmb3JcbiAgICAgICAgLy8gdGhlIGxpbmUgd2UgZm91bmQuXG4gICAgICAgIHdoaWxlIChtYXBwaW5nICYmIG1hcHBpbmcub3JpZ2luYWxMaW5lID09PSBvcmlnaW5hbExpbmUpIHtcbiAgICAgICAgICBtYXBwaW5ncy5wdXNoKHtcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRMaW5lJywgbnVsbCksXG4gICAgICAgICAgICBjb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRDb2x1bW4nLCBudWxsKSxcbiAgICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIG1hcHBpbmcgPSB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzWysraW5kZXhdO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgb3JpZ2luYWxDb2x1bW4gPSBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uO1xuXG4gICAgICAgIC8vIEl0ZXJhdGUgdW50aWwgZWl0aGVyIHdlIHJ1biBvdXQgb2YgbWFwcGluZ3MsIG9yIHdlIHJ1biBpbnRvXG4gICAgICAgIC8vIGEgbWFwcGluZyBmb3IgYSBkaWZmZXJlbnQgbGluZSB0aGFuIHRoZSBvbmUgd2Ugd2VyZSBzZWFyY2hpbmcgZm9yLlxuICAgICAgICAvLyBTaW5jZSBtYXBwaW5ncyBhcmUgc29ydGVkLCB0aGlzIGlzIGd1YXJhbnRlZWQgdG8gZmluZCBhbGwgbWFwcGluZ3MgZm9yXG4gICAgICAgIC8vIHRoZSBsaW5lIHdlIGFyZSBzZWFyY2hpbmcgZm9yLlxuICAgICAgICB3aGlsZSAobWFwcGluZyAmJlxuICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09IGxpbmUgJiZcbiAgICAgICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxDb2x1bW4gPT0gb3JpZ2luYWxDb2x1bW4pIHtcbiAgICAgICAgICBtYXBwaW5ncy5wdXNoKHtcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRMaW5lJywgbnVsbCksXG4gICAgICAgICAgICBjb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdnZW5lcmF0ZWRDb2x1bW4nLCBudWxsKSxcbiAgICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIG1hcHBpbmcgPSB0aGlzLl9vcmlnaW5hbE1hcHBpbmdzWysraW5kZXhdO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIG1hcHBpbmdzO1xuICB9O1xuXG5leHBvcnRzLlNvdXJjZU1hcENvbnN1bWVyID0gU291cmNlTWFwQ29uc3VtZXI7XG5cbi8qKlxuICogQSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyIGluc3RhbmNlIHJlcHJlc2VudHMgYSBwYXJzZWQgc291cmNlIG1hcCB3aGljaCB3ZSBjYW5cbiAqIHF1ZXJ5IGZvciBpbmZvcm1hdGlvbiBhYm91dCB0aGUgb3JpZ2luYWwgZmlsZSBwb3NpdGlvbnMgYnkgZ2l2aW5nIGl0IGEgZmlsZVxuICogcG9zaXRpb24gaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UuXG4gKlxuICogVGhlIG9ubHkgcGFyYW1ldGVyIGlzIHRoZSByYXcgc291cmNlIG1hcCAoZWl0aGVyIGFzIGEgSlNPTiBzdHJpbmcsIG9yXG4gKiBhbHJlYWR5IHBhcnNlZCB0byBhbiBvYmplY3QpLiBBY2NvcmRpbmcgdG8gdGhlIHNwZWMsIHNvdXJjZSBtYXBzIGhhdmUgdGhlXG4gKiBmb2xsb3dpbmcgYXR0cmlidXRlczpcbiAqXG4gKiAgIC0gdmVyc2lvbjogV2hpY2ggdmVyc2lvbiBvZiB0aGUgc291cmNlIG1hcCBzcGVjIHRoaXMgbWFwIGlzIGZvbGxvd2luZy5cbiAqICAgLSBzb3VyY2VzOiBBbiBhcnJheSBvZiBVUkxzIHRvIHRoZSBvcmlnaW5hbCBzb3VyY2UgZmlsZXMuXG4gKiAgIC0gbmFtZXM6IEFuIGFycmF5IG9mIGlkZW50aWZpZXJzIHdoaWNoIGNhbiBiZSByZWZlcnJlbmNlZCBieSBpbmRpdmlkdWFsIG1hcHBpbmdzLlxuICogICAtIHNvdXJjZVJvb3Q6IE9wdGlvbmFsLiBUaGUgVVJMIHJvb3QgZnJvbSB3aGljaCBhbGwgc291cmNlcyBhcmUgcmVsYXRpdmUuXG4gKiAgIC0gc291cmNlc0NvbnRlbnQ6IE9wdGlvbmFsLiBBbiBhcnJheSBvZiBjb250ZW50cyBvZiB0aGUgb3JpZ2luYWwgc291cmNlIGZpbGVzLlxuICogICAtIG1hcHBpbmdzOiBBIHN0cmluZyBvZiBiYXNlNjQgVkxRcyB3aGljaCBjb250YWluIHRoZSBhY3R1YWwgbWFwcGluZ3MuXG4gKiAgIC0gZmlsZTogT3B0aW9uYWwuIFRoZSBnZW5lcmF0ZWQgZmlsZSB0aGlzIHNvdXJjZSBtYXAgaXMgYXNzb2NpYXRlZCB3aXRoLlxuICpcbiAqIEhlcmUgaXMgYW4gZXhhbXBsZSBzb3VyY2UgbWFwLCB0YWtlbiBmcm9tIHRoZSBzb3VyY2UgbWFwIHNwZWNbMF06XG4gKlxuICogICAgIHtcbiAqICAgICAgIHZlcnNpb24gOiAzLFxuICogICAgICAgZmlsZTogXCJvdXQuanNcIixcbiAqICAgICAgIHNvdXJjZVJvb3QgOiBcIlwiLFxuICogICAgICAgc291cmNlczogW1wiZm9vLmpzXCIsIFwiYmFyLmpzXCJdLFxuICogICAgICAgbmFtZXM6IFtcInNyY1wiLCBcIm1hcHNcIiwgXCJhcmVcIiwgXCJmdW5cIl0sXG4gKiAgICAgICBtYXBwaW5nczogXCJBQSxBQjs7QUJDREU7XCJcbiAqICAgICB9XG4gKlxuICogWzBdOiBodHRwczovL2RvY3MuZ29vZ2xlLmNvbS9kb2N1bWVudC9kLzFVMVJHQWVoUXdSeXBVVG92RjFLUmxwaU9GemUwYi1fMmdjNmZBSDBLWTBrL2VkaXQ/cGxpPTEjXG4gKi9cbmZ1bmN0aW9uIEJhc2ljU291cmNlTWFwQ29uc3VtZXIoYVNvdXJjZU1hcCkge1xuICB2YXIgc291cmNlTWFwID0gYVNvdXJjZU1hcDtcbiAgaWYgKHR5cGVvZiBhU291cmNlTWFwID09PSAnc3RyaW5nJykge1xuICAgIHNvdXJjZU1hcCA9IEpTT04ucGFyc2UoYVNvdXJjZU1hcC5yZXBsYWNlKC9eXFwpXFxdXFx9Jy8sICcnKSk7XG4gIH1cblxuICB2YXIgdmVyc2lvbiA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ3ZlcnNpb24nKTtcbiAgdmFyIHNvdXJjZXMgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdzb3VyY2VzJyk7XG4gIC8vIFNhc3MgMy4zIGxlYXZlcyBvdXQgdGhlICduYW1lcycgYXJyYXksIHNvIHdlIGRldmlhdGUgZnJvbSB0aGUgc3BlYyAod2hpY2hcbiAgLy8gcmVxdWlyZXMgdGhlIGFycmF5KSB0byBwbGF5IG5pY2UgaGVyZS5cbiAgdmFyIG5hbWVzID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnbmFtZXMnLCBbXSk7XG4gIHZhciBzb3VyY2VSb290ID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnc291cmNlUm9vdCcsIG51bGwpO1xuICB2YXIgc291cmNlc0NvbnRlbnQgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdzb3VyY2VzQ29udGVudCcsIG51bGwpO1xuICB2YXIgbWFwcGluZ3MgPSB1dGlsLmdldEFyZyhzb3VyY2VNYXAsICdtYXBwaW5ncycpO1xuICB2YXIgZmlsZSA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ2ZpbGUnLCBudWxsKTtcblxuICAvLyBPbmNlIGFnYWluLCBTYXNzIGRldmlhdGVzIGZyb20gdGhlIHNwZWMgYW5kIHN1cHBsaWVzIHRoZSB2ZXJzaW9uIGFzIGFcbiAgLy8gc3RyaW5nIHJhdGhlciB0aGFuIGEgbnVtYmVyLCBzbyB3ZSB1c2UgbG9vc2UgZXF1YWxpdHkgY2hlY2tpbmcgaGVyZS5cbiAgaWYgKHZlcnNpb24gIT0gdGhpcy5fdmVyc2lvbikge1xuICAgIHRocm93IG5ldyBFcnJvcignVW5zdXBwb3J0ZWQgdmVyc2lvbjogJyArIHZlcnNpb24pO1xuICB9XG5cbiAgc291cmNlcyA9IHNvdXJjZXNcbiAgICAubWFwKFN0cmluZylcbiAgICAvLyBTb21lIHNvdXJjZSBtYXBzIHByb2R1Y2UgcmVsYXRpdmUgc291cmNlIHBhdGhzIGxpa2UgXCIuL2Zvby5qc1wiIGluc3RlYWQgb2ZcbiAgICAvLyBcImZvby5qc1wiLiAgTm9ybWFsaXplIHRoZXNlIGZpcnN0IHNvIHRoYXQgZnV0dXJlIGNvbXBhcmlzb25zIHdpbGwgc3VjY2VlZC5cbiAgICAvLyBTZWUgYnVnemlsLmxhLzEwOTA3NjguXG4gICAgLm1hcCh1dGlsLm5vcm1hbGl6ZSlcbiAgICAvLyBBbHdheXMgZW5zdXJlIHRoYXQgYWJzb2x1dGUgc291cmNlcyBhcmUgaW50ZXJuYWxseSBzdG9yZWQgcmVsYXRpdmUgdG9cbiAgICAvLyB0aGUgc291cmNlIHJvb3QsIGlmIHRoZSBzb3VyY2Ugcm9vdCBpcyBhYnNvbHV0ZS4gTm90IGRvaW5nIHRoaXMgd291bGRcbiAgICAvLyBiZSBwYXJ0aWN1bGFybHkgcHJvYmxlbWF0aWMgd2hlbiB0aGUgc291cmNlIHJvb3QgaXMgYSBwcmVmaXggb2YgdGhlXG4gICAgLy8gc291cmNlICh2YWxpZCwgYnV0IHdoeT8/KS4gU2VlIGdpdGh1YiBpc3N1ZSAjMTk5IGFuZCBidWd6aWwubGEvMTE4ODk4Mi5cbiAgICAubWFwKGZ1bmN0aW9uIChzb3VyY2UpIHtcbiAgICAgIHJldHVybiBzb3VyY2VSb290ICYmIHV0aWwuaXNBYnNvbHV0ZShzb3VyY2VSb290KSAmJiB1dGlsLmlzQWJzb2x1dGUoc291cmNlKVxuICAgICAgICA/IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgc291cmNlKVxuICAgICAgICA6IHNvdXJjZTtcbiAgICB9KTtcblxuICAvLyBQYXNzIGB0cnVlYCBiZWxvdyB0byBhbGxvdyBkdXBsaWNhdGUgbmFtZXMgYW5kIHNvdXJjZXMuIFdoaWxlIHNvdXJjZSBtYXBzXG4gIC8vIGFyZSBpbnRlbmRlZCB0byBiZSBjb21wcmVzc2VkIGFuZCBkZWR1cGxpY2F0ZWQsIHRoZSBUeXBlU2NyaXB0IGNvbXBpbGVyXG4gIC8vIHNvbWV0aW1lcyBnZW5lcmF0ZXMgc291cmNlIG1hcHMgd2l0aCBkdXBsaWNhdGVzIGluIHRoZW0uIFNlZSBHaXRodWIgaXNzdWVcbiAgLy8gIzcyIGFuZCBidWd6aWwubGEvODg5NDkyLlxuICB0aGlzLl9uYW1lcyA9IEFycmF5U2V0LmZyb21BcnJheShuYW1lcy5tYXAoU3RyaW5nKSwgdHJ1ZSk7XG4gIHRoaXMuX3NvdXJjZXMgPSBBcnJheVNldC5mcm9tQXJyYXkoc291cmNlcywgdHJ1ZSk7XG5cbiAgdGhpcy5zb3VyY2VSb290ID0gc291cmNlUm9vdDtcbiAgdGhpcy5zb3VyY2VzQ29udGVudCA9IHNvdXJjZXNDb250ZW50O1xuICB0aGlzLl9tYXBwaW5ncyA9IG1hcHBpbmdzO1xuICB0aGlzLmZpbGUgPSBmaWxlO1xufVxuXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUoU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlKTtcbkJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmNvbnN1bWVyID0gU291cmNlTWFwQ29uc3VtZXI7XG5cbi8qKlxuICogQ3JlYXRlIGEgQmFzaWNTb3VyY2VNYXBDb25zdW1lciBmcm9tIGEgU291cmNlTWFwR2VuZXJhdG9yLlxuICpcbiAqIEBwYXJhbSBTb3VyY2VNYXBHZW5lcmF0b3IgYVNvdXJjZU1hcFxuICogICAgICAgIFRoZSBzb3VyY2UgbWFwIHRoYXQgd2lsbCBiZSBjb25zdW1lZC5cbiAqIEByZXR1cm5zIEJhc2ljU291cmNlTWFwQ29uc3VtZXJcbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5mcm9tU291cmNlTWFwID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfZnJvbVNvdXJjZU1hcChhU291cmNlTWFwKSB7XG4gICAgdmFyIHNtYyA9IE9iamVjdC5jcmVhdGUoQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUpO1xuXG4gICAgdmFyIG5hbWVzID0gc21jLl9uYW1lcyA9IEFycmF5U2V0LmZyb21BcnJheShhU291cmNlTWFwLl9uYW1lcy50b0FycmF5KCksIHRydWUpO1xuICAgIHZhciBzb3VyY2VzID0gc21jLl9zb3VyY2VzID0gQXJyYXlTZXQuZnJvbUFycmF5KGFTb3VyY2VNYXAuX3NvdXJjZXMudG9BcnJheSgpLCB0cnVlKTtcbiAgICBzbWMuc291cmNlUm9vdCA9IGFTb3VyY2VNYXAuX3NvdXJjZVJvb3Q7XG4gICAgc21jLnNvdXJjZXNDb250ZW50ID0gYVNvdXJjZU1hcC5fZ2VuZXJhdGVTb3VyY2VzQ29udGVudChzbWMuX3NvdXJjZXMudG9BcnJheSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc21jLnNvdXJjZVJvb3QpO1xuICAgIHNtYy5maWxlID0gYVNvdXJjZU1hcC5fZmlsZTtcblxuICAgIC8vIEJlY2F1c2Ugd2UgYXJlIG1vZGlmeWluZyB0aGUgZW50cmllcyAoYnkgY29udmVydGluZyBzdHJpbmcgc291cmNlcyBhbmRcbiAgICAvLyBuYW1lcyB0byBpbmRpY2VzIGludG8gdGhlIHNvdXJjZXMgYW5kIG5hbWVzIEFycmF5U2V0cyksIHdlIGhhdmUgdG8gbWFrZVxuICAgIC8vIGEgY29weSBvZiB0aGUgZW50cnkgb3IgZWxzZSBiYWQgdGhpbmdzIGhhcHBlbi4gU2hhcmVkIG11dGFibGUgc3RhdGVcbiAgICAvLyBzdHJpa2VzIGFnYWluISBTZWUgZ2l0aHViIGlzc3VlICMxOTEuXG5cbiAgICB2YXIgZ2VuZXJhdGVkTWFwcGluZ3MgPSBhU291cmNlTWFwLl9tYXBwaW5ncy50b0FycmF5KCkuc2xpY2UoKTtcbiAgICB2YXIgZGVzdEdlbmVyYXRlZE1hcHBpbmdzID0gc21jLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBbXTtcbiAgICB2YXIgZGVzdE9yaWdpbmFsTWFwcGluZ3MgPSBzbWMuX19vcmlnaW5hbE1hcHBpbmdzID0gW107XG5cbiAgICBmb3IgKHZhciBpID0gMCwgbGVuZ3RoID0gZ2VuZXJhdGVkTWFwcGluZ3MubGVuZ3RoOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgIHZhciBzcmNNYXBwaW5nID0gZ2VuZXJhdGVkTWFwcGluZ3NbaV07XG4gICAgICB2YXIgZGVzdE1hcHBpbmcgPSBuZXcgTWFwcGluZztcbiAgICAgIGRlc3RNYXBwaW5nLmdlbmVyYXRlZExpbmUgPSBzcmNNYXBwaW5nLmdlbmVyYXRlZExpbmU7XG4gICAgICBkZXN0TWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4gPSBzcmNNYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgaWYgKHNyY01hcHBpbmcuc291cmNlKSB7XG4gICAgICAgIGRlc3RNYXBwaW5nLnNvdXJjZSA9IHNvdXJjZXMuaW5kZXhPZihzcmNNYXBwaW5nLnNvdXJjZSk7XG4gICAgICAgIGRlc3RNYXBwaW5nLm9yaWdpbmFsTGluZSA9IHNyY01hcHBpbmcub3JpZ2luYWxMaW5lO1xuICAgICAgICBkZXN0TWFwcGluZy5vcmlnaW5hbENvbHVtbiA9IHNyY01hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgaWYgKHNyY01hcHBpbmcubmFtZSkge1xuICAgICAgICAgIGRlc3RNYXBwaW5nLm5hbWUgPSBuYW1lcy5pbmRleE9mKHNyY01hcHBpbmcubmFtZSk7XG4gICAgICAgIH1cblxuICAgICAgICBkZXN0T3JpZ2luYWxNYXBwaW5ncy5wdXNoKGRlc3RNYXBwaW5nKTtcbiAgICAgIH1cblxuICAgICAgZGVzdEdlbmVyYXRlZE1hcHBpbmdzLnB1c2goZGVzdE1hcHBpbmcpO1xuICAgIH1cblxuICAgIHF1aWNrU29ydChzbWMuX19vcmlnaW5hbE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zKTtcblxuICAgIHJldHVybiBzbWM7XG4gIH07XG5cbi8qKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXBwaW5nIHNwZWMgdGhhdCB3ZSBhcmUgY29uc3VtaW5nLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogVGhlIGxpc3Qgb2Ygb3JpZ2luYWwgc291cmNlcy5cbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KEJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLCAnc291cmNlcycsIHtcbiAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgcmV0dXJuIHRoaXMuX3NvdXJjZXMudG9BcnJheSgpLm1hcChmdW5jdGlvbiAocykge1xuICAgICAgcmV0dXJuIHRoaXMuc291cmNlUm9vdCAhPSBudWxsID8gdXRpbC5qb2luKHRoaXMuc291cmNlUm9vdCwgcykgOiBzO1xuICAgIH0sIHRoaXMpO1xuICB9XG59KTtcblxuLyoqXG4gKiBQcm92aWRlIHRoZSBKSVQgd2l0aCBhIG5pY2Ugc2hhcGUgLyBoaWRkZW4gY2xhc3MuXG4gKi9cbmZ1bmN0aW9uIE1hcHBpbmcoKSB7XG4gIHRoaXMuZ2VuZXJhdGVkTGluZSA9IDA7XG4gIHRoaXMuZ2VuZXJhdGVkQ29sdW1uID0gMDtcbiAgdGhpcy5zb3VyY2UgPSBudWxsO1xuICB0aGlzLm9yaWdpbmFsTGluZSA9IG51bGw7XG4gIHRoaXMub3JpZ2luYWxDb2x1bW4gPSBudWxsO1xuICB0aGlzLm5hbWUgPSBudWxsO1xufVxuXG4vKipcbiAqIFBhcnNlIHRoZSBtYXBwaW5ncyBpbiBhIHN0cmluZyBpbiB0byBhIGRhdGEgc3RydWN0dXJlIHdoaWNoIHdlIGNhbiBlYXNpbHlcbiAqIHF1ZXJ5ICh0aGUgb3JkZXJlZCBhcnJheXMgaW4gdGhlIGB0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3NgIGFuZFxuICogYHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzYCBwcm9wZXJ0aWVzKS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9wYXJzZU1hcHBpbmdzKGFTdHIsIGFTb3VyY2VSb290KSB7XG4gICAgdmFyIGdlbmVyYXRlZExpbmUgPSAxO1xuICAgIHZhciBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IDA7XG4gICAgdmFyIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gMDtcbiAgICB2YXIgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IDA7XG4gICAgdmFyIHByZXZpb3VzU291cmNlID0gMDtcbiAgICB2YXIgcHJldmlvdXNOYW1lID0gMDtcbiAgICB2YXIgbGVuZ3RoID0gYVN0ci5sZW5ndGg7XG4gICAgdmFyIGluZGV4ID0gMDtcbiAgICB2YXIgY2FjaGVkU2VnbWVudHMgPSB7fTtcbiAgICB2YXIgdGVtcCA9IHt9O1xuICAgIHZhciBvcmlnaW5hbE1hcHBpbmdzID0gW107XG4gICAgdmFyIGdlbmVyYXRlZE1hcHBpbmdzID0gW107XG4gICAgdmFyIG1hcHBpbmcsIHN0ciwgc2VnbWVudCwgZW5kLCB2YWx1ZTtcblxuICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkge1xuICAgICAgaWYgKGFTdHIuY2hhckF0KGluZGV4KSA9PT0gJzsnKSB7XG4gICAgICAgIGdlbmVyYXRlZExpbmUrKztcbiAgICAgICAgaW5kZXgrKztcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuICAgICAgfVxuICAgICAgZWxzZSBpZiAoYVN0ci5jaGFyQXQoaW5kZXgpID09PSAnLCcpIHtcbiAgICAgICAgaW5kZXgrKztcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICBtYXBwaW5nID0gbmV3IE1hcHBpbmcoKTtcbiAgICAgICAgbWFwcGluZy5nZW5lcmF0ZWRMaW5lID0gZ2VuZXJhdGVkTGluZTtcblxuICAgICAgICAvLyBCZWNhdXNlIGVhY2ggb2Zmc2V0IGlzIGVuY29kZWQgcmVsYXRpdmUgdG8gdGhlIHByZXZpb3VzIG9uZSxcbiAgICAgICAgLy8gbWFueSBzZWdtZW50cyBvZnRlbiBoYXZlIHRoZSBzYW1lIGVuY29kaW5nLiBXZSBjYW4gZXhwbG9pdCB0aGlzXG4gICAgICAgIC8vIGZhY3QgYnkgY2FjaGluZyB0aGUgcGFyc2VkIHZhcmlhYmxlIGxlbmd0aCBmaWVsZHMgb2YgZWFjaCBzZWdtZW50LFxuICAgICAgICAvLyBhbGxvd2luZyB1cyB0byBhdm9pZCBhIHNlY29uZCBwYXJzZSBpZiB3ZSBlbmNvdW50ZXIgdGhlIHNhbWVcbiAgICAgICAgLy8gc2VnbWVudCBhZ2Fpbi5cbiAgICAgICAgZm9yIChlbmQgPSBpbmRleDsgZW5kIDwgbGVuZ3RoOyBlbmQrKykge1xuICAgICAgICAgIGlmICh0aGlzLl9jaGFySXNNYXBwaW5nU2VwYXJhdG9yKGFTdHIsIGVuZCkpIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzdHIgPSBhU3RyLnNsaWNlKGluZGV4LCBlbmQpO1xuXG4gICAgICAgIHNlZ21lbnQgPSBjYWNoZWRTZWdtZW50c1tzdHJdO1xuICAgICAgICBpZiAoc2VnbWVudCkge1xuICAgICAgICAgIGluZGV4ICs9IHN0ci5sZW5ndGg7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc2VnbWVudCA9IFtdO1xuICAgICAgICAgIHdoaWxlIChpbmRleCA8IGVuZCkge1xuICAgICAgICAgICAgYmFzZTY0VkxRLmRlY29kZShhU3RyLCBpbmRleCwgdGVtcCk7XG4gICAgICAgICAgICB2YWx1ZSA9IHRlbXAudmFsdWU7XG4gICAgICAgICAgICBpbmRleCA9IHRlbXAucmVzdDtcbiAgICAgICAgICAgIHNlZ21lbnQucHVzaCh2YWx1ZSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAyKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlLCBidXQgbm8gbGluZSBhbmQgY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAzKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIGEgc291cmNlIGFuZCBsaW5lLCBidXQgbm8gY29sdW1uJyk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY2FjaGVkU2VnbWVudHNbc3RyXSA9IHNlZ21lbnQ7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBHZW5lcmF0ZWQgY29sdW1uLlxuICAgICAgICBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiA9IHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uICsgc2VnbWVudFswXTtcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgLy8gT3JpZ2luYWwgc291cmNlLlxuICAgICAgICAgIG1hcHBpbmcuc291cmNlID0gcHJldmlvdXNTb3VyY2UgKyBzZWdtZW50WzFdO1xuICAgICAgICAgIHByZXZpb3VzU291cmNlICs9IHNlZ21lbnRbMV07XG5cbiAgICAgICAgICAvLyBPcmlnaW5hbCBsaW5lLlxuICAgICAgICAgIG1hcHBpbmcub3JpZ2luYWxMaW5lID0gcHJldmlvdXNPcmlnaW5hbExpbmUgKyBzZWdtZW50WzJdO1xuICAgICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmU7XG4gICAgICAgICAgLy8gTGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkXG4gICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgKz0gMTtcblxuICAgICAgICAgIC8vIE9yaWdpbmFsIGNvbHVtbi5cbiAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uID0gcHJldmlvdXNPcmlnaW5hbENvbHVtbiArIHNlZ21lbnRbM107XG4gICAgICAgICAgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IG1hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgICBpZiAoc2VnbWVudC5sZW5ndGggPiA0KSB7XG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBuYW1lLlxuICAgICAgICAgICAgbWFwcGluZy5uYW1lID0gcHJldmlvdXNOYW1lICsgc2VnbWVudFs0XTtcbiAgICAgICAgICAgIHByZXZpb3VzTmFtZSArPSBzZWdtZW50WzRdO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGdlbmVyYXRlZE1hcHBpbmdzLnB1c2gobWFwcGluZyk7XG4gICAgICAgIGlmICh0eXBlb2YgbWFwcGluZy5vcmlnaW5hbExpbmUgPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgb3JpZ2luYWxNYXBwaW5ncy5wdXNoKG1hcHBpbmcpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgcXVpY2tTb3J0KGdlbmVyYXRlZE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeUdlbmVyYXRlZFBvc2l0aW9uc0RlZmxhdGVkKTtcbiAgICB0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MgPSBnZW5lcmF0ZWRNYXBwaW5ncztcblxuICAgIHF1aWNrU29ydChvcmlnaW5hbE1hcHBpbmdzLCB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zKTtcbiAgICB0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncyA9IG9yaWdpbmFsTWFwcGluZ3M7XG4gIH07XG5cbi8qKlxuICogRmluZCB0aGUgbWFwcGluZyB0aGF0IGJlc3QgbWF0Y2hlcyB0aGUgaHlwb3RoZXRpY2FsIFwibmVlZGxlXCIgbWFwcGluZyB0aGF0XG4gKiB3ZSBhcmUgc2VhcmNoaW5nIGZvciBpbiB0aGUgZ2l2ZW4gXCJoYXlzdGFja1wiIG9mIG1hcHBpbmdzLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fZmluZE1hcHBpbmcgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBDb25zdW1lcl9maW5kTWFwcGluZyhhTmVlZGxlLCBhTWFwcGluZ3MsIGFMaW5lTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYUNvbHVtbk5hbWUsIGFDb21wYXJhdG9yLCBhQmlhcykge1xuICAgIC8vIFRvIHJldHVybiB0aGUgcG9zaXRpb24gd2UgYXJlIHNlYXJjaGluZyBmb3IsIHdlIG11c3QgZmlyc3QgZmluZCB0aGVcbiAgICAvLyBtYXBwaW5nIGZvciB0aGUgZ2l2ZW4gcG9zaXRpb24gYW5kIHRoZW4gcmV0dXJuIHRoZSBvcHBvc2l0ZSBwb3NpdGlvbiBpdFxuICAgIC8vIHBvaW50cyB0by4gQmVjYXVzZSB0aGUgbWFwcGluZ3MgYXJlIHNvcnRlZCwgd2UgY2FuIHVzZSBiaW5hcnkgc2VhcmNoIHRvXG4gICAgLy8gZmluZCB0aGUgYmVzdCBtYXBwaW5nLlxuXG4gICAgaWYgKGFOZWVkbGVbYUxpbmVOYW1lXSA8PSAwKSB7XG4gICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdMaW5lIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIDEsIGdvdCAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICsgYU5lZWRsZVthTGluZU5hbWVdKTtcbiAgICB9XG4gICAgaWYgKGFOZWVkbGVbYUNvbHVtbk5hbWVdIDwgMCkge1xuICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcignQ29sdW1uIG11c3QgYmUgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIDAsIGdvdCAnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICsgYU5lZWRsZVthQ29sdW1uTmFtZV0pO1xuICAgIH1cblxuICAgIHJldHVybiBiaW5hcnlTZWFyY2guc2VhcmNoKGFOZWVkbGUsIGFNYXBwaW5ncywgYUNvbXBhcmF0b3IsIGFCaWFzKTtcbiAgfTtcblxuLyoqXG4gKiBDb21wdXRlIHRoZSBsYXN0IGNvbHVtbiBmb3IgZWFjaCBnZW5lcmF0ZWQgbWFwcGluZy4gVGhlIGxhc3QgY29sdW1uIGlzXG4gKiBpbmNsdXNpdmUuXG4gKi9cbkJhc2ljU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmNvbXB1dGVDb2x1bW5TcGFucyA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2NvbXB1dGVDb2x1bW5TcGFucygpIHtcbiAgICBmb3IgKHZhciBpbmRleCA9IDA7IGluZGV4IDwgdGhpcy5fZ2VuZXJhdGVkTWFwcGluZ3MubGVuZ3RoOyArK2luZGV4KSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX2dlbmVyYXRlZE1hcHBpbmdzW2luZGV4XTtcblxuICAgICAgLy8gTWFwcGluZ3MgZG8gbm90IGNvbnRhaW4gYSBmaWVsZCBmb3IgdGhlIGxhc3QgZ2VuZXJhdGVkIGNvbHVtbnQuIFdlXG4gICAgICAvLyBjYW4gY29tZSB1cCB3aXRoIGFuIG9wdGltaXN0aWMgZXN0aW1hdGUsIGhvd2V2ZXIsIGJ5IGFzc3VtaW5nIHRoYXRcbiAgICAgIC8vIG1hcHBpbmdzIGFyZSBjb250aWd1b3VzIChpLmUuIGdpdmVuIHR3byBjb25zZWN1dGl2ZSBtYXBwaW5ncywgdGhlXG4gICAgICAvLyBmaXJzdCBtYXBwaW5nIGVuZHMgd2hlcmUgdGhlIHNlY29uZCBvbmUgc3RhcnRzKS5cbiAgICAgIGlmIChpbmRleCArIDEgPCB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5ncy5sZW5ndGgpIHtcbiAgICAgICAgdmFyIG5leHRNYXBwaW5nID0gdGhpcy5fZ2VuZXJhdGVkTWFwcGluZ3NbaW5kZXggKyAxXTtcblxuICAgICAgICBpZiAobWFwcGluZy5nZW5lcmF0ZWRMaW5lID09PSBuZXh0TWFwcGluZy5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgbWFwcGluZy5sYXN0R2VuZXJhdGVkQ29sdW1uID0gbmV4dE1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uIC0gMTtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyBUaGUgbGFzdCBtYXBwaW5nIGZvciBlYWNoIGxpbmUgc3BhbnMgdGhlIGVudGlyZSBsaW5lLlxuICAgICAgbWFwcGluZy5sYXN0R2VuZXJhdGVkQ29sdW1uID0gSW5maW5pdHk7XG4gICAgfVxuICB9O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIG9yaWdpbmFsIHNvdXJjZSwgbGluZSwgYW5kIGNvbHVtbiBpbmZvcm1hdGlvbiBmb3IgdGhlIGdlbmVyYXRlZFxuICogc291cmNlJ3MgbGluZSBhbmQgY29sdW1uIHBvc2l0aW9ucyBwcm92aWRlZC4gVGhlIG9ubHkgYXJndW1lbnQgaXMgYW4gb2JqZWN0XG4gKiB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIGdlbmVyYXRlZCBzb3VyY2UuXG4gKiAgIC0gYmlhczogRWl0aGVyICdTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORCcgb3JcbiAqICAgICAnU291cmNlTWFwQ29uc3VtZXIuTEVBU1RfVVBQRVJfQk9VTkQnLiBTcGVjaWZpZXMgd2hldGhlciB0byByZXR1cm4gdGhlXG4gKiAgICAgY2xvc2VzdCBlbGVtZW50IHRoYXQgaXMgc21hbGxlciB0aGFuIG9yIGdyZWF0ZXIgdGhhbiB0aGUgb25lIHdlIGFyZVxuICogICAgIHNlYXJjaGluZyBmb3IsIHJlc3BlY3RpdmVseSwgaWYgdGhlIGV4YWN0IGVsZW1lbnQgY2Fubm90IGJlIGZvdW5kLlxuICogICAgIERlZmF1bHRzIHRvICdTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORCcuXG4gKlxuICogYW5kIGFuIG9iamVjdCBpcyByZXR1cm5lZCB3aXRoIHRoZSBmb2xsb3dpbmcgcHJvcGVydGllczpcbiAqXG4gKiAgIC0gc291cmNlOiBUaGUgb3JpZ2luYWwgc291cmNlIGZpbGUsIG9yIG51bGwuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UsIG9yIG51bGwuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLCBvciBudWxsLlxuICogICAtIG5hbWU6IFRoZSBvcmlnaW5hbCBpZGVudGlmaWVyLCBvciBudWxsLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5vcmlnaW5hbFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gU291cmNlTWFwQ29uc3VtZXJfb3JpZ2luYWxQb3NpdGlvbkZvcihhQXJncykge1xuICAgIHZhciBuZWVkbGUgPSB7XG4gICAgICBnZW5lcmF0ZWRMaW5lOiB1dGlsLmdldEFyZyhhQXJncywgJ2xpbmUnKSxcbiAgICAgIGdlbmVyYXRlZENvbHVtbjogdXRpbC5nZXRBcmcoYUFyZ3MsICdjb2x1bW4nKVxuICAgIH07XG5cbiAgICB2YXIgaW5kZXggPSB0aGlzLl9maW5kTWFwcGluZyhcbiAgICAgIG5lZWRsZSxcbiAgICAgIHRoaXMuX2dlbmVyYXRlZE1hcHBpbmdzLFxuICAgICAgXCJnZW5lcmF0ZWRMaW5lXCIsXG4gICAgICBcImdlbmVyYXRlZENvbHVtblwiLFxuICAgICAgdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNEZWZsYXRlZCxcbiAgICAgIHV0aWwuZ2V0QXJnKGFBcmdzLCAnYmlhcycsIFNvdXJjZU1hcENvbnN1bWVyLkdSRUFURVNUX0xPV0VSX0JPVU5EKVxuICAgICk7XG5cbiAgICBpZiAoaW5kZXggPj0gMCkge1xuICAgICAgdmFyIG1hcHBpbmcgPSB0aGlzLl9nZW5lcmF0ZWRNYXBwaW5nc1tpbmRleF07XG5cbiAgICAgIGlmIChtYXBwaW5nLmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIHZhciBzb3VyY2UgPSB1dGlsLmdldEFyZyhtYXBwaW5nLCAnc291cmNlJywgbnVsbCk7XG4gICAgICAgIGlmIChzb3VyY2UgIT09IG51bGwpIHtcbiAgICAgICAgICBzb3VyY2UgPSB0aGlzLl9zb3VyY2VzLmF0KHNvdXJjZSk7XG4gICAgICAgICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBzb3VyY2UgPSB1dGlsLmpvaW4odGhpcy5zb3VyY2VSb290LCBzb3VyY2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YXIgbmFtZSA9IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICduYW1lJywgbnVsbCk7XG4gICAgICAgIGlmIChuYW1lICE9PSBudWxsKSB7XG4gICAgICAgICAgbmFtZSA9IHRoaXMuX25hbWVzLmF0KG5hbWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgbGluZTogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsQ29sdW1uJywgbnVsbCksXG4gICAgICAgICAgbmFtZTogbmFtZVxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBzb3VyY2U6IG51bGwsXG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgbmFtZTogbnVsbFxuICAgIH07XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5IHNvdXJjZSBpbiB0aGUgc291cmNlXG4gKiBtYXAsIGZhbHNlIG90aGVyd2lzZS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuaGFzQ29udGVudHNPZkFsbFNvdXJjZXMgPVxuICBmdW5jdGlvbiBCYXNpY1NvdXJjZU1hcENvbnN1bWVyX2hhc0NvbnRlbnRzT2ZBbGxTb3VyY2VzKCkge1xuICAgIGlmICghdGhpcy5zb3VyY2VzQ29udGVudCkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgICByZXR1cm4gdGhpcy5zb3VyY2VzQ29udGVudC5sZW5ndGggPj0gdGhpcy5fc291cmNlcy5zaXplKCkgJiZcbiAgICAgICF0aGlzLnNvdXJjZXNDb250ZW50LnNvbWUoZnVuY3Rpb24gKHNjKSB7IHJldHVybiBzYyA9PSBudWxsOyB9KTtcbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBvcmlnaW5hbCBzb3VyY2UgY29udGVudC4gVGhlIG9ubHkgYXJndW1lbnQgaXMgdGhlIHVybCBvZiB0aGVcbiAqIG9yaWdpbmFsIHNvdXJjZSBmaWxlLiBSZXR1cm5zIG51bGwgaWYgbm8gb3JpZ2luYWwgc291cmNlIGNvbnRlbnQgaXNcbiAqIGF2YWlsYWJsZS5cbiAqL1xuQmFzaWNTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX3NvdXJjZUNvbnRlbnRGb3IoYVNvdXJjZSwgbnVsbE9uTWlzc2luZykge1xuICAgIGlmICghdGhpcy5zb3VyY2VzQ29udGVudCkge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBhU291cmNlID0gdXRpbC5yZWxhdGl2ZSh0aGlzLnNvdXJjZVJvb3QsIGFTb3VyY2UpO1xuICAgIH1cblxuICAgIGlmICh0aGlzLl9zb3VyY2VzLmhhcyhhU291cmNlKSkge1xuICAgICAgcmV0dXJuIHRoaXMuc291cmNlc0NvbnRlbnRbdGhpcy5fc291cmNlcy5pbmRleE9mKGFTb3VyY2UpXTtcbiAgICB9XG5cbiAgICB2YXIgdXJsO1xuICAgIGlmICh0aGlzLnNvdXJjZVJvb3QgIT0gbnVsbFxuICAgICAgICAmJiAodXJsID0gdXRpbC51cmxQYXJzZSh0aGlzLnNvdXJjZVJvb3QpKSkge1xuICAgICAgLy8gWFhYOiBmaWxlOi8vIFVSSXMgYW5kIGFic29sdXRlIHBhdGhzIGxlYWQgdG8gdW5leHBlY3RlZCBiZWhhdmlvciBmb3JcbiAgICAgIC8vIG1hbnkgdXNlcnMuIFdlIGNhbiBoZWxwIHRoZW0gb3V0IHdoZW4gdGhleSBleHBlY3QgZmlsZTovLyBVUklzIHRvXG4gICAgICAvLyBiZWhhdmUgbGlrZSBpdCB3b3VsZCBpZiB0aGV5IHdlcmUgcnVubmluZyBhIGxvY2FsIEhUVFAgc2VydmVyLiBTZWVcbiAgICAgIC8vIGh0dHBzOi8vYnVnemlsbGEubW96aWxsYS5vcmcvc2hvd19idWcuY2dpP2lkPTg4NTU5Ny5cbiAgICAgIHZhciBmaWxlVXJpQWJzUGF0aCA9IGFTb3VyY2UucmVwbGFjZSgvXmZpbGU6XFwvXFwvLywgXCJcIik7XG4gICAgICBpZiAodXJsLnNjaGVtZSA9PSBcImZpbGVcIlxuICAgICAgICAgICYmIHRoaXMuX3NvdXJjZXMuaGFzKGZpbGVVcmlBYnNQYXRoKSkge1xuICAgICAgICByZXR1cm4gdGhpcy5zb3VyY2VzQ29udGVudFt0aGlzLl9zb3VyY2VzLmluZGV4T2YoZmlsZVVyaUFic1BhdGgpXVxuICAgICAgfVxuXG4gICAgICBpZiAoKCF1cmwucGF0aCB8fCB1cmwucGF0aCA9PSBcIi9cIilcbiAgICAgICAgICAmJiB0aGlzLl9zb3VyY2VzLmhhcyhcIi9cIiArIGFTb3VyY2UpKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnNvdXJjZXNDb250ZW50W3RoaXMuX3NvdXJjZXMuaW5kZXhPZihcIi9cIiArIGFTb3VyY2UpXTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBUaGlzIGZ1bmN0aW9uIGlzIHVzZWQgcmVjdXJzaXZlbHkgZnJvbVxuICAgIC8vIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvci4gSW4gdGhhdCBjYXNlLCB3ZVxuICAgIC8vIGRvbid0IHdhbnQgdG8gdGhyb3cgaWYgd2UgY2FuJ3QgZmluZCB0aGUgc291cmNlIC0gd2UganVzdCB3YW50IHRvXG4gICAgLy8gcmV0dXJuIG51bGwsIHNvIHdlIHByb3ZpZGUgYSBmbGFnIHRvIGV4aXQgZ3JhY2VmdWxseS5cbiAgICBpZiAobnVsbE9uTWlzc2luZykge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdcIicgKyBhU291cmNlICsgJ1wiIGlzIG5vdCBpbiB0aGUgU291cmNlTWFwLicpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBnZW5lcmF0ZWQgbGluZSBhbmQgY29sdW1uIGluZm9ybWF0aW9uIGZvciB0aGUgb3JpZ2luYWwgc291cmNlLFxuICogbGluZSwgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdCB3aXRoXG4gKiB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLlxuICogICAtIGJpYXM6IEVpdGhlciAnU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQnIG9yXG4gKiAgICAgJ1NvdXJjZU1hcENvbnN1bWVyLkxFQVNUX1VQUEVSX0JPVU5EJy4gU3BlY2lmaWVzIHdoZXRoZXIgdG8gcmV0dXJuIHRoZVxuICogICAgIGNsb3Nlc3QgZWxlbWVudCB0aGF0IGlzIHNtYWxsZXIgdGhhbiBvciBncmVhdGVyIHRoYW4gdGhlIG9uZSB3ZSBhcmVcbiAqICAgICBzZWFyY2hpbmcgZm9yLCByZXNwZWN0aXZlbHksIGlmIHRoZSBleGFjdCBlbGVtZW50IGNhbm5vdCBiZSBmb3VuZC5cbiAqICAgICBEZWZhdWx0cyB0byAnU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQnLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICovXG5CYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5nZW5lcmF0ZWRQb3NpdGlvbkZvciA9XG4gIGZ1bmN0aW9uIFNvdXJjZU1hcENvbnN1bWVyX2dlbmVyYXRlZFBvc2l0aW9uRm9yKGFBcmdzKSB7XG4gICAgdmFyIHNvdXJjZSA9IHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJyk7XG4gICAgaWYgKHRoaXMuc291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICBzb3VyY2UgPSB1dGlsLnJlbGF0aXZlKHRoaXMuc291cmNlUm9vdCwgc291cmNlKTtcbiAgICB9XG4gICAgaWYgKCF0aGlzLl9zb3VyY2VzLmhhcyhzb3VyY2UpKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBsaW5lOiBudWxsLFxuICAgICAgICBjb2x1bW46IG51bGwsXG4gICAgICAgIGxhc3RDb2x1bW46IG51bGxcbiAgICAgIH07XG4gICAgfVxuICAgIHNvdXJjZSA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihzb3VyY2UpO1xuXG4gICAgdmFyIG5lZWRsZSA9IHtcbiAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgb3JpZ2luYWxMaW5lOiB1dGlsLmdldEFyZyhhQXJncywgJ2xpbmUnKSxcbiAgICAgIG9yaWdpbmFsQ29sdW1uOiB1dGlsLmdldEFyZyhhQXJncywgJ2NvbHVtbicpXG4gICAgfTtcblxuICAgIHZhciBpbmRleCA9IHRoaXMuX2ZpbmRNYXBwaW5nKFxuICAgICAgbmVlZGxlLFxuICAgICAgdGhpcy5fb3JpZ2luYWxNYXBwaW5ncyxcbiAgICAgIFwib3JpZ2luYWxMaW5lXCIsXG4gICAgICBcIm9yaWdpbmFsQ29sdW1uXCIsXG4gICAgICB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zLFxuICAgICAgdXRpbC5nZXRBcmcoYUFyZ3MsICdiaWFzJywgU291cmNlTWFwQ29uc3VtZXIuR1JFQVRFU1RfTE9XRVJfQk9VTkQpXG4gICAgKTtcblxuICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICB2YXIgbWFwcGluZyA9IHRoaXMuX29yaWdpbmFsTWFwcGluZ3NbaW5kZXhdO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgPT09IG5lZWRsZS5zb3VyY2UpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBsaW5lOiB1dGlsLmdldEFyZyhtYXBwaW5nLCAnZ2VuZXJhdGVkTGluZScsIG51bGwpLFxuICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ2dlbmVyYXRlZENvbHVtbicsIG51bGwpLFxuICAgICAgICAgIGxhc3RDb2x1bW46IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdsYXN0R2VuZXJhdGVkQ29sdW1uJywgbnVsbClcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgbGluZTogbnVsbCxcbiAgICAgIGNvbHVtbjogbnVsbCxcbiAgICAgIGxhc3RDb2x1bW46IG51bGxcbiAgICB9O1xuICB9O1xuXG5leHBvcnRzLkJhc2ljU291cmNlTWFwQ29uc3VtZXIgPSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyO1xuXG4vKipcbiAqIEFuIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lciBpbnN0YW5jZSByZXByZXNlbnRzIGEgcGFyc2VkIHNvdXJjZSBtYXAgd2hpY2hcbiAqIHdlIGNhbiBxdWVyeSBmb3IgaW5mb3JtYXRpb24uIEl0IGRpZmZlcnMgZnJvbSBCYXNpY1NvdXJjZU1hcENvbnN1bWVyIGluXG4gKiB0aGF0IGl0IHRha2VzIFwiaW5kZXhlZFwiIHNvdXJjZSBtYXBzIChpLmUuIG9uZXMgd2l0aCBhIFwic2VjdGlvbnNcIiBmaWVsZCkgYXNcbiAqIGlucHV0LlxuICpcbiAqIFRoZSBvbmx5IHBhcmFtZXRlciBpcyBhIHJhdyBzb3VyY2UgbWFwIChlaXRoZXIgYXMgYSBKU09OIHN0cmluZywgb3IgYWxyZWFkeVxuICogcGFyc2VkIHRvIGFuIG9iamVjdCkuIEFjY29yZGluZyB0byB0aGUgc3BlYyBmb3IgaW5kZXhlZCBzb3VyY2UgbWFwcywgdGhleVxuICogaGF2ZSB0aGUgZm9sbG93aW5nIGF0dHJpYnV0ZXM6XG4gKlxuICogICAtIHZlcnNpb246IFdoaWNoIHZlcnNpb24gb2YgdGhlIHNvdXJjZSBtYXAgc3BlYyB0aGlzIG1hcCBpcyBmb2xsb3dpbmcuXG4gKiAgIC0gZmlsZTogT3B0aW9uYWwuIFRoZSBnZW5lcmF0ZWQgZmlsZSB0aGlzIHNvdXJjZSBtYXAgaXMgYXNzb2NpYXRlZCB3aXRoLlxuICogICAtIHNlY3Rpb25zOiBBIGxpc3Qgb2Ygc2VjdGlvbiBkZWZpbml0aW9ucy5cbiAqXG4gKiBFYWNoIHZhbHVlIHVuZGVyIHRoZSBcInNlY3Rpb25zXCIgZmllbGQgaGFzIHR3byBmaWVsZHM6XG4gKiAgIC0gb2Zmc2V0OiBUaGUgb2Zmc2V0IGludG8gdGhlIG9yaWdpbmFsIHNwZWNpZmllZCBhdCB3aGljaCB0aGlzIHNlY3Rpb25cbiAqICAgICAgIGJlZ2lucyB0byBhcHBseSwgZGVmaW5lZCBhcyBhbiBvYmplY3Qgd2l0aCBhIFwibGluZVwiIGFuZCBcImNvbHVtblwiXG4gKiAgICAgICBmaWVsZC5cbiAqICAgLSBtYXA6IEEgc291cmNlIG1hcCBkZWZpbml0aW9uLiBUaGlzIHNvdXJjZSBtYXAgY291bGQgYWxzbyBiZSBpbmRleGVkLFxuICogICAgICAgYnV0IGRvZXNuJ3QgaGF2ZSB0byBiZS5cbiAqXG4gKiBJbnN0ZWFkIG9mIHRoZSBcIm1hcFwiIGZpZWxkLCBpdCdzIGFsc28gcG9zc2libGUgdG8gaGF2ZSBhIFwidXJsXCIgZmllbGRcbiAqIHNwZWNpZnlpbmcgYSBVUkwgdG8gcmV0cmlldmUgYSBzb3VyY2UgbWFwIGZyb20sIGJ1dCB0aGF0J3MgY3VycmVudGx5XG4gKiB1bnN1cHBvcnRlZC5cbiAqXG4gKiBIZXJlJ3MgYW4gZXhhbXBsZSBzb3VyY2UgbWFwLCB0YWtlbiBmcm9tIHRoZSBzb3VyY2UgbWFwIHNwZWNbMF0sIGJ1dFxuICogbW9kaWZpZWQgdG8gb21pdCBhIHNlY3Rpb24gd2hpY2ggdXNlcyB0aGUgXCJ1cmxcIiBmaWVsZC5cbiAqXG4gKiAge1xuICogICAgdmVyc2lvbiA6IDMsXG4gKiAgICBmaWxlOiBcImFwcC5qc1wiLFxuICogICAgc2VjdGlvbnM6IFt7XG4gKiAgICAgIG9mZnNldDoge2xpbmU6MTAwLCBjb2x1bW46MTB9LFxuICogICAgICBtYXA6IHtcbiAqICAgICAgICB2ZXJzaW9uIDogMyxcbiAqICAgICAgICBmaWxlOiBcInNlY3Rpb24uanNcIixcbiAqICAgICAgICBzb3VyY2VzOiBbXCJmb28uanNcIiwgXCJiYXIuanNcIl0sXG4gKiAgICAgICAgbmFtZXM6IFtcInNyY1wiLCBcIm1hcHNcIiwgXCJhcmVcIiwgXCJmdW5cIl0sXG4gKiAgICAgICAgbWFwcGluZ3M6IFwiQUFBQSxFOztBQkNERTtcIlxuICogICAgICB9XG4gKiAgICB9XSxcbiAqICB9XG4gKlxuICogWzBdOiBodHRwczovL2RvY3MuZ29vZ2xlLmNvbS9kb2N1bWVudC9kLzFVMVJHQWVoUXdSeXBVVG92RjFLUmxwaU9GemUwYi1fMmdjNmZBSDBLWTBrL2VkaXQjaGVhZGluZz1oLjUzNWVzM3hlcHJndFxuICovXG5mdW5jdGlvbiBJbmRleGVkU291cmNlTWFwQ29uc3VtZXIoYVNvdXJjZU1hcCkge1xuICB2YXIgc291cmNlTWFwID0gYVNvdXJjZU1hcDtcbiAgaWYgKHR5cGVvZiBhU291cmNlTWFwID09PSAnc3RyaW5nJykge1xuICAgIHNvdXJjZU1hcCA9IEpTT04ucGFyc2UoYVNvdXJjZU1hcC5yZXBsYWNlKC9eXFwpXFxdXFx9Jy8sICcnKSk7XG4gIH1cblxuICB2YXIgdmVyc2lvbiA9IHV0aWwuZ2V0QXJnKHNvdXJjZU1hcCwgJ3ZlcnNpb24nKTtcbiAgdmFyIHNlY3Rpb25zID0gdXRpbC5nZXRBcmcoc291cmNlTWFwLCAnc2VjdGlvbnMnKTtcblxuICBpZiAodmVyc2lvbiAhPSB0aGlzLl92ZXJzaW9uKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdVbnN1cHBvcnRlZCB2ZXJzaW9uOiAnICsgdmVyc2lvbik7XG4gIH1cblxuICB0aGlzLl9zb3VyY2VzID0gbmV3IEFycmF5U2V0KCk7XG4gIHRoaXMuX25hbWVzID0gbmV3IEFycmF5U2V0KCk7XG5cbiAgdmFyIGxhc3RPZmZzZXQgPSB7XG4gICAgbGluZTogLTEsXG4gICAgY29sdW1uOiAwXG4gIH07XG4gIHRoaXMuX3NlY3Rpb25zID0gc2VjdGlvbnMubWFwKGZ1bmN0aW9uIChzKSB7XG4gICAgaWYgKHMudXJsKSB7XG4gICAgICAvLyBUaGUgdXJsIGZpZWxkIHdpbGwgcmVxdWlyZSBzdXBwb3J0IGZvciBhc3luY2hyb25pY2l0eS5cbiAgICAgIC8vIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbW96aWxsYS9zb3VyY2UtbWFwL2lzc3Vlcy8xNlxuICAgICAgdGhyb3cgbmV3IEVycm9yKCdTdXBwb3J0IGZvciB1cmwgZmllbGQgaW4gc2VjdGlvbnMgbm90IGltcGxlbWVudGVkLicpO1xuICAgIH1cbiAgICB2YXIgb2Zmc2V0ID0gdXRpbC5nZXRBcmcocywgJ29mZnNldCcpO1xuICAgIHZhciBvZmZzZXRMaW5lID0gdXRpbC5nZXRBcmcob2Zmc2V0LCAnbGluZScpO1xuICAgIHZhciBvZmZzZXRDb2x1bW4gPSB1dGlsLmdldEFyZyhvZmZzZXQsICdjb2x1bW4nKTtcblxuICAgIGlmIChvZmZzZXRMaW5lIDwgbGFzdE9mZnNldC5saW5lIHx8XG4gICAgICAgIChvZmZzZXRMaW5lID09PSBsYXN0T2Zmc2V0LmxpbmUgJiYgb2Zmc2V0Q29sdW1uIDwgbGFzdE9mZnNldC5jb2x1bW4pKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ1NlY3Rpb24gb2Zmc2V0cyBtdXN0IGJlIG9yZGVyZWQgYW5kIG5vbi1vdmVybGFwcGluZy4nKTtcbiAgICB9XG4gICAgbGFzdE9mZnNldCA9IG9mZnNldDtcblxuICAgIHJldHVybiB7XG4gICAgICBnZW5lcmF0ZWRPZmZzZXQ6IHtcbiAgICAgICAgLy8gVGhlIG9mZnNldCBmaWVsZHMgYXJlIDAtYmFzZWQsIGJ1dCB3ZSB1c2UgMS1iYXNlZCBpbmRpY2VzIHdoZW5cbiAgICAgICAgLy8gZW5jb2RpbmcvZGVjb2RpbmcgZnJvbSBWTFEuXG4gICAgICAgIGdlbmVyYXRlZExpbmU6IG9mZnNldExpbmUgKyAxLFxuICAgICAgICBnZW5lcmF0ZWRDb2x1bW46IG9mZnNldENvbHVtbiArIDFcbiAgICAgIH0sXG4gICAgICBjb25zdW1lcjogbmV3IFNvdXJjZU1hcENvbnN1bWVyKHV0aWwuZ2V0QXJnKHMsICdtYXAnKSlcbiAgICB9XG4gIH0pO1xufVxuXG5JbmRleGVkU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUpO1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5jb25zdHJ1Y3RvciA9IFNvdXJjZU1hcENvbnN1bWVyO1xuXG4vKipcbiAqIFRoZSB2ZXJzaW9uIG9mIHRoZSBzb3VyY2UgbWFwcGluZyBzcGVjIHRoYXQgd2UgYXJlIGNvbnN1bWluZy5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5fdmVyc2lvbiA9IDM7XG5cbi8qKlxuICogVGhlIGxpc3Qgb2Ygb3JpZ2luYWwgc291cmNlcy5cbiAqL1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUsICdzb3VyY2VzJywge1xuICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgc291cmNlcyA9IFtdO1xuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5fc2VjdGlvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdGhpcy5fc2VjdGlvbnNbaV0uY29uc3VtZXIuc291cmNlcy5sZW5ndGg7IGorKykge1xuICAgICAgICBzb3VyY2VzLnB1c2godGhpcy5fc2VjdGlvbnNbaV0uY29uc3VtZXIuc291cmNlc1tqXSk7XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBzb3VyY2VzO1xuICB9XG59KTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBvcmlnaW5hbCBzb3VyY2UsIGxpbmUsIGFuZCBjb2x1bW4gaW5mb3JtYXRpb24gZm9yIHRoZSBnZW5lcmF0ZWRcbiAqIHNvdXJjZSdzIGxpbmUgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdFxuICogd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZS5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIG9yaWdpbmFsIHNvdXJjZSBmaWxlLCBvciBudWxsLlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLCBvciBudWxsLlxuICogICAtIGNvbHVtbjogVGhlIGNvbHVtbiBudW1iZXIgaW4gdGhlIG9yaWdpbmFsIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBuYW1lOiBUaGUgb3JpZ2luYWwgaWRlbnRpZmllciwgb3IgbnVsbC5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5vcmlnaW5hbFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyX29yaWdpbmFsUG9zaXRpb25Gb3IoYUFyZ3MpIHtcbiAgICB2YXIgbmVlZGxlID0ge1xuICAgICAgZ2VuZXJhdGVkTGluZTogdXRpbC5nZXRBcmcoYUFyZ3MsICdsaW5lJyksXG4gICAgICBnZW5lcmF0ZWRDb2x1bW46IHV0aWwuZ2V0QXJnKGFBcmdzLCAnY29sdW1uJylcbiAgICB9O1xuXG4gICAgLy8gRmluZCB0aGUgc2VjdGlvbiBjb250YWluaW5nIHRoZSBnZW5lcmF0ZWQgcG9zaXRpb24gd2UncmUgdHJ5aW5nIHRvIG1hcFxuICAgIC8vIHRvIGFuIG9yaWdpbmFsIHBvc2l0aW9uLlxuICAgIHZhciBzZWN0aW9uSW5kZXggPSBiaW5hcnlTZWFyY2guc2VhcmNoKG5lZWRsZSwgdGhpcy5fc2VjdGlvbnMsXG4gICAgICBmdW5jdGlvbihuZWVkbGUsIHNlY3Rpb24pIHtcbiAgICAgICAgdmFyIGNtcCA9IG5lZWRsZS5nZW5lcmF0ZWRMaW5lIC0gc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZTtcbiAgICAgICAgaWYgKGNtcCkge1xuICAgICAgICAgIHJldHVybiBjbXA7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gKG5lZWRsZS5nZW5lcmF0ZWRDb2x1bW4gLVxuICAgICAgICAgICAgICAgIHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbik7XG4gICAgICB9KTtcbiAgICB2YXIgc2VjdGlvbiA9IHRoaXMuX3NlY3Rpb25zW3NlY3Rpb25JbmRleF07XG5cbiAgICBpZiAoIXNlY3Rpb24pIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHNvdXJjZTogbnVsbCxcbiAgICAgICAgbGluZTogbnVsbCxcbiAgICAgICAgY29sdW1uOiBudWxsLFxuICAgICAgICBuYW1lOiBudWxsXG4gICAgICB9O1xuICAgIH1cblxuICAgIHJldHVybiBzZWN0aW9uLmNvbnN1bWVyLm9yaWdpbmFsUG9zaXRpb25Gb3Ioe1xuICAgICAgbGluZTogbmVlZGxlLmdlbmVyYXRlZExpbmUgLVxuICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSAtIDEpLFxuICAgICAgY29sdW1uOiBuZWVkbGUuZ2VuZXJhdGVkQ29sdW1uIC1cbiAgICAgICAgKHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lXG4gICAgICAgICA/IHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbiAtIDFcbiAgICAgICAgIDogMCksXG4gICAgICBiaWFzOiBhQXJncy5iaWFzXG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRydWUgaWYgd2UgaGF2ZSB0aGUgc291cmNlIGNvbnRlbnQgZm9yIGV2ZXJ5IHNvdXJjZSBpbiB0aGUgc291cmNlXG4gKiBtYXAsIGZhbHNlIG90aGVyd2lzZS5cbiAqL1xuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5oYXNDb250ZW50c09mQWxsU291cmNlcyA9XG4gIGZ1bmN0aW9uIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lcl9oYXNDb250ZW50c09mQWxsU291cmNlcygpIHtcbiAgICByZXR1cm4gdGhpcy5fc2VjdGlvbnMuZXZlcnkoZnVuY3Rpb24gKHMpIHtcbiAgICAgIHJldHVybiBzLmNvbnN1bWVyLmhhc0NvbnRlbnRzT2ZBbGxTb3VyY2VzKCk7XG4gICAgfSk7XG4gIH07XG5cbi8qKlxuICogUmV0dXJucyB0aGUgb3JpZ2luYWwgc291cmNlIGNvbnRlbnQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIHRoZSB1cmwgb2YgdGhlXG4gKiBvcmlnaW5hbCBzb3VyY2UgZmlsZS4gUmV0dXJucyBudWxsIGlmIG5vIG9yaWdpbmFsIHNvdXJjZSBjb250ZW50IGlzXG4gKiBhdmFpbGFibGUuXG4gKi9cbkluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuc291cmNlQ29udGVudEZvciA9XG4gIGZ1bmN0aW9uIEluZGV4ZWRTb3VyY2VNYXBDb25zdW1lcl9zb3VyY2VDb250ZW50Rm9yKGFTb3VyY2UsIG51bGxPbk1pc3NpbmcpIHtcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuX3NlY3Rpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICB2YXIgc2VjdGlvbiA9IHRoaXMuX3NlY3Rpb25zW2ldO1xuXG4gICAgICB2YXIgY29udGVudCA9IHNlY3Rpb24uY29uc3VtZXIuc291cmNlQ29udGVudEZvcihhU291cmNlLCB0cnVlKTtcbiAgICAgIGlmIChjb250ZW50KSB7XG4gICAgICAgIHJldHVybiBjb250ZW50O1xuICAgICAgfVxuICAgIH1cbiAgICBpZiAobnVsbE9uTWlzc2luZykge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdcIicgKyBhU291cmNlICsgJ1wiIGlzIG5vdCBpbiB0aGUgU291cmNlTWFwLicpO1xuICAgIH1cbiAgfTtcblxuLyoqXG4gKiBSZXR1cm5zIHRoZSBnZW5lcmF0ZWQgbGluZSBhbmQgY29sdW1uIGluZm9ybWF0aW9uIGZvciB0aGUgb3JpZ2luYWwgc291cmNlLFxuICogbGluZSwgYW5kIGNvbHVtbiBwb3NpdGlvbnMgcHJvdmlkZWQuIFRoZSBvbmx5IGFyZ3VtZW50IGlzIGFuIG9iamVjdCB3aXRoXG4gKiB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIHNvdXJjZTogVGhlIGZpbGVuYW1lIG9mIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gbGluZTogVGhlIGxpbmUgbnVtYmVyIGluIHRoZSBvcmlnaW5hbCBzb3VyY2UuXG4gKiAgIC0gY29sdW1uOiBUaGUgY29sdW1uIG51bWJlciBpbiB0aGUgb3JpZ2luYWwgc291cmNlLlxuICpcbiAqIGFuZCBhbiBvYmplY3QgaXMgcmV0dXJuZWQgd2l0aCB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXM6XG4gKlxuICogICAtIGxpbmU6IFRoZSBsaW5lIG51bWJlciBpbiB0aGUgZ2VuZXJhdGVkIHNvdXJjZSwgb3IgbnVsbC5cbiAqICAgLSBjb2x1bW46IFRoZSBjb2x1bW4gbnVtYmVyIGluIHRoZSBnZW5lcmF0ZWQgc291cmNlLCBvciBudWxsLlxuICovXG5JbmRleGVkU291cmNlTWFwQ29uc3VtZXIucHJvdG90eXBlLmdlbmVyYXRlZFBvc2l0aW9uRm9yID1cbiAgZnVuY3Rpb24gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyX2dlbmVyYXRlZFBvc2l0aW9uRm9yKGFBcmdzKSB7XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgdmFyIHNlY3Rpb24gPSB0aGlzLl9zZWN0aW9uc1tpXTtcblxuICAgICAgLy8gT25seSBjb25zaWRlciB0aGlzIHNlY3Rpb24gaWYgdGhlIHJlcXVlc3RlZCBzb3VyY2UgaXMgaW4gdGhlIGxpc3Qgb2ZcbiAgICAgIC8vIHNvdXJjZXMgb2YgdGhlIGNvbnN1bWVyLlxuICAgICAgaWYgKHNlY3Rpb24uY29uc3VtZXIuc291cmNlcy5pbmRleE9mKHV0aWwuZ2V0QXJnKGFBcmdzLCAnc291cmNlJykpID09PSAtMSkge1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cbiAgICAgIHZhciBnZW5lcmF0ZWRQb3NpdGlvbiA9IHNlY3Rpb24uY29uc3VtZXIuZ2VuZXJhdGVkUG9zaXRpb25Gb3IoYUFyZ3MpO1xuICAgICAgaWYgKGdlbmVyYXRlZFBvc2l0aW9uKSB7XG4gICAgICAgIHZhciByZXQgPSB7XG4gICAgICAgICAgbGluZTogZ2VuZXJhdGVkUG9zaXRpb24ubGluZSArXG4gICAgICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSAtIDEpLFxuICAgICAgICAgIGNvbHVtbjogZ2VuZXJhdGVkUG9zaXRpb24uY29sdW1uICtcbiAgICAgICAgICAgIChzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRMaW5lID09PSBnZW5lcmF0ZWRQb3NpdGlvbi5saW5lXG4gICAgICAgICAgICAgPyBzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRDb2x1bW4gLSAxXG4gICAgICAgICAgICAgOiAwKVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICBsaW5lOiBudWxsLFxuICAgICAgY29sdW1uOiBudWxsXG4gICAgfTtcbiAgfTtcblxuLyoqXG4gKiBQYXJzZSB0aGUgbWFwcGluZ3MgaW4gYSBzdHJpbmcgaW4gdG8gYSBkYXRhIHN0cnVjdHVyZSB3aGljaCB3ZSBjYW4gZWFzaWx5XG4gKiBxdWVyeSAodGhlIG9yZGVyZWQgYXJyYXlzIGluIHRoZSBgdGhpcy5fX2dlbmVyYXRlZE1hcHBpbmdzYCBhbmRcbiAqIGB0aGlzLl9fb3JpZ2luYWxNYXBwaW5nc2AgcHJvcGVydGllcykuXG4gKi9cbkluZGV4ZWRTb3VyY2VNYXBDb25zdW1lci5wcm90b3R5cGUuX3BhcnNlTWFwcGluZ3MgPVxuICBmdW5jdGlvbiBJbmRleGVkU291cmNlTWFwQ29uc3VtZXJfcGFyc2VNYXBwaW5ncyhhU3RyLCBhU291cmNlUm9vdCkge1xuICAgIHRoaXMuX19nZW5lcmF0ZWRNYXBwaW5ncyA9IFtdO1xuICAgIHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzID0gW107XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLl9zZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgdmFyIHNlY3Rpb24gPSB0aGlzLl9zZWN0aW9uc1tpXTtcbiAgICAgIHZhciBzZWN0aW9uTWFwcGluZ3MgPSBzZWN0aW9uLmNvbnN1bWVyLl9nZW5lcmF0ZWRNYXBwaW5ncztcbiAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgc2VjdGlvbk1hcHBpbmdzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgIHZhciBtYXBwaW5nID0gc2VjdGlvbk1hcHBpbmdzW2pdO1xuXG4gICAgICAgIHZhciBzb3VyY2UgPSBzZWN0aW9uLmNvbnN1bWVyLl9zb3VyY2VzLmF0KG1hcHBpbmcuc291cmNlKTtcbiAgICAgICAgaWYgKHNlY3Rpb24uY29uc3VtZXIuc291cmNlUm9vdCAhPT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZSA9IHV0aWwuam9pbihzZWN0aW9uLmNvbnN1bWVyLnNvdXJjZVJvb3QsIHNvdXJjZSk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5fc291cmNlcy5hZGQoc291cmNlKTtcbiAgICAgICAgc291cmNlID0gdGhpcy5fc291cmNlcy5pbmRleE9mKHNvdXJjZSk7XG5cbiAgICAgICAgdmFyIG5hbWUgPSBzZWN0aW9uLmNvbnN1bWVyLl9uYW1lcy5hdChtYXBwaW5nLm5hbWUpO1xuICAgICAgICB0aGlzLl9uYW1lcy5hZGQobmFtZSk7XG4gICAgICAgIG5hbWUgPSB0aGlzLl9uYW1lcy5pbmRleE9mKG5hbWUpO1xuXG4gICAgICAgIC8vIFRoZSBtYXBwaW5ncyBjb21pbmcgZnJvbSB0aGUgY29uc3VtZXIgZm9yIHRoZSBzZWN0aW9uIGhhdmVcbiAgICAgICAgLy8gZ2VuZXJhdGVkIHBvc2l0aW9ucyByZWxhdGl2ZSB0byB0aGUgc3RhcnQgb2YgdGhlIHNlY3Rpb24sIHNvIHdlXG4gICAgICAgIC8vIG5lZWQgdG8gb2Zmc2V0IHRoZW0gdG8gYmUgcmVsYXRpdmUgdG8gdGhlIHN0YXJ0IG9mIHRoZSBjb25jYXRlbmF0ZWRcbiAgICAgICAgLy8gZ2VuZXJhdGVkIGZpbGUuXG4gICAgICAgIHZhciBhZGp1c3RlZE1hcHBpbmcgPSB7XG4gICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgZ2VuZXJhdGVkTGluZTogbWFwcGluZy5nZW5lcmF0ZWRMaW5lICtcbiAgICAgICAgICAgIChzZWN0aW9uLmdlbmVyYXRlZE9mZnNldC5nZW5lcmF0ZWRMaW5lIC0gMSksXG4gICAgICAgICAgZ2VuZXJhdGVkQ29sdW1uOiBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiArXG4gICAgICAgICAgICAoc2VjdGlvbi5nZW5lcmF0ZWRPZmZzZXQuZ2VuZXJhdGVkTGluZSA9PT0gbWFwcGluZy5nZW5lcmF0ZWRMaW5lXG4gICAgICAgICAgICA/IHNlY3Rpb24uZ2VuZXJhdGVkT2Zmc2V0LmdlbmVyYXRlZENvbHVtbiAtIDFcbiAgICAgICAgICAgIDogMCksXG4gICAgICAgICAgb3JpZ2luYWxMaW5lOiBtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICBvcmlnaW5hbENvbHVtbjogbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICBuYW1lOiBuYW1lXG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy5fX2dlbmVyYXRlZE1hcHBpbmdzLnB1c2goYWRqdXN0ZWRNYXBwaW5nKTtcbiAgICAgICAgaWYgKHR5cGVvZiBhZGp1c3RlZE1hcHBpbmcub3JpZ2luYWxMaW5lID09PSAnbnVtYmVyJykge1xuICAgICAgICAgIHRoaXMuX19vcmlnaW5hbE1hcHBpbmdzLnB1c2goYWRqdXN0ZWRNYXBwaW5nKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIHF1aWNrU29ydCh0aGlzLl9fZ2VuZXJhdGVkTWFwcGluZ3MsIHV0aWwuY29tcGFyZUJ5R2VuZXJhdGVkUG9zaXRpb25zRGVmbGF0ZWQpO1xuICAgIHF1aWNrU29ydCh0aGlzLl9fb3JpZ2luYWxNYXBwaW5ncywgdXRpbC5jb21wYXJlQnlPcmlnaW5hbFBvc2l0aW9ucyk7XG4gIH07XG5cbmV4cG9ydHMuSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyID0gSW5kZXhlZFNvdXJjZU1hcENvbnN1bWVyO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qc1xuLy8gbW9kdWxlIGlkID0gN1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbmV4cG9ydHMuR1JFQVRFU1RfTE9XRVJfQk9VTkQgPSAxO1xuZXhwb3J0cy5MRUFTVF9VUFBFUl9CT1VORCA9IDI7XG5cbi8qKlxuICogUmVjdXJzaXZlIGltcGxlbWVudGF0aW9uIG9mIGJpbmFyeSBzZWFyY2guXG4gKlxuICogQHBhcmFtIGFMb3cgSW5kaWNlcyBoZXJlIGFuZCBsb3dlciBkbyBub3QgY29udGFpbiB0aGUgbmVlZGxlLlxuICogQHBhcmFtIGFIaWdoIEluZGljZXMgaGVyZSBhbmQgaGlnaGVyIGRvIG5vdCBjb250YWluIHRoZSBuZWVkbGUuXG4gKiBAcGFyYW0gYU5lZWRsZSBUaGUgZWxlbWVudCBiZWluZyBzZWFyY2hlZCBmb3IuXG4gKiBAcGFyYW0gYUhheXN0YWNrIFRoZSBub24tZW1wdHkgYXJyYXkgYmVpbmcgc2VhcmNoZWQuXG4gKiBAcGFyYW0gYUNvbXBhcmUgRnVuY3Rpb24gd2hpY2ggdGFrZXMgdHdvIGVsZW1lbnRzIGFuZCByZXR1cm5zIC0xLCAwLCBvciAxLlxuICogQHBhcmFtIGFCaWFzIEVpdGhlciAnYmluYXJ5U2VhcmNoLkdSRUFURVNUX0xPV0VSX0JPVU5EJyBvclxuICogICAgICdiaW5hcnlTZWFyY2guTEVBU1RfVVBQRVJfQk9VTkQnLiBTcGVjaWZpZXMgd2hldGhlciB0byByZXR1cm4gdGhlXG4gKiAgICAgY2xvc2VzdCBlbGVtZW50IHRoYXQgaXMgc21hbGxlciB0aGFuIG9yIGdyZWF0ZXIgdGhhbiB0aGUgb25lIHdlIGFyZVxuICogICAgIHNlYXJjaGluZyBmb3IsIHJlc3BlY3RpdmVseSwgaWYgdGhlIGV4YWN0IGVsZW1lbnQgY2Fubm90IGJlIGZvdW5kLlxuICovXG5mdW5jdGlvbiByZWN1cnNpdmVTZWFyY2goYUxvdywgYUhpZ2gsIGFOZWVkbGUsIGFIYXlzdGFjaywgYUNvbXBhcmUsIGFCaWFzKSB7XG4gIC8vIFRoaXMgZnVuY3Rpb24gdGVybWluYXRlcyB3aGVuIG9uZSBvZiB0aGUgZm9sbG93aW5nIGlzIHRydWU6XG4gIC8vXG4gIC8vICAgMS4gV2UgZmluZCB0aGUgZXhhY3QgZWxlbWVudCB3ZSBhcmUgbG9va2luZyBmb3IuXG4gIC8vXG4gIC8vICAgMi4gV2UgZGlkIG5vdCBmaW5kIHRoZSBleGFjdCBlbGVtZW50LCBidXQgd2UgY2FuIHJldHVybiB0aGUgaW5kZXggb2ZcbiAgLy8gICAgICB0aGUgbmV4dC1jbG9zZXN0IGVsZW1lbnQuXG4gIC8vXG4gIC8vICAgMy4gV2UgZGlkIG5vdCBmaW5kIHRoZSBleGFjdCBlbGVtZW50LCBhbmQgdGhlcmUgaXMgbm8gbmV4dC1jbG9zZXN0XG4gIC8vICAgICAgZWxlbWVudCB0aGFuIHRoZSBvbmUgd2UgYXJlIHNlYXJjaGluZyBmb3IsIHNvIHdlIHJldHVybiAtMS5cbiAgdmFyIG1pZCA9IE1hdGguZmxvb3IoKGFIaWdoIC0gYUxvdykgLyAyKSArIGFMb3c7XG4gIHZhciBjbXAgPSBhQ29tcGFyZShhTmVlZGxlLCBhSGF5c3RhY2tbbWlkXSwgdHJ1ZSk7XG4gIGlmIChjbXAgPT09IDApIHtcbiAgICAvLyBGb3VuZCB0aGUgZWxlbWVudCB3ZSBhcmUgbG9va2luZyBmb3IuXG4gICAgcmV0dXJuIG1pZDtcbiAgfVxuICBlbHNlIGlmIChjbXAgPiAwKSB7XG4gICAgLy8gT3VyIG5lZWRsZSBpcyBncmVhdGVyIHRoYW4gYUhheXN0YWNrW21pZF0uXG4gICAgaWYgKGFIaWdoIC0gbWlkID4gMSkge1xuICAgICAgLy8gVGhlIGVsZW1lbnQgaXMgaW4gdGhlIHVwcGVyIGhhbGYuXG4gICAgICByZXR1cm4gcmVjdXJzaXZlU2VhcmNoKG1pZCwgYUhpZ2gsIGFOZWVkbGUsIGFIYXlzdGFjaywgYUNvbXBhcmUsIGFCaWFzKTtcbiAgICB9XG5cbiAgICAvLyBUaGUgZXhhY3QgbmVlZGxlIGVsZW1lbnQgd2FzIG5vdCBmb3VuZCBpbiB0aGlzIGhheXN0YWNrLiBEZXRlcm1pbmUgaWZcbiAgICAvLyB3ZSBhcmUgaW4gdGVybWluYXRpb24gY2FzZSAoMykgb3IgKDIpIGFuZCByZXR1cm4gdGhlIGFwcHJvcHJpYXRlIHRoaW5nLlxuICAgIGlmIChhQmlhcyA9PSBleHBvcnRzLkxFQVNUX1VQUEVSX0JPVU5EKSB7XG4gICAgICByZXR1cm4gYUhpZ2ggPCBhSGF5c3RhY2subGVuZ3RoID8gYUhpZ2ggOiAtMTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIG1pZDtcbiAgICB9XG4gIH1cbiAgZWxzZSB7XG4gICAgLy8gT3VyIG5lZWRsZSBpcyBsZXNzIHRoYW4gYUhheXN0YWNrW21pZF0uXG4gICAgaWYgKG1pZCAtIGFMb3cgPiAxKSB7XG4gICAgICAvLyBUaGUgZWxlbWVudCBpcyBpbiB0aGUgbG93ZXIgaGFsZi5cbiAgICAgIHJldHVybiByZWN1cnNpdmVTZWFyY2goYUxvdywgbWlkLCBhTmVlZGxlLCBhSGF5c3RhY2ssIGFDb21wYXJlLCBhQmlhcyk7XG4gICAgfVxuXG4gICAgLy8gd2UgYXJlIGluIHRlcm1pbmF0aW9uIGNhc2UgKDMpIG9yICgyKSBhbmQgcmV0dXJuIHRoZSBhcHByb3ByaWF0ZSB0aGluZy5cbiAgICBpZiAoYUJpYXMgPT0gZXhwb3J0cy5MRUFTVF9VUFBFUl9CT1VORCkge1xuICAgICAgcmV0dXJuIG1pZDtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGFMb3cgPCAwID8gLTEgOiBhTG93O1xuICAgIH1cbiAgfVxufVxuXG4vKipcbiAqIFRoaXMgaXMgYW4gaW1wbGVtZW50YXRpb24gb2YgYmluYXJ5IHNlYXJjaCB3aGljaCB3aWxsIGFsd2F5cyB0cnkgYW5kIHJldHVyblxuICogdGhlIGluZGV4IG9mIHRoZSBjbG9zZXN0IGVsZW1lbnQgaWYgdGhlcmUgaXMgbm8gZXhhY3QgaGl0LiBUaGlzIGlzIGJlY2F1c2VcbiAqIG1hcHBpbmdzIGJldHdlZW4gb3JpZ2luYWwgYW5kIGdlbmVyYXRlZCBsaW5lL2NvbCBwYWlycyBhcmUgc2luZ2xlIHBvaW50cyxcbiAqIGFuZCB0aGVyZSBpcyBhbiBpbXBsaWNpdCByZWdpb24gYmV0d2VlbiBlYWNoIG9mIHRoZW0sIHNvIGEgbWlzcyBqdXN0IG1lYW5zXG4gKiB0aGF0IHlvdSBhcmVuJ3Qgb24gdGhlIHZlcnkgc3RhcnQgb2YgYSByZWdpb24uXG4gKlxuICogQHBhcmFtIGFOZWVkbGUgVGhlIGVsZW1lbnQgeW91IGFyZSBsb29raW5nIGZvci5cbiAqIEBwYXJhbSBhSGF5c3RhY2sgVGhlIGFycmF5IHRoYXQgaXMgYmVpbmcgc2VhcmNoZWQuXG4gKiBAcGFyYW0gYUNvbXBhcmUgQSBmdW5jdGlvbiB3aGljaCB0YWtlcyB0aGUgbmVlZGxlIGFuZCBhbiBlbGVtZW50IGluIHRoZVxuICogICAgIGFycmF5IGFuZCByZXR1cm5zIC0xLCAwLCBvciAxIGRlcGVuZGluZyBvbiB3aGV0aGVyIHRoZSBuZWVkbGUgaXMgbGVzc1xuICogICAgIHRoYW4sIGVxdWFsIHRvLCBvciBncmVhdGVyIHRoYW4gdGhlIGVsZW1lbnQsIHJlc3BlY3RpdmVseS5cbiAqIEBwYXJhbSBhQmlhcyBFaXRoZXIgJ2JpbmFyeVNlYXJjaC5HUkVBVEVTVF9MT1dFUl9CT1VORCcgb3JcbiAqICAgICAnYmluYXJ5U2VhcmNoLkxFQVNUX1VQUEVSX0JPVU5EJy4gU3BlY2lmaWVzIHdoZXRoZXIgdG8gcmV0dXJuIHRoZVxuICogICAgIGNsb3Nlc3QgZWxlbWVudCB0aGF0IGlzIHNtYWxsZXIgdGhhbiBvciBncmVhdGVyIHRoYW4gdGhlIG9uZSB3ZSBhcmVcbiAqICAgICBzZWFyY2hpbmcgZm9yLCByZXNwZWN0aXZlbHksIGlmIHRoZSBleGFjdCBlbGVtZW50IGNhbm5vdCBiZSBmb3VuZC5cbiAqICAgICBEZWZhdWx0cyB0byAnYmluYXJ5U2VhcmNoLkdSRUFURVNUX0xPV0VSX0JPVU5EJy5cbiAqL1xuZXhwb3J0cy5zZWFyY2ggPSBmdW5jdGlvbiBzZWFyY2goYU5lZWRsZSwgYUhheXN0YWNrLCBhQ29tcGFyZSwgYUJpYXMpIHtcbiAgaWYgKGFIYXlzdGFjay5sZW5ndGggPT09IDApIHtcbiAgICByZXR1cm4gLTE7XG4gIH1cblxuICB2YXIgaW5kZXggPSByZWN1cnNpdmVTZWFyY2goLTEsIGFIYXlzdGFjay5sZW5ndGgsIGFOZWVkbGUsIGFIYXlzdGFjayxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFDb21wYXJlLCBhQmlhcyB8fCBleHBvcnRzLkdSRUFURVNUX0xPV0VSX0JPVU5EKTtcbiAgaWYgKGluZGV4IDwgMCkge1xuICAgIHJldHVybiAtMTtcbiAgfVxuXG4gIC8vIFdlIGhhdmUgZm91bmQgZWl0aGVyIHRoZSBleGFjdCBlbGVtZW50LCBvciB0aGUgbmV4dC1jbG9zZXN0IGVsZW1lbnQgdGhhblxuICAvLyB0aGUgb25lIHdlIGFyZSBzZWFyY2hpbmcgZm9yLiBIb3dldmVyLCB0aGVyZSBtYXkgYmUgbW9yZSB0aGFuIG9uZSBzdWNoXG4gIC8vIGVsZW1lbnQuIE1ha2Ugc3VyZSB3ZSBhbHdheXMgcmV0dXJuIHRoZSBzbWFsbGVzdCBvZiB0aGVzZS5cbiAgd2hpbGUgKGluZGV4IC0gMSA+PSAwKSB7XG4gICAgaWYgKGFDb21wYXJlKGFIYXlzdGFja1tpbmRleF0sIGFIYXlzdGFja1tpbmRleCAtIDFdLCB0cnVlKSAhPT0gMCkge1xuICAgICAgYnJlYWs7XG4gICAgfVxuICAgIC0taW5kZXg7XG4gIH1cblxuICByZXR1cm4gaW5kZXg7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvYmluYXJ5LXNlYXJjaC5qc1xuLy8gbW9kdWxlIGlkID0gOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbi8vIEl0IHR1cm5zIG91dCB0aGF0IHNvbWUgKG1vc3Q/KSBKYXZhU2NyaXB0IGVuZ2luZXMgZG9uJ3Qgc2VsZi1ob3N0XG4vLyBgQXJyYXkucHJvdG90eXBlLnNvcnRgLiBUaGlzIG1ha2VzIHNlbnNlIGJlY2F1c2UgQysrIHdpbGwgbGlrZWx5IHJlbWFpblxuLy8gZmFzdGVyIHRoYW4gSlMgd2hlbiBkb2luZyByYXcgQ1BVLWludGVuc2l2ZSBzb3J0aW5nLiBIb3dldmVyLCB3aGVuIHVzaW5nIGFcbi8vIGN1c3RvbSBjb21wYXJhdG9yIGZ1bmN0aW9uLCBjYWxsaW5nIGJhY2sgYW5kIGZvcnRoIGJldHdlZW4gdGhlIFZNJ3MgQysrIGFuZFxuLy8gSklUJ2QgSlMgaXMgcmF0aGVyIHNsb3cgKmFuZCogbG9zZXMgSklUIHR5cGUgaW5mb3JtYXRpb24sIHJlc3VsdGluZyBpblxuLy8gd29yc2UgZ2VuZXJhdGVkIGNvZGUgZm9yIHRoZSBjb21wYXJhdG9yIGZ1bmN0aW9uIHRoYW4gd291bGQgYmUgb3B0aW1hbC4gSW5cbi8vIGZhY3QsIHdoZW4gc29ydGluZyB3aXRoIGEgY29tcGFyYXRvciwgdGhlc2UgY29zdHMgb3V0d2VpZ2ggdGhlIGJlbmVmaXRzIG9mXG4vLyBzb3J0aW5nIGluIEMrKy4gQnkgdXNpbmcgb3VyIG93biBKUy1pbXBsZW1lbnRlZCBRdWljayBTb3J0IChiZWxvdyksIHdlIGdldFxuLy8gYSB+MzUwMG1zIG1lYW4gc3BlZWQtdXAgaW4gYGJlbmNoL2JlbmNoLmh0bWxgLlxuXG4vKipcbiAqIFN3YXAgdGhlIGVsZW1lbnRzIGluZGV4ZWQgYnkgYHhgIGFuZCBgeWAgaW4gdGhlIGFycmF5IGBhcnlgLlxuICpcbiAqIEBwYXJhbSB7QXJyYXl9IGFyeVxuICogICAgICAgIFRoZSBhcnJheS5cbiAqIEBwYXJhbSB7TnVtYmVyfSB4XG4gKiAgICAgICAgVGhlIGluZGV4IG9mIHRoZSBmaXJzdCBpdGVtLlxuICogQHBhcmFtIHtOdW1iZXJ9IHlcbiAqICAgICAgICBUaGUgaW5kZXggb2YgdGhlIHNlY29uZCBpdGVtLlxuICovXG5mdW5jdGlvbiBzd2FwKGFyeSwgeCwgeSkge1xuICB2YXIgdGVtcCA9IGFyeVt4XTtcbiAgYXJ5W3hdID0gYXJ5W3ldO1xuICBhcnlbeV0gPSB0ZW1wO1xufVxuXG4vKipcbiAqIFJldHVybnMgYSByYW5kb20gaW50ZWdlciB3aXRoaW4gdGhlIHJhbmdlIGBsb3cgLi4gaGlnaGAgaW5jbHVzaXZlLlxuICpcbiAqIEBwYXJhbSB7TnVtYmVyfSBsb3dcbiAqICAgICAgICBUaGUgbG93ZXIgYm91bmQgb24gdGhlIHJhbmdlLlxuICogQHBhcmFtIHtOdW1iZXJ9IGhpZ2hcbiAqICAgICAgICBUaGUgdXBwZXIgYm91bmQgb24gdGhlIHJhbmdlLlxuICovXG5mdW5jdGlvbiByYW5kb21JbnRJblJhbmdlKGxvdywgaGlnaCkge1xuICByZXR1cm4gTWF0aC5yb3VuZChsb3cgKyAoTWF0aC5yYW5kb20oKSAqIChoaWdoIC0gbG93KSkpO1xufVxuXG4vKipcbiAqIFRoZSBRdWljayBTb3J0IGFsZ29yaXRobS5cbiAqXG4gKiBAcGFyYW0ge0FycmF5fSBhcnlcbiAqICAgICAgICBBbiBhcnJheSB0byBzb3J0LlxuICogQHBhcmFtIHtmdW5jdGlvbn0gY29tcGFyYXRvclxuICogICAgICAgIEZ1bmN0aW9uIHRvIHVzZSB0byBjb21wYXJlIHR3byBpdGVtcy5cbiAqIEBwYXJhbSB7TnVtYmVyfSBwXG4gKiAgICAgICAgU3RhcnQgaW5kZXggb2YgdGhlIGFycmF5XG4gKiBAcGFyYW0ge051bWJlcn0gclxuICogICAgICAgIEVuZCBpbmRleCBvZiB0aGUgYXJyYXlcbiAqL1xuZnVuY3Rpb24gZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBwLCByKSB7XG4gIC8vIElmIG91ciBsb3dlciBib3VuZCBpcyBsZXNzIHRoYW4gb3VyIHVwcGVyIGJvdW5kLCB3ZSAoMSkgcGFydGl0aW9uIHRoZVxuICAvLyBhcnJheSBpbnRvIHR3byBwaWVjZXMgYW5kICgyKSByZWN1cnNlIG9uIGVhY2ggaGFsZi4gSWYgaXQgaXMgbm90LCB0aGlzIGlzXG4gIC8vIHRoZSBlbXB0eSBhcnJheSBhbmQgb3VyIGJhc2UgY2FzZS5cblxuICBpZiAocCA8IHIpIHtcbiAgICAvLyAoMSkgUGFydGl0aW9uaW5nLlxuICAgIC8vXG4gICAgLy8gVGhlIHBhcnRpdGlvbmluZyBjaG9vc2VzIGEgcGl2b3QgYmV0d2VlbiBgcGAgYW5kIGByYCBhbmQgbW92ZXMgYWxsXG4gICAgLy8gZWxlbWVudHMgdGhhdCBhcmUgbGVzcyB0aGFuIG9yIGVxdWFsIHRvIHRoZSBwaXZvdCB0byB0aGUgYmVmb3JlIGl0LCBhbmRcbiAgICAvLyBhbGwgdGhlIGVsZW1lbnRzIHRoYXQgYXJlIGdyZWF0ZXIgdGhhbiBpdCBhZnRlciBpdC4gVGhlIGVmZmVjdCBpcyB0aGF0XG4gICAgLy8gb25jZSBwYXJ0aXRpb24gaXMgZG9uZSwgdGhlIHBpdm90IGlzIGluIHRoZSBleGFjdCBwbGFjZSBpdCB3aWxsIGJlIHdoZW5cbiAgICAvLyB0aGUgYXJyYXkgaXMgcHV0IGluIHNvcnRlZCBvcmRlciwgYW5kIGl0IHdpbGwgbm90IG5lZWQgdG8gYmUgbW92ZWRcbiAgICAvLyBhZ2Fpbi4gVGhpcyBydW5zIGluIE8obikgdGltZS5cblxuICAgIC8vIEFsd2F5cyBjaG9vc2UgYSByYW5kb20gcGl2b3Qgc28gdGhhdCBhbiBpbnB1dCBhcnJheSB3aGljaCBpcyByZXZlcnNlXG4gICAgLy8gc29ydGVkIGRvZXMgbm90IGNhdXNlIE8obl4yKSBydW5uaW5nIHRpbWUuXG4gICAgdmFyIHBpdm90SW5kZXggPSByYW5kb21JbnRJblJhbmdlKHAsIHIpO1xuICAgIHZhciBpID0gcCAtIDE7XG5cbiAgICBzd2FwKGFyeSwgcGl2b3RJbmRleCwgcik7XG4gICAgdmFyIHBpdm90ID0gYXJ5W3JdO1xuXG4gICAgLy8gSW1tZWRpYXRlbHkgYWZ0ZXIgYGpgIGlzIGluY3JlbWVudGVkIGluIHRoaXMgbG9vcCwgdGhlIGZvbGxvd2luZyBob2xkXG4gICAgLy8gdHJ1ZTpcbiAgICAvL1xuICAgIC8vICAgKiBFdmVyeSBlbGVtZW50IGluIGBhcnlbcCAuLiBpXWAgaXMgbGVzcyB0aGFuIG9yIGVxdWFsIHRvIHRoZSBwaXZvdC5cbiAgICAvL1xuICAgIC8vICAgKiBFdmVyeSBlbGVtZW50IGluIGBhcnlbaSsxIC4uIGotMV1gIGlzIGdyZWF0ZXIgdGhhbiB0aGUgcGl2b3QuXG4gICAgZm9yICh2YXIgaiA9IHA7IGogPCByOyBqKyspIHtcbiAgICAgIGlmIChjb21wYXJhdG9yKGFyeVtqXSwgcGl2b3QpIDw9IDApIHtcbiAgICAgICAgaSArPSAxO1xuICAgICAgICBzd2FwKGFyeSwgaSwgaik7XG4gICAgICB9XG4gICAgfVxuXG4gICAgc3dhcChhcnksIGkgKyAxLCBqKTtcbiAgICB2YXIgcSA9IGkgKyAxO1xuXG4gICAgLy8gKDIpIFJlY3Vyc2Ugb24gZWFjaCBoYWxmLlxuXG4gICAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBwLCBxIC0gMSk7XG4gICAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCBxICsgMSwgcik7XG4gIH1cbn1cblxuLyoqXG4gKiBTb3J0IHRoZSBnaXZlbiBhcnJheSBpbi1wbGFjZSB3aXRoIHRoZSBnaXZlbiBjb21wYXJhdG9yIGZ1bmN0aW9uLlxuICpcbiAqIEBwYXJhbSB7QXJyYXl9IGFyeVxuICogICAgICAgIEFuIGFycmF5IHRvIHNvcnQuXG4gKiBAcGFyYW0ge2Z1bmN0aW9ufSBjb21wYXJhdG9yXG4gKiAgICAgICAgRnVuY3Rpb24gdG8gdXNlIHRvIGNvbXBhcmUgdHdvIGl0ZW1zLlxuICovXG5leHBvcnRzLnF1aWNrU29ydCA9IGZ1bmN0aW9uIChhcnksIGNvbXBhcmF0b3IpIHtcbiAgZG9RdWlja1NvcnQoYXJ5LCBjb21wYXJhdG9yLCAwLCBhcnkubGVuZ3RoIC0gMSk7XG59O1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvcXVpY2stc29ydC5qc1xuLy8gbW9kdWxlIGlkID0gOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiLCIvKiAtKi0gTW9kZToganM7IGpzLWluZGVudC1sZXZlbDogMjsgLSotICovXG4vKlxuICogQ29weXJpZ2h0IDIwMTEgTW96aWxsYSBGb3VuZGF0aW9uIGFuZCBjb250cmlidXRvcnNcbiAqIExpY2Vuc2VkIHVuZGVyIHRoZSBOZXcgQlNEIGxpY2Vuc2UuIFNlZSBMSUNFTlNFIG9yOlxuICogaHR0cDovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL0JTRC0zLUNsYXVzZVxuICovXG5cbnZhciBTb3VyY2VNYXBHZW5lcmF0b3IgPSByZXF1aXJlKCcuL3NvdXJjZS1tYXAtZ2VuZXJhdG9yJykuU291cmNlTWFwR2VuZXJhdG9yO1xudmFyIHV0aWwgPSByZXF1aXJlKCcuL3V0aWwnKTtcblxuLy8gTWF0Y2hlcyBhIFdpbmRvd3Mtc3R5bGUgYFxcclxcbmAgbmV3bGluZSBvciBhIGBcXG5gIG5ld2xpbmUgdXNlZCBieSBhbGwgb3RoZXJcbi8vIG9wZXJhdGluZyBzeXN0ZW1zIHRoZXNlIGRheXMgKGNhcHR1cmluZyB0aGUgcmVzdWx0KS5cbnZhciBSRUdFWF9ORVdMSU5FID0gLyhcXHI/XFxuKS87XG5cbi8vIE5ld2xpbmUgY2hhcmFjdGVyIGNvZGUgZm9yIGNoYXJDb2RlQXQoKSBjb21wYXJpc29uc1xudmFyIE5FV0xJTkVfQ09ERSA9IDEwO1xuXG4vLyBQcml2YXRlIHN5bWJvbCBmb3IgaWRlbnRpZnlpbmcgYFNvdXJjZU5vZGVgcyB3aGVuIG11bHRpcGxlIHZlcnNpb25zIG9mXG4vLyB0aGUgc291cmNlLW1hcCBsaWJyYXJ5IGFyZSBsb2FkZWQuIFRoaXMgTVVTVCBOT1QgQ0hBTkdFIGFjcm9zc1xuLy8gdmVyc2lvbnMhXG52YXIgaXNTb3VyY2VOb2RlID0gXCIkJCRpc1NvdXJjZU5vZGUkJCRcIjtcblxuLyoqXG4gKiBTb3VyY2VOb2RlcyBwcm92aWRlIGEgd2F5IHRvIGFic3RyYWN0IG92ZXIgaW50ZXJwb2xhdGluZy9jb25jYXRlbmF0aW5nXG4gKiBzbmlwcGV0cyBvZiBnZW5lcmF0ZWQgSmF2YVNjcmlwdCBzb3VyY2UgY29kZSB3aGlsZSBtYWludGFpbmluZyB0aGUgbGluZSBhbmRcbiAqIGNvbHVtbiBpbmZvcm1hdGlvbiBhc3NvY2lhdGVkIHdpdGggdGhlIG9yaWdpbmFsIHNvdXJjZSBjb2RlLlxuICpcbiAqIEBwYXJhbSBhTGluZSBUaGUgb3JpZ2luYWwgbGluZSBudW1iZXIuXG4gKiBAcGFyYW0gYUNvbHVtbiBUaGUgb3JpZ2luYWwgY29sdW1uIG51bWJlci5cbiAqIEBwYXJhbSBhU291cmNlIFRoZSBvcmlnaW5hbCBzb3VyY2UncyBmaWxlbmFtZS5cbiAqIEBwYXJhbSBhQ2h1bmtzIE9wdGlvbmFsLiBBbiBhcnJheSBvZiBzdHJpbmdzIHdoaWNoIGFyZSBzbmlwcGV0cyBvZlxuICogICAgICAgIGdlbmVyYXRlZCBKUywgb3Igb3RoZXIgU291cmNlTm9kZXMuXG4gKiBAcGFyYW0gYU5hbWUgVGhlIG9yaWdpbmFsIGlkZW50aWZpZXIuXG4gKi9cbmZ1bmN0aW9uIFNvdXJjZU5vZGUoYUxpbmUsIGFDb2x1bW4sIGFTb3VyY2UsIGFDaHVua3MsIGFOYW1lKSB7XG4gIHRoaXMuY2hpbGRyZW4gPSBbXTtcbiAgdGhpcy5zb3VyY2VDb250ZW50cyA9IHt9O1xuICB0aGlzLmxpbmUgPSBhTGluZSA9PSBudWxsID8gbnVsbCA6IGFMaW5lO1xuICB0aGlzLmNvbHVtbiA9IGFDb2x1bW4gPT0gbnVsbCA/IG51bGwgOiBhQ29sdW1uO1xuICB0aGlzLnNvdXJjZSA9IGFTb3VyY2UgPT0gbnVsbCA/IG51bGwgOiBhU291cmNlO1xuICB0aGlzLm5hbWUgPSBhTmFtZSA9PSBudWxsID8gbnVsbCA6IGFOYW1lO1xuICB0aGlzW2lzU291cmNlTm9kZV0gPSB0cnVlO1xuICBpZiAoYUNodW5rcyAhPSBudWxsKSB0aGlzLmFkZChhQ2h1bmtzKTtcbn1cblxuLyoqXG4gKiBDcmVhdGVzIGEgU291cmNlTm9kZSBmcm9tIGdlbmVyYXRlZCBjb2RlIGFuZCBhIFNvdXJjZU1hcENvbnN1bWVyLlxuICpcbiAqIEBwYXJhbSBhR2VuZXJhdGVkQ29kZSBUaGUgZ2VuZXJhdGVkIGNvZGVcbiAqIEBwYXJhbSBhU291cmNlTWFwQ29uc3VtZXIgVGhlIFNvdXJjZU1hcCBmb3IgdGhlIGdlbmVyYXRlZCBjb2RlXG4gKiBAcGFyYW0gYVJlbGF0aXZlUGF0aCBPcHRpb25hbC4gVGhlIHBhdGggdGhhdCByZWxhdGl2ZSBzb3VyY2VzIGluIHRoZVxuICogICAgICAgIFNvdXJjZU1hcENvbnN1bWVyIHNob3VsZCBiZSByZWxhdGl2ZSB0by5cbiAqL1xuU291cmNlTm9kZS5mcm9tU3RyaW5nV2l0aFNvdXJjZU1hcCA9XG4gIGZ1bmN0aW9uIFNvdXJjZU5vZGVfZnJvbVN0cmluZ1dpdGhTb3VyY2VNYXAoYUdlbmVyYXRlZENvZGUsIGFTb3VyY2VNYXBDb25zdW1lciwgYVJlbGF0aXZlUGF0aCkge1xuICAgIC8vIFRoZSBTb3VyY2VOb2RlIHdlIHdhbnQgdG8gZmlsbCB3aXRoIHRoZSBnZW5lcmF0ZWQgY29kZVxuICAgIC8vIGFuZCB0aGUgU291cmNlTWFwXG4gICAgdmFyIG5vZGUgPSBuZXcgU291cmNlTm9kZSgpO1xuXG4gICAgLy8gQWxsIGV2ZW4gaW5kaWNlcyBvZiB0aGlzIGFycmF5IGFyZSBvbmUgbGluZSBvZiB0aGUgZ2VuZXJhdGVkIGNvZGUsXG4gICAgLy8gd2hpbGUgYWxsIG9kZCBpbmRpY2VzIGFyZSB0aGUgbmV3bGluZXMgYmV0d2VlbiB0d28gYWRqYWNlbnQgbGluZXNcbiAgICAvLyAoc2luY2UgYFJFR0VYX05FV0xJTkVgIGNhcHR1cmVzIGl0cyBtYXRjaCkuXG4gICAgLy8gUHJvY2Vzc2VkIGZyYWdtZW50cyBhcmUgYWNjZXNzZWQgYnkgY2FsbGluZyBgc2hpZnROZXh0TGluZWAuXG4gICAgdmFyIHJlbWFpbmluZ0xpbmVzID0gYUdlbmVyYXRlZENvZGUuc3BsaXQoUkVHRVhfTkVXTElORSk7XG4gICAgdmFyIHJlbWFpbmluZ0xpbmVzSW5kZXggPSAwO1xuICAgIHZhciBzaGlmdE5leHRMaW5lID0gZnVuY3Rpb24oKSB7XG4gICAgICB2YXIgbGluZUNvbnRlbnRzID0gZ2V0TmV4dExpbmUoKTtcbiAgICAgIC8vIFRoZSBsYXN0IGxpbmUgb2YgYSBmaWxlIG1pZ2h0IG5vdCBoYXZlIGEgbmV3bGluZS5cbiAgICAgIHZhciBuZXdMaW5lID0gZ2V0TmV4dExpbmUoKSB8fCBcIlwiO1xuICAgICAgcmV0dXJuIGxpbmVDb250ZW50cyArIG5ld0xpbmU7XG5cbiAgICAgIGZ1bmN0aW9uIGdldE5leHRMaW5lKCkge1xuICAgICAgICByZXR1cm4gcmVtYWluaW5nTGluZXNJbmRleCA8IHJlbWFpbmluZ0xpbmVzLmxlbmd0aCA/XG4gICAgICAgICAgICByZW1haW5pbmdMaW5lc1tyZW1haW5pbmdMaW5lc0luZGV4KytdIDogdW5kZWZpbmVkO1xuICAgICAgfVxuICAgIH07XG5cbiAgICAvLyBXZSBuZWVkIHRvIHJlbWVtYmVyIHRoZSBwb3NpdGlvbiBvZiBcInJlbWFpbmluZ0xpbmVzXCJcbiAgICB2YXIgbGFzdEdlbmVyYXRlZExpbmUgPSAxLCBsYXN0R2VuZXJhdGVkQ29sdW1uID0gMDtcblxuICAgIC8vIFRoZSBnZW5lcmF0ZSBTb3VyY2VOb2RlcyB3ZSBuZWVkIGEgY29kZSByYW5nZS5cbiAgICAvLyBUbyBleHRyYWN0IGl0IGN1cnJlbnQgYW5kIGxhc3QgbWFwcGluZyBpcyB1c2VkLlxuICAgIC8vIEhlcmUgd2Ugc3RvcmUgdGhlIGxhc3QgbWFwcGluZy5cbiAgICB2YXIgbGFzdE1hcHBpbmcgPSBudWxsO1xuXG4gICAgYVNvdXJjZU1hcENvbnN1bWVyLmVhY2hNYXBwaW5nKGZ1bmN0aW9uIChtYXBwaW5nKSB7XG4gICAgICBpZiAobGFzdE1hcHBpbmcgIT09IG51bGwpIHtcbiAgICAgICAgLy8gV2UgYWRkIHRoZSBjb2RlIGZyb20gXCJsYXN0TWFwcGluZ1wiIHRvIFwibWFwcGluZ1wiOlxuICAgICAgICAvLyBGaXJzdCBjaGVjayBpZiB0aGVyZSBpcyBhIG5ldyBsaW5lIGluIGJldHdlZW4uXG4gICAgICAgIGlmIChsYXN0R2VuZXJhdGVkTGluZSA8IG1hcHBpbmcuZ2VuZXJhdGVkTGluZSkge1xuICAgICAgICAgIC8vIEFzc29jaWF0ZSBmaXJzdCBsaW5lIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgICAgYWRkTWFwcGluZ1dpdGhDb2RlKGxhc3RNYXBwaW5nLCBzaGlmdE5leHRMaW5lKCkpO1xuICAgICAgICAgIGxhc3RHZW5lcmF0ZWRMaW5lKys7XG4gICAgICAgICAgbGFzdEdlbmVyYXRlZENvbHVtbiA9IDA7XG4gICAgICAgICAgLy8gVGhlIHJlbWFpbmluZyBjb2RlIGlzIGFkZGVkIHdpdGhvdXQgbWFwcGluZ1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIFRoZXJlIGlzIG5vIG5ldyBsaW5lIGluIGJldHdlZW4uXG4gICAgICAgICAgLy8gQXNzb2NpYXRlIHRoZSBjb2RlIGJldHdlZW4gXCJsYXN0R2VuZXJhdGVkQ29sdW1uXCIgYW5kXG4gICAgICAgICAgLy8gXCJtYXBwaW5nLmdlbmVyYXRlZENvbHVtblwiIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgICAgdmFyIG5leHRMaW5lID0gcmVtYWluaW5nTGluZXNbcmVtYWluaW5nTGluZXNJbmRleF07XG4gICAgICAgICAgdmFyIGNvZGUgPSBuZXh0TGluZS5zdWJzdHIoMCwgbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4gLVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RHZW5lcmF0ZWRDb2x1bW4pO1xuICAgICAgICAgIHJlbWFpbmluZ0xpbmVzW3JlbWFpbmluZ0xpbmVzSW5kZXhdID0gbmV4dExpbmUuc3Vic3RyKG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uIC1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uKTtcbiAgICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uID0gbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW47XG4gICAgICAgICAgYWRkTWFwcGluZ1dpdGhDb2RlKGxhc3RNYXBwaW5nLCBjb2RlKTtcbiAgICAgICAgICAvLyBObyBtb3JlIHJlbWFpbmluZyBjb2RlLCBjb250aW51ZVxuICAgICAgICAgIGxhc3RNYXBwaW5nID0gbWFwcGluZztcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIC8vIFdlIGFkZCB0aGUgZ2VuZXJhdGVkIGNvZGUgdW50aWwgdGhlIGZpcnN0IG1hcHBpbmdcbiAgICAgIC8vIHRvIHRoZSBTb3VyY2VOb2RlIHdpdGhvdXQgYW55IG1hcHBpbmcuXG4gICAgICAvLyBFYWNoIGxpbmUgaXMgYWRkZWQgYXMgc2VwYXJhdGUgc3RyaW5nLlxuICAgICAgd2hpbGUgKGxhc3RHZW5lcmF0ZWRMaW5lIDwgbWFwcGluZy5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgIG5vZGUuYWRkKHNoaWZ0TmV4dExpbmUoKSk7XG4gICAgICAgIGxhc3RHZW5lcmF0ZWRMaW5lKys7XG4gICAgICB9XG4gICAgICBpZiAobGFzdEdlbmVyYXRlZENvbHVtbiA8IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uKSB7XG4gICAgICAgIHZhciBuZXh0TGluZSA9IHJlbWFpbmluZ0xpbmVzW3JlbWFpbmluZ0xpbmVzSW5kZXhdO1xuICAgICAgICBub2RlLmFkZChuZXh0TGluZS5zdWJzdHIoMCwgbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4pKTtcbiAgICAgICAgcmVtYWluaW5nTGluZXNbcmVtYWluaW5nTGluZXNJbmRleF0gPSBuZXh0TGluZS5zdWJzdHIobWFwcGluZy5nZW5lcmF0ZWRDb2x1bW4pO1xuICAgICAgICBsYXN0R2VuZXJhdGVkQ29sdW1uID0gbWFwcGluZy5nZW5lcmF0ZWRDb2x1bW47XG4gICAgICB9XG4gICAgICBsYXN0TWFwcGluZyA9IG1hcHBpbmc7XG4gICAgfSwgdGhpcyk7XG4gICAgLy8gV2UgaGF2ZSBwcm9jZXNzZWQgYWxsIG1hcHBpbmdzLlxuICAgIGlmIChyZW1haW5pbmdMaW5lc0luZGV4IDwgcmVtYWluaW5nTGluZXMubGVuZ3RoKSB7XG4gICAgICBpZiAobGFzdE1hcHBpbmcpIHtcbiAgICAgICAgLy8gQXNzb2NpYXRlIHRoZSByZW1haW5pbmcgY29kZSBpbiB0aGUgY3VycmVudCBsaW5lIHdpdGggXCJsYXN0TWFwcGluZ1wiXG4gICAgICAgIGFkZE1hcHBpbmdXaXRoQ29kZShsYXN0TWFwcGluZywgc2hpZnROZXh0TGluZSgpKTtcbiAgICAgIH1cbiAgICAgIC8vIGFuZCBhZGQgdGhlIHJlbWFpbmluZyBsaW5lcyB3aXRob3V0IGFueSBtYXBwaW5nXG4gICAgICBub2RlLmFkZChyZW1haW5pbmdMaW5lcy5zcGxpY2UocmVtYWluaW5nTGluZXNJbmRleCkuam9pbihcIlwiKSk7XG4gICAgfVxuXG4gICAgLy8gQ29weSBzb3VyY2VzQ29udGVudCBpbnRvIFNvdXJjZU5vZGVcbiAgICBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlcy5mb3JFYWNoKGZ1bmN0aW9uIChzb3VyY2VGaWxlKSB7XG4gICAgICB2YXIgY29udGVudCA9IGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VDb250ZW50Rm9yKHNvdXJjZUZpbGUpO1xuICAgICAgaWYgKGNvbnRlbnQgIT0gbnVsbCkge1xuICAgICAgICBpZiAoYVJlbGF0aXZlUGF0aCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlRmlsZSA9IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBzb3VyY2VGaWxlKTtcbiAgICAgICAgfVxuICAgICAgICBub2RlLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gbm9kZTtcblxuICAgIGZ1bmN0aW9uIGFkZE1hcHBpbmdXaXRoQ29kZShtYXBwaW5nLCBjb2RlKSB7XG4gICAgICBpZiAobWFwcGluZyA9PT0gbnVsbCB8fCBtYXBwaW5nLnNvdXJjZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIG5vZGUuYWRkKGNvZGUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICA/IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICA6IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtIGFDaHVuayBBIHN0cmluZyBzbmlwcGV0IG9mIGdlbmVyYXRlZCBKUyBjb2RlLCBhbm90aGVyIGluc3RhbmNlIG9mXG4gKiAgICAgICAgU291cmNlTm9kZSwgb3IgYW4gYXJyYXkgd2hlcmUgZWFjaCBtZW1iZXIgaXMgb25lIG9mIHRob3NlIHRoaW5ncy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gU291cmNlTm9kZV9hZGQoYUNodW5rKSB7XG4gIGlmIChBcnJheS5pc0FycmF5KGFDaHVuaykpIHtcbiAgICBhQ2h1bmsuZm9yRWFjaChmdW5jdGlvbiAoY2h1bmspIHtcbiAgICAgIHRoaXMuYWRkKGNodW5rKTtcbiAgICB9LCB0aGlzKTtcbiAgfVxuICBlbHNlIGlmIChhQ2h1bmtbaXNTb3VyY2VOb2RlXSB8fCB0eXBlb2YgYUNodW5rID09PSBcInN0cmluZ1wiKSB7XG4gICAgaWYgKGFDaHVuaykge1xuICAgICAgdGhpcy5jaGlsZHJlbi5wdXNoKGFDaHVuayk7XG4gICAgfVxuICB9XG4gIGVsc2Uge1xuICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICBcIkV4cGVjdGVkIGEgU291cmNlTm9kZSwgc3RyaW5nLCBvciBhbiBhcnJheSBvZiBTb3VyY2VOb2RlcyBhbmQgc3RyaW5ncy4gR290IFwiICsgYUNodW5rXG4gICAgKTtcbiAgfVxuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoZSBiZWdpbm5pbmcgb2YgdGhpcyBzb3VyY2Ugbm9kZS5cbiAqXG4gKiBAcGFyYW0gYUNodW5rIEEgc3RyaW5nIHNuaXBwZXQgb2YgZ2VuZXJhdGVkIEpTIGNvZGUsIGFub3RoZXIgaW5zdGFuY2Ugb2ZcbiAqICAgICAgICBTb3VyY2VOb2RlLCBvciBhbiBhcnJheSB3aGVyZSBlYWNoIG1lbWJlciBpcyBvbmUgb2YgdGhvc2UgdGhpbmdzLlxuICovXG5Tb3VyY2VOb2RlLnByb3RvdHlwZS5wcmVwZW5kID0gZnVuY3Rpb24gU291cmNlTm9kZV9wcmVwZW5kKGFDaHVuaykge1xuICBpZiAoQXJyYXkuaXNBcnJheShhQ2h1bmspKSB7XG4gICAgZm9yICh2YXIgaSA9IGFDaHVuay5sZW5ndGgtMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgIHRoaXMucHJlcGVuZChhQ2h1bmtbaV0pO1xuICAgIH1cbiAgfVxuICBlbHNlIGlmIChhQ2h1bmtbaXNTb3VyY2VOb2RlXSB8fCB0eXBlb2YgYUNodW5rID09PSBcInN0cmluZ1wiKSB7XG4gICAgdGhpcy5jaGlsZHJlbi51bnNoaWZ0KGFDaHVuayk7XG4gIH1cbiAgZWxzZSB7XG4gICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcbiAgICAgIFwiRXhwZWN0ZWQgYSBTb3VyY2VOb2RlLCBzdHJpbmcsIG9yIGFuIGFycmF5IG9mIFNvdXJjZU5vZGVzIGFuZCBzdHJpbmdzLiBHb3QgXCIgKyBhQ2h1bmtcbiAgICApO1xuICB9XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBXYWxrIG92ZXIgdGhlIHRyZWUgb2YgSlMgc25pcHBldHMgaW4gdGhpcyBub2RlIGFuZCBpdHMgY2hpbGRyZW4uIFRoZVxuICogd2Fsa2luZyBmdW5jdGlvbiBpcyBjYWxsZWQgb25jZSBmb3IgZWFjaCBzbmlwcGV0IG9mIEpTIGFuZCBpcyBwYXNzZWQgdGhhdFxuICogc25pcHBldCBhbmQgdGhlIGl0cyBvcmlnaW5hbCBhc3NvY2lhdGVkIHNvdXJjZSdzIGxpbmUvY29sdW1uIGxvY2F0aW9uLlxuICpcbiAqIEBwYXJhbSBhRm4gVGhlIHRyYXZlcnNhbCBmdW5jdGlvbi5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUud2FsayA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfd2FsayhhRm4pIHtcbiAgdmFyIGNodW5rO1xuICBmb3IgKHZhciBpID0gMCwgbGVuID0gdGhpcy5jaGlsZHJlbi5sZW5ndGg7IGkgPCBsZW47IGkrKykge1xuICAgIGNodW5rID0gdGhpcy5jaGlsZHJlbltpXTtcbiAgICBpZiAoY2h1bmtbaXNTb3VyY2VOb2RlXSkge1xuICAgICAgY2h1bmsud2FsayhhRm4pO1xuICAgIH1cbiAgICBlbHNlIHtcbiAgICAgIGlmIChjaHVuayAhPT0gJycpIHtcbiAgICAgICAgYUZuKGNodW5rLCB7IHNvdXJjZTogdGhpcy5zb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgICBsaW5lOiB0aGlzLmxpbmUsXG4gICAgICAgICAgICAgICAgICAgICBjb2x1bW46IHRoaXMuY29sdW1uLFxuICAgICAgICAgICAgICAgICAgICAgbmFtZTogdGhpcy5uYW1lIH0pO1xuICAgICAgfVxuICAgIH1cbiAgfVxufTtcblxuLyoqXG4gKiBMaWtlIGBTdHJpbmcucHJvdG90eXBlLmpvaW5gIGV4Y2VwdCBmb3IgU291cmNlTm9kZXMuIEluc2VydHMgYGFTdHJgIGJldHdlZW5cbiAqIGVhY2ggb2YgYHRoaXMuY2hpbGRyZW5gLlxuICpcbiAqIEBwYXJhbSBhU2VwIFRoZSBzZXBhcmF0b3IuXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLmpvaW4gPSBmdW5jdGlvbiBTb3VyY2VOb2RlX2pvaW4oYVNlcCkge1xuICB2YXIgbmV3Q2hpbGRyZW47XG4gIHZhciBpO1xuICB2YXIgbGVuID0gdGhpcy5jaGlsZHJlbi5sZW5ndGg7XG4gIGlmIChsZW4gPiAwKSB7XG4gICAgbmV3Q2hpbGRyZW4gPSBbXTtcbiAgICBmb3IgKGkgPSAwOyBpIDwgbGVuLTE7IGkrKykge1xuICAgICAgbmV3Q2hpbGRyZW4ucHVzaCh0aGlzLmNoaWxkcmVuW2ldKTtcbiAgICAgIG5ld0NoaWxkcmVuLnB1c2goYVNlcCk7XG4gICAgfVxuICAgIG5ld0NoaWxkcmVuLnB1c2godGhpcy5jaGlsZHJlbltpXSk7XG4gICAgdGhpcy5jaGlsZHJlbiA9IG5ld0NoaWxkcmVuO1xuICB9XG4gIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBDYWxsIFN0cmluZy5wcm90b3R5cGUucmVwbGFjZSBvbiB0aGUgdmVyeSByaWdodC1tb3N0IHNvdXJjZSBzbmlwcGV0LiBVc2VmdWxcbiAqIGZvciB0cmltbWluZyB3aGl0ZXNwYWNlIGZyb20gdGhlIGVuZCBvZiBhIHNvdXJjZSBub2RlLCBldGMuXG4gKlxuICogQHBhcmFtIGFQYXR0ZXJuIFRoZSBwYXR0ZXJuIHRvIHJlcGxhY2UuXG4gKiBAcGFyYW0gYVJlcGxhY2VtZW50IFRoZSB0aGluZyB0byByZXBsYWNlIHRoZSBwYXR0ZXJuIHdpdGguXG4gKi9cblNvdXJjZU5vZGUucHJvdG90eXBlLnJlcGxhY2VSaWdodCA9IGZ1bmN0aW9uIFNvdXJjZU5vZGVfcmVwbGFjZVJpZ2h0KGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpIHtcbiAgdmFyIGxhc3RDaGlsZCA9IHRoaXMuY2hpbGRyZW5bdGhpcy5jaGlsZHJlbi5sZW5ndGggLSAxXTtcbiAgaWYgKGxhc3RDaGlsZFtpc1NvdXJjZU5vZGVdKSB7XG4gICAgbGFzdENoaWxkLnJlcGxhY2VSaWdodChhUGF0dGVybiwgYVJlcGxhY2VtZW50KTtcbiAgfVxuICBlbHNlIGlmICh0eXBlb2YgbGFzdENoaWxkID09PSAnc3RyaW5nJykge1xuICAgIHRoaXMuY2hpbGRyZW5bdGhpcy5jaGlsZHJlbi5sZW5ndGggLSAxXSA9IGxhc3RDaGlsZC5yZXBsYWNlKGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpO1xuICB9XG4gIGVsc2Uge1xuICAgIHRoaXMuY2hpbGRyZW4ucHVzaCgnJy5yZXBsYWNlKGFQYXR0ZXJuLCBhUmVwbGFjZW1lbnQpKTtcbiAgfVxuICByZXR1cm4gdGhpcztcbn07XG5cbi8qKlxuICogU2V0IHRoZSBzb3VyY2UgY29udGVudCBmb3IgYSBzb3VyY2UgZmlsZS4gVGhpcyB3aWxsIGJlIGFkZGVkIHRvIHRoZSBTb3VyY2VNYXBHZW5lcmF0b3JcbiAqIGluIHRoZSBzb3VyY2VzQ29udGVudCBmaWVsZC5cbiAqXG4gKiBAcGFyYW0gYVNvdXJjZUZpbGUgVGhlIGZpbGVuYW1lIG9mIHRoZSBzb3VyY2UgZmlsZVxuICogQHBhcmFtIGFTb3VyY2VDb250ZW50IFRoZSBjb250ZW50IG9mIHRoZSBzb3VyY2UgZmlsZVxuICovXG5Tb3VyY2VOb2RlLnByb3RvdHlwZS5zZXRTb3VyY2VDb250ZW50ID1cbiAgZnVuY3Rpb24gU291cmNlTm9kZV9zZXRTb3VyY2VDb250ZW50KGFTb3VyY2VGaWxlLCBhU291cmNlQ29udGVudCkge1xuICAgIHRoaXMuc291cmNlQ29udGVudHNbdXRpbC50b1NldFN0cmluZyhhU291cmNlRmlsZSldID0gYVNvdXJjZUNvbnRlbnQ7XG4gIH07XG5cbi8qKlxuICogV2FsayBvdmVyIHRoZSB0cmVlIG9mIFNvdXJjZU5vZGVzLiBUaGUgd2Fsa2luZyBmdW5jdGlvbiBpcyBjYWxsZWQgZm9yIGVhY2hcbiAqIHNvdXJjZSBmaWxlIGNvbnRlbnQgYW5kIGlzIHBhc3NlZCB0aGUgZmlsZW5hbWUgYW5kIHNvdXJjZSBjb250ZW50LlxuICpcbiAqIEBwYXJhbSBhRm4gVGhlIHRyYXZlcnNhbCBmdW5jdGlvbi5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUud2Fsa1NvdXJjZUNvbnRlbnRzID1cbiAgZnVuY3Rpb24gU291cmNlTm9kZV93YWxrU291cmNlQ29udGVudHMoYUZuKSB7XG4gICAgZm9yICh2YXIgaSA9IDAsIGxlbiA9IHRoaXMuY2hpbGRyZW4ubGVuZ3RoOyBpIDwgbGVuOyBpKyspIHtcbiAgICAgIGlmICh0aGlzLmNoaWxkcmVuW2ldW2lzU291cmNlTm9kZV0pIHtcbiAgICAgICAgdGhpcy5jaGlsZHJlbltpXS53YWxrU291cmNlQ29udGVudHMoYUZuKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICB2YXIgc291cmNlcyA9IE9iamVjdC5rZXlzKHRoaXMuc291cmNlQ29udGVudHMpO1xuICAgIGZvciAodmFyIGkgPSAwLCBsZW4gPSBzb3VyY2VzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICBhRm4odXRpbC5mcm9tU2V0U3RyaW5nKHNvdXJjZXNbaV0pLCB0aGlzLnNvdXJjZUNvbnRlbnRzW3NvdXJjZXNbaV1dKTtcbiAgICB9XG4gIH07XG5cbi8qKlxuICogUmV0dXJuIHRoZSBzdHJpbmcgcmVwcmVzZW50YXRpb24gb2YgdGhpcyBzb3VyY2Ugbm9kZS4gV2Fsa3Mgb3ZlciB0aGUgdHJlZVxuICogYW5kIGNvbmNhdGVuYXRlcyBhbGwgdGhlIHZhcmlvdXMgc25pcHBldHMgdG9nZXRoZXIgdG8gb25lIHN0cmluZy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiBTb3VyY2VOb2RlX3RvU3RyaW5nKCkge1xuICB2YXIgc3RyID0gXCJcIjtcbiAgdGhpcy53YWxrKGZ1bmN0aW9uIChjaHVuaykge1xuICAgIHN0ciArPSBjaHVuaztcbiAgfSk7XG4gIHJldHVybiBzdHI7XG59O1xuXG4vKipcbiAqIFJldHVybnMgdGhlIHN0cmluZyByZXByZXNlbnRhdGlvbiBvZiB0aGlzIHNvdXJjZSBub2RlIGFsb25nIHdpdGggYSBzb3VyY2VcbiAqIG1hcC5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUudG9TdHJpbmdXaXRoU291cmNlTWFwID0gZnVuY3Rpb24gU291cmNlTm9kZV90b1N0cmluZ1dpdGhTb3VyY2VNYXAoYUFyZ3MpIHtcbiAgdmFyIGdlbmVyYXRlZCA9IHtcbiAgICBjb2RlOiBcIlwiLFxuICAgIGxpbmU6IDEsXG4gICAgY29sdW1uOiAwXG4gIH07XG4gIHZhciBtYXAgPSBuZXcgU291cmNlTWFwR2VuZXJhdG9yKGFBcmdzKTtcbiAgdmFyIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgdmFyIGxhc3RPcmlnaW5hbFNvdXJjZSA9IG51bGw7XG4gIHZhciBsYXN0T3JpZ2luYWxMaW5lID0gbnVsbDtcbiAgdmFyIGxhc3RPcmlnaW5hbENvbHVtbiA9IG51bGw7XG4gIHZhciBsYXN0T3JpZ2luYWxOYW1lID0gbnVsbDtcbiAgdGhpcy53YWxrKGZ1bmN0aW9uIChjaHVuaywgb3JpZ2luYWwpIHtcbiAgICBnZW5lcmF0ZWQuY29kZSArPSBjaHVuaztcbiAgICBpZiAob3JpZ2luYWwuc291cmNlICE9PSBudWxsXG4gICAgICAgICYmIG9yaWdpbmFsLmxpbmUgIT09IG51bGxcbiAgICAgICAgJiYgb3JpZ2luYWwuY29sdW1uICE9PSBudWxsKSB7XG4gICAgICBpZihsYXN0T3JpZ2luYWxTb3VyY2UgIT09IG9yaWdpbmFsLnNvdXJjZVxuICAgICAgICAgfHwgbGFzdE9yaWdpbmFsTGluZSAhPT0gb3JpZ2luYWwubGluZVxuICAgICAgICAgfHwgbGFzdE9yaWdpbmFsQ29sdW1uICE9PSBvcmlnaW5hbC5jb2x1bW5cbiAgICAgICAgIHx8IGxhc3RPcmlnaW5hbE5hbWUgIT09IG9yaWdpbmFsLm5hbWUpIHtcbiAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgIHNvdXJjZTogb3JpZ2luYWwuc291cmNlLFxuICAgICAgICAgIG9yaWdpbmFsOiB7XG4gICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgY29sdW1uOiBvcmlnaW5hbC5jb2x1bW5cbiAgICAgICAgICB9LFxuICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgbGluZTogZ2VuZXJhdGVkLmxpbmUsXG4gICAgICAgICAgICBjb2x1bW46IGdlbmVyYXRlZC5jb2x1bW5cbiAgICAgICAgICB9LFxuICAgICAgICAgIG5hbWU6IG9yaWdpbmFsLm5hbWVcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBvcmlnaW5hbC5zb3VyY2U7XG4gICAgICBsYXN0T3JpZ2luYWxMaW5lID0gb3JpZ2luYWwubGluZTtcbiAgICAgIGxhc3RPcmlnaW5hbENvbHVtbiA9IG9yaWdpbmFsLmNvbHVtbjtcbiAgICAgIGxhc3RPcmlnaW5hbE5hbWUgPSBvcmlnaW5hbC5uYW1lO1xuICAgICAgc291cmNlTWFwcGluZ0FjdGl2ZSA9IHRydWU7XG4gICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICBtYXAuYWRkTWFwcGluZyh7XG4gICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgIGxpbmU6IGdlbmVyYXRlZC5saW5lLFxuICAgICAgICAgIGNvbHVtbjogZ2VuZXJhdGVkLmNvbHVtblxuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGxhc3RPcmlnaW5hbFNvdXJjZSA9IG51bGw7XG4gICAgICBzb3VyY2VNYXBwaW5nQWN0aXZlID0gZmFsc2U7XG4gICAgfVxuICAgIGZvciAodmFyIGlkeCA9IDAsIGxlbmd0aCA9IGNodW5rLmxlbmd0aDsgaWR4IDwgbGVuZ3RoOyBpZHgrKykge1xuICAgICAgaWYgKGNodW5rLmNoYXJDb2RlQXQoaWR4KSA9PT0gTkVXTElORV9DT0RFKSB7XG4gICAgICAgIGdlbmVyYXRlZC5saW5lKys7XG4gICAgICAgIGdlbmVyYXRlZC5jb2x1bW4gPSAwO1xuICAgICAgICAvLyBNYXBwaW5ncyBlbmQgYXQgZW9sXG4gICAgICAgIGlmIChpZHggKyAxID09PSBsZW5ndGgpIHtcbiAgICAgICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBudWxsO1xuICAgICAgICAgIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgICAgICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgICAgc291cmNlOiBvcmlnaW5hbC5zb3VyY2UsXG4gICAgICAgICAgICBvcmlnaW5hbDoge1xuICAgICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcbiAgdGhpcy53YWxrU291cmNlQ29udGVudHMoZnVuY3Rpb24gKHNvdXJjZUZpbGUsIHNvdXJjZUNvbnRlbnQpIHtcbiAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHsgY29kZTogZ2VuZXJhdGVkLmNvZGUsIG1hcDogbWFwIH07XG59O1xuXG5leHBvcnRzLlNvdXJjZU5vZGUgPSBTb3VyY2VOb2RlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW5vZGUuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/node_modules/@babel/generator/node_modules/source-map/dist/source-map.js b/node_modules/@babel/generator/node_modules/source-map/dist/source-map.js deleted file mode 100644 index 4e630e29..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/dist/source-map.js +++ /dev/null @@ -1,3090 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. 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 Google 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 THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; \ No newline at end of file diff --git a/node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js b/node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js deleted file mode 100644 index f2a46bd0..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&r.setSourceContent(n,t)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),f=0,d=h.length;f0){if(!i.compareByGeneratedPositionsInflated(n,h[f-1]))continue;e+=","}e+=o.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(t=this._sources.indexOf(n.source),e+=o.encode(t-g),g=t,e+=o.encode(n.originalLine-1-l),l=n.originalLine-1,e+=o.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(r=this._names.indexOf(n.name),e+=o.encode(r-c),c=r)),p+=e}return p},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return e<0?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(_))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return e}function l(e){return g(e)?"$"+e:e}function c(e){return g(e)?e.slice(1):e}function g(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,n,r){var t=e.source-n.source;return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:e.name-n.name))))}function h(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=e.source-n.source,0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:e.name-n.name))))}function f(e,n){return e===n?0:e>n?1:-1}function d(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=f(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:f(e.name,n.name)))))}n.getArg=r;var m=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,_=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(m)},n.relative=a;var v=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=v?u:l,n.fromSetString=v?u:c,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d},function(e,n,r){function t(){this._array=[],this._set=s?new Map:Object.create(null)}var o=r(4),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;o=0)return n}else{var r=o.toSetString(e);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&er||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e){var n=e;return"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=n.sections?new s(n):new o(n)}function o(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),t=a.getArg(n,"sources"),o=a.getArg(n,"names",[]),i=a.getArg(n,"sourceRoot",null),s=a.getArg(n,"sourcesContent",null),u=a.getArg(n,"mappings"),c=a.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);t=t.map(String).map(a.normalize).map(function(e){return i&&a.isAbsolute(i)&&a.isAbsolute(e)?a.relative(i,e):e}),this._names=l.fromArray(o.map(String),!0),this._sources=l.fromArray(t,!0),this.sourceRoot=i,this.sourcesContent=s,this._mappings=u,this.file=c}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),o=a.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var i={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=a.getArg(e,"offset"),r=a.getArg(n,"line"),o=a.getArg(n,"column");if(r=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.fromSourceMap=function(e){var n=Object.create(o.prototype),r=n._names=l.fromArray(e._names.toArray(),!0),t=n._sources=l.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var s=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=s.length;p1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),S.push(r),"number"==typeof r.originalLine&&A.push(r)}g(S,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,g(A,a.compareByOriginalPositions),this.__originalMappings=A},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=a.join(this.sourceRoot,i)));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=a.urlParse(this.sourceRoot))){var t=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};n=this._sources.indexOf(n);var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(i=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;r0){for(n=[],r=0;r 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\n\t else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t };\n\t\n\t/**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\tSourceMapGenerator.prototype._serializeMappings =\n\t function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var next;\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = ''\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t next += ',';\n\t }\n\t }\n\t\n\t next += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t next += base64VLQ.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t\n\t // lines are stored 0-based in SourceMap spec version 3\n\t next += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t next += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t next += base64VLQ.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\t\n\t result += next;\n\t }\n\t\n\t return result;\n\t };\n\t\n\tSourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t/**\n\t * Externalize the source map.\n\t */\n\tSourceMapGenerator.prototype.toJSON =\n\t function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t/**\n\t * Render the source map being generated to a string.\n\t */\n\tSourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\texports.SourceMapGenerator = SourceMapGenerator;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t\n\tvar base64 = __webpack_require__(3);\n\t\n\t// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t// length quantities we use in the source map spec, the first bit is the sign,\n\t// the next four bits are the actual value, and the 6th bit is the\n\t// continuation bit. The continuation bit tells us whether there are more\n\t// digits in this value following this digit.\n\t//\n\t// Continuation\n\t// | Sign\n\t// | |\n\t// V V\n\t// 101011\n\t\n\tvar VLQ_BASE_SHIFT = 5;\n\t\n\t// binary: 100000\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t// binary: 011111\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t// binary: 100000\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t/**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t}\n\t\n\t/**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t}\n\t\n\t/**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\texports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t};\n\t\n\t/**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\texports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t/**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\texports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\t\n\t/**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\texports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t/**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\tfunction getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}\n\texports.getArg = getArg;\n\t\n\tvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\n\tvar dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\tfunction urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t}\n\texports.urlParse = urlParse;\n\t\n\tfunction urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t}\n\texports.urlGenerate = urlGenerate;\n\t\n\t/**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consecutive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\tfunction normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}\n\texports.normalize = normalize;\n\t\n\t/**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\tfunction join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t}\n\texports.join = join;\n\t\n\texports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n\t};\n\t\n\t/**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\tfunction relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t}\n\texports.relative = relative;\n\t\n\tvar supportsNullProto = (function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t}());\n\t\n\tfunction identity (s) {\n\t return s;\n\t}\n\t\n\t/**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\tfunction toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\t\n\t return aStr;\n\t}\n\texports.toSetString = supportsNullProto ? identity : toSetString;\n\t\n\tfunction fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\t\n\t return aStr;\n\t}\n\texports.fromSetString = supportsNullProto ? identity : fromSetString;\n\t\n\tfunction isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\t\n\t var length = s.length;\n\t\n\t if (length < 9 /* \"__proto__\".length */) {\n\t return false;\n\t }\n\t\n\t if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n\t s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n\t s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n\t s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 9) !== 95 /* '_' */) {\n\t return false;\n\t }\n\t\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36 /* '$' */) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\tfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t/**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\tfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\tfunction strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\tfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\t\n\t/**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\tfunction ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\t\n\t/**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\tArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t};\n\t\n\t/**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\tArraySet.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\t\n\t/**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t if (hasNativeMap) {\n\t this._set.set(aStr, idx);\n\t } else {\n\t this._set[sStr] = idx;\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.has = function ArraySet_has(aStr) {\n\t if (hasNativeMap) {\n\t return this._set.has(aStr);\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t return has.call(this._set, sStr);\n\t }\n\t};\n\t\n\t/**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t if (has.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\t\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\t\n\t/**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\tArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\t\n\t/**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\tArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\t\n\texports.ArraySet = ArraySet;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\t\n\t/**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\t\n\t/**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\tfunction MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t}\n\t\n\t/**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\tMappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t/**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\tMappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t};\n\t\n\t/**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\tMappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t};\n\t\n\texports.MappingList = MappingList;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar binarySearch = __webpack_require__(8);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar base64VLQ = __webpack_require__(2);\n\tvar quickSort = __webpack_require__(9).quickSort;\n\t\n\tfunction SourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap)\n\t : new BasicSourceMapConsumer(sourceMap);\n\t}\n\t\n\tSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n\t}\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tSourceMapConsumer.prototype._version = 3;\n\t\n\t// `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t// are lazily instantiated, accessed via the `_generatedMappings` and\n\t// `_originalMappings` getters respectively, and we only parse the mappings\n\t// and create these arrays once queried for a source location. We jump through\n\t// these hoops because there can be many thousands of mappings, and parsing\n\t// them is expensive, so we only want to do it if we must.\n\t//\n\t// Each object in the arrays is of the form:\n\t//\n\t// {\n\t// generatedLine: The line number in the generated code,\n\t// generatedColumn: The column number in the generated code,\n\t// source: The path to the original source file that generated this\n\t// chunk of code,\n\t// originalLine: The line number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// originalColumn: The column number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// name: The name of the original symbol which generated this chunk of\n\t// code.\n\t// }\n\t//\n\t// All properties except for `generatedLine` and `generatedColumn` can be\n\t// `null`.\n\t//\n\t// `_generatedMappings` is ordered by the generated positions.\n\t//\n\t// `_originalMappings` is ordered by the original positions.\n\t\n\tSourceMapConsumer.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\tSourceMapConsumer.GENERATED_ORDER = 1;\n\tSourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\tSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\tSourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t if (source != null && sourceRoot != null) {\n\t source = util.join(sourceRoot, source);\n\t }\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t/**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: Optional. the column number in the original source.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tSourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t if (this.sourceRoot != null) {\n\t needle.source = util.relative(this.sourceRoot, needle.source);\n\t }\n\t if (!this._sources.has(needle.source)) {\n\t return [];\n\t }\n\t needle.source = this._sources.indexOf(needle.source);\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\texports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t/**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The only parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\tfunction BasicSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t sources = sources\n\t .map(String)\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this.file = file;\n\t}\n\t\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t/**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @returns BasicSourceMapConsumer\n\t */\n\tBasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tBasicSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._sources.toArray().map(function (s) {\n\t return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n\t }, this);\n\t }\n\t});\n\t\n\t/**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tBasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t/**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\tBasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t/**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\tBasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t if (this.sourceRoot != null) {\n\t source = util.join(this.sourceRoot, source);\n\t }\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tBasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t if (this.sourceRoot != null) {\n\t aSource = util.relative(this.sourceRoot, aSource);\n\t }\n\t\n\t if (this._sources.has(aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(aSource)];\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t if (this.sourceRoot != null) {\n\t source = util.relative(this.sourceRoot, source);\n\t }\n\t if (!this._sources.has(source)) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t source = this._sources.indexOf(source);\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\texports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t/**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The only parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\tfunction IndexedSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n\t }\n\t });\n\t}\n\t\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t});\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tIndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tIndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t if (section.consumer.sourceRoot !== null) {\n\t source = util.join(section.consumer.sourceRoot, source);\n\t }\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\texports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\texports.GREATEST_LOWER_BOUND = 1;\n\texports.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\tfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\texports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t// It turns out that some (most?) JavaScript engines don't self-host\n\t// `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t// faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t// custom comparator function, calling back and forth between the VM's C++ and\n\t// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t// worse generated code for the comparator function than would be optimal. In\n\t// fact, when sorting with a comparator, these costs outweigh the benefits of\n\t// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t// a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t/**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\t\n\t/**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t}\n\t\n\t/**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\t\n\t/**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\texports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\tvar util = __webpack_require__(4);\n\t\n\t// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t// operating systems these days (capturing the result).\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t// Newline character code for charCodeAt() comparisons\n\tvar NEWLINE_CODE = 10;\n\t\n\t// Private symbol for identifying `SourceNode`s when multiple versions of\n\t// the source-map library are loaded. This MUST NOT CHANGE across\n\t// versions!\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t/**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\tfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\t\n\t/**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\tSourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are accessed by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\t var shiftNextLine = function() {\n\t var lineContents = getNextLine();\n\t // The last line of a file might not have a newline.\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\t\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ?\n\t remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\tSourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\tSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\tSourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t/**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t/**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\tSourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\t\n\t/**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\tSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t};\n\t\n\texports.SourceNode = SourceNode;\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// source-map.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 42c329f865e32e011afb","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./source-map.js\n// module id = 0\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-generator.js\n// module id = 1\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64-vlq.js\n// module id = 2\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64.js\n// module id = 3\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/util.js\n// module id = 4\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/array-set.js\n// module id = 5\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/mapping-list.js\n// module id = 6\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap)\n : new BasicSourceMapConsumer(sourceMap);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n if (source != null && sourceRoot != null) {\n source = util.join(sourceRoot, source);\n }\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: Optional. the column number in the original source.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n if (this.sourceRoot != null) {\n needle.source = util.relative(this.sourceRoot, needle.source);\n }\n if (!this._sources.has(needle.source)) {\n return [];\n }\n needle.source = this._sources.indexOf(needle.source);\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The only parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._sources.toArray().map(function (s) {\n return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n }, this);\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n if (this.sourceRoot != null) {\n source = util.join(this.sourceRoot, source);\n }\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n if (this.sourceRoot != null) {\n aSource = util.relative(this.sourceRoot, aSource);\n }\n\n if (this._sources.has(aSource)) {\n return this.sourcesContent[this._sources.indexOf(aSource)];\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + aSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n if (this.sourceRoot != null) {\n source = util.relative(this.sourceRoot, source);\n }\n if (!this._sources.has(source)) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n source = this._sources.indexOf(source);\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The only parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if (section.consumer.sourceRoot !== null) {\n source = util.join(section.consumer.sourceRoot, source);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-consumer.js\n// module id = 7\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/binary-search.js\n// module id = 8\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/quick-sort.js\n// module id = 9\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex];\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex];\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-node.js\n// module id = 10\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/array-set.js b/node_modules/@babel/generator/node_modules/source-map/lib/array-set.js deleted file mode 100644 index fbd5c81c..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/array-set.js +++ /dev/null @@ -1,121 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var has = Object.prototype.hasOwnProperty; -var hasNativeMap = typeof Map !== "undefined"; - -/** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ -function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); -} - -/** - * Static method for creating ArraySet instances from an existing array. - */ -ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; -}; - -/** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ -ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; -}; - -/** - * Add the given string to this set. - * - * @param String aStr - */ -ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } -}; - -/** - * Is the given string a member of this set? - * - * @param String aStr - */ -ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } -}; - -/** - * What is the index of the given string in the array? - * - * @param String aStr - */ -ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); -}; - -/** - * What is the element at the given index? - * - * @param Number aIdx - */ -ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); -}; - -/** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ -ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); -}; - -exports.ArraySet = ArraySet; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/base64-vlq.js b/node_modules/@babel/generator/node_modules/source-map/lib/base64-vlq.js deleted file mode 100644 index 612b4040..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/base64-vlq.js +++ /dev/null @@ -1,140 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. 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 Google 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 THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -var base64 = require('./base64'); - -// A single base 64 digit can contain 6 bits of data. For the base 64 variable -// length quantities we use in the source map spec, the first bit is the sign, -// the next four bits are the actual value, and the 6th bit is the -// continuation bit. The continuation bit tells us whether there are more -// digits in this value following this digit. -// -// Continuation -// | Sign -// | | -// V V -// 101011 - -var VLQ_BASE_SHIFT = 5; - -// binary: 100000 -var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - -// binary: 011111 -var VLQ_BASE_MASK = VLQ_BASE - 1; - -// binary: 100000 -var VLQ_CONTINUATION_BIT = VLQ_BASE; - -/** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ -function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; -} - -/** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ -function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; -} - -/** - * Returns the base 64 VLQ encoded value. - */ -exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; -}; - -/** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ -exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; -}; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/base64.js b/node_modules/@babel/generator/node_modules/source-map/lib/base64.js deleted file mode 100644 index 8aa86b30..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/base64.js +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - -/** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ -exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); -}; - -/** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ -exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; -}; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/binary-search.js b/node_modules/@babel/generator/node_modules/source-map/lib/binary-search.js deleted file mode 100644 index 010ac941..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/binary-search.js +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -exports.GREATEST_LOWER_BOUND = 1; -exports.LEAST_UPPER_BOUND = 2; - -/** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ -function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } -} - -/** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ -exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; -}; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/mapping-list.js b/node_modules/@babel/generator/node_modules/source-map/lib/mapping-list.js deleted file mode 100644 index 06d1274a..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/mapping-list.js +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); - -/** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ -function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; -} - -/** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ -function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; -} - -/** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ -MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - -/** - * Add the given source mapping. - * - * @param Object aMapping - */ -MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } -}; - -/** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ -MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; -}; - -exports.MappingList = MappingList; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/quick-sort.js b/node_modules/@babel/generator/node_modules/source-map/lib/quick-sort.js deleted file mode 100644 index 6a7caadb..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/quick-sort.js +++ /dev/null @@ -1,114 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -// It turns out that some (most?) JavaScript engines don't self-host -// `Array.prototype.sort`. This makes sense because C++ will likely remain -// faster than JS when doing raw CPU-intensive sorting. However, when using a -// custom comparator function, calling back and forth between the VM's C++ and -// JIT'd JS is rather slow *and* loses JIT type information, resulting in -// worse generated code for the comparator function than would be optimal. In -// fact, when sorting with a comparator, these costs outweigh the benefits of -// sorting in C++. By using our own JS-implemented Quick Sort (below), we get -// a ~3500ms mean speed-up in `bench/bench.html`. - -/** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ -function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; -} - -/** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ -function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); -} - -/** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ -function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } -} - -/** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ -exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); -}; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/source-map-consumer.js b/node_modules/@babel/generator/node_modules/source-map/lib/source-map-consumer.js deleted file mode 100644 index 6abcc280..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/source-map-consumer.js +++ /dev/null @@ -1,1082 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var binarySearch = require('./binary-search'); -var ArraySet = require('./array-set').ArraySet; -var base64VLQ = require('./base64-vlq'); -var quickSort = require('./quick-sort').quickSort; - -function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap) - : new BasicSourceMapConsumer(sourceMap); -} - -SourceMapConsumer.fromSourceMap = function(aSourceMap) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap); -} - -/** - * The version of the source mapping spec that we are consuming. - */ -SourceMapConsumer.prototype._version = 3; - -// `__generatedMappings` and `__originalMappings` are arrays that hold the -// parsed mapping coordinates from the source map's "mappings" attribute. They -// are lazily instantiated, accessed via the `_generatedMappings` and -// `_originalMappings` getters respectively, and we only parse the mappings -// and create these arrays once queried for a source location. We jump through -// these hoops because there can be many thousands of mappings, and parsing -// them is expensive, so we only want to do it if we must. -// -// Each object in the arrays is of the form: -// -// { -// generatedLine: The line number in the generated code, -// generatedColumn: The column number in the generated code, -// source: The path to the original source file that generated this -// chunk of code, -// originalLine: The line number in the original source that -// corresponds to this chunk of generated code, -// originalColumn: The column number in the original source that -// corresponds to this chunk of generated code, -// name: The name of the original symbol which generated this chunk of -// code. -// } -// -// All properties except for `generatedLine` and `generatedColumn` can be -// `null`. -// -// `_generatedMappings` is ordered by the generated positions. -// -// `_originalMappings` is ordered by the original positions. - -SourceMapConsumer.prototype.__generatedMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } -}); - -SourceMapConsumer.prototype.__originalMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } -}); - -SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - -SourceMapConsumer.GENERATED_ORDER = 1; -SourceMapConsumer.ORIGINAL_ORDER = 2; - -SourceMapConsumer.GREATEST_LOWER_BOUND = 1; -SourceMapConsumer.LEAST_UPPER_BOUND = 2; - -/** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ -SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - if (source != null && sourceRoot != null) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - -/** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: Optional. the column number in the original source. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - if (this.sourceRoot != null) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - if (!this._sources.has(needle.source)) { - return []; - } - needle.source = this._sources.indexOf(needle.source); - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - -exports.SourceMapConsumer = SourceMapConsumer; - -/** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ -function BasicSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this.file = file; -} - -BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - -/** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns BasicSourceMapConsumer - */ -BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - -/** - * The version of the source mapping spec that we are consuming. - */ -BasicSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; - }, this); - } -}); - -/** - * Provide the JIT with a nice shape / hidden class. - */ -function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; -} - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - -/** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ -BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - -/** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ -BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ -BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - if (this.sourceRoot != null) { - source = util.join(this.sourceRoot, source); - } - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot != null) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - if (this.sourceRoot != null) { - source = util.relative(this.sourceRoot, source); - } - if (!this._sources.has(source)) { - return { - line: null, - column: null, - lastColumn: null - }; - } - source = this._sources.indexOf(source); - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - -exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - -/** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The only parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ -function IndexedSourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map')) - } - }); -} - -IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - -/** - * The version of the source mapping spec that we are consuming. - */ -IndexedSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } -}); - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ -IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ -IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - if (section.consumer.sourceRoot !== null) { - source = util.join(section.consumer.sourceRoot, source); - } - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - -exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/source-map-generator.js b/node_modules/@babel/generator/node_modules/source-map/lib/source-map-generator.js deleted file mode 100644 index aff1e7fb..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/source-map-generator.js +++ /dev/null @@ -1,416 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var base64VLQ = require('./base64-vlq'); -var util = require('./util'); -var ArraySet = require('./array-set').ArraySet; -var MappingList = require('./mapping-list').MappingList; - -/** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ -function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; -} - -SourceMapGenerator.prototype._version = 3; - -/** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ -SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - -/** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ -SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - -/** - * Set the source content for a source file. - */ -SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - -/** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ -SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - -/** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ -SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - -/** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ -SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - -SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - -/** - * Externalize the source map. - */ -SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - -/** - * Render the source map being generated to a string. - */ -SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - -exports.SourceMapGenerator = SourceMapGenerator; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/source-node.js b/node_modules/@babel/generator/node_modules/source-map/lib/source-node.js deleted file mode 100644 index d196a53f..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/source-node.js +++ /dev/null @@ -1,413 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; -var util = require('./util'); - -// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other -// operating systems these days (capturing the result). -var REGEX_NEWLINE = /(\r?\n)/; - -// Newline character code for charCodeAt() comparisons -var NEWLINE_CODE = 10; - -// Private symbol for identifying `SourceNode`s when multiple versions of -// the source-map library are loaded. This MUST NOT CHANGE across -// versions! -var isSourceNode = "$$$isSourceNode$$$"; - -/** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ -function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); -} - -/** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ -SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - -/** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } -}; - -/** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ -SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; -}; - -/** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ -SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; -}; - -/** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ -SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - -/** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - -/** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ -SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; -}; - -/** - * Returns the string representation of this source node along with a source - * map. - */ -SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; -}; - -exports.SourceNode = SourceNode; diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/util.js b/node_modules/@babel/generator/node_modules/source-map/lib/util.js deleted file mode 100644 index 44e0e452..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/lib/util.js +++ /dev/null @@ -1,417 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ -function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } -} -exports.getArg = getArg; - -var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; -var dataUrlRegexp = /^data:.+\,.+$/; - -function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; -} -exports.urlParse = urlParse; - -function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; -} -exports.urlGenerate = urlGenerate; - -/** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ -function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; -} -exports.normalize = normalize; - -/** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ -function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; -} -exports.join = join; - -exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp); -}; - -/** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ -function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); -} -exports.relative = relative; - -var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); -}()); - -function identity (s) { - return s; -} - -/** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ -function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; -} -exports.toSetString = supportsNullProto ? identity : toSetString; - -function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; -} -exports.fromSetString = supportsNullProto ? identity : fromSetString; - -function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; -} - -/** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ -function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; -} -exports.compareByOriginalPositions = compareByOriginalPositions; - -/** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ -function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = mappingA.source - mappingB.source; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return mappingA.name - mappingB.name; -} -exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - -function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; -} - -/** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ -function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; diff --git a/node_modules/@babel/generator/node_modules/source-map/package.json b/node_modules/@babel/generator/node_modules/source-map/package.json deleted file mode 100644 index ac6f0398..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/package.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "_args": [ - [ - "source-map@0.5.7", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "source-map@0.5.7", - "_id": "source-map@0.5.7", - "_inBundle": false, - "_integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "_location": "/@babel/generator/source-map", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "source-map@0.5.7", - "name": "source-map", - "escapedName": "source-map", - "rawSpec": "0.5.7", - "saveSpec": null, - "fetchSpec": "0.5.7" - }, - "_requiredBy": [ - "/@babel/generator" - ], - "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "_spec": "0.5.7", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Nick Fitzgerald", - "email": "nfitzgerald@mozilla.com" - }, - "bugs": { - "url": "https://github.com/mozilla/source-map/issues" - }, - "contributors": [ - { - "name": "Tobias Koppers", - "email": "tobias.koppers@googlemail.com" - }, - { - "name": "Duncan Beevers", - "email": "duncan@dweebd.com" - }, - { - "name": "Stephen Crane", - "email": "scrane@mozilla.com" - }, - { - "name": "Ryan Seddon", - "email": "seddon.ryan@gmail.com" - }, - { - "name": "Miles Elam", - "email": "miles.elam@deem.com" - }, - { - "name": "Mihai Bazon", - "email": "mihai.bazon@gmail.com" - }, - { - "name": "Michael Ficarra", - "email": "github.public.email@michael.ficarra.me" - }, - { - "name": "Todd Wolfson", - "email": "todd@twolfson.com" - }, - { - "name": "Alexander Solovyov", - "email": "alexander@solovyov.net" - }, - { - "name": "Felix Gnass", - "email": "fgnass@gmail.com" - }, - { - "name": "Conrad Irwin", - "email": "conrad.irwin@gmail.com" - }, - { - "name": "usrbincc", - "email": "usrbincc@yahoo.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Chase Douglas", - "email": "chase@newrelic.com" - }, - { - "name": "Evan Wallace", - "email": "evan.exe@gmail.com" - }, - { - "name": "Heather Arthur", - "email": "fayearthur@gmail.com" - }, - { - "name": "Hugh Kennedy", - "email": "hughskennedy@gmail.com" - }, - { - "name": "David Glasser", - "email": "glasser@davidglasser.net" - }, - { - "name": "Simon Lydell", - "email": "simon.lydell@gmail.com" - }, - { - "name": "Jmeas Smith", - "email": "jellyes2@gmail.com" - }, - { - "name": "Michael Z Goddard", - "email": "mzgoddard@gmail.com" - }, - { - "name": "azu", - "email": "azu@users.noreply.github.com" - }, - { - "name": "John Gozde", - "email": "john@gozde.ca" - }, - { - "name": "Adam Kirkton", - "email": "akirkton@truefitinnovation.com" - }, - { - "name": "Chris Montgomery", - "email": "christopher.montgomery@dowjones.com" - }, - { - "name": "J. Ryan Stinnett", - "email": "jryans@gmail.com" - }, - { - "name": "Jack Herrington", - "email": "jherrington@walmartlabs.com" - }, - { - "name": "Chris Truter", - "email": "jeffpalentine@gmail.com" - }, - { - "name": "Daniel Espeset", - "email": "daniel@danielespeset.com" - }, - { - "name": "Jamie Wong", - "email": "jamie.lf.wong@gmail.com" - }, - { - "name": "Eddy Bruël", - "email": "ejpbruel@mozilla.com" - }, - { - "name": "Hawken Rives", - "email": "hawkrives@gmail.com" - }, - { - "name": "Gilad Peleg", - "email": "giladp007@gmail.com" - }, - { - "name": "djchie", - "email": "djchie.dev@gmail.com" - }, - { - "name": "Gary Ye", - "email": "garysye@gmail.com" - }, - { - "name": "Nicolas Lalevée", - "email": "nicolas.lalevee@hibnet.org" - } - ], - "description": "Generates and consumes source maps", - "devDependencies": { - "doctoc": "^0.15.0", - "webpack": "^1.12.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "source-map.js", - "lib/", - "dist/source-map.debug.js", - "dist/source-map.js", - "dist/source-map.min.js", - "dist/source-map.min.js.map" - ], - "homepage": "https://github.com/mozilla/source-map", - "license": "BSD-3-Clause", - "main": "./source-map.js", - "name": "source-map", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/mozilla/source-map.git" - }, - "scripts": { - "build": "webpack --color", - "test": "npm run build && node test/run-tests.js", - "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" - }, - "typings": "source-map", - "version": "0.5.7" -} diff --git a/node_modules/@babel/generator/node_modules/source-map/source-map.js b/node_modules/@babel/generator/node_modules/source-map/source-map.js deleted file mode 100644 index bc88fe82..00000000 --- a/node_modules/@babel/generator/node_modules/source-map/source-map.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ -exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; -exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; -exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/node_modules/@babel/generator/package.json b/node_modules/@babel/generator/package.json deleted file mode 100644 index f4c2daa2..00000000 --- a/node_modules/@babel/generator/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_args": [ - [ - "@babel/generator@7.5.5", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@babel/generator@7.5.5", - "_id": "@babel/generator@7.5.5", - "_inBundle": false, - "_integrity": "sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ==", - "_location": "/@babel/generator", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/generator@7.5.5", - "name": "@babel/generator", - "escapedName": "@babel%2fgenerator", - "scope": "@babel", - "rawSpec": "7.5.5", - "saveSpec": null, - "fetchSpec": "7.5.5" - }, - "_requiredBy": [ - "/@babel/core", - "/@babel/traverse", - "/istanbul-lib-instrument" - ], - "_resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz", - "_spec": "7.5.5", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "dependencies": { - "@babel/types": "^7.5.5", - "jsesc": "^2.5.1", - "lodash": "^4.17.13", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - }, - "description": "Turns an AST into code.", - "devDependencies": { - "@babel/helper-fixtures": "^7.5.5", - "@babel/parser": "^7.5.5" - }, - "files": [ - "lib" - ], - "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/generator", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-generator" - }, - "version": "7.5.5" -} diff --git a/node_modules/@babel/helper-function-name/LICENSE b/node_modules/@babel/helper-function-name/LICENSE deleted file mode 100644 index a06ec0e7..00000000 --- a/node_modules/@babel/helper-function-name/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-2018 Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/helper-function-name/README.md b/node_modules/@babel/helper-function-name/README.md deleted file mode 100644 index a8a6809a..00000000 --- a/node_modules/@babel/helper-function-name/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/helper-function-name - -> Helper function to change the property 'name' of every function - -See our website [@babel/helper-function-name](https://babeljs.io/docs/en/next/babel-helper-function-name.html) for more information. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/helper-function-name -``` - -or using yarn: - -```sh -yarn add @babel/helper-function-name --dev -``` diff --git a/node_modules/@babel/helper-function-name/lib/index.js b/node_modules/@babel/helper-function-name/lib/index.js deleted file mode 100644 index c6dd4afb..00000000 --- a/node_modules/@babel/helper-function-name/lib/index.js +++ /dev/null @@ -1,198 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; - -function _helperGetFunctionArity() { - const data = _interopRequireDefault(require("@babel/helper-get-function-arity")); - - _helperGetFunctionArity = function () { - return data; - }; - - return data; -} - -function _template() { - const data = _interopRequireDefault(require("@babel/template")); - - _template = function () { - return data; - }; - - return data; -} - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const buildPropertyMethodAssignmentWrapper = (0, _template().default)(` - (function (FUNCTION_KEY) { - function FUNCTION_ID() { - return FUNCTION_KEY.apply(this, arguments); - } - - FUNCTION_ID.toString = function () { - return FUNCTION_KEY.toString(); - } - - return FUNCTION_ID; - })(FUNCTION) -`); -const buildGeneratorPropertyMethodAssignmentWrapper = (0, _template().default)(` - (function (FUNCTION_KEY) { - function* FUNCTION_ID() { - return yield* FUNCTION_KEY.apply(this, arguments); - } - - FUNCTION_ID.toString = function () { - return FUNCTION_KEY.toString(); - }; - - return FUNCTION_ID; - })(FUNCTION) -`); -const visitor = { - "ReferencedIdentifier|BindingIdentifier"(path, state) { - if (path.node.name !== state.name) return; - const localDeclar = path.scope.getBindingIdentifier(state.name); - if (localDeclar !== state.outerDeclar) return; - state.selfReference = true; - path.stop(); - } - -}; - -function getNameFromLiteralId(id) { - if (t().isNullLiteral(id)) { - return "null"; - } - - if (t().isRegExpLiteral(id)) { - return `_${id.pattern}_${id.flags}`; - } - - if (t().isTemplateLiteral(id)) { - return id.quasis.map(quasi => quasi.value.raw).join(""); - } - - if (id.value !== undefined) { - return id.value + ""; - } - - return ""; -} - -function wrap(state, method, id, scope) { - if (state.selfReference) { - if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) { - scope.rename(id.name); - } else { - if (!t().isFunction(method)) return; - let build = buildPropertyMethodAssignmentWrapper; - - if (method.generator) { - build = buildGeneratorPropertyMethodAssignmentWrapper; - } - - const template = build({ - FUNCTION: method, - FUNCTION_ID: id, - FUNCTION_KEY: scope.generateUidIdentifier(id.name) - }).expression; - const params = template.callee.body.body[0].params; - - for (let i = 0, len = (0, _helperGetFunctionArity().default)(method); i < len; i++) { - params.push(scope.generateUidIdentifier("x")); - } - - return template; - } - } - - method.id = id; - scope.getProgramParent().references[id.name] = true; -} - -function visit(node, name, scope) { - const state = { - selfAssignment: false, - selfReference: false, - outerDeclar: scope.getBindingIdentifier(name), - references: [], - name: name - }; - const binding = scope.getOwnBinding(name); - - if (binding) { - if (binding.kind === "param") { - state.selfReference = true; - } else {} - } else if (state.outerDeclar || scope.hasGlobal(name)) { - scope.traverse(node, visitor, state); - } - - return state; -} - -function _default({ - node, - parent, - scope, - id -}, localBinding = false) { - if (node.id) return; - - if ((t().isObjectProperty(parent) || t().isObjectMethod(parent, { - kind: "method" - })) && (!parent.computed || t().isLiteral(parent.key))) { - id = parent.key; - } else if (t().isVariableDeclarator(parent)) { - id = parent.id; - - if (t().isIdentifier(id) && !localBinding) { - const binding = scope.parent.getBinding(id.name); - - if (binding && binding.constant && scope.getBinding(id.name) === binding) { - node.id = t().cloneNode(id); - node.id[t().NOT_LOCAL_BINDING] = true; - return; - } - } - } else if (t().isAssignmentExpression(parent)) { - id = parent.left; - } else if (!id) { - return; - } - - let name; - - if (id && t().isLiteral(id)) { - name = getNameFromLiteralId(id); - } else if (id && t().isIdentifier(id)) { - name = id.name; - } - - if (name === undefined) { - return; - } - - name = t().toBindingIdentifierName(name); - id = t().identifier(name); - id[t().NOT_LOCAL_BINDING] = true; - const state = visit(node, name, scope); - return wrap(state, node, id, scope) || node; -} \ No newline at end of file diff --git a/node_modules/@babel/helper-function-name/package.json b/node_modules/@babel/helper-function-name/package.json deleted file mode 100644 index 461c22d6..00000000 --- a/node_modules/@babel/helper-function-name/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "_args": [ - [ - "@babel/helper-function-name@7.1.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@babel/helper-function-name@7.1.0", - "_id": "@babel/helper-function-name@7.1.0", - "_inBundle": false, - "_integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", - "_location": "/@babel/helper-function-name", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/helper-function-name@7.1.0", - "name": "@babel/helper-function-name", - "escapedName": "@babel%2fhelper-function-name", - "scope": "@babel", - "rawSpec": "7.1.0", - "saveSpec": null, - "fetchSpec": "7.1.0" - }, - "_requiredBy": [ - "/@babel/traverse" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", - "_spec": "7.1.0", - "_where": "E:\\python\\setup-php", - "dependencies": { - "@babel/helper-get-function-arity": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0" - }, - "description": "Helper function to change the property 'name' of every function", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-function-name", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-function-name" - }, - "version": "7.1.0" -} diff --git a/node_modules/@babel/helper-get-function-arity/LICENSE b/node_modules/@babel/helper-get-function-arity/LICENSE deleted file mode 100644 index 620366eb..00000000 --- a/node_modules/@babel/helper-get-function-arity/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-2018 Sebastian McKenzie - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/helper-get-function-arity/README.md b/node_modules/@babel/helper-get-function-arity/README.md deleted file mode 100644 index 1de8084f..00000000 --- a/node_modules/@babel/helper-get-function-arity/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/helper-get-function-arity - -> Helper function to get function arity - -See our website [@babel/helper-get-function-arity](https://babeljs.io/docs/en/next/babel-helper-get-function-arity.html) for more information. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/helper-get-function-arity -``` - -or using yarn: - -```sh -yarn add @babel/helper-get-function-arity --dev -``` diff --git a/node_modules/@babel/helper-get-function-arity/lib/index.js b/node_modules/@babel/helper-get-function-arity/lib/index.js deleted file mode 100644 index 5723401d..00000000 --- a/node_modules/@babel/helper-get-function-arity/lib/index.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _default(node) { - const params = node.params; - - for (let i = 0; i < params.length; i++) { - const param = params[i]; - - if (t().isAssignmentPattern(param) || t().isRestElement(param)) { - return i; - } - } - - return params.length; -} \ No newline at end of file diff --git a/node_modules/@babel/helper-get-function-arity/package.json b/node_modules/@babel/helper-get-function-arity/package.json deleted file mode 100644 index f3ebac71..00000000 --- a/node_modules/@babel/helper-get-function-arity/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "_args": [ - [ - "@babel/helper-get-function-arity@7.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@babel/helper-get-function-arity@7.0.0", - "_id": "@babel/helper-get-function-arity@7.0.0", - "_inBundle": false, - "_integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", - "_location": "/@babel/helper-get-function-arity", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/helper-get-function-arity@7.0.0", - "name": "@babel/helper-get-function-arity", - "escapedName": "@babel%2fhelper-get-function-arity", - "scope": "@babel", - "rawSpec": "7.0.0", - "saveSpec": null, - "fetchSpec": "7.0.0" - }, - "_requiredBy": [ - "/@babel/helper-function-name" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", - "_spec": "7.0.0", - "_where": "E:\\python\\setup-php", - "dependencies": { - "@babel/types": "^7.0.0" - }, - "description": "Helper function to get function arity", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-get-function-arity", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-get-function-arity" - }, - "version": "7.0.0" -} diff --git a/node_modules/@babel/helper-plugin-utils/LICENSE b/node_modules/@babel/helper-plugin-utils/LICENSE deleted file mode 100644 index 620366eb..00000000 --- a/node_modules/@babel/helper-plugin-utils/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-2018 Sebastian McKenzie - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/helper-plugin-utils/README.md b/node_modules/@babel/helper-plugin-utils/README.md deleted file mode 100644 index 4e6303e0..00000000 --- a/node_modules/@babel/helper-plugin-utils/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/helper-plugin-utils - -> General utilities for plugins to use - -See our website [@babel/helper-plugin-utils](https://babeljs.io/docs/en/next/babel-helper-plugin-utils.html) for more information. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/helper-plugin-utils -``` - -or using yarn: - -```sh -yarn add @babel/helper-plugin-utils --dev -``` diff --git a/node_modules/@babel/helper-plugin-utils/lib/index.js b/node_modules/@babel/helper-plugin-utils/lib/index.js deleted file mode 100644 index adb0656f..00000000 --- a/node_modules/@babel/helper-plugin-utils/lib/index.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.declare = declare; - -function declare(builder) { - return (api, options, dirname) => { - if (!api.assertVersion) { - api = Object.assign(copyApiObject(api), { - assertVersion(range) { - throwVersionError(range, api.version); - } - - }); - } - - return builder(api, options || {}, dirname); - }; -} - -function copyApiObject(api) { - let proto = null; - - if (typeof api.version === "string" && /^7\./.test(api.version)) { - proto = Object.getPrototypeOf(api); - - if (proto && (!has(proto, "version") || !has(proto, "transform") || !has(proto, "template") || !has(proto, "types"))) { - proto = null; - } - } - - return Object.assign({}, proto, api); -} - -function has(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); -} - -function throwVersionError(range, version) { - if (typeof range === "number") { - if (!Number.isInteger(range)) { - throw new Error("Expected string or integer value."); - } - - range = `^${range}.0.0-0`; - } - - if (typeof range !== "string") { - throw new Error("Expected string or integer value."); - } - - const limit = Error.stackTraceLimit; - - if (typeof limit === "number" && limit < 25) { - Error.stackTraceLimit = 25; - } - - let err; - - if (version.slice(0, 2) === "7.") { - err = new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${version}". ` + `You'll need to update your @babel/core version.`); - } else { - err = new Error(`Requires Babel "${range}", but was loaded with "${version}". ` + `If you are sure you have a compatible version of @babel/core, ` + `it is likely that something in your build process is loading the ` + `wrong version. Inspect the stack trace of this error to look for ` + `the first entry that doesn't mention "@babel/core" or "babel-core" ` + `to see what is calling Babel.`); - } - - if (typeof limit === "number") { - Error.stackTraceLimit = limit; - } - - throw Object.assign(err, { - code: "BABEL_VERSION_UNSUPPORTED", - version, - range - }); -} \ No newline at end of file diff --git a/node_modules/@babel/helper-plugin-utils/package.json b/node_modules/@babel/helper-plugin-utils/package.json deleted file mode 100644 index 7e0e2a6d..00000000 --- a/node_modules/@babel/helper-plugin-utils/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "_args": [ - [ - "@babel/helper-plugin-utils@7.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@babel/helper-plugin-utils@7.0.0", - "_id": "@babel/helper-plugin-utils@7.0.0", - "_inBundle": false, - "_integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==", - "_location": "/@babel/helper-plugin-utils", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/helper-plugin-utils@7.0.0", - "name": "@babel/helper-plugin-utils", - "escapedName": "@babel%2fhelper-plugin-utils", - "scope": "@babel", - "rawSpec": "7.0.0", - "saveSpec": null, - "fetchSpec": "7.0.0" - }, - "_requiredBy": [ - "/@babel/plugin-syntax-object-rest-spread", - "/babel-plugin-istanbul" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", - "_spec": "7.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Logan Smyth", - "email": "loganfsmyth@gmail.com" - }, - "description": "General utilities for plugins to use", - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-plugin-utils", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-plugin-utils" - }, - "version": "7.0.0" -} diff --git a/node_modules/@babel/helper-plugin-utils/src/index.js b/node_modules/@babel/helper-plugin-utils/src/index.js deleted file mode 100644 index f0ecb83a..00000000 --- a/node_modules/@babel/helper-plugin-utils/src/index.js +++ /dev/null @@ -1,95 +0,0 @@ -export function declare(builder) { - return (api, options, dirname) => { - if (!api.assertVersion) { - // Inject a custom version of 'assertVersion' for Babel 6 and early - // versions of Babel 7's beta that didn't have it. - api = Object.assign(copyApiObject(api), { - assertVersion(range) { - throwVersionError(range, api.version); - }, - }); - } - - return builder(api, options || {}, dirname); - }; -} - -function copyApiObject(api) { - // Babel >= 7 <= beta.41 passed the API as a new object that had - // babel/core as the prototype. While slightly faster, it also - // means that the Object.assign copy below fails. Rather than - // keep complexity, the Babel 6 behavior has been reverted and this - // normalizes all that for Babel 7. - let proto = null; - if (typeof api.version === "string" && /^7\./.test(api.version)) { - proto = Object.getPrototypeOf(api); - if ( - proto && - (!has(proto, "version") || - !has(proto, "transform") || - !has(proto, "template") || - !has(proto, "types")) - ) { - proto = null; - } - } - - return { - ...proto, - ...api, - }; -} - -function has(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); -} - -function throwVersionError(range, version) { - if (typeof range === "number") { - if (!Number.isInteger(range)) { - throw new Error("Expected string or integer value."); - } - range = `^${range}.0.0-0`; - } - if (typeof range !== "string") { - throw new Error("Expected string or integer value."); - } - - const limit = Error.stackTraceLimit; - - if (typeof limit === "number" && limit < 25) { - // Bump up the limit if needed so that users are more likely - // to be able to see what is calling Babel. - Error.stackTraceLimit = 25; - } - - let err; - if (version.slice(0, 2) === "7.") { - err = new Error( - `Requires Babel "^7.0.0-beta.41", but was loaded with "${version}". ` + - `You'll need to update your @babel/core version.`, - ); - } else { - err = new Error( - `Requires Babel "${range}", but was loaded with "${version}". ` + - `If you are sure you have a compatible version of @babel/core, ` + - `it is likely that something in your build process is loading the ` + - `wrong version. Inspect the stack trace of this error to look for ` + - `the first entry that doesn't mention "@babel/core" or "babel-core" ` + - `to see what is calling Babel.`, - ); - } - - if (typeof limit === "number") { - Error.stackTraceLimit = limit; - } - - throw Object.assign( - err, - ({ - code: "BABEL_VERSION_UNSUPPORTED", - version, - range, - }: any), - ); -} diff --git a/node_modules/@babel/helper-split-export-declaration/LICENSE b/node_modules/@babel/helper-split-export-declaration/LICENSE deleted file mode 100644 index f31575ec..00000000 --- a/node_modules/@babel/helper-split-export-declaration/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/helper-split-export-declaration/README.md b/node_modules/@babel/helper-split-export-declaration/README.md deleted file mode 100644 index d241fee0..00000000 --- a/node_modules/@babel/helper-split-export-declaration/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/helper-split-export-declaration - -> - -See our website [@babel/helper-split-export-declaration](https://babeljs.io/docs/en/next/babel-helper-split-export-declaration.html) for more information. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/helper-split-export-declaration -``` - -or using yarn: - -```sh -yarn add @babel/helper-split-export-declaration --dev -``` diff --git a/node_modules/@babel/helper-split-export-declaration/lib/index.js b/node_modules/@babel/helper-split-export-declaration/lib/index.js deleted file mode 100644 index ddb34bc3..00000000 --- a/node_modules/@babel/helper-split-export-declaration/lib/index.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = splitExportDeclaration; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function splitExportDeclaration(exportDeclaration) { - if (!exportDeclaration.isExportDeclaration()) { - throw new Error("Only export declarations can be splitted."); - } - - const isDefault = exportDeclaration.isExportDefaultDeclaration(); - const declaration = exportDeclaration.get("declaration"); - const isClassDeclaration = declaration.isClassDeclaration(); - - if (isDefault) { - const standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration; - const scope = declaration.isScope() ? declaration.scope.parent : declaration.scope; - let id = declaration.node.id; - let needBindingRegistration = false; - - if (!id) { - needBindingRegistration = true; - id = scope.generateUidIdentifier("default"); - - if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) { - declaration.node.id = t().cloneNode(id); - } - } - - const updatedDeclaration = standaloneDeclaration ? declaration : t().variableDeclaration("var", [t().variableDeclarator(t().cloneNode(id), declaration.node)]); - const updatedExportDeclaration = t().exportNamedDeclaration(null, [t().exportSpecifier(t().cloneNode(id), t().identifier("default"))]); - exportDeclaration.insertAfter(updatedExportDeclaration); - exportDeclaration.replaceWith(updatedDeclaration); - - if (needBindingRegistration) { - scope.registerDeclaration(exportDeclaration); - } - - return exportDeclaration; - } - - if (exportDeclaration.get("specifiers").length > 0) { - throw new Error("It doesn't make sense to split exported specifiers."); - } - - const bindingIdentifiers = declaration.getOuterBindingIdentifiers(); - const specifiers = Object.keys(bindingIdentifiers).map(name => { - return t().exportSpecifier(t().identifier(name), t().identifier(name)); - }); - const aliasDeclar = t().exportNamedDeclaration(null, specifiers); - exportDeclaration.insertAfter(aliasDeclar); - exportDeclaration.replaceWith(declaration.node); - return exportDeclaration; -} \ No newline at end of file diff --git a/node_modules/@babel/helper-split-export-declaration/package.json b/node_modules/@babel/helper-split-export-declaration/package.json deleted file mode 100644 index 634b2e4d..00000000 --- a/node_modules/@babel/helper-split-export-declaration/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "_args": [ - [ - "@babel/helper-split-export-declaration@7.4.4", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@babel/helper-split-export-declaration@7.4.4", - "_id": "@babel/helper-split-export-declaration@7.4.4", - "_inBundle": false, - "_integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", - "_location": "/@babel/helper-split-export-declaration", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/helper-split-export-declaration@7.4.4", - "name": "@babel/helper-split-export-declaration", - "escapedName": "@babel%2fhelper-split-export-declaration", - "scope": "@babel", - "rawSpec": "7.4.4", - "saveSpec": null, - "fetchSpec": "7.4.4" - }, - "_requiredBy": [ - "/@babel/traverse" - ], - "_resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", - "_spec": "7.4.4", - "_where": "E:\\python\\setup-php", - "dependencies": { - "@babel/types": "^7.4.4" - }, - "description": ">", - "gitHead": "2c88694388831b1e5b88e4bbed6781eb2be1edba", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helper-split-export-declaration", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helper-split-export-declaration" - }, - "version": "7.4.4" -} diff --git a/node_modules/@babel/helpers/LICENSE b/node_modules/@babel/helpers/LICENSE deleted file mode 100644 index f31575ec..00000000 --- a/node_modules/@babel/helpers/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/helpers/README.md b/node_modules/@babel/helpers/README.md deleted file mode 100644 index 537d8e47..00000000 --- a/node_modules/@babel/helpers/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/helpers - -> Collection of helper functions used by Babel transforms. - -See our website [@babel/helpers](https://babeljs.io/docs/en/next/babel-helpers.html) for more information. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/helpers -``` - -or using yarn: - -```sh -yarn add @babel/helpers --dev -``` diff --git a/node_modules/@babel/helpers/lib/helpers.js b/node_modules/@babel/helpers/lib/helpers.js deleted file mode 100644 index d087158a..00000000 --- a/node_modules/@babel/helpers/lib/helpers.js +++ /dev/null @@ -1,1882 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function _template() { - const data = _interopRequireDefault(require("@babel/template")); - - _template = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const helpers = Object.create(null); -var _default = helpers; -exports.default = _default; - -const helper = minVersion => tpl => ({ - minVersion, - ast: () => _template().default.program.ast(tpl) -}); - -helpers.typeof = helper("7.0.0-beta.0")` - export default function _typeof(obj) { - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - _typeof = function (obj) { return typeof obj; }; - } else { - _typeof = function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype - ? "symbol" - : typeof obj; - }; - } - - return _typeof(obj); - } -`; -helpers.jsx = helper("7.0.0-beta.0")` - var REACT_ELEMENT_TYPE; - - export default function _createRawReactElement(type, props, key, children) { - if (!REACT_ELEMENT_TYPE) { - REACT_ELEMENT_TYPE = ( - typeof Symbol === "function" && Symbol["for"] && Symbol["for"]("react.element") - ) || 0xeac7; - } - - var defaultProps = type && type.defaultProps; - var childrenLength = arguments.length - 3; - - if (!props && childrenLength !== 0) { - // If we're going to assign props.children, we create a new object now - // to avoid mutating defaultProps. - props = { - children: void 0, - }; - } - if (props && defaultProps) { - for (var propName in defaultProps) { - if (props[propName] === void 0) { - props[propName] = defaultProps[propName]; - } - } - } else if (!props) { - props = defaultProps || {}; - } - - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = new Array(childrenLength); - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 3]; - } - props.children = childArray; - } - - return { - $$typeof: REACT_ELEMENT_TYPE, - type: type, - key: key === undefined ? null : '' + key, - ref: null, - props: props, - _owner: null, - }; - } -`; -helpers.asyncIterator = helper("7.0.0-beta.0")` - export default function _asyncIterator(iterable) { - var method - if (typeof Symbol !== "undefined") { - if (Symbol.asyncIterator) { - method = iterable[Symbol.asyncIterator] - if (method != null) return method.call(iterable); - } - if (Symbol.iterator) { - method = iterable[Symbol.iterator] - if (method != null) return method.call(iterable); - } - } - throw new TypeError("Object is not async iterable"); - } -`; -helpers.AwaitValue = helper("7.0.0-beta.0")` - export default function _AwaitValue(value) { - this.wrapped = value; - } -`; -helpers.AsyncGenerator = helper("7.0.0-beta.0")` - import AwaitValue from "AwaitValue"; - - export default function AsyncGenerator(gen) { - var front, back; - - function send(key, arg) { - return new Promise(function (resolve, reject) { - var request = { - key: key, - arg: arg, - resolve: resolve, - reject: reject, - next: null, - }; - - if (back) { - back = back.next = request; - } else { - front = back = request; - resume(key, arg); - } - }); - } - - function resume(key, arg) { - try { - var result = gen[key](arg) - var value = result.value; - var wrappedAwait = value instanceof AwaitValue; - - Promise.resolve(wrappedAwait ? value.wrapped : value).then( - function (arg) { - if (wrappedAwait) { - resume("next", arg); - return - } - - settle(result.done ? "return" : "normal", arg); - }, - function (err) { resume("throw", err); }); - } catch (err) { - settle("throw", err); - } - } - - function settle(type, value) { - switch (type) { - case "return": - front.resolve({ value: value, done: true }); - break; - case "throw": - front.reject(value); - break; - default: - front.resolve({ value: value, done: false }); - break; - } - - front = front.next; - if (front) { - resume(front.key, front.arg); - } else { - back = null; - } - } - - this._invoke = send; - - // Hide "return" method if generator return is not supported - if (typeof gen.return !== "function") { - this.return = undefined; - } - } - - if (typeof Symbol === "function" && Symbol.asyncIterator) { - AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; }; - } - - AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); }; - AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); }; - AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); }; -`; -helpers.wrapAsyncGenerator = helper("7.0.0-beta.0")` - import AsyncGenerator from "AsyncGenerator"; - - export default function _wrapAsyncGenerator(fn) { - return function () { - return new AsyncGenerator(fn.apply(this, arguments)); - }; - } -`; -helpers.awaitAsyncGenerator = helper("7.0.0-beta.0")` - import AwaitValue from "AwaitValue"; - - export default function _awaitAsyncGenerator(value) { - return new AwaitValue(value); - } -`; -helpers.asyncGeneratorDelegate = helper("7.0.0-beta.0")` - export default function _asyncGeneratorDelegate(inner, awaitWrap) { - var iter = {}, waiting = false; - - function pump(key, value) { - waiting = true; - value = new Promise(function (resolve) { resolve(inner[key](value)); }); - return { done: false, value: awaitWrap(value) }; - }; - - if (typeof Symbol === "function" && Symbol.iterator) { - iter[Symbol.iterator] = function () { return this; }; - } - - iter.next = function (value) { - if (waiting) { - waiting = false; - return value; - } - return pump("next", value); - }; - - if (typeof inner.throw === "function") { - iter.throw = function (value) { - if (waiting) { - waiting = false; - throw value; - } - return pump("throw", value); - }; - } - - if (typeof inner.return === "function") { - iter.return = function (value) { - return pump("return", value); - }; - } - - return iter; - } -`; -helpers.asyncToGenerator = helper("7.0.0-beta.0")` - function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } - } - - export default function _asyncToGenerator(fn) { - return function () { - var self = this, args = arguments; - return new Promise(function (resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); - } - - _next(undefined); - }); - }; - } -`; -helpers.classCallCheck = helper("7.0.0-beta.0")` - export default function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } -`; -helpers.createClass = helper("7.0.0-beta.0")` - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i ++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - export default function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } -`; -helpers.defineEnumerableProperties = helper("7.0.0-beta.0")` - export default function _defineEnumerableProperties(obj, descs) { - for (var key in descs) { - var desc = descs[key]; - desc.configurable = desc.enumerable = true; - if ("value" in desc) desc.writable = true; - Object.defineProperty(obj, key, desc); - } - - // Symbols are not enumerated over by for-in loops. If native - // Symbols are available, fetch all of the descs object's own - // symbol properties and define them on our target object too. - if (Object.getOwnPropertySymbols) { - var objectSymbols = Object.getOwnPropertySymbols(descs); - for (var i = 0; i < objectSymbols.length; i++) { - var sym = objectSymbols[i]; - var desc = descs[sym]; - desc.configurable = desc.enumerable = true; - if ("value" in desc) desc.writable = true; - Object.defineProperty(obj, sym, desc); - } - } - return obj; - } -`; -helpers.defaults = helper("7.0.0-beta.0")` - export default function _defaults(obj, defaults) { - var keys = Object.getOwnPropertyNames(defaults); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = Object.getOwnPropertyDescriptor(defaults, key); - if (value && value.configurable && obj[key] === undefined) { - Object.defineProperty(obj, key, value); - } - } - return obj; - } -`; -helpers.defineProperty = helper("7.0.0-beta.0")` - export default function _defineProperty(obj, key, value) { - // Shortcircuit the slow defineProperty path when possible. - // We are trying to avoid issues where setters defined on the - // prototype cause side effects under the fast path of simple - // assignment. By checking for existence of the property with - // the in operator, we can optimize most of this overhead away. - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; - } -`; -helpers.extends = helper("7.0.0-beta.0")` - export default function _extends() { - _extends = Object.assign || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - return target; - }; - - return _extends.apply(this, arguments); - } -`; -helpers.objectSpread = helper("7.0.0-beta.0")` - import defineProperty from "defineProperty"; - - export default function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = (arguments[i] != null) ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - })); - } - ownKeys.forEach(function(key) { - defineProperty(target, key, source[key]); - }); - } - return target; - } -`; -helpers.objectSpread2 = helper("7.5.0")` - import defineProperty from "defineProperty"; - - // This function is different to "Reflect.ownKeys". The enumerableOnly - // filters on symbol properties only. Returned string properties are always - // enumerable. It is good to use in objectSpread. - - function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - if (enumerableOnly) symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - }); - keys.push.apply(keys, symbols); - } - return keys; - } - - export default function _objectSpread2(target) { - for (var i = 1; i < arguments.length; i++) { - var source = (arguments[i] != null) ? arguments[i] : {}; - if (i % 2) { - ownKeys(source, true).forEach(function (key) { - defineProperty(target, key, source[key]); - }); - } else if (Object.getOwnPropertyDescriptors) { - Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); - } else { - ownKeys(source).forEach(function (key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - } - return target; - } -`; -helpers.inherits = helper("7.0.0-beta.0")` - import setPrototypeOf from "setPrototypeOf"; - - export default function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) setPrototypeOf(subClass, superClass); - } -`; -helpers.inheritsLoose = helper("7.0.0-beta.0")` - export default function _inheritsLoose(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - subClass.__proto__ = superClass; - } -`; -helpers.getPrototypeOf = helper("7.0.0-beta.0")` - export default function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf - ? Object.getPrototypeOf - : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } -`; -helpers.setPrototypeOf = helper("7.0.0-beta.0")` - export default function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - return _setPrototypeOf(o, p); - } -`; -helpers.construct = helper("7.0.0-beta.0")` - import setPrototypeOf from "setPrototypeOf"; - - function isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - - // core-js@3 - if (Reflect.construct.sham) return false; - - // Proxy can't be polyfilled. Every browser implemented - // proxies before or at the same time as Reflect.construct, - // so if they support Proxy they also support Reflect.construct. - if (typeof Proxy === "function") return true; - - // Since Reflect.construct can't be properly polyfilled, some - // implementations (e.g. core-js@2) don't set the correct internal slots. - // Those polyfills don't allow us to subclass built-ins, so we need to - // use our fallback implementation. - try { - // If the internal slots aren't set, this throws an error similar to - // TypeError: this is not a Date object. - Date.prototype.toString.call(Reflect.construct(Date, [], function() {})); - return true; - } catch (e) { - return false; - } - } - - export default function _construct(Parent, args, Class) { - if (isNativeReflectConstruct()) { - _construct = Reflect.construct; - } else { - // NOTE: If Parent !== Class, the correct __proto__ is set *after* - // calling the constructor. - _construct = function _construct(Parent, args, Class) { - var a = [null]; - a.push.apply(a, args); - var Constructor = Function.bind.apply(Parent, a); - var instance = new Constructor(); - if (Class) setPrototypeOf(instance, Class.prototype); - return instance; - }; - } - // Avoid issues with Class being present but undefined when it wasn't - // present in the original call. - return _construct.apply(null, arguments); - } -`; -helpers.isNativeFunction = helper("7.0.0-beta.0")` - export default function _isNativeFunction(fn) { - // Note: This function returns "true" for core-js functions. - return Function.toString.call(fn).indexOf("[native code]") !== -1; - } -`; -helpers.wrapNativeSuper = helper("7.0.0-beta.0")` - import getPrototypeOf from "getPrototypeOf"; - import setPrototypeOf from "setPrototypeOf"; - import isNativeFunction from "isNativeFunction"; - import construct from "construct"; - - export default function _wrapNativeSuper(Class) { - var _cache = typeof Map === "function" ? new Map() : undefined; - - _wrapNativeSuper = function _wrapNativeSuper(Class) { - if (Class === null || !isNativeFunction(Class)) return Class; - if (typeof Class !== "function") { - throw new TypeError("Super expression must either be null or a function"); - } - if (typeof _cache !== "undefined") { - if (_cache.has(Class)) return _cache.get(Class); - _cache.set(Class, Wrapper); - } - function Wrapper() { - return construct(Class, arguments, getPrototypeOf(this).constructor) - } - Wrapper.prototype = Object.create(Class.prototype, { - constructor: { - value: Wrapper, - enumerable: false, - writable: true, - configurable: true, - } - }); - - return setPrototypeOf(Wrapper, Class); - } - - return _wrapNativeSuper(Class) - } -`; -helpers.instanceof = helper("7.0.0-beta.0")` - export default function _instanceof(left, right) { - if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { - return !!right[Symbol.hasInstance](left); - } else { - return left instanceof right; - } - } -`; -helpers.interopRequireDefault = helper("7.0.0-beta.0")` - export default function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } -`; -helpers.interopRequireWildcard = helper("7.0.0-beta.0")` - export default function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } - } -`; -helpers.newArrowCheck = helper("7.0.0-beta.0")` - export default function _newArrowCheck(innerThis, boundThis) { - if (innerThis !== boundThis) { - throw new TypeError("Cannot instantiate an arrow function"); - } - } -`; -helpers.objectDestructuringEmpty = helper("7.0.0-beta.0")` - export default function _objectDestructuringEmpty(obj) { - if (obj == null) throw new TypeError("Cannot destructure undefined"); - } -`; -helpers.objectWithoutPropertiesLoose = helper("7.0.0-beta.0")` - export default function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; - - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - - return target; - } -`; -helpers.objectWithoutProperties = helper("7.0.0-beta.0")` - import objectWithoutPropertiesLoose from "objectWithoutPropertiesLoose"; - - export default function _objectWithoutProperties(source, excluded) { - if (source == null) return {}; - - var target = objectWithoutPropertiesLoose(source, excluded); - var key, i; - - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) { - key = sourceSymbolKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; - target[key] = source[key]; - } - } - - return target; - } -`; -helpers.assertThisInitialized = helper("7.0.0-beta.0")` - export default function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return self; - } -`; -helpers.possibleConstructorReturn = helper("7.0.0-beta.0")` - import assertThisInitialized from "assertThisInitialized"; - - export default function _possibleConstructorReturn(self, call) { - if (call && (typeof call === "object" || typeof call === "function")) { - return call; - } - return assertThisInitialized(self); - } -`; -helpers.superPropBase = helper("7.0.0-beta.0")` - import getPrototypeOf from "getPrototypeOf"; - - export default function _superPropBase(object, property) { - // Yes, this throws if object is null to being with, that's on purpose. - while (!Object.prototype.hasOwnProperty.call(object, property)) { - object = getPrototypeOf(object); - if (object === null) break; - } - return object; - } -`; -helpers.get = helper("7.0.0-beta.0")` - import superPropBase from "superPropBase"; - - export default function _get(target, property, receiver) { - if (typeof Reflect !== "undefined" && Reflect.get) { - _get = Reflect.get; - } else { - _get = function _get(target, property, receiver) { - var base = superPropBase(target, property); - - if (!base) return; - - var desc = Object.getOwnPropertyDescriptor(base, property); - if (desc.get) { - return desc.get.call(receiver); - } - - return desc.value; - }; - } - return _get(target, property, receiver || target); - } -`; -helpers.set = helper("7.0.0-beta.0")` - import superPropBase from "superPropBase"; - import defineProperty from "defineProperty"; - - function set(target, property, value, receiver) { - if (typeof Reflect !== "undefined" && Reflect.set) { - set = Reflect.set; - } else { - set = function set(target, property, value, receiver) { - var base = superPropBase(target, property); - var desc; - - if (base) { - desc = Object.getOwnPropertyDescriptor(base, property); - if (desc.set) { - desc.set.call(receiver, value); - return true; - } else if (!desc.writable) { - // Both getter and non-writable fall into this. - return false; - } - } - - // Without a super that defines the property, spec boils down to - // "define on receiver" for some reason. - desc = Object.getOwnPropertyDescriptor(receiver, property); - if (desc) { - if (!desc.writable) { - // Setter, getter, and non-writable fall into this. - return false; - } - - desc.value = value; - Object.defineProperty(receiver, property, desc); - } else { - // Avoid setters that may be defined on Sub's prototype, but not on - // the instance. - defineProperty(receiver, property, value); - } - - return true; - }; - } - - return set(target, property, value, receiver); - } - - export default function _set(target, property, value, receiver, isStrict) { - var s = set(target, property, value, receiver || target); - if (!s && isStrict) { - throw new Error('failed to set property'); - } - - return value; - } -`; -helpers.taggedTemplateLiteral = helper("7.0.0-beta.0")` - export default function _taggedTemplateLiteral(strings, raw) { - if (!raw) { raw = strings.slice(0); } - return Object.freeze(Object.defineProperties(strings, { - raw: { value: Object.freeze(raw) } - })); - } -`; -helpers.taggedTemplateLiteralLoose = helper("7.0.0-beta.0")` - export default function _taggedTemplateLiteralLoose(strings, raw) { - if (!raw) { raw = strings.slice(0); } - strings.raw = raw; - return strings; - } -`; -helpers.temporalRef = helper("7.0.0-beta.0")` - import undef from "temporalUndefined"; - - export default function _temporalRef(val, name) { - if (val === undef) { - throw new ReferenceError(name + " is not defined - temporal dead zone"); - } else { - return val; - } - } -`; -helpers.readOnlyError = helper("7.0.0-beta.0")` - export default function _readOnlyError(name) { - throw new Error("\\"" + name + "\\" is read-only"); - } -`; -helpers.classNameTDZError = helper("7.0.0-beta.0")` - export default function _classNameTDZError(name) { - throw new Error("Class \\"" + name + "\\" cannot be referenced in computed property keys."); - } -`; -helpers.temporalUndefined = helper("7.0.0-beta.0")` - export default {}; -`; -helpers.slicedToArray = helper("7.0.0-beta.0")` - import arrayWithHoles from "arrayWithHoles"; - import iterableToArrayLimit from "iterableToArrayLimit"; - import nonIterableRest from "nonIterableRest"; - - export default function _slicedToArray(arr, i) { - return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest(); - } -`; -helpers.slicedToArrayLoose = helper("7.0.0-beta.0")` - import arrayWithHoles from "arrayWithHoles"; - import iterableToArrayLimitLoose from "iterableToArrayLimitLoose"; - import nonIterableRest from "nonIterableRest"; - - export default function _slicedToArrayLoose(arr, i) { - return arrayWithHoles(arr) || iterableToArrayLimitLoose(arr, i) || nonIterableRest(); - } -`; -helpers.toArray = helper("7.0.0-beta.0")` - import arrayWithHoles from "arrayWithHoles"; - import iterableToArray from "iterableToArray"; - import nonIterableRest from "nonIterableRest"; - - export default function _toArray(arr) { - return arrayWithHoles(arr) || iterableToArray(arr) || nonIterableRest(); - } -`; -helpers.toConsumableArray = helper("7.0.0-beta.0")` - import arrayWithoutHoles from "arrayWithoutHoles"; - import iterableToArray from "iterableToArray"; - import nonIterableSpread from "nonIterableSpread"; - - export default function _toConsumableArray(arr) { - return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread(); - } -`; -helpers.arrayWithoutHoles = helper("7.0.0-beta.0")` - export default function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - return arr2; - } - } -`; -helpers.arrayWithHoles = helper("7.0.0-beta.0")` - export default function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - } -`; -helpers.iterableToArray = helper("7.0.0-beta.0")` - export default function _iterableToArray(iter) { - if ( - Symbol.iterator in Object(iter) || - Object.prototype.toString.call(iter) === "[object Arguments]" - ) return Array.from(iter); - } -`; -helpers.iterableToArrayLimit = helper("7.0.0-beta.0")` - export default function _iterableToArrayLimit(arr, i) { - // this is an expanded form of \`for...of\` that properly supports abrupt completions of - // iterators etc. variable names have been minimised to reduce the size of this massive - // helper. sometimes spec compliancy is annoying :( - // - // _n = _iteratorNormalCompletion - // _d = _didIteratorError - // _e = _iteratorError - // _i = _iterator - // _s = _step - - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"] != null) _i["return"](); - } finally { - if (_d) throw _e; - } - } - return _arr; - } -`; -helpers.iterableToArrayLimitLoose = helper("7.0.0-beta.0")` - export default function _iterableToArrayLimitLoose(arr, i) { - var _arr = []; - for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) { - _arr.push(_step.value); - if (i && _arr.length === i) break; - } - return _arr; - } -`; -helpers.nonIterableSpread = helper("7.0.0-beta.0")` - export default function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance"); - } -`; -helpers.nonIterableRest = helper("7.0.0-beta.0")` - export default function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } -`; -helpers.skipFirstGeneratorNext = helper("7.0.0-beta.0")` - export default function _skipFirstGeneratorNext(fn) { - return function () { - var it = fn.apply(this, arguments); - it.next(); - return it; - } - } -`; -helpers.toPrimitive = helper("7.1.5")` - export default function _toPrimitive( - input, - hint /*: "default" | "string" | "number" | void */ - ) { - if (typeof input !== "object" || input === null) return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== undefined) { - var res = prim.call(input, hint || "default"); - if (typeof res !== "object") return res; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return (hint === "string" ? String : Number)(input); - } -`; -helpers.toPropertyKey = helper("7.1.5")` - import toPrimitive from "toPrimitive"; - - export default function _toPropertyKey(arg) { - var key = toPrimitive(arg, "string"); - return typeof key === "symbol" ? key : String(key); - } -`; -helpers.initializerWarningHelper = helper("7.0.0-beta.0")` - export default function _initializerWarningHelper(descriptor, context){ - throw new Error( - 'Decorating class property failed. Please ensure that ' + - 'proposal-class-properties is enabled and set to use loose mode. ' + - 'To use proposal-class-properties in spec mode with decorators, wait for ' + - 'the next major version of decorators in stage 2.' - ); - } -`; -helpers.initializerDefineProperty = helper("7.0.0-beta.0")` - export default function _initializerDefineProperty(target, property, descriptor, context){ - if (!descriptor) return; - - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0, - }); - } -`; -helpers.applyDecoratedDescriptor = helper("7.0.0-beta.0")` - export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context){ - var desc = {}; - Object.keys(descriptor).forEach(function(key){ - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - if ('value' in desc || desc.initializer){ - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function(desc, decorator){ - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0){ - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0){ - // This is a hack to avoid this being processed by 'transform-runtime'. - // See issue #9. - Object.defineProperty(target, property, desc); - desc = null; - } - - return desc; - } -`; -helpers.classPrivateFieldLooseKey = helper("7.0.0-beta.0")` - var id = 0; - export default function _classPrivateFieldKey(name) { - return "__private_" + (id++) + "_" + name; - } -`; -helpers.classPrivateFieldLooseBase = helper("7.0.0-beta.0")` - export default function _classPrivateFieldBase(receiver, privateKey) { - if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { - throw new TypeError("attempted to use private field on non-instance"); - } - return receiver; - } -`; -helpers.classPrivateFieldGet = helper("7.0.0-beta.0")` - export default function _classPrivateFieldGet(receiver, privateMap) { - var descriptor = privateMap.get(receiver); - if (!descriptor) { - throw new TypeError("attempted to get private field on non-instance"); - } - if (descriptor.get) { - return descriptor.get.call(receiver); - } - return descriptor.value; - } -`; -helpers.classPrivateFieldSet = helper("7.0.0-beta.0")` - export default function _classPrivateFieldSet(receiver, privateMap, value) { - var descriptor = privateMap.get(receiver); - if (!descriptor) { - throw new TypeError("attempted to set private field on non-instance"); - } - if (descriptor.set) { - descriptor.set.call(receiver, value); - } else { - if (!descriptor.writable) { - // This should only throw in strict mode, but class bodies are - // always strict and private fields can only be used inside - // class bodies. - throw new TypeError("attempted to set read only private field"); - } - - descriptor.value = value; - } - - return value; - } -`; -helpers.classPrivateFieldDestructureSet = helper("7.4.4")` - export default function _classPrivateFieldDestructureSet(receiver, privateMap) { - if (!privateMap.has(receiver)) { - throw new TypeError("attempted to set private field on non-instance"); - } - var descriptor = privateMap.get(receiver); - if (descriptor.set) { - if (!("__destrObj" in descriptor)) { - descriptor.__destrObj = { - set value(v) { - descriptor.set.call(receiver, v) - }, - }; - } - return descriptor.__destrObj; - } else { - if (!descriptor.writable) { - // This should only throw in strict mode, but class bodies are - // always strict and private fields can only be used inside - // class bodies. - throw new TypeError("attempted to set read only private field"); - } - - return descriptor; - } - } -`; -helpers.classStaticPrivateFieldSpecGet = helper("7.0.2")` - export default function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) { - if (receiver !== classConstructor) { - throw new TypeError("Private static access of wrong provenance"); - } - return descriptor.value; - } -`; -helpers.classStaticPrivateFieldSpecSet = helper("7.0.2")` - export default function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) { - if (receiver !== classConstructor) { - throw new TypeError("Private static access of wrong provenance"); - } - if (!descriptor.writable) { - // This should only throw in strict mode, but class bodies are - // always strict and private fields can only be used inside - // class bodies. - throw new TypeError("attempted to set read only private field"); - } - descriptor.value = value; - return value; - } -`; -helpers.classStaticPrivateMethodGet = helper("7.3.2")` - export default function _classStaticPrivateMethodGet(receiver, classConstructor, method) { - if (receiver !== classConstructor) { - throw new TypeError("Private static access of wrong provenance"); - } - return method; - } -`; -helpers.classStaticPrivateMethodSet = helper("7.3.2")` - export default function _classStaticPrivateMethodSet() { - throw new TypeError("attempted to set read only static private field"); - } -`; -helpers.decorate = helper("7.1.5")` - import toArray from "toArray"; - import toPropertyKey from "toPropertyKey"; - - // These comments are stripped by @babel/template - /*:: - type PropertyDescriptor = - | { - value: any, - writable: boolean, - configurable: boolean, - enumerable: boolean, - } - | { - get?: () => any, - set?: (v: any) => void, - configurable: boolean, - enumerable: boolean, - }; - - type FieldDescriptor ={ - writable: boolean, - configurable: boolean, - enumerable: boolean, - }; - - type Placement = "static" | "prototype" | "own"; - type Key = string | symbol; // PrivateName is not supported yet. - - type ElementDescriptor = - | { - kind: "method", - key: Key, - placement: Placement, - descriptor: PropertyDescriptor - } - | { - kind: "field", - key: Key, - placement: Placement, - descriptor: FieldDescriptor, - initializer?: () => any, - }; - - // This is exposed to the user code - type ElementObjectInput = ElementDescriptor & { - [@@toStringTag]?: "Descriptor" - }; - - // This is exposed to the user code - type ElementObjectOutput = ElementDescriptor & { - [@@toStringTag]?: "Descriptor" - extras?: ElementDescriptor[], - finisher?: ClassFinisher, - }; - - // This is exposed to the user code - type ClassObject = { - [@@toStringTag]?: "Descriptor", - kind: "class", - elements: ElementDescriptor[], - }; - - type ElementDecorator = (descriptor: ElementObjectInput) => ?ElementObjectOutput; - type ClassDecorator = (descriptor: ClassObject) => ?ClassObject; - type ClassFinisher = (cl: Class) => Class; - - // Only used by Babel in the transform output, not part of the spec. - type ElementDefinition = - | { - kind: "method", - value: any, - key: Key, - static?: boolean, - decorators?: ElementDecorator[], - } - | { - kind: "field", - value: () => any, - key: Key, - static?: boolean, - decorators?: ElementDecorator[], - }; - - declare function ClassFactory(initialize: (instance: C) => void): { - F: Class, - d: ElementDefinition[] - } - - */ - - /*:: - // Various combinations with/without extras and with one or many finishers - - type ElementFinisherExtras = { - element: ElementDescriptor, - finisher?: ClassFinisher, - extras?: ElementDescriptor[], - }; - - type ElementFinishersExtras = { - element: ElementDescriptor, - finishers: ClassFinisher[], - extras: ElementDescriptor[], - }; - - type ElementsFinisher = { - elements: ElementDescriptor[], - finisher?: ClassFinisher, - }; - - type ElementsFinishers = { - elements: ElementDescriptor[], - finishers: ClassFinisher[], - }; - - */ - - /*:: - - type Placements = { - static: Key[], - prototype: Key[], - own: Key[], - }; - - */ - - // ClassDefinitionEvaluation (Steps 26-*) - export default function _decorate( - decorators /*: ClassDecorator[] */, - factory /*: ClassFactory */, - superClass /*: ?Class<*> */, - mixins /*: ?Array */, - ) /*: Class<*> */ { - var api = _getDecoratorsApi(); - if (mixins) { - for (var i = 0; i < mixins.length; i++) { - api = mixins[i](api); - } - } - - var r = factory(function initialize(O) { - api.initializeInstanceElements(O, decorated.elements); - }, superClass); - var decorated = api.decorateClass( - _coalesceClassElements(r.d.map(_createElementDescriptor)), - decorators, - ); - - api.initializeClassElements(r.F, decorated.elements); - - return api.runClassFinishers(r.F, decorated.finishers); - } - - function _getDecoratorsApi() { - _getDecoratorsApi = function() { - return api; - }; - - var api = { - elementsDefinitionOrder: [["method"], ["field"]], - - // InitializeInstanceElements - initializeInstanceElements: function( - /*::*/ O /*: C */, - elements /*: ElementDescriptor[] */, - ) { - ["method", "field"].forEach(function(kind) { - elements.forEach(function(element /*: ElementDescriptor */) { - if (element.kind === kind && element.placement === "own") { - this.defineClassElement(O, element); - } - }, this); - }, this); - }, - - // InitializeClassElements - initializeClassElements: function( - /*::*/ F /*: Class */, - elements /*: ElementDescriptor[] */, - ) { - var proto = F.prototype; - - ["method", "field"].forEach(function(kind) { - elements.forEach(function(element /*: ElementDescriptor */) { - var placement = element.placement; - if ( - element.kind === kind && - (placement === "static" || placement === "prototype") - ) { - var receiver = placement === "static" ? F : proto; - this.defineClassElement(receiver, element); - } - }, this); - }, this); - }, - - // DefineClassElement - defineClassElement: function( - /*::*/ receiver /*: C | Class */, - element /*: ElementDescriptor */, - ) { - var descriptor /*: PropertyDescriptor */ = element.descriptor; - if (element.kind === "field") { - var initializer = element.initializer; - descriptor = { - enumerable: descriptor.enumerable, - writable: descriptor.writable, - configurable: descriptor.configurable, - value: initializer === void 0 ? void 0 : initializer.call(receiver), - }; - } - Object.defineProperty(receiver, element.key, descriptor); - }, - - // DecorateClass - decorateClass: function( - elements /*: ElementDescriptor[] */, - decorators /*: ClassDecorator[] */, - ) /*: ElementsFinishers */ { - var newElements /*: ElementDescriptor[] */ = []; - var finishers /*: ClassFinisher[] */ = []; - var placements /*: Placements */ = { - static: [], - prototype: [], - own: [], - }; - - elements.forEach(function(element /*: ElementDescriptor */) { - this.addElementPlacement(element, placements); - }, this); - - elements.forEach(function(element /*: ElementDescriptor */) { - if (!_hasDecorators(element)) return newElements.push(element); - - var elementFinishersExtras /*: ElementFinishersExtras */ = this.decorateElement( - element, - placements, - ); - newElements.push(elementFinishersExtras.element); - newElements.push.apply(newElements, elementFinishersExtras.extras); - finishers.push.apply(finishers, elementFinishersExtras.finishers); - }, this); - - if (!decorators) { - return { elements: newElements, finishers: finishers }; - } - - var result /*: ElementsFinishers */ = this.decorateConstructor( - newElements, - decorators, - ); - finishers.push.apply(finishers, result.finishers); - result.finishers = finishers; - - return result; - }, - - // AddElementPlacement - addElementPlacement: function( - element /*: ElementDescriptor */, - placements /*: Placements */, - silent /*: boolean */, - ) { - var keys = placements[element.placement]; - if (!silent && keys.indexOf(element.key) !== -1) { - throw new TypeError("Duplicated element (" + element.key + ")"); - } - keys.push(element.key); - }, - - // DecorateElement - decorateElement: function( - element /*: ElementDescriptor */, - placements /*: Placements */, - ) /*: ElementFinishersExtras */ { - var extras /*: ElementDescriptor[] */ = []; - var finishers /*: ClassFinisher[] */ = []; - - for ( - var decorators = element.decorators, i = decorators.length - 1; - i >= 0; - i-- - ) { - // (inlined) RemoveElementPlacement - var keys = placements[element.placement]; - keys.splice(keys.indexOf(element.key), 1); - - var elementObject /*: ElementObjectInput */ = this.fromElementDescriptor( - element, - ); - var elementFinisherExtras /*: ElementFinisherExtras */ = this.toElementFinisherExtras( - (0, decorators[i])(elementObject) /*: ElementObjectOutput */ || - elementObject, - ); - - element = elementFinisherExtras.element; - this.addElementPlacement(element, placements); - - if (elementFinisherExtras.finisher) { - finishers.push(elementFinisherExtras.finisher); - } - - var newExtras /*: ElementDescriptor[] | void */ = - elementFinisherExtras.extras; - if (newExtras) { - for (var j = 0; j < newExtras.length; j++) { - this.addElementPlacement(newExtras[j], placements); - } - extras.push.apply(extras, newExtras); - } - } - - return { element: element, finishers: finishers, extras: extras }; - }, - - // DecorateConstructor - decorateConstructor: function( - elements /*: ElementDescriptor[] */, - decorators /*: ClassDecorator[] */, - ) /*: ElementsFinishers */ { - var finishers /*: ClassFinisher[] */ = []; - - for (var i = decorators.length - 1; i >= 0; i--) { - var obj /*: ClassObject */ = this.fromClassDescriptor(elements); - var elementsAndFinisher /*: ElementsFinisher */ = this.toClassDescriptor( - (0, decorators[i])(obj) /*: ClassObject */ || obj, - ); - - if (elementsAndFinisher.finisher !== undefined) { - finishers.push(elementsAndFinisher.finisher); - } - - if (elementsAndFinisher.elements !== undefined) { - elements = elementsAndFinisher.elements; - - for (var j = 0; j < elements.length - 1; j++) { - for (var k = j + 1; k < elements.length; k++) { - if ( - elements[j].key === elements[k].key && - elements[j].placement === elements[k].placement - ) { - throw new TypeError( - "Duplicated element (" + elements[j].key + ")", - ); - } - } - } - } - } - - return { elements: elements, finishers: finishers }; - }, - - // FromElementDescriptor - fromElementDescriptor: function( - element /*: ElementDescriptor */, - ) /*: ElementObject */ { - var obj /*: ElementObject */ = { - kind: element.kind, - key: element.key, - placement: element.placement, - descriptor: element.descriptor, - }; - - var desc = { - value: "Descriptor", - configurable: true, - }; - Object.defineProperty(obj, Symbol.toStringTag, desc); - - if (element.kind === "field") obj.initializer = element.initializer; - - return obj; - }, - - // ToElementDescriptors - toElementDescriptors: function( - elementObjects /*: ElementObject[] */, - ) /*: ElementDescriptor[] */ { - if (elementObjects === undefined) return; - return toArray(elementObjects).map(function(elementObject) { - var element = this.toElementDescriptor(elementObject); - this.disallowProperty(elementObject, "finisher", "An element descriptor"); - this.disallowProperty(elementObject, "extras", "An element descriptor"); - return element; - }, this); - }, - - // ToElementDescriptor - toElementDescriptor: function( - elementObject /*: ElementObject */, - ) /*: ElementDescriptor */ { - var kind = String(elementObject.kind); - if (kind !== "method" && kind !== "field") { - throw new TypeError( - 'An element descriptor\\'s .kind property must be either "method" or' + - ' "field", but a decorator created an element descriptor with' + - ' .kind "' + - kind + - '"', - ); - } - - var key = toPropertyKey(elementObject.key); - - var placement = String(elementObject.placement); - if ( - placement !== "static" && - placement !== "prototype" && - placement !== "own" - ) { - throw new TypeError( - 'An element descriptor\\'s .placement property must be one of "static",' + - ' "prototype" or "own", but a decorator created an element descriptor' + - ' with .placement "' + - placement + - '"', - ); - } - - var descriptor /*: PropertyDescriptor */ = elementObject.descriptor; - - this.disallowProperty(elementObject, "elements", "An element descriptor"); - - var element /*: ElementDescriptor */ = { - kind: kind, - key: key, - placement: placement, - descriptor: Object.assign({}, descriptor), - }; - - if (kind !== "field") { - this.disallowProperty(elementObject, "initializer", "A method descriptor"); - } else { - this.disallowProperty( - descriptor, - "get", - "The property descriptor of a field descriptor", - ); - this.disallowProperty( - descriptor, - "set", - "The property descriptor of a field descriptor", - ); - this.disallowProperty( - descriptor, - "value", - "The property descriptor of a field descriptor", - ); - - element.initializer = elementObject.initializer; - } - - return element; - }, - - toElementFinisherExtras: function( - elementObject /*: ElementObject */, - ) /*: ElementFinisherExtras */ { - var element /*: ElementDescriptor */ = this.toElementDescriptor( - elementObject, - ); - var finisher /*: ClassFinisher */ = _optionalCallableProperty( - elementObject, - "finisher", - ); - var extras /*: ElementDescriptors[] */ = this.toElementDescriptors( - elementObject.extras, - ); - - return { element: element, finisher: finisher, extras: extras }; - }, - - // FromClassDescriptor - fromClassDescriptor: function( - elements /*: ElementDescriptor[] */, - ) /*: ClassObject */ { - var obj = { - kind: "class", - elements: elements.map(this.fromElementDescriptor, this), - }; - - var desc = { value: "Descriptor", configurable: true }; - Object.defineProperty(obj, Symbol.toStringTag, desc); - - return obj; - }, - - // ToClassDescriptor - toClassDescriptor: function( - obj /*: ClassObject */, - ) /*: ElementsFinisher */ { - var kind = String(obj.kind); - if (kind !== "class") { - throw new TypeError( - 'A class descriptor\\'s .kind property must be "class", but a decorator' + - ' created a class descriptor with .kind "' + - kind + - '"', - ); - } - - this.disallowProperty(obj, "key", "A class descriptor"); - this.disallowProperty(obj, "placement", "A class descriptor"); - this.disallowProperty(obj, "descriptor", "A class descriptor"); - this.disallowProperty(obj, "initializer", "A class descriptor"); - this.disallowProperty(obj, "extras", "A class descriptor"); - - var finisher = _optionalCallableProperty(obj, "finisher"); - var elements = this.toElementDescriptors(obj.elements); - - return { elements: elements, finisher: finisher }; - }, - - // RunClassFinishers - runClassFinishers: function( - constructor /*: Class<*> */, - finishers /*: ClassFinisher[] */, - ) /*: Class<*> */ { - for (var i = 0; i < finishers.length; i++) { - var newConstructor /*: ?Class<*> */ = (0, finishers[i])(constructor); - if (newConstructor !== undefined) { - // NOTE: This should check if IsConstructor(newConstructor) is false. - if (typeof newConstructor !== "function") { - throw new TypeError("Finishers must return a constructor."); - } - constructor = newConstructor; - } - } - return constructor; - }, - - disallowProperty: function(obj, name, objectType) { - if (obj[name] !== undefined) { - throw new TypeError(objectType + " can't have a ." + name + " property."); - } - } - }; - - return api; - } - - // ClassElementEvaluation - function _createElementDescriptor( - def /*: ElementDefinition */, - ) /*: ElementDescriptor */ { - var key = toPropertyKey(def.key); - - var descriptor /*: PropertyDescriptor */; - if (def.kind === "method") { - descriptor = { - value: def.value, - writable: true, - configurable: true, - enumerable: false, - }; - } else if (def.kind === "get") { - descriptor = { get: def.value, configurable: true, enumerable: false }; - } else if (def.kind === "set") { - descriptor = { set: def.value, configurable: true, enumerable: false }; - } else if (def.kind === "field") { - descriptor = { configurable: true, writable: true, enumerable: true }; - } - - var element /*: ElementDescriptor */ = { - kind: def.kind === "field" ? "field" : "method", - key: key, - placement: def.static - ? "static" - : def.kind === "field" - ? "own" - : "prototype", - descriptor: descriptor, - }; - if (def.decorators) element.decorators = def.decorators; - if (def.kind === "field") element.initializer = def.value; - - return element; - } - - // CoalesceGetterSetter - function _coalesceGetterSetter( - element /*: ElementDescriptor */, - other /*: ElementDescriptor */, - ) { - if (element.descriptor.get !== undefined) { - other.descriptor.get = element.descriptor.get; - } else { - other.descriptor.set = element.descriptor.set; - } - } - - // CoalesceClassElements - function _coalesceClassElements( - elements /*: ElementDescriptor[] */, - ) /*: ElementDescriptor[] */ { - var newElements /*: ElementDescriptor[] */ = []; - - var isSameElement = function( - other /*: ElementDescriptor */, - ) /*: boolean */ { - return ( - other.kind === "method" && - other.key === element.key && - other.placement === element.placement - ); - }; - - for (var i = 0; i < elements.length; i++) { - var element /*: ElementDescriptor */ = elements[i]; - var other /*: ElementDescriptor */; - - if ( - element.kind === "method" && - (other = newElements.find(isSameElement)) - ) { - if ( - _isDataDescriptor(element.descriptor) || - _isDataDescriptor(other.descriptor) - ) { - if (_hasDecorators(element) || _hasDecorators(other)) { - throw new ReferenceError( - "Duplicated methods (" + element.key + ") can't be decorated.", - ); - } - other.descriptor = element.descriptor; - } else { - if (_hasDecorators(element)) { - if (_hasDecorators(other)) { - throw new ReferenceError( - "Decorators can't be placed on different accessors with for " + - "the same property (" + - element.key + - ").", - ); - } - other.decorators = element.decorators; - } - _coalesceGetterSetter(element, other); - } - } else { - newElements.push(element); - } - } - - return newElements; - } - - function _hasDecorators(element /*: ElementDescriptor */) /*: boolean */ { - return element.decorators && element.decorators.length; - } - - function _isDataDescriptor(desc /*: PropertyDescriptor */) /*: boolean */ { - return ( - desc !== undefined && - !(desc.value === undefined && desc.writable === undefined) - ); - } - - function _optionalCallableProperty /*::*/( - obj /*: T */, - name /*: $Keys */, - ) /*: ?Function */ { - var value = obj[name]; - if (value !== undefined && typeof value !== "function") { - throw new TypeError("Expected '" + name + "' to be a function"); - } - return value; - } - -`; -helpers.classPrivateMethodGet = helper("7.1.6")` - export default function _classPrivateMethodGet(receiver, privateSet, fn) { - if (!privateSet.has(receiver)) { - throw new TypeError("attempted to get private field on non-instance"); - } - return fn; - } -`; -helpers.classPrivateMethodSet = helper("7.1.6")` - export default function _classPrivateMethodSet() { - throw new TypeError("attempted to reassign private method"); - } -`; -helpers.wrapRegExp = helper("7.2.6")` - import wrapNativeSuper from "wrapNativeSuper"; - import getPrototypeOf from "getPrototypeOf"; - import possibleConstructorReturn from "possibleConstructorReturn"; - import inherits from "inherits"; - - export default function _wrapRegExp(re, groups) { - _wrapRegExp = function(re, groups) { - return new BabelRegExp(re, groups); - }; - - var _RegExp = wrapNativeSuper(RegExp); - var _super = RegExp.prototype; - var _groups = new WeakMap(); - - function BabelRegExp(re, groups) { - var _this = _RegExp.call(this, re); - _groups.set(_this, groups); - return _this; - } - inherits(BabelRegExp, _RegExp); - - BabelRegExp.prototype.exec = function(str) { - var result = _super.exec.call(this, str); - if (result) result.groups = buildGroups(result, this); - return result; - }; - BabelRegExp.prototype[Symbol.replace] = function(str, substitution) { - if (typeof substitution === "string") { - var groups = _groups.get(this); - return _super[Symbol.replace].call( - this, - str, - substitution.replace(/\\$<([^>]+)>/g, function(_, name) { - return "$" + groups[name]; - }) - ); - } else if (typeof substitution === "function") { - var _this = this; - return _super[Symbol.replace].call( - this, - str, - function() { - var args = []; - args.push.apply(args, arguments); - if (typeof args[args.length - 1] !== "object") { - // Modern engines already pass result.groups as the last arg. - args.push(buildGroups(args, _this)); - } - return substitution.apply(this, args); - } - ); - } else { - return _super[Symbol.replace].call(this, str, substitution); - } - } - - function buildGroups(result, re) { - // NOTE: This function should return undefined if there are no groups, - // but in that case Babel doesn't add the wrapper anyway. - - var g = _groups.get(re); - return Object.keys(g).reduce(function(groups, name) { - groups[name] = result[g[name]]; - return groups; - }, Object.create(null)); - } - - return _wrapRegExp.apply(this, arguments); - } -`; \ No newline at end of file diff --git a/node_modules/@babel/helpers/lib/index.js b/node_modules/@babel/helpers/lib/index.js deleted file mode 100644 index 94db512a..00000000 --- a/node_modules/@babel/helpers/lib/index.js +++ /dev/null @@ -1,290 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.get = get; -exports.minVersion = minVersion; -exports.getDependencies = getDependencies; -exports.ensure = ensure; -exports.default = exports.list = void 0; - -function _traverse() { - const data = _interopRequireDefault(require("@babel/traverse")); - - _traverse = function () { - return data; - }; - - return data; -} - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -var _helpers = _interopRequireDefault(require("./helpers")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function makePath(path) { - const parts = []; - - for (; path.parentPath; path = path.parentPath) { - parts.push(path.key); - if (path.inList) parts.push(path.listKey); - } - - return parts.reverse().join("."); -} - -function getHelperMetadata(file) { - const globals = new Set(); - const localBindingNames = new Set(); - const dependencies = new Map(); - let exportName; - let exportPath; - const exportBindingAssignments = []; - const importPaths = []; - const importBindingsReferences = []; - (0, _traverse().default)(file, { - ImportDeclaration(child) { - const name = child.node.source.value; - - if (!_helpers.default[name]) { - throw child.buildCodeFrameError(`Unknown helper ${name}`); - } - - if (child.get("specifiers").length !== 1 || !child.get("specifiers.0").isImportDefaultSpecifier()) { - throw child.buildCodeFrameError("Helpers can only import a default value"); - } - - const bindingIdentifier = child.node.specifiers[0].local; - dependencies.set(bindingIdentifier, name); - importPaths.push(makePath(child)); - }, - - ExportDefaultDeclaration(child) { - const decl = child.get("declaration"); - - if (decl.isFunctionDeclaration()) { - if (!decl.node.id) { - throw decl.buildCodeFrameError("Helpers should give names to their exported func declaration"); - } - - exportName = decl.node.id.name; - } - - exportPath = makePath(child); - }, - - ExportAllDeclaration(child) { - throw child.buildCodeFrameError("Helpers can only export default"); - }, - - ExportNamedDeclaration(child) { - throw child.buildCodeFrameError("Helpers can only export default"); - }, - - Statement(child) { - if (child.isModuleDeclaration()) return; - child.skip(); - } - - }); - (0, _traverse().default)(file, { - Program(path) { - const bindings = path.scope.getAllBindings(); - Object.keys(bindings).forEach(name => { - if (name === exportName) return; - if (dependencies.has(bindings[name].identifier)) return; - localBindingNames.add(name); - }); - }, - - ReferencedIdentifier(child) { - const name = child.node.name; - const binding = child.scope.getBinding(name, true); - - if (!binding) { - globals.add(name); - } else if (dependencies.has(binding.identifier)) { - importBindingsReferences.push(makePath(child)); - } - }, - - AssignmentExpression(child) { - const left = child.get("left"); - if (!(exportName in left.getBindingIdentifiers())) return; - - if (!left.isIdentifier()) { - throw left.buildCodeFrameError("Only simple assignments to exports are allowed in helpers"); - } - - const binding = child.scope.getBinding(exportName); - - if (binding && binding.scope.path.isProgram()) { - exportBindingAssignments.push(makePath(child)); - } - } - - }); - if (!exportPath) throw new Error("Helpers must default-export something."); - exportBindingAssignments.reverse(); - return { - globals: Array.from(globals), - localBindingNames: Array.from(localBindingNames), - dependencies, - exportBindingAssignments, - exportPath, - exportName, - importBindingsReferences, - importPaths - }; -} - -function permuteHelperAST(file, metadata, id, localBindings, getDependency) { - if (localBindings && !id) { - throw new Error("Unexpected local bindings for module-based helpers."); - } - - if (!id) return; - const { - localBindingNames, - dependencies, - exportBindingAssignments, - exportPath, - exportName, - importBindingsReferences, - importPaths - } = metadata; - const dependenciesRefs = {}; - dependencies.forEach((name, id) => { - dependenciesRefs[id.name] = typeof getDependency === "function" && getDependency(name) || id; - }); - const toRename = {}; - const bindings = new Set(localBindings || []); - localBindingNames.forEach(name => { - let newName = name; - - while (bindings.has(newName)) newName = "_" + newName; - - if (newName !== name) toRename[name] = newName; - }); - - if (id.type === "Identifier" && exportName !== id.name) { - toRename[exportName] = id.name; - } - - (0, _traverse().default)(file, { - Program(path) { - const exp = path.get(exportPath); - const imps = importPaths.map(p => path.get(p)); - const impsBindingRefs = importBindingsReferences.map(p => path.get(p)); - const decl = exp.get("declaration"); - - if (id.type === "Identifier") { - if (decl.isFunctionDeclaration()) { - exp.replaceWith(decl); - } else { - exp.replaceWith(t().variableDeclaration("var", [t().variableDeclarator(id, decl.node)])); - } - } else if (id.type === "MemberExpression") { - if (decl.isFunctionDeclaration()) { - exportBindingAssignments.forEach(assignPath => { - const assign = path.get(assignPath); - assign.replaceWith(t().assignmentExpression("=", id, assign.node)); - }); - exp.replaceWith(decl); - path.pushContainer("body", t().expressionStatement(t().assignmentExpression("=", id, t().identifier(exportName)))); - } else { - exp.replaceWith(t().expressionStatement(t().assignmentExpression("=", id, decl.node))); - } - } else { - throw new Error("Unexpected helper format."); - } - - Object.keys(toRename).forEach(name => { - path.scope.rename(name, toRename[name]); - }); - - for (const path of imps) path.remove(); - - for (const path of impsBindingRefs) { - const node = t().cloneNode(dependenciesRefs[path.node.name]); - path.replaceWith(node); - } - - path.stop(); - } - - }); -} - -const helperData = Object.create(null); - -function loadHelper(name) { - if (!helperData[name]) { - const helper = _helpers.default[name]; - - if (!helper) { - throw Object.assign(new ReferenceError(`Unknown helper ${name}`), { - code: "BABEL_HELPER_UNKNOWN", - helper: name - }); - } - - const fn = () => { - return t().file(helper.ast()); - }; - - const metadata = getHelperMetadata(fn()); - helperData[name] = { - build(getDependency, id, localBindings) { - const file = fn(); - permuteHelperAST(file, metadata, id, localBindings, getDependency); - return { - nodes: file.program.body, - globals: metadata.globals - }; - }, - - minVersion() { - return helper.minVersion; - }, - - dependencies: metadata.dependencies - }; - } - - return helperData[name]; -} - -function get(name, getDependency, id, localBindings) { - return loadHelper(name).build(getDependency, id, localBindings); -} - -function minVersion(name) { - return loadHelper(name).minVersion(); -} - -function getDependencies(name) { - return Array.from(loadHelper(name).dependencies.values()); -} - -function ensure(name) { - loadHelper(name); -} - -const list = Object.keys(_helpers.default).map(name => name.replace(/^_/, "")).filter(name => name !== "__esModule"); -exports.list = list; -var _default = get; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/@babel/helpers/package.json b/node_modules/@babel/helpers/package.json deleted file mode 100644 index 68d671af..00000000 --- a/node_modules/@babel/helpers/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "_args": [ - [ - "@babel/helpers@7.5.5", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@babel/helpers@7.5.5", - "_id": "@babel/helpers@7.5.5", - "_inBundle": false, - "_integrity": "sha512-nRq2BUhxZFnfEn/ciJuhklHvFOqjJUD5wpx+1bxUF2axL9C+v4DE/dmp5sT2dKnpOs4orZWzpAZqlCy8QqE/7g==", - "_location": "/@babel/helpers", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/helpers@7.5.5", - "name": "@babel/helpers", - "escapedName": "@babel%2fhelpers", - "scope": "@babel", - "rawSpec": "7.5.5", - "saveSpec": null, - "fetchSpec": "7.5.5" - }, - "_requiredBy": [ - "/@babel/core" - ], - "_resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.5.5.tgz", - "_spec": "7.5.5", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "dependencies": { - "@babel/template": "^7.4.4", - "@babel/traverse": "^7.5.5", - "@babel/types": "^7.5.5" - }, - "description": "Collection of helper functions used by Babel transforms.", - "devDependencies": { - "@babel/helper-plugin-test-runner": "^7.0.0" - }, - "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/helpers", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-helpers" - }, - "version": "7.5.5" -} diff --git a/node_modules/@babel/highlight/LICENSE b/node_modules/@babel/highlight/LICENSE deleted file mode 100644 index f31575ec..00000000 --- a/node_modules/@babel/highlight/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/highlight/README.md b/node_modules/@babel/highlight/README.md deleted file mode 100644 index 72dae609..00000000 --- a/node_modules/@babel/highlight/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/highlight - -> Syntax highlight JavaScript strings for output in terminals. - -See our website [@babel/highlight](https://babeljs.io/docs/en/next/babel-highlight.html) for more information. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/highlight -``` - -or using yarn: - -```sh -yarn add @babel/highlight --dev -``` diff --git a/node_modules/@babel/highlight/lib/index.js b/node_modules/@babel/highlight/lib/index.js deleted file mode 100644 index 6ac5b4a3..00000000 --- a/node_modules/@babel/highlight/lib/index.js +++ /dev/null @@ -1,129 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.shouldHighlight = shouldHighlight; -exports.getChalk = getChalk; -exports.default = highlight; - -function _jsTokens() { - const data = _interopRequireWildcard(require("js-tokens")); - - _jsTokens = function () { - return data; - }; - - return data; -} - -function _esutils() { - const data = _interopRequireDefault(require("esutils")); - - _esutils = function () { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require("chalk")); - - _chalk = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function getDefs(chalk) { - return { - keyword: chalk.cyan, - capitalized: chalk.yellow, - jsx_tag: chalk.yellow, - punctuator: chalk.yellow, - number: chalk.magenta, - string: chalk.green, - regex: chalk.magenta, - comment: chalk.grey, - invalid: chalk.white.bgRed.bold - }; -} - -const NEWLINE = /\r\n|[\n\r\u2028\u2029]/; -const JSX_TAG = /^[a-z][\w-]*$/i; -const BRACKET = /^[()[\]{}]$/; - -function getTokenType(match) { - const [offset, text] = match.slice(-2); - const token = (0, _jsTokens().matchToToken)(match); - - if (token.type === "name") { - if (_esutils().default.keyword.isReservedWordES6(token.value)) { - return "keyword"; - } - - if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == " colorize(str)).join("\n"); - } else { - return args[0]; - } - }); -} - -function shouldHighlight(options) { - return _chalk().default.supportsColor || options.forceColor; -} - -function getChalk(options) { - let chalk = _chalk().default; - - if (options.forceColor) { - chalk = new (_chalk().default.constructor)({ - enabled: true, - level: 1 - }); - } - - return chalk; -} - -function highlight(code, options = {}) { - if (shouldHighlight(options)) { - const chalk = getChalk(options); - const defs = getDefs(chalk); - return highlightTokens(defs, code); - } else { - return code; - } -} \ No newline at end of file diff --git a/node_modules/@babel/highlight/package.json b/node_modules/@babel/highlight/package.json deleted file mode 100644 index 076edc48..00000000 --- a/node_modules/@babel/highlight/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "_args": [ - [ - "@babel/highlight@7.5.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@babel/highlight@7.5.0", - "_id": "@babel/highlight@7.5.0", - "_inBundle": false, - "_integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", - "_location": "/@babel/highlight", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/highlight@7.5.0", - "name": "@babel/highlight", - "escapedName": "@babel%2fhighlight", - "scope": "@babel", - "rawSpec": "7.5.0", - "saveSpec": null, - "fetchSpec": "7.5.0" - }, - "_requiredBy": [ - "/@babel/code-frame" - ], - "_resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", - "_spec": "7.5.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "suchipi", - "email": "me@suchipi.com" - }, - "dependencies": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - }, - "description": "Syntax highlight JavaScript strings for output in terminals.", - "devDependencies": { - "strip-ansi": "^4.0.0" - }, - "gitHead": "49da9a07c81156e997e60146eb001ea77b7044c4", - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/highlight", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-highlight" - }, - "version": "7.5.0" -} diff --git a/node_modules/@babel/parser/CHANGELOG.md b/node_modules/@babel/parser/CHANGELOG.md deleted file mode 100644 index 6ddd17fb..00000000 --- a/node_modules/@babel/parser/CHANGELOG.md +++ /dev/null @@ -1,1073 +0,0 @@ -# Changelog - -> **Tags:** -> - :boom: [Breaking Change] -> - :eyeglasses: [Spec Compliancy] -> - :rocket: [New Feature] -> - :bug: [Bug Fix] -> - :memo: [Documentation] -> - :house: [Internal] -> - :nail_care: [Polish] - -> Semver Policy: https://github.com/babel/babel/tree/master/packages/babel-parser#semver - -_Note: Gaps between patch versions are faulty, broken or test releases._ - -See the [Babel Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) for the pre-6.8.0 version Changelog. - -## 6.17.1 (2017-05-10) - -### :bug: Bug Fix - * Fix typo in flow spread operator error (Brian Ng) - * Fixed invalid number literal parsing ([#473](https://github.com/babel/babylon/pull/473)) (Alex Kuzmenko) - * Fix number parser ([#433](https://github.com/babel/babylon/pull/433)) (Alex Kuzmenko) - * Ensure non pattern shorthand props are checked for reserved words ([#479](https://github.com/babel/babylon/pull/479)) (Brian Ng) - * Remove jsx context when parsing arrow functions ([#475](https://github.com/babel/babylon/pull/475)) (Brian Ng) - * Allow super in class properties ([#499](https://github.com/babel/babylon/pull/499)) (Brian Ng) - * Allow flow class field to be named constructor ([#510](https://github.com/babel/babylon/pull/510)) (Brian Ng) - -## 6.17.0 (2017-04-20) - -### :bug: Bug Fix - * Cherry-pick #418 to 6.x ([#476](https://github.com/babel/babylon/pull/476)) (Sebastian McKenzie) - * Add support for invalid escapes in tagged templates ([#274](https://github.com/babel/babylon/pull/274)) (Kevin Gibbons) - * Throw error if new.target is used outside of a function ([#402](https://github.com/babel/babylon/pull/402)) (Brian Ng) - * Fix parsing of class properties ([#351](https://github.com/babel/babylon/pull/351)) (Kevin Gibbons) - * Fix parsing yield with dynamicImport ([#383](https://github.com/babel/babylon/pull/383)) (Brian Ng) - * Ensure consistent start args for parseParenItem ([#386](https://github.com/babel/babylon/pull/386)) (Brian Ng) - -## 7.0.0-beta.8 (2017-04-04) - -### New Feature -* Add support for flow type spread (#418) (Conrad Buck) -* Allow statics in flow interfaces (#427) (Brian Ng) - -### Bug Fix -* Fix predicate attachment to match flow parser (#428) (Brian Ng) -* Add extra.raw back to JSXText and JSXAttribute (#344) (Alex Rattray) -* Fix rest parameters with array and objects (#424) (Brian Ng) -* Fix number parser (#433) (Alex Kuzmenko) - -### Docs -* Fix CONTRIBUTING.md [skip ci] (#432) (Alex Kuzmenko) - -### Internal -* Use babel-register script when running babel smoke tests (#442) (Brian Ng) - -## 7.0.0-beta.7 (2017-03-22) - -### Spec Compliancy -* Remove babylon plugin for template revision since it's stage-4 (#426) (Henry Zhu) - -### Bug Fix - -* Fix push-pop logic in flow (#405) (Daniel Tschinder) - -## 7.0.0-beta.6 (2017-03-21) - -### New Feature -* Add support for invalid escapes in tagged templates (#274) (Kevin Gibbons) - -### Polish -* Improves error message when super is called outside of constructor (#408) (Arshabh Kumar Agarwal) - -### Docs - -* [7.0] Moved value field in spec from ObjectMember to ObjectProperty as ObjectMethod's don't have it (#415) [skip ci] (James Browning) - -## 7.0.0-beta.5 (2017-03-21) - -### Bug Fix -* Throw error if new.target is used outside of a function (#402) (Brian Ng) -* Fix parsing of class properties (#351) (Kevin Gibbons) - -### Other - * Test runner: Detect extra property in 'actual' but not in 'expected'. (#407) (Andy) - * Optimize travis builds (#419) (Daniel Tschinder) - * Update codecov to 2.0 (#412) (Daniel Tschinder) - * Fix spec for ClassMethod: It doesn't have a function, it *is* a function. (#406) [skip ci] (Andy) - * Changed Non-existent RestPattern to RestElement which is what is actually parsed (#409) [skip ci] (James Browning) - * Upgrade flow to 0.41 (Daniel Tschinder) - * Fix watch command (#403) (Brian Ng) - * Update yarn lock (Daniel Tschinder) - * Fix watch command (#403) (Brian Ng) - * chore(package): update flow-bin to version 0.41.0 (#395) (greenkeeper[bot]) - * Add estree test for correct order of directives (Daniel Tschinder) - * Add DoExpression to spec (#364) (Alex Kuzmenko) - * Mention cloning of repository in CONTRIBUTING.md (#391) [skip ci] (Sumedh Nimkarde) - * Explain how to run only one test (#389) [skip ci] (Aaron Ang) - - ## 7.0.0-beta.4 (2017-03-01) - -* Don't consume async when checking for async func decl (#377) (Brian Ng) -* add `ranges` option [skip ci] (Henry Zhu) -* Don't parse class properties without initializers when classProperties is disabled and Flow is enabled (#300) (Andrew Levine) - -## 7.0.0-beta.3 (2017-02-28) - -- [7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement (#384) -- Merge changes from 6.x - -## 7.0.0-beta.2 (2017-02-20) - -- estree: correctly change literals in all cases (#368) (Daniel Tschinder) - -## 7.0.0-beta.1 (2017-02-20) - -- Fix negative number literal typeannotations (#366) (Daniel Tschinder) -- Update contributing with more test info [skip ci] (#355) (Brian Ng) - -## 7.0.0-beta.0 (2017-02-15) - -- Reintroduce Variance node (#333) (Daniel Tschinder) -- Rename NumericLiteralTypeAnnotation to NumberLiteralTypeAnnotation (#332) (Charles Pick) -- [7.0] Remove ForAwaitStatement, add await flag to ForOfStatement (#349) (Brandon Dail) -- chore(package): update ava to version 0.18.0 (#345) (greenkeeper[bot]) -- chore(package): update babel-plugin-istanbul to version 4.0.0 (#350) (greenkeeper[bot]) -- Change location of ObjectTypeIndexer to match flow (#228) (Daniel Tschinder) -- Rename flow AST Type ExistentialTypeParam to ExistsTypeAnnotation (#322) (Toru Kobayashi) -- Revert "Temporary rollback for erroring on trailing comma with spread (#154)" (#290) (Daniel Tschinder) -- Remove classConstructorCall plugin (#291) (Brian Ng) -- Update yarn.lock (Daniel Tschinder) -- Update cross-env to 3.x (Daniel Tschinder) -- [7.0] Remove node 0.10, 0.12 and 5 from Travis (#284) (Sergey Rubanov) -- Remove `String.fromCodePoint` shim (#279) (Mathias Bynens) - -## 6.16.1 (2017-02-23) - -### :bug: Regression - -- Revert "Fix export default async function to be FunctionDeclaration" ([#375](https://github.com/babel/babylon/pull/375)) - -Need to modify Babel for this AST node change, so moving to 7.0. - -- Revert "Don't parse class properties without initializers when classProperties plugin is disabled, and Flow is enabled" ([#376](https://github.com/babel/babylon/pull/376)) - -[react-native](https://github.com/facebook/react-native/issues/12542) broke with this so we reverted. - -## 6.16.0 (2017-02-23) - -### :rocket: New Feature - -***ESTree*** compatibility as plugin ([#277](https://github.com/babel/babylon/pull/277)) (Daniel Tschinder) - -We finally introduce a new compatibility layer for ESTree. To put babylon into ESTree-compatible mode the new plugin `estree` can be enabled. In this mode the parser will output an AST that is compliant to the specs of [ESTree](https://github.com/estree/estree/) - -We highly recommend everyone who uses babylon outside of babel to use this plugin. This will make it much easier for users to switch between different ESTree-compatible parsers. We so far tested several projects with different parsers and exchanged their parser to babylon and in nearly all cases it worked out of the box. Some other estree-compatible parsers include `acorn`, `esprima`, `espree`, `flow-parser`, etc. - -To enable `estree` mode simply add the plugin in the config: -```json -{ - "plugins": [ "estree" ] -} -``` - -If you want to migrate your project from non-ESTree mode to ESTree, have a look at our [Readme](https://github.com/babel/babylon/#output), where all deviations are mentioned. - -Add a parseExpression public method ([#213](https://github.com/babel/babylon/pull/213)) (jeromew) - -Babylon exports a new function to parse a single expression - -```js -import { parseExpression } from 'babylon'; - -const ast = parseExpression('x || y && z', options); -``` - -The returned AST will only consist of the expression. The options are the same as for `parse()` - -Add startLine option ([#346](https://github.com/babel/babylon/pull/346)) (Raphael Mu) - -A new option was added to babylon allowing to change the initial linenumber for the first line which is usually `1`. -Changing this for example to `100` will make line `1` of the input source to be marked as line `100`, line `2` as `101`, line `3` as `102`, ... - -Function predicate declaration ([#103](https://github.com/babel/babylon/pull/103)) (Panagiotis Vekris) - -Added support for function predicates which flow introduced in version 0.33.0 - -```js -declare function is_number(x: mixed): boolean %checks(typeof x === "number"); -``` - -Allow imports in declare module ([#315](https://github.com/babel/babylon/pull/315)) (Daniel Tschinder) - -Added support for imports within module declarations which flow introduced in version 0.37.0 - -```js -declare module "C" { - import type { DT } from "D"; - declare export type CT = { D: DT }; -} -``` - -### :eyeglasses: Spec Compliancy - -Forbid semicolons after decorators in classes ([#352](https://github.com/babel/babylon/pull/352)) (Kevin Gibbons) - -This example now correctly throws an error when there is a semicolon after the decorator: - -```js -class A { -@a; -foo(){} -} -``` - -Keywords are not allowed as local specifier ([#307](https://github.com/babel/babylon/pull/307)) (Daniel Tschinder) - -Using keywords in imports is not allowed anymore: - -```js -import { default } from "foo"; -import { a as debugger } from "foo"; -``` - -Do not allow overwritting of primitive types ([#314](https://github.com/babel/babylon/pull/314)) (Daniel Tschinder) - -In flow it is now forbidden to overwrite the primitive types `"any"`, `"mixed"`, `"empty"`, `"bool"`, `"boolean"`, `"number"`, `"string"`, `"void"` and `"null"` with your own type declaration. - -Disallow import type { type a } from … ([#305](https://github.com/babel/babylon/pull/305)) (Daniel Tschinder) - -The following code now correctly throws an error - -```js -import type { type a } from "foo"; -``` - -Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ([#300](https://github.com/babel/babylon/pull/300)) (Andrew Levine) - -Ensure that you enable the `classProperties` plugin in order to enable correct parsing of class properties. Prior to this version it was possible to parse them by enabling the `flow` plugin but this was not intended the behaviour. - -If you enable the flow plugin you can only define the type of the class properties, but not initialize them. - -Fix export default async function to be FunctionDeclaration ([#324](https://github.com/babel/babylon/pull/324)) (Daniel Tschinder) - -Parsing the following code now returns a `FunctionDeclaration` AST node instead of `FunctionExpression`. - -```js -export default async function bar() {}; -``` - -### :nail_care: Polish - -Improve error message on attempt to destructure named import ([#288](https://github.com/babel/babylon/pull/288)) (Brian Ng) - -### :bug: Bug Fix - -Fix negative number literal typeannotations ([#366](https://github.com/babel/babylon/pull/366)) (Daniel Tschinder) - -Ensure takeDecorators is called on exported class ([#358](https://github.com/babel/babylon/pull/358)) (Brian Ng) - -ESTree: correctly change literals in all cases ([#368](https://github.com/babel/babylon/pull/368)) (Daniel Tschinder) - -Correctly convert RestProperty to Assignable ([#339](https://github.com/babel/babylon/pull/339)) (Daniel Tschinder) - -Fix #321 by allowing question marks in type params ([#338](https://github.com/babel/babylon/pull/338)) (Daniel Tschinder) - -Fix #336 by correctly setting arrow-param ([#337](https://github.com/babel/babylon/pull/337)) (Daniel Tschinder) - -Fix parse error when destructuring `set` with default value ([#317](https://github.com/babel/babylon/pull/317)) (Brian Ng) - -Fix ObjectTypeCallProperty static ([#298](https://github.com/babel/babylon/pull/298)) (Dan Harper) - - -### :house: Internal - -Fix generator-method-with-computed-name spec ([#360](https://github.com/babel/babylon/pull/360)) (Alex Rattray) - -Fix flow type-parameter-declaration test with unintended semantic ([#361](https://github.com/babel/babylon/pull/361)) (Alex Rattray) - -Cleanup and splitup parser functions ([#295](https://github.com/babel/babylon/pull/295)) (Daniel Tschinder) - -chore(package): update flow-bin to version 0.38.0 ([#313](https://github.com/babel/babylon/pull/313)) (greenkeeper[bot]) - -Call inner function instead of 1:1 copy to plugin ([#294](https://github.com/babel/babylon/pull/294)) (Daniel Tschinder) - -Update eslint-config-babel to the latest version 🚀 ([#299](https://github.com/babel/babylon/pull/299)) (greenkeeper[bot]) - -Update eslint-config-babel to the latest version 🚀 ([#293](https://github.com/babel/babylon/pull/293)) (greenkeeper[bot]) - -devDeps: remove eslint-plugin-babel ([#292](https://github.com/babel/babylon/pull/292)) (Kai Cataldo) - -Correct indent eslint rule config ([#276](https://github.com/babel/babylon/pull/276)) (Daniel Tschinder) - -Fail tests that have expected.json and throws-option ([#285](https://github.com/babel/babylon/pull/285)) (Daniel Tschinder) - -### :memo: Documentation - -Update contributing with more test info [skip ci] ([#355](https://github.com/babel/babylon/pull/355)) (Brian Ng) - -Update API documentation ([#330](https://github.com/babel/babylon/pull/330)) (Timothy Gu) - -Added keywords to package.json ([#323](https://github.com/babel/babylon/pull/323)) (Dmytro) - -AST spec: fix casing of `RegExpLiteral` ([#318](https://github.com/babel/babylon/pull/318)) (Mathias Bynens) - -## 6.15.0 (2017-01-10) - -### :eyeglasses: Spec Compliancy - -Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison) - -This change implements flows new shorthand import syntax -and where previously you had to write this code: - -```js -import {someValue} from "blah"; -import type {someType} from "blah"; -import typeof {someOtherValue} from "blah"; -``` - -you can now write it like this: - -```js -import { - someValue, - type someType, - typeof someOtherValue, -} from "blah"; -``` - -For more information look at [this](https://github.com/facebook/flow/pull/2890) pull request. - -flow: allow leading pipes in all positions ([#256](https://github.com/babel/babylon/pull/256)) (Vladimir Kurchatkin) - -This change now allows a leading pipe everywhere types can be used: -```js -var f = (x): | 1 | 2 => 1; -``` - -Throw error when exporting non-declaration ([#241](https://github.com/babel/babylon/pull/241)) (Kai Cataldo) - -Previously babylon parsed the following exports, although they are not valid: -```js -export typeof foo; -export new Foo(); -export function() {}; -export for (;;); -export while(foo); -``` - -### :bug: Bug Fix - -Don't set inType flag when parsing property names ([#266](https://github.com/babel/babylon/pull/266)) (Vladimir Kurchatkin) - -This fixes parsing of this case: - -```js -const map = { - [age <= 17] : 'Too young' -}; -``` - -Fix source location for JSXEmptyExpression nodes (fixes #248) ([#249](https://github.com/babel/babylon/pull/249)) (James Long) - -The following case produced an invalid AST -```js -
{/* foo */}
-``` - -Use fromCodePoint to convert high value unicode entities ([#243](https://github.com/babel/babylon/pull/243)) (Ryan Duffy) - -When high value unicode entities (e.g. 💩) were used in the input source code they are now correctly encoded in the resulting AST. - -Rename folder to avoid Windows-illegal characters ([#281](https://github.com/babel/babylon/pull/281)) (Ryan Plant) - -Allow this.state.clone() when parsing decorators ([#262](https://github.com/babel/babylon/pull/262)) (Alex Rattray) - -### :house: Internal - -User external-helpers ([#254](https://github.com/babel/babylon/pull/254)) (Daniel Tschinder) - -Add watch script for dev ([#234](https://github.com/babel/babylon/pull/234)) (Kai Cataldo) - -Freeze current plugins list for "*" option, and remove from README.md ([#245](https://github.com/babel/babylon/pull/245)) (Andrew Levine) - -Prepare tests for multiple fixture runners. ([#240](https://github.com/babel/babylon/pull/240)) (Daniel Tschinder) - -Add some test coverage for decorators stage-0 plugin ([#250](https://github.com/babel/babylon/pull/250)) (Andrew Levine) - -Refactor tokenizer types file ([#263](https://github.com/babel/babylon/pull/263)) (Sven SAULEAU) - -Update eslint-config-babel to the latest version 🚀 ([#273](https://github.com/babel/babylon/pull/273)) (greenkeeper[bot]) - -chore(package): update rollup to version 0.41.0 ([#272](https://github.com/babel/babylon/pull/272)) (greenkeeper[bot]) - -chore(package): update flow-bin to version 0.37.0 ([#255](https://github.com/babel/babylon/pull/255)) (greenkeeper[bot]) - -## 6.14.1 (2016-11-17) - -### :bug: Bug Fix - -Allow `"plugins": ["*"]` ([#229](https://github.com/babel/babylon/pull/229)) (Daniel Tschinder) - -```js -{ - "plugins": ["*"] -} -``` - -Will include all parser plugins instead of specifying each one individually. Useful for tools like babel-eslint, jscodeshift, and ast-explorer. - -## 6.14.0 (2016-11-16) - -### :eyeglasses: Spec Compliancy - -Throw error for reserved words `enum` and `await` ([#195](https://github.com/babel/babylon/pull/195)) (Kai Cataldo) - -[11.6.2.2 Future Reserved Words](http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words) - -Babylon will throw for more reserved words such as `enum` or `await` (in strict mode). - -``` -class enum {} // throws -class await {} // throws in strict mode (module) -``` - -Optional names for function types and object type indexers ([#197](https://github.com/babel/babylon/pull/197)) (Gabe Levi) - -So where you used to have to write - -```js -type A = (x: string, y: boolean) => number; -type B = (z: string) => number; -type C = { [key: string]: number }; -``` - -you can now write (with flow 0.34.0) - -```js -type A = (string, boolean) => number; -type B = string => number; -type C = { [string]: number }; -``` - -Parse flow nested array type annotations like `number[][]` ([#219](https://github.com/babel/babylon/pull/219)) (Bernhard Häussner) - -Supports these form now of specifying array types: - -```js -var a: number[][][][]; -var b: string[][]; -``` - -### :bug: Bug Fix - -Correctly eat semicolon at the end of `DelcareModuleExports` ([#223](https://github.com/babel/babylon/pull/223)) (Daniel Tschinder) - -``` -declare module "foo" { declare module.exports: number } -declare module "foo" { declare module.exports: number; } // also allowed now -``` - -### :house: Internal - - * Count Babel tests towards Babylon code coverage ([#182](https://github.com/babel/babylon/pull/182)) (Moti Zilberman) - * Fix strange line endings ([#214](https://github.com/babel/babylon/pull/214)) (Thomas Grainger) - * Add node 7 (Daniel Tschinder) - * chore(package): update flow-bin to version 0.34.0 ([#204](https://github.com/babel/babylon/pull/204)) (Greenkeeper) - -## v6.13.1 (2016-10-26) - -### :nail_care: Polish - -- Use rollup for bundling to speed up startup time ([#190](https://github.com/babel/babylon/pull/190)) ([@drewml](https://github.com/DrewML)) - -```js -const babylon = require('babylon'); -const ast = babylon.parse('var foo = "lol";'); -``` - -With that test case, there was a ~95ms savings by removing the need for node to build/traverse the dependency graph. - -**Without bundling** -![image](https://cloud.githubusercontent.com/assets/5233399/19420264/3133497e-93ad-11e6-9a6a-2da59c4f5c13.png) - -**With bundling** -![image](https://cloud.githubusercontent.com/assets/5233399/19420267/388f556e-93ad-11e6-813e-7c5c396be322.png) - -- add clean command [skip ci] ([#201](https://github.com/babel/babylon/pull/201)) (Henry Zhu) -- add ForAwaitStatement (async generator already added) [skip ci] ([#196](https://github.com/babel/babylon/pull/196)) (Henry Zhu) - -## v6.13.0 (2016-10-21) - -### :eyeglasses: Spec Compliancy - -Property variance type annotations for Flow plugin ([#161](https://github.com/babel/babylon/pull/161)) (Sam Goldman) - -> See https://flowtype.org/docs/variance.html for more information - -```js -type T = { +p: T }; -interface T { -p: T }; -declare class T { +[k:K]: V }; -class T { -[k:K]: V }; -class C2 { +p: T = e }; -``` - -Raise error on duplicate definition of __proto__ ([#183](https://github.com/babel/babylon/pull/183)) (Moti Zilberman) - -```js -({ __proto__: 1, __proto__: 2 }) // Throws an error now -``` - -### :bug: Bug Fix - -Flow: Allow class properties to be named `static` ([#184](https://github.com/babel/babylon/pull/184)) (Moti Zilberman) - -```js -declare class A { - static: T; -} -``` - -Allow "async" as identifier for object literal property shorthand ([#187](https://github.com/babel/babylon/pull/187)) (Andrew Levine) - -```js -var foo = { async, bar }; -``` - -### :nail_care: Polish - -Fix flowtype and add inType to state ([#189](https://github.com/babel/babylon/pull/189)) (Daniel Tschinder) - -> This improves the performance slightly (because of hidden classes) - -### :house: Internal - -Fix .gitattributes line ending setting ([#191](https://github.com/babel/babylon/pull/191)) (Moti Zilberman) - -Increase test coverage ([#175](https://github.com/babel/babylon/pull/175) (Moti Zilberman) - -Readd missin .eslinignore for IDEs (Daniel Tschinder) - -Error on missing expected.json fixture in CI ([#188](https://github.com/babel/babylon/pull/188)) (Moti Zilberman) - -Add .gitattributes and .editorconfig for LF line endings ([#179](https://github.com/babel/babylon/pull/179)) (Moti Zilberman) - -Fixes two tests that are failing after the merge of #172 ([#177](https://github.com/babel/babylon/pull/177)) (Moti Zilberman) - -## v6.12.0 (2016-10-14) - -### :eyeglasses: Spec Compliancy - -Implement import() syntax ([#163](https://github.com/babel/babylon/pull/163)) (Jordan Gensler) - -#### Dynamic Import - -- Proposal Repo: https://github.com/domenic/proposal-dynamic-import -- Championed by [@domenic](https://github.com/domenic) -- stage-2 -- [sept-28 tc39 notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-09/sept-28.md#113a-import) - -> This repository contains a proposal for adding a "function-like" import() module loading syntactic form to JavaScript - -```js -import(`./section-modules/${link.dataset.entryModule}.js`) -.then(module => { - module.loadPageInto(main); -}) -``` - -Add EmptyTypeAnnotation ([#171](https://github.com/babel/babylon/pull/171)) (Sam Goldman) - -#### EmptyTypeAnnotation - -Just wasn't covered before. - -```js -type T = empty; -``` - -### :bug: Bug Fix - -Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) - -```js -// was failing due to sparse array -export const { foo: [ ,, qux7 ] } = bar; -``` - -Allow keyword in Flow object declaration property names with type parameters ([#146](https://github.com/babel/babylon/pull/146)) (Dan Harper) - -```js -declare class X { - foobar(): void; - static foobar(): void; -} -``` - -Allow keyword in object/class property names with Flow type parameters ([#145](https://github.com/babel/babylon/pull/145)) (Dan Harper) - -```js -class Foo { - delete(item: T): T { - return item; - } -} -``` - -Allow typeAnnotations for yield expressions ([#174](https://github.com/babel/babylon/pull/174))) (Daniel Tschinder) - -```js -function *foo() { - const x = (yield 5: any); -} -``` - -### :nail_care: Polish - -Annotate more errors with expected token ([#172](https://github.com/babel/babylon/pull/172))) (Moti Zilberman) - -```js -// Unexpected token, expected ; (1:6) -{ set 1 } -``` - -### :house: Internal - -Remove kcheck ([#173](https://github.com/babel/babylon/pull/173))) (Daniel Tschinder) - -Also run flow, linting, babel tests on separate instances (add back node 0.10) - -## v6.11.6 (2016-10-12) - -### :bug: Bug Fix/Regression - -Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) - -```js -// was failing with `Cannot read property 'type' of null` because of null identifiers -export const { foo: [ ,, qux7 ] } = bar; -``` - -## v6.11.5 (2016-10-12) - -### :eyeglasses: Spec Compliancy - -Fix: Check for duplicate named exports in exported destructuring assignments ([#144](https://github.com/babel/babylon/pull/144)) (Kai Cataldo) - -```js -// `foo` has already been exported. Exported identifiers must be unique. (2:20) -export function foo() {}; -export const { a: [{foo}] } = bar; -``` - -Fix: Check for duplicate named exports in exported rest elements/properties ([#164](https://github.com/babel/babylon/pull/164)) (Kai Cataldo) - -```js -// `foo` has already been exported. Exported identifiers must be unique. (2:22) -export const foo = 1; -export const [bar, ...foo] = baz; -``` - -### :bug: Bug Fix - -Fix: Allow identifier `async` for default param in arrow expression ([#165](https://github.com/babel/babylon/pull/165)) (Kai Cataldo) - -```js -// this is ok now -const test = ({async = true}) => {}; -``` - -### :nail_care: Polish - -Babylon will now print out the token it's expecting if there's a `SyntaxError` ([#150](https://github.com/babel/babylon/pull/150)) (Daniel Tschinder) - -```bash -# So in the case of a missing ending curly (`}`) -Module build failed: SyntaxError: Unexpected token, expected } (30:0) - 28 | } - 29 | -> 30 | - | ^ -``` - -## v6.11.4 (2016-10-03) - -Temporary rollback for erroring on trailing comma with spread (#154) (Henry Zhu) - -## v6.11.3 (2016-10-01) - -### :eyeglasses: Spec Compliancy - -Add static errors for object rest (#149) ([@danez](https://github.com/danez)) - -> https://github.com/sebmarkbage/ecmascript-rest-spread - -Object rest copies the *rest* of properties from the right hand side `obj` starting from the left to right. - -```js -let { x, y, ...z } = { x: 1, y: 2, z: 3 }; -// x = 1 -// y = 2 -// z = { z: 3 } -``` - -#### New Syntax Errors: - -**SyntaxError**: The rest element has to be the last element when destructuring (1:10) -```bash -> 1 | let { ...x, y, z } = { x: 1, y: 2, z: 3}; - | ^ -# Previous behavior: -# x = { x: 1, y: 2, z: 3 } -# y = 2 -# z = 3 -``` - -Before, this was just a more verbose way of shallow copying `obj` since it doesn't actually do what you think. - -**SyntaxError**: Cannot have multiple rest elements when destructuring (1:13) - -```bash -> 1 | let { x, ...y, ...z } = { x: 1, y: 2, z: 3}; - | ^ -# Previous behavior: -# x = 1 -# y = { y: 2, z: 3 } -# z = { y: 2, z: 3 } -``` - -Before y and z would just be the same value anyway so there is no reason to need to have both. - -**SyntaxError**: A trailing comma is not permitted after the rest element (1:16) - -```js -let { x, y, ...z, } = obj; -``` - -The rationale for this is that the use case for trailing comma is that you can add something at the end without affecting the line above. Since a RestProperty always has to be the last property it doesn't make sense. - ---- - -get / set are valid property names in default assignment (#142) ([@jezell](https://github.com/jezell)) - -```js -// valid -function something({ set = null, get = null }) {} -``` - -## v6.11.2 (2016-09-23) - -### Bug Fix - -- [#139](https://github.com/babel/babylon/issues/139) Don't do the duplicate check if not an identifier (#140) @hzoo - -```js -// regression with duplicate export check -SyntaxError: ./typography.js: `undefined` has already been exported. Exported identifiers must be unique. (22:13) - 20 | - 21 | export const { rhythm } = typography; -> 22 | export const { TypographyStyle } = typography -``` - -Bail out for now, and make a change to account for destructuring in the next release. - -## 6.11.1 (2016-09-22) - -### Bug Fix -- [#137](https://github.com/babel/babylon/pull/137) - Fix a regression with duplicate exports - it was erroring on all keys in `Object.prototype`. @danez - -```javascript -export toString from './toString'; -``` - -```bash -`toString` has already been exported. Exported identifiers must be unique. (1:7) -> 1 | export toString from './toString'; - | ^ - 2 | -``` - -## 6.11.0 (2016-09-22) - -### Spec Compliancy (will break CI) - -- Disallow duplicate named exports ([#107](https://github.com/babel/babylon/pull/107)) @kaicataldo - -```js -// Only one default export allowed per module. (2:9) -export default function() {}; -export { foo as default }; - -// Only one default export allowed per module. (2:0) -export default {}; -export default function() {}; - -// `Foo` has already been exported. Exported identifiers must be unique. (2:0) -export { Foo }; -export class Foo {}; -``` - -### New Feature (Syntax) - -- Add support for computed class property names ([#121](https://github.com/babel/babylon/pull/121)) @motiz88 - -```js -// AST -interface ClassProperty <: Node { - type: "ClassProperty"; - key: Identifier; - value: Expression; - computed: boolean; // added -} -``` - -```js -// with "plugins": ["classProperties"] -class Foo { - [x] - ['y'] -} - -class Bar { - [p] - [m] () {} -} - ``` - -### Bug Fix - -- Fix `static` property falling through in the declare class Flow AST ([#135](https://github.com/babel/babylon/pull/135)) @danharper - -```js -declare class X { - a: number; - static b: number; // static - c: number; // this was being marked as static in the AST as well -} -``` - -### Polish - -- Rephrase "assigning/binding to rvalue" errors to include context ([#119](https://github.com/babel/babylon/pull/119)) @motiz88 - -```js -// Used to error with: -// SyntaxError: Assigning to rvalue (1:0) - -// Now: -// Invalid left-hand side in assignment expression (1:0) -3 = 4 - -// Invalid left-hand side in for-in statement (1:5) -for (+i in {}); -``` - -### Internal - -- Fix call to `this.parseMaybeAssign` with correct arguments ([#133](https://github.com/babel/babylon/pull/133)) @danez -- Add semver note to changelog ([#131](https://github.com/babel/babylon/pull/131)) @hzoo - -## 6.10.0 (2016-09-19) - -> We plan to include some spec compliancy bugs in patch versions. An example was the multiple default exports issue. - -### Spec Compliancy - -* Implement ES2016 check for simple parameter list in strict mode ([#106](https://github.com/babel/babylon/pull/106)) (Timothy Gu) - -> It is a Syntax Error if ContainsUseStrict of FunctionBody is true and IsSimpleParameterList of FormalParameters is false. https://tc39.github.io/ecma262/2016/#sec-function-definitions-static-semantics-early-errors - -More Context: [tc39-notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-29.md#611-the-scope-of-use-strict-with-respect-to-destructuring-in-parameter-lists) - -For example: - -```js -// this errors because it uses destructuring and default parameters -// in a function with a "use strict" directive -function a([ option1, option2 ] = []) { - "use strict"; -} - ``` - -The solution would be to use a top level "use strict" or to remove the destructuring or default parameters when using a function + "use strict" or to. - -### New Feature - -* Exact object type annotations for Flow plugin ([#104](https://github.com/babel/babylon/pull/104)) (Basil Hosmer) - -Added to flow in https://github.com/facebook/flow/commit/c710c40aa2a115435098d6c0dfeaadb023cd39b8 - -Looks like: - -```js -var a : {| x: number, y: string |} = { x: 0, y: 'foo' }; -``` - -### Bug Fixes - -* Include `typeParameter` location in `ArrowFunctionExpression` ([#126](https://github.com/babel/babylon/pull/126)) (Daniel Tschinder) -* Error on invalid flow type annotation with default assignment ([#122](https://github.com/babel/babylon/pull/122)) (Dan Harper) -* Fix Flow return types on arrow functions ([#124](https://github.com/babel/babylon/pull/124)) (Dan Harper) - -### Misc - -* Add tests for export extensions ([#127](https://github.com/babel/babylon/pull/127)) (Daniel Tschinder) -* Fix Contributing guidelines [skip ci] (Daniel Tschinder) - -## 6.9.2 (2016-09-09) - -The only change is to remove the `babel-runtime` dependency by compiling with Babel's ES2015 loose mode. So using babylon standalone should be smaller. - -## 6.9.1 (2016-08-23) - -This release contains mainly small bugfixes but also updates babylons default mode to es2017. The features for `exponentiationOperator`, `asyncFunctions` and `trailingFunctionCommas` which previously needed to be activated via plugin are now enabled by default and the plugins are now no-ops. - -### Bug Fixes - -- Fix issues with default object params in async functions ([#96](https://github.com/babel/babylon/pull/96)) @danez -- Fix issues with flow-types and async function ([#95](https://github.com/babel/babylon/pull/95)) @danez -- Fix arrow functions with destructuring, types & default value ([#94](https://github.com/babel/babylon/pull/94)) @danharper -- Fix declare class with qualified type identifier ([#97](https://github.com/babel/babylon/pull/97)) @danez -- Remove exponentiationOperator, asyncFunctions, trailingFunctionCommas plugins and enable them by default ([#98](https://github.com/babel/babylon/pull/98)) @danez - -## 6.9.0 (2016-08-16) - -### New syntax support - -- Add JSX spread children ([#42](https://github.com/babel/babylon/pull/42)) @calebmer - -(Be aware that React is not going to support this syntax) - -```js -
- {...todos.map(todo => )} -
-``` - -- Add support for declare module.exports ([#72](https://github.com/babel/babylon/pull/72)) @danez - -```js -declare module "foo" { - declare module.exports: {} -} -``` - -### New Features - -- If supplied, attach filename property to comment node loc. ([#80](https://github.com/babel/babylon/pull/80)) @divmain -- Add identifier name to node loc field ([#90](https://github.com/babel/babylon/pull/90)) @kittens - -### Bug Fixes - -- Fix exponential operator to behave according to spec ([#75](https://github.com/babel/babylon/pull/75)) @danez -- Fix lookahead to not add comments to arrays which are not cloned ([#76](https://github.com/babel/babylon/pull/76)) @danez -- Fix accidental fall-through in Flow type parsing. ([#82](https://github.com/babel/babylon/pull/82)) @xiemaisi -- Only allow declares inside declare module ([#73](https://github.com/babel/babylon/pull/73)) @danez -- Small fix for parsing type parameter declarations ([#83](https://github.com/babel/babylon/pull/83)) @gabelevi -- Fix arrow param locations with flow types ([#57](https://github.com/babel/babylon/pull/57)) @danez -- Fixes SyntaxError position with flow optional type ([#65](https://github.com/babel/babylon/pull/65)) @danez - -### Internal - -- Add codecoverage to tests @danez -- Fix tests to not save expected output if we expect the test to fail @danez -- Make a shallow clone of babel for testing @danez -- chore(package): update cross-env to version 2.0.0 ([#77](https://github.com/babel/babylon/pull/77)) @greenkeeperio-bot -- chore(package): update ava to version 0.16.0 ([#86](https://github.com/babel/babylon/pull/86)) @greenkeeperio-bot -- chore(package): update babel-plugin-istanbul to version 2.0.0 ([#89](https://github.com/babel/babylon/pull/89)) @greenkeeperio-bot -- chore(package): update nyc to version 8.0.0 ([#88](https://github.com/babel/babylon/pull/88)) @greenkeeperio-bot - -## 6.8.4 (2016-07-06) - -### Bug Fixes - -- Fix the location of params, when flow and default value used ([#68](https://github.com/babel/babylon/pull/68)) @danez - -## 6.8.3 (2016-07-02) - -### Bug Fixes - -- Fix performance regression introduced in 6.8.2 with conditionals ([#63](https://github.com/babel/babylon/pull/63)) @danez - -## 6.8.2 (2016-06-24) - -### Bug Fixes - -- Fix parse error with yielding jsx elements in generators `function* it() { yield
; }` ([#31](https://github.com/babel/babylon/pull/31)) @eldereal -- When cloning nodes do not clone its comments ([#24](https://github.com/babel/babylon/pull/24)) @danez -- Fix parse errors when using arrow functions with an spread element and return type `(...props): void => {}` ([#10](https://github.com/babel/babylon/pull/10)) @danez -- Fix leading comments added from previous node ([#23](https://github.com/babel/babylon/pull/23)) @danez -- Fix parse errors with flow's optional arguments `(arg?) => {}` ([#19](https://github.com/babel/babylon/pull/19)) @danez -- Support negative numeric type literals @kittens -- Remove line terminator restriction after await keyword @kittens -- Remove grouped type arrow restriction as it seems flow no longer has it @kittens -- Fix parse error with generic methods that have the name `get` or `set` `class foo { get() {} }` ([#55](https://github.com/babel/babylon/pull/55)) @vkurchatkin -- Fix parse error with arrow functions that have flow type parameter declarations `(x: T): T => x;` ([#54](https://github.com/babel/babylon/pull/54)) @gabelevi - -### Documentation - -- Document AST differences from ESTree ([#41](https://github.com/babel/babylon/pull/41)) @nene -- Move ast spec from babel/babel ([#46](https://github.com/babel/babylon/pull/46)) @hzoo - -### Internal - -- Enable skipped tests ([#16](https://github.com/babel/babylon/pull/16)) @danez -- Add script to test latest version of babylon with babel ([#21](https://github.com/babel/babylon/pull/21)) @danez -- Upgrade test runner ava @kittens -- Add missing generate-identifier-regex script @kittens -- Rename parser context types @kittens -- Add node v6 to travis testing @hzoo -- Update to Unicode v9 ([#45](https://github.com/babel/babylon/pull/45)) @mathiasbynens - -## 6.8.1 (2016-06-06) - -### New Feature - -- Parse type parameter declarations with defaults like `type Foo = T` - -### Bug Fixes -- Type parameter declarations need 1 or more type parameters. -- The existential type `*` is not a valid type parameter. -- The existential type `*` is a primary type - -### Spec Compliancy -- The param list for type parameter declarations now consists of `TypeParameter` nodes -- New `TypeParameter` AST Node (replaces using the `Identifier` node before) - -``` -interface TypeParameter <: Node { - bound: TypeAnnotation; - default: TypeAnnotation; - name: string; - variance: "plus" | "minus"; -} -``` - -## 6.8.0 (2016-05-02) - -#### New Feature - -##### Parse Method Parameter Decorators ([#12](https://github.com/babel/babylon/pull/12)) - -> [Method Parameter Decorators](https://goo.gl/8MmCMG) is now a TC39 [stage 0 proposal](https://github.com/tc39/ecma262/blob/master/stage0.md). - -Examples: - -```js -class Foo { - constructor(@foo() x, @bar({ a: 123 }) @baz() y) {} -} - -export default function func(@foo() x, @bar({ a: 123 }) @baz() y) {} - -var obj = { - method(@foo() x, @bar({ a: 123 }) @baz() y) {} -}; -``` - -##### Parse for-await statements (w/ `asyncGenerators` plugin) ([#17](https://github.com/babel/babylon/pull/17)) - -There is also a new node type, `ForAwaitStatement`. - -> [Async generators and for-await](https://github.com/tc39/proposal-async-iteration) are now a [stage 2 proposal](https://github.com/tc39/ecma262#current-proposals). - -Example: - -```js -async function f() { - for await (let x of y); -} -``` diff --git a/node_modules/@babel/parser/LICENSE b/node_modules/@babel/parser/LICENSE deleted file mode 100644 index d4c7fc58..00000000 --- a/node_modules/@babel/parser/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2012-2014 by various contributors (see AUTHORS) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@babel/parser/README.md b/node_modules/@babel/parser/README.md deleted file mode 100644 index 65092a05..00000000 --- a/node_modules/@babel/parser/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/parser - -> A JavaScript parser - -See our website [@babel/parser](https://babeljs.io/docs/en/next/babel-parser.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A+parser+%28babylon%29%22+is%3Aopen) associated with this package. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/parser -``` - -or using yarn: - -```sh -yarn add @babel/parser --dev -``` diff --git a/node_modules/@babel/parser/bin/babel-parser.js b/node_modules/@babel/parser/bin/babel-parser.js deleted file mode 100644 index 58f00b84..00000000 --- a/node_modules/@babel/parser/bin/babel-parser.js +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env node -/* eslint no-var: 0 */ - -var parser = require(".."); -var fs = require("fs"); - -var filename = process.argv[2]; -if (!filename) { - console.error("no filename specified"); - process.exit(0); -} - -var file = fs.readFileSync(filename, "utf8"); -var ast = parser.parse(file); - -console.log(JSON.stringify(ast, null, " ")); diff --git a/node_modules/@babel/parser/lib/index.js b/node_modules/@babel/parser/lib/index.js deleted file mode 100644 index 81b6994d..00000000 --- a/node_modules/@babel/parser/lib/index.js +++ /dev/null @@ -1,11353 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -const beforeExpr = true; -const startsExpr = true; -const isLoop = true; -const isAssign = true; -const prefix = true; -const postfix = true; -class TokenType { - constructor(label, conf = {}) { - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.rightAssociative = !!conf.rightAssociative; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop != null ? conf.binop : null; - this.updateContext = null; - } - -} -const keywords = new Map(); - -function createKeyword(name, options = {}) { - options.keyword = name; - const token = new TokenType(name, options); - keywords.set(name, token); - return token; -} - -function createBinop(name, binop) { - return new TokenType(name, { - beforeExpr, - binop - }); -} - -const types = { - num: new TokenType("num", { - startsExpr - }), - bigint: new TokenType("bigint", { - startsExpr - }), - regexp: new TokenType("regexp", { - startsExpr - }), - string: new TokenType("string", { - startsExpr - }), - name: new TokenType("name", { - startsExpr - }), - eof: new TokenType("eof"), - bracketL: new TokenType("[", { - beforeExpr, - startsExpr - }), - bracketR: new TokenType("]"), - braceL: new TokenType("{", { - beforeExpr, - startsExpr - }), - braceBarL: new TokenType("{|", { - beforeExpr, - startsExpr - }), - braceR: new TokenType("}"), - braceBarR: new TokenType("|}"), - parenL: new TokenType("(", { - beforeExpr, - startsExpr - }), - parenR: new TokenType(")"), - comma: new TokenType(",", { - beforeExpr - }), - semi: new TokenType(";", { - beforeExpr - }), - colon: new TokenType(":", { - beforeExpr - }), - doubleColon: new TokenType("::", { - beforeExpr - }), - dot: new TokenType("."), - question: new TokenType("?", { - beforeExpr - }), - questionDot: new TokenType("?."), - arrow: new TokenType("=>", { - beforeExpr - }), - template: new TokenType("template"), - ellipsis: new TokenType("...", { - beforeExpr - }), - backQuote: new TokenType("`", { - startsExpr - }), - dollarBraceL: new TokenType("${", { - beforeExpr, - startsExpr - }), - at: new TokenType("@"), - hash: new TokenType("#", { - startsExpr - }), - interpreterDirective: new TokenType("#!..."), - eq: new TokenType("=", { - beforeExpr, - isAssign - }), - assign: new TokenType("_=", { - beforeExpr, - isAssign - }), - incDec: new TokenType("++/--", { - prefix, - postfix, - startsExpr - }), - bang: new TokenType("!", { - beforeExpr, - prefix, - startsExpr - }), - tilde: new TokenType("~", { - beforeExpr, - prefix, - startsExpr - }), - pipeline: createBinop("|>", 0), - nullishCoalescing: createBinop("??", 1), - logicalOR: createBinop("||", 1), - logicalAND: createBinop("&&", 2), - bitwiseOR: createBinop("|", 3), - bitwiseXOR: createBinop("^", 4), - bitwiseAND: createBinop("&", 5), - equality: createBinop("==/!=/===/!==", 6), - relational: createBinop("/<=/>=", 7), - bitShift: createBinop("<>/>>>", 8), - plusMin: new TokenType("+/-", { - beforeExpr, - binop: 9, - prefix, - startsExpr - }), - modulo: createBinop("%", 10), - star: createBinop("*", 10), - slash: createBinop("/", 10), - exponent: new TokenType("**", { - beforeExpr, - binop: 11, - rightAssociative: true - }), - _break: createKeyword("break"), - _case: createKeyword("case", { - beforeExpr - }), - _catch: createKeyword("catch"), - _continue: createKeyword("continue"), - _debugger: createKeyword("debugger"), - _default: createKeyword("default", { - beforeExpr - }), - _do: createKeyword("do", { - isLoop, - beforeExpr - }), - _else: createKeyword("else", { - beforeExpr - }), - _finally: createKeyword("finally"), - _for: createKeyword("for", { - isLoop - }), - _function: createKeyword("function", { - startsExpr - }), - _if: createKeyword("if"), - _return: createKeyword("return", { - beforeExpr - }), - _switch: createKeyword("switch"), - _throw: createKeyword("throw", { - beforeExpr, - prefix, - startsExpr - }), - _try: createKeyword("try"), - _var: createKeyword("var"), - _const: createKeyword("const"), - _while: createKeyword("while", { - isLoop - }), - _with: createKeyword("with"), - _new: createKeyword("new", { - beforeExpr, - startsExpr - }), - _this: createKeyword("this", { - startsExpr - }), - _super: createKeyword("super", { - startsExpr - }), - _class: createKeyword("class", { - startsExpr - }), - _extends: createKeyword("extends", { - beforeExpr - }), - _export: createKeyword("export"), - _import: createKeyword("import", { - startsExpr - }), - _null: createKeyword("null", { - startsExpr - }), - _true: createKeyword("true", { - startsExpr - }), - _false: createKeyword("false", { - startsExpr - }), - _in: createKeyword("in", { - beforeExpr, - binop: 7 - }), - _instanceof: createKeyword("instanceof", { - beforeExpr, - binop: 7 - }), - _typeof: createKeyword("typeof", { - beforeExpr, - prefix, - startsExpr - }), - _void: createKeyword("void", { - beforeExpr, - prefix, - startsExpr - }), - _delete: createKeyword("delete", { - beforeExpr, - prefix, - startsExpr - }) -}; - -const SCOPE_OTHER = 0b000000000, - SCOPE_PROGRAM = 0b000000001, - SCOPE_FUNCTION = 0b000000010, - SCOPE_ASYNC = 0b000000100, - SCOPE_GENERATOR = 0b000001000, - SCOPE_ARROW = 0b000010000, - SCOPE_SIMPLE_CATCH = 0b000100000, - SCOPE_SUPER = 0b001000000, - SCOPE_DIRECT_SUPER = 0b010000000, - SCOPE_CLASS = 0b100000000, - SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION; -function functionFlags(isAsync, isGenerator) { - return SCOPE_FUNCTION | (isAsync ? SCOPE_ASYNC : 0) | (isGenerator ? SCOPE_GENERATOR : 0); -} -const BIND_KIND_VALUE = 0b00000000001, - BIND_KIND_TYPE = 0b00000000010, - BIND_SCOPE_VAR = 0b00000000100, - BIND_SCOPE_LEXICAL = 0b00000001000, - BIND_SCOPE_FUNCTION = 0b00000010000, - BIND_FLAGS_NONE = 0b00001000000, - BIND_FLAGS_CLASS = 0b00010000000, - BIND_FLAGS_TS_ENUM = 0b00100000000, - BIND_FLAGS_TS_CONST_ENUM = 0b01000000000, - BIND_FLAGS_TS_EXPORT_ONLY = 0b10000000000; -const BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS, - BIND_LEXICAL = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0, - BIND_VAR = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0, - BIND_FUNCTION = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0, - BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS, - BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0, - BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM, - BIND_TS_FN_TYPE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY, - BIND_NONE = 0 | 0 | 0 | BIND_FLAGS_NONE, - BIND_OUTSIDE = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE, - BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM, - BIND_TS_NAMESPACE = BIND_TS_FN_TYPE; - -function isSimpleProperty(node) { - return node != null && node.type === "Property" && node.kind === "init" && node.method === false; -} - -var estree = (superClass => class extends superClass { - estreeParseRegExpLiteral({ - pattern, - flags - }) { - let regex = null; - - try { - regex = new RegExp(pattern, flags); - } catch (e) {} - - const node = this.estreeParseLiteral(regex); - node.regex = { - pattern, - flags - }; - return node; - } - - estreeParseLiteral(value) { - return this.parseLiteral(value, "Literal"); - } - - directiveToStmt(directive) { - const directiveLiteral = directive.value; - const stmt = this.startNodeAt(directive.start, directive.loc.start); - const expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start); - expression.value = directiveLiteral.value; - expression.raw = directiveLiteral.extra.raw; - stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end); - stmt.directive = directiveLiteral.extra.raw.slice(1, -1); - return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end); - } - - initFunction(node, isAsync) { - super.initFunction(node, isAsync); - node.expression = false; - } - - checkDeclaration(node) { - if (isSimpleProperty(node)) { - this.checkDeclaration(node.value); - } else { - super.checkDeclaration(node); - } - } - - checkGetterSetterParams(method) { - const prop = method; - const paramCount = prop.kind === "get" ? 0 : 1; - const start = prop.start; - - if (prop.value.params.length !== paramCount) { - if (prop.kind === "get") { - this.raise(start, "getter must not have any formal parameters"); - } else { - this.raise(start, "setter must have exactly one formal parameter"); - } - } - - if (prop.kind === "set" && prop.value.params[0].type === "RestElement") { - this.raise(start, "setter function argument must not be a rest parameter"); - } - } - - checkLVal(expr, bindingType = BIND_NONE, checkClashes, contextDescription) { - switch (expr.type) { - case "ObjectPattern": - expr.properties.forEach(prop => { - this.checkLVal(prop.type === "Property" ? prop.value : prop, bindingType, checkClashes, "object destructuring pattern"); - }); - break; - - default: - super.checkLVal(expr, bindingType, checkClashes, contextDescription); - } - } - - checkPropClash(prop, propHash) { - if (prop.type === "SpreadElement" || prop.computed || prop.method || prop.shorthand) { - return; - } - - const key = prop.key; - const name = key.type === "Identifier" ? key.name : String(key.value); - - if (name === "__proto__" && prop.kind === "init") { - if (propHash.proto) { - this.raise(key.start, "Redefinition of __proto__ property"); - } - - propHash.proto = true; - } - } - - isStrictBody(node) { - const isBlockStatement = node.body.type === "BlockStatement"; - - if (isBlockStatement && node.body.body.length > 0) { - for (let _i = 0, _node$body$body = node.body.body; _i < _node$body$body.length; _i++) { - const directive = _node$body$body[_i]; - - if (directive.type === "ExpressionStatement" && directive.expression.type === "Literal") { - if (directive.expression.value === "use strict") return true; - } else { - break; - } - } - } - - return false; - } - - isValidDirective(stmt) { - return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && (!stmt.expression.extra || !stmt.expression.extra.parenthesized); - } - - stmtToDirective(stmt) { - const directive = super.stmtToDirective(stmt); - const value = stmt.expression.value; - directive.value.value = value; - return directive; - } - - parseBlockBody(node, allowDirectives, topLevel, end) { - super.parseBlockBody(node, allowDirectives, topLevel, end); - const directiveStatements = node.directives.map(d => this.directiveToStmt(d)); - node.body = directiveStatements.concat(node.body); - delete node.directives; - } - - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { - this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true); - - if (method.typeParameters) { - method.value.typeParameters = method.typeParameters; - delete method.typeParameters; - } - - classBody.body.push(method); - } - - parseExprAtom(refShorthandDefaultPos) { - switch (this.state.type) { - case types.regexp: - return this.estreeParseRegExpLiteral(this.state.value); - - case types.num: - case types.string: - return this.estreeParseLiteral(this.state.value); - - case types._null: - return this.estreeParseLiteral(null); - - case types._true: - return this.estreeParseLiteral(true); - - case types._false: - return this.estreeParseLiteral(false); - - default: - return super.parseExprAtom(refShorthandDefaultPos); - } - } - - parseLiteral(value, type, startPos, startLoc) { - const node = super.parseLiteral(value, type, startPos, startLoc); - node.raw = node.extra.raw; - delete node.extra; - return node; - } - - parseFunctionBody(node, allowExpression, isMethod = false) { - super.parseFunctionBody(node, allowExpression, isMethod); - node.expression = node.body.type !== "BlockStatement"; - } - - parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { - let funcNode = this.startNode(); - funcNode.kind = node.kind; - funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope); - funcNode.type = "FunctionExpression"; - delete funcNode.kind; - node.value = funcNode; - type = type === "ClassMethod" ? "MethodDefinition" : type; - return this.finishNode(node, type); - } - - parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) { - const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc); - - if (node) { - node.type = "Property"; - if (node.kind === "method") node.kind = "init"; - node.shorthand = false; - } - - return node; - } - - parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) { - const node = super.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos); - - if (node) { - node.kind = "init"; - node.type = "Property"; - } - - return node; - } - - toAssignable(node, isBinding, contextDescription) { - if (isSimpleProperty(node)) { - this.toAssignable(node.value, isBinding, contextDescription); - return node; - } - - return super.toAssignable(node, isBinding, contextDescription); - } - - toAssignableObjectExpressionProp(prop, isBinding, isLast) { - if (prop.kind === "get" || prop.kind === "set") { - this.raise(prop.key.start, "Object pattern can't contain getter or setter"); - } else if (prop.method) { - this.raise(prop.key.start, "Object pattern can't contain methods"); - } else { - super.toAssignableObjectExpressionProp(prop, isBinding, isLast); - } - } - -}); - -const lineBreak = /\r\n?|[\n\u2028\u2029]/; -const lineBreakG = new RegExp(lineBreak.source, "g"); -function isNewLine(code) { - switch (code) { - case 10: - case 13: - case 8232: - case 8233: - return true; - - default: - return false; - } -} -const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; -function isWhitespace(code) { - switch (code) { - case 0x0009: - case 0x000b: - case 0x000c: - case 32: - case 160: - case 5760: - case 0x2000: - case 0x2001: - case 0x2002: - case 0x2003: - case 0x2004: - case 0x2005: - case 0x2006: - case 0x2007: - case 0x2008: - case 0x2009: - case 0x200a: - case 0x202f: - case 0x205f: - case 0x3000: - case 0xfeff: - return true; - - default: - return false; - } -} - -class TokContext { - constructor(token, isExpr, preserveSpace, override) { - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; - } - -} -const types$1 = { - braceStatement: new TokContext("{", false), - braceExpression: new TokContext("{", true), - templateQuasi: new TokContext("${", false), - parenStatement: new TokContext("(", false), - parenExpression: new TokContext("(", true), - template: new TokContext("`", true, true, p => p.readTmplToken()), - functionExpression: new TokContext("function", true), - functionStatement: new TokContext("function", false) -}; - -types.parenR.updateContext = types.braceR.updateContext = function () { - if (this.state.context.length === 1) { - this.state.exprAllowed = true; - return; - } - - let out = this.state.context.pop(); - - if (out === types$1.braceStatement && this.curContext().token === "function") { - out = this.state.context.pop(); - } - - this.state.exprAllowed = !out.isExpr; -}; - -types.name.updateContext = function (prevType) { - let allowed = false; - - if (prevType !== types.dot) { - if (this.state.value === "of" && !this.state.exprAllowed || this.state.value === "yield" && this.scope.inGenerator) { - allowed = true; - } - } - - this.state.exprAllowed = allowed; - - if (this.state.isIterator) { - this.state.isIterator = false; - } -}; - -types.braceL.updateContext = function (prevType) { - this.state.context.push(this.braceIsBlock(prevType) ? types$1.braceStatement : types$1.braceExpression); - this.state.exprAllowed = true; -}; - -types.dollarBraceL.updateContext = function () { - this.state.context.push(types$1.templateQuasi); - this.state.exprAllowed = true; -}; - -types.parenL.updateContext = function (prevType) { - const statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; - this.state.context.push(statementParens ? types$1.parenStatement : types$1.parenExpression); - this.state.exprAllowed = true; -}; - -types.incDec.updateContext = function () {}; - -types._function.updateContext = types._class.updateContext = function (prevType) { - if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && !(prevType === types._return && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) && !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) { - this.state.context.push(types$1.functionExpression); - } else { - this.state.context.push(types$1.functionStatement); - } - - this.state.exprAllowed = false; -}; - -types.backQuote.updateContext = function () { - if (this.curContext() === types$1.template) { - this.state.context.pop(); - } else { - this.state.context.push(types$1.template); - } - - this.state.exprAllowed = false; -}; - -const reservedWords = { - strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], - strictBind: ["eval", "arguments"] -}; -const reservedWordsStrictSet = new Set(reservedWords.strict); -const reservedWordsStrictBindSet = new Set(reservedWords.strict.concat(reservedWords.strictBind)); -const isReservedWord = (word, inModule) => { - return inModule && word === "await" || word === "enum"; -}; -function isStrictReservedWord(word, inModule) { - return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); -} -function isStrictBindReservedWord(word, inModule) { - return isReservedWord(word, inModule) || reservedWordsStrictBindSet.has(word); -} -function isKeyword(word) { - return keywords.has(word); -} -const keywordRelationalOperator = /^in(stanceof)?$/; -let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7c6\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab67\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; -let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; -const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); -const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; -const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 477, 28, 11, 0, 9, 21, 155, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 12, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 0, 33, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 0, 161, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 270, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 754, 9486, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541]; -const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 525, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 4, 9, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 232, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 792487, 239]; - -function isInAstralSet(code, set) { - let pos = 0x10000; - - for (let i = 0, length = set.length; i < length; i += 2) { - pos += set[i]; - if (pos > code) return false; - pos += set[i + 1]; - if (pos >= code) return true; - } - - return false; -} - -function isIdentifierStart(code) { - if (code < 65) return code === 36; - if (code <= 90) return true; - if (code < 97) return code === 95; - if (code <= 122) return true; - - if (code <= 0xffff) { - return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); - } - - return isInAstralSet(code, astralIdentifierStartCodes); -} -function isIteratorStart(current, next) { - return current === 64 && next === 64; -} -function isIdentifierChar(code) { - if (code < 48) return code === 36; - if (code < 58) return true; - if (code < 65) return false; - if (code <= 90) return true; - if (code < 97) return code === 95; - if (code <= 122) return true; - - if (code <= 0xffff) { - return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); - } - - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); -} - -const reservedTypes = ["any", "bool", "boolean", "empty", "false", "mixed", "null", "number", "static", "string", "true", "typeof", "void", "interface", "extends", "_"]; - -function isEsModuleType(bodyElement) { - return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration"); -} - -function hasTypeImportKind(node) { - return node.importKind === "type" || node.importKind === "typeof"; -} - -function isMaybeDefaultImport(state) { - return (state.type === types.name || !!state.type.keyword) && state.value !== "from"; -} - -const exportSuggestions = { - const: "declare export var", - let: "declare export var", - type: "export type", - interface: "export interface" -}; - -function partition(list, test) { - const list1 = []; - const list2 = []; - - for (let i = 0; i < list.length; i++) { - (test(list[i], i, list) ? list1 : list2).push(list[i]); - } - - return [list1, list2]; -} - -const FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/; -var flow = (superClass => class extends superClass { - constructor(options, input) { - super(options, input); - this.flowPragma = undefined; - } - - shouldParseTypes() { - return this.getPluginOption("flow", "all") || this.flowPragma === "flow"; - } - - finishToken(type, val) { - if (type !== types.string && type !== types.semi && type !== types.interpreterDirective) { - if (this.flowPragma === undefined) { - this.flowPragma = null; - } - } - - return super.finishToken(type, val); - } - - addComment(comment) { - if (this.flowPragma === undefined) { - const matches = FLOW_PRAGMA_REGEX.exec(comment.value); - - if (!matches) ; else if (matches[1] === "flow") { - this.flowPragma = "flow"; - } else if (matches[1] === "noflow") { - this.flowPragma = "noflow"; - } else { - throw new Error("Unexpected flow pragma"); - } - } - - return super.addComment(comment); - } - - flowParseTypeInitialiser(tok) { - const oldInType = this.state.inType; - this.state.inType = true; - this.expect(tok || types.colon); - const type = this.flowParseType(); - this.state.inType = oldInType; - return type; - } - - flowParsePredicate() { - const node = this.startNode(); - const moduloLoc = this.state.startLoc; - const moduloPos = this.state.start; - this.expect(types.modulo); - const checksLoc = this.state.startLoc; - this.expectContextual("checks"); - - if (moduloLoc.line !== checksLoc.line || moduloLoc.column !== checksLoc.column - 1) { - this.raise(moduloPos, "Spaces between ´%´ and ´checks´ are not allowed here."); - } - - if (this.eat(types.parenL)) { - node.value = this.parseExpression(); - this.expect(types.parenR); - return this.finishNode(node, "DeclaredPredicate"); - } else { - return this.finishNode(node, "InferredPredicate"); - } - } - - flowParseTypeAndPredicateInitialiser() { - const oldInType = this.state.inType; - this.state.inType = true; - this.expect(types.colon); - let type = null; - let predicate = null; - - if (this.match(types.modulo)) { - this.state.inType = oldInType; - predicate = this.flowParsePredicate(); - } else { - type = this.flowParseType(); - this.state.inType = oldInType; - - if (this.match(types.modulo)) { - predicate = this.flowParsePredicate(); - } - } - - return [type, predicate]; - } - - flowParseDeclareClass(node) { - this.next(); - this.flowParseInterfaceish(node, true); - return this.finishNode(node, "DeclareClass"); - } - - flowParseDeclareFunction(node) { - this.next(); - const id = node.id = this.parseIdentifier(); - const typeNode = this.startNode(); - const typeContainer = this.startNode(); - - if (this.isRelational("<")) { - typeNode.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - typeNode.typeParameters = null; - } - - this.expect(types.parenL); - const tmp = this.flowParseFunctionTypeParams(); - typeNode.params = tmp.params; - typeNode.rest = tmp.rest; - this.expect(types.parenR); - [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); - typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation"); - id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation"); - this.resetEndLocation(id); - this.semicolon(); - return this.finishNode(node, "DeclareFunction"); - } - - flowParseDeclare(node, insideModule) { - if (this.match(types._class)) { - return this.flowParseDeclareClass(node); - } else if (this.match(types._function)) { - return this.flowParseDeclareFunction(node); - } else if (this.match(types._var)) { - return this.flowParseDeclareVariable(node); - } else if (this.eatContextual("module")) { - if (this.match(types.dot)) { - return this.flowParseDeclareModuleExports(node); - } else { - if (insideModule) { - this.unexpected(this.state.lastTokStart, "`declare module` cannot be used inside another `declare module`"); - } - - return this.flowParseDeclareModule(node); - } - } else if (this.isContextual("type")) { - return this.flowParseDeclareTypeAlias(node); - } else if (this.isContextual("opaque")) { - return this.flowParseDeclareOpaqueType(node); - } else if (this.isContextual("interface")) { - return this.flowParseDeclareInterface(node); - } else if (this.match(types._export)) { - return this.flowParseDeclareExportDeclaration(node, insideModule); - } else { - throw this.unexpected(); - } - } - - flowParseDeclareVariable(node) { - this.next(); - node.id = this.flowParseTypeAnnotatableIdentifier(true); - this.semicolon(); - return this.finishNode(node, "DeclareVariable"); - } - - flowParseDeclareModule(node) { - this.scope.enter(SCOPE_OTHER); - - if (this.match(types.string)) { - node.id = this.parseExprAtom(); - } else { - node.id = this.parseIdentifier(); - } - - const bodyNode = node.body = this.startNode(); - const body = bodyNode.body = []; - this.expect(types.braceL); - - while (!this.match(types.braceR)) { - let bodyNode = this.startNode(); - - if (this.match(types._import)) { - this.next(); - - if (!this.isContextual("type") && !this.match(types._typeof)) { - this.unexpected(this.state.lastTokStart, "Imports within a `declare module` body must always be `import type` or `import typeof`"); - } - - this.parseImport(bodyNode); - } else { - this.expectContextual("declare", "Only declares and type imports are allowed inside declare module"); - bodyNode = this.flowParseDeclare(bodyNode, true); - } - - body.push(bodyNode); - } - - this.scope.exit(); - this.expect(types.braceR); - this.finishNode(bodyNode, "BlockStatement"); - let kind = null; - let hasModuleExport = false; - const errorMessage = "Found both `declare module.exports` and `declare export` in the same module. " + "Modules can only have 1 since they are either an ES module or they are a CommonJS module"; - body.forEach(bodyElement => { - if (isEsModuleType(bodyElement)) { - if (kind === "CommonJS") { - this.unexpected(bodyElement.start, errorMessage); - } - - kind = "ES"; - } else if (bodyElement.type === "DeclareModuleExports") { - if (hasModuleExport) { - this.unexpected(bodyElement.start, "Duplicate `declare module.exports` statement"); - } - - if (kind === "ES") this.unexpected(bodyElement.start, errorMessage); - kind = "CommonJS"; - hasModuleExport = true; - } - }); - node.kind = kind || "CommonJS"; - return this.finishNode(node, "DeclareModule"); - } - - flowParseDeclareExportDeclaration(node, insideModule) { - this.expect(types._export); - - if (this.eat(types._default)) { - if (this.match(types._function) || this.match(types._class)) { - node.declaration = this.flowParseDeclare(this.startNode()); - } else { - node.declaration = this.flowParseType(); - this.semicolon(); - } - - node.default = true; - return this.finishNode(node, "DeclareExportDeclaration"); - } else { - if (this.match(types._const) || this.isLet() || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) { - const label = this.state.value; - const suggestion = exportSuggestions[label]; - this.unexpected(this.state.start, `\`declare export ${label}\` is not supported. Use \`${suggestion}\` instead`); - } - - if (this.match(types._var) || this.match(types._function) || this.match(types._class) || this.isContextual("opaque")) { - node.declaration = this.flowParseDeclare(this.startNode()); - node.default = false; - return this.finishNode(node, "DeclareExportDeclaration"); - } else if (this.match(types.star) || this.match(types.braceL) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) { - node = this.parseExport(node); - - if (node.type === "ExportNamedDeclaration") { - node.type = "ExportDeclaration"; - node.default = false; - delete node.exportKind; - } - - node.type = "Declare" + node.type; - return node; - } - } - - throw this.unexpected(); - } - - flowParseDeclareModuleExports(node) { - this.next(); - this.expectContextual("exports"); - node.typeAnnotation = this.flowParseTypeAnnotation(); - this.semicolon(); - return this.finishNode(node, "DeclareModuleExports"); - } - - flowParseDeclareTypeAlias(node) { - this.next(); - this.flowParseTypeAlias(node); - node.type = "DeclareTypeAlias"; - return node; - } - - flowParseDeclareOpaqueType(node) { - this.next(); - this.flowParseOpaqueType(node, true); - node.type = "DeclareOpaqueType"; - return node; - } - - flowParseDeclareInterface(node) { - this.next(); - this.flowParseInterfaceish(node); - return this.finishNode(node, "DeclareInterface"); - } - - flowParseInterfaceish(node, isClass = false) { - node.id = this.flowParseRestrictedIdentifier(!isClass); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - - node.extends = []; - node.implements = []; - node.mixins = []; - - if (this.eat(types._extends)) { - do { - node.extends.push(this.flowParseInterfaceExtends()); - } while (!isClass && this.eat(types.comma)); - } - - if (this.isContextual("mixins")) { - this.next(); - - do { - node.mixins.push(this.flowParseInterfaceExtends()); - } while (this.eat(types.comma)); - } - - if (this.isContextual("implements")) { - this.next(); - - do { - node.implements.push(this.flowParseInterfaceExtends()); - } while (this.eat(types.comma)); - } - - node.body = this.flowParseObjectType({ - allowStatic: isClass, - allowExact: false, - allowSpread: false, - allowProto: isClass, - allowInexact: false - }); - } - - flowParseInterfaceExtends() { - const node = this.startNode(); - node.id = this.flowParseQualifiedTypeIdentifier(); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } else { - node.typeParameters = null; - } - - return this.finishNode(node, "InterfaceExtends"); - } - - flowParseInterface(node) { - this.flowParseInterfaceish(node); - return this.finishNode(node, "InterfaceDeclaration"); - } - - checkNotUnderscore(word) { - if (word === "_") { - throw this.unexpected(null, "`_` is only allowed as a type argument to call or new"); - } - } - - checkReservedType(word, startLoc) { - if (reservedTypes.indexOf(word) > -1) { - this.raise(startLoc, `Cannot overwrite reserved type ${word}`); - } - } - - flowParseRestrictedIdentifier(liberal) { - this.checkReservedType(this.state.value, this.state.start); - return this.parseIdentifier(liberal); - } - - flowParseTypeAlias(node) { - node.id = this.flowParseRestrictedIdentifier(); - this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - - node.right = this.flowParseTypeInitialiser(types.eq); - this.semicolon(); - return this.finishNode(node, "TypeAlias"); - } - - flowParseOpaqueType(node, declare) { - this.expectContextual("type"); - node.id = this.flowParseRestrictedIdentifier(true); - this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } else { - node.typeParameters = null; - } - - node.supertype = null; - - if (this.match(types.colon)) { - node.supertype = this.flowParseTypeInitialiser(types.colon); - } - - node.impltype = null; - - if (!declare) { - node.impltype = this.flowParseTypeInitialiser(types.eq); - } - - this.semicolon(); - return this.finishNode(node, "OpaqueType"); - } - - flowParseTypeParameter(requireDefault = false) { - const nodeStart = this.state.start; - const node = this.startNode(); - const variance = this.flowParseVariance(); - const ident = this.flowParseTypeAnnotatableIdentifier(); - node.name = ident.name; - node.variance = variance; - node.bound = ident.typeAnnotation; - - if (this.match(types.eq)) { - this.eat(types.eq); - node.default = this.flowParseType(); - } else { - if (requireDefault) { - this.unexpected(nodeStart, "Type parameter declaration needs a default, since a preceding type parameter declaration has a default."); - } - } - - return this.finishNode(node, "TypeParameter"); - } - - flowParseTypeParameterDeclaration() { - const oldInType = this.state.inType; - const node = this.startNode(); - node.params = []; - this.state.inType = true; - - if (this.isRelational("<") || this.match(types.jsxTagStart)) { - this.next(); - } else { - this.unexpected(); - } - - let defaultRequired = false; - - do { - const typeParameter = this.flowParseTypeParameter(defaultRequired); - node.params.push(typeParameter); - - if (typeParameter.default) { - defaultRequired = true; - } - - if (!this.isRelational(">")) { - this.expect(types.comma); - } - } while (!this.isRelational(">")); - - this.expectRelational(">"); - this.state.inType = oldInType; - return this.finishNode(node, "TypeParameterDeclaration"); - } - - flowParseTypeParameterInstantiation() { - const node = this.startNode(); - const oldInType = this.state.inType; - node.params = []; - this.state.inType = true; - this.expectRelational("<"); - const oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = false; - - while (!this.isRelational(">")) { - node.params.push(this.flowParseType()); - - if (!this.isRelational(">")) { - this.expect(types.comma); - } - } - - this.state.noAnonFunctionType = oldNoAnonFunctionType; - this.expectRelational(">"); - this.state.inType = oldInType; - return this.finishNode(node, "TypeParameterInstantiation"); - } - - flowParseTypeParameterInstantiationCallOrNew() { - const node = this.startNode(); - const oldInType = this.state.inType; - node.params = []; - this.state.inType = true; - this.expectRelational("<"); - - while (!this.isRelational(">")) { - node.params.push(this.flowParseTypeOrImplicitInstantiation()); - - if (!this.isRelational(">")) { - this.expect(types.comma); - } - } - - this.expectRelational(">"); - this.state.inType = oldInType; - return this.finishNode(node, "TypeParameterInstantiation"); - } - - flowParseInterfaceType() { - const node = this.startNode(); - this.expectContextual("interface"); - node.extends = []; - - if (this.eat(types._extends)) { - do { - node.extends.push(this.flowParseInterfaceExtends()); - } while (this.eat(types.comma)); - } - - node.body = this.flowParseObjectType({ - allowStatic: false, - allowExact: false, - allowSpread: false, - allowProto: false, - allowInexact: false - }); - return this.finishNode(node, "InterfaceTypeAnnotation"); - } - - flowParseObjectPropertyKey() { - return this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true); - } - - flowParseObjectTypeIndexer(node, isStatic, variance) { - node.static = isStatic; - - if (this.lookahead().type === types.colon) { - node.id = this.flowParseObjectPropertyKey(); - node.key = this.flowParseTypeInitialiser(); - } else { - node.id = null; - node.key = this.flowParseType(); - } - - this.expect(types.bracketR); - node.value = this.flowParseTypeInitialiser(); - node.variance = variance; - return this.finishNode(node, "ObjectTypeIndexer"); - } - - flowParseObjectTypeInternalSlot(node, isStatic) { - node.static = isStatic; - node.id = this.flowParseObjectPropertyKey(); - this.expect(types.bracketR); - this.expect(types.bracketR); - - if (this.isRelational("<") || this.match(types.parenL)) { - node.method = true; - node.optional = false; - node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start)); - } else { - node.method = false; - - if (this.eat(types.question)) { - node.optional = true; - } - - node.value = this.flowParseTypeInitialiser(); - } - - return this.finishNode(node, "ObjectTypeInternalSlot"); - } - - flowParseObjectTypeMethodish(node) { - node.params = []; - node.rest = null; - node.typeParameters = null; - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - this.expect(types.parenL); - - while (!this.match(types.parenR) && !this.match(types.ellipsis)) { - node.params.push(this.flowParseFunctionTypeParam()); - - if (!this.match(types.parenR)) { - this.expect(types.comma); - } - } - - if (this.eat(types.ellipsis)) { - node.rest = this.flowParseFunctionTypeParam(); - } - - this.expect(types.parenR); - node.returnType = this.flowParseTypeInitialiser(); - return this.finishNode(node, "FunctionTypeAnnotation"); - } - - flowParseObjectTypeCallProperty(node, isStatic) { - const valueNode = this.startNode(); - node.static = isStatic; - node.value = this.flowParseObjectTypeMethodish(valueNode); - return this.finishNode(node, "ObjectTypeCallProperty"); - } - - flowParseObjectType({ - allowStatic, - allowExact, - allowSpread, - allowProto, - allowInexact - }) { - const oldInType = this.state.inType; - this.state.inType = true; - const nodeStart = this.startNode(); - nodeStart.callProperties = []; - nodeStart.properties = []; - nodeStart.indexers = []; - nodeStart.internalSlots = []; - let endDelim; - let exact; - let inexact = false; - - if (allowExact && this.match(types.braceBarL)) { - this.expect(types.braceBarL); - endDelim = types.braceBarR; - exact = true; - } else { - this.expect(types.braceL); - endDelim = types.braceR; - exact = false; - } - - nodeStart.exact = exact; - - while (!this.match(endDelim)) { - let isStatic = false; - let protoStart = null; - const node = this.startNode(); - - if (allowProto && this.isContextual("proto")) { - const lookahead = this.lookahead(); - - if (lookahead.type !== types.colon && lookahead.type !== types.question) { - this.next(); - protoStart = this.state.start; - allowStatic = false; - } - } - - if (allowStatic && this.isContextual("static")) { - const lookahead = this.lookahead(); - - if (lookahead.type !== types.colon && lookahead.type !== types.question) { - this.next(); - isStatic = true; - } - } - - const variance = this.flowParseVariance(); - - if (this.eat(types.bracketL)) { - if (protoStart != null) { - this.unexpected(protoStart); - } - - if (this.eat(types.bracketL)) { - if (variance) { - this.unexpected(variance.start); - } - - nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic)); - } else { - nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance)); - } - } else if (this.match(types.parenL) || this.isRelational("<")) { - if (protoStart != null) { - this.unexpected(protoStart); - } - - if (variance) { - this.unexpected(variance.start); - } - - nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic)); - } else { - let kind = "init"; - - if (this.isContextual("get") || this.isContextual("set")) { - const lookahead = this.lookahead(); - - if (lookahead.type === types.name || lookahead.type === types.string || lookahead.type === types.num) { - kind = this.state.value; - this.next(); - } - } - - const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact); - - if (propOrInexact === null) { - inexact = true; - } else { - nodeStart.properties.push(propOrInexact); - } - } - - this.flowObjectTypeSemicolon(); - } - - this.expect(endDelim); - - if (allowSpread) { - nodeStart.inexact = inexact; - } - - const out = this.finishNode(nodeStart, "ObjectTypeAnnotation"); - this.state.inType = oldInType; - return out; - } - - flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact) { - if (this.match(types.ellipsis)) { - if (!allowSpread) { - this.unexpected(null, "Spread operator cannot appear in class or interface definitions"); - } - - if (protoStart != null) { - this.unexpected(protoStart); - } - - if (variance) { - this.unexpected(variance.start, "Spread properties cannot have variance"); - } - - this.expect(types.ellipsis); - const isInexactToken = this.eat(types.comma) || this.eat(types.semi); - - if (this.match(types.braceR)) { - if (allowInexact) return null; - this.unexpected(null, "Explicit inexact syntax is only allowed inside inexact objects"); - } - - if (this.match(types.braceBarR)) { - this.unexpected(null, "Explicit inexact syntax cannot appear inside an explicit exact object type"); - } - - if (isInexactToken) { - this.unexpected(null, "Explicit inexact syntax must appear at the end of an inexact object"); - } - - node.argument = this.flowParseType(); - return this.finishNode(node, "ObjectTypeSpreadProperty"); - } else { - node.key = this.flowParseObjectPropertyKey(); - node.static = isStatic; - node.proto = protoStart != null; - node.kind = kind; - let optional = false; - - if (this.isRelational("<") || this.match(types.parenL)) { - node.method = true; - - if (protoStart != null) { - this.unexpected(protoStart); - } - - if (variance) { - this.unexpected(variance.start); - } - - node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start)); - - if (kind === "get" || kind === "set") { - this.flowCheckGetterSetterParams(node); - } - } else { - if (kind !== "init") this.unexpected(); - node.method = false; - - if (this.eat(types.question)) { - optional = true; - } - - node.value = this.flowParseTypeInitialiser(); - node.variance = variance; - } - - node.optional = optional; - return this.finishNode(node, "ObjectTypeProperty"); - } - } - - flowCheckGetterSetterParams(property) { - const paramCount = property.kind === "get" ? 0 : 1; - const start = property.start; - const length = property.value.params.length + (property.value.rest ? 1 : 0); - - if (length !== paramCount) { - if (property.kind === "get") { - this.raise(start, "getter must not have any formal parameters"); - } else { - this.raise(start, "setter must have exactly one formal parameter"); - } - } - - if (property.kind === "set" && property.value.rest) { - this.raise(start, "setter function argument must not be a rest parameter"); - } - } - - flowObjectTypeSemicolon() { - if (!this.eat(types.semi) && !this.eat(types.comma) && !this.match(types.braceR) && !this.match(types.braceBarR)) { - this.unexpected(); - } - } - - flowParseQualifiedTypeIdentifier(startPos, startLoc, id) { - startPos = startPos || this.state.start; - startLoc = startLoc || this.state.startLoc; - let node = id || this.parseIdentifier(); - - while (this.eat(types.dot)) { - const node2 = this.startNodeAt(startPos, startLoc); - node2.qualification = node; - node2.id = this.parseIdentifier(); - node = this.finishNode(node2, "QualifiedTypeIdentifier"); - } - - return node; - } - - flowParseGenericType(startPos, startLoc, id) { - const node = this.startNodeAt(startPos, startLoc); - node.typeParameters = null; - node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } - - return this.finishNode(node, "GenericTypeAnnotation"); - } - - flowParseTypeofType() { - const node = this.startNode(); - this.expect(types._typeof); - node.argument = this.flowParsePrimaryType(); - return this.finishNode(node, "TypeofTypeAnnotation"); - } - - flowParseTupleType() { - const node = this.startNode(); - node.types = []; - this.expect(types.bracketL); - - while (this.state.pos < this.length && !this.match(types.bracketR)) { - node.types.push(this.flowParseType()); - if (this.match(types.bracketR)) break; - this.expect(types.comma); - } - - this.expect(types.bracketR); - return this.finishNode(node, "TupleTypeAnnotation"); - } - - flowParseFunctionTypeParam() { - let name = null; - let optional = false; - let typeAnnotation = null; - const node = this.startNode(); - const lh = this.lookahead(); - - if (lh.type === types.colon || lh.type === types.question) { - name = this.parseIdentifier(); - - if (this.eat(types.question)) { - optional = true; - } - - typeAnnotation = this.flowParseTypeInitialiser(); - } else { - typeAnnotation = this.flowParseType(); - } - - node.name = name; - node.optional = optional; - node.typeAnnotation = typeAnnotation; - return this.finishNode(node, "FunctionTypeParam"); - } - - reinterpretTypeAsFunctionTypeParam(type) { - const node = this.startNodeAt(type.start, type.loc.start); - node.name = null; - node.optional = false; - node.typeAnnotation = type; - return this.finishNode(node, "FunctionTypeParam"); - } - - flowParseFunctionTypeParams(params = []) { - let rest = null; - - while (!this.match(types.parenR) && !this.match(types.ellipsis)) { - params.push(this.flowParseFunctionTypeParam()); - - if (!this.match(types.parenR)) { - this.expect(types.comma); - } - } - - if (this.eat(types.ellipsis)) { - rest = this.flowParseFunctionTypeParam(); - } - - return { - params, - rest - }; - } - - flowIdentToTypeAnnotation(startPos, startLoc, node, id) { - switch (id.name) { - case "any": - return this.finishNode(node, "AnyTypeAnnotation"); - - case "bool": - case "boolean": - return this.finishNode(node, "BooleanTypeAnnotation"); - - case "mixed": - return this.finishNode(node, "MixedTypeAnnotation"); - - case "empty": - return this.finishNode(node, "EmptyTypeAnnotation"); - - case "number": - return this.finishNode(node, "NumberTypeAnnotation"); - - case "string": - return this.finishNode(node, "StringTypeAnnotation"); - - default: - this.checkNotUnderscore(id.name); - return this.flowParseGenericType(startPos, startLoc, id); - } - } - - flowParsePrimaryType() { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - const node = this.startNode(); - let tmp; - let type; - let isGroupedType = false; - const oldNoAnonFunctionType = this.state.noAnonFunctionType; - - switch (this.state.type) { - case types.name: - if (this.isContextual("interface")) { - return this.flowParseInterfaceType(); - } - - return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier()); - - case types.braceL: - return this.flowParseObjectType({ - allowStatic: false, - allowExact: false, - allowSpread: true, - allowProto: false, - allowInexact: true - }); - - case types.braceBarL: - return this.flowParseObjectType({ - allowStatic: false, - allowExact: true, - allowSpread: true, - allowProto: false, - allowInexact: false - }); - - case types.bracketL: - this.state.noAnonFunctionType = false; - type = this.flowParseTupleType(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - return type; - - case types.relational: - if (this.state.value === "<") { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - this.expect(types.parenL); - tmp = this.flowParseFunctionTypeParams(); - node.params = tmp.params; - node.rest = tmp.rest; - this.expect(types.parenR); - this.expect(types.arrow); - node.returnType = this.flowParseType(); - return this.finishNode(node, "FunctionTypeAnnotation"); - } - - break; - - case types.parenL: - this.next(); - - if (!this.match(types.parenR) && !this.match(types.ellipsis)) { - if (this.match(types.name)) { - const token = this.lookahead().type; - isGroupedType = token !== types.question && token !== types.colon; - } else { - isGroupedType = true; - } - } - - if (isGroupedType) { - this.state.noAnonFunctionType = false; - type = this.flowParseType(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - - if (this.state.noAnonFunctionType || !(this.match(types.comma) || this.match(types.parenR) && this.lookahead().type === types.arrow)) { - this.expect(types.parenR); - return type; - } else { - this.eat(types.comma); - } - } - - if (type) { - tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]); - } else { - tmp = this.flowParseFunctionTypeParams(); - } - - node.params = tmp.params; - node.rest = tmp.rest; - this.expect(types.parenR); - this.expect(types.arrow); - node.returnType = this.flowParseType(); - node.typeParameters = null; - return this.finishNode(node, "FunctionTypeAnnotation"); - - case types.string: - return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation"); - - case types._true: - case types._false: - node.value = this.match(types._true); - this.next(); - return this.finishNode(node, "BooleanLiteralTypeAnnotation"); - - case types.plusMin: - if (this.state.value === "-") { - this.next(); - - if (this.match(types.num)) { - return this.parseLiteral(-this.state.value, "NumberLiteralTypeAnnotation", node.start, node.loc.start); - } - - if (this.match(types.bigint)) { - return this.parseLiteral(-this.state.value, "BigIntLiteralTypeAnnotation", node.start, node.loc.start); - } - - this.unexpected(null, `Unexpected token, expected "number" or "bigint"`); - } - - this.unexpected(); - - case types.num: - return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation"); - - case types.bigint: - return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation"); - - case types._void: - this.next(); - return this.finishNode(node, "VoidTypeAnnotation"); - - case types._null: - this.next(); - return this.finishNode(node, "NullLiteralTypeAnnotation"); - - case types._this: - this.next(); - return this.finishNode(node, "ThisTypeAnnotation"); - - case types.star: - this.next(); - return this.finishNode(node, "ExistsTypeAnnotation"); - - default: - if (this.state.type.keyword === "typeof") { - return this.flowParseTypeofType(); - } else if (this.state.type.keyword) { - const label = this.state.type.label; - this.next(); - return super.createIdentifier(node, label); - } - - } - - throw this.unexpected(); - } - - flowParsePostfixType() { - const startPos = this.state.start, - startLoc = this.state.startLoc; - let type = this.flowParsePrimaryType(); - - while (this.match(types.bracketL) && !this.canInsertSemicolon()) { - const node = this.startNodeAt(startPos, startLoc); - node.elementType = type; - this.expect(types.bracketL); - this.expect(types.bracketR); - type = this.finishNode(node, "ArrayTypeAnnotation"); - } - - return type; - } - - flowParsePrefixType() { - const node = this.startNode(); - - if (this.eat(types.question)) { - node.typeAnnotation = this.flowParsePrefixType(); - return this.finishNode(node, "NullableTypeAnnotation"); - } else { - return this.flowParsePostfixType(); - } - } - - flowParseAnonFunctionWithoutParens() { - const param = this.flowParsePrefixType(); - - if (!this.state.noAnonFunctionType && this.eat(types.arrow)) { - const node = this.startNodeAt(param.start, param.loc.start); - node.params = [this.reinterpretTypeAsFunctionTypeParam(param)]; - node.rest = null; - node.returnType = this.flowParseType(); - node.typeParameters = null; - return this.finishNode(node, "FunctionTypeAnnotation"); - } - - return param; - } - - flowParseIntersectionType() { - const node = this.startNode(); - this.eat(types.bitwiseAND); - const type = this.flowParseAnonFunctionWithoutParens(); - node.types = [type]; - - while (this.eat(types.bitwiseAND)) { - node.types.push(this.flowParseAnonFunctionWithoutParens()); - } - - return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); - } - - flowParseUnionType() { - const node = this.startNode(); - this.eat(types.bitwiseOR); - const type = this.flowParseIntersectionType(); - node.types = [type]; - - while (this.eat(types.bitwiseOR)) { - node.types.push(this.flowParseIntersectionType()); - } - - return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); - } - - flowParseType() { - const oldInType = this.state.inType; - this.state.inType = true; - const type = this.flowParseUnionType(); - this.state.inType = oldInType; - this.state.exprAllowed = this.state.exprAllowed || this.state.noAnonFunctionType; - return type; - } - - flowParseTypeOrImplicitInstantiation() { - if (this.state.type === types.name && this.state.value === "_") { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - const node = this.parseIdentifier(); - return this.flowParseGenericType(startPos, startLoc, node); - } else { - return this.flowParseType(); - } - } - - flowParseTypeAnnotation() { - const node = this.startNode(); - node.typeAnnotation = this.flowParseTypeInitialiser(); - return this.finishNode(node, "TypeAnnotation"); - } - - flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) { - const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier(); - - if (this.match(types.colon)) { - ident.typeAnnotation = this.flowParseTypeAnnotation(); - this.resetEndLocation(ident); - } - - return ident; - } - - typeCastToParameter(node) { - node.expression.typeAnnotation = node.typeAnnotation; - this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end); - return node.expression; - } - - flowParseVariance() { - let variance = null; - - if (this.match(types.plusMin)) { - variance = this.startNode(); - - if (this.state.value === "+") { - variance.kind = "plus"; - } else { - variance.kind = "minus"; - } - - this.next(); - this.finishNode(variance, "Variance"); - } - - return variance; - } - - parseFunctionBody(node, allowExpressionBody, isMethod = false) { - if (allowExpressionBody) { - return this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod)); - } - - return super.parseFunctionBody(node, false, isMethod); - } - - parseFunctionBodyAndFinish(node, type, isMethod = false) { - if (this.match(types.colon)) { - const typeNode = this.startNode(); - [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); - node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; - } - - super.parseFunctionBodyAndFinish(node, type, isMethod); - } - - parseStatement(context, topLevel) { - if (this.state.strict && this.match(types.name) && this.state.value === "interface") { - const node = this.startNode(); - this.next(); - return this.flowParseInterface(node); - } else { - const stmt = super.parseStatement(context, topLevel); - - if (this.flowPragma === undefined && !this.isValidDirective(stmt)) { - this.flowPragma = null; - } - - return stmt; - } - } - - parseExpressionStatement(node, expr) { - if (expr.type === "Identifier") { - if (expr.name === "declare") { - if (this.match(types._class) || this.match(types.name) || this.match(types._function) || this.match(types._var) || this.match(types._export)) { - return this.flowParseDeclare(node); - } - } else if (this.match(types.name)) { - if (expr.name === "interface") { - return this.flowParseInterface(node); - } else if (expr.name === "type") { - return this.flowParseTypeAlias(node); - } else if (expr.name === "opaque") { - return this.flowParseOpaqueType(node, false); - } - } - } - - return super.parseExpressionStatement(node, expr); - } - - shouldParseExportDeclaration() { - return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || super.shouldParseExportDeclaration(); - } - - isExportDefaultSpecifier() { - if (this.match(types.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value === "opaque")) { - return false; - } - - return super.isExportDefaultSpecifier(); - } - - parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { - if (!this.match(types.question)) return expr; - - if (refNeedsArrowPos) { - const state = this.state.clone(); - - try { - return super.parseConditional(expr, noIn, startPos, startLoc); - } catch (err) { - if (err instanceof SyntaxError) { - this.state = state; - refNeedsArrowPos.start = err.pos || this.state.start; - return expr; - } else { - throw err; - } - } - } - - this.expect(types.question); - const state = this.state.clone(); - const originalNoArrowAt = this.state.noArrowAt; - const node = this.startNodeAt(startPos, startLoc); - let { - consequent, - failed - } = this.tryParseConditionalConsequent(); - let [valid, invalid] = this.getArrowLikeExpressions(consequent); - - if (failed || invalid.length > 0) { - const noArrowAt = [...originalNoArrowAt]; - - if (invalid.length > 0) { - this.state = state; - this.state.noArrowAt = noArrowAt; - - for (let i = 0; i < invalid.length; i++) { - noArrowAt.push(invalid[i].start); - } - - ({ - consequent, - failed - } = this.tryParseConditionalConsequent()); - [valid, invalid] = this.getArrowLikeExpressions(consequent); - } - - if (failed && valid.length > 1) { - this.raise(state.start, "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."); - } - - if (failed && valid.length === 1) { - this.state = state; - this.state.noArrowAt = noArrowAt.concat(valid[0].start); - ({ - consequent, - failed - } = this.tryParseConditionalConsequent()); - } - - this.getArrowLikeExpressions(consequent, true); - } - - this.state.noArrowAt = originalNoArrowAt; - this.expect(types.colon); - node.test = expr; - node.consequent = consequent; - node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(noIn, undefined, undefined, undefined)); - return this.finishNode(node, "ConditionalExpression"); - } - - tryParseConditionalConsequent() { - this.state.noArrowParamsConversionAt.push(this.state.start); - const consequent = this.parseMaybeAssign(); - const failed = !this.match(types.colon); - this.state.noArrowParamsConversionAt.pop(); - return { - consequent, - failed - }; - } - - getArrowLikeExpressions(node, disallowInvalid) { - const stack = [node]; - const arrows = []; - - while (stack.length !== 0) { - const node = stack.pop(); - - if (node.type === "ArrowFunctionExpression") { - if (node.typeParameters || !node.returnType) { - this.toAssignableList(node.params, true, "arrow function parameters"); - this.scope.enter(functionFlags(false, false) | SCOPE_ARROW); - super.checkParams(node, false, true); - this.scope.exit(); - } else { - arrows.push(node); - } - - stack.push(node.body); - } else if (node.type === "ConditionalExpression") { - stack.push(node.consequent); - stack.push(node.alternate); - } - } - - if (disallowInvalid) { - for (let i = 0; i < arrows.length; i++) { - this.toAssignableList(node.params, true, "arrow function parameters"); - } - - return [arrows, []]; - } - - return partition(arrows, node => { - try { - this.toAssignableList(node.params, true, "arrow function parameters"); - return true; - } catch (err) { - return false; - } - }); - } - - forwardNoArrowParamsConversionAt(node, parse) { - let result; - - if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { - this.state.noArrowParamsConversionAt.push(this.state.start); - result = parse(); - this.state.noArrowParamsConversionAt.pop(); - } else { - result = parse(); - } - - return result; - } - - parseParenItem(node, startPos, startLoc) { - node = super.parseParenItem(node, startPos, startLoc); - - if (this.eat(types.question)) { - node.optional = true; - this.resetEndLocation(node); - } - - if (this.match(types.colon)) { - const typeCastNode = this.startNodeAt(startPos, startLoc); - typeCastNode.expression = node; - typeCastNode.typeAnnotation = this.flowParseTypeAnnotation(); - return this.finishNode(typeCastNode, "TypeCastExpression"); - } - - return node; - } - - assertModuleNodeAllowed(node) { - if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") { - return; - } - - super.assertModuleNodeAllowed(node); - } - - parseExport(node) { - const decl = super.parseExport(node); - - if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") { - decl.exportKind = decl.exportKind || "value"; - } - - return decl; - } - - parseExportDeclaration(node) { - if (this.isContextual("type")) { - node.exportKind = "type"; - const declarationNode = this.startNode(); - this.next(); - - if (this.match(types.braceL)) { - node.specifiers = this.parseExportSpecifiers(); - this.parseExportFrom(node); - return null; - } else { - return this.flowParseTypeAlias(declarationNode); - } - } else if (this.isContextual("opaque")) { - node.exportKind = "type"; - const declarationNode = this.startNode(); - this.next(); - return this.flowParseOpaqueType(declarationNode, false); - } else if (this.isContextual("interface")) { - node.exportKind = "type"; - const declarationNode = this.startNode(); - this.next(); - return this.flowParseInterface(declarationNode); - } else { - return super.parseExportDeclaration(node); - } - } - - eatExportStar(node) { - if (super.eatExportStar(...arguments)) return true; - - if (this.isContextual("type") && this.lookahead().type === types.star) { - node.exportKind = "type"; - this.next(); - this.next(); - return true; - } - - return false; - } - - maybeParseExportNamespaceSpecifier(node) { - const pos = this.state.start; - const hasNamespace = super.maybeParseExportNamespaceSpecifier(node); - - if (hasNamespace && node.exportKind === "type") { - this.unexpected(pos); - } - - return hasNamespace; - } - - parseClassId(node, isStatement, optionalId) { - super.parseClassId(node, isStatement, optionalId); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - } - - getTokenFromCode(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (code === 123 && next === 124) { - return this.finishOp(types.braceBarL, 2); - } else if (this.state.inType && (code === 62 || code === 60)) { - return this.finishOp(types.relational, 1); - } else if (isIteratorStart(code, next)) { - this.state.isIterator = true; - return super.readWord(); - } else { - return super.getTokenFromCode(code); - } - } - - toAssignable(node, isBinding, contextDescription) { - if (node.type === "TypeCastExpression") { - return super.toAssignable(this.typeCastToParameter(node), isBinding, contextDescription); - } else { - return super.toAssignable(node, isBinding, contextDescription); - } - } - - toAssignableList(exprList, isBinding, contextDescription) { - for (let i = 0; i < exprList.length; i++) { - const expr = exprList[i]; - - if (expr && expr.type === "TypeCastExpression") { - exprList[i] = this.typeCastToParameter(expr); - } - } - - return super.toAssignableList(exprList, isBinding, contextDescription); - } - - toReferencedList(exprList, isParenthesizedExpr) { - for (let i = 0; i < exprList.length; i++) { - const expr = exprList[i]; - - if (expr && expr.type === "TypeCastExpression" && (!expr.extra || !expr.extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) { - this.raise(expr.typeAnnotation.start, "The type cast expression is expected to be wrapped with parenthesis"); - } - } - - return exprList; - } - - checkLVal(expr, bindingType = BIND_NONE, checkClashes, contextDescription) { - if (expr.type !== "TypeCastExpression") { - return super.checkLVal(expr, bindingType, checkClashes, contextDescription); - } - } - - parseClassProperty(node) { - if (this.match(types.colon)) { - node.typeAnnotation = this.flowParseTypeAnnotation(); - } - - return super.parseClassProperty(node); - } - - parseClassPrivateProperty(node) { - if (this.match(types.colon)) { - node.typeAnnotation = this.flowParseTypeAnnotation(); - } - - return super.parseClassPrivateProperty(node); - } - - isClassMethod() { - return this.isRelational("<") || super.isClassMethod(); - } - - isClassProperty() { - return this.match(types.colon) || super.isClassProperty(); - } - - isNonstaticConstructor(method) { - return !this.match(types.colon) && super.isNonstaticConstructor(method); - } - - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { - if (method.variance) { - this.unexpected(method.variance.start); - } - - delete method.variance; - - if (this.isRelational("<")) { - method.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); - } - - pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - if (method.variance) { - this.unexpected(method.variance.start); - } - - delete method.variance; - - if (this.isRelational("<")) { - method.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); - } - - parseClassSuper(node) { - super.parseClassSuper(node); - - if (node.superClass && this.isRelational("<")) { - node.superTypeParameters = this.flowParseTypeParameterInstantiation(); - } - - if (this.isContextual("implements")) { - this.next(); - const implemented = node.implements = []; - - do { - const node = this.startNode(); - node.id = this.flowParseRestrictedIdentifier(true); - - if (this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterInstantiation(); - } else { - node.typeParameters = null; - } - - implemented.push(this.finishNode(node, "ClassImplements")); - } while (this.eat(types.comma)); - } - } - - parsePropertyName(node) { - const variance = this.flowParseVariance(); - const key = super.parsePropertyName(node); - node.variance = variance; - return key; - } - - parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) { - if (prop.variance) { - this.unexpected(prop.variance.start); - } - - delete prop.variance; - let typeParameters; - - if (this.isRelational("<")) { - typeParameters = this.flowParseTypeParameterDeclaration(); - if (!this.match(types.parenL)) this.unexpected(); - } - - super.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc); - - if (typeParameters) { - (prop.value || prop).typeParameters = typeParameters; - } - } - - parseAssignableListItemTypes(param) { - if (this.eat(types.question)) { - if (param.type !== "Identifier") { - throw this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature."); - } - - param.optional = true; - } - - if (this.match(types.colon)) { - param.typeAnnotation = this.flowParseTypeAnnotation(); - } - - this.resetEndLocation(param); - return param; - } - - parseMaybeDefault(startPos, startLoc, left) { - const node = super.parseMaybeDefault(startPos, startLoc, left); - - if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { - this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`"); - } - - return node; - } - - shouldParseDefaultImport(node) { - if (!hasTypeImportKind(node)) { - return super.shouldParseDefaultImport(node); - } - - return isMaybeDefaultImport(this.state); - } - - parseImportSpecifierLocal(node, specifier, type, contextDescription) { - specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true) : this.parseIdentifier(); - this.checkLVal(specifier.local, BIND_LEXICAL, undefined, contextDescription); - node.specifiers.push(this.finishNode(specifier, type)); - } - - maybeParseDefaultImportSpecifier(node) { - node.importKind = "value"; - let kind = null; - - if (this.match(types._typeof)) { - kind = "typeof"; - } else if (this.isContextual("type")) { - kind = "type"; - } - - if (kind) { - const lh = this.lookahead(); - - if (kind === "type" && lh.type === types.star) { - this.unexpected(lh.start); - } - - if (isMaybeDefaultImport(lh) || lh.type === types.braceL || lh.type === types.star) { - this.next(); - node.importKind = kind; - } - } - - return super.maybeParseDefaultImportSpecifier(node); - } - - parseImportSpecifier(node) { - const specifier = this.startNode(); - const firstIdentLoc = this.state.start; - const firstIdent = this.parseIdentifier(true); - let specifierTypeKind = null; - - if (firstIdent.name === "type") { - specifierTypeKind = "type"; - } else if (firstIdent.name === "typeof") { - specifierTypeKind = "typeof"; - } - - let isBinding = false; - - if (this.isContextual("as") && !this.isLookaheadContextual("as")) { - const as_ident = this.parseIdentifier(true); - - if (specifierTypeKind !== null && !this.match(types.name) && !this.state.type.keyword) { - specifier.imported = as_ident; - specifier.importKind = specifierTypeKind; - specifier.local = as_ident.__clone(); - } else { - specifier.imported = firstIdent; - specifier.importKind = null; - specifier.local = this.parseIdentifier(); - } - } else if (specifierTypeKind !== null && (this.match(types.name) || this.state.type.keyword)) { - specifier.imported = this.parseIdentifier(true); - specifier.importKind = specifierTypeKind; - - if (this.eatContextual("as")) { - specifier.local = this.parseIdentifier(); - } else { - isBinding = true; - specifier.local = specifier.imported.__clone(); - } - } else { - isBinding = true; - specifier.imported = firstIdent; - specifier.importKind = null; - specifier.local = specifier.imported.__clone(); - } - - const nodeIsTypeImport = hasTypeImportKind(node); - const specifierIsTypeImport = hasTypeImportKind(specifier); - - if (nodeIsTypeImport && specifierIsTypeImport) { - this.raise(firstIdentLoc, "The `type` and `typeof` keywords on named imports can only be used on regular " + "`import` statements. It cannot be used with `import type` or `import typeof` statements"); - } - - if (nodeIsTypeImport || specifierIsTypeImport) { - this.checkReservedType(specifier.local.name, specifier.local.start); - } - - if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) { - this.checkReservedWord(specifier.local.name, specifier.start, true, true); - } - - this.checkLVal(specifier.local, BIND_LEXICAL, undefined, "import specifier"); - node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); - } - - parseFunctionParams(node, allowModifiers) { - const kind = node.kind; - - if (kind !== "get" && kind !== "set" && this.isRelational("<")) { - node.typeParameters = this.flowParseTypeParameterDeclaration(); - } - - super.parseFunctionParams(node, allowModifiers); - } - - parseVarId(decl, kind) { - super.parseVarId(decl, kind); - - if (this.match(types.colon)) { - decl.id.typeAnnotation = this.flowParseTypeAnnotation(); - this.resetEndLocation(decl.id); - } - } - - parseAsyncArrowFromCallExpression(node, call) { - if (this.match(types.colon)) { - const oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = true; - node.returnType = this.flowParseTypeAnnotation(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - } - - return super.parseAsyncArrowFromCallExpression(node, call); - } - - shouldParseAsyncArrow() { - return this.match(types.colon) || super.shouldParseAsyncArrow(); - } - - parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) { - let jsxError = null; - - if (this.hasPlugin("jsx") && (this.match(types.jsxTagStart) || this.isRelational("<"))) { - const state = this.state.clone(); - - try { - return super.parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); - } catch (err) { - if (err instanceof SyntaxError) { - this.state = state; - const cLength = this.state.context.length; - - if (this.state.context[cLength - 1] === types$1.j_oTag) { - this.state.context.length -= 2; - } - - jsxError = err; - } else { - throw err; - } - } - } - - if (jsxError != null || this.isRelational("<")) { - let arrowExpression; - let typeParameters; - - try { - typeParameters = this.flowParseTypeParameterDeclaration(); - arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, () => super.parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos)); - arrowExpression.typeParameters = typeParameters; - this.resetStartLocationFromNode(arrowExpression, typeParameters); - } catch (err) { - throw jsxError || err; - } - - if (arrowExpression.type === "ArrowFunctionExpression") { - return arrowExpression; - } else if (jsxError != null) { - throw jsxError; - } else { - this.raise(typeParameters.start, "Expected an arrow function after this type parameter declaration"); - } - } - - return super.parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos); - } - - parseArrow(node) { - if (this.match(types.colon)) { - const state = this.state.clone(); - - try { - const oldNoAnonFunctionType = this.state.noAnonFunctionType; - this.state.noAnonFunctionType = true; - const typeNode = this.startNode(); - [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - if (this.canInsertSemicolon()) this.unexpected(); - if (!this.match(types.arrow)) this.unexpected(); - node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; - } catch (err) { - if (err instanceof SyntaxError) { - this.state = state; - } else { - throw err; - } - } - } - - return super.parseArrow(node); - } - - shouldParseArrow() { - return this.match(types.colon) || super.shouldParseArrow(); - } - - setArrowFunctionParameters(node, params) { - if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { - node.params = params; - } else { - super.setArrowFunctionParameters(node, params); - } - } - - checkParams(node, allowDuplicates, isArrowFunction) { - if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { - return; - } - - return super.checkParams(node, allowDuplicates, isArrowFunction); - } - - parseParenAndDistinguishExpression(canBeArrow) { - return super.parseParenAndDistinguishExpression(canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1); - } - - parseSubscripts(base, startPos, startLoc, noCalls) { - if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) { - this.next(); - const node = this.startNodeAt(startPos, startLoc); - node.callee = base; - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - base = this.finishNode(node, "CallExpression"); - } else if (base.type === "Identifier" && base.name === "async" && this.isRelational("<")) { - const state = this.state.clone(); - let error; - - try { - const node = this.parseAsyncArrowWithTypeParameters(startPos, startLoc); - if (node) return node; - } catch (e) { - error = e; - } - - this.state = state; - - try { - return super.parseSubscripts(base, startPos, startLoc, noCalls); - } catch (e) { - throw error || e; - } - } - - return super.parseSubscripts(base, startPos, startLoc, noCalls); - } - - parseSubscript(base, startPos, startLoc, noCalls, subscriptState, maybeAsyncArrow) { - if (this.match(types.questionDot) && this.isLookaheadRelational("<")) { - this.expectPlugin("optionalChaining"); - subscriptState.optionalChainMember = true; - - if (noCalls) { - subscriptState.stop = true; - return base; - } - - this.next(); - const node = this.startNodeAt(startPos, startLoc); - node.callee = base; - node.typeArguments = this.flowParseTypeParameterInstantiation(); - this.expect(types.parenL); - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - node.optional = true; - return this.finishNode(node, "OptionalCallExpression"); - } else if (!noCalls && this.shouldParseTypes() && this.isRelational("<")) { - const node = this.startNodeAt(startPos, startLoc); - node.callee = base; - const state = this.state.clone(); - - try { - node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(); - this.expect(types.parenL); - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - - if (subscriptState.optionalChainMember) { - node.optional = false; - return this.finishNode(node, "OptionalCallExpression"); - } - - return this.finishNode(node, "CallExpression"); - } catch (e) { - if (e instanceof SyntaxError) { - this.state = state; - } else { - throw e; - } - } - } - - return super.parseSubscript(base, startPos, startLoc, noCalls, subscriptState, maybeAsyncArrow); - } - - parseNewArguments(node) { - let targs = null; - - if (this.shouldParseTypes() && this.isRelational("<")) { - const state = this.state.clone(); - - try { - targs = this.flowParseTypeParameterInstantiationCallOrNew(); - } catch (e) { - if (e instanceof SyntaxError) { - this.state = state; - } else { - throw e; - } - } - } - - node.typeArguments = targs; - super.parseNewArguments(node); - } - - parseAsyncArrowWithTypeParameters(startPos, startLoc) { - const node = this.startNodeAt(startPos, startLoc); - this.parseFunctionParams(node); - if (!this.parseArrow(node)) return; - return this.parseArrowExpression(node, undefined, true); - } - - readToken_mult_modulo(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (code === 42 && next === 47 && this.state.hasFlowComment) { - this.state.hasFlowComment = false; - this.state.pos += 2; - this.nextToken(); - return; - } - - super.readToken_mult_modulo(code); - } - - readToken_pipe_amp(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (code === 124 && next === 125) { - this.finishOp(types.braceBarR, 2); - return; - } - - super.readToken_pipe_amp(code); - } - - parseTopLevel(file, program) { - const fileNode = super.parseTopLevel(file, program); - - if (this.state.hasFlowComment) { - this.unexpected(null, "Unterminated flow-comment"); - } - - return fileNode; - } - - skipBlockComment() { - if (this.hasPlugin("flowComments") && this.skipFlowComment()) { - if (this.state.hasFlowComment) { - this.unexpected(null, "Cannot have a flow comment inside another flow comment"); - } - - this.hasFlowCommentCompletion(); - this.state.pos += this.skipFlowComment(); - this.state.hasFlowComment = true; - return; - } - - if (this.state.hasFlowComment) { - const end = this.input.indexOf("*-/", this.state.pos += 2); - if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); - this.state.pos = end + 3; - return; - } - - super.skipBlockComment(); - } - - skipFlowComment() { - const { - pos - } = this.state; - let shiftToFirstNonWhiteSpace = 2; - - while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) { - shiftToFirstNonWhiteSpace++; - } - - const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos); - const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1); - - if (ch2 === 58 && ch3 === 58) { - return shiftToFirstNonWhiteSpace + 2; - } - - if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") { - return shiftToFirstNonWhiteSpace + 12; - } - - if (ch2 === 58 && ch3 !== 58) { - return shiftToFirstNonWhiteSpace; - } - - return false; - } - - hasFlowCommentCompletion() { - const end = this.input.indexOf("*/", this.state.pos); - - if (end === -1) { - this.raise(this.state.pos, "Unterminated comment"); - } - } - -}); - -const entities = { - quot: "\u0022", - amp: "&", - apos: "\u0027", - lt: "<", - gt: ">", - nbsp: "\u00A0", - iexcl: "\u00A1", - cent: "\u00A2", - pound: "\u00A3", - curren: "\u00A4", - yen: "\u00A5", - brvbar: "\u00A6", - sect: "\u00A7", - uml: "\u00A8", - copy: "\u00A9", - ordf: "\u00AA", - laquo: "\u00AB", - not: "\u00AC", - shy: "\u00AD", - reg: "\u00AE", - macr: "\u00AF", - deg: "\u00B0", - plusmn: "\u00B1", - sup2: "\u00B2", - sup3: "\u00B3", - acute: "\u00B4", - micro: "\u00B5", - para: "\u00B6", - middot: "\u00B7", - cedil: "\u00B8", - sup1: "\u00B9", - ordm: "\u00BA", - raquo: "\u00BB", - frac14: "\u00BC", - frac12: "\u00BD", - frac34: "\u00BE", - iquest: "\u00BF", - Agrave: "\u00C0", - Aacute: "\u00C1", - Acirc: "\u00C2", - Atilde: "\u00C3", - Auml: "\u00C4", - Aring: "\u00C5", - AElig: "\u00C6", - Ccedil: "\u00C7", - Egrave: "\u00C8", - Eacute: "\u00C9", - Ecirc: "\u00CA", - Euml: "\u00CB", - Igrave: "\u00CC", - Iacute: "\u00CD", - Icirc: "\u00CE", - Iuml: "\u00CF", - ETH: "\u00D0", - Ntilde: "\u00D1", - Ograve: "\u00D2", - Oacute: "\u00D3", - Ocirc: "\u00D4", - Otilde: "\u00D5", - Ouml: "\u00D6", - times: "\u00D7", - Oslash: "\u00D8", - Ugrave: "\u00D9", - Uacute: "\u00DA", - Ucirc: "\u00DB", - Uuml: "\u00DC", - Yacute: "\u00DD", - THORN: "\u00DE", - szlig: "\u00DF", - agrave: "\u00E0", - aacute: "\u00E1", - acirc: "\u00E2", - atilde: "\u00E3", - auml: "\u00E4", - aring: "\u00E5", - aelig: "\u00E6", - ccedil: "\u00E7", - egrave: "\u00E8", - eacute: "\u00E9", - ecirc: "\u00EA", - euml: "\u00EB", - igrave: "\u00EC", - iacute: "\u00ED", - icirc: "\u00EE", - iuml: "\u00EF", - eth: "\u00F0", - ntilde: "\u00F1", - ograve: "\u00F2", - oacute: "\u00F3", - ocirc: "\u00F4", - otilde: "\u00F5", - ouml: "\u00F6", - divide: "\u00F7", - oslash: "\u00F8", - ugrave: "\u00F9", - uacute: "\u00FA", - ucirc: "\u00FB", - uuml: "\u00FC", - yacute: "\u00FD", - thorn: "\u00FE", - yuml: "\u00FF", - OElig: "\u0152", - oelig: "\u0153", - Scaron: "\u0160", - scaron: "\u0161", - Yuml: "\u0178", - fnof: "\u0192", - circ: "\u02C6", - tilde: "\u02DC", - Alpha: "\u0391", - Beta: "\u0392", - Gamma: "\u0393", - Delta: "\u0394", - Epsilon: "\u0395", - Zeta: "\u0396", - Eta: "\u0397", - Theta: "\u0398", - Iota: "\u0399", - Kappa: "\u039A", - Lambda: "\u039B", - Mu: "\u039C", - Nu: "\u039D", - Xi: "\u039E", - Omicron: "\u039F", - Pi: "\u03A0", - Rho: "\u03A1", - Sigma: "\u03A3", - Tau: "\u03A4", - Upsilon: "\u03A5", - Phi: "\u03A6", - Chi: "\u03A7", - Psi: "\u03A8", - Omega: "\u03A9", - alpha: "\u03B1", - beta: "\u03B2", - gamma: "\u03B3", - delta: "\u03B4", - epsilon: "\u03B5", - zeta: "\u03B6", - eta: "\u03B7", - theta: "\u03B8", - iota: "\u03B9", - kappa: "\u03BA", - lambda: "\u03BB", - mu: "\u03BC", - nu: "\u03BD", - xi: "\u03BE", - omicron: "\u03BF", - pi: "\u03C0", - rho: "\u03C1", - sigmaf: "\u03C2", - sigma: "\u03C3", - tau: "\u03C4", - upsilon: "\u03C5", - phi: "\u03C6", - chi: "\u03C7", - psi: "\u03C8", - omega: "\u03C9", - thetasym: "\u03D1", - upsih: "\u03D2", - piv: "\u03D6", - ensp: "\u2002", - emsp: "\u2003", - thinsp: "\u2009", - zwnj: "\u200C", - zwj: "\u200D", - lrm: "\u200E", - rlm: "\u200F", - ndash: "\u2013", - mdash: "\u2014", - lsquo: "\u2018", - rsquo: "\u2019", - sbquo: "\u201A", - ldquo: "\u201C", - rdquo: "\u201D", - bdquo: "\u201E", - dagger: "\u2020", - Dagger: "\u2021", - bull: "\u2022", - hellip: "\u2026", - permil: "\u2030", - prime: "\u2032", - Prime: "\u2033", - lsaquo: "\u2039", - rsaquo: "\u203A", - oline: "\u203E", - frasl: "\u2044", - euro: "\u20AC", - image: "\u2111", - weierp: "\u2118", - real: "\u211C", - trade: "\u2122", - alefsym: "\u2135", - larr: "\u2190", - uarr: "\u2191", - rarr: "\u2192", - darr: "\u2193", - harr: "\u2194", - crarr: "\u21B5", - lArr: "\u21D0", - uArr: "\u21D1", - rArr: "\u21D2", - dArr: "\u21D3", - hArr: "\u21D4", - forall: "\u2200", - part: "\u2202", - exist: "\u2203", - empty: "\u2205", - nabla: "\u2207", - isin: "\u2208", - notin: "\u2209", - ni: "\u220B", - prod: "\u220F", - sum: "\u2211", - minus: "\u2212", - lowast: "\u2217", - radic: "\u221A", - prop: "\u221D", - infin: "\u221E", - ang: "\u2220", - and: "\u2227", - or: "\u2228", - cap: "\u2229", - cup: "\u222A", - int: "\u222B", - there4: "\u2234", - sim: "\u223C", - cong: "\u2245", - asymp: "\u2248", - ne: "\u2260", - equiv: "\u2261", - le: "\u2264", - ge: "\u2265", - sub: "\u2282", - sup: "\u2283", - nsub: "\u2284", - sube: "\u2286", - supe: "\u2287", - oplus: "\u2295", - otimes: "\u2297", - perp: "\u22A5", - sdot: "\u22C5", - lceil: "\u2308", - rceil: "\u2309", - lfloor: "\u230A", - rfloor: "\u230B", - lang: "\u2329", - rang: "\u232A", - loz: "\u25CA", - spades: "\u2660", - clubs: "\u2663", - hearts: "\u2665", - diams: "\u2666" -}; - -const HEX_NUMBER = /^[\da-fA-F]+$/; -const DECIMAL_NUMBER = /^\d+$/; -types$1.j_oTag = new TokContext("...", true, true); -types.jsxName = new TokenType("jsxName"); -types.jsxText = new TokenType("jsxText", { - beforeExpr: true -}); -types.jsxTagStart = new TokenType("jsxTagStart", { - startsExpr: true -}); -types.jsxTagEnd = new TokenType("jsxTagEnd"); - -types.jsxTagStart.updateContext = function () { - this.state.context.push(types$1.j_expr); - this.state.context.push(types$1.j_oTag); - this.state.exprAllowed = false; -}; - -types.jsxTagEnd.updateContext = function (prevType) { - const out = this.state.context.pop(); - - if (out === types$1.j_oTag && prevType === types.slash || out === types$1.j_cTag) { - this.state.context.pop(); - this.state.exprAllowed = this.curContext() === types$1.j_expr; - } else { - this.state.exprAllowed = true; - } -}; - -function isFragment(object) { - return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false; -} - -function getQualifiedJSXName(object) { - if (object.type === "JSXIdentifier") { - return object.name; - } - - if (object.type === "JSXNamespacedName") { - return object.namespace.name + ":" + object.name.name; - } - - if (object.type === "JSXMemberExpression") { - return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property); - } - - throw new Error("Node had unexpected type: " + object.type); -} - -var jsx = (superClass => class extends superClass { - jsxReadToken() { - let out = ""; - let chunkStart = this.state.pos; - - for (;;) { - if (this.state.pos >= this.length) { - this.raise(this.state.start, "Unterminated JSX contents"); - } - - const ch = this.input.charCodeAt(this.state.pos); - - switch (ch) { - case 60: - case 123: - if (this.state.pos === this.state.start) { - if (ch === 60 && this.state.exprAllowed) { - ++this.state.pos; - return this.finishToken(types.jsxTagStart); - } - - return super.getTokenFromCode(ch); - } - - out += this.input.slice(chunkStart, this.state.pos); - return this.finishToken(types.jsxText, out); - - case 38: - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadEntity(); - chunkStart = this.state.pos; - break; - - default: - if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadNewLine(true); - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - - } - } - } - - jsxReadNewLine(normalizeCRLF) { - const ch = this.input.charCodeAt(this.state.pos); - let out; - ++this.state.pos; - - if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - out = normalizeCRLF ? "\n" : "\r\n"; - } else { - out = String.fromCharCode(ch); - } - - ++this.state.curLine; - this.state.lineStart = this.state.pos; - return out; - } - - jsxReadString(quote) { - let out = ""; - let chunkStart = ++this.state.pos; - - for (;;) { - if (this.state.pos >= this.length) { - this.raise(this.state.start, "Unterminated string constant"); - } - - const ch = this.input.charCodeAt(this.state.pos); - if (ch === quote) break; - - if (ch === 38) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadEntity(); - chunkStart = this.state.pos; - } else if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.jsxReadNewLine(false); - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - } - - out += this.input.slice(chunkStart, this.state.pos++); - return this.finishToken(types.string, out); - } - - jsxReadEntity() { - let str = ""; - let count = 0; - let entity; - let ch = this.input[this.state.pos]; - const startPos = ++this.state.pos; - - while (this.state.pos < this.length && count++ < 10) { - ch = this.input[this.state.pos++]; - - if (ch === ";") { - if (str[0] === "#") { - if (str[1] === "x") { - str = str.substr(2); - - if (HEX_NUMBER.test(str)) { - entity = String.fromCodePoint(parseInt(str, 16)); - } - } else { - str = str.substr(1); - - if (DECIMAL_NUMBER.test(str)) { - entity = String.fromCodePoint(parseInt(str, 10)); - } - } - } else { - entity = entities[str]; - } - - break; - } - - str += ch; - } - - if (!entity) { - this.state.pos = startPos; - return "&"; - } - - return entity; - } - - jsxReadWord() { - let ch; - const start = this.state.pos; - - do { - ch = this.input.charCodeAt(++this.state.pos); - } while (isIdentifierChar(ch) || ch === 45); - - return this.finishToken(types.jsxName, this.input.slice(start, this.state.pos)); - } - - jsxParseIdentifier() { - const node = this.startNode(); - - if (this.match(types.jsxName)) { - node.name = this.state.value; - } else if (this.state.type.keyword) { - node.name = this.state.type.keyword; - } else { - this.unexpected(); - } - - this.next(); - return this.finishNode(node, "JSXIdentifier"); - } - - jsxParseNamespacedName() { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - const name = this.jsxParseIdentifier(); - if (!this.eat(types.colon)) return name; - const node = this.startNodeAt(startPos, startLoc); - node.namespace = name; - node.name = this.jsxParseIdentifier(); - return this.finishNode(node, "JSXNamespacedName"); - } - - jsxParseElementName() { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - let node = this.jsxParseNamespacedName(); - - while (this.eat(types.dot)) { - const newNode = this.startNodeAt(startPos, startLoc); - newNode.object = node; - newNode.property = this.jsxParseIdentifier(); - node = this.finishNode(newNode, "JSXMemberExpression"); - } - - return node; - } - - jsxParseAttributeValue() { - let node; - - switch (this.state.type) { - case types.braceL: - node = this.startNode(); - this.next(); - node = this.jsxParseExpressionContainer(node); - - if (node.expression.type === "JSXEmptyExpression") { - throw this.raise(node.start, "JSX attributes must only be assigned a non-empty expression"); - } else { - return node; - } - - case types.jsxTagStart: - case types.string: - return this.parseExprAtom(); - - default: - throw this.raise(this.state.start, "JSX value should be either an expression or a quoted JSX text"); - } - } - - jsxParseEmptyExpression() { - const node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc); - return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc); - } - - jsxParseSpreadChild(node) { - this.next(); - node.expression = this.parseExpression(); - this.expect(types.braceR); - return this.finishNode(node, "JSXSpreadChild"); - } - - jsxParseExpressionContainer(node) { - if (this.match(types.braceR)) { - node.expression = this.jsxParseEmptyExpression(); - } else { - node.expression = this.parseExpression(); - } - - this.expect(types.braceR); - return this.finishNode(node, "JSXExpressionContainer"); - } - - jsxParseAttribute() { - const node = this.startNode(); - - if (this.eat(types.braceL)) { - this.expect(types.ellipsis); - node.argument = this.parseMaybeAssign(); - this.expect(types.braceR); - return this.finishNode(node, "JSXSpreadAttribute"); - } - - node.name = this.jsxParseNamespacedName(); - node.value = this.eat(types.eq) ? this.jsxParseAttributeValue() : null; - return this.finishNode(node, "JSXAttribute"); - } - - jsxParseOpeningElementAt(startPos, startLoc) { - const node = this.startNodeAt(startPos, startLoc); - - if (this.match(types.jsxTagEnd)) { - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXOpeningFragment"); - } - - node.name = this.jsxParseElementName(); - return this.jsxParseOpeningElementAfterName(node); - } - - jsxParseOpeningElementAfterName(node) { - const attributes = []; - - while (!this.match(types.slash) && !this.match(types.jsxTagEnd)) { - attributes.push(this.jsxParseAttribute()); - } - - node.attributes = attributes; - node.selfClosing = this.eat(types.slash); - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXOpeningElement"); - } - - jsxParseClosingElementAt(startPos, startLoc) { - const node = this.startNodeAt(startPos, startLoc); - - if (this.match(types.jsxTagEnd)) { - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXClosingFragment"); - } - - node.name = this.jsxParseElementName(); - this.expect(types.jsxTagEnd); - return this.finishNode(node, "JSXClosingElement"); - } - - jsxParseElementAt(startPos, startLoc) { - const node = this.startNodeAt(startPos, startLoc); - const children = []; - const openingElement = this.jsxParseOpeningElementAt(startPos, startLoc); - let closingElement = null; - - if (!openingElement.selfClosing) { - contents: for (;;) { - switch (this.state.type) { - case types.jsxTagStart: - startPos = this.state.start; - startLoc = this.state.startLoc; - this.next(); - - if (this.eat(types.slash)) { - closingElement = this.jsxParseClosingElementAt(startPos, startLoc); - break contents; - } - - children.push(this.jsxParseElementAt(startPos, startLoc)); - break; - - case types.jsxText: - children.push(this.parseExprAtom()); - break; - - case types.braceL: - { - const node = this.startNode(); - this.next(); - - if (this.match(types.ellipsis)) { - children.push(this.jsxParseSpreadChild(node)); - } else { - children.push(this.jsxParseExpressionContainer(node)); - } - - break; - } - - default: - throw this.unexpected(); - } - } - - if (isFragment(openingElement) && !isFragment(closingElement)) { - this.raise(closingElement.start, "Expected corresponding JSX closing tag for <>"); - } else if (!isFragment(openingElement) && isFragment(closingElement)) { - this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"); - } else if (!isFragment(openingElement) && !isFragment(closingElement)) { - if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) { - this.raise(closingElement.start, "Expected corresponding JSX closing tag for <" + getQualifiedJSXName(openingElement.name) + ">"); - } - } - } - - if (isFragment(openingElement)) { - node.openingFragment = openingElement; - node.closingFragment = closingElement; - } else { - node.openingElement = openingElement; - node.closingElement = closingElement; - } - - node.children = children; - - if (this.match(types.relational) && this.state.value === "<") { - this.raise(this.state.start, "Adjacent JSX elements must be wrapped in an enclosing tag. " + "Did you want a JSX fragment <>...?"); - } - - return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement"); - } - - jsxParseElement() { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - this.next(); - return this.jsxParseElementAt(startPos, startLoc); - } - - parseExprAtom(refShortHandDefaultPos) { - if (this.match(types.jsxText)) { - return this.parseLiteral(this.state.value, "JSXText"); - } else if (this.match(types.jsxTagStart)) { - return this.jsxParseElement(); - } else if (this.isRelational("<") && this.input.charCodeAt(this.state.pos) !== 33) { - this.finishToken(types.jsxTagStart); - return this.jsxParseElement(); - } else { - return super.parseExprAtom(refShortHandDefaultPos); - } - } - - getTokenFromCode(code) { - if (this.state.inPropertyName) return super.getTokenFromCode(code); - const context = this.curContext(); - - if (context === types$1.j_expr) { - return this.jsxReadToken(); - } - - if (context === types$1.j_oTag || context === types$1.j_cTag) { - if (isIdentifierStart(code)) { - return this.jsxReadWord(); - } - - if (code === 62) { - ++this.state.pos; - return this.finishToken(types.jsxTagEnd); - } - - if ((code === 34 || code === 39) && context === types$1.j_oTag) { - return this.jsxReadString(code); - } - } - - if (code === 60 && this.state.exprAllowed && this.input.charCodeAt(this.state.pos + 1) !== 33) { - ++this.state.pos; - return this.finishToken(types.jsxTagStart); - } - - return super.getTokenFromCode(code); - } - - updateContext(prevType) { - if (this.match(types.braceL)) { - const curContext = this.curContext(); - - if (curContext === types$1.j_oTag) { - this.state.context.push(types$1.braceExpression); - } else if (curContext === types$1.j_expr) { - this.state.context.push(types$1.templateQuasi); - } else { - super.updateContext(prevType); - } - - this.state.exprAllowed = true; - } else if (this.match(types.slash) && prevType === types.jsxTagStart) { - this.state.context.length -= 2; - this.state.context.push(types$1.j_cTag); - this.state.exprAllowed = false; - } else { - return super.updateContext(prevType); - } - } - -}); - -class Scope { - constructor(flags) { - this.var = []; - this.lexical = []; - this.functions = []; - this.flags = flags; - } - -} -class ScopeHandler { - constructor(raise, inModule) { - this.scopeStack = []; - this.undefinedExports = new Map(); - this.raise = raise; - this.inModule = inModule; - } - - get inFunction() { - return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0; - } - - get inGenerator() { - return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0; - } - - get inAsync() { - return (this.currentVarScope().flags & SCOPE_ASYNC) > 0; - } - - get allowSuper() { - return (this.currentThisScope().flags & SCOPE_SUPER) > 0; - } - - get allowDirectSuper() { - return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0; - } - - get inNonArrowFunction() { - return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0; - } - - get treatFunctionsAsVar() { - return this.treatFunctionsAsVarInScope(this.currentScope()); - } - - createScope(flags) { - return new Scope(flags); - } - - enter(flags) { - this.scopeStack.push(this.createScope(flags)); - } - - exit() { - this.scopeStack.pop(); - } - - treatFunctionsAsVarInScope(scope) { - return !!(scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_PROGRAM); - } - - declareName(name, bindingType, pos) { - let scope = this.currentScope(); - - if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) { - this.checkRedeclarationInScope(scope, name, bindingType, pos); - - if (bindingType & BIND_SCOPE_FUNCTION) { - scope.functions.push(name); - } else { - scope.lexical.push(name); - } - - if (bindingType & BIND_SCOPE_LEXICAL) { - this.maybeExportDefined(scope, name); - } - } else if (bindingType & BIND_SCOPE_VAR) { - for (let i = this.scopeStack.length - 1; i >= 0; --i) { - scope = this.scopeStack[i]; - this.checkRedeclarationInScope(scope, name, bindingType, pos); - scope.var.push(name); - this.maybeExportDefined(scope, name); - if (scope.flags & SCOPE_VAR) break; - } - } - - if (this.inModule && scope.flags & SCOPE_PROGRAM) { - this.undefinedExports.delete(name); - } - } - - maybeExportDefined(scope, name) { - if (this.inModule && scope.flags & SCOPE_PROGRAM) { - this.undefinedExports.delete(name); - } - } - - checkRedeclarationInScope(scope, name, bindingType, pos) { - if (this.isRedeclaredInScope(scope, name, bindingType)) { - this.raise(pos, `Identifier '${name}' has already been declared`); - } - } - - isRedeclaredInScope(scope, name, bindingType) { - if (!(bindingType & BIND_KIND_VALUE)) return false; - - if (bindingType & BIND_SCOPE_LEXICAL) { - return scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; - } - - if (bindingType & BIND_SCOPE_FUNCTION) { - return scope.lexical.indexOf(name) > -1 || !this.treatFunctionsAsVarInScope(scope) && scope.var.indexOf(name) > -1; - } - - return scope.lexical.indexOf(name) > -1 && !(scope.flags & SCOPE_SIMPLE_CATCH && scope.lexical[0] === name) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.indexOf(name) > -1; - } - - checkLocalExport(id) { - if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1 && this.scopeStack[0].functions.indexOf(id.name) === -1) { - this.undefinedExports.set(id.name, id.start); - } - } - - currentScope() { - return this.scopeStack[this.scopeStack.length - 1]; - } - - currentVarScope() { - for (let i = this.scopeStack.length - 1;; i--) { - const scope = this.scopeStack[i]; - - if (scope.flags & SCOPE_VAR) { - return scope; - } - } - } - - currentThisScope() { - for (let i = this.scopeStack.length - 1;; i--) { - const scope = this.scopeStack[i]; - - if ((scope.flags & SCOPE_VAR || scope.flags & SCOPE_CLASS) && !(scope.flags & SCOPE_ARROW)) { - return scope; - } - } - } - -} - -class TypeScriptScope extends Scope { - constructor(...args) { - super(...args); - this.types = []; - this.enums = []; - this.constEnums = []; - this.classes = []; - this.exportOnlyBindings = []; - } - -} - -class TypeScriptScopeHandler extends ScopeHandler { - createScope(flags) { - return new TypeScriptScope(flags); - } - - declareName(name, bindingType, pos) { - const scope = this.currentScope(); - - if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) { - this.maybeExportDefined(scope, name); - scope.exportOnlyBindings.push(name); - return; - } - - super.declareName(...arguments); - - if (bindingType & BIND_KIND_TYPE) { - if (!(bindingType & BIND_KIND_VALUE)) { - this.checkRedeclarationInScope(scope, name, bindingType, pos); - this.maybeExportDefined(scope, name); - } - - scope.types.push(name); - } - - if (bindingType & BIND_FLAGS_TS_ENUM) scope.enums.push(name); - if (bindingType & BIND_FLAGS_TS_CONST_ENUM) scope.constEnums.push(name); - if (bindingType & BIND_FLAGS_CLASS) scope.classes.push(name); - } - - isRedeclaredInScope(scope, name, bindingType) { - if (scope.enums.indexOf(name) > -1) { - if (bindingType & BIND_FLAGS_TS_ENUM) { - const isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM); - const wasConst = scope.constEnums.indexOf(name) > -1; - return isConst !== wasConst; - } - - return true; - } - - if (bindingType & BIND_FLAGS_CLASS && scope.classes.indexOf(name) > -1) { - if (scope.lexical.indexOf(name) > -1) { - return !!(bindingType & BIND_KIND_VALUE); - } else { - return false; - } - } - - if (bindingType & BIND_KIND_TYPE && scope.types.indexOf(name) > -1) { - return true; - } - - return super.isRedeclaredInScope(...arguments); - } - - checkLocalExport(id) { - if (this.scopeStack[0].types.indexOf(id.name) === -1 && this.scopeStack[0].exportOnlyBindings.indexOf(id.name) === -1) { - super.checkLocalExport(id); - } - } - -} - -function nonNull(x) { - if (x == null) { - throw new Error(`Unexpected ${x} value.`); - } - - return x; -} - -function assert(x) { - if (!x) { - throw new Error("Assert fail"); - } -} - -function keywordTypeFromName(value) { - switch (value) { - case "any": - return "TSAnyKeyword"; - - case "boolean": - return "TSBooleanKeyword"; - - case "bigint": - return "TSBigIntKeyword"; - - case "never": - return "TSNeverKeyword"; - - case "number": - return "TSNumberKeyword"; - - case "object": - return "TSObjectKeyword"; - - case "string": - return "TSStringKeyword"; - - case "symbol": - return "TSSymbolKeyword"; - - case "undefined": - return "TSUndefinedKeyword"; - - case "unknown": - return "TSUnknownKeyword"; - - default: - return undefined; - } -} - -var typescript = (superClass => class extends superClass { - getScopeHandler() { - return TypeScriptScopeHandler; - } - - tsIsIdentifier() { - return this.match(types.name); - } - - tsNextTokenCanFollowModifier() { - this.next(); - return !this.hasPrecedingLineBreak() && !this.match(types.parenL) && !this.match(types.parenR) && !this.match(types.colon) && !this.match(types.eq) && !this.match(types.question) && !this.match(types.bang); - } - - tsParseModifier(allowedModifiers) { - if (!this.match(types.name)) { - return undefined; - } - - const modifier = this.state.value; - - if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) { - return modifier; - } - - return undefined; - } - - tsIsListTerminator(kind) { - switch (kind) { - case "EnumMembers": - case "TypeMembers": - return this.match(types.braceR); - - case "HeritageClauseElement": - return this.match(types.braceL); - - case "TupleElementTypes": - return this.match(types.bracketR); - - case "TypeParametersOrArguments": - return this.isRelational(">"); - } - - throw new Error("Unreachable"); - } - - tsParseList(kind, parseElement) { - const result = []; - - while (!this.tsIsListTerminator(kind)) { - result.push(parseElement()); - } - - return result; - } - - tsParseDelimitedList(kind, parseElement) { - return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true)); - } - - tsParseDelimitedListWorker(kind, parseElement, expectSuccess) { - const result = []; - - while (true) { - if (this.tsIsListTerminator(kind)) { - break; - } - - const element = parseElement(); - - if (element == null) { - return undefined; - } - - result.push(element); - - if (this.eat(types.comma)) { - continue; - } - - if (this.tsIsListTerminator(kind)) { - break; - } - - if (expectSuccess) { - this.expect(types.comma); - } - - return undefined; - } - - return result; - } - - tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) { - if (!skipFirstToken) { - if (bracket) { - this.expect(types.bracketL); - } else { - this.expectRelational("<"); - } - } - - const result = this.tsParseDelimitedList(kind, parseElement); - - if (bracket) { - this.expect(types.bracketR); - } else { - this.expectRelational(">"); - } - - return result; - } - - tsParseImportType() { - const node = this.startNode(); - this.expect(types._import); - this.expect(types.parenL); - - if (!this.match(types.string)) { - throw this.unexpected(null, "Argument in a type import must be a string literal"); - } - - node.argument = this.parseExprAtom(); - this.expect(types.parenR); - - if (this.eat(types.dot)) { - node.qualifier = this.tsParseEntityName(true); - } - - if (this.isRelational("<")) { - node.typeParameters = this.tsParseTypeArguments(); - } - - return this.finishNode(node, "TSImportType"); - } - - tsParseEntityName(allowReservedWords) { - let entity = this.parseIdentifier(); - - while (this.eat(types.dot)) { - const node = this.startNodeAtNode(entity); - node.left = entity; - node.right = this.parseIdentifier(allowReservedWords); - entity = this.finishNode(node, "TSQualifiedName"); - } - - return entity; - } - - tsParseTypeReference() { - const node = this.startNode(); - node.typeName = this.tsParseEntityName(false); - - if (!this.hasPrecedingLineBreak() && this.isRelational("<")) { - node.typeParameters = this.tsParseTypeArguments(); - } - - return this.finishNode(node, "TSTypeReference"); - } - - tsParseThisTypePredicate(lhs) { - this.next(); - const node = this.startNodeAtNode(lhs); - node.parameterName = lhs; - node.typeAnnotation = this.tsParseTypeAnnotation(false); - return this.finishNode(node, "TSTypePredicate"); - } - - tsParseThisTypeNode() { - const node = this.startNode(); - this.next(); - return this.finishNode(node, "TSThisType"); - } - - tsParseTypeQuery() { - const node = this.startNode(); - this.expect(types._typeof); - - if (this.match(types._import)) { - node.exprName = this.tsParseImportType(); - } else { - node.exprName = this.tsParseEntityName(true); - } - - return this.finishNode(node, "TSTypeQuery"); - } - - tsParseTypeParameter() { - const node = this.startNode(); - node.name = this.parseIdentifierName(node.start); - node.constraint = this.tsEatThenParseType(types._extends); - node.default = this.tsEatThenParseType(types.eq); - return this.finishNode(node, "TSTypeParameter"); - } - - tsTryParseTypeParameters() { - if (this.isRelational("<")) { - return this.tsParseTypeParameters(); - } - } - - tsParseTypeParameters() { - const node = this.startNode(); - - if (this.isRelational("<") || this.match(types.jsxTagStart)) { - this.next(); - } else { - this.unexpected(); - } - - node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true); - return this.finishNode(node, "TSTypeParameterDeclaration"); - } - - tsTryNextParseConstantContext() { - if (this.lookahead().type === types._const) { - this.next(); - return this.tsParseTypeReference(); - } - - return null; - } - - tsFillSignature(returnToken, signature) { - const returnTokenRequired = returnToken === types.arrow; - signature.typeParameters = this.tsTryParseTypeParameters(); - this.expect(types.parenL); - signature.parameters = this.tsParseBindingListForSignature(); - - if (returnTokenRequired) { - signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken); - } else if (this.match(returnToken)) { - signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken); - } - } - - tsParseBindingListForSignature() { - return this.parseBindingList(types.parenR).map(pattern => { - if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") { - throw this.unexpected(pattern.start, `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${pattern.type}`); - } - - return pattern; - }); - } - - tsParseTypeMemberSemicolon() { - if (!this.eat(types.comma)) { - this.semicolon(); - } - } - - tsParseSignatureMember(kind, node) { - this.tsFillSignature(types.colon, node); - this.tsParseTypeMemberSemicolon(); - return this.finishNode(node, kind); - } - - tsIsUnambiguouslyIndexSignature() { - this.next(); - return this.eat(types.name) && this.match(types.colon); - } - - tsTryParseIndexSignature(node) { - if (!(this.match(types.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) { - return undefined; - } - - this.expect(types.bracketL); - const id = this.parseIdentifier(); - id.typeAnnotation = this.tsParseTypeAnnotation(); - this.resetEndLocation(id); - this.expect(types.bracketR); - node.parameters = [id]; - const type = this.tsTryParseTypeAnnotation(); - if (type) node.typeAnnotation = type; - this.tsParseTypeMemberSemicolon(); - return this.finishNode(node, "TSIndexSignature"); - } - - tsParsePropertyOrMethodSignature(node, readonly) { - if (this.eat(types.question)) node.optional = true; - const nodeAny = node; - - if (!readonly && (this.match(types.parenL) || this.isRelational("<"))) { - const method = nodeAny; - this.tsFillSignature(types.colon, method); - this.tsParseTypeMemberSemicolon(); - return this.finishNode(method, "TSMethodSignature"); - } else { - const property = nodeAny; - if (readonly) property.readonly = true; - const type = this.tsTryParseTypeAnnotation(); - if (type) property.typeAnnotation = type; - this.tsParseTypeMemberSemicolon(); - return this.finishNode(property, "TSPropertySignature"); - } - } - - tsParseTypeMember() { - const node = this.startNode(); - - if (this.match(types.parenL) || this.isRelational("<")) { - return this.tsParseSignatureMember("TSCallSignatureDeclaration", node); - } - - if (this.match(types._new)) { - const id = this.startNode(); - this.next(); - - if (this.match(types.parenL) || this.isRelational("<")) { - return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node); - } else { - node.key = this.createIdentifier(id, "new"); - return this.tsParsePropertyOrMethodSignature(node, false); - } - } - - const readonly = !!this.tsParseModifier(["readonly"]); - const idx = this.tsTryParseIndexSignature(node); - - if (idx) { - if (readonly) node.readonly = true; - return idx; - } - - this.parsePropertyName(node); - return this.tsParsePropertyOrMethodSignature(node, readonly); - } - - tsParseTypeLiteral() { - const node = this.startNode(); - node.members = this.tsParseObjectTypeMembers(); - return this.finishNode(node, "TSTypeLiteral"); - } - - tsParseObjectTypeMembers() { - this.expect(types.braceL); - const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); - this.expect(types.braceR); - return members; - } - - tsIsStartOfMappedType() { - this.next(); - - if (this.eat(types.plusMin)) { - return this.isContextual("readonly"); - } - - if (this.isContextual("readonly")) { - this.next(); - } - - if (!this.match(types.bracketL)) { - return false; - } - - this.next(); - - if (!this.tsIsIdentifier()) { - return false; - } - - this.next(); - return this.match(types._in); - } - - tsParseMappedTypeParameter() { - const node = this.startNode(); - node.name = this.parseIdentifierName(node.start); - node.constraint = this.tsExpectThenParseType(types._in); - return this.finishNode(node, "TSTypeParameter"); - } - - tsParseMappedType() { - const node = this.startNode(); - this.expect(types.braceL); - - if (this.match(types.plusMin)) { - node.readonly = this.state.value; - this.next(); - this.expectContextual("readonly"); - } else if (this.eatContextual("readonly")) { - node.readonly = true; - } - - this.expect(types.bracketL); - node.typeParameter = this.tsParseMappedTypeParameter(); - this.expect(types.bracketR); - - if (this.match(types.plusMin)) { - node.optional = this.state.value; - this.next(); - this.expect(types.question); - } else if (this.eat(types.question)) { - node.optional = true; - } - - node.typeAnnotation = this.tsTryParseType(); - this.semicolon(); - this.expect(types.braceR); - return this.finishNode(node, "TSMappedType"); - } - - tsParseTupleType() { - const node = this.startNode(); - node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false); - let seenOptionalElement = false; - node.elementTypes.forEach(elementNode => { - if (elementNode.type === "TSOptionalType") { - seenOptionalElement = true; - } else if (seenOptionalElement && elementNode.type !== "TSRestType") { - this.raise(elementNode.start, "A required element cannot follow an optional element."); - } - }); - return this.finishNode(node, "TSTupleType"); - } - - tsParseTupleElementType() { - if (this.match(types.ellipsis)) { - const restNode = this.startNode(); - this.next(); - restNode.typeAnnotation = this.tsParseType(); - this.checkCommaAfterRest(); - return this.finishNode(restNode, "TSRestType"); - } - - const type = this.tsParseType(); - - if (this.eat(types.question)) { - const optionalTypeNode = this.startNodeAtNode(type); - optionalTypeNode.typeAnnotation = type; - return this.finishNode(optionalTypeNode, "TSOptionalType"); - } - - return type; - } - - tsParseParenthesizedType() { - const node = this.startNode(); - this.expect(types.parenL); - node.typeAnnotation = this.tsParseType(); - this.expect(types.parenR); - return this.finishNode(node, "TSParenthesizedType"); - } - - tsParseFunctionOrConstructorType(type) { - const node = this.startNode(); - - if (type === "TSConstructorType") { - this.expect(types._new); - } - - this.tsFillSignature(types.arrow, node); - return this.finishNode(node, type); - } - - tsParseLiteralTypeNode() { - const node = this.startNode(); - - node.literal = (() => { - switch (this.state.type) { - case types.num: - case types.string: - case types._true: - case types._false: - return this.parseExprAtom(); - - default: - throw this.unexpected(); - } - })(); - - return this.finishNode(node, "TSLiteralType"); - } - - tsParseTemplateLiteralType() { - const node = this.startNode(); - const templateNode = this.parseTemplate(false); - - if (templateNode.expressions.length > 0) { - throw this.raise(templateNode.expressions[0].start, "Template literal types cannot have any substitution"); - } - - node.literal = templateNode; - return this.finishNode(node, "TSLiteralType"); - } - - tsParseNonArrayType() { - switch (this.state.type) { - case types.name: - case types._void: - case types._null: - { - const type = this.match(types._void) ? "TSVoidKeyword" : this.match(types._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value); - - if (type !== undefined && this.lookahead().type !== types.dot) { - const node = this.startNode(); - this.next(); - return this.finishNode(node, type); - } - - return this.tsParseTypeReference(); - } - - case types.string: - case types.num: - case types._true: - case types._false: - return this.tsParseLiteralTypeNode(); - - case types.plusMin: - if (this.state.value === "-") { - const node = this.startNode(); - - if (this.lookahead().type !== types.num) { - throw this.unexpected(); - } - - node.literal = this.parseMaybeUnary(); - return this.finishNode(node, "TSLiteralType"); - } - - break; - - case types._this: - { - const thisKeyword = this.tsParseThisTypeNode(); - - if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { - return this.tsParseThisTypePredicate(thisKeyword); - } else { - return thisKeyword; - } - } - - case types._typeof: - return this.tsParseTypeQuery(); - - case types._import: - return this.tsParseImportType(); - - case types.braceL: - return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral(); - - case types.bracketL: - return this.tsParseTupleType(); - - case types.parenL: - return this.tsParseParenthesizedType(); - - case types.backQuote: - return this.tsParseTemplateLiteralType(); - } - - throw this.unexpected(); - } - - tsParseArrayTypeOrHigher() { - let type = this.tsParseNonArrayType(); - - while (!this.hasPrecedingLineBreak() && this.eat(types.bracketL)) { - if (this.match(types.bracketR)) { - const node = this.startNodeAtNode(type); - node.elementType = type; - this.expect(types.bracketR); - type = this.finishNode(node, "TSArrayType"); - } else { - const node = this.startNodeAtNode(type); - node.objectType = type; - node.indexType = this.tsParseType(); - this.expect(types.bracketR); - type = this.finishNode(node, "TSIndexedAccessType"); - } - } - - return type; - } - - tsParseTypeOperator(operator) { - const node = this.startNode(); - this.expectContextual(operator); - node.operator = operator; - node.typeAnnotation = this.tsParseTypeOperatorOrHigher(); - - if (operator === "readonly") { - this.tsCheckTypeAnnotationForReadOnly(node); - } - - return this.finishNode(node, "TSTypeOperator"); - } - - tsCheckTypeAnnotationForReadOnly(node) { - switch (node.typeAnnotation.type) { - case "TSTupleType": - case "TSArrayType": - return; - - default: - this.raise(node.start, "'readonly' type modifier is only permitted on array and tuple literal types."); - } - } - - tsParseInferType() { - const node = this.startNode(); - this.expectContextual("infer"); - const typeParameter = this.startNode(); - typeParameter.name = this.parseIdentifierName(typeParameter.start); - node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter"); - return this.finishNode(node, "TSInferType"); - } - - tsParseTypeOperatorOrHigher() { - const operator = ["keyof", "unique", "readonly"].find(kw => this.isContextual(kw)); - return operator ? this.tsParseTypeOperator(operator) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher(); - } - - tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) { - this.eat(operator); - let type = parseConstituentType(); - - if (this.match(operator)) { - const types = [type]; - - while (this.eat(operator)) { - types.push(parseConstituentType()); - } - - const node = this.startNodeAtNode(type); - node.types = types; - type = this.finishNode(node, kind); - } - - return type; - } - - tsParseIntersectionTypeOrHigher() { - return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types.bitwiseAND); - } - - tsParseUnionTypeOrHigher() { - return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types.bitwiseOR); - } - - tsIsStartOfFunctionType() { - if (this.isRelational("<")) { - return true; - } - - return this.match(types.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); - } - - tsSkipParameterStart() { - if (this.match(types.name) || this.match(types._this)) { - this.next(); - return true; - } - - if (this.match(types.braceL)) { - let braceStackCounter = 1; - this.next(); - - while (braceStackCounter > 0) { - if (this.match(types.braceL)) { - ++braceStackCounter; - } else if (this.match(types.braceR)) { - --braceStackCounter; - } - - this.next(); - } - - return true; - } - - if (this.match(types.bracketL)) { - let braceStackCounter = 1; - this.next(); - - while (braceStackCounter > 0) { - if (this.match(types.bracketL)) { - ++braceStackCounter; - } else if (this.match(types.bracketR)) { - --braceStackCounter; - } - - this.next(); - } - - return true; - } - - return false; - } - - tsIsUnambiguouslyStartOfFunctionType() { - this.next(); - - if (this.match(types.parenR) || this.match(types.ellipsis)) { - return true; - } - - if (this.tsSkipParameterStart()) { - if (this.match(types.colon) || this.match(types.comma) || this.match(types.question) || this.match(types.eq)) { - return true; - } - - if (this.match(types.parenR)) { - this.next(); - - if (this.match(types.arrow)) { - return true; - } - } - } - - return false; - } - - tsParseTypeOrTypePredicateAnnotation(returnToken) { - return this.tsInType(() => { - const t = this.startNode(); - this.expect(returnToken); - const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this)); - - if (!typePredicateVariable) { - return this.tsParseTypeAnnotation(false, t); - } - - const type = this.tsParseTypeAnnotation(false); - const node = this.startNodeAtNode(typePredicateVariable); - node.parameterName = typePredicateVariable; - node.typeAnnotation = type; - t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); - return this.finishNode(t, "TSTypeAnnotation"); - }); - } - - tsTryParseTypeOrTypePredicateAnnotation() { - return this.match(types.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types.colon) : undefined; - } - - tsTryParseTypeAnnotation() { - return this.match(types.colon) ? this.tsParseTypeAnnotation() : undefined; - } - - tsTryParseType() { - return this.tsEatThenParseType(types.colon); - } - - tsParseTypePredicatePrefix() { - const id = this.parseIdentifier(); - - if (this.isContextual("is") && !this.hasPrecedingLineBreak()) { - this.next(); - return id; - } - } - - tsParseTypeAnnotation(eatColon = true, t = this.startNode()) { - this.tsInType(() => { - if (eatColon) this.expect(types.colon); - t.typeAnnotation = this.tsParseType(); - }); - return this.finishNode(t, "TSTypeAnnotation"); - } - - tsParseType() { - assert(this.state.inType); - const type = this.tsParseNonConditionalType(); - - if (this.hasPrecedingLineBreak() || !this.eat(types._extends)) { - return type; - } - - const node = this.startNodeAtNode(type); - node.checkType = type; - node.extendsType = this.tsParseNonConditionalType(); - this.expect(types.question); - node.trueType = this.tsParseType(); - this.expect(types.colon); - node.falseType = this.tsParseType(); - return this.finishNode(node, "TSConditionalType"); - } - - tsParseNonConditionalType() { - if (this.tsIsStartOfFunctionType()) { - return this.tsParseFunctionOrConstructorType("TSFunctionType"); - } - - if (this.match(types._new)) { - return this.tsParseFunctionOrConstructorType("TSConstructorType"); - } - - return this.tsParseUnionTypeOrHigher(); - } - - tsParseTypeAssertion() { - const node = this.startNode(); - - const _const = this.tsTryNextParseConstantContext(); - - node.typeAnnotation = _const || this.tsNextThenParseType(); - this.expectRelational(">"); - node.expression = this.parseMaybeUnary(); - return this.finishNode(node, "TSTypeAssertion"); - } - - tsParseHeritageClause(descriptor) { - const originalStart = this.state.start; - const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this)); - - if (!delimitedList.length) { - this.raise(originalStart, `'${descriptor}' list cannot be empty.`); - } - - return delimitedList; - } - - tsParseExpressionWithTypeArguments() { - const node = this.startNode(); - node.expression = this.tsParseEntityName(false); - - if (this.isRelational("<")) { - node.typeParameters = this.tsParseTypeArguments(); - } - - return this.finishNode(node, "TSExpressionWithTypeArguments"); - } - - tsParseInterfaceDeclaration(node) { - node.id = this.parseIdentifier(); - this.checkLVal(node.id, BIND_TS_INTERFACE, undefined, "typescript interface declaration"); - node.typeParameters = this.tsTryParseTypeParameters(); - - if (this.eat(types._extends)) { - node.extends = this.tsParseHeritageClause("extends"); - } - - const body = this.startNode(); - body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)); - node.body = this.finishNode(body, "TSInterfaceBody"); - return this.finishNode(node, "TSInterfaceDeclaration"); - } - - tsParseTypeAliasDeclaration(node) { - node.id = this.parseIdentifier(); - this.checkLVal(node.id, BIND_TS_TYPE, undefined, "typescript type alias"); - node.typeParameters = this.tsTryParseTypeParameters(); - node.typeAnnotation = this.tsExpectThenParseType(types.eq); - this.semicolon(); - return this.finishNode(node, "TSTypeAliasDeclaration"); - } - - tsInNoContext(cb) { - const oldContext = this.state.context; - this.state.context = [oldContext[0]]; - - try { - return cb(); - } finally { - this.state.context = oldContext; - } - } - - tsInType(cb) { - const oldInType = this.state.inType; - this.state.inType = true; - - try { - return cb(); - } finally { - this.state.inType = oldInType; - } - } - - tsEatThenParseType(token) { - return !this.match(token) ? undefined : this.tsNextThenParseType(); - } - - tsExpectThenParseType(token) { - return this.tsDoThenParseType(() => this.expect(token)); - } - - tsNextThenParseType() { - return this.tsDoThenParseType(() => this.next()); - } - - tsDoThenParseType(cb) { - return this.tsInType(() => { - cb(); - return this.tsParseType(); - }); - } - - tsParseEnumMember() { - const node = this.startNode(); - node.id = this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true); - - if (this.eat(types.eq)) { - node.initializer = this.parseMaybeAssign(); - } - - return this.finishNode(node, "TSEnumMember"); - } - - tsParseEnumDeclaration(node, isConst) { - if (isConst) node.const = true; - node.id = this.parseIdentifier(); - this.checkLVal(node.id, isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM, undefined, "typescript enum declaration"); - this.expect(types.braceL); - node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); - this.expect(types.braceR); - return this.finishNode(node, "TSEnumDeclaration"); - } - - tsParseModuleBlock() { - const node = this.startNode(); - this.scope.enter(SCOPE_OTHER); - this.expect(types.braceL); - this.parseBlockOrModuleBlockBody(node.body = [], undefined, true, types.braceR); - this.scope.exit(); - return this.finishNode(node, "TSModuleBlock"); - } - - tsParseModuleOrNamespaceDeclaration(node, nested = false) { - node.id = this.parseIdentifier(); - - if (!nested) { - this.checkLVal(node.id, BIND_TS_NAMESPACE, null, "module or namespace declaration"); - } - - if (this.eat(types.dot)) { - const inner = this.startNode(); - this.tsParseModuleOrNamespaceDeclaration(inner, true); - node.body = inner; - } else { - node.body = this.tsParseModuleBlock(); - } - - return this.finishNode(node, "TSModuleDeclaration"); - } - - tsParseAmbientExternalModuleDeclaration(node) { - if (this.isContextual("global")) { - node.global = true; - node.id = this.parseIdentifier(); - } else if (this.match(types.string)) { - node.id = this.parseExprAtom(); - } else { - this.unexpected(); - } - - if (this.match(types.braceL)) { - node.body = this.tsParseModuleBlock(); - } else { - this.semicolon(); - } - - return this.finishNode(node, "TSModuleDeclaration"); - } - - tsParseImportEqualsDeclaration(node, isExport) { - node.isExport = isExport || false; - node.id = this.parseIdentifier(); - this.expect(types.eq); - node.moduleReference = this.tsParseModuleReference(); - this.semicolon(); - return this.finishNode(node, "TSImportEqualsDeclaration"); - } - - tsIsExternalModuleReference() { - return this.isContextual("require") && this.lookahead().type === types.parenL; - } - - tsParseModuleReference() { - return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false); - } - - tsParseExternalModuleReference() { - const node = this.startNode(); - this.expectContextual("require"); - this.expect(types.parenL); - - if (!this.match(types.string)) { - throw this.unexpected(); - } - - node.expression = this.parseExprAtom(); - this.expect(types.parenR); - return this.finishNode(node, "TSExternalModuleReference"); - } - - tsLookAhead(f) { - const state = this.state.clone(); - const res = f(); - this.state = state; - return res; - } - - tsTryParseAndCatch(f) { - const state = this.state.clone(); - - try { - return f(); - } catch (e) { - if (e instanceof SyntaxError) { - this.state = state; - return undefined; - } - - throw e; - } - } - - tsTryParse(f) { - const state = this.state.clone(); - const result = f(); - - if (result !== undefined && result !== false) { - return result; - } else { - this.state = state; - return undefined; - } - } - - tsTryParseDeclare(nany) { - if (this.isLineTerminator()) { - return; - } - - let starttype = this.state.type; - let kind; - - if (this.isContextual("let")) { - starttype = types._var; - kind = "let"; - } - - switch (starttype) { - case types._function: - return this.parseFunctionStatement(nany, false, true); - - case types._class: - return this.parseClass(nany, true, false); - - case types._const: - if (this.match(types._const) && this.isLookaheadContextual("enum")) { - this.expect(types._const); - this.expectContextual("enum"); - return this.tsParseEnumDeclaration(nany, true); - } - - case types._var: - kind = kind || this.state.value; - return this.parseVarStatement(nany, kind); - - case types.name: - { - const value = this.state.value; - - if (value === "global") { - return this.tsParseAmbientExternalModuleDeclaration(nany); - } else { - return this.tsParseDeclaration(nany, value, true); - } - } - } - } - - tsTryParseExportDeclaration() { - return this.tsParseDeclaration(this.startNode(), this.state.value, true); - } - - tsParseExpressionStatement(node, expr) { - switch (expr.name) { - case "declare": - { - const declaration = this.tsTryParseDeclare(node); - - if (declaration) { - declaration.declare = true; - return declaration; - } - - break; - } - - case "global": - if (this.match(types.braceL)) { - const mod = node; - mod.global = true; - mod.id = expr; - mod.body = this.tsParseModuleBlock(); - return this.finishNode(mod, "TSModuleDeclaration"); - } - - break; - - default: - return this.tsParseDeclaration(node, expr.name, false); - } - } - - tsParseDeclaration(node, value, next) { - switch (value) { - case "abstract": - if (this.tsCheckLineTerminatorAndMatch(types._class, next)) { - const cls = node; - cls.abstract = true; - - if (next) { - this.next(); - - if (!this.match(types._class)) { - this.unexpected(null, types._class); - } - } - - return this.parseClass(cls, true, false); - } - - break; - - case "enum": - if (next || this.match(types.name)) { - if (next) this.next(); - return this.tsParseEnumDeclaration(node, false); - } - - break; - - case "interface": - if (this.tsCheckLineTerminatorAndMatch(types.name, next)) { - if (next) this.next(); - return this.tsParseInterfaceDeclaration(node); - } - - break; - - case "module": - if (next) this.next(); - - if (this.match(types.string)) { - return this.tsParseAmbientExternalModuleDeclaration(node); - } else if (this.tsCheckLineTerminatorAndMatch(types.name, next)) { - return this.tsParseModuleOrNamespaceDeclaration(node); - } - - break; - - case "namespace": - if (this.tsCheckLineTerminatorAndMatch(types.name, next)) { - if (next) this.next(); - return this.tsParseModuleOrNamespaceDeclaration(node); - } - - break; - - case "type": - if (this.tsCheckLineTerminatorAndMatch(types.name, next)) { - if (next) this.next(); - return this.tsParseTypeAliasDeclaration(node); - } - - break; - } - } - - tsCheckLineTerminatorAndMatch(tokenType, next) { - return (next || this.match(tokenType)) && !this.isLineTerminator(); - } - - tsTryParseGenericAsyncArrowFunction(startPos, startLoc) { - if (!this.isRelational("<")) { - return undefined; - } - - const res = this.tsTryParseAndCatch(() => { - const node = this.startNodeAt(startPos, startLoc); - node.typeParameters = this.tsParseTypeParameters(); - super.parseFunctionParams(node); - node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation(); - this.expect(types.arrow); - return node; - }); - - if (!res) { - return undefined; - } - - return this.parseArrowExpression(res, null, true); - } - - tsParseTypeArguments() { - const node = this.startNode(); - node.params = this.tsInType(() => this.tsInNoContext(() => { - this.expectRelational("<"); - return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this)); - })); - this.state.exprAllowed = false; - this.expectRelational(">"); - return this.finishNode(node, "TSTypeParameterInstantiation"); - } - - tsIsDeclarationStart() { - if (this.match(types.name)) { - switch (this.state.value) { - case "abstract": - case "declare": - case "enum": - case "interface": - case "module": - case "namespace": - case "type": - return true; - } - } - - return false; - } - - isExportDefaultSpecifier() { - if (this.tsIsDeclarationStart()) return false; - return super.isExportDefaultSpecifier(); - } - - parseAssignableListItem(allowModifiers, decorators) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - let accessibility; - let readonly = false; - - if (allowModifiers) { - accessibility = this.parseAccessModifier(); - readonly = !!this.tsParseModifier(["readonly"]); - } - - const left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left); - const elt = this.parseMaybeDefault(left.start, left.loc.start, left); - - if (accessibility || readonly) { - const pp = this.startNodeAt(startPos, startLoc); - - if (decorators.length) { - pp.decorators = decorators; - } - - if (accessibility) pp.accessibility = accessibility; - if (readonly) pp.readonly = readonly; - - if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") { - throw this.raise(pp.start, "A parameter property may not be declared using a binding pattern."); - } - - pp.parameter = elt; - return this.finishNode(pp, "TSParameterProperty"); - } - - if (decorators.length) { - left.decorators = decorators; - } - - return elt; - } - - parseFunctionBodyAndFinish(node, type, isMethod = false) { - if (this.match(types.colon)) { - node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon); - } - - const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : undefined; - - if (bodilessType && !this.match(types.braceL) && this.isLineTerminator()) { - this.finishNode(node, bodilessType); - return; - } - - super.parseFunctionBodyAndFinish(node, type, isMethod); - } - - checkFunctionStatementId(node) { - if (!node.body && node.id) { - this.checkLVal(node.id, BIND_TS_FN_TYPE, null, "function name"); - } else { - super.checkFunctionStatementId(...arguments); - } - } - - parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow) { - if (!this.hasPrecedingLineBreak() && this.match(types.bang)) { - this.state.exprAllowed = false; - this.next(); - const nonNullExpression = this.startNodeAt(startPos, startLoc); - nonNullExpression.expression = base; - return this.finishNode(nonNullExpression, "TSNonNullExpression"); - } - - if (this.isRelational("<")) { - const result = this.tsTryParseAndCatch(() => { - if (!noCalls && this.atPossibleAsync(base)) { - const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc); - - if (asyncArrowFn) { - return asyncArrowFn; - } - } - - const node = this.startNodeAt(startPos, startLoc); - node.callee = base; - const typeArguments = this.tsParseTypeArguments(); - - if (typeArguments) { - if (!noCalls && this.eat(types.parenL)) { - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - node.typeParameters = typeArguments; - return this.finishCallExpression(node); - } else if (this.match(types.backQuote)) { - return this.parseTaggedTemplateExpression(startPos, startLoc, base, state, typeArguments); - } - } - - this.unexpected(); - }); - if (result) return result; - } - - return super.parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow); - } - - parseNewArguments(node) { - if (this.isRelational("<")) { - const typeParameters = this.tsTryParseAndCatch(() => { - const args = this.tsParseTypeArguments(); - if (!this.match(types.parenL)) this.unexpected(); - return args; - }); - - if (typeParameters) { - node.typeParameters = typeParameters; - } - } - - super.parseNewArguments(node); - } - - parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) { - if (nonNull(types._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual("as")) { - const node = this.startNodeAt(leftStartPos, leftStartLoc); - node.expression = left; - - const _const = this.tsTryNextParseConstantContext(); - - if (_const) { - node.typeAnnotation = _const; - } else { - node.typeAnnotation = this.tsNextThenParseType(); - } - - this.finishNode(node, "TSAsExpression"); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); - } - - return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn); - } - - checkReservedWord(word, startLoc, checkKeywords, isBinding) {} - - checkDuplicateExports() {} - - parseImport(node) { - if (this.match(types.name) && this.lookahead().type === types.eq) { - return this.tsParseImportEqualsDeclaration(node); - } - - return super.parseImport(node); - } - - parseExport(node) { - if (this.match(types._import)) { - this.expect(types._import); - return this.tsParseImportEqualsDeclaration(node, true); - } else if (this.eat(types.eq)) { - const assign = node; - assign.expression = this.parseExpression(); - this.semicolon(); - return this.finishNode(assign, "TSExportAssignment"); - } else if (this.eatContextual("as")) { - const decl = node; - this.expectContextual("namespace"); - decl.id = this.parseIdentifier(); - this.semicolon(); - return this.finishNode(decl, "TSNamespaceExportDeclaration"); - } else { - return super.parseExport(node); - } - } - - isAbstractClass() { - return this.isContextual("abstract") && this.lookahead().type === types._class; - } - - parseExportDefaultExpression() { - if (this.isAbstractClass()) { - const cls = this.startNode(); - this.next(); - this.parseClass(cls, true, true); - cls.abstract = true; - return cls; - } - - if (this.state.value === "interface") { - const result = this.tsParseDeclaration(this.startNode(), this.state.value, true); - if (result) return result; - } - - return super.parseExportDefaultExpression(); - } - - parseStatementContent(context, topLevel) { - if (this.state.type === types._const) { - const ahead = this.lookahead(); - - if (ahead.type === types.name && ahead.value === "enum") { - const node = this.startNode(); - this.expect(types._const); - this.expectContextual("enum"); - return this.tsParseEnumDeclaration(node, true); - } - } - - return super.parseStatementContent(context, topLevel); - } - - parseAccessModifier() { - return this.tsParseModifier(["public", "protected", "private"]); - } - - parseClassMember(classBody, member, state, constructorAllowsSuper) { - const accessibility = this.parseAccessModifier(); - if (accessibility) member.accessibility = accessibility; - super.parseClassMember(classBody, member, state, constructorAllowsSuper); - } - - parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper) { - const methodOrProp = member; - const prop = member; - const propOrIdx = member; - let abstract = false, - readonly = false; - const mod = this.tsParseModifier(["abstract", "readonly"]); - - switch (mod) { - case "readonly": - readonly = true; - abstract = !!this.tsParseModifier(["abstract"]); - break; - - case "abstract": - abstract = true; - readonly = !!this.tsParseModifier(["readonly"]); - break; - } - - if (abstract) methodOrProp.abstract = true; - if (readonly) propOrIdx.readonly = true; - - if (!abstract && !isStatic && !methodOrProp.accessibility) { - const idx = this.tsTryParseIndexSignature(member); - - if (idx) { - classBody.body.push(idx); - return; - } - } - - if (readonly) { - methodOrProp.static = isStatic; - this.parseClassPropertyName(prop); - this.parsePostMemberNameModifiers(methodOrProp); - this.pushClassProperty(classBody, prop); - return; - } - - super.parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper); - } - - parsePostMemberNameModifiers(methodOrProp) { - const optional = this.eat(types.question); - if (optional) methodOrProp.optional = true; - } - - parseExpressionStatement(node, expr) { - const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : undefined; - return decl || super.parseExpressionStatement(node, expr); - } - - shouldParseExportDeclaration() { - if (this.tsIsDeclarationStart()) return true; - return super.shouldParseExportDeclaration(); - } - - parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { - if (!refNeedsArrowPos || !this.match(types.question)) { - return super.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos); - } - - const state = this.state.clone(); - - try { - return super.parseConditional(expr, noIn, startPos, startLoc); - } catch (err) { - if (!(err instanceof SyntaxError)) { - throw err; - } - - this.state = state; - refNeedsArrowPos.start = err.pos || this.state.start; - return expr; - } - } - - parseParenItem(node, startPos, startLoc) { - node = super.parseParenItem(node, startPos, startLoc); - - if (this.eat(types.question)) { - node.optional = true; - this.resetEndLocation(node); - } - - if (this.match(types.colon)) { - const typeCastNode = this.startNodeAt(startPos, startLoc); - typeCastNode.expression = node; - typeCastNode.typeAnnotation = this.tsParseTypeAnnotation(); - return this.finishNode(typeCastNode, "TSTypeCastExpression"); - } - - return node; - } - - parseExportDeclaration(node) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - const isDeclare = this.eatContextual("declare"); - let declaration; - - if (this.match(types.name)) { - declaration = this.tsTryParseExportDeclaration(); - } - - if (!declaration) { - declaration = super.parseExportDeclaration(node); - } - - if (declaration && isDeclare) { - this.resetStartLocation(declaration, startPos, startLoc); - declaration.declare = true; - } - - return declaration; - } - - parseClassId(node, isStatement, optionalId) { - if ((!isStatement || optionalId) && this.isContextual("implements")) { - return; - } - - super.parseClassId(...arguments); - const typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) node.typeParameters = typeParameters; - } - - parseClassProperty(node) { - if (!node.optional && this.eat(types.bang)) { - node.definite = true; - } - - const type = this.tsTryParseTypeAnnotation(); - if (type) node.typeAnnotation = type; - return super.parseClassProperty(node); - } - - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { - const typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) method.typeParameters = typeParameters; - super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); - } - - pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - const typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) method.typeParameters = typeParameters; - super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); - } - - parseClassSuper(node) { - super.parseClassSuper(node); - - if (node.superClass && this.isRelational("<")) { - node.superTypeParameters = this.tsParseTypeArguments(); - } - - if (this.eatContextual("implements")) { - node.implements = this.tsParseHeritageClause("implements"); - } - } - - parseObjPropValue(prop, ...args) { - const typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) prop.typeParameters = typeParameters; - super.parseObjPropValue(prop, ...args); - } - - parseFunctionParams(node, allowModifiers) { - const typeParameters = this.tsTryParseTypeParameters(); - if (typeParameters) node.typeParameters = typeParameters; - super.parseFunctionParams(node, allowModifiers); - } - - parseVarId(decl, kind) { - super.parseVarId(decl, kind); - - if (decl.id.type === "Identifier" && this.eat(types.bang)) { - decl.definite = true; - } - - const type = this.tsTryParseTypeAnnotation(); - - if (type) { - decl.id.typeAnnotation = type; - this.resetEndLocation(decl.id); - } - } - - parseAsyncArrowFromCallExpression(node, call) { - if (this.match(types.colon)) { - node.returnType = this.tsParseTypeAnnotation(); - } - - return super.parseAsyncArrowFromCallExpression(node, call); - } - - parseMaybeAssign(...args) { - let jsxError; - - if (this.match(types.jsxTagStart)) { - const context = this.curContext(); - assert(context === types$1.j_oTag); - assert(this.state.context[this.state.context.length - 2] === types$1.j_expr); - const state = this.state.clone(); - - try { - return super.parseMaybeAssign(...args); - } catch (err) { - if (!(err instanceof SyntaxError)) { - throw err; - } - - this.state = state; - assert(this.curContext() === types$1.j_oTag); - this.state.context.pop(); - assert(this.curContext() === types$1.j_expr); - this.state.context.pop(); - jsxError = err; - } - } - - if (jsxError === undefined && !this.isRelational("<")) { - return super.parseMaybeAssign(...args); - } - - let arrowExpression; - let typeParameters; - const state = this.state.clone(); - - try { - typeParameters = this.tsParseTypeParameters(); - arrowExpression = super.parseMaybeAssign(...args); - - if (arrowExpression.type !== "ArrowFunctionExpression" || arrowExpression.extra && arrowExpression.extra.parenthesized) { - this.unexpected(); - } - } catch (err) { - if (!(err instanceof SyntaxError)) { - throw err; - } - - if (jsxError) { - throw jsxError; - } - - assert(!this.hasPlugin("jsx")); - this.state = state; - return super.parseMaybeAssign(...args); - } - - if (typeParameters && typeParameters.params.length !== 0) { - this.resetStartLocationFromNode(arrowExpression, typeParameters); - } - - arrowExpression.typeParameters = typeParameters; - return arrowExpression; - } - - parseMaybeUnary(refShorthandDefaultPos) { - if (!this.hasPlugin("jsx") && this.isRelational("<")) { - return this.tsParseTypeAssertion(); - } else { - return super.parseMaybeUnary(refShorthandDefaultPos); - } - } - - parseArrow(node) { - if (this.match(types.colon)) { - const state = this.state.clone(); - - try { - const returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon); - - if (this.canInsertSemicolon() || !this.match(types.arrow)) { - this.state = state; - return undefined; - } - - node.returnType = returnType; - } catch (err) { - if (err instanceof SyntaxError) { - this.state = state; - } else { - throw err; - } - } - } - - return super.parseArrow(node); - } - - parseAssignableListItemTypes(param) { - if (this.eat(types.question)) { - if (param.type !== "Identifier") { - throw this.raise(param.start, "A binding pattern parameter cannot be optional in an implementation signature."); - } - - param.optional = true; - } - - const type = this.tsTryParseTypeAnnotation(); - if (type) param.typeAnnotation = type; - this.resetEndLocation(param); - return param; - } - - toAssignable(node, isBinding, contextDescription) { - switch (node.type) { - case "TSTypeCastExpression": - return super.toAssignable(this.typeCastToParameter(node), isBinding, contextDescription); - - case "TSParameterProperty": - return super.toAssignable(node, isBinding, contextDescription); - - case "TSAsExpression": - case "TSNonNullExpression": - case "TSTypeAssertion": - node.expression = this.toAssignable(node.expression, isBinding, contextDescription); - return node; - - default: - return super.toAssignable(node, isBinding, contextDescription); - } - } - - checkLVal(expr, bindingType = BIND_NONE, checkClashes, contextDescription) { - switch (expr.type) { - case "TSTypeCastExpression": - return; - - case "TSParameterProperty": - this.checkLVal(expr.parameter, bindingType, checkClashes, "parameter property"); - return; - - case "TSAsExpression": - case "TSNonNullExpression": - case "TSTypeAssertion": - this.checkLVal(expr.expression, bindingType, checkClashes, contextDescription); - return; - - default: - super.checkLVal(expr, bindingType, checkClashes, contextDescription); - return; - } - } - - parseBindingAtom() { - switch (this.state.type) { - case types._this: - return this.parseIdentifier(true); - - default: - return super.parseBindingAtom(); - } - } - - parseMaybeDecoratorArguments(expr) { - if (this.isRelational("<")) { - const typeArguments = this.tsParseTypeArguments(); - - if (this.match(types.parenL)) { - const call = super.parseMaybeDecoratorArguments(expr); - call.typeParameters = typeArguments; - return call; - } - - this.unexpected(this.state.start, types.parenL); - } - - return super.parseMaybeDecoratorArguments(expr); - } - - isClassMethod() { - return this.isRelational("<") || super.isClassMethod(); - } - - isClassProperty() { - return this.match(types.bang) || this.match(types.colon) || super.isClassProperty(); - } - - parseMaybeDefault(...args) { - const node = super.parseMaybeDefault(...args); - - if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { - this.raise(node.typeAnnotation.start, "Type annotations must come before default assignments, " + "e.g. instead of `age = 25: number` use `age: number = 25`"); - } - - return node; - } - - getTokenFromCode(code) { - if (this.state.inType && (code === 62 || code === 60)) { - return this.finishOp(types.relational, 1); - } else { - return super.getTokenFromCode(code); - } - } - - toAssignableList(exprList, isBinding, contextDescription) { - for (let i = 0; i < exprList.length; i++) { - const expr = exprList[i]; - if (!expr) continue; - - switch (expr.type) { - case "TSTypeCastExpression": - exprList[i] = this.typeCastToParameter(expr); - break; - - case "TSAsExpression": - case "TSTypeAssertion": - this.raise(expr.start, "Unexpected type cast in parameter position."); - break; - } - } - - return super.toAssignableList(exprList, isBinding, contextDescription); - } - - typeCastToParameter(node) { - node.expression.typeAnnotation = node.typeAnnotation; - this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end); - return node.expression; - } - - toReferencedList(exprList, isInParens) { - for (let i = 0; i < exprList.length; i++) { - const expr = exprList[i]; - - if (expr && expr._exprListItem && expr.type === "TsTypeCastExpression") { - this.raise(expr.start, "Did not expect a type annotation here."); - } - } - - return exprList; - } - - shouldParseArrow() { - return this.match(types.colon) || super.shouldParseArrow(); - } - - shouldParseAsyncArrow() { - return this.match(types.colon) || super.shouldParseAsyncArrow(); - } - - canHaveLeadingDecorator() { - return super.canHaveLeadingDecorator() || this.isAbstractClass(); - } - - jsxParseOpeningElementAfterName(node) { - if (this.isRelational("<")) { - const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArguments()); - if (typeArguments) node.typeParameters = typeArguments; - } - - return super.jsxParseOpeningElementAfterName(node); - } - - getGetterSetterExpectedParamCount(method) { - const baseCount = super.getGetterSetterExpectedParamCount(method); - const firstParam = method.params[0]; - const hasContextParam = firstParam && firstParam.type === "Identifier" && firstParam.name === "this"; - return hasContextParam ? baseCount + 1 : baseCount; - } - -}); - -types.placeholder = new TokenType("%%", { - startsExpr: true -}); -var placeholders = (superClass => class extends superClass { - parsePlaceholder(expectedNode) { - if (this.match(types.placeholder)) { - const node = this.startNode(); - this.next(); - this.assertNoSpace("Unexpected space in placeholder."); - node.name = super.parseIdentifier(true); - this.assertNoSpace("Unexpected space in placeholder."); - this.expect(types.placeholder); - return this.finishPlaceholder(node, expectedNode); - } - } - - finishPlaceholder(node, expectedNode) { - const isFinished = !!(node.expectedNode && node.type === "Placeholder"); - node.expectedNode = expectedNode; - return isFinished ? node : this.finishNode(node, "Placeholder"); - } - - getTokenFromCode(code) { - if (code === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) { - return this.finishOp(types.placeholder, 2); - } - - return super.getTokenFromCode(...arguments); - } - - parseExprAtom() { - return this.parsePlaceholder("Expression") || super.parseExprAtom(...arguments); - } - - parseIdentifier() { - return this.parsePlaceholder("Identifier") || super.parseIdentifier(...arguments); - } - - checkReservedWord(word) { - if (word !== undefined) super.checkReservedWord(...arguments); - } - - parseBindingAtom() { - return this.parsePlaceholder("Pattern") || super.parseBindingAtom(...arguments); - } - - checkLVal(expr) { - if (expr.type !== "Placeholder") super.checkLVal(...arguments); - } - - toAssignable(node) { - if (node && node.type === "Placeholder" && node.expectedNode === "Expression") { - node.expectedNode = "Pattern"; - return node; - } - - return super.toAssignable(...arguments); - } - - verifyBreakContinue(node) { - if (node.label && node.label.type === "Placeholder") return; - super.verifyBreakContinue(...arguments); - } - - parseExpressionStatement(node, expr) { - if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) { - return super.parseExpressionStatement(...arguments); - } - - if (this.match(types.colon)) { - const stmt = node; - stmt.label = this.finishPlaceholder(expr, "Identifier"); - this.next(); - stmt.body = this.parseStatement("label"); - return this.finishNode(stmt, "LabeledStatement"); - } - - this.semicolon(); - node.name = expr.name; - return this.finishPlaceholder(node, "Statement"); - } - - parseBlock() { - return this.parsePlaceholder("BlockStatement") || super.parseBlock(...arguments); - } - - parseFunctionId() { - return this.parsePlaceholder("Identifier") || super.parseFunctionId(...arguments); - } - - parseClass(node, isStatement, optionalId) { - const type = isStatement ? "ClassDeclaration" : "ClassExpression"; - this.next(); - this.takeDecorators(node); - const placeholder = this.parsePlaceholder("Identifier"); - - if (placeholder) { - if (this.match(types._extends) || this.match(types.placeholder) || this.match(types.braceL)) { - node.id = placeholder; - } else if (optionalId || !isStatement) { - node.id = null; - node.body = this.finishPlaceholder(placeholder, "ClassBody"); - return this.finishNode(node, type); - } else { - this.unexpected(null, "A class name is required"); - } - } else { - this.parseClassId(node, isStatement, optionalId); - } - - this.parseClassSuper(node); - node.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!node.superClass); - return this.finishNode(node, type); - } - - parseExport(node) { - const placeholder = this.parsePlaceholder("Identifier"); - if (!placeholder) return super.parseExport(...arguments); - - if (!this.isContextual("from") && !this.match(types.comma)) { - node.specifiers = []; - node.source = null; - node.declaration = this.finishPlaceholder(placeholder, "Declaration"); - return this.finishNode(node, "ExportNamedDeclaration"); - } - - this.expectPlugin("exportDefaultFrom"); - const specifier = this.startNode(); - specifier.exported = placeholder; - node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; - return super.parseExport(node); - } - - maybeParseExportDefaultSpecifier(node) { - if (node.specifiers && node.specifiers.length > 0) { - return true; - } - - return super.maybeParseExportDefaultSpecifier(...arguments); - } - - checkExport(node) { - const { - specifiers - } = node; - - if (specifiers && specifiers.length) { - node.specifiers = specifiers.filter(node => node.exported.type === "Placeholder"); - } - - super.checkExport(node); - node.specifiers = specifiers; - } - - parseImport(node) { - const placeholder = this.parsePlaceholder("Identifier"); - if (!placeholder) return super.parseImport(...arguments); - node.specifiers = []; - - if (!this.isContextual("from") && !this.match(types.comma)) { - node.source = this.finishPlaceholder(placeholder, "StringLiteral"); - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); - } - - const specifier = this.startNodeAtNode(placeholder); - specifier.local = placeholder; - this.finishNode(specifier, "ImportDefaultSpecifier"); - node.specifiers.push(specifier); - - if (this.eat(types.comma)) { - const hasStarImport = this.maybeParseStarImportSpecifier(node); - if (!hasStarImport) this.parseNamedImportSpecifiers(node); - } - - this.expectContextual("from"); - node.source = this.parseImportSource(); - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); - } - - parseImportSource() { - return this.parsePlaceholder("StringLiteral") || super.parseImportSource(...arguments); - } - -}); - -function hasPlugin(plugins, name) { - return plugins.some(plugin => { - if (Array.isArray(plugin)) { - return plugin[0] === name; - } else { - return plugin === name; - } - }); -} -function getPluginOption(plugins, name, option) { - const plugin = plugins.find(plugin => { - if (Array.isArray(plugin)) { - return plugin[0] === name; - } else { - return plugin === name; - } - }); - - if (plugin && Array.isArray(plugin)) { - return plugin[1][option]; - } - - return null; -} -const PIPELINE_PROPOSALS = ["minimal", "smart", "fsharp"]; -function validatePlugins(plugins) { - if (hasPlugin(plugins, "decorators")) { - if (hasPlugin(plugins, "decorators-legacy")) { - throw new Error("Cannot use the decorators and decorators-legacy plugin together"); - } - - const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport"); - - if (decoratorsBeforeExport == null) { - throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option," + " whose value must be a boolean. If you are migrating from" + " Babylon/Babel 6 or want to use the old decorators proposal, you" + " should use the 'decorators-legacy' plugin instead of 'decorators'."); - } else if (typeof decoratorsBeforeExport !== "boolean") { - throw new Error("'decoratorsBeforeExport' must be a boolean."); - } - } - - if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) { - throw new Error("Cannot combine flow and typescript plugins."); - } - - if (hasPlugin(plugins, "pipelineOperator") && !PIPELINE_PROPOSALS.includes(getPluginOption(plugins, "pipelineOperator", "proposal"))) { - throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: " + PIPELINE_PROPOSALS.map(p => `'${p}'`).join(", ")); - } -} -const mixinPlugins = { - estree, - jsx, - flow, - typescript, - placeholders -}; -const mixinPluginNames = Object.keys(mixinPlugins); - -const defaultOptions = { - sourceType: "script", - sourceFilename: undefined, - startLine: 1, - allowAwaitOutsideFunction: false, - allowReturnOutsideFunction: false, - allowImportExportEverywhere: false, - allowSuperOutsideMethod: false, - allowUndeclaredExports: false, - plugins: [], - strictMode: null, - ranges: false, - tokens: false, - createParenthesizedExpressions: false -}; -function getOptions(opts) { - const options = {}; - - for (let _i = 0, _Object$keys = Object.keys(defaultOptions); _i < _Object$keys.length; _i++) { - const key = _Object$keys[_i]; - options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key]; - } - - return options; -} - -class Position { - constructor(line, col) { - this.line = line; - this.column = col; - } - -} -class SourceLocation { - constructor(start, end) { - this.start = start; - this.end = end; - } - -} -function getLineInfo(input, offset) { - let line = 1; - let lineStart = 0; - let match; - lineBreakG.lastIndex = 0; - - while ((match = lineBreakG.exec(input)) && match.index < offset) { - line++; - lineStart = lineBreakG.lastIndex; - } - - return new Position(line, offset - lineStart); -} - -class BaseParser { - constructor() { - this.sawUnambiguousESM = false; - } - - hasPlugin(name) { - return this.plugins.has(name); - } - - getPluginOption(plugin, name) { - if (this.hasPlugin(plugin)) return this.plugins.get(plugin)[name]; - } - -} - -function last(stack) { - return stack[stack.length - 1]; -} - -class CommentsParser extends BaseParser { - addComment(comment) { - if (this.filename) comment.loc.filename = this.filename; - this.state.trailingComments.push(comment); - this.state.leadingComments.push(comment); - } - - processComment(node) { - if (node.type === "Program" && node.body.length > 0) return; - const stack = this.state.commentStack; - let firstChild, lastChild, trailingComments, i, j; - - if (this.state.trailingComments.length > 0) { - if (this.state.trailingComments[0].start >= node.end) { - trailingComments = this.state.trailingComments; - this.state.trailingComments = []; - } else { - this.state.trailingComments.length = 0; - } - } else if (stack.length > 0) { - const lastInStack = last(stack); - - if (lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) { - trailingComments = lastInStack.trailingComments; - delete lastInStack.trailingComments; - } - } - - if (stack.length > 0 && last(stack).start >= node.start) { - firstChild = stack.pop(); - } - - while (stack.length > 0 && last(stack).start >= node.start) { - lastChild = stack.pop(); - } - - if (!lastChild && firstChild) lastChild = firstChild; - - if (firstChild && this.state.leadingComments.length > 0) { - const lastComment = last(this.state.leadingComments); - - if (firstChild.type === "ObjectProperty") { - if (lastComment.start >= node.start) { - if (this.state.commentPreviousNode) { - for (j = 0; j < this.state.leadingComments.length; j++) { - if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { - this.state.leadingComments.splice(j, 1); - j--; - } - } - - if (this.state.leadingComments.length > 0) { - firstChild.trailingComments = this.state.leadingComments; - this.state.leadingComments = []; - } - } - } - } else if (node.type === "CallExpression" && node.arguments && node.arguments.length) { - const lastArg = last(node.arguments); - - if (lastArg && lastComment.start >= lastArg.start && lastComment.end <= node.end) { - if (this.state.commentPreviousNode) { - for (j = 0; j < this.state.leadingComments.length; j++) { - if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { - this.state.leadingComments.splice(j, 1); - j--; - } - } - - if (this.state.leadingComments.length > 0) { - lastArg.trailingComments = this.state.leadingComments; - this.state.leadingComments = []; - } - } - } - } - } - - if (lastChild) { - if (lastChild.leadingComments) { - if (lastChild !== node && lastChild.leadingComments.length > 0 && last(lastChild.leadingComments).end <= node.start) { - node.leadingComments = lastChild.leadingComments; - delete lastChild.leadingComments; - } else { - for (i = lastChild.leadingComments.length - 2; i >= 0; --i) { - if (lastChild.leadingComments[i].end <= node.start) { - node.leadingComments = lastChild.leadingComments.splice(0, i + 1); - break; - } - } - } - } - } else if (this.state.leadingComments.length > 0) { - if (last(this.state.leadingComments).end <= node.start) { - if (this.state.commentPreviousNode) { - for (j = 0; j < this.state.leadingComments.length; j++) { - if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) { - this.state.leadingComments.splice(j, 1); - j--; - } - } - } - - if (this.state.leadingComments.length > 0) { - node.leadingComments = this.state.leadingComments; - this.state.leadingComments = []; - } - } else { - for (i = 0; i < this.state.leadingComments.length; i++) { - if (this.state.leadingComments[i].end > node.start) { - break; - } - } - - const leadingComments = this.state.leadingComments.slice(0, i); - - if (leadingComments.length) { - node.leadingComments = leadingComments; - } - - trailingComments = this.state.leadingComments.slice(i); - - if (trailingComments.length === 0) { - trailingComments = null; - } - } - } - - this.state.commentPreviousNode = node; - - if (trailingComments) { - if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) { - node.innerComments = trailingComments; - } else { - node.trailingComments = trailingComments; - } - } - - stack.push(node); - } - -} - -class LocationParser extends CommentsParser { - getLocationForPosition(pos) { - let loc; - if (pos === this.state.start) loc = this.state.startLoc;else if (pos === this.state.lastTokStart) loc = this.state.lastTokStartLoc;else if (pos === this.state.end) loc = this.state.endLoc;else if (pos === this.state.lastTokEnd) loc = this.state.lastTokEndLoc;else loc = getLineInfo(this.input, pos); - return loc; - } - - raise(pos, message, { - missingPluginNames, - code - } = {}) { - const loc = this.getLocationForPosition(pos); - message += ` (${loc.line}:${loc.column})`; - const err = new SyntaxError(message); - err.pos = pos; - err.loc = loc; - - if (missingPluginNames) { - err.missingPlugin = missingPluginNames; - } - - if (code !== undefined) { - err.code = code; - } - - throw err; - } - -} - -class State { - constructor() { - this.potentialArrowAt = -1; - this.noArrowAt = []; - this.noArrowParamsConversionAt = []; - this.commaAfterSpreadAt = -1; - this.inParameters = false; - this.maybeInArrowParameters = false; - this.inPipeline = false; - this.inType = false; - this.noAnonFunctionType = false; - this.inPropertyName = false; - this.inClassProperty = false; - this.hasFlowComment = false; - this.isIterator = false; - this.topicContext = { - maxNumOfResolvableTopics: 0, - maxTopicIndex: null - }; - this.soloAwait = false; - this.inFSharpPipelineDirectBody = false; - this.classLevel = 0; - this.labels = []; - this.decoratorStack = [[]]; - this.yieldPos = 0; - this.awaitPos = 0; - this.tokens = []; - this.comments = []; - this.trailingComments = []; - this.leadingComments = []; - this.commentStack = []; - this.commentPreviousNode = null; - this.pos = 0; - this.lineStart = 0; - this.type = types.eof; - this.value = null; - this.start = 0; - this.end = 0; - this.lastTokEndLoc = null; - this.lastTokStartLoc = null; - this.lastTokStart = 0; - this.lastTokEnd = 0; - this.context = [types$1.braceStatement]; - this.exprAllowed = true; - this.containsEsc = false; - this.containsOctal = false; - this.octalPosition = null; - this.exportedIdentifiers = []; - this.invalidTemplateEscapePosition = null; - } - - init(options) { - this.strict = options.strictMode === false ? false : options.sourceType === "module"; - this.curLine = options.startLine; - this.startLoc = this.endLoc = this.curPosition(); - } - - curPosition() { - return new Position(this.curLine, this.pos - this.lineStart); - } - - clone(skipArrays) { - const state = new State(); - const keys = Object.keys(this); - - for (let i = 0, length = keys.length; i < length; i++) { - const key = keys[i]; - let val = this[key]; - - if (!skipArrays && Array.isArray(val)) { - val = val.slice(); - } - - state[key] = val; - } - - return state; - } - -} - -var _isDigit = function isDigit(code) { - return code >= 48 && code <= 57; -}; -const VALID_REGEX_FLAGS = new Set(["g", "m", "s", "i", "y", "u"]); -const forbiddenNumericSeparatorSiblings = { - decBinOct: [46, 66, 69, 79, 95, 98, 101, 111], - hex: [46, 88, 95, 120] -}; -const allowedNumericSeparatorSiblings = {}; -allowedNumericSeparatorSiblings.bin = [48, 49]; -allowedNumericSeparatorSiblings.oct = [...allowedNumericSeparatorSiblings.bin, 50, 51, 52, 53, 54, 55]; -allowedNumericSeparatorSiblings.dec = [...allowedNumericSeparatorSiblings.oct, 56, 57]; -allowedNumericSeparatorSiblings.hex = [...allowedNumericSeparatorSiblings.dec, 65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102]; -class Token { - constructor(state) { - this.type = state.type; - this.value = state.value; - this.start = state.start; - this.end = state.end; - this.loc = new SourceLocation(state.startLoc, state.endLoc); - } - -} -class Tokenizer extends LocationParser { - constructor(options, input) { - super(); - this.state = new State(); - this.state.init(options); - this.input = input; - this.length = input.length; - this.isLookahead = false; - } - - next() { - if (this.options.tokens && !this.isLookahead) { - this.state.tokens.push(new Token(this.state)); - } - - this.state.lastTokEnd = this.state.end; - this.state.lastTokStart = this.state.start; - this.state.lastTokEndLoc = this.state.endLoc; - this.state.lastTokStartLoc = this.state.startLoc; - this.nextToken(); - } - - eat(type) { - if (this.match(type)) { - this.next(); - return true; - } else { - return false; - } - } - - match(type) { - return this.state.type === type; - } - - lookahead() { - const old = this.state; - this.state = old.clone(true); - this.isLookahead = true; - this.next(); - this.isLookahead = false; - const curr = this.state; - this.state = old; - return curr; - } - - setStrict(strict) { - this.state.strict = strict; - if (!this.match(types.num) && !this.match(types.string)) return; - this.state.pos = this.state.start; - - while (this.state.pos < this.state.lineStart) { - this.state.lineStart = this.input.lastIndexOf("\n", this.state.lineStart - 2) + 1; - --this.state.curLine; - } - - this.nextToken(); - } - - curContext() { - return this.state.context[this.state.context.length - 1]; - } - - nextToken() { - const curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) this.skipSpace(); - this.state.containsOctal = false; - this.state.octalPosition = null; - this.state.start = this.state.pos; - this.state.startLoc = this.state.curPosition(); - - if (this.state.pos >= this.length) { - this.finishToken(types.eof); - return; - } - - if (curContext.override) { - curContext.override(this); - } else { - this.getTokenFromCode(this.input.codePointAt(this.state.pos)); - } - } - - pushComment(block, text, start, end, startLoc, endLoc) { - const comment = { - type: block ? "CommentBlock" : "CommentLine", - value: text, - start: start, - end: end, - loc: new SourceLocation(startLoc, endLoc) - }; - if (this.options.tokens) this.state.tokens.push(comment); - this.state.comments.push(comment); - this.addComment(comment); - } - - skipBlockComment() { - const startLoc = this.state.curPosition(); - const start = this.state.pos; - const end = this.input.indexOf("*/", this.state.pos += 2); - if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); - this.state.pos = end + 2; - lineBreakG.lastIndex = start; - let match; - - while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) { - ++this.state.curLine; - this.state.lineStart = match.index + match[0].length; - } - - if (this.isLookahead) return; - this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition()); - } - - skipLineComment(startSkip) { - const start = this.state.pos; - const startLoc = this.state.curPosition(); - let ch = this.input.charCodeAt(this.state.pos += startSkip); - - if (this.state.pos < this.length) { - while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.length) { - ch = this.input.charCodeAt(this.state.pos); - } - } - - if (this.isLookahead) return; - this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition()); - } - - skipSpace() { - loop: while (this.state.pos < this.length) { - const ch = this.input.charCodeAt(this.state.pos); - - switch (ch) { - case 32: - case 160: - case 9: - ++this.state.pos; - break; - - case 13: - if (this.input.charCodeAt(this.state.pos + 1) === 10) { - ++this.state.pos; - } - - case 10: - case 8232: - case 8233: - ++this.state.pos; - ++this.state.curLine; - this.state.lineStart = this.state.pos; - break; - - case 47: - switch (this.input.charCodeAt(this.state.pos + 1)) { - case 42: - this.skipBlockComment(); - break; - - case 47: - this.skipLineComment(2); - break; - - default: - break loop; - } - - break; - - default: - if (isWhitespace(ch)) { - ++this.state.pos; - } else { - break loop; - } - - } - } - } - - finishToken(type, val) { - this.state.end = this.state.pos; - this.state.endLoc = this.state.curPosition(); - const prevType = this.state.type; - this.state.type = type; - this.state.value = val; - if (!this.isLookahead) this.updateContext(prevType); - } - - readToken_numberSign() { - if (this.state.pos === 0 && this.readToken_interpreter()) { - return; - } - - const nextPos = this.state.pos + 1; - const next = this.input.charCodeAt(nextPos); - - if (next >= 48 && next <= 57) { - this.raise(this.state.pos, "Unexpected digit after hash token"); - } - - if ((this.hasPlugin("classPrivateProperties") || this.hasPlugin("classPrivateMethods")) && this.state.classLevel > 0) { - ++this.state.pos; - this.finishToken(types.hash); - return; - } else if (this.getPluginOption("pipelineOperator", "proposal") === "smart") { - this.finishOp(types.hash, 1); - } else { - this.raise(this.state.pos, "Unexpected character '#'"); - } - } - - readToken_dot() { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (next >= 48 && next <= 57) { - this.readNumber(true); - return; - } - - const next2 = this.input.charCodeAt(this.state.pos + 2); - - if (next === 46 && next2 === 46) { - this.state.pos += 3; - this.finishToken(types.ellipsis); - } else { - ++this.state.pos; - this.finishToken(types.dot); - } - } - - readToken_slash() { - if (this.state.exprAllowed && !this.state.inType) { - ++this.state.pos; - this.readRegexp(); - return; - } - - const next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 61) { - this.finishOp(types.assign, 2); - } else { - this.finishOp(types.slash, 1); - } - } - - readToken_interpreter() { - if (this.state.pos !== 0 || this.length < 2) return false; - const start = this.state.pos; - this.state.pos += 1; - let ch = this.input.charCodeAt(this.state.pos); - if (ch !== 33) return false; - - while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.length) { - ch = this.input.charCodeAt(this.state.pos); - } - - const value = this.input.slice(start + 2, this.state.pos); - this.finishToken(types.interpreterDirective, value); - return true; - } - - readToken_mult_modulo(code) { - let type = code === 42 ? types.star : types.modulo; - let width = 1; - let next = this.input.charCodeAt(this.state.pos + 1); - const exprAllowed = this.state.exprAllowed; - - if (code === 42 && next === 42) { - width++; - next = this.input.charCodeAt(this.state.pos + 2); - type = types.exponent; - } - - if (next === 61 && !exprAllowed) { - width++; - type = types.assign; - } - - this.finishOp(type, width); - } - - readToken_pipe_amp(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (next === code) { - if (this.input.charCodeAt(this.state.pos + 2) === 61) { - this.finishOp(types.assign, 3); - } else { - this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2); - } - - return; - } - - if (code === 124) { - if (next === 62) { - this.finishOp(types.pipeline, 2); - return; - } - } - - if (next === 61) { - this.finishOp(types.assign, 2); - return; - } - - this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1); - } - - readToken_caret() { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 61) { - this.finishOp(types.assign, 2); - } else { - this.finishOp(types.bitwiseXOR, 1); - } - } - - readToken_plus_min(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (next === code) { - if (next === 45 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 62 && (this.state.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos)))) { - this.skipLineComment(3); - this.skipSpace(); - this.nextToken(); - return; - } - - this.finishOp(types.incDec, 2); - return; - } - - if (next === 61) { - this.finishOp(types.assign, 2); - } else { - this.finishOp(types.plusMin, 1); - } - } - - readToken_lt_gt(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - let size = 1; - - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2; - - if (this.input.charCodeAt(this.state.pos + size) === 61) { - this.finishOp(types.assign, size + 1); - return; - } - - this.finishOp(types.bitShift, size); - return; - } - - if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) { - this.skipLineComment(4); - this.skipSpace(); - this.nextToken(); - return; - } - - if (next === 61) { - size = 2; - } - - this.finishOp(types.relational, size); - } - - readToken_eq_excl(code) { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 61) { - this.finishOp(types.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2); - return; - } - - if (code === 61 && next === 62) { - this.state.pos += 2; - this.finishToken(types.arrow); - return; - } - - this.finishOp(code === 61 ? types.eq : types.bang, 1); - } - - readToken_question() { - const next = this.input.charCodeAt(this.state.pos + 1); - const next2 = this.input.charCodeAt(this.state.pos + 2); - - if (next === 63 && !this.state.inType) { - if (next2 === 61) { - this.finishOp(types.assign, 3); - } else { - this.finishOp(types.nullishCoalescing, 2); - } - } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) { - this.state.pos += 2; - this.finishToken(types.questionDot); - } else { - ++this.state.pos; - this.finishToken(types.question); - } - } - - getTokenFromCode(code) { - switch (code) { - case 46: - this.readToken_dot(); - return; - - case 40: - ++this.state.pos; - this.finishToken(types.parenL); - return; - - case 41: - ++this.state.pos; - this.finishToken(types.parenR); - return; - - case 59: - ++this.state.pos; - this.finishToken(types.semi); - return; - - case 44: - ++this.state.pos; - this.finishToken(types.comma); - return; - - case 91: - ++this.state.pos; - this.finishToken(types.bracketL); - return; - - case 93: - ++this.state.pos; - this.finishToken(types.bracketR); - return; - - case 123: - ++this.state.pos; - this.finishToken(types.braceL); - return; - - case 125: - ++this.state.pos; - this.finishToken(types.braceR); - return; - - case 58: - if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) { - this.finishOp(types.doubleColon, 2); - } else { - ++this.state.pos; - this.finishToken(types.colon); - } - - return; - - case 63: - this.readToken_question(); - return; - - case 96: - ++this.state.pos; - this.finishToken(types.backQuote); - return; - - case 48: - { - const next = this.input.charCodeAt(this.state.pos + 1); - - if (next === 120 || next === 88) { - this.readRadixNumber(16); - return; - } - - if (next === 111 || next === 79) { - this.readRadixNumber(8); - return; - } - - if (next === 98 || next === 66) { - this.readRadixNumber(2); - return; - } - } - - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: - this.readNumber(false); - return; - - case 34: - case 39: - this.readString(code); - return; - - case 47: - this.readToken_slash(); - return; - - case 37: - case 42: - this.readToken_mult_modulo(code); - return; - - case 124: - case 38: - this.readToken_pipe_amp(code); - return; - - case 94: - this.readToken_caret(); - return; - - case 43: - case 45: - this.readToken_plus_min(code); - return; - - case 60: - case 62: - this.readToken_lt_gt(code); - return; - - case 61: - case 33: - this.readToken_eq_excl(code); - return; - - case 126: - this.finishOp(types.tilde, 1); - return; - - case 64: - ++this.state.pos; - this.finishToken(types.at); - return; - - case 35: - this.readToken_numberSign(); - return; - - case 92: - this.readWord(); - return; - - default: - if (isIdentifierStart(code)) { - this.readWord(); - return; - } - - } - - this.raise(this.state.pos, `Unexpected character '${String.fromCodePoint(code)}'`); - } - - finishOp(type, size) { - const str = this.input.slice(this.state.pos, this.state.pos + size); - this.state.pos += size; - this.finishToken(type, str); - } - - readRegexp() { - const start = this.state.pos; - let escaped, inClass; - - for (;;) { - if (this.state.pos >= this.length) { - this.raise(start, "Unterminated regular expression"); - } - - const ch = this.input.charAt(this.state.pos); - - if (lineBreak.test(ch)) { - this.raise(start, "Unterminated regular expression"); - } - - if (escaped) { - escaped = false; - } else { - if (ch === "[") { - inClass = true; - } else if (ch === "]" && inClass) { - inClass = false; - } else if (ch === "/" && !inClass) { - break; - } - - escaped = ch === "\\"; - } - - ++this.state.pos; - } - - const content = this.input.slice(start, this.state.pos); - ++this.state.pos; - let mods = ""; - - while (this.state.pos < this.length) { - const char = this.input[this.state.pos]; - const charCode = this.input.codePointAt(this.state.pos); - - if (VALID_REGEX_FLAGS.has(char)) { - if (mods.indexOf(char) > -1) { - this.raise(this.state.pos + 1, "Duplicate regular expression flag"); - } - - ++this.state.pos; - mods += char; - } else if (isIdentifierChar(charCode) || charCode === 92) { - this.raise(this.state.pos + 1, "Invalid regular expression flag"); - } else { - break; - } - } - - this.finishToken(types.regexp, { - pattern: content, - flags: mods - }); - } - - readInt(radix, len) { - const start = this.state.pos; - const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; - const allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin; - let total = 0; - - for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) { - const code = this.input.charCodeAt(this.state.pos); - let val; - - if (this.hasPlugin("numericSeparator")) { - const prev = this.input.charCodeAt(this.state.pos - 1); - const next = this.input.charCodeAt(this.state.pos + 1); - - if (code === 95) { - if (allowedSiblings.indexOf(next) === -1) { - this.raise(this.state.pos, "Invalid or unexpected token"); - } - - if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) { - this.raise(this.state.pos, "Invalid or unexpected token"); - } - - ++this.state.pos; - continue; - } - } - - if (code >= 97) { - val = code - 97 + 10; - } else if (code >= 65) { - val = code - 65 + 10; - } else if (_isDigit(code)) { - val = code - 48; - } else { - val = Infinity; - } - - if (val >= radix) break; - ++this.state.pos; - total = total * radix + val; - } - - if (this.state.pos === start || len != null && this.state.pos - start !== len) { - return null; - } - - return total; - } - - readRadixNumber(radix) { - const start = this.state.pos; - let isBigInt = false; - this.state.pos += 2; - const val = this.readInt(radix); - - if (val == null) { - this.raise(this.state.start + 2, "Expected number in radix " + radix); - } - - if (this.hasPlugin("bigInt")) { - if (this.input.charCodeAt(this.state.pos) === 110) { - ++this.state.pos; - isBigInt = true; - } - } - - if (isIdentifierStart(this.input.codePointAt(this.state.pos))) { - this.raise(this.state.pos, "Identifier directly after number"); - } - - if (isBigInt) { - const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, ""); - this.finishToken(types.bigint, str); - return; - } - - this.finishToken(types.num, val); - } - - readNumber(startsWithDot) { - const start = this.state.pos; - let isFloat = false; - let isBigInt = false; - - if (!startsWithDot && this.readInt(10) === null) { - this.raise(start, "Invalid number"); - } - - let octal = this.state.pos - start >= 2 && this.input.charCodeAt(start) === 48; - - if (octal) { - if (this.state.strict) { - this.raise(start, "Legacy octal literals are not allowed in strict mode"); - } - - if (/[89]/.test(this.input.slice(start, this.state.pos))) { - octal = false; - } - } - - let next = this.input.charCodeAt(this.state.pos); - - if (next === 46 && !octal) { - ++this.state.pos; - this.readInt(10); - isFloat = true; - next = this.input.charCodeAt(this.state.pos); - } - - if ((next === 69 || next === 101) && !octal) { - next = this.input.charCodeAt(++this.state.pos); - - if (next === 43 || next === 45) { - ++this.state.pos; - } - - if (this.readInt(10) === null) this.raise(start, "Invalid number"); - isFloat = true; - next = this.input.charCodeAt(this.state.pos); - } - - if (this.hasPlugin("bigInt")) { - if (next === 110) { - if (isFloat || octal) this.raise(start, "Invalid BigIntLiteral"); - ++this.state.pos; - isBigInt = true; - } - } - - if (isIdentifierStart(this.input.codePointAt(this.state.pos))) { - this.raise(this.state.pos, "Identifier directly after number"); - } - - const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, ""); - - if (isBigInt) { - this.finishToken(types.bigint, str); - return; - } - - const val = octal ? parseInt(str, 8) : parseFloat(str); - this.finishToken(types.num, val); - } - - readCodePoint(throwOnInvalid) { - const ch = this.input.charCodeAt(this.state.pos); - let code; - - if (ch === 123) { - const codePos = ++this.state.pos; - code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, throwOnInvalid); - ++this.state.pos; - - if (code === null) { - --this.state.invalidTemplateEscapePosition; - } else if (code > 0x10ffff) { - if (throwOnInvalid) { - this.raise(codePos, "Code point out of bounds"); - } else { - this.state.invalidTemplateEscapePosition = codePos - 2; - return null; - } - } - } else { - code = this.readHexChar(4, throwOnInvalid); - } - - return code; - } - - readString(quote) { - let out = "", - chunkStart = ++this.state.pos; - - for (;;) { - if (this.state.pos >= this.length) { - this.raise(this.state.start, "Unterminated string constant"); - } - - const ch = this.input.charCodeAt(this.state.pos); - if (ch === quote) break; - - if (ch === 92) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.readEscapedChar(false); - chunkStart = this.state.pos; - } else if (ch === 8232 || ch === 8233) { - ++this.state.pos; - ++this.state.curLine; - } else if (isNewLine(ch)) { - this.raise(this.state.start, "Unterminated string constant"); - } else { - ++this.state.pos; - } - } - - out += this.input.slice(chunkStart, this.state.pos++); - this.finishToken(types.string, out); - } - - readTmplToken() { - let out = "", - chunkStart = this.state.pos, - containsInvalid = false; - - for (;;) { - if (this.state.pos >= this.length) { - this.raise(this.state.start, "Unterminated template"); - } - - const ch = this.input.charCodeAt(this.state.pos); - - if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) { - if (this.state.pos === this.state.start && this.match(types.template)) { - if (ch === 36) { - this.state.pos += 2; - this.finishToken(types.dollarBraceL); - return; - } else { - ++this.state.pos; - this.finishToken(types.backQuote); - return; - } - } - - out += this.input.slice(chunkStart, this.state.pos); - this.finishToken(types.template, containsInvalid ? null : out); - return; - } - - if (ch === 92) { - out += this.input.slice(chunkStart, this.state.pos); - const escaped = this.readEscapedChar(true); - - if (escaped === null) { - containsInvalid = true; - } else { - out += escaped; - } - - chunkStart = this.state.pos; - } else if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - ++this.state.pos; - - switch (ch) { - case 13: - if (this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - } - - case 10: - out += "\n"; - break; - - default: - out += String.fromCharCode(ch); - break; - } - - ++this.state.curLine; - this.state.lineStart = this.state.pos; - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } - } - } - - readEscapedChar(inTemplate) { - const throwOnInvalid = !inTemplate; - const ch = this.input.charCodeAt(++this.state.pos); - ++this.state.pos; - - switch (ch) { - case 110: - return "\n"; - - case 114: - return "\r"; - - case 120: - { - const code = this.readHexChar(2, throwOnInvalid); - return code === null ? null : String.fromCharCode(code); - } - - case 117: - { - const code = this.readCodePoint(throwOnInvalid); - return code === null ? null : String.fromCodePoint(code); - } - - case 116: - return "\t"; - - case 98: - return "\b"; - - case 118: - return "\u000b"; - - case 102: - return "\f"; - - case 13: - if (this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - } - - case 10: - this.state.lineStart = this.state.pos; - ++this.state.curLine; - - case 8232: - case 8233: - return ""; - - default: - if (ch >= 48 && ch <= 55) { - const codePos = this.state.pos - 1; - let octalStr = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/)[0]; - let octal = parseInt(octalStr, 8); - - if (octal > 255) { - octalStr = octalStr.slice(0, -1); - octal = parseInt(octalStr, 8); - } - - this.state.pos += octalStr.length - 1; - const next = this.input.charCodeAt(this.state.pos); - - if (octalStr !== "0" || next === 56 || next === 57) { - if (inTemplate) { - this.state.invalidTemplateEscapePosition = codePos; - return null; - } else if (this.state.strict) { - this.raise(codePos, "Octal literal in strict mode"); - } else if (!this.state.containsOctal) { - this.state.containsOctal = true; - this.state.octalPosition = codePos; - } - } - - return String.fromCharCode(octal); - } - - return String.fromCharCode(ch); - } - } - - readHexChar(len, throwOnInvalid) { - const codePos = this.state.pos; - const n = this.readInt(16, len); - - if (n === null) { - if (throwOnInvalid) { - this.raise(codePos, "Bad character escape sequence"); - } else { - this.state.pos = codePos - 1; - this.state.invalidTemplateEscapePosition = codePos - 1; - } - } - - return n; - } - - readWord1() { - let word = ""; - this.state.containsEsc = false; - const start = this.state.pos; - let chunkStart = this.state.pos; - - while (this.state.pos < this.length) { - const ch = this.input.codePointAt(this.state.pos); - - if (isIdentifierChar(ch)) { - this.state.pos += ch <= 0xffff ? 1 : 2; - } else if (this.state.isIterator && ch === 64) { - ++this.state.pos; - } else if (ch === 92) { - this.state.containsEsc = true; - word += this.input.slice(chunkStart, this.state.pos); - const escStart = this.state.pos; - const identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar; - - if (this.input.charCodeAt(++this.state.pos) !== 117) { - this.raise(this.state.pos, "Expecting Unicode escape sequence \\uXXXX"); - } - - ++this.state.pos; - const esc = this.readCodePoint(true); - - if (!identifierCheck(esc, true)) { - this.raise(escStart, "Invalid Unicode escape"); - } - - word += String.fromCodePoint(esc); - chunkStart = this.state.pos; - } else { - break; - } - } - - return word + this.input.slice(chunkStart, this.state.pos); - } - - isIterator(word) { - return word === "@@iterator" || word === "@@asyncIterator"; - } - - readWord() { - const word = this.readWord1(); - const type = keywords.get(word) || types.name; - - if (type.keyword && this.state.containsEsc) { - this.raise(this.state.pos, `Escape sequence in keyword ${word}`); - } - - if (this.state.isIterator && (!this.isIterator(word) || !this.state.inType)) { - this.raise(this.state.pos, `Invalid identifier ${word}`); - } - - this.finishToken(type, word); - } - - braceIsBlock(prevType) { - const parent = this.curContext(); - - if (parent === types$1.functionExpression || parent === types$1.functionStatement) { - return true; - } - - if (prevType === types.colon && (parent === types$1.braceStatement || parent === types$1.braceExpression)) { - return !parent.isExpr; - } - - if (prevType === types._return || prevType === types.name && this.state.exprAllowed) { - return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)); - } - - if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) { - return true; - } - - if (prevType === types.braceL) { - return parent === types$1.braceStatement; - } - - if (prevType === types._var || prevType === types._const || prevType === types.name) { - return false; - } - - if (prevType === types.relational) { - return true; - } - - return !this.state.exprAllowed; - } - - updateContext(prevType) { - const type = this.state.type; - let update; - - if (type.keyword && (prevType === types.dot || prevType === types.questionDot)) { - this.state.exprAllowed = false; - } else if (update = type.updateContext) { - update.call(this, prevType); - } else { - this.state.exprAllowed = type.beforeExpr; - } - } - -} - -const literal = /^('|")((?:\\?.)*?)\1/; -class UtilParser extends Tokenizer { - addExtra(node, key, val) { - if (!node) return; - const extra = node.extra = node.extra || {}; - extra[key] = val; - } - - isRelational(op) { - return this.match(types.relational) && this.state.value === op; - } - - isLookaheadRelational(op) { - const l = this.lookahead(); - return l.type === types.relational && l.value === op; - } - - expectRelational(op) { - if (this.isRelational(op)) { - this.next(); - } else { - this.unexpected(null, types.relational); - } - } - - eatRelational(op) { - if (this.isRelational(op)) { - this.next(); - return true; - } - - return false; - } - - isContextual(name) { - return this.match(types.name) && this.state.value === name && !this.state.containsEsc; - } - - isLookaheadContextual(name) { - const l = this.lookahead(); - return l.type === types.name && l.value === name; - } - - eatContextual(name) { - return this.isContextual(name) && this.eat(types.name); - } - - expectContextual(name, message) { - if (!this.eatContextual(name)) this.unexpected(null, message); - } - - canInsertSemicolon() { - return this.match(types.eof) || this.match(types.braceR) || this.hasPrecedingLineBreak(); - } - - hasPrecedingLineBreak() { - return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)); - } - - isLineTerminator() { - return this.eat(types.semi) || this.canInsertSemicolon(); - } - - semicolon() { - if (!this.isLineTerminator()) this.unexpected(null, types.semi); - } - - expect(type, pos) { - this.eat(type) || this.unexpected(pos, type); - } - - assertNoSpace(message = "Unexpected space.") { - if (this.state.start > this.state.lastTokEnd) { - this.raise(this.state.lastTokEnd, message); - } - } - - unexpected(pos, messageOrType = "Unexpected token") { - if (typeof messageOrType !== "string") { - messageOrType = `Unexpected token, expected "${messageOrType.label}"`; - } - - throw this.raise(pos != null ? pos : this.state.start, messageOrType); - } - - expectPlugin(name, pos) { - if (!this.hasPlugin(name)) { - throw this.raise(pos != null ? pos : this.state.start, `This experimental syntax requires enabling the parser plugin: '${name}'`, { - missingPluginNames: [name] - }); - } - - return true; - } - - expectOnePlugin(names, pos) { - if (!names.some(n => this.hasPlugin(n))) { - throw this.raise(pos != null ? pos : this.state.start, `This experimental syntax requires enabling one of the following parser plugin(s): '${names.join(", ")}'`, { - missingPluginNames: names - }); - } - } - - checkYieldAwaitInDefaultParams() { - if (this.state.yieldPos && (!this.state.awaitPos || this.state.yieldPos < this.state.awaitPos)) { - this.raise(this.state.yieldPos, "Yield cannot be used as name inside a generator function"); - } - - if (this.state.awaitPos) { - this.raise(this.state.awaitPos, "Await cannot be used as name inside an async function"); - } - } - - strictDirective(start) { - for (;;) { - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this.input)[0].length; - const match = literal.exec(this.input.slice(start)); - if (!match) break; - if (match[2] === "use strict") return true; - start += match[0].length; - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this.input)[0].length; - - if (this.input[start] === ";") { - start++; - } - } - - return false; - } - -} - -class Node { - constructor(parser, pos, loc) { - this.type = ""; - this.start = pos; - this.end = 0; - this.loc = new SourceLocation(loc); - if (parser && parser.options.ranges) this.range = [pos, 0]; - if (parser && parser.filename) this.loc.filename = parser.filename; - } - - __clone() { - const newNode = new Node(); - const keys = Object.keys(this); - - for (let i = 0, length = keys.length; i < length; i++) { - const key = keys[i]; - - if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") { - newNode[key] = this[key]; - } - } - - return newNode; - } - -} - -class NodeUtils extends UtilParser { - startNode() { - return new Node(this, this.state.start, this.state.startLoc); - } - - startNodeAt(pos, loc) { - return new Node(this, pos, loc); - } - - startNodeAtNode(type) { - return this.startNodeAt(type.start, type.loc.start); - } - - finishNode(node, type) { - return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc); - } - - finishNodeAt(node, type, pos, loc) { - - node.type = type; - node.end = pos; - node.loc.end = loc; - if (this.options.ranges) node.range[1] = pos; - this.processComment(node); - return node; - } - - resetStartLocation(node, start, startLoc) { - node.start = start; - node.loc.start = startLoc; - if (this.options.ranges) node.range[0] = start; - } - - resetEndLocation(node, end = this.state.lastTokEnd, endLoc = this.state.lastTokEndLoc) { - node.end = end; - node.loc.end = endLoc; - if (this.options.ranges) node.range[1] = end; - } - - resetStartLocationFromNode(node, locationNode) { - this.resetStartLocation(node, locationNode.start, locationNode.loc.start); - } - -} - -class LValParser extends NodeUtils { - toAssignable(node, isBinding, contextDescription) { - if (node) { - switch (node.type) { - case "Identifier": - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - break; - - case "ObjectExpression": - node.type = "ObjectPattern"; - - for (let i = 0, length = node.properties.length, last = length - 1; i < length; i++) { - const prop = node.properties[i]; - const isLast = i === last; - this.toAssignableObjectExpressionProp(prop, isBinding, isLast); - } - - break; - - case "ObjectProperty": - this.toAssignable(node.value, isBinding, contextDescription); - break; - - case "SpreadElement": - { - this.checkToRestConversion(node); - node.type = "RestElement"; - const arg = node.argument; - this.toAssignable(arg, isBinding, contextDescription); - break; - } - - case "ArrayExpression": - node.type = "ArrayPattern"; - this.toAssignableList(node.elements, isBinding, contextDescription); - break; - - case "AssignmentExpression": - if (node.operator === "=") { - node.type = "AssignmentPattern"; - delete node.operator; - } else { - this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); - } - - break; - - case "ParenthesizedExpression": - node.expression = this.toAssignable(node.expression, isBinding, contextDescription); - break; - - case "MemberExpression": - if (!isBinding) break; - - default: - { - const message = "Invalid left-hand side" + (contextDescription ? " in " + contextDescription : "expression"); - this.raise(node.start, message); - } - } - } - - return node; - } - - toAssignableObjectExpressionProp(prop, isBinding, isLast) { - if (prop.type === "ObjectMethod") { - const error = prop.kind === "get" || prop.kind === "set" ? "Object pattern can't contain getter or setter" : "Object pattern can't contain methods"; - this.raise(prop.key.start, error); - } else if (prop.type === "SpreadElement" && !isLast) { - this.raiseRestNotLast(prop.start); - } else { - this.toAssignable(prop, isBinding, "object destructuring pattern"); - } - } - - toAssignableList(exprList, isBinding, contextDescription) { - let end = exprList.length; - - if (end) { - const last = exprList[end - 1]; - - if (last && last.type === "RestElement") { - --end; - } else if (last && last.type === "SpreadElement") { - last.type = "RestElement"; - const arg = last.argument; - this.toAssignable(arg, isBinding, contextDescription); - - if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern" && arg.type !== "ObjectPattern") { - this.unexpected(arg.start); - } - - --end; - } - } - - for (let i = 0; i < end; i++) { - const elt = exprList[i]; - - if (elt) { - this.toAssignable(elt, isBinding, contextDescription); - - if (elt.type === "RestElement") { - this.raiseRestNotLast(elt.start); - } - } - } - - return exprList; - } - - toReferencedList(exprList, isParenthesizedExpr) { - return exprList; - } - - toReferencedListDeep(exprList, isParenthesizedExpr) { - this.toReferencedList(exprList, isParenthesizedExpr); - - for (let _i = 0; _i < exprList.length; _i++) { - const expr = exprList[_i]; - - if (expr && expr.type === "ArrayExpression") { - this.toReferencedListDeep(expr.elements); - } - } - - return exprList; - } - - parseSpread(refShorthandDefaultPos, refNeedsArrowPos) { - const node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(false, refShorthandDefaultPos, undefined, refNeedsArrowPos); - - if (this.state.commaAfterSpreadAt === -1 && this.match(types.comma)) { - this.state.commaAfterSpreadAt = this.state.start; - } - - return this.finishNode(node, "SpreadElement"); - } - - parseRestBinding() { - const node = this.startNode(); - this.next(); - node.argument = this.parseBindingAtom(); - return this.finishNode(node, "RestElement"); - } - - parseBindingAtom() { - switch (this.state.type) { - case types.bracketL: - { - const node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(types.bracketR, true); - return this.finishNode(node, "ArrayPattern"); - } - - case types.braceL: - return this.parseObj(true); - } - - return this.parseIdentifier(); - } - - parseBindingList(close, allowEmpty, allowModifiers) { - const elts = []; - let first = true; - - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - } - - if (allowEmpty && this.match(types.comma)) { - elts.push(null); - } else if (this.eat(close)) { - break; - } else if (this.match(types.ellipsis)) { - elts.push(this.parseAssignableListItemTypes(this.parseRestBinding())); - this.checkCommaAfterRest(); - this.expect(close); - break; - } else { - const decorators = []; - - if (this.match(types.at) && this.hasPlugin("decorators")) { - this.raise(this.state.start, "Stage 2 decorators cannot be used to decorate parameters"); - } - - while (this.match(types.at)) { - decorators.push(this.parseDecorator()); - } - - elts.push(this.parseAssignableListItem(allowModifiers, decorators)); - } - } - - return elts; - } - - parseAssignableListItem(allowModifiers, decorators) { - const left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left); - const elt = this.parseMaybeDefault(left.start, left.loc.start, left); - - if (decorators.length) { - left.decorators = decorators; - } - - return elt; - } - - parseAssignableListItemTypes(param) { - return param; - } - - parseMaybeDefault(startPos, startLoc, left) { - startLoc = startLoc || this.state.startLoc; - startPos = startPos || this.state.start; - left = left || this.parseBindingAtom(); - if (!this.eat(types.eq)) return left; - const node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern"); - } - - checkLVal(expr, bindingType = BIND_NONE, checkClashes, contextDescription) { - switch (expr.type) { - case "Identifier": - if (this.state.strict && isStrictBindReservedWord(expr.name, this.inModule)) { - this.raise(expr.start, `${bindingType === BIND_NONE ? "Assigning to" : "Binding"} '${expr.name}' in strict mode`); - } - - if (checkClashes) { - const key = `_${expr.name}`; - - if (checkClashes[key]) { - this.raise(expr.start, "Argument name clash"); - } else { - checkClashes[key] = true; - } - } - - if (bindingType === BIND_LEXICAL && expr.name === "let") { - this.raise(expr.start, "'let' is not allowed to be used as a name in 'let' or 'const' declarations."); - } - - if (!(bindingType & BIND_NONE)) { - this.scope.declareName(expr.name, bindingType, expr.start); - } - - break; - - case "MemberExpression": - if (bindingType !== BIND_NONE) { - this.raise(expr.start, "Binding member expression"); - } - - break; - - case "ObjectPattern": - for (let _i2 = 0, _expr$properties = expr.properties; _i2 < _expr$properties.length; _i2++) { - let prop = _expr$properties[_i2]; - if (prop.type === "ObjectProperty") prop = prop.value; - this.checkLVal(prop, bindingType, checkClashes, "object destructuring pattern"); - } - - break; - - case "ArrayPattern": - for (let _i3 = 0, _expr$elements = expr.elements; _i3 < _expr$elements.length; _i3++) { - const elem = _expr$elements[_i3]; - - if (elem) { - this.checkLVal(elem, bindingType, checkClashes, "array destructuring pattern"); - } - } - - break; - - case "AssignmentPattern": - this.checkLVal(expr.left, bindingType, checkClashes, "assignment pattern"); - break; - - case "RestElement": - this.checkLVal(expr.argument, bindingType, checkClashes, "rest element"); - break; - - case "ParenthesizedExpression": - this.checkLVal(expr.expression, bindingType, checkClashes, "parenthesized expression"); - break; - - default: - { - const message = (bindingType === BIND_NONE ? "Invalid" : "Binding invalid") + " left-hand side" + (contextDescription ? " in " + contextDescription : "expression"); - this.raise(expr.start, message); - } - } - } - - checkToRestConversion(node) { - if (node.argument.type !== "Identifier" && node.argument.type !== "MemberExpression") { - this.raise(node.argument.start, "Invalid rest operator's argument"); - } - } - - checkCommaAfterRest() { - if (this.match(types.comma)) { - this.raiseRestNotLast(this.state.start); - } - } - - checkCommaAfterRestFromSpread() { - if (this.state.commaAfterSpreadAt > -1) { - this.raiseRestNotLast(this.state.commaAfterSpreadAt); - } - } - - raiseRestNotLast(pos) { - this.raise(pos, `Rest element must be last element`); - } - -} - -const unwrapParenthesizedExpression = node => { - return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node; -}; - -class ExpressionParser extends LValParser { - checkPropClash(prop, propHash) { - if (prop.type === "SpreadElement" || prop.computed || prop.kind || prop.shorthand) { - return; - } - - const key = prop.key; - const name = key.type === "Identifier" ? key.name : String(key.value); - - if (name === "__proto__") { - if (propHash.proto) { - this.raise(key.start, "Redefinition of __proto__ property"); - } - - propHash.proto = true; - } - } - - getExpression() { - this.scope.enter(SCOPE_PROGRAM); - this.nextToken(); - const expr = this.parseExpression(); - - if (!this.match(types.eof)) { - this.unexpected(); - } - - expr.comments = this.state.comments; - return expr; - } - - parseExpression(noIn, refShorthandDefaultPos) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - const expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos); - - if (this.match(types.comma)) { - const node = this.startNodeAt(startPos, startLoc); - node.expressions = [expr]; - - while (this.eat(types.comma)) { - node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos)); - } - - this.toReferencedList(node.expressions); - return this.finishNode(node, "SequenceExpression"); - } - - return expr; - } - - parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - - if (this.isContextual("yield")) { - if (this.scope.inGenerator) { - let left = this.parseYield(noIn); - - if (afterLeftParse) { - left = afterLeftParse.call(this, left, startPos, startLoc); - } - - return left; - } else { - this.state.exprAllowed = false; - } - } - - const oldCommaAfterSpreadAt = this.state.commaAfterSpreadAt; - this.state.commaAfterSpreadAt = -1; - let failOnShorthandAssign; - - if (refShorthandDefaultPos) { - failOnShorthandAssign = false; - } else { - refShorthandDefaultPos = { - start: 0 - }; - failOnShorthandAssign = true; - } - - if (this.match(types.parenL) || this.match(types.name)) { - this.state.potentialArrowAt = this.state.start; - } - - let left = this.parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos); - - if (afterLeftParse) { - left = afterLeftParse.call(this, left, startPos, startLoc); - } - - if (this.state.type.isAssign) { - const node = this.startNodeAt(startPos, startLoc); - const operator = this.state.value; - node.operator = operator; - - if (operator === "??=") { - this.expectPlugin("nullishCoalescingOperator"); - this.expectPlugin("logicalAssignment"); - } - - if (operator === "||=" || operator === "&&=") { - this.expectPlugin("logicalAssignment"); - } - - node.left = this.match(types.eq) ? this.toAssignable(left, undefined, "assignment expression") : left; - refShorthandDefaultPos.start = 0; - this.checkLVal(left, undefined, undefined, "assignment expression"); - const maybePattern = unwrapParenthesizedExpression(left); - let patternErrorMsg; - - if (maybePattern.type === "ObjectPattern") { - patternErrorMsg = "`({a}) = 0` use `({a} = 0)`"; - } else if (maybePattern.type === "ArrayPattern") { - patternErrorMsg = "`([a]) = 0` use `([a] = 0)`"; - } - - if (patternErrorMsg && (left.extra && left.extra.parenthesized || left.type === "ParenthesizedExpression")) { - this.raise(maybePattern.start, `You're trying to assign to a parenthesized expression, eg. instead of ${patternErrorMsg}`); - } - - if (patternErrorMsg) this.checkCommaAfterRestFromSpread(); - this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt; - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression"); - } else if (failOnShorthandAssign && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt; - return left; - } - - parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - const potentialArrowAt = this.state.potentialArrowAt; - const expr = this.parseExprOps(noIn, refShorthandDefaultPos); - - if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { - return expr; - } - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - return this.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos); - } - - parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) { - if (this.eat(types.question)) { - const node = this.startNodeAt(startPos, startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(types.colon); - node.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(node, "ConditionalExpression"); - } - - return expr; - } - - parseExprOps(noIn, refShorthandDefaultPos) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - const potentialArrowAt = this.state.potentialArrowAt; - const expr = this.parseMaybeUnary(refShorthandDefaultPos); - - if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { - return expr; - } - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - return expr; - } - - return this.parseExprOp(expr, startPos, startLoc, -1, noIn); - } - - parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) { - const prec = this.state.type.binop; - - if (prec != null && (!noIn || !this.match(types._in))) { - if (prec > minPrec) { - const operator = this.state.value; - - if (operator === "|>" && this.state.inFSharpPipelineDirectBody) { - return left; - } - - const node = this.startNodeAt(leftStartPos, leftStartLoc); - node.left = left; - node.operator = operator; - - if (operator === "**" && left.type === "UnaryExpression" && (this.options.createParenthesizedExpressions || !(left.extra && left.extra.parenthesized))) { - this.raise(left.argument.start, "Illegal expression. Wrap left hand side or entire exponentiation in parentheses."); - } - - const op = this.state.type; - - if (op === types.pipeline) { - this.expectPlugin("pipelineOperator"); - this.state.inPipeline = true; - this.checkPipelineAtInfixOperator(left, leftStartPos); - } else if (op === types.nullishCoalescing) { - this.expectPlugin("nullishCoalescingOperator"); - } - - this.next(); - - if (op === types.pipeline && this.getPluginOption("pipelineOperator", "proposal") === "minimal") { - if (this.match(types.name) && this.state.value === "await" && this.scope.inAsync) { - throw this.raise(this.state.start, `Unexpected "await" after pipeline body; await must have parentheses in minimal proposal`); - } - } - - node.right = this.parseExprOpRightExpr(op, prec, noIn); - this.finishNode(node, op === types.logicalOR || op === types.logicalAND || op === types.nullishCoalescing ? "LogicalExpression" : "BinaryExpression"); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn); - } - } - - return left; - } - - parseExprOpRightExpr(op, prec, noIn) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - - switch (op) { - case types.pipeline: - switch (this.getPluginOption("pipelineOperator", "proposal")) { - case "smart": - return this.withTopicPermittingContext(() => { - return this.parseSmartPipelineBody(this.parseExprOpBaseRightExpr(op, prec, noIn), startPos, startLoc); - }); - - case "fsharp": - return this.withSoloAwaitPermittingContext(() => { - return this.parseFSharpPipelineBody(prec, noIn); - }); - } - - default: - return this.parseExprOpBaseRightExpr(op, prec, noIn); - } - } - - parseExprOpBaseRightExpr(op, prec, noIn) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - return this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec, noIn); - } - - parseMaybeUnary(refShorthandDefaultPos) { - if (this.isContextual("await") && (this.scope.inAsync || !this.scope.inFunction && this.options.allowAwaitOutsideFunction)) { - return this.parseAwait(); - } else if (this.state.type.prefix) { - const node = this.startNode(); - const update = this.match(types.incDec); - node.operator = this.state.value; - node.prefix = true; - - if (node.operator === "throw") { - this.expectPlugin("throwExpressions"); - } - - this.next(); - node.argument = this.parseMaybeUnary(); - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - if (update) { - this.checkLVal(node.argument, undefined, undefined, "prefix operation"); - } else if (this.state.strict && node.operator === "delete") { - const arg = node.argument; - - if (arg.type === "Identifier") { - this.raise(node.start, "Deleting local variable in strict mode"); - } else if (arg.type === "MemberExpression" && arg.property.type === "PrivateName") { - this.raise(node.start, "Deleting a private field is not allowed"); - } - } - - return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } - - const startPos = this.state.start; - const startLoc = this.state.startLoc; - let expr = this.parseExprSubscripts(refShorthandDefaultPos); - if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr; - - while (this.state.type.postfix && !this.canInsertSemicolon()) { - const node = this.startNodeAt(startPos, startLoc); - node.operator = this.state.value; - node.prefix = false; - node.argument = expr; - this.checkLVal(expr, undefined, undefined, "postfix operation"); - this.next(); - expr = this.finishNode(node, "UpdateExpression"); - } - - return expr; - } - - parseExprSubscripts(refShorthandDefaultPos) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - const potentialArrowAt = this.state.potentialArrowAt; - const expr = this.parseExprAtom(refShorthandDefaultPos); - - if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) { - return expr; - } - - if (refShorthandDefaultPos && refShorthandDefaultPos.start) { - return expr; - } - - return this.parseSubscripts(expr, startPos, startLoc); - } - - parseSubscripts(base, startPos, startLoc, noCalls) { - const maybeAsyncArrow = this.atPossibleAsync(base); - const state = { - optionalChainMember: false, - stop: false - }; - - do { - base = this.parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow); - } while (!state.stop); - - return base; - } - - parseSubscript(base, startPos, startLoc, noCalls, state, maybeAsyncArrow) { - if (!noCalls && this.eat(types.doubleColon)) { - const node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.callee = this.parseNoCallExpr(); - state.stop = true; - return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls); - } else if (this.match(types.questionDot)) { - this.expectPlugin("optionalChaining"); - state.optionalChainMember = true; - - if (noCalls && this.lookahead().type === types.parenL) { - state.stop = true; - return base; - } - - this.next(); - const node = this.startNodeAt(startPos, startLoc); - - if (this.eat(types.bracketL)) { - node.object = base; - node.property = this.parseExpression(); - node.computed = true; - node.optional = true; - this.expect(types.bracketR); - return this.finishNode(node, "OptionalMemberExpression"); - } else if (this.eat(types.parenL)) { - node.callee = base; - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - node.optional = true; - return this.finishNode(node, "OptionalCallExpression"); - } else { - node.object = base; - node.property = this.parseIdentifier(true); - node.computed = false; - node.optional = true; - return this.finishNode(node, "OptionalMemberExpression"); - } - } else if (this.eat(types.dot)) { - const node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = this.parseMaybePrivateName(); - node.computed = false; - - if (state.optionalChainMember) { - node.optional = false; - return this.finishNode(node, "OptionalMemberExpression"); - } - - return this.finishNode(node, "MemberExpression"); - } else if (this.eat(types.bracketL)) { - const node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = this.parseExpression(); - node.computed = true; - this.expect(types.bracketR); - - if (state.optionalChainMember) { - node.optional = false; - return this.finishNode(node, "OptionalMemberExpression"); - } - - return this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.match(types.parenL)) { - const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - const oldYieldPos = this.state.yieldPos; - const oldAwaitPos = this.state.awaitPos; - this.state.maybeInArrowParameters = true; - this.state.yieldPos = 0; - this.state.awaitPos = 0; - this.next(); - let node = this.startNodeAt(startPos, startLoc); - node.callee = base; - const oldCommaAfterSpreadAt = this.state.commaAfterSpreadAt; - this.state.commaAfterSpreadAt = -1; - node.arguments = this.parseCallExpressionArguments(types.parenR, maybeAsyncArrow, base.type === "Import", base.type !== "Super"); - - if (!state.optionalChainMember) { - this.finishCallExpression(node); - } else { - this.finishOptionalCallExpression(node); - } - - if (maybeAsyncArrow && this.shouldParseAsyncArrow()) { - state.stop = true; - this.checkCommaAfterRestFromSpread(); - node = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node); - this.checkYieldAwaitInDefaultParams(); - this.state.yieldPos = oldYieldPos; - this.state.awaitPos = oldAwaitPos; - } else { - this.toReferencedListDeep(node.arguments); - this.state.yieldPos = oldYieldPos || this.state.yieldPos; - this.state.awaitPos = oldAwaitPos || this.state.awaitPos; - } - - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt; - return node; - } else if (this.match(types.backQuote)) { - return this.parseTaggedTemplateExpression(startPos, startLoc, base, state); - } else { - state.stop = true; - return base; - } - } - - parseTaggedTemplateExpression(startPos, startLoc, base, state, typeArguments) { - const node = this.startNodeAt(startPos, startLoc); - node.tag = base; - node.quasi = this.parseTemplate(true); - if (typeArguments) node.typeParameters = typeArguments; - - if (state.optionalChainMember) { - this.raise(startPos, "Tagged Template Literals are not allowed in optionalChain"); - } - - return this.finishNode(node, "TaggedTemplateExpression"); - } - - atPossibleAsync(base) { - return base.type === "Identifier" && base.name === "async" && this.state.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async"; - } - - finishCallExpression(node) { - if (node.callee.type === "Import") { - if (node.arguments.length !== 1) { - this.raise(node.start, "import() requires exactly one argument"); - } - - const importArg = node.arguments[0]; - - if (importArg && importArg.type === "SpreadElement") { - this.raise(importArg.start, "... is not allowed in import()"); - } - } - - return this.finishNode(node, "CallExpression"); - } - - finishOptionalCallExpression(node) { - if (node.callee.type === "Import") { - if (node.arguments.length !== 1) { - this.raise(node.start, "import() requires exactly one argument"); - } - - const importArg = node.arguments[0]; - - if (importArg && importArg.type === "SpreadElement") { - this.raise(importArg.start, "... is not allowed in import()"); - } - } - - return this.finishNode(node, "OptionalCallExpression"); - } - - parseCallExpressionArguments(close, possibleAsyncArrow, dynamicImport, allowPlaceholder) { - const elts = []; - let innerParenStart; - let first = true; - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.inFSharpPipelineDirectBody = false; - - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - - if (this.eat(close)) { - if (dynamicImport) { - this.raise(this.state.lastTokStart, "Trailing comma is disallowed inside import(...) arguments"); - } - - break; - } - } - - if (this.match(types.parenL) && !innerParenStart) { - innerParenStart = this.state.start; - } - - elts.push(this.parseExprListItem(false, possibleAsyncArrow ? { - start: 0 - } : undefined, possibleAsyncArrow ? { - start: 0 - } : undefined, allowPlaceholder)); - } - - if (possibleAsyncArrow && innerParenStart && this.shouldParseAsyncArrow()) { - this.unexpected(); - } - - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - return elts; - } - - shouldParseAsyncArrow() { - return this.match(types.arrow) && !this.canInsertSemicolon(); - } - - parseAsyncArrowFromCallExpression(node, call) { - this.expect(types.arrow); - this.parseArrowExpression(node, call.arguments, true); - return node; - } - - parseNoCallExpr() { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - } - - parseExprAtom(refShorthandDefaultPos) { - if (this.state.type === types.slash) this.readRegexp(); - const canBeArrow = this.state.potentialArrowAt === this.state.start; - let node; - - switch (this.state.type) { - case types._super: - if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) { - this.raise(this.state.start, "super is only allowed in object methods and classes"); - } - - node = this.startNode(); - this.next(); - - if (this.match(types.parenL) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) { - this.raise(node.start, "super() is only valid inside a class constructor of a subclass. " + "Maybe a typo in the method name ('constructor') or not extending another class?"); - } - - if (!this.match(types.parenL) && !this.match(types.bracketL) && !this.match(types.dot)) { - this.unexpected(); - } - - return this.finishNode(node, "Super"); - - case types._import: - node = this.startNode(); - this.next(); - - if (this.match(types.dot)) { - return this.parseImportMetaProperty(node); - } - - this.expectPlugin("dynamicImport", node.start); - - if (!this.match(types.parenL)) { - this.unexpected(null, types.parenL); - } - - return this.finishNode(node, "Import"); - - case types._this: - node = this.startNode(); - this.next(); - return this.finishNode(node, "ThisExpression"); - - case types.name: - { - node = this.startNode(); - const containsEsc = this.state.containsEsc; - const id = this.parseIdentifier(); - - if (!containsEsc && id.name === "async" && this.match(types._function) && !this.canInsertSemicolon()) { - this.next(); - return this.parseFunction(node, undefined, true); - } else if (canBeArrow && !containsEsc && id.name === "async" && this.match(types.name) && !this.canInsertSemicolon()) { - const params = [this.parseIdentifier()]; - this.expect(types.arrow); - this.parseArrowExpression(node, params, true); - return node; - } - - if (canBeArrow && this.match(types.arrow) && !this.canInsertSemicolon()) { - this.next(); - this.parseArrowExpression(node, [id], false); - return node; - } - - return id; - } - - case types._do: - { - this.expectPlugin("doExpressions"); - const node = this.startNode(); - this.next(); - const oldLabels = this.state.labels; - this.state.labels = []; - node.body = this.parseBlock(); - this.state.labels = oldLabels; - return this.finishNode(node, "DoExpression"); - } - - case types.regexp: - { - const value = this.state.value; - node = this.parseLiteral(value.value, "RegExpLiteral"); - node.pattern = value.pattern; - node.flags = value.flags; - return node; - } - - case types.num: - return this.parseLiteral(this.state.value, "NumericLiteral"); - - case types.bigint: - return this.parseLiteral(this.state.value, "BigIntLiteral"); - - case types.string: - return this.parseLiteral(this.state.value, "StringLiteral"); - - case types._null: - node = this.startNode(); - this.next(); - return this.finishNode(node, "NullLiteral"); - - case types._true: - case types._false: - return this.parseBooleanLiteral(); - - case types.parenL: - return this.parseParenAndDistinguishExpression(canBeArrow); - - case types.bracketL: - { - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.inFSharpPipelineDirectBody = false; - node = this.startNode(); - this.next(); - node.elements = this.parseExprList(types.bracketR, true, refShorthandDefaultPos); - - if (!this.state.maybeInArrowParameters) { - this.toReferencedList(node.elements); - } - - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - return this.finishNode(node, "ArrayExpression"); - } - - case types.braceL: - { - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.inFSharpPipelineDirectBody = false; - const ret = this.parseObj(false, refShorthandDefaultPos); - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - return ret; - } - - case types._function: - return this.parseFunctionExpression(); - - case types.at: - this.parseDecorators(); - - case types._class: - node = this.startNode(); - this.takeDecorators(node); - return this.parseClass(node, false); - - case types._new: - return this.parseNew(); - - case types.backQuote: - return this.parseTemplate(false); - - case types.doubleColon: - { - node = this.startNode(); - this.next(); - node.object = null; - const callee = node.callee = this.parseNoCallExpr(); - - if (callee.type === "MemberExpression") { - return this.finishNode(node, "BindExpression"); - } else { - throw this.raise(callee.start, "Binding should be performed on object property."); - } - } - - case types.hash: - { - if (this.state.inPipeline) { - node = this.startNode(); - - if (this.getPluginOption("pipelineOperator", "proposal") !== "smart") { - this.raise(node.start, "Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option."); - } - - this.next(); - - if (this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) { - this.registerTopicReference(); - return this.finishNode(node, "PipelinePrimaryTopicReference"); - } else { - throw this.raise(node.start, `Topic reference was used in a lexical context without topic binding`); - } - } - } - - default: - throw this.unexpected(); - } - } - - parseBooleanLiteral() { - const node = this.startNode(); - node.value = this.match(types._true); - this.next(); - return this.finishNode(node, "BooleanLiteral"); - } - - parseMaybePrivateName() { - const isPrivate = this.match(types.hash); - - if (isPrivate) { - this.expectOnePlugin(["classPrivateProperties", "classPrivateMethods"]); - const node = this.startNode(); - this.next(); - this.assertNoSpace("Unexpected space between # and identifier"); - node.id = this.parseIdentifier(true); - return this.finishNode(node, "PrivateName"); - } else { - return this.parseIdentifier(true); - } - } - - parseFunctionExpression() { - const node = this.startNode(); - let meta = this.startNode(); - this.next(); - meta = this.createIdentifier(meta, "function"); - - if (this.scope.inGenerator && this.eat(types.dot)) { - return this.parseMetaProperty(node, meta, "sent"); - } - - return this.parseFunction(node); - } - - parseMetaProperty(node, meta, propertyName) { - node.meta = meta; - - if (meta.name === "function" && propertyName === "sent") { - if (this.isContextual(propertyName)) { - this.expectPlugin("functionSent"); - } else if (!this.hasPlugin("functionSent")) { - this.unexpected(); - } - } - - const containsEsc = this.state.containsEsc; - node.property = this.parseIdentifier(true); - - if (node.property.name !== propertyName || containsEsc) { - this.raise(node.property.start, `The only valid meta property for ${meta.name} is ${meta.name}.${propertyName}`); - } - - return this.finishNode(node, "MetaProperty"); - } - - parseImportMetaProperty(node) { - const id = this.createIdentifier(this.startNodeAtNode(node), "import"); - this.expect(types.dot); - - if (this.isContextual("meta")) { - this.expectPlugin("importMeta"); - } else if (!this.hasPlugin("importMeta")) { - this.raise(id.start, `Dynamic imports require a parameter: import('a.js')`); - } - - if (!this.inModule) { - this.raise(id.start, `import.meta may appear only with 'sourceType: "module"'`, { - code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" - }); - } - - this.sawUnambiguousESM = true; - return this.parseMetaProperty(node, id, "meta"); - } - - parseLiteral(value, type, startPos, startLoc) { - startPos = startPos || this.state.start; - startLoc = startLoc || this.state.startLoc; - const node = this.startNodeAt(startPos, startLoc); - this.addExtra(node, "rawValue", value); - this.addExtra(node, "raw", this.input.slice(startPos, this.state.end)); - node.value = value; - this.next(); - return this.finishNode(node, type); - } - - parseParenAndDistinguishExpression(canBeArrow) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - let val; - this.expect(types.parenL); - const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - const oldYieldPos = this.state.yieldPos; - const oldAwaitPos = this.state.awaitPos; - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.maybeInArrowParameters = true; - this.state.yieldPos = 0; - this.state.awaitPos = 0; - this.state.inFSharpPipelineDirectBody = false; - const innerStartPos = this.state.start; - const innerStartLoc = this.state.startLoc; - const exprList = []; - const refShorthandDefaultPos = { - start: 0 - }; - const refNeedsArrowPos = { - start: 0 - }; - let first = true; - let spreadStart; - let optionalCommaStart; - - while (!this.match(types.parenR)) { - if (first) { - first = false; - } else { - this.expect(types.comma, refNeedsArrowPos.start || null); - - if (this.match(types.parenR)) { - optionalCommaStart = this.state.start; - break; - } - } - - if (this.match(types.ellipsis)) { - const spreadNodeStartPos = this.state.start; - const spreadNodeStartLoc = this.state.startLoc; - spreadStart = this.state.start; - exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc)); - this.checkCommaAfterRest(); - break; - } else { - exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos)); - } - } - - const innerEndPos = this.state.start; - const innerEndLoc = this.state.startLoc; - this.expect(types.parenR); - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - let arrowNode = this.startNodeAt(startPos, startLoc); - - if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) { - this.checkYieldAwaitInDefaultParams(); - this.state.yieldPos = oldYieldPos; - this.state.awaitPos = oldAwaitPos; - - for (let _i = 0; _i < exprList.length; _i++) { - const param = exprList[_i]; - - if (param.extra && param.extra.parenthesized) { - this.unexpected(param.extra.parenStart); - } - } - - this.parseArrowExpression(arrowNode, exprList, false); - return arrowNode; - } - - this.state.yieldPos = oldYieldPos || this.state.yieldPos; - this.state.awaitPos = oldAwaitPos || this.state.awaitPos; - - if (!exprList.length) { - this.unexpected(this.state.lastTokStart); - } - - if (optionalCommaStart) this.unexpected(optionalCommaStart); - if (spreadStart) this.unexpected(spreadStart); - - if (refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - if (refNeedsArrowPos.start) this.unexpected(refNeedsArrowPos.start); - this.toReferencedListDeep(exprList, true); - - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; - } - - if (!this.options.createParenthesizedExpressions) { - this.addExtra(val, "parenthesized", true); - this.addExtra(val, "parenStart", startPos); - return val; - } - - const parenExpression = this.startNodeAt(startPos, startLoc); - parenExpression.expression = val; - this.finishNode(parenExpression, "ParenthesizedExpression"); - return parenExpression; - } - - shouldParseArrow() { - return !this.canInsertSemicolon(); - } - - parseArrow(node) { - if (this.eat(types.arrow)) { - return node; - } - } - - parseParenItem(node, startPos, startLoc) { - return node; - } - - parseNew() { - const node = this.startNode(); - const meta = this.parseIdentifier(true); - - if (this.eat(types.dot)) { - const metaProp = this.parseMetaProperty(node, meta, "target"); - - if (!this.scope.inNonArrowFunction && !this.state.inClassProperty) { - let error = "new.target can only be used in functions"; - - if (this.hasPlugin("classProperties")) { - error += " or class properties"; - } - - this.raise(metaProp.start, error); - } - - return metaProp; - } - - node.callee = this.parseNoCallExpr(); - - if (node.callee.type === "Import") { - this.raise(node.callee.start, "Cannot use new with import(...)"); - } else if (node.callee.type === "OptionalMemberExpression" || node.callee.type === "OptionalCallExpression") { - this.raise(this.state.lastTokEnd, "constructors in/after an Optional Chain are not allowed"); - } else if (this.eat(types.questionDot)) { - this.raise(this.state.start, "constructors in/after an Optional Chain are not allowed"); - } - - this.parseNewArguments(node); - return this.finishNode(node, "NewExpression"); - } - - parseNewArguments(node) { - if (this.eat(types.parenL)) { - const args = this.parseExprList(types.parenR); - this.toReferencedList(args); - node.arguments = args; - } else { - node.arguments = []; - } - } - - parseTemplateElement(isTagged) { - const elem = this.startNode(); - - if (this.state.value === null) { - if (!isTagged) { - this.raise(this.state.invalidTemplateEscapePosition || 0, "Invalid escape sequence in template"); - } else { - this.state.invalidTemplateEscapePosition = null; - } - } - - elem.value = { - raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"), - cooked: this.state.value - }; - this.next(); - elem.tail = this.match(types.backQuote); - return this.finishNode(elem, "TemplateElement"); - } - - parseTemplate(isTagged) { - const node = this.startNode(); - this.next(); - node.expressions = []; - let curElt = this.parseTemplateElement(isTagged); - node.quasis = [curElt]; - - while (!curElt.tail) { - this.expect(types.dollarBraceL); - node.expressions.push(this.parseExpression()); - this.expect(types.braceR); - node.quasis.push(curElt = this.parseTemplateElement(isTagged)); - } - - this.next(); - return this.finishNode(node, "TemplateLiteral"); - } - - parseObj(isPattern, refShorthandDefaultPos) { - const propHash = Object.create(null); - let first = true; - const node = this.startNode(); - node.properties = []; - this.next(); - - while (!this.eat(types.braceR)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(types.braceR)) break; - } - - const prop = this.parseObjectMember(isPattern, refShorthandDefaultPos); - if (!isPattern) this.checkPropClash(prop, propHash); - - if (prop.shorthand) { - this.addExtra(prop, "shorthand", true); - } - - node.properties.push(prop); - } - - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); - } - - isAsyncProp(prop) { - return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.match(types.name) || this.match(types.num) || this.match(types.string) || this.match(types.bracketL) || this.state.type.keyword || this.match(types.star)) && !this.hasPrecedingLineBreak(); - } - - parseObjectMember(isPattern, refShorthandDefaultPos) { - let decorators = []; - - if (this.match(types.at)) { - if (this.hasPlugin("decorators")) { - this.raise(this.state.start, "Stage 2 decorators disallow object literal property decorators"); - } else { - while (this.match(types.at)) { - decorators.push(this.parseDecorator()); - } - } - } - - const prop = this.startNode(); - let isGenerator = false; - let isAsync = false; - let startPos; - let startLoc; - - if (this.match(types.ellipsis)) { - if (decorators.length) this.unexpected(); - - if (isPattern) { - this.next(); - prop.argument = this.parseIdentifier(); - this.checkCommaAfterRest(); - return this.finishNode(prop, "RestElement"); - } - - return this.parseSpread(); - } - - if (decorators.length) { - prop.decorators = decorators; - decorators = []; - } - - prop.method = false; - - if (isPattern || refShorthandDefaultPos) { - startPos = this.state.start; - startLoc = this.state.startLoc; - } - - if (!isPattern) { - isGenerator = this.eat(types.star); - } - - const containsEsc = this.state.containsEsc; - this.parsePropertyName(prop); - - if (!isPattern && !containsEsc && !isGenerator && this.isAsyncProp(prop)) { - isAsync = true; - isGenerator = this.eat(types.star); - this.parsePropertyName(prop); - } else { - isAsync = false; - } - - this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc); - return prop; - } - - isGetterOrSetterMethod(prop, isPattern) { - return !isPattern && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.match(types.string) || this.match(types.num) || this.match(types.bracketL) || this.match(types.name) || !!this.state.type.keyword); - } - - getGetterSetterExpectedParamCount(method) { - return method.kind === "get" ? 0 : 1; - } - - checkGetterSetterParams(method) { - const paramCount = this.getGetterSetterExpectedParamCount(method); - const start = method.start; - - if (method.params.length !== paramCount) { - if (method.kind === "get") { - this.raise(start, "getter must not have any formal parameters"); - } else { - this.raise(start, "setter must have exactly one formal parameter"); - } - } - - if (method.kind === "set" && method.params[method.params.length - 1].type === "RestElement") { - this.raise(start, "setter function argument must not be a rest parameter"); - } - } - - parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) { - if (isAsync || isGenerator || this.match(types.parenL)) { - if (isPattern) this.unexpected(); - prop.kind = "method"; - prop.method = true; - return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod"); - } - - if (!containsEsc && this.isGetterOrSetterMethod(prop, isPattern)) { - if (isGenerator || isAsync) this.unexpected(); - prop.kind = prop.key.name; - this.parsePropertyName(prop); - this.parseMethod(prop, false, false, false, false, "ObjectMethod"); - this.checkGetterSetterParams(prop); - return prop; - } - } - - parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) { - prop.shorthand = false; - - if (this.eat(types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos); - return this.finishNode(prop, "ObjectProperty"); - } - - if (!prop.computed && prop.key.type === "Identifier") { - this.checkReservedWord(prop.key.name, prop.key.start, true, true); - - if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone()); - } else if (this.match(types.eq) && refShorthandDefaultPos) { - if (!refShorthandDefaultPos.start) { - refShorthandDefaultPos.start = this.state.start; - } - - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone()); - } else { - prop.value = prop.key.__clone(); - } - - prop.shorthand = true; - return this.finishNode(prop, "ObjectProperty"); - } - } - - parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) { - const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos); - if (!node) this.unexpected(); - return node; - } - - parsePropertyName(prop) { - if (this.eat(types.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(types.bracketR); - } else { - const oldInPropertyName = this.state.inPropertyName; - this.state.inPropertyName = true; - prop.key = this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseMaybePrivateName(); - - if (prop.key.type !== "PrivateName") { - prop.computed = false; - } - - this.state.inPropertyName = oldInPropertyName; - } - - return prop.key; - } - - initFunction(node, isAsync) { - node.id = null; - node.generator = false; - node.async = !!isAsync; - } - - parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { - const oldYieldPos = this.state.yieldPos; - const oldAwaitPos = this.state.awaitPos; - this.state.yieldPos = 0; - this.state.awaitPos = 0; - this.initFunction(node, isAsync); - node.generator = !!isGenerator; - const allowModifiers = isConstructor; - this.scope.enter(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); - this.parseFunctionParams(node, allowModifiers); - this.checkYieldAwaitInDefaultParams(); - this.parseFunctionBodyAndFinish(node, type, true); - this.scope.exit(); - this.state.yieldPos = oldYieldPos; - this.state.awaitPos = oldAwaitPos; - return node; - } - - parseArrowExpression(node, params, isAsync) { - this.scope.enter(functionFlags(isAsync, false) | SCOPE_ARROW); - this.initFunction(node, isAsync); - const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - const oldYieldPos = this.state.yieldPos; - const oldAwaitPos = this.state.awaitPos; - this.state.maybeInArrowParameters = false; - this.state.yieldPos = 0; - this.state.awaitPos = 0; - if (params) this.setArrowFunctionParameters(node, params); - this.parseFunctionBody(node, true); - this.scope.exit(); - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - this.state.yieldPos = oldYieldPos; - this.state.awaitPos = oldAwaitPos; - return this.finishNode(node, "ArrowFunctionExpression"); - } - - setArrowFunctionParameters(node, params) { - node.params = this.toAssignableList(params, true, "arrow function parameters"); - } - - isStrictBody(node) { - const isBlockStatement = node.body.type === "BlockStatement"; - - if (isBlockStatement && node.body.directives.length) { - for (let _i2 = 0, _node$body$directives = node.body.directives; _i2 < _node$body$directives.length; _i2++) { - const directive = _node$body$directives[_i2]; - - if (directive.value.value === "use strict") { - return true; - } - } - } - - return false; - } - - parseFunctionBodyAndFinish(node, type, isMethod = false) { - this.parseFunctionBody(node, false, isMethod); - this.finishNode(node, type); - } - - parseFunctionBody(node, allowExpression, isMethod = false) { - const isExpression = allowExpression && !this.match(types.braceL); - const oldStrict = this.state.strict; - let useStrict = false; - const oldInParameters = this.state.inParameters; - this.state.inParameters = false; - - if (isExpression) { - node.body = this.parseMaybeAssign(); - this.checkParams(node, false, allowExpression); - } else { - const nonSimple = !this.isSimpleParamList(node.params); - - if (!oldStrict || nonSimple) { - useStrict = this.strictDirective(this.state.end); - - if (useStrict && nonSimple) { - const errorPos = (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.end : node.start; - this.raise(errorPos, "Illegal 'use strict' directive in function with non-simple parameter list"); - } - } - - const oldLabels = this.state.labels; - this.state.labels = []; - if (useStrict) this.state.strict = true; - this.checkParams(node, !oldStrict && !useStrict && !allowExpression && !isMethod && !nonSimple, allowExpression); - node.body = this.parseBlock(true, false); - this.state.labels = oldLabels; - } - - this.state.inParameters = oldInParameters; - - if (this.state.strict && node.id) { - this.checkLVal(node.id, BIND_OUTSIDE, undefined, "function name"); - } - - this.state.strict = oldStrict; - } - - isSimpleParamList(params) { - for (let i = 0, len = params.length; i < len; i++) { - if (params[i].type !== "Identifier") return false; - } - - return true; - } - - checkParams(node, allowDuplicates, isArrowFunction) { - const nameHash = Object.create(null); - - for (let i = 0; i < node.params.length; i++) { - this.checkLVal(node.params[i], BIND_VAR, allowDuplicates ? null : nameHash, "function paramter list"); - } - } - - parseExprList(close, allowEmpty, refShorthandDefaultPos) { - const elts = []; - let first = true; - - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(close)) break; - } - - elts.push(this.parseExprListItem(allowEmpty, refShorthandDefaultPos)); - } - - return elts; - } - - parseExprListItem(allowEmpty, refShorthandDefaultPos, refNeedsArrowPos, allowPlaceholder) { - let elt; - - if (allowEmpty && this.match(types.comma)) { - elt = null; - } else if (this.match(types.ellipsis)) { - const spreadNodeStartPos = this.state.start; - const spreadNodeStartLoc = this.state.startLoc; - elt = this.parseParenItem(this.parseSpread(refShorthandDefaultPos, refNeedsArrowPos), spreadNodeStartPos, spreadNodeStartLoc); - } else if (this.match(types.question)) { - this.expectPlugin("partialApplication"); - - if (!allowPlaceholder) { - this.raise(this.state.start, "Unexpected argument placeholder"); - } - - const node = this.startNode(); - this.next(); - elt = this.finishNode(node, "ArgumentPlaceholder"); - } else { - elt = this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos); - } - - return elt; - } - - parseIdentifier(liberal) { - const node = this.startNode(); - const name = this.parseIdentifierName(node.start, liberal); - return this.createIdentifier(node, name); - } - - createIdentifier(node, name) { - node.name = name; - node.loc.identifierName = name; - return this.finishNode(node, "Identifier"); - } - - parseIdentifierName(pos, liberal) { - let name; - - if (this.match(types.name)) { - name = this.state.value; - } else if (this.state.type.keyword) { - name = this.state.type.keyword; - - if ((name === "class" || name === "function") && (this.state.lastTokEnd !== this.state.lastTokStart + 1 || this.input.charCodeAt(this.state.lastTokStart) !== 46)) { - this.state.context.pop(); - } - } else { - throw this.unexpected(); - } - - if (!liberal) { - this.checkReservedWord(name, this.state.start, !!this.state.type.keyword, false); - } - - this.next(); - return name; - } - - checkReservedWord(word, startLoc, checkKeywords, isBinding) { - if (this.scope.inGenerator && word === "yield") { - this.raise(startLoc, "Can not use 'yield' as identifier inside a generator"); - } - - if (this.scope.inAsync && word === "await") { - this.raise(startLoc, "Can not use 'await' as identifier inside an async function"); - } - - if (this.state.inClassProperty && word === "arguments") { - this.raise(startLoc, "'arguments' is not allowed in class field initializer"); - } - - if (checkKeywords && isKeyword(word)) { - this.raise(startLoc, `Unexpected keyword '${word}'`); - } - - const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord; - - if (reservedTest(word, this.inModule)) { - if (!this.scope.inAsync && word === "await") { - this.raise(startLoc, "Can not use keyword 'await' outside an async function"); - } - - this.raise(startLoc, `Unexpected reserved word '${word}'`); - } - } - - parseAwait() { - if (!this.state.awaitPos) { - this.state.awaitPos = this.state.start; - } - - const node = this.startNode(); - this.next(); - - if (this.state.inParameters) { - this.raise(node.start, "await is not allowed in async function parameters"); - } - - if (this.match(types.star)) { - this.raise(node.start, "await* has been removed from the async functions proposal. Use Promise.all() instead."); - } - - if (!this.state.soloAwait) { - node.argument = this.parseMaybeUnary(); - } - - return this.finishNode(node, "AwaitExpression"); - } - - parseYield(noIn) { - if (!this.state.yieldPos) { - this.state.yieldPos = this.state.start; - } - - const node = this.startNode(); - - if (this.state.inParameters) { - this.raise(node.start, "yield is not allowed in generator parameters"); - } - - this.next(); - - if (this.match(types.semi) || !this.match(types.star) && !this.state.type.startsExpr || this.canInsertSemicolon()) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(types.star); - node.argument = this.parseMaybeAssign(noIn); - } - - return this.finishNode(node, "YieldExpression"); - } - - checkPipelineAtInfixOperator(left, leftStartPos) { - if (this.getPluginOption("pipelineOperator", "proposal") === "smart") { - if (left.type === "SequenceExpression") { - throw this.raise(leftStartPos, `Pipeline head should not be a comma-separated sequence expression`); - } - } - } - - parseSmartPipelineBody(childExpression, startPos, startLoc) { - const pipelineStyle = this.checkSmartPipelineBodyStyle(childExpression); - this.checkSmartPipelineBodyEarlyErrors(childExpression, pipelineStyle, startPos); - return this.parseSmartPipelineBodyInStyle(childExpression, pipelineStyle, startPos, startLoc); - } - - checkSmartPipelineBodyEarlyErrors(childExpression, pipelineStyle, startPos) { - if (this.match(types.arrow)) { - throw this.raise(this.state.start, `Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized`); - } else if (pipelineStyle === "PipelineTopicExpression" && childExpression.type === "SequenceExpression") { - throw this.raise(startPos, `Pipeline body may not be a comma-separated sequence expression`); - } - } - - parseSmartPipelineBodyInStyle(childExpression, pipelineStyle, startPos, startLoc) { - const bodyNode = this.startNodeAt(startPos, startLoc); - - switch (pipelineStyle) { - case "PipelineBareFunction": - bodyNode.callee = childExpression; - break; - - case "PipelineBareConstructor": - bodyNode.callee = childExpression.callee; - break; - - case "PipelineBareAwaitedFunction": - bodyNode.callee = childExpression.argument; - break; - - case "PipelineTopicExpression": - if (!this.topicReferenceWasUsedInCurrentTopicContext()) { - throw this.raise(startPos, `Pipeline is in topic style but does not use topic reference`); - } - - bodyNode.expression = childExpression; - break; - - default: - throw this.raise(startPos, `Unknown pipeline style ${pipelineStyle}`); - } - - return this.finishNode(bodyNode, pipelineStyle); - } - - checkSmartPipelineBodyStyle(expression) { - switch (expression.type) { - default: - return this.isSimpleReference(expression) ? "PipelineBareFunction" : "PipelineTopicExpression"; - } - } - - isSimpleReference(expression) { - switch (expression.type) { - case "MemberExpression": - return !expression.computed && this.isSimpleReference(expression.object); - - case "Identifier": - return true; - - default: - return false; - } - } - - withTopicPermittingContext(callback) { - const outerContextTopicState = this.state.topicContext; - this.state.topicContext = { - maxNumOfResolvableTopics: 1, - maxTopicIndex: null - }; - - try { - return callback(); - } finally { - this.state.topicContext = outerContextTopicState; - } - } - - withTopicForbiddingContext(callback) { - const outerContextTopicState = this.state.topicContext; - this.state.topicContext = { - maxNumOfResolvableTopics: 0, - maxTopicIndex: null - }; - - try { - return callback(); - } finally { - this.state.topicContext = outerContextTopicState; - } - } - - withSoloAwaitPermittingContext(callback) { - const outerContextSoloAwaitState = this.state.soloAwait; - this.state.soloAwait = true; - - try { - return callback(); - } finally { - this.state.soloAwait = outerContextSoloAwaitState; - } - } - - registerTopicReference() { - this.state.topicContext.maxTopicIndex = 0; - } - - primaryTopicReferenceIsAllowedInCurrentTopicContext() { - return this.state.topicContext.maxNumOfResolvableTopics >= 1; - } - - topicReferenceWasUsedInCurrentTopicContext() { - return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0; - } - - parseFSharpPipelineBody(prec, noIn) { - const startPos = this.state.start; - const startLoc = this.state.startLoc; - this.state.potentialArrowAt = this.state.start; - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; - this.state.inFSharpPipelineDirectBody = true; - const ret = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec, noIn); - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - return ret; - } - -} - -const loopLabel = { - kind: "loop" -}, - switchLabel = { - kind: "switch" -}; -const FUNC_NO_FLAGS = 0b000, - FUNC_STATEMENT = 0b001, - FUNC_HANGING_STATEMENT = 0b010, - FUNC_NULLABLE_ID = 0b100; -class StatementParser extends ExpressionParser { - parseTopLevel(file, program) { - program.sourceType = this.options.sourceType; - program.interpreter = this.parseInterpreterDirective(); - this.parseBlockBody(program, true, true, types.eof); - - if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) { - for (let _i = 0, _Array$from = Array.from(this.scope.undefinedExports); _i < _Array$from.length; _i++) { - const [name] = _Array$from[_i]; - const pos = this.scope.undefinedExports.get(name); - this.raise(pos, `Export '${name}' is not defined`); - } - } - - file.program = this.finishNode(program, "Program"); - file.comments = this.state.comments; - if (this.options.tokens) file.tokens = this.state.tokens; - return this.finishNode(file, "File"); - } - - stmtToDirective(stmt) { - const expr = stmt.expression; - const directiveLiteral = this.startNodeAt(expr.start, expr.loc.start); - const directive = this.startNodeAt(stmt.start, stmt.loc.start); - const raw = this.input.slice(expr.start, expr.end); - const val = directiveLiteral.value = raw.slice(1, -1); - this.addExtra(directiveLiteral, "raw", raw); - this.addExtra(directiveLiteral, "rawValue", val); - directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end); - return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end); - } - - parseInterpreterDirective() { - if (!this.match(types.interpreterDirective)) { - return null; - } - - const node = this.startNode(); - node.value = this.state.value; - this.next(); - return this.finishNode(node, "InterpreterDirective"); - } - - isLet(context) { - if (!this.isContextual("let")) { - return false; - } - - skipWhiteSpace.lastIndex = this.state.pos; - const skip = skipWhiteSpace.exec(this.input); - const next = this.state.pos + skip[0].length; - const nextCh = this.input.charCodeAt(next); - if (nextCh === 91) return true; - if (context) return false; - if (nextCh === 123) return true; - - if (isIdentifierStart(nextCh)) { - let pos = next + 1; - - while (isIdentifierChar(this.input.charCodeAt(pos))) { - ++pos; - } - - const ident = this.input.slice(next, pos); - if (!keywordRelationalOperator.test(ident)) return true; - } - - return false; - } - - parseStatement(context, topLevel) { - if (this.match(types.at)) { - this.parseDecorators(true); - } - - return this.parseStatementContent(context, topLevel); - } - - parseStatementContent(context, topLevel) { - let starttype = this.state.type; - const node = this.startNode(); - let kind; - - if (this.isLet(context)) { - starttype = types._var; - kind = "let"; - } - - switch (starttype) { - case types._break: - case types._continue: - return this.parseBreakContinueStatement(node, starttype.keyword); - - case types._debugger: - return this.parseDebuggerStatement(node); - - case types._do: - return this.parseDoStatement(node); - - case types._for: - return this.parseForStatement(node); - - case types._function: - if (this.lookahead().type === types.dot) break; - - if (context) { - if (this.state.strict) { - this.raise(this.state.start, "In strict mode code, functions can only be declared at top level or inside a block"); - } else if (context !== "if" && context !== "label") { - this.raise(this.state.start, "In non-strict mode code, functions can only be declared at top level, " + "inside a block, or as the body of an if statement"); - } - } - - return this.parseFunctionStatement(node, false, !context); - - case types._class: - if (context) this.unexpected(); - return this.parseClass(node, true); - - case types._if: - return this.parseIfStatement(node); - - case types._return: - return this.parseReturnStatement(node); - - case types._switch: - return this.parseSwitchStatement(node); - - case types._throw: - return this.parseThrowStatement(node); - - case types._try: - return this.parseTryStatement(node); - - case types._const: - case types._var: - kind = kind || this.state.value; - - if (context && kind !== "var") { - this.unexpected(this.state.start, "Lexical declaration cannot appear in a single-statement context"); - } - - return this.parseVarStatement(node, kind); - - case types._while: - return this.parseWhileStatement(node); - - case types._with: - return this.parseWithStatement(node); - - case types.braceL: - return this.parseBlock(); - - case types.semi: - return this.parseEmptyStatement(node); - - case types._export: - case types._import: - { - const nextToken = this.lookahead(); - - if (nextToken.type === types.parenL || nextToken.type === types.dot) { - break; - } - - if (!this.options.allowImportExportEverywhere && !topLevel) { - this.raise(this.state.start, "'import' and 'export' may only appear at the top level"); - } - - this.next(); - let result; - - if (starttype === types._import) { - result = this.parseImport(node); - - if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) { - this.sawUnambiguousESM = true; - } - } else { - result = this.parseExport(node); - - if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") { - this.sawUnambiguousESM = true; - } - } - - this.assertModuleNodeAllowed(node); - return result; - } - - default: - { - if (this.isAsyncFunction()) { - if (context) { - this.unexpected(null, "Async functions can only be declared at the top level or inside a block"); - } - - this.next(); - return this.parseFunctionStatement(node, true, !context); - } - } - } - - const maybeName = this.state.value; - const expr = this.parseExpression(); - - if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) { - return this.parseLabeledStatement(node, maybeName, expr, context); - } else { - return this.parseExpressionStatement(node, expr); - } - } - - assertModuleNodeAllowed(node) { - if (!this.options.allowImportExportEverywhere && !this.inModule) { - this.raise(node.start, `'import' and 'export' may appear only with 'sourceType: "module"'`, { - code: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" - }); - } - } - - takeDecorators(node) { - const decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - if (decorators.length) { - node.decorators = decorators; - this.resetStartLocationFromNode(node, decorators[0]); - this.state.decoratorStack[this.state.decoratorStack.length - 1] = []; - } - } - - canHaveLeadingDecorator() { - return this.match(types._class); - } - - parseDecorators(allowExport) { - const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - while (this.match(types.at)) { - const decorator = this.parseDecorator(); - currentContextDecorators.push(decorator); - } - - if (this.match(types._export)) { - if (!allowExport) { - this.unexpected(); - } - - if (this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport")) { - this.raise(this.state.start, "Using the export keyword between a decorator and a class is not allowed. " + "Please use `export @dec class` instead."); - } - } else if (!this.canHaveLeadingDecorator()) { - this.raise(this.state.start, "Leading decorators must be attached to a class declaration"); - } - } - - parseDecorator() { - this.expectOnePlugin(["decorators-legacy", "decorators"]); - const node = this.startNode(); - this.next(); - - if (this.hasPlugin("decorators")) { - this.state.decoratorStack.push([]); - const startPos = this.state.start; - const startLoc = this.state.startLoc; - let expr; - - if (this.eat(types.parenL)) { - expr = this.parseExpression(); - this.expect(types.parenR); - } else { - expr = this.parseIdentifier(false); - - while (this.eat(types.dot)) { - const node = this.startNodeAt(startPos, startLoc); - node.object = expr; - node.property = this.parseIdentifier(true); - node.computed = false; - expr = this.finishNode(node, "MemberExpression"); - } - } - - node.expression = this.parseMaybeDecoratorArguments(expr); - this.state.decoratorStack.pop(); - } else { - node.expression = this.parseExprSubscripts(); - } - - return this.finishNode(node, "Decorator"); - } - - parseMaybeDecoratorArguments(expr) { - if (this.eat(types.parenL)) { - const node = this.startNodeAtNode(expr); - node.callee = expr; - node.arguments = this.parseCallExpressionArguments(types.parenR, false); - this.toReferencedList(node.arguments); - return this.finishNode(node, "CallExpression"); - } - - return expr; - } - - parseBreakContinueStatement(node, keyword) { - const isBreak = keyword === "break"; - this.next(); - - if (this.isLineTerminator()) { - node.label = null; - } else { - node.label = this.parseIdentifier(); - this.semicolon(); - } - - this.verifyBreakContinue(node, keyword); - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); - } - - verifyBreakContinue(node, keyword) { - const isBreak = keyword === "break"; - let i; - - for (i = 0; i < this.state.labels.length; ++i) { - const lab = this.state.labels[i]; - - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) break; - if (node.label && isBreak) break; - } - } - - if (i === this.state.labels.length) { - this.raise(node.start, "Unsyntactic " + keyword); - } - } - - parseDebuggerStatement(node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement"); - } - - parseHeaderExpression() { - this.expect(types.parenL); - const val = this.parseExpression(); - this.expect(types.parenR); - return val; - } - - parseDoStatement(node) { - this.next(); - this.state.labels.push(loopLabel); - node.body = this.withTopicForbiddingContext(() => this.parseStatement("do")); - this.state.labels.pop(); - this.expect(types._while); - node.test = this.parseHeaderExpression(); - this.eat(types.semi); - return this.finishNode(node, "DoWhileStatement"); - } - - parseForStatement(node) { - this.next(); - this.state.labels.push(loopLabel); - let awaitAt = -1; - - if ((this.scope.inAsync || !this.scope.inFunction && this.options.allowAwaitOutsideFunction) && this.eatContextual("await")) { - awaitAt = this.state.lastTokStart; - } - - this.scope.enter(SCOPE_OTHER); - this.expect(types.parenL); - - if (this.match(types.semi)) { - if (awaitAt > -1) { - this.unexpected(awaitAt); - } - - return this.parseFor(node, null); - } - - const isLet = this.isLet(); - - if (this.match(types._var) || this.match(types._const) || isLet) { - const init = this.startNode(); - const kind = isLet ? "let" : this.state.value; - this.next(); - this.parseVar(init, true, kind); - this.finishNode(init, "VariableDeclaration"); - - if ((this.match(types._in) || this.isContextual("of")) && init.declarations.length === 1) { - return this.parseForIn(node, init, awaitAt); - } - - if (awaitAt > -1) { - this.unexpected(awaitAt); - } - - return this.parseFor(node, init); - } - - const refShorthandDefaultPos = { - start: 0 - }; - const init = this.parseExpression(true, refShorthandDefaultPos); - - if (this.match(types._in) || this.isContextual("of")) { - const description = this.isContextual("of") ? "for-of statement" : "for-in statement"; - this.toAssignable(init, undefined, description); - this.checkLVal(init, undefined, undefined, description); - return this.parseForIn(node, init, awaitAt); - } else if (refShorthandDefaultPos.start) { - this.unexpected(refShorthandDefaultPos.start); - } - - if (awaitAt > -1) { - this.unexpected(awaitAt); - } - - return this.parseFor(node, init); - } - - parseFunctionStatement(node, isAsync, declarationPosition) { - this.next(); - return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), isAsync); - } - - parseIfStatement(node) { - this.next(); - node.test = this.parseHeaderExpression(); - node.consequent = this.parseStatement("if"); - node.alternate = this.eat(types._else) ? this.parseStatement("if") : null; - return this.finishNode(node, "IfStatement"); - } - - parseReturnStatement(node) { - if (!this.scope.inFunction && !this.options.allowReturnOutsideFunction) { - this.raise(this.state.start, "'return' outside of function"); - } - - this.next(); - - if (this.isLineTerminator()) { - node.argument = null; - } else { - node.argument = this.parseExpression(); - this.semicolon(); - } - - return this.finishNode(node, "ReturnStatement"); - } - - parseSwitchStatement(node) { - this.next(); - node.discriminant = this.parseHeaderExpression(); - const cases = node.cases = []; - this.expect(types.braceL); - this.state.labels.push(switchLabel); - this.scope.enter(SCOPE_OTHER); - let cur; - - for (let sawDefault; !this.match(types.braceR);) { - if (this.match(types._case) || this.match(types._default)) { - const isCase = this.match(types._case); - if (cur) this.finishNode(cur, "SwitchCase"); - cases.push(cur = this.startNode()); - cur.consequent = []; - this.next(); - - if (isCase) { - cur.test = this.parseExpression(); - } else { - if (sawDefault) { - this.raise(this.state.lastTokStart, "Multiple default clauses"); - } - - sawDefault = true; - cur.test = null; - } - - this.expect(types.colon); - } else { - if (cur) { - cur.consequent.push(this.parseStatement(null)); - } else { - this.unexpected(); - } - } - } - - this.scope.exit(); - if (cur) this.finishNode(cur, "SwitchCase"); - this.next(); - this.state.labels.pop(); - return this.finishNode(node, "SwitchStatement"); - } - - parseThrowStatement(node) { - this.next(); - - if (lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) { - this.raise(this.state.lastTokEnd, "Illegal newline after throw"); - } - - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement"); - } - - parseTryStatement(node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - - if (this.match(types._catch)) { - const clause = this.startNode(); - this.next(); - - if (this.match(types.parenL)) { - this.expect(types.parenL); - clause.param = this.parseBindingAtom(); - const simple = clause.param.type === "Identifier"; - this.scope.enter(simple ? SCOPE_SIMPLE_CATCH : 0); - this.checkLVal(clause.param, BIND_LEXICAL, null, "catch clause"); - this.expect(types.parenR); - } else { - clause.param = null; - this.scope.enter(SCOPE_OTHER); - } - - clause.body = this.withTopicForbiddingContext(() => this.parseBlock(false, false)); - this.scope.exit(); - node.handler = this.finishNode(clause, "CatchClause"); - } - - node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; - - if (!node.handler && !node.finalizer) { - this.raise(node.start, "Missing catch or finally clause"); - } - - return this.finishNode(node, "TryStatement"); - } - - parseVarStatement(node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration"); - } - - parseWhileStatement(node) { - this.next(); - node.test = this.parseHeaderExpression(); - this.state.labels.push(loopLabel); - node.body = this.withTopicForbiddingContext(() => this.parseStatement("while")); - this.state.labels.pop(); - return this.finishNode(node, "WhileStatement"); - } - - parseWithStatement(node) { - if (this.state.strict) { - this.raise(this.state.start, "'with' in strict mode"); - } - - this.next(); - node.object = this.parseHeaderExpression(); - node.body = this.withTopicForbiddingContext(() => this.parseStatement("with")); - return this.finishNode(node, "WithStatement"); - } - - parseEmptyStatement(node) { - this.next(); - return this.finishNode(node, "EmptyStatement"); - } - - parseLabeledStatement(node, maybeName, expr, context) { - for (let _i2 = 0, _this$state$labels = this.state.labels; _i2 < _this$state$labels.length; _i2++) { - const label = _this$state$labels[_i2]; - - if (label.name === maybeName) { - this.raise(expr.start, `Label '${maybeName}' is already declared`); - } - } - - const kind = this.state.type.isLoop ? "loop" : this.match(types._switch) ? "switch" : null; - - for (let i = this.state.labels.length - 1; i >= 0; i--) { - const label = this.state.labels[i]; - - if (label.statementStart === node.start) { - label.statementStart = this.state.start; - label.kind = kind; - } else { - break; - } - } - - this.state.labels.push({ - name: maybeName, - kind: kind, - statementStart: this.state.start - }); - node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); - this.state.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement"); - } - - parseExpressionStatement(node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement"); - } - - parseBlock(allowDirectives = false, createNewLexicalScope = true) { - const node = this.startNode(); - this.expect(types.braceL); - - if (createNewLexicalScope) { - this.scope.enter(SCOPE_OTHER); - } - - this.parseBlockBody(node, allowDirectives, false, types.braceR); - - if (createNewLexicalScope) { - this.scope.exit(); - } - - return this.finishNode(node, "BlockStatement"); - } - - isValidDirective(stmt) { - return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized; - } - - parseBlockBody(node, allowDirectives, topLevel, end) { - const body = node.body = []; - const directives = node.directives = []; - this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end); - } - - parseBlockOrModuleBlockBody(body, directives, topLevel, end) { - let parsedNonDirective = false; - let oldStrict; - let octalPosition; - - while (!this.eat(end)) { - if (!parsedNonDirective && this.state.containsOctal && !octalPosition) { - octalPosition = this.state.octalPosition; - } - - const stmt = this.parseStatement(null, topLevel); - - if (directives && !parsedNonDirective && this.isValidDirective(stmt)) { - const directive = this.stmtToDirective(stmt); - directives.push(directive); - - if (oldStrict === undefined && directive.value.value === "use strict") { - oldStrict = this.state.strict; - this.setStrict(true); - - if (octalPosition) { - this.raise(octalPosition, "Octal literal in strict mode"); - } - } - - continue; - } - - parsedNonDirective = true; - body.push(stmt); - } - - if (oldStrict === false) { - this.setStrict(false); - } - } - - parseFor(node, init) { - node.init = init; - this.expect(types.semi); - node.test = this.match(types.semi) ? null : this.parseExpression(); - this.expect(types.semi); - node.update = this.match(types.parenR) ? null : this.parseExpression(); - this.expect(types.parenR); - node.body = this.withTopicForbiddingContext(() => this.parseStatement("for")); - this.scope.exit(); - this.state.labels.pop(); - return this.finishNode(node, "ForStatement"); - } - - parseForIn(node, init, awaitAt) { - const isForIn = this.match(types._in); - this.next(); - - if (isForIn) { - if (awaitAt > -1) this.unexpected(awaitAt); - } else { - node.await = awaitAt > -1; - } - - if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) { - this.raise(init.start, `${isForIn ? "for-in" : "for-of"} loop variable declaration may not have an initializer`); - } else if (init.type === "AssignmentPattern") { - this.raise(init.start, "Invalid left-hand side in for-loop"); - } - - node.left = init; - node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); - this.expect(types.parenR); - node.body = this.withTopicForbiddingContext(() => this.parseStatement("for")); - this.scope.exit(); - this.state.labels.pop(); - return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement"); - } - - parseVar(node, isFor, kind) { - const declarations = node.declarations = []; - const isTypescript = this.hasPlugin("typescript"); - node.kind = kind; - - for (;;) { - const decl = this.startNode(); - this.parseVarId(decl, kind); - - if (this.eat(types.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } else { - if (kind === "const" && !(this.match(types._in) || this.isContextual("of"))) { - if (!isTypescript) { - this.unexpected(); - } - } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types._in) || this.isContextual("of")))) { - this.raise(this.state.lastTokEnd, "Complex binding patterns require an initialization value"); - } - - decl.init = null; - } - - declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(types.comma)) break; - } - - return node; - } - - parseVarId(decl, kind) { - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, undefined, "variable declaration"); - } - - parseFunction(node, statement = FUNC_NO_FLAGS, isAsync = false) { - const isStatement = statement & FUNC_STATEMENT; - const isHangingStatement = statement & FUNC_HANGING_STATEMENT; - const requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID); - this.initFunction(node, isAsync); - - if (this.match(types.star) && isHangingStatement) { - this.unexpected(this.state.start, "Generators can only be declared at the top level or inside a block"); - } - - node.generator = this.eat(types.star); - - if (isStatement) { - node.id = this.parseFunctionId(requireId); - } - - const oldInClassProperty = this.state.inClassProperty; - const oldYieldPos = this.state.yieldPos; - const oldAwaitPos = this.state.awaitPos; - this.state.inClassProperty = false; - this.state.yieldPos = 0; - this.state.awaitPos = 0; - this.scope.enter(functionFlags(node.async, node.generator)); - - if (!isStatement) { - node.id = this.parseFunctionId(); - } - - this.parseFunctionParams(node); - this.withTopicForbiddingContext(() => { - this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); - }); - this.scope.exit(); - - if (isStatement && !isHangingStatement) { - this.checkFunctionStatementId(node); - } - - this.state.inClassProperty = oldInClassProperty; - this.state.yieldPos = oldYieldPos; - this.state.awaitPos = oldAwaitPos; - return node; - } - - parseFunctionId(requireId) { - return requireId || this.match(types.name) ? this.parseIdentifier() : null; - } - - parseFunctionParams(node, allowModifiers) { - const oldInParameters = this.state.inParameters; - this.state.inParameters = true; - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, allowModifiers); - this.state.inParameters = oldInParameters; - this.checkYieldAwaitInDefaultParams(); - } - - checkFunctionStatementId(node) { - if (!node.id) return; - this.checkLVal(node.id, this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION, null, "function name"); - } - - parseClass(node, isStatement, optionalId) { - this.next(); - this.takeDecorators(node); - const oldStrict = this.state.strict; - this.state.strict = true; - this.parseClassId(node, isStatement, optionalId); - this.parseClassSuper(node); - node.body = this.parseClassBody(!!node.superClass); - this.state.strict = oldStrict; - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); - } - - isClassProperty() { - return this.match(types.eq) || this.match(types.semi) || this.match(types.braceR); - } - - isClassMethod() { - return this.match(types.parenL); - } - - isNonstaticConstructor(method) { - return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor"); - } - - parseClassBody(constructorAllowsSuper) { - this.state.classLevel++; - const state = { - hadConstructor: false - }; - let decorators = []; - const classBody = this.startNode(); - classBody.body = []; - this.expect(types.braceL); - this.withTopicForbiddingContext(() => { - while (!this.eat(types.braceR)) { - if (this.eat(types.semi)) { - if (decorators.length > 0) { - this.raise(this.state.lastTokEnd, "Decorators must not be followed by a semicolon"); - } - - continue; - } - - if (this.match(types.at)) { - decorators.push(this.parseDecorator()); - continue; - } - - const member = this.startNode(); - - if (decorators.length) { - member.decorators = decorators; - this.resetStartLocationFromNode(member, decorators[0]); - decorators = []; - } - - this.parseClassMember(classBody, member, state, constructorAllowsSuper); - - if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) { - this.raise(member.start, "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?"); - } - } - }); - - if (decorators.length) { - this.raise(this.state.start, "You have trailing decorators with no method"); - } - - this.state.classLevel--; - return this.finishNode(classBody, "ClassBody"); - } - - parseClassMember(classBody, member, state, constructorAllowsSuper) { - let isStatic = false; - const containsEsc = this.state.containsEsc; - - if (this.match(types.name) && this.state.value === "static") { - const key = this.parseIdentifier(true); - - if (this.isClassMethod()) { - const method = member; - method.kind = "method"; - method.computed = false; - method.key = key; - method.static = false; - this.pushClassMethod(classBody, method, false, false, false, false); - return; - } else if (this.isClassProperty()) { - const prop = member; - prop.computed = false; - prop.key = key; - prop.static = false; - classBody.body.push(this.parseClassProperty(prop)); - return; - } else if (containsEsc) { - throw this.unexpected(); - } - - isStatic = true; - } - - this.parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper); - } - - parseClassMemberWithIsStatic(classBody, member, state, isStatic, constructorAllowsSuper) { - const publicMethod = member; - const privateMethod = member; - const publicProp = member; - const privateProp = member; - const method = publicMethod; - const publicMember = publicMethod; - member.static = isStatic; - - if (this.eat(types.star)) { - method.kind = "method"; - this.parseClassPropertyName(method); - - if (method.key.type === "PrivateName") { - this.pushClassPrivateMethod(classBody, privateMethod, true, false); - return; - } - - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, "Constructor can't be a generator"); - } - - this.pushClassMethod(classBody, publicMethod, true, false, false, false); - return; - } - - const containsEsc = this.state.containsEsc; - const key = this.parseClassPropertyName(member); - const isPrivate = key.type === "PrivateName"; - const isSimple = key.type === "Identifier"; - this.parsePostMemberNameModifiers(publicMember); - - if (this.isClassMethod()) { - method.kind = "method"; - - if (isPrivate) { - this.pushClassPrivateMethod(classBody, privateMethod, false, false); - return; - } - - const isConstructor = this.isNonstaticConstructor(publicMethod); - let allowsDirectSuper = false; - - if (isConstructor) { - publicMethod.kind = "constructor"; - - if (publicMethod.decorators) { - this.raise(publicMethod.start, "You can't attach decorators to a class constructor"); - } - - if (state.hadConstructor && !this.hasPlugin("typescript")) { - this.raise(key.start, "Duplicate constructor in the same class"); - } - - state.hadConstructor = true; - allowsDirectSuper = constructorAllowsSuper; - } - - this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper); - } else if (this.isClassProperty()) { - if (isPrivate) { - this.pushClassPrivateProperty(classBody, privateProp); - } else { - this.pushClassProperty(classBody, publicProp); - } - } else if (isSimple && key.name === "async" && !containsEsc && !this.isLineTerminator()) { - const isGenerator = this.eat(types.star); - method.kind = "method"; - this.parseClassPropertyName(method); - - if (method.key.type === "PrivateName") { - this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true); - } else { - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, "Constructor can't be an async function"); - } - - this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false); - } - } else if (isSimple && (key.name === "get" || key.name === "set") && !containsEsc && !(this.match(types.star) && this.isLineTerminator())) { - method.kind = key.name; - this.parseClassPropertyName(publicMethod); - - if (method.key.type === "PrivateName") { - this.pushClassPrivateMethod(classBody, privateMethod, false, false); - } else { - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, "Constructor can't have get/set modifier"); - } - - this.pushClassMethod(classBody, publicMethod, false, false, false, false); - } - - this.checkGetterSetterParams(publicMethod); - } else if (this.isLineTerminator()) { - if (isPrivate) { - this.pushClassPrivateProperty(classBody, privateProp); - } else { - this.pushClassProperty(classBody, publicProp); - } - } else { - this.unexpected(); - } - } - - parseClassPropertyName(member) { - const key = this.parsePropertyName(member); - - if (!member.computed && member.static && (key.name === "prototype" || key.value === "prototype")) { - this.raise(key.start, "Classes may not have static property named prototype"); - } - - if (key.type === "PrivateName" && key.id.name === "constructor") { - this.raise(key.start, "Classes may not have a private field named '#constructor'"); - } - - return key; - } - - pushClassProperty(classBody, prop) { - if (this.isNonstaticConstructor(prop)) { - this.raise(prop.key.start, "Classes may not have a non-static field named 'constructor'"); - } - - classBody.body.push(this.parseClassProperty(prop)); - } - - pushClassPrivateProperty(classBody, prop) { - this.expectPlugin("classPrivateProperties", prop.key.start); - classBody.body.push(this.parseClassPrivateProperty(prop)); - } - - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { - classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true)); - } - - pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - this.expectPlugin("classPrivateMethods", method.key.start); - classBody.body.push(this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true)); - } - - parsePostMemberNameModifiers(methodOrProp) {} - - parseAccessModifier() { - return undefined; - } - - parseClassPrivateProperty(node) { - this.state.inClassProperty = true; - this.scope.enter(SCOPE_CLASS | SCOPE_SUPER); - node.value = this.eat(types.eq) ? this.parseMaybeAssign() : null; - this.semicolon(); - this.state.inClassProperty = false; - this.scope.exit(); - return this.finishNode(node, "ClassPrivateProperty"); - } - - parseClassProperty(node) { - if (!node.typeAnnotation) { - this.expectPlugin("classProperties"); - } - - this.state.inClassProperty = true; - this.scope.enter(SCOPE_CLASS | SCOPE_SUPER); - - if (this.match(types.eq)) { - this.expectPlugin("classProperties"); - this.next(); - node.value = this.parseMaybeAssign(); - } else { - node.value = null; - } - - this.semicolon(); - this.state.inClassProperty = false; - this.scope.exit(); - return this.finishNode(node, "ClassProperty"); - } - - parseClassId(node, isStatement, optionalId) { - if (this.match(types.name)) { - node.id = this.parseIdentifier(); - - if (isStatement) { - this.checkLVal(node.id, BIND_CLASS, undefined, "class name"); - } - } else { - if (optionalId || !isStatement) { - node.id = null; - } else { - this.unexpected(null, "A class name is required"); - } - } - } - - parseClassSuper(node) { - node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; - } - - parseExport(node) { - const hasDefault = this.maybeParseExportDefaultSpecifier(node); - const parseAfterDefault = !hasDefault || this.eat(types.comma); - const hasStar = parseAfterDefault && this.eatExportStar(node); - const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node); - const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(types.comma)); - const isFromRequired = hasDefault || hasStar; - - if (hasStar && !hasNamespace) { - if (hasDefault) this.unexpected(); - this.parseExportFrom(node, true); - return this.finishNode(node, "ExportAllDeclaration"); - } - - const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node); - - if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers || hasNamespace && parseAfterNamespace && !hasSpecifiers) { - throw this.unexpected(null, types.braceL); - } - - let hasDeclaration; - - if (isFromRequired || hasSpecifiers) { - hasDeclaration = false; - this.parseExportFrom(node, isFromRequired); - } else { - hasDeclaration = this.maybeParseExportDeclaration(node); - } - - if (isFromRequired || hasSpecifiers || hasDeclaration) { - this.checkExport(node, true, false, !!node.source); - return this.finishNode(node, "ExportNamedDeclaration"); - } - - if (this.eat(types._default)) { - node.declaration = this.parseExportDefaultExpression(); - this.checkExport(node, true, true); - return this.finishNode(node, "ExportDefaultDeclaration"); - } - - throw this.unexpected(null, types.braceL); - } - - eatExportStar(node) { - return this.eat(types.star); - } - - maybeParseExportDefaultSpecifier(node) { - if (this.isExportDefaultSpecifier()) { - this.expectPlugin("exportDefaultFrom"); - const specifier = this.startNode(); - specifier.exported = this.parseIdentifier(true); - node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; - return true; - } - - return false; - } - - maybeParseExportNamespaceSpecifier(node) { - if (this.isContextual("as")) { - if (!node.specifiers) node.specifiers = []; - this.expectPlugin("exportNamespaceFrom"); - const specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc); - this.next(); - specifier.exported = this.parseIdentifier(true); - node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier")); - return true; - } - - return false; - } - - maybeParseExportNamedSpecifiers(node) { - if (this.match(types.braceL)) { - if (!node.specifiers) node.specifiers = []; - node.specifiers.push(...this.parseExportSpecifiers()); - node.source = null; - node.declaration = null; - return true; - } - - return false; - } - - maybeParseExportDeclaration(node) { - if (this.shouldParseExportDeclaration()) { - if (this.isContextual("async")) { - const next = this.lookahead(); - - if (next.type !== types._function) { - this.unexpected(next.start, `Unexpected token, expected "function"`); - } - } - - node.specifiers = []; - node.source = null; - node.declaration = this.parseExportDeclaration(node); - return true; - } - - return false; - } - - isAsyncFunction() { - if (!this.isContextual("async")) return false; - const { - pos - } = this.state; - skipWhiteSpace.lastIndex = pos; - const skip = skipWhiteSpace.exec(this.input); - if (!skip || !skip.length) return false; - const next = pos + skip[0].length; - return !lineBreak.test(this.input.slice(pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.length || !isIdentifierChar(this.input.charCodeAt(next + 8))); - } - - parseExportDefaultExpression() { - const expr = this.startNode(); - const isAsync = this.isAsyncFunction(); - - if (this.match(types._function) || isAsync) { - this.next(); - - if (isAsync) { - this.next(); - } - - return this.parseFunction(expr, FUNC_STATEMENT | FUNC_NULLABLE_ID, isAsync); - } else if (this.match(types._class)) { - return this.parseClass(expr, true, true); - } else if (this.match(types.at)) { - if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport")) { - this.unexpected(this.state.start, "Decorators must be placed *before* the 'export' keyword." + " You can set the 'decoratorsBeforeExport' option to false to use" + " the 'export @decorator class {}' syntax"); - } - - this.parseDecorators(false); - return this.parseClass(expr, true, true); - } else if (this.match(types._const) || this.match(types._var) || this.isLet()) { - return this.raise(this.state.start, "Only expressions, functions or classes are allowed as the `default` export."); - } else { - const res = this.parseMaybeAssign(); - this.semicolon(); - return res; - } - } - - parseExportDeclaration(node) { - return this.parseStatement(null); - } - - isExportDefaultSpecifier() { - if (this.match(types.name)) { - return this.state.value !== "async" && this.state.value !== "let"; - } - - if (!this.match(types._default)) { - return false; - } - - const lookahead = this.lookahead(); - return lookahead.type === types.comma || lookahead.type === types.name && lookahead.value === "from"; - } - - parseExportFrom(node, expect) { - if (this.eatContextual("from")) { - node.source = this.parseImportSource(); - this.checkExport(node); - } else { - if (expect) { - this.unexpected(); - } else { - node.source = null; - } - } - - this.semicolon(); - } - - shouldParseExportDeclaration() { - if (this.match(types.at)) { - this.expectOnePlugin(["decorators", "decorators-legacy"]); - - if (this.hasPlugin("decorators")) { - if (this.getPluginOption("decorators", "decoratorsBeforeExport")) { - this.unexpected(this.state.start, "Decorators must be placed *before* the 'export' keyword." + " You can set the 'decoratorsBeforeExport' option to false to use" + " the 'export @decorator class {}' syntax"); - } else { - return true; - } - } - } - - return this.state.type.keyword === "var" || this.state.type.keyword === "const" || this.state.type.keyword === "function" || this.state.type.keyword === "class" || this.isLet() || this.isAsyncFunction(); - } - - checkExport(node, checkNames, isDefault, isFrom) { - if (checkNames) { - if (isDefault) { - this.checkDuplicateExports(node, "default"); - } else if (node.specifiers && node.specifiers.length) { - for (let _i3 = 0, _node$specifiers = node.specifiers; _i3 < _node$specifiers.length; _i3++) { - const specifier = _node$specifiers[_i3]; - this.checkDuplicateExports(specifier, specifier.exported.name); - - if (!isFrom && specifier.local) { - this.checkReservedWord(specifier.local.name, specifier.local.start, true, false); - this.scope.checkLocalExport(specifier.local); - } - } - } else if (node.declaration) { - if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") { - const id = node.declaration.id; - if (!id) throw new Error("Assertion failure"); - this.checkDuplicateExports(node, id.name); - } else if (node.declaration.type === "VariableDeclaration") { - for (let _i4 = 0, _node$declaration$dec = node.declaration.declarations; _i4 < _node$declaration$dec.length; _i4++) { - const declaration = _node$declaration$dec[_i4]; - this.checkDeclaration(declaration.id); - } - } - } - } - - const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - if (currentContextDecorators.length) { - const isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression"); - - if (!node.declaration || !isClass) { - throw this.raise(node.start, "You can only use decorators on an export when exporting a class"); - } - - this.takeDecorators(node.declaration); - } - } - - checkDeclaration(node) { - if (node.type === "Identifier") { - this.checkDuplicateExports(node, node.name); - } else if (node.type === "ObjectPattern") { - for (let _i5 = 0, _node$properties = node.properties; _i5 < _node$properties.length; _i5++) { - const prop = _node$properties[_i5]; - this.checkDeclaration(prop); - } - } else if (node.type === "ArrayPattern") { - for (let _i6 = 0, _node$elements = node.elements; _i6 < _node$elements.length; _i6++) { - const elem = _node$elements[_i6]; - - if (elem) { - this.checkDeclaration(elem); - } - } - } else if (node.type === "ObjectProperty") { - this.checkDeclaration(node.value); - } else if (node.type === "RestElement") { - this.checkDeclaration(node.argument); - } else if (node.type === "AssignmentPattern") { - this.checkDeclaration(node.left); - } - } - - checkDuplicateExports(node, name) { - if (this.state.exportedIdentifiers.indexOf(name) > -1) { - throw this.raise(node.start, name === "default" ? "Only one default export allowed per module." : `\`${name}\` has already been exported. Exported identifiers must be unique.`); - } - - this.state.exportedIdentifiers.push(name); - } - - parseExportSpecifiers() { - const nodes = []; - let first = true; - this.expect(types.braceL); - - while (!this.eat(types.braceR)) { - if (first) { - first = false; - } else { - this.expect(types.comma); - if (this.eat(types.braceR)) break; - } - - const node = this.startNode(); - node.local = this.parseIdentifier(true); - node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone(); - nodes.push(this.finishNode(node, "ExportSpecifier")); - } - - return nodes; - } - - parseImport(node) { - node.specifiers = []; - - if (!this.match(types.string)) { - const hasDefault = this.maybeParseDefaultImportSpecifier(node); - const parseNext = !hasDefault || this.eat(types.comma); - const hasStar = parseNext && this.maybeParseStarImportSpecifier(node); - if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node); - this.expectContextual("from"); - } - - node.source = this.parseImportSource(); - this.semicolon(); - return this.finishNode(node, "ImportDeclaration"); - } - - parseImportSource() { - if (!this.match(types.string)) this.unexpected(); - return this.parseExprAtom(); - } - - shouldParseDefaultImport(node) { - return this.match(types.name); - } - - parseImportSpecifierLocal(node, specifier, type, contextDescription) { - specifier.local = this.parseIdentifier(); - this.checkLVal(specifier.local, BIND_LEXICAL, undefined, contextDescription); - node.specifiers.push(this.finishNode(specifier, type)); - } - - maybeParseDefaultImportSpecifier(node) { - if (this.shouldParseDefaultImport(node)) { - this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier"); - return true; - } - - return false; - } - - maybeParseStarImportSpecifier(node) { - if (this.match(types.star)) { - const specifier = this.startNode(); - this.next(); - this.expectContextual("as"); - this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier"); - return true; - } - - return false; - } - - parseNamedImportSpecifiers(node) { - let first = true; - this.expect(types.braceL); - - while (!this.eat(types.braceR)) { - if (first) { - first = false; - } else { - if (this.eat(types.colon)) { - this.unexpected(null, "ES2015 named imports do not destructure. " + "Use another statement for destructuring after the import."); - } - - this.expect(types.comma); - if (this.eat(types.braceR)) break; - } - - this.parseImportSpecifier(node); - } - } - - parseImportSpecifier(node) { - const specifier = this.startNode(); - specifier.imported = this.parseIdentifier(true); - - if (this.eatContextual("as")) { - specifier.local = this.parseIdentifier(); - } else { - this.checkReservedWord(specifier.imported.name, specifier.start, true, true); - specifier.local = specifier.imported.__clone(); - } - - this.checkLVal(specifier.local, BIND_LEXICAL, undefined, "import specifier"); - node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); - } - -} - -class Parser extends StatementParser { - constructor(options, input) { - options = getOptions(options); - super(options, input); - const ScopeHandler = this.getScopeHandler(); - this.options = options; - this.inModule = this.options.sourceType === "module"; - this.scope = new ScopeHandler(this.raise.bind(this), this.inModule); - this.plugins = pluginsMap(this.options.plugins); - this.filename = options.sourceFilename; - } - - getScopeHandler() { - return ScopeHandler; - } - - parse() { - this.scope.enter(SCOPE_PROGRAM); - const file = this.startNode(); - const program = this.startNode(); - this.nextToken(); - return this.parseTopLevel(file, program); - } - -} - -function pluginsMap(plugins) { - const pluginMap = new Map(); - - for (let _i = 0; _i < plugins.length; _i++) { - const plugin = plugins[_i]; - const [name, options] = Array.isArray(plugin) ? plugin : [plugin, {}]; - if (!pluginMap.has(name)) pluginMap.set(name, options || {}); - } - - return pluginMap; -} - -function parse(input, options) { - if (options && options.sourceType === "unambiguous") { - options = Object.assign({}, options); - - try { - options.sourceType = "module"; - const parser = getParser(options, input); - const ast = parser.parse(); - if (!parser.sawUnambiguousESM) ast.program.sourceType = "script"; - return ast; - } catch (moduleError) { - try { - options.sourceType = "script"; - return getParser(options, input).parse(); - } catch (scriptError) {} - - throw moduleError; - } - } else { - return getParser(options, input).parse(); - } -} -function parseExpression(input, options) { - const parser = getParser(options, input); - - if (parser.options.strictMode) { - parser.state.strict = true; - } - - return parser.getExpression(); -} - -function getParser(options, input) { - let cls = Parser; - - if (options && options.plugins) { - validatePlugins(options.plugins); - cls = getParserClass(options.plugins); - } - - return new cls(options, input); -} - -const parserClassCache = {}; - -function getParserClass(pluginsFromOptions) { - const pluginList = mixinPluginNames.filter(name => hasPlugin(pluginsFromOptions, name)); - const key = pluginList.join("/"); - let cls = parserClassCache[key]; - - if (!cls) { - cls = Parser; - - for (let _i = 0; _i < pluginList.length; _i++) { - const plugin = pluginList[_i]; - cls = mixinPlugins[plugin](cls); - } - - parserClassCache[key] = cls; - } - - return cls; -} - -exports.parse = parse; -exports.parseExpression = parseExpression; -exports.tokTypes = types; diff --git a/node_modules/@babel/parser/package.json b/node_modules/@babel/parser/package.json deleted file mode 100644 index 0b08fc90..00000000 --- a/node_modules/@babel/parser/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_args": [ - [ - "@babel/parser@7.5.5", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@babel/parser@7.5.5", - "_id": "@babel/parser@7.5.5", - "_inBundle": false, - "_integrity": "sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g==", - "_location": "/@babel/parser", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/parser@7.5.5", - "name": "@babel/parser", - "escapedName": "@babel%2fparser", - "scope": "@babel", - "rawSpec": "7.5.5", - "saveSpec": null, - "fetchSpec": "7.5.5" - }, - "_requiredBy": [ - "/@babel/core", - "/@babel/template", - "/@babel/traverse", - "/@types/babel__core", - "/@types/babel__template", - "/istanbul-lib-instrument" - ], - "_resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.5.tgz", - "_spec": "7.5.5", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "bin": { - "parser": "./bin/babel-parser.js" - }, - "description": "A JavaScript parser", - "devDependencies": { - "@babel/code-frame": "^7.5.5", - "@babel/helper-fixtures": "^7.5.5", - "charcodes": "^0.2.0", - "unicode-12.0.0": "^0.7.9" - }, - "engines": { - "node": ">=6.0.0" - }, - "files": [ - "bin", - "lib", - "typings" - ], - "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", - "homepage": "https://babeljs.io/", - "keywords": [ - "babel", - "javascript", - "parser", - "tc39", - "ecmascript", - "@babel/parser" - ], - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/parser", - "publishConfig": { - "tag": "next" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-parser" - }, - "types": "typings/babel-parser.d.ts", - "version": "7.5.5" -} diff --git a/node_modules/@babel/parser/typings/babel-parser.d.ts b/node_modules/@babel/parser/typings/babel-parser.d.ts deleted file mode 100644 index deba6be0..00000000 --- a/node_modules/@babel/parser/typings/babel-parser.d.ts +++ /dev/null @@ -1,135 +0,0 @@ -// Type definitions for @babel/parser -// Project: https://github.com/babel/babel/tree/master/packages/babel-parser -// Definitions by: Troy Gerwien -// Marvin Hagemeister -// Avi Vahl -// TypeScript Version: 2.9 - -/** - * Parse the provided code as an entire ECMAScript program. - */ -export function parse(input: string, options?: ParserOptions): import('@babel/types').File; - -/** - * Parse the provided code as a single expression. - */ -export function parseExpression(input: string, options?: ParserOptions): import('@babel/types').Expression; - -export interface ParserOptions { - /** - * By default, import and export declarations can only appear at a program's top level. - * Setting this option to true allows them anywhere where a statement is allowed. - */ - allowImportExportEverywhere?: boolean; - - /** - * By default, await use is not allowed outside of an async function. - * Set this to true to accept such code. - */ - allowAwaitOutsideFunction?: boolean; - - /** - * By default, a return statement at the top level raises an error. - * Set this to true to accept such code. - */ - allowReturnOutsideFunction?: boolean; - - allowSuperOutsideMethod?: boolean; - - /** - * Indicate the mode the code should be parsed in. - * Can be one of "script", "module", or "unambiguous". Defaults to "script". - * "unambiguous" will make @babel/parser attempt to guess, based on the presence - * of ES6 import or export statements. - * Files with ES6 imports and exports are considered "module" and are otherwise "script". - */ - sourceType?: 'script' | 'module' | 'unambiguous'; - - /** - * Correlate output AST nodes with their source filename. - * Useful when generating code and source maps from the ASTs of multiple input files. - */ - sourceFilename?: string; - - /** - * By default, the first line of code parsed is treated as line 1. - * You can provide a line number to alternatively start with. - * Useful for integration with other source tools. - */ - startLine?: number; - - /** - * Array containing the plugins that you want to enable. - */ - plugins?: ParserPlugin[]; - - /** - * Should the parser work in strict mode. - * Defaults to true if sourceType === 'module'. Otherwise, false. - */ - strictMode?: boolean; - - /** - * Adds a ranges property to each node: [node.start, node.end] - */ - ranges?: boolean; - - /** - * Adds all parsed tokens to a tokens property on the File node. - */ - tokens?: boolean; - - /** - * By default, the parser adds information about parentheses by setting - * `extra.parenthesized` to `true` as needed. - * When this option is `true` the parser creates `ParenthesizedExpression` - * AST nodes instead of using the `extra` property. - */ - createParenthesizedExpressions?: boolean; -} - -export type ParserPlugin = - 'estree' | - 'jsx' | - 'flow' | - 'flowComments' | - 'typescript' | - 'doExpressions' | - 'objectRestSpread' | - 'decorators' | - 'decorators-legacy' | - 'classProperties' | - 'classPrivateProperties' | - 'classPrivateMethods' | - 'exportDefaultFrom' | - 'exportNamespaceFrom' | - 'asyncGenerators' | - 'functionBind' | - 'functionSent' | - 'dynamicImport' | - 'numericSeparator' | - 'optionalChaining' | - 'importMeta' | - 'bigInt' | - 'optionalCatchBinding' | - 'throwExpressions' | - 'pipelineOperator' | - 'nullishCoalescingOperator' | - ParserPluginWithOptions; - -export type ParserPluginWithOptions = - ['decorators', DecoratorsPluginOptions] | - ['pipelineOperator', PipelineOperatorPluginOptions] | - ['flow', FlowPluginOptions]; - -export interface DecoratorsPluginOptions { - decoratorsBeforeExport?: boolean; -} - -export interface PipelineOperatorPluginOptions { - proposal: 'minimal' | 'smart'; -} - -export interface FlowPluginOptions { - all?: boolean; -} diff --git a/node_modules/@babel/plugin-syntax-object-rest-spread/LICENSE b/node_modules/@babel/plugin-syntax-object-rest-spread/LICENSE deleted file mode 100644 index a06ec0e7..00000000 --- a/node_modules/@babel/plugin-syntax-object-rest-spread/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-2018 Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/plugin-syntax-object-rest-spread/README.md b/node_modules/@babel/plugin-syntax-object-rest-spread/README.md deleted file mode 100644 index 95c4472e..00000000 --- a/node_modules/@babel/plugin-syntax-object-rest-spread/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/plugin-syntax-object-rest-spread - -> Allow parsing of object rest/spread - -See our website [@babel/plugin-syntax-object-rest-spread](https://babeljs.io/docs/en/next/babel-plugin-syntax-object-rest-spread.html) for more information. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/plugin-syntax-object-rest-spread -``` - -or using yarn: - -```sh -yarn add @babel/plugin-syntax-object-rest-spread --dev -``` diff --git a/node_modules/@babel/plugin-syntax-object-rest-spread/lib/index.js b/node_modules/@babel/plugin-syntax-object-rest-spread/lib/index.js deleted file mode 100644 index a7f33bdd..00000000 --- a/node_modules/@babel/plugin-syntax-object-rest-spread/lib/index.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function _helperPluginUtils() { - const data = require("@babel/helper-plugin-utils"); - - _helperPluginUtils = function () { - return data; - }; - - return data; -} - -var _default = (0, _helperPluginUtils().declare)(api => { - api.assertVersion(7); - return { - name: "syntax-object-rest-spread", - - manipulateOptions(opts, parserOpts) { - parserOpts.plugins.push("objectRestSpread"); - } - - }; -}); - -exports.default = _default; \ No newline at end of file diff --git a/node_modules/@babel/plugin-syntax-object-rest-spread/package.json b/node_modules/@babel/plugin-syntax-object-rest-spread/package.json deleted file mode 100644 index 6c7abf94..00000000 --- a/node_modules/@babel/plugin-syntax-object-rest-spread/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "_args": [ - [ - "@babel/plugin-syntax-object-rest-spread@7.2.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@babel/plugin-syntax-object-rest-spread@7.2.0", - "_id": "@babel/plugin-syntax-object-rest-spread@7.2.0", - "_inBundle": false, - "_integrity": "sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==", - "_location": "/@babel/plugin-syntax-object-rest-spread", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/plugin-syntax-object-rest-spread@7.2.0", - "name": "@babel/plugin-syntax-object-rest-spread", - "escapedName": "@babel%2fplugin-syntax-object-rest-spread", - "scope": "@babel", - "rawSpec": "7.2.0", - "saveSpec": null, - "fetchSpec": "7.2.0" - }, - "_requiredBy": [ - "/babel-preset-jest" - ], - "_resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz", - "_spec": "7.2.0", - "_where": "E:\\python\\setup-php", - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0" - }, - "description": "Allow parsing of object rest/spread", - "devDependencies": { - "@babel/core": "^7.2.0" - }, - "keywords": [ - "babel-plugin" - ], - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/plugin-syntax-object-rest-spread", - "peerDependencies": { - "@babel/core": "^7.0.0-0" - }, - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-object-rest-spread" - }, - "version": "7.2.0" -} diff --git a/node_modules/@babel/template/LICENSE b/node_modules/@babel/template/LICENSE deleted file mode 100644 index f31575ec..00000000 --- a/node_modules/@babel/template/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/template/README.md b/node_modules/@babel/template/README.md deleted file mode 100644 index cf8f9443..00000000 --- a/node_modules/@babel/template/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/template - -> Generate an AST from a string template. - -See our website [@babel/template](https://babeljs.io/docs/en/next/babel-template.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20template%22+is%3Aopen) associated with this package. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/template -``` - -or using yarn: - -```sh -yarn add @babel/template --dev -``` diff --git a/node_modules/@babel/template/lib/builder.js b/node_modules/@babel/template/lib/builder.js deleted file mode 100644 index 2a0e6297..00000000 --- a/node_modules/@babel/template/lib/builder.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = createTemplateBuilder; - -var _options = require("./options"); - -var _string = _interopRequireDefault(require("./string")); - -var _literal = _interopRequireDefault(require("./literal")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const NO_PLACEHOLDER = (0, _options.validate)({ - placeholderPattern: false -}); - -function createTemplateBuilder(formatter, defaultOpts) { - const templateFnCache = new WeakMap(); - const templateAstCache = new WeakMap(); - const cachedOpts = defaultOpts || (0, _options.validate)(null); - return Object.assign((tpl, ...args) => { - if (typeof tpl === "string") { - if (args.length > 1) throw new Error("Unexpected extra params."); - return extendedTrace((0, _string.default)(formatter, tpl, (0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])))); - } else if (Array.isArray(tpl)) { - let builder = templateFnCache.get(tpl); - - if (!builder) { - builder = (0, _literal.default)(formatter, tpl, cachedOpts); - templateFnCache.set(tpl, builder); - } - - return extendedTrace(builder(args)); - } else if (typeof tpl === "object" && tpl) { - if (args.length > 0) throw new Error("Unexpected extra params."); - return createTemplateBuilder(formatter, (0, _options.merge)(cachedOpts, (0, _options.validate)(tpl))); - } - - throw new Error(`Unexpected template param ${typeof tpl}`); - }, { - ast: (tpl, ...args) => { - if (typeof tpl === "string") { - if (args.length > 1) throw new Error("Unexpected extra params."); - return (0, _string.default)(formatter, tpl, (0, _options.merge)((0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])), NO_PLACEHOLDER))(); - } else if (Array.isArray(tpl)) { - let builder = templateAstCache.get(tpl); - - if (!builder) { - builder = (0, _literal.default)(formatter, tpl, (0, _options.merge)(cachedOpts, NO_PLACEHOLDER)); - templateAstCache.set(tpl, builder); - } - - return builder(args)(); - } - - throw new Error(`Unexpected template param ${typeof tpl}`); - } - }); -} - -function extendedTrace(fn) { - let rootStack = ""; - - try { - throw new Error(); - } catch (error) { - if (error.stack) { - rootStack = error.stack.split("\n").slice(3).join("\n"); - } - } - - return arg => { - try { - return fn(arg); - } catch (err) { - err.stack += `\n =============\n${rootStack}`; - throw err; - } - }; -} \ No newline at end of file diff --git a/node_modules/@babel/template/lib/formatters.js b/node_modules/@babel/template/lib/formatters.js deleted file mode 100644 index 59e0984c..00000000 --- a/node_modules/@babel/template/lib/formatters.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.program = exports.expression = exports.statement = exports.statements = exports.smart = void 0; - -function makeStatementFormatter(fn) { - return { - code: str => `/* @babel/template */;\n${str}`, - validate: () => {}, - unwrap: ast => { - return fn(ast.program.body.slice(1)); - } - }; -} - -const smart = makeStatementFormatter(body => { - if (body.length > 1) { - return body; - } else { - return body[0]; - } -}); -exports.smart = smart; -const statements = makeStatementFormatter(body => body); -exports.statements = statements; -const statement = makeStatementFormatter(body => { - if (body.length === 0) { - throw new Error("Found nothing to return."); - } - - if (body.length > 1) { - throw new Error("Found multiple statements but wanted one"); - } - - return body[0]; -}); -exports.statement = statement; -const expression = { - code: str => `(\n${str}\n)`, - validate: ({ - program - }) => { - if (program.body.length > 1) { - throw new Error("Found multiple statements but wanted one"); - } - - const expression = program.body[0].expression; - - if (expression.start === 0) { - throw new Error("Parse result included parens."); - } - }, - unwrap: ast => ast.program.body[0].expression -}; -exports.expression = expression; -const program = { - code: str => str, - validate: () => {}, - unwrap: ast => ast.program -}; -exports.program = program; \ No newline at end of file diff --git a/node_modules/@babel/template/lib/index.js b/node_modules/@babel/template/lib/index.js deleted file mode 100644 index 7ce85e9f..00000000 --- a/node_modules/@babel/template/lib/index.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = exports.program = exports.expression = exports.statements = exports.statement = exports.smart = void 0; - -var formatters = _interopRequireWildcard(require("./formatters")); - -var _builder = _interopRequireDefault(require("./builder")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const smart = (0, _builder.default)(formatters.smart); -exports.smart = smart; -const statement = (0, _builder.default)(formatters.statement); -exports.statement = statement; -const statements = (0, _builder.default)(formatters.statements); -exports.statements = statements; -const expression = (0, _builder.default)(formatters.expression); -exports.expression = expression; -const program = (0, _builder.default)(formatters.program); -exports.program = program; - -var _default = Object.assign(smart.bind(undefined), { - smart, - statement, - statements, - expression, - program, - ast: smart.ast -}); - -exports.default = _default; \ No newline at end of file diff --git a/node_modules/@babel/template/lib/literal.js b/node_modules/@babel/template/lib/literal.js deleted file mode 100644 index 0b8f9045..00000000 --- a/node_modules/@babel/template/lib/literal.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = literalTemplate; - -var _options = require("./options"); - -var _parse = _interopRequireDefault(require("./parse")); - -var _populate = _interopRequireDefault(require("./populate")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function literalTemplate(formatter, tpl, opts) { - const { - metadata, - names - } = buildLiteralData(formatter, tpl, opts); - return arg => { - const defaultReplacements = arg.reduce((acc, replacement, i) => { - acc[names[i]] = replacement; - return acc; - }, {}); - return arg => { - const replacements = (0, _options.normalizeReplacements)(arg); - - if (replacements) { - Object.keys(replacements).forEach(key => { - if (Object.prototype.hasOwnProperty.call(defaultReplacements, key)) { - throw new Error("Unexpected replacement overlap."); - } - }); - } - - return formatter.unwrap((0, _populate.default)(metadata, replacements ? Object.assign(replacements, defaultReplacements) : defaultReplacements)); - }; - }; -} - -function buildLiteralData(formatter, tpl, opts) { - let names; - let nameSet; - let metadata; - let prefix = ""; - - do { - prefix += "$"; - const result = buildTemplateCode(tpl, prefix); - names = result.names; - nameSet = new Set(names); - metadata = (0, _parse.default)(formatter, formatter.code(result.code), { - parser: opts.parser, - placeholderWhitelist: new Set(result.names.concat(opts.placeholderWhitelist ? Array.from(opts.placeholderWhitelist) : [])), - placeholderPattern: opts.placeholderPattern, - preserveComments: opts.preserveComments, - syntacticPlaceholders: opts.syntacticPlaceholders - }); - } while (metadata.placeholders.some(placeholder => placeholder.isDuplicate && nameSet.has(placeholder.name))); - - return { - metadata, - names - }; -} - -function buildTemplateCode(tpl, prefix) { - const names = []; - let code = tpl[0]; - - for (let i = 1; i < tpl.length; i++) { - const value = `${prefix}${i - 1}`; - names.push(value); - code += value + tpl[i]; - } - - return { - names, - code - }; -} \ No newline at end of file diff --git a/node_modules/@babel/template/lib/options.js b/node_modules/@babel/template/lib/options.js deleted file mode 100644 index 35ed7333..00000000 --- a/node_modules/@babel/template/lib/options.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.merge = merge; -exports.validate = validate; -exports.normalizeReplacements = normalizeReplacements; - -function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } - -function merge(a, b) { - const { - placeholderWhitelist = a.placeholderWhitelist, - placeholderPattern = a.placeholderPattern, - preserveComments = a.preserveComments, - syntacticPlaceholders = a.syntacticPlaceholders - } = b; - return { - parser: Object.assign({}, a.parser, b.parser), - placeholderWhitelist, - placeholderPattern, - preserveComments, - syntacticPlaceholders - }; -} - -function validate(opts) { - if (opts != null && typeof opts !== "object") { - throw new Error("Unknown template options."); - } - - const _ref = opts || {}, - { - placeholderWhitelist, - placeholderPattern, - preserveComments, - syntacticPlaceholders - } = _ref, - parser = _objectWithoutPropertiesLoose(_ref, ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"]); - - if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) { - throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined"); - } - - if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) { - throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined"); - } - - if (preserveComments != null && typeof preserveComments !== "boolean") { - throw new Error("'.preserveComments' must be a boolean, null, or undefined"); - } - - if (syntacticPlaceholders != null && typeof syntacticPlaceholders !== "boolean") { - throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined"); - } - - if (syntacticPlaceholders === true && (placeholderWhitelist != null || placeholderPattern != null)) { - throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'"); - } - - return { - parser, - placeholderWhitelist: placeholderWhitelist || undefined, - placeholderPattern: placeholderPattern == null ? undefined : placeholderPattern, - preserveComments: preserveComments == null ? false : preserveComments, - syntacticPlaceholders: syntacticPlaceholders == null ? undefined : syntacticPlaceholders - }; -} - -function normalizeReplacements(replacements) { - if (Array.isArray(replacements)) { - return replacements.reduce((acc, replacement, i) => { - acc["$" + i] = replacement; - return acc; - }, {}); - } else if (typeof replacements === "object" || replacements == null) { - return replacements || undefined; - } - - throw new Error("Template replacements must be an array, object, null, or undefined"); -} \ No newline at end of file diff --git a/node_modules/@babel/template/lib/parse.js b/node_modules/@babel/template/lib/parse.js deleted file mode 100644 index 31733495..00000000 --- a/node_modules/@babel/template/lib/parse.js +++ /dev/null @@ -1,193 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = parseAndBuildMetadata; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _parser() { - const data = require("@babel/parser"); - - _parser = function () { - return data; - }; - - return data; -} - -function _codeFrame() { - const data = require("@babel/code-frame"); - - _codeFrame = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const PATTERN = /^[_$A-Z0-9]+$/; - -function parseAndBuildMetadata(formatter, code, opts) { - const ast = parseWithCodeFrame(code, opts.parser); - const { - placeholderWhitelist, - placeholderPattern, - preserveComments, - syntacticPlaceholders - } = opts; - t().removePropertiesDeep(ast, { - preserveComments - }); - formatter.validate(ast); - const syntactic = { - placeholders: [], - placeholderNames: new Set() - }; - const legacy = { - placeholders: [], - placeholderNames: new Set() - }; - const isLegacyRef = { - value: undefined - }; - t().traverse(ast, placeholderVisitorHandler, { - syntactic, - legacy, - isLegacyRef, - placeholderWhitelist, - placeholderPattern, - syntacticPlaceholders - }); - return Object.assign({ - ast - }, isLegacyRef.value ? legacy : syntactic); -} - -function placeholderVisitorHandler(node, ancestors, state) { - let name; - - if (t().isPlaceholder(node)) { - if (state.syntacticPlaceholders === false) { - throw new Error("%%foo%%-style placeholders can't be used when " + "'.syntacticPlaceholders' is false."); - } else { - name = node.name.name; - state.isLegacyRef.value = false; - } - } else if (state.isLegacyRef.value === false || state.syntacticPlaceholders) { - return; - } else if (t().isIdentifier(node) || t().isJSXIdentifier(node)) { - name = node.name; - state.isLegacyRef.value = true; - } else if (t().isStringLiteral(node)) { - name = node.value; - state.isLegacyRef.value = true; - } else { - return; - } - - if (!state.isLegacyRef.value && (state.placeholderPattern != null || state.placeholderWhitelist != null)) { - throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'"); - } - - if (state.isLegacyRef.value && (state.placeholderPattern === false || !(state.placeholderPattern || PATTERN).test(name)) && (!state.placeholderWhitelist || !state.placeholderWhitelist.has(name))) { - return; - } - - ancestors = ancestors.slice(); - const { - node: parent, - key - } = ancestors[ancestors.length - 1]; - let type; - - if (t().isStringLiteral(node) || t().isPlaceholder(node, { - expectedNode: "StringLiteral" - })) { - type = "string"; - } else if (t().isNewExpression(parent) && key === "arguments" || t().isCallExpression(parent) && key === "arguments" || t().isFunction(parent) && key === "params") { - type = "param"; - } else if (t().isExpressionStatement(parent) && !t().isPlaceholder(node)) { - type = "statement"; - ancestors = ancestors.slice(0, -1); - } else if (t().isStatement(node) && t().isPlaceholder(node)) { - type = "statement"; - } else { - type = "other"; - } - - const { - placeholders, - placeholderNames - } = state.isLegacyRef.value ? state.legacy : state.syntactic; - placeholders.push({ - name, - type, - resolve: ast => resolveAncestors(ast, ancestors), - isDuplicate: placeholderNames.has(name) - }); - placeholderNames.add(name); -} - -function resolveAncestors(ast, ancestors) { - let parent = ast; - - for (let i = 0; i < ancestors.length - 1; i++) { - const { - key, - index - } = ancestors[i]; - - if (index === undefined) { - parent = parent[key]; - } else { - parent = parent[key][index]; - } - } - - const { - key, - index - } = ancestors[ancestors.length - 1]; - return { - parent, - key, - index - }; -} - -function parseWithCodeFrame(code, parserOpts) { - parserOpts = Object.assign({ - allowReturnOutsideFunction: true, - allowSuperOutsideMethod: true, - sourceType: "module" - }, parserOpts, { - plugins: (parserOpts.plugins || []).concat("placeholders") - }); - - try { - return (0, _parser().parse)(code, parserOpts); - } catch (err) { - const loc = err.loc; - - if (loc) { - err.message += "\n" + (0, _codeFrame().codeFrameColumns)(code, { - start: loc - }); - err.code = "BABEL_TEMPLATE_PARSE_ERROR"; - } - - throw err; - } -} \ No newline at end of file diff --git a/node_modules/@babel/template/lib/populate.js b/node_modules/@babel/template/lib/populate.js deleted file mode 100644 index c69f7fdf..00000000 --- a/node_modules/@babel/template/lib/populate.js +++ /dev/null @@ -1,133 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = populatePlaceholders; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function populatePlaceholders(metadata, replacements) { - const ast = t().cloneNode(metadata.ast); - - if (replacements) { - metadata.placeholders.forEach(placeholder => { - if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) { - const placeholderName = placeholder.name; - throw new Error(`Error: No substitution given for "${placeholderName}". If this is not meant to be a - placeholder you may want to consider passing one of the following options to @babel/template: - - { placeholderPattern: false, placeholderWhitelist: new Set(['${placeholderName}'])} - - { placeholderPattern: /^${placeholderName}$/ }`); - } - }); - Object.keys(replacements).forEach(key => { - if (!metadata.placeholderNames.has(key)) { - throw new Error(`Unknown substitution "${key}" given`); - } - }); - } - - metadata.placeholders.slice().reverse().forEach(placeholder => { - try { - applyReplacement(placeholder, ast, replacements && replacements[placeholder.name] || null); - } catch (e) { - e.message = `@babel/template placeholder "${placeholder.name}": ${e.message}`; - throw e; - } - }); - return ast; -} - -function applyReplacement(placeholder, ast, replacement) { - if (placeholder.isDuplicate) { - if (Array.isArray(replacement)) { - replacement = replacement.map(node => t().cloneNode(node)); - } else if (typeof replacement === "object") { - replacement = t().cloneNode(replacement); - } - } - - const { - parent, - key, - index - } = placeholder.resolve(ast); - - if (placeholder.type === "string") { - if (typeof replacement === "string") { - replacement = t().stringLiteral(replacement); - } - - if (!replacement || !t().isStringLiteral(replacement)) { - throw new Error("Expected string substitution"); - } - } else if (placeholder.type === "statement") { - if (index === undefined) { - if (!replacement) { - replacement = t().emptyStatement(); - } else if (Array.isArray(replacement)) { - replacement = t().blockStatement(replacement); - } else if (typeof replacement === "string") { - replacement = t().expressionStatement(t().identifier(replacement)); - } else if (!t().isStatement(replacement)) { - replacement = t().expressionStatement(replacement); - } - } else { - if (replacement && !Array.isArray(replacement)) { - if (typeof replacement === "string") { - replacement = t().identifier(replacement); - } - - if (!t().isStatement(replacement)) { - replacement = t().expressionStatement(replacement); - } - } - } - } else if (placeholder.type === "param") { - if (typeof replacement === "string") { - replacement = t().identifier(replacement); - } - - if (index === undefined) throw new Error("Assertion failure."); - } else { - if (typeof replacement === "string") { - replacement = t().identifier(replacement); - } - - if (Array.isArray(replacement)) { - throw new Error("Cannot replace single expression with an array."); - } - } - - if (index === undefined) { - t().validate(parent, key, replacement); - parent[key] = replacement; - } else { - const items = parent[key].slice(); - - if (placeholder.type === "statement" || placeholder.type === "param") { - if (replacement == null) { - items.splice(index, 1); - } else if (Array.isArray(replacement)) { - items.splice(index, 1, ...replacement); - } else { - items[index] = replacement; - } - } else { - items[index] = replacement; - } - - t().validate(parent, key, items); - parent[key] = items; - } -} \ No newline at end of file diff --git a/node_modules/@babel/template/lib/string.js b/node_modules/@babel/template/lib/string.js deleted file mode 100644 index 02ad4578..00000000 --- a/node_modules/@babel/template/lib/string.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = stringTemplate; - -var _options = require("./options"); - -var _parse = _interopRequireDefault(require("./parse")); - -var _populate = _interopRequireDefault(require("./populate")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringTemplate(formatter, code, opts) { - code = formatter.code(code); - let metadata; - return arg => { - const replacements = (0, _options.normalizeReplacements)(arg); - if (!metadata) metadata = (0, _parse.default)(formatter, code, opts); - return formatter.unwrap((0, _populate.default)(metadata, replacements)); - }; -} \ No newline at end of file diff --git a/node_modules/@babel/template/package.json b/node_modules/@babel/template/package.json deleted file mode 100644 index 38b05294..00000000 --- a/node_modules/@babel/template/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "_args": [ - [ - "@babel/template@7.4.4", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@babel/template@7.4.4", - "_id": "@babel/template@7.4.4", - "_inBundle": false, - "_integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", - "_location": "/@babel/template", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/template@7.4.4", - "name": "@babel/template", - "escapedName": "@babel%2ftemplate", - "scope": "@babel", - "rawSpec": "7.4.4", - "saveSpec": null, - "fetchSpec": "7.4.4" - }, - "_requiredBy": [ - "/@babel/core", - "/@babel/helper-function-name", - "/@babel/helpers", - "/istanbul-lib-instrument" - ], - "_resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", - "_spec": "7.4.4", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.4.4", - "@babel/types": "^7.4.4" - }, - "description": "Generate an AST from a string template.", - "gitHead": "2c88694388831b1e5b88e4bbed6781eb2be1edba", - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/template", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-template" - }, - "version": "7.4.4" -} diff --git a/node_modules/@babel/traverse/LICENSE b/node_modules/@babel/traverse/LICENSE deleted file mode 100644 index f31575ec..00000000 --- a/node_modules/@babel/traverse/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/traverse/README.md b/node_modules/@babel/traverse/README.md deleted file mode 100644 index 61dc5800..00000000 --- a/node_modules/@babel/traverse/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/traverse - -> The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes - -See our website [@babel/traverse](https://babeljs.io/docs/en/next/babel-traverse.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20traverse%22+is%3Aopen) associated with this package. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/traverse -``` - -or using yarn: - -```sh -yarn add @babel/traverse --dev -``` diff --git a/node_modules/@babel/traverse/lib/cache.js b/node_modules/@babel/traverse/lib/cache.js deleted file mode 100644 index 89f20077..00000000 --- a/node_modules/@babel/traverse/lib/cache.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.clear = clear; -exports.clearPath = clearPath; -exports.clearScope = clearScope; -exports.scope = exports.path = void 0; -let path = new WeakMap(); -exports.path = path; -let scope = new WeakMap(); -exports.scope = scope; - -function clear() { - clearPath(); - clearScope(); -} - -function clearPath() { - exports.path = path = new WeakMap(); -} - -function clearScope() { - exports.scope = scope = new WeakMap(); -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/context.js b/node_modules/@babel/traverse/lib/context.js deleted file mode 100644 index 7becbcd2..00000000 --- a/node_modules/@babel/traverse/lib/context.js +++ /dev/null @@ -1,152 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _path = _interopRequireDefault(require("./path")); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const testing = process.env.NODE_ENV === "test"; - -class TraversalContext { - constructor(scope, opts, state, parentPath) { - this.queue = null; - this.parentPath = parentPath; - this.scope = scope; - this.state = state; - this.opts = opts; - } - - shouldVisit(node) { - const opts = this.opts; - if (opts.enter || opts.exit) return true; - if (opts[node.type]) return true; - const keys = t().VISITOR_KEYS[node.type]; - if (!keys || !keys.length) return false; - - for (const key of keys) { - if (node[key]) return true; - } - - return false; - } - - create(node, obj, key, listKey) { - return _path.default.get({ - parentPath: this.parentPath, - parent: node, - container: obj, - key: key, - listKey - }); - } - - maybeQueue(path, notPriority) { - if (this.trap) { - throw new Error("Infinite cycle detected"); - } - - if (this.queue) { - if (notPriority) { - this.queue.push(path); - } else { - this.priorityQueue.push(path); - } - } - } - - visitMultiple(container, parent, listKey) { - if (container.length === 0) return false; - const queue = []; - - for (let key = 0; key < container.length; key++) { - const node = container[key]; - - if (node && this.shouldVisit(node)) { - queue.push(this.create(parent, container, key, listKey)); - } - } - - return this.visitQueue(queue); - } - - visitSingle(node, key) { - if (this.shouldVisit(node[key])) { - return this.visitQueue([this.create(node, node, key)]); - } else { - return false; - } - } - - visitQueue(queue) { - this.queue = queue; - this.priorityQueue = []; - const visited = []; - let stop = false; - - for (const path of queue) { - path.resync(); - - if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) { - path.pushContext(this); - } - - if (path.key === null) continue; - - if (testing && queue.length >= 10000) { - this.trap = true; - } - - if (visited.indexOf(path.node) >= 0) continue; - visited.push(path.node); - - if (path.visit()) { - stop = true; - break; - } - - if (this.priorityQueue.length) { - stop = this.visitQueue(this.priorityQueue); - this.priorityQueue = []; - this.queue = queue; - if (stop) break; - } - } - - for (const path of queue) { - path.popContext(); - } - - this.queue = null; - return stop; - } - - visit(node, key) { - const nodes = node[key]; - if (!nodes) return false; - - if (Array.isArray(nodes)) { - return this.visitMultiple(nodes, node, key); - } else { - return this.visitSingle(node, key); - } - } - -} - -exports.default = TraversalContext; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/hub.js b/node_modules/@babel/traverse/lib/hub.js deleted file mode 100644 index fe139d2a..00000000 --- a/node_modules/@babel/traverse/lib/hub.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -class Hub { - getCode() {} - - getScope() {} - - addHelper() { - throw new Error("Helpers are not supported by the default hub."); - } - - buildError(node, msg, Error = TypeError) { - return new Error(msg); - } - -} - -exports.default = Hub; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/index.js b/node_modules/@babel/traverse/lib/index.js deleted file mode 100644 index 1865e2ab..00000000 --- a/node_modules/@babel/traverse/lib/index.js +++ /dev/null @@ -1,130 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = traverse; -Object.defineProperty(exports, "NodePath", { - enumerable: true, - get: function () { - return _path.default; - } -}); -Object.defineProperty(exports, "Scope", { - enumerable: true, - get: function () { - return _scope.default; - } -}); -Object.defineProperty(exports, "Hub", { - enumerable: true, - get: function () { - return _hub.default; - } -}); -exports.visitors = void 0; - -var _context = _interopRequireDefault(require("./context")); - -var visitors = _interopRequireWildcard(require("./visitors")); - -exports.visitors = visitors; - -function _includes() { - const data = _interopRequireDefault(require("lodash/includes")); - - _includes = function () { - return data; - }; - - return data; -} - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -var cache = _interopRequireWildcard(require("./cache")); - -var _path = _interopRequireDefault(require("./path")); - -var _scope = _interopRequireDefault(require("./scope")); - -var _hub = _interopRequireDefault(require("./hub")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function traverse(parent, opts, scope, state, parentPath) { - if (!parent) return; - if (!opts) opts = {}; - - if (!opts.noScope && !scope) { - if (parent.type !== "Program" && parent.type !== "File") { - throw new Error("You must pass a scope and parentPath unless traversing a Program/File. " + `Instead of that you tried to traverse a ${parent.type} node without ` + "passing scope and parentPath."); - } - } - - visitors.explode(opts); - traverse.node(parent, opts, scope, state, parentPath); -} - -traverse.visitors = visitors; -traverse.verify = visitors.verify; -traverse.explode = visitors.explode; - -traverse.cheap = function (node, enter) { - return t().traverseFast(node, enter); -}; - -traverse.node = function (node, opts, scope, state, parentPath, skipKeys) { - const keys = t().VISITOR_KEYS[node.type]; - if (!keys) return; - const context = new _context.default(scope, opts, state, parentPath); - - for (const key of keys) { - if (skipKeys && skipKeys[key]) continue; - if (context.visit(node, key)) return; - } -}; - -traverse.clearNode = function (node, opts) { - t().removeProperties(node, opts); - cache.path.delete(node); -}; - -traverse.removeProperties = function (tree, opts) { - t().traverseFast(tree, traverse.clearNode, opts); - return tree; -}; - -function hasBlacklistedType(path, state) { - if (path.node.type === state.type) { - state.has = true; - path.stop(); - } -} - -traverse.hasType = function (tree, type, blacklistTypes) { - if ((0, _includes().default)(blacklistTypes, tree.type)) return false; - if (tree.type === type) return true; - const state = { - has: false, - type: type - }; - traverse(tree, { - noScope: true, - blacklist: blacklistTypes, - enter: hasBlacklistedType - }, null, state); - return state.has; -}; - -traverse.cache = cache; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/ancestry.js b/node_modules/@babel/traverse/lib/path/ancestry.js deleted file mode 100644 index 60e6a98f..00000000 --- a/node_modules/@babel/traverse/lib/path/ancestry.js +++ /dev/null @@ -1,188 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.findParent = findParent; -exports.find = find; -exports.getFunctionParent = getFunctionParent; -exports.getStatementParent = getStatementParent; -exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom; -exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom; -exports.getAncestry = getAncestry; -exports.isAncestor = isAncestor; -exports.isDescendant = isDescendant; -exports.inType = inType; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -var _index = _interopRequireDefault(require("./index")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function findParent(callback) { - let path = this; - - while (path = path.parentPath) { - if (callback(path)) return path; - } - - return null; -} - -function find(callback) { - let path = this; - - do { - if (callback(path)) return path; - } while (path = path.parentPath); - - return null; -} - -function getFunctionParent() { - return this.findParent(p => p.isFunction()); -} - -function getStatementParent() { - let path = this; - - do { - if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) { - break; - } else { - path = path.parentPath; - } - } while (path); - - if (path && (path.isProgram() || path.isFile())) { - throw new Error("File/Program node, we can't possibly find a statement parent to this"); - } - - return path; -} - -function getEarliestCommonAncestorFrom(paths) { - return this.getDeepestCommonAncestorFrom(paths, function (deepest, i, ancestries) { - let earliest; - const keys = t().VISITOR_KEYS[deepest.type]; - - for (const ancestry of ancestries) { - const path = ancestry[i + 1]; - - if (!earliest) { - earliest = path; - continue; - } - - if (path.listKey && earliest.listKey === path.listKey) { - if (path.key < earliest.key) { - earliest = path; - continue; - } - } - - const earliestKeyIndex = keys.indexOf(earliest.parentKey); - const currentKeyIndex = keys.indexOf(path.parentKey); - - if (earliestKeyIndex > currentKeyIndex) { - earliest = path; - } - } - - return earliest; - }); -} - -function getDeepestCommonAncestorFrom(paths, filter) { - if (!paths.length) { - return this; - } - - if (paths.length === 1) { - return paths[0]; - } - - let minDepth = Infinity; - let lastCommonIndex, lastCommon; - const ancestries = paths.map(path => { - const ancestry = []; - - do { - ancestry.unshift(path); - } while ((path = path.parentPath) && path !== this); - - if (ancestry.length < minDepth) { - minDepth = ancestry.length; - } - - return ancestry; - }); - const first = ancestries[0]; - - depthLoop: for (let i = 0; i < minDepth; i++) { - const shouldMatch = first[i]; - - for (const ancestry of ancestries) { - if (ancestry[i] !== shouldMatch) { - break depthLoop; - } - } - - lastCommonIndex = i; - lastCommon = shouldMatch; - } - - if (lastCommon) { - if (filter) { - return filter(lastCommon, lastCommonIndex, ancestries); - } else { - return lastCommon; - } - } else { - throw new Error("Couldn't find intersection"); - } -} - -function getAncestry() { - let path = this; - const paths = []; - - do { - paths.push(path); - } while (path = path.parentPath); - - return paths; -} - -function isAncestor(maybeDescendant) { - return maybeDescendant.isDescendant(this); -} - -function isDescendant(maybeAncestor) { - return !!this.findParent(parent => parent === maybeAncestor); -} - -function inType() { - let path = this; - - while (path) { - for (const type of arguments) { - if (path.node.type === type) return true; - } - - path = path.parentPath; - } - - return false; -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/comments.js b/node_modules/@babel/traverse/lib/path/comments.js deleted file mode 100644 index 09ec514b..00000000 --- a/node_modules/@babel/traverse/lib/path/comments.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.shareCommentsWithSiblings = shareCommentsWithSiblings; -exports.addComment = addComment; -exports.addComments = addComments; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function shareCommentsWithSiblings() { - if (typeof this.key === "string") return; - const node = this.node; - if (!node) return; - const trailing = node.trailingComments; - const leading = node.leadingComments; - if (!trailing && !leading) return; - const prev = this.getSibling(this.key - 1); - const next = this.getSibling(this.key + 1); - const hasPrev = Boolean(prev.node); - const hasNext = Boolean(next.node); - - if (hasPrev && hasNext) {} else if (hasPrev) { - prev.addComments("trailing", trailing); - } else if (hasNext) { - next.addComments("leading", leading); - } -} - -function addComment(type, content, line) { - t().addComment(this.node, type, content, line); -} - -function addComments(type, comments) { - t().addComments(this.node, type, comments); -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/context.js b/node_modules/@babel/traverse/lib/path/context.js deleted file mode 100644 index eacfc4e9..00000000 --- a/node_modules/@babel/traverse/lib/path/context.js +++ /dev/null @@ -1,245 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.call = call; -exports._call = _call; -exports.isBlacklisted = isBlacklisted; -exports.visit = visit; -exports.skip = skip; -exports.skipKey = skipKey; -exports.stop = stop; -exports.setScope = setScope; -exports.setContext = setContext; -exports.resync = resync; -exports._resyncParent = _resyncParent; -exports._resyncKey = _resyncKey; -exports._resyncList = _resyncList; -exports._resyncRemoved = _resyncRemoved; -exports.popContext = popContext; -exports.pushContext = pushContext; -exports.setup = setup; -exports.setKey = setKey; -exports.requeue = requeue; -exports._getQueueContexts = _getQueueContexts; - -var _index = _interopRequireDefault(require("../index")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function call(key) { - const opts = this.opts; - this.debug(key); - - if (this.node) { - if (this._call(opts[key])) return true; - } - - if (this.node) { - return this._call(opts[this.node.type] && opts[this.node.type][key]); - } - - return false; -} - -function _call(fns) { - if (!fns) return false; - - for (const fn of fns) { - if (!fn) continue; - const node = this.node; - if (!node) return true; - const ret = fn.call(this.state, this, this.state); - - if (ret && typeof ret === "object" && typeof ret.then === "function") { - throw new Error(`You appear to be using a plugin with an async traversal visitor, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`); - } - - if (ret) { - throw new Error(`Unexpected return value from visitor method ${fn}`); - } - - if (this.node !== node) return true; - if (this.shouldStop || this.shouldSkip || this.removed) return true; - } - - return false; -} - -function isBlacklisted() { - const blacklist = this.opts.blacklist; - return blacklist && blacklist.indexOf(this.node.type) > -1; -} - -function visit() { - if (!this.node) { - return false; - } - - if (this.isBlacklisted()) { - return false; - } - - if (this.opts.shouldSkip && this.opts.shouldSkip(this)) { - return false; - } - - if (this.call("enter") || this.shouldSkip) { - this.debug("Skip..."); - return this.shouldStop; - } - - this.debug("Recursing into..."); - - _index.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys); - - this.call("exit"); - return this.shouldStop; -} - -function skip() { - this.shouldSkip = true; -} - -function skipKey(key) { - this.skipKeys[key] = true; -} - -function stop() { - this.shouldStop = true; - this.shouldSkip = true; -} - -function setScope() { - if (this.opts && this.opts.noScope) return; - let path = this.parentPath; - let target; - - while (path && !target) { - if (path.opts && path.opts.noScope) return; - target = path.scope; - path = path.parentPath; - } - - this.scope = this.getScope(target); - if (this.scope) this.scope.init(); -} - -function setContext(context) { - this.shouldSkip = false; - this.shouldStop = false; - this.removed = false; - this.skipKeys = {}; - - if (context) { - this.context = context; - this.state = context.state; - this.opts = context.opts; - } - - this.setScope(); - return this; -} - -function resync() { - if (this.removed) return; - - this._resyncParent(); - - this._resyncList(); - - this._resyncKey(); -} - -function _resyncParent() { - if (this.parentPath) { - this.parent = this.parentPath.node; - } -} - -function _resyncKey() { - if (!this.container) return; - if (this.node === this.container[this.key]) return; - - if (Array.isArray(this.container)) { - for (let i = 0; i < this.container.length; i++) { - if (this.container[i] === this.node) { - return this.setKey(i); - } - } - } else { - for (const key of Object.keys(this.container)) { - if (this.container[key] === this.node) { - return this.setKey(key); - } - } - } - - this.key = null; -} - -function _resyncList() { - if (!this.parent || !this.inList) return; - const newContainer = this.parent[this.listKey]; - if (this.container === newContainer) return; - this.container = newContainer || null; -} - -function _resyncRemoved() { - if (this.key == null || !this.container || this.container[this.key] !== this.node) { - this._markRemoved(); - } -} - -function popContext() { - this.contexts.pop(); - - if (this.contexts.length > 0) { - this.setContext(this.contexts[this.contexts.length - 1]); - } else { - this.setContext(undefined); - } -} - -function pushContext(context) { - this.contexts.push(context); - this.setContext(context); -} - -function setup(parentPath, container, listKey, key) { - this.inList = !!listKey; - this.listKey = listKey; - this.parentKey = listKey || key; - this.container = container; - this.parentPath = parentPath || this.parentPath; - this.setKey(key); -} - -function setKey(key) { - this.key = key; - this.node = this.container[this.key]; - this.type = this.node && this.node.type; -} - -function requeue(pathToQueue = this) { - if (pathToQueue.removed) return; - const contexts = this.contexts; - - for (const context of contexts) { - context.maybeQueue(pathToQueue); - } -} - -function _getQueueContexts() { - let path = this; - let contexts = this.contexts; - - while (!contexts.length) { - path = path.parentPath; - if (!path) break; - contexts = path.contexts; - } - - return contexts; -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/conversion.js b/node_modules/@babel/traverse/lib/path/conversion.js deleted file mode 100644 index 9faa9053..00000000 --- a/node_modules/@babel/traverse/lib/path/conversion.js +++ /dev/null @@ -1,463 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.toComputedKey = toComputedKey; -exports.ensureBlock = ensureBlock; -exports.arrowFunctionToShadowed = arrowFunctionToShadowed; -exports.unwrapFunctionEnvironment = unwrapFunctionEnvironment; -exports.arrowFunctionToExpression = arrowFunctionToExpression; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _helperFunctionName() { - const data = _interopRequireDefault(require("@babel/helper-function-name")); - - _helperFunctionName = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function toComputedKey() { - const node = this.node; - let key; - - if (this.isMemberExpression()) { - key = node.property; - } else if (this.isProperty() || this.isMethod()) { - key = node.key; - } else { - throw new ReferenceError("todo"); - } - - if (!node.computed) { - if (t().isIdentifier(key)) key = t().stringLiteral(key.name); - } - - return key; -} - -function ensureBlock() { - const body = this.get("body"); - const bodyNode = body.node; - - if (Array.isArray(body)) { - throw new Error("Can't convert array path to a block statement"); - } - - if (!bodyNode) { - throw new Error("Can't convert node without a body"); - } - - if (body.isBlockStatement()) { - return bodyNode; - } - - const statements = []; - let stringPath = "body"; - let key; - let listKey; - - if (body.isStatement()) { - listKey = "body"; - key = 0; - statements.push(body.node); - } else { - stringPath += ".body.0"; - - if (this.isFunction()) { - key = "argument"; - statements.push(t().returnStatement(body.node)); - } else { - key = "expression"; - statements.push(t().expressionStatement(body.node)); - } - } - - this.node.body = t().blockStatement(statements); - const parentPath = this.get(stringPath); - body.setup(parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key); - return this.node; -} - -function arrowFunctionToShadowed() { - if (!this.isArrowFunctionExpression()) return; - this.arrowFunctionToExpression(); -} - -function unwrapFunctionEnvironment() { - if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration()) { - throw this.buildCodeFrameError("Can only unwrap the environment of a function."); - } - - hoistFunctionEnvironment(this); -} - -function arrowFunctionToExpression({ - allowInsertArrow = true, - specCompliant = false -} = {}) { - if (!this.isArrowFunctionExpression()) { - throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression."); - } - - const thisBinding = hoistFunctionEnvironment(this, specCompliant, allowInsertArrow); - this.ensureBlock(); - this.node.type = "FunctionExpression"; - - if (specCompliant) { - const checkBinding = thisBinding ? null : this.parentPath.scope.generateUidIdentifier("arrowCheckId"); - - if (checkBinding) { - this.parentPath.scope.push({ - id: checkBinding, - init: t().objectExpression([]) - }); - } - - this.get("body").unshiftContainer("body", t().expressionStatement(t().callExpression(this.hub.addHelper("newArrowCheck"), [t().thisExpression(), checkBinding ? t().identifier(checkBinding.name) : t().identifier(thisBinding)]))); - this.replaceWith(t().callExpression(t().memberExpression((0, _helperFunctionName().default)(this, true) || this.node, t().identifier("bind")), [checkBinding ? t().identifier(checkBinding.name) : t().thisExpression()])); - } -} - -function hoistFunctionEnvironment(fnPath, specCompliant = false, allowInsertArrow = true) { - const thisEnvFn = fnPath.findParent(p => { - return p.isFunction() && !p.isArrowFunctionExpression() || p.isProgram() || p.isClassProperty({ - static: false - }); - }); - const inConstructor = thisEnvFn && thisEnvFn.node.kind === "constructor"; - - if (thisEnvFn.isClassProperty()) { - throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property"); - } - - const { - thisPaths, - argumentsPaths, - newTargetPaths, - superProps, - superCalls - } = getScopeInformation(fnPath); - - if (inConstructor && superCalls.length > 0) { - if (!allowInsertArrow) { - throw superCalls[0].buildCodeFrameError("Unable to handle nested super() usage in arrow"); - } - - const allSuperCalls = []; - thisEnvFn.traverse({ - Function(child) { - if (child.isArrowFunctionExpression()) return; - child.skip(); - }, - - ClassProperty(child) { - child.skip(); - }, - - CallExpression(child) { - if (!child.get("callee").isSuper()) return; - allSuperCalls.push(child); - } - - }); - const superBinding = getSuperBinding(thisEnvFn); - allSuperCalls.forEach(superCall => { - const callee = t().identifier(superBinding); - callee.loc = superCall.node.callee.loc; - superCall.get("callee").replaceWith(callee); - }); - } - - let thisBinding; - - if (thisPaths.length > 0 || specCompliant) { - thisBinding = getThisBinding(thisEnvFn, inConstructor); - - if (!specCompliant || inConstructor && hasSuperClass(thisEnvFn)) { - thisPaths.forEach(thisChild => { - const thisRef = thisChild.isJSX() ? t().jsxIdentifier(thisBinding) : t().identifier(thisBinding); - thisRef.loc = thisChild.node.loc; - thisChild.replaceWith(thisRef); - }); - if (specCompliant) thisBinding = null; - } - } - - if (argumentsPaths.length > 0) { - const argumentsBinding = getBinding(thisEnvFn, "arguments", () => t().identifier("arguments")); - argumentsPaths.forEach(argumentsChild => { - const argsRef = t().identifier(argumentsBinding); - argsRef.loc = argumentsChild.node.loc; - argumentsChild.replaceWith(argsRef); - }); - } - - if (newTargetPaths.length > 0) { - const newTargetBinding = getBinding(thisEnvFn, "newtarget", () => t().metaProperty(t().identifier("new"), t().identifier("target"))); - newTargetPaths.forEach(targetChild => { - const targetRef = t().identifier(newTargetBinding); - targetRef.loc = targetChild.node.loc; - targetChild.replaceWith(targetRef); - }); - } - - if (superProps.length > 0) { - if (!allowInsertArrow) { - throw superProps[0].buildCodeFrameError("Unable to handle nested super.prop usage"); - } - - const flatSuperProps = superProps.reduce((acc, superProp) => acc.concat(standardizeSuperProperty(superProp)), []); - flatSuperProps.forEach(superProp => { - const key = superProp.node.computed ? "" : superProp.get("property").node.name; - - if (superProp.parentPath.isCallExpression({ - callee: superProp.node - })) { - const superBinding = getSuperPropCallBinding(thisEnvFn, key); - - if (superProp.node.computed) { - const prop = superProp.get("property").node; - superProp.replaceWith(t().identifier(superBinding)); - superProp.parentPath.node.arguments.unshift(prop); - } else { - superProp.replaceWith(t().identifier(superBinding)); - } - } else { - const isAssignment = superProp.parentPath.isAssignmentExpression({ - left: superProp.node - }); - const superBinding = getSuperPropBinding(thisEnvFn, isAssignment, key); - const args = []; - - if (superProp.node.computed) { - args.push(superProp.get("property").node); - } - - if (isAssignment) { - const value = superProp.parentPath.node.right; - args.push(value); - superProp.parentPath.replaceWith(t().callExpression(t().identifier(superBinding), args)); - } else { - superProp.replaceWith(t().callExpression(t().identifier(superBinding), args)); - } - } - }); - } - - return thisBinding; -} - -function standardizeSuperProperty(superProp) { - if (superProp.parentPath.isAssignmentExpression() && superProp.parentPath.node.operator !== "=") { - const assignmentPath = superProp.parentPath; - const op = assignmentPath.node.operator.slice(0, -1); - const value = assignmentPath.node.right; - assignmentPath.node.operator = "="; - - if (superProp.node.computed) { - const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp"); - assignmentPath.get("left").replaceWith(t().memberExpression(superProp.node.object, t().assignmentExpression("=", tmp, superProp.node.property), true)); - assignmentPath.get("right").replaceWith(t().binaryExpression(op, t().memberExpression(superProp.node.object, t().identifier(tmp.name), true), value)); - } else { - assignmentPath.get("left").replaceWith(t().memberExpression(superProp.node.object, superProp.node.property)); - assignmentPath.get("right").replaceWith(t().binaryExpression(op, t().memberExpression(superProp.node.object, t().identifier(superProp.node.property.name)), value)); - } - - return [assignmentPath.get("left"), assignmentPath.get("right").get("left")]; - } else if (superProp.parentPath.isUpdateExpression()) { - const updateExpr = superProp.parentPath; - const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp"); - const computedKey = superProp.node.computed ? superProp.scope.generateDeclaredUidIdentifier("prop") : null; - const parts = [t().assignmentExpression("=", tmp, t().memberExpression(superProp.node.object, computedKey ? t().assignmentExpression("=", computedKey, superProp.node.property) : superProp.node.property, superProp.node.computed)), t().assignmentExpression("=", t().memberExpression(superProp.node.object, computedKey ? t().identifier(computedKey.name) : superProp.node.property, superProp.node.computed), t().binaryExpression("+", t().identifier(tmp.name), t().numericLiteral(1)))]; - - if (!superProp.parentPath.node.prefix) { - parts.push(t().identifier(tmp.name)); - } - - updateExpr.replaceWith(t().sequenceExpression(parts)); - const left = updateExpr.get("expressions.0.right"); - const right = updateExpr.get("expressions.1.left"); - return [left, right]; - } - - return [superProp]; -} - -function hasSuperClass(thisEnvFn) { - return thisEnvFn.isClassMethod() && !!thisEnvFn.parentPath.parentPath.node.superClass; -} - -function getThisBinding(thisEnvFn, inConstructor) { - return getBinding(thisEnvFn, "this", thisBinding => { - if (!inConstructor || !hasSuperClass(thisEnvFn)) return t().thisExpression(); - const supers = new WeakSet(); - thisEnvFn.traverse({ - Function(child) { - if (child.isArrowFunctionExpression()) return; - child.skip(); - }, - - ClassProperty(child) { - child.skip(); - }, - - CallExpression(child) { - if (!child.get("callee").isSuper()) return; - if (supers.has(child.node)) return; - supers.add(child.node); - child.replaceWithMultiple([child.node, t().assignmentExpression("=", t().identifier(thisBinding), t().identifier("this"))]); - } - - }); - }); -} - -function getSuperBinding(thisEnvFn) { - return getBinding(thisEnvFn, "supercall", () => { - const argsBinding = thisEnvFn.scope.generateUidIdentifier("args"); - return t().arrowFunctionExpression([t().restElement(argsBinding)], t().callExpression(t().super(), [t().spreadElement(t().identifier(argsBinding.name))])); - }); -} - -function getSuperPropCallBinding(thisEnvFn, propName) { - return getBinding(thisEnvFn, `superprop_call:${propName || ""}`, () => { - const argsBinding = thisEnvFn.scope.generateUidIdentifier("args"); - const argsList = [t().restElement(argsBinding)]; - let fnBody; - - if (propName) { - fnBody = t().callExpression(t().memberExpression(t().super(), t().identifier(propName)), [t().spreadElement(t().identifier(argsBinding.name))]); - } else { - const method = thisEnvFn.scope.generateUidIdentifier("prop"); - argsList.unshift(method); - fnBody = t().callExpression(t().memberExpression(t().super(), t().identifier(method.name), true), [t().spreadElement(t().identifier(argsBinding.name))]); - } - - return t().arrowFunctionExpression(argsList, fnBody); - }); -} - -function getSuperPropBinding(thisEnvFn, isAssignment, propName) { - const op = isAssignment ? "set" : "get"; - return getBinding(thisEnvFn, `superprop_${op}:${propName || ""}`, () => { - const argsList = []; - let fnBody; - - if (propName) { - fnBody = t().memberExpression(t().super(), t().identifier(propName)); - } else { - const method = thisEnvFn.scope.generateUidIdentifier("prop"); - argsList.unshift(method); - fnBody = t().memberExpression(t().super(), t().identifier(method.name), true); - } - - if (isAssignment) { - const valueIdent = thisEnvFn.scope.generateUidIdentifier("value"); - argsList.push(valueIdent); - fnBody = t().assignmentExpression("=", fnBody, t().identifier(valueIdent.name)); - } - - return t().arrowFunctionExpression(argsList, fnBody); - }); -} - -function getBinding(thisEnvFn, key, init) { - const cacheKey = "binding:" + key; - let data = thisEnvFn.getData(cacheKey); - - if (!data) { - const id = thisEnvFn.scope.generateUidIdentifier(key); - data = id.name; - thisEnvFn.setData(cacheKey, data); - thisEnvFn.scope.push({ - id: id, - init: init(data) - }); - } - - return data; -} - -function getScopeInformation(fnPath) { - const thisPaths = []; - const argumentsPaths = []; - const newTargetPaths = []; - const superProps = []; - const superCalls = []; - fnPath.traverse({ - ClassProperty(child) { - child.skip(); - }, - - Function(child) { - if (child.isArrowFunctionExpression()) return; - child.skip(); - }, - - ThisExpression(child) { - thisPaths.push(child); - }, - - JSXIdentifier(child) { - if (child.node.name !== "this") return; - - if (!child.parentPath.isJSXMemberExpression({ - object: child.node - }) && !child.parentPath.isJSXOpeningElement({ - name: child.node - })) { - return; - } - - thisPaths.push(child); - }, - - CallExpression(child) { - if (child.get("callee").isSuper()) superCalls.push(child); - }, - - MemberExpression(child) { - if (child.get("object").isSuper()) superProps.push(child); - }, - - ReferencedIdentifier(child) { - if (child.node.name !== "arguments") return; - argumentsPaths.push(child); - }, - - MetaProperty(child) { - if (!child.get("meta").isIdentifier({ - name: "new" - })) return; - if (!child.get("property").isIdentifier({ - name: "target" - })) return; - newTargetPaths.push(child); - } - - }); - return { - thisPaths, - argumentsPaths, - newTargetPaths, - superProps, - superCalls - }; -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/evaluation.js b/node_modules/@babel/traverse/lib/path/evaluation.js deleted file mode 100644 index 61c0a550..00000000 --- a/node_modules/@babel/traverse/lib/path/evaluation.js +++ /dev/null @@ -1,404 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.evaluateTruthy = evaluateTruthy; -exports.evaluate = evaluate; -const VALID_CALLEES = ["String", "Number", "Math"]; -const INVALID_METHODS = ["random"]; - -function evaluateTruthy() { - const res = this.evaluate(); - if (res.confident) return !!res.value; -} - -function deopt(path, state) { - if (!state.confident) return; - state.deoptPath = path; - state.confident = false; -} - -function evaluateCached(path, state) { - const { - node - } = path; - const { - seen - } = state; - - if (seen.has(node)) { - const existing = seen.get(node); - - if (existing.resolved) { - return existing.value; - } else { - deopt(path, state); - return; - } - } else { - const item = { - resolved: false - }; - seen.set(node, item); - - const val = _evaluate(path, state); - - if (state.confident) { - item.resolved = true; - item.value = val; - } - - return val; - } -} - -function _evaluate(path, state) { - if (!state.confident) return; - const { - node - } = path; - - if (path.isSequenceExpression()) { - const exprs = path.get("expressions"); - return evaluateCached(exprs[exprs.length - 1], state); - } - - if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) { - return node.value; - } - - if (path.isNullLiteral()) { - return null; - } - - if (path.isTemplateLiteral()) { - return evaluateQuasis(path, node.quasis, state); - } - - if (path.isTaggedTemplateExpression() && path.get("tag").isMemberExpression()) { - const object = path.get("tag.object"); - const { - node: { - name - } - } = object; - const property = path.get("tag.property"); - - if (object.isIdentifier() && name === "String" && !path.scope.getBinding(name, true) && property.isIdentifier && property.node.name === "raw") { - return evaluateQuasis(path, node.quasi.quasis, state, true); - } - } - - if (path.isConditionalExpression()) { - const testResult = evaluateCached(path.get("test"), state); - if (!state.confident) return; - - if (testResult) { - return evaluateCached(path.get("consequent"), state); - } else { - return evaluateCached(path.get("alternate"), state); - } - } - - if (path.isExpressionWrapper()) { - return evaluateCached(path.get("expression"), state); - } - - if (path.isMemberExpression() && !path.parentPath.isCallExpression({ - callee: node - })) { - const property = path.get("property"); - const object = path.get("object"); - - if (object.isLiteral() && property.isIdentifier()) { - const value = object.node.value; - const type = typeof value; - - if (type === "number" || type === "string") { - return value[property.node.name]; - } - } - } - - if (path.isReferencedIdentifier()) { - const binding = path.scope.getBinding(node.name); - - if (binding && binding.constantViolations.length > 0) { - return deopt(binding.path, state); - } - - if (binding && path.node.start < binding.path.node.end) { - return deopt(binding.path, state); - } - - if (binding && binding.hasValue) { - return binding.value; - } else { - if (node.name === "undefined") { - return binding ? deopt(binding.path, state) : undefined; - } else if (node.name === "Infinity") { - return binding ? deopt(binding.path, state) : Infinity; - } else if (node.name === "NaN") { - return binding ? deopt(binding.path, state) : NaN; - } - - const resolved = path.resolve(); - - if (resolved === path) { - return deopt(path, state); - } else { - return evaluateCached(resolved, state); - } - } - } - - if (path.isUnaryExpression({ - prefix: true - })) { - if (node.operator === "void") { - return undefined; - } - - const argument = path.get("argument"); - - if (node.operator === "typeof" && (argument.isFunction() || argument.isClass())) { - return "function"; - } - - const arg = evaluateCached(argument, state); - if (!state.confident) return; - - switch (node.operator) { - case "!": - return !arg; - - case "+": - return +arg; - - case "-": - return -arg; - - case "~": - return ~arg; - - case "typeof": - return typeof arg; - } - } - - if (path.isArrayExpression()) { - const arr = []; - const elems = path.get("elements"); - - for (const elem of elems) { - const elemValue = elem.evaluate(); - - if (elemValue.confident) { - arr.push(elemValue.value); - } else { - return deopt(elem, state); - } - } - - return arr; - } - - if (path.isObjectExpression()) { - const obj = {}; - const props = path.get("properties"); - - for (const prop of props) { - if (prop.isObjectMethod() || prop.isSpreadElement()) { - return deopt(prop, state); - } - - const keyPath = prop.get("key"); - let key = keyPath; - - if (prop.node.computed) { - key = key.evaluate(); - - if (!key.confident) { - return deopt(keyPath, state); - } - - key = key.value; - } else if (key.isIdentifier()) { - key = key.node.name; - } else { - key = key.node.value; - } - - const valuePath = prop.get("value"); - let value = valuePath.evaluate(); - - if (!value.confident) { - return deopt(valuePath, state); - } - - value = value.value; - obj[key] = value; - } - - return obj; - } - - if (path.isLogicalExpression()) { - const wasConfident = state.confident; - const left = evaluateCached(path.get("left"), state); - const leftConfident = state.confident; - state.confident = wasConfident; - const right = evaluateCached(path.get("right"), state); - const rightConfident = state.confident; - - switch (node.operator) { - case "||": - state.confident = leftConfident && (!!left || rightConfident); - if (!state.confident) return; - return left || right; - - case "&&": - state.confident = leftConfident && (!left || rightConfident); - if (!state.confident) return; - return left && right; - } - } - - if (path.isBinaryExpression()) { - const left = evaluateCached(path.get("left"), state); - if (!state.confident) return; - const right = evaluateCached(path.get("right"), state); - if (!state.confident) return; - - switch (node.operator) { - case "-": - return left - right; - - case "+": - return left + right; - - case "/": - return left / right; - - case "*": - return left * right; - - case "%": - return left % right; - - case "**": - return Math.pow(left, right); - - case "<": - return left < right; - - case ">": - return left > right; - - case "<=": - return left <= right; - - case ">=": - return left >= right; - - case "==": - return left == right; - - case "!=": - return left != right; - - case "===": - return left === right; - - case "!==": - return left !== right; - - case "|": - return left | right; - - case "&": - return left & right; - - case "^": - return left ^ right; - - case "<<": - return left << right; - - case ">>": - return left >> right; - - case ">>>": - return left >>> right; - } - } - - if (path.isCallExpression()) { - const callee = path.get("callee"); - let context; - let func; - - if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name, true) && VALID_CALLEES.indexOf(callee.node.name) >= 0) { - func = global[node.callee.name]; - } - - if (callee.isMemberExpression()) { - const object = callee.get("object"); - const property = callee.get("property"); - - if (object.isIdentifier() && property.isIdentifier() && VALID_CALLEES.indexOf(object.node.name) >= 0 && INVALID_METHODS.indexOf(property.node.name) < 0) { - context = global[object.node.name]; - func = context[property.node.name]; - } - - if (object.isLiteral() && property.isIdentifier()) { - const type = typeof object.node.value; - - if (type === "string" || type === "number") { - context = object.node.value; - func = context[property.node.name]; - } - } - } - - if (func) { - const args = path.get("arguments").map(arg => evaluateCached(arg, state)); - if (!state.confident) return; - return func.apply(context, args); - } - } - - deopt(path, state); -} - -function evaluateQuasis(path, quasis, state, raw = false) { - let str = ""; - let i = 0; - const exprs = path.get("expressions"); - - for (const elem of quasis) { - if (!state.confident) break; - str += raw ? elem.value.raw : elem.value.cooked; - const expr = exprs[i++]; - if (expr) str += String(evaluateCached(expr, state)); - } - - if (!state.confident) return; - return str; -} - -function evaluate() { - const state = { - confident: true, - deoptPath: null, - seen: new Map() - }; - let value = evaluateCached(this, state); - if (!state.confident) value = undefined; - return { - confident: state.confident, - deopt: state.deoptPath, - value: value - }; -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/family.js b/node_modules/@babel/traverse/lib/path/family.js deleted file mode 100644 index 42b3fc69..00000000 --- a/node_modules/@babel/traverse/lib/path/family.js +++ /dev/null @@ -1,241 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getOpposite = getOpposite; -exports.getCompletionRecords = getCompletionRecords; -exports.getSibling = getSibling; -exports.getPrevSibling = getPrevSibling; -exports.getNextSibling = getNextSibling; -exports.getAllNextSiblings = getAllNextSiblings; -exports.getAllPrevSiblings = getAllPrevSiblings; -exports.get = get; -exports._getKey = _getKey; -exports._getPattern = _getPattern; -exports.getBindingIdentifiers = getBindingIdentifiers; -exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers; -exports.getBindingIdentifierPaths = getBindingIdentifierPaths; -exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths; - -var _index = _interopRequireDefault(require("./index")); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getOpposite() { - if (this.key === "left") { - return this.getSibling("right"); - } else if (this.key === "right") { - return this.getSibling("left"); - } -} - -function addCompletionRecords(path, paths) { - if (path) return paths.concat(path.getCompletionRecords()); - return paths; -} - -function getCompletionRecords() { - let paths = []; - - if (this.isIfStatement()) { - paths = addCompletionRecords(this.get("consequent"), paths); - paths = addCompletionRecords(this.get("alternate"), paths); - } else if (this.isDoExpression() || this.isFor() || this.isWhile()) { - paths = addCompletionRecords(this.get("body"), paths); - } else if (this.isProgram() || this.isBlockStatement()) { - paths = addCompletionRecords(this.get("body").pop(), paths); - } else if (this.isFunction()) { - return this.get("body").getCompletionRecords(); - } else if (this.isTryStatement()) { - paths = addCompletionRecords(this.get("block"), paths); - paths = addCompletionRecords(this.get("handler"), paths); - paths = addCompletionRecords(this.get("finalizer"), paths); - } else if (this.isCatchClause()) { - paths = addCompletionRecords(this.get("body"), paths); - } else { - paths.push(this); - } - - return paths; -} - -function getSibling(key) { - return _index.default.get({ - parentPath: this.parentPath, - parent: this.parent, - container: this.container, - listKey: this.listKey, - key: key - }); -} - -function getPrevSibling() { - return this.getSibling(this.key - 1); -} - -function getNextSibling() { - return this.getSibling(this.key + 1); -} - -function getAllNextSiblings() { - let _key = this.key; - let sibling = this.getSibling(++_key); - const siblings = []; - - while (sibling.node) { - siblings.push(sibling); - sibling = this.getSibling(++_key); - } - - return siblings; -} - -function getAllPrevSiblings() { - let _key = this.key; - let sibling = this.getSibling(--_key); - const siblings = []; - - while (sibling.node) { - siblings.push(sibling); - sibling = this.getSibling(--_key); - } - - return siblings; -} - -function get(key, context) { - if (context === true) context = this.context; - const parts = key.split("."); - - if (parts.length === 1) { - return this._getKey(key, context); - } else { - return this._getPattern(parts, context); - } -} - -function _getKey(key, context) { - const node = this.node; - const container = node[key]; - - if (Array.isArray(container)) { - return container.map((_, i) => { - return _index.default.get({ - listKey: key, - parentPath: this, - parent: node, - container: container, - key: i - }).setContext(context); - }); - } else { - return _index.default.get({ - parentPath: this, - parent: node, - container: node, - key: key - }).setContext(context); - } -} - -function _getPattern(parts, context) { - let path = this; - - for (const part of parts) { - if (part === ".") { - path = path.parentPath; - } else { - if (Array.isArray(path)) { - path = path[part]; - } else { - path = path.get(part, context); - } - } - } - - return path; -} - -function getBindingIdentifiers(duplicates) { - return t().getBindingIdentifiers(this.node, duplicates); -} - -function getOuterBindingIdentifiers(duplicates) { - return t().getOuterBindingIdentifiers(this.node, duplicates); -} - -function getBindingIdentifierPaths(duplicates = false, outerOnly = false) { - const path = this; - let search = [].concat(path); - const ids = Object.create(null); - - while (search.length) { - const id = search.shift(); - if (!id) continue; - if (!id.node) continue; - const keys = t().getBindingIdentifiers.keys[id.node.type]; - - if (id.isIdentifier()) { - if (duplicates) { - const _ids = ids[id.node.name] = ids[id.node.name] || []; - - _ids.push(id); - } else { - ids[id.node.name] = id; - } - - continue; - } - - if (id.isExportDeclaration()) { - const declaration = id.get("declaration"); - - if (declaration.isDeclaration()) { - search.push(declaration); - } - - continue; - } - - if (outerOnly) { - if (id.isFunctionDeclaration()) { - search.push(id.get("id")); - continue; - } - - if (id.isFunctionExpression()) { - continue; - } - } - - if (keys) { - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - const child = id.get(key); - - if (Array.isArray(child) || child.node) { - search = search.concat(child); - } - } - } - } - - return ids; -} - -function getOuterBindingIdentifierPaths(duplicates) { - return this.getBindingIdentifierPaths(duplicates, true); -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/index.js b/node_modules/@babel/traverse/lib/path/index.js deleted file mode 100644 index 906087f1..00000000 --- a/node_modules/@babel/traverse/lib/path/index.js +++ /dev/null @@ -1,219 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var virtualTypes = _interopRequireWildcard(require("./lib/virtual-types")); - -function _debug() { - const data = _interopRequireDefault(require("debug")); - - _debug = function () { - return data; - }; - - return data; -} - -var _index = _interopRequireDefault(require("../index")); - -var _scope = _interopRequireDefault(require("../scope")); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -var _cache = require("../cache"); - -function _generator() { - const data = _interopRequireDefault(require("@babel/generator")); - - _generator = function () { - return data; - }; - - return data; -} - -var NodePath_ancestry = _interopRequireWildcard(require("./ancestry")); - -var NodePath_inference = _interopRequireWildcard(require("./inference")); - -var NodePath_replacement = _interopRequireWildcard(require("./replacement")); - -var NodePath_evaluation = _interopRequireWildcard(require("./evaluation")); - -var NodePath_conversion = _interopRequireWildcard(require("./conversion")); - -var NodePath_introspection = _interopRequireWildcard(require("./introspection")); - -var NodePath_context = _interopRequireWildcard(require("./context")); - -var NodePath_removal = _interopRequireWildcard(require("./removal")); - -var NodePath_modification = _interopRequireWildcard(require("./modification")); - -var NodePath_family = _interopRequireWildcard(require("./family")); - -var NodePath_comments = _interopRequireWildcard(require("./comments")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const debug = (0, _debug().default)("babel"); - -class NodePath { - constructor(hub, parent) { - this.parent = parent; - this.hub = hub; - this.contexts = []; - this.data = Object.create(null); - this.shouldSkip = false; - this.shouldStop = false; - this.removed = false; - this.state = null; - this.opts = null; - this.skipKeys = null; - this.parentPath = null; - this.context = null; - this.container = null; - this.listKey = null; - this.inList = false; - this.parentKey = null; - this.key = null; - this.node = null; - this.scope = null; - this.type = null; - this.typeAnnotation = null; - } - - static get({ - hub, - parentPath, - parent, - container, - listKey, - key - }) { - if (!hub && parentPath) { - hub = parentPath.hub; - } - - if (!parent) { - throw new Error("To get a node path the parent needs to exist"); - } - - const targetNode = container[key]; - const paths = _cache.path.get(parent) || []; - - if (!_cache.path.has(parent)) { - _cache.path.set(parent, paths); - } - - let path; - - for (let i = 0; i < paths.length; i++) { - const pathCheck = paths[i]; - - if (pathCheck.node === targetNode) { - path = pathCheck; - break; - } - } - - if (!path) { - path = new NodePath(hub, parent); - paths.push(path); - } - - path.setup(parentPath, container, listKey, key); - return path; - } - - getScope(scope) { - return this.isScope() ? new _scope.default(this) : scope; - } - - setData(key, val) { - return this.data[key] = val; - } - - getData(key, def) { - let val = this.data[key]; - if (val === undefined && def !== undefined) val = this.data[key] = def; - return val; - } - - buildCodeFrameError(msg, Error = SyntaxError) { - return this.hub.buildError(this.node, msg, Error); - } - - traverse(visitor, state) { - (0, _index.default)(this.node, visitor, this.scope, state, this); - } - - set(key, node) { - t().validate(this.node, key, node); - this.node[key] = node; - } - - getPathLocation() { - const parts = []; - let path = this; - - do { - let key = path.key; - if (path.inList) key = `${path.listKey}[${key}]`; - parts.unshift(key); - } while (path = path.parentPath); - - return parts.join("."); - } - - debug(message) { - if (!debug.enabled) return; - debug(`${this.getPathLocation()} ${this.type}: ${message}`); - } - - toString() { - return (0, _generator().default)(this.node).code; - } - -} - -exports.default = NodePath; -Object.assign(NodePath.prototype, NodePath_ancestry, NodePath_inference, NodePath_replacement, NodePath_evaluation, NodePath_conversion, NodePath_introspection, NodePath_context, NodePath_removal, NodePath_modification, NodePath_family, NodePath_comments); - -for (const type of t().TYPES) { - const typeKey = `is${type}`; - const fn = t()[typeKey]; - - NodePath.prototype[typeKey] = function (opts) { - return fn(this.node, opts); - }; - - NodePath.prototype[`assert${type}`] = function (opts) { - if (!fn(this.node, opts)) { - throw new TypeError(`Expected node path of type ${type}`); - } - }; -} - -for (const type of Object.keys(virtualTypes)) { - if (type[0] === "_") continue; - if (t().TYPES.indexOf(type) < 0) t().TYPES.push(type); - const virtualType = virtualTypes[type]; - - NodePath.prototype[`is${type}`] = function (opts) { - return virtualType.checkPath(this, opts); - }; -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/inference/index.js b/node_modules/@babel/traverse/lib/path/inference/index.js deleted file mode 100644 index 80a77d08..00000000 --- a/node_modules/@babel/traverse/lib/path/inference/index.js +++ /dev/null @@ -1,132 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getTypeAnnotation = getTypeAnnotation; -exports._getTypeAnnotation = _getTypeAnnotation; -exports.isBaseType = isBaseType; -exports.couldBeBaseType = couldBeBaseType; -exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches; -exports.isGenericType = isGenericType; - -var inferers = _interopRequireWildcard(require("./inferers")); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function getTypeAnnotation() { - if (this.typeAnnotation) return this.typeAnnotation; - let type = this._getTypeAnnotation() || t().anyTypeAnnotation(); - if (t().isTypeAnnotation(type)) type = type.typeAnnotation; - return this.typeAnnotation = type; -} - -function _getTypeAnnotation() { - const node = this.node; - - if (!node) { - if (this.key === "init" && this.parentPath.isVariableDeclarator()) { - const declar = this.parentPath.parentPath; - const declarParent = declar.parentPath; - - if (declar.key === "left" && declarParent.isForInStatement()) { - return t().stringTypeAnnotation(); - } - - if (declar.key === "left" && declarParent.isForOfStatement()) { - return t().anyTypeAnnotation(); - } - - return t().voidTypeAnnotation(); - } else { - return; - } - } - - if (node.typeAnnotation) { - return node.typeAnnotation; - } - - let inferer = inferers[node.type]; - - if (inferer) { - return inferer.call(this, node); - } - - inferer = inferers[this.parentPath.type]; - - if (inferer && inferer.validParent) { - return this.parentPath.getTypeAnnotation(); - } -} - -function isBaseType(baseName, soft) { - return _isBaseType(baseName, this.getTypeAnnotation(), soft); -} - -function _isBaseType(baseName, type, soft) { - if (baseName === "string") { - return t().isStringTypeAnnotation(type); - } else if (baseName === "number") { - return t().isNumberTypeAnnotation(type); - } else if (baseName === "boolean") { - return t().isBooleanTypeAnnotation(type); - } else if (baseName === "any") { - return t().isAnyTypeAnnotation(type); - } else if (baseName === "mixed") { - return t().isMixedTypeAnnotation(type); - } else if (baseName === "empty") { - return t().isEmptyTypeAnnotation(type); - } else if (baseName === "void") { - return t().isVoidTypeAnnotation(type); - } else { - if (soft) { - return false; - } else { - throw new Error(`Unknown base type ${baseName}`); - } - } -} - -function couldBeBaseType(name) { - const type = this.getTypeAnnotation(); - if (t().isAnyTypeAnnotation(type)) return true; - - if (t().isUnionTypeAnnotation(type)) { - for (const type2 of type.types) { - if (t().isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) { - return true; - } - } - - return false; - } else { - return _isBaseType(name, type, true); - } -} - -function baseTypeStrictlyMatches(right) { - const left = this.getTypeAnnotation(); - right = right.getTypeAnnotation(); - - if (!t().isAnyTypeAnnotation(left) && t().isFlowBaseAnnotation(left)) { - return right.type === left.type; - } -} - -function isGenericType(genericName) { - const type = this.getTypeAnnotation(); - return t().isGenericTypeAnnotation(type) && t().isIdentifier(type.id, { - name: genericName - }); -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js b/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js deleted file mode 100644 index 35601aba..00000000 --- a/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js +++ /dev/null @@ -1,181 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _default(node) { - if (!this.isReferenced()) return; - const binding = this.scope.getBinding(node.name); - - if (binding) { - if (binding.identifier.typeAnnotation) { - return binding.identifier.typeAnnotation; - } else { - return getTypeAnnotationBindingConstantViolations(binding, this, node.name); - } - } - - if (node.name === "undefined") { - return t().voidTypeAnnotation(); - } else if (node.name === "NaN" || node.name === "Infinity") { - return t().numberTypeAnnotation(); - } else if (node.name === "arguments") {} -} - -function getTypeAnnotationBindingConstantViolations(binding, path, name) { - const types = []; - const functionConstantViolations = []; - let constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations); - const testType = getConditionalAnnotation(binding, path, name); - - if (testType) { - const testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement); - constantViolations = constantViolations.filter(path => testConstantViolations.indexOf(path) < 0); - types.push(testType.typeAnnotation); - } - - if (constantViolations.length) { - constantViolations = constantViolations.concat(functionConstantViolations); - - for (const violation of constantViolations) { - types.push(violation.getTypeAnnotation()); - } - } - - if (types.length) { - return t().createUnionTypeAnnotation(types); - } -} - -function getConstantViolationsBefore(binding, path, functions) { - const violations = binding.constantViolations.slice(); - violations.unshift(binding.path); - return violations.filter(violation => { - violation = violation.resolve(); - - const status = violation._guessExecutionStatusRelativeTo(path); - - if (functions && status === "function") functions.push(violation); - return status === "before"; - }); -} - -function inferAnnotationFromBinaryExpression(name, path) { - const operator = path.node.operator; - const right = path.get("right").resolve(); - const left = path.get("left").resolve(); - let target; - - if (left.isIdentifier({ - name - })) { - target = right; - } else if (right.isIdentifier({ - name - })) { - target = left; - } - - if (target) { - if (operator === "===") { - return target.getTypeAnnotation(); - } - - if (t().BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) { - return t().numberTypeAnnotation(); - } - - return; - } - - if (operator !== "===" && operator !== "==") return; - let typeofPath; - let typePath; - - if (left.isUnaryExpression({ - operator: "typeof" - })) { - typeofPath = left; - typePath = right; - } else if (right.isUnaryExpression({ - operator: "typeof" - })) { - typeofPath = right; - typePath = left; - } - - if (!typeofPath) return; - if (!typeofPath.get("argument").isIdentifier({ - name - })) return; - typePath = typePath.resolve(); - if (!typePath.isLiteral()) return; - const typeValue = typePath.node.value; - if (typeof typeValue !== "string") return; - return t().createTypeAnnotationBasedOnTypeof(typeValue); -} - -function getParentConditionalPath(binding, path, name) { - let parentPath; - - while (parentPath = path.parentPath) { - if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) { - if (path.key === "test") { - return; - } - - return parentPath; - } - - if (parentPath.isFunction()) { - if (parentPath.parentPath.scope.getBinding(name) !== binding) return; - } - - path = parentPath; - } -} - -function getConditionalAnnotation(binding, path, name) { - const ifStatement = getParentConditionalPath(binding, path, name); - if (!ifStatement) return; - const test = ifStatement.get("test"); - const paths = [test]; - const types = []; - - for (let i = 0; i < paths.length; i++) { - const path = paths[i]; - - if (path.isLogicalExpression()) { - if (path.node.operator === "&&") { - paths.push(path.get("left")); - paths.push(path.get("right")); - } - } else if (path.isBinaryExpression()) { - const type = inferAnnotationFromBinaryExpression(name, path); - if (type) types.push(type); - } - } - - if (types.length) { - return { - typeAnnotation: t().createUnionTypeAnnotation(types), - ifStatement - }; - } - - return getConditionalAnnotation(ifStatement, name); -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/inference/inferers.js b/node_modules/@babel/traverse/lib/path/inference/inferers.js deleted file mode 100644 index 5890b938..00000000 --- a/node_modules/@babel/traverse/lib/path/inference/inferers.js +++ /dev/null @@ -1,227 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.VariableDeclarator = VariableDeclarator; -exports.TypeCastExpression = TypeCastExpression; -exports.NewExpression = NewExpression; -exports.TemplateLiteral = TemplateLiteral; -exports.UnaryExpression = UnaryExpression; -exports.BinaryExpression = BinaryExpression; -exports.LogicalExpression = LogicalExpression; -exports.ConditionalExpression = ConditionalExpression; -exports.SequenceExpression = SequenceExpression; -exports.ParenthesizedExpression = ParenthesizedExpression; -exports.AssignmentExpression = AssignmentExpression; -exports.UpdateExpression = UpdateExpression; -exports.StringLiteral = StringLiteral; -exports.NumericLiteral = NumericLiteral; -exports.BooleanLiteral = BooleanLiteral; -exports.NullLiteral = NullLiteral; -exports.RegExpLiteral = RegExpLiteral; -exports.ObjectExpression = ObjectExpression; -exports.ArrayExpression = ArrayExpression; -exports.RestElement = RestElement; -exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = Func; -exports.CallExpression = CallExpression; -exports.TaggedTemplateExpression = TaggedTemplateExpression; -Object.defineProperty(exports, "Identifier", { - enumerable: true, - get: function () { - return _infererReference.default; - } -}); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -var _infererReference = _interopRequireDefault(require("./inferer-reference")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function VariableDeclarator() { - const id = this.get("id"); - if (!id.isIdentifier()) return; - const init = this.get("init"); - let type = init.getTypeAnnotation(); - - if (type && type.type === "AnyTypeAnnotation") { - if (init.isCallExpression() && init.get("callee").isIdentifier({ - name: "Array" - }) && !init.scope.hasBinding("Array", true)) { - type = ArrayExpression(); - } - } - - return type; -} - -function TypeCastExpression(node) { - return node.typeAnnotation; -} - -TypeCastExpression.validParent = true; - -function NewExpression(node) { - if (this.get("callee").isIdentifier()) { - return t().genericTypeAnnotation(node.callee); - } -} - -function TemplateLiteral() { - return t().stringTypeAnnotation(); -} - -function UnaryExpression(node) { - const operator = node.operator; - - if (operator === "void") { - return t().voidTypeAnnotation(); - } else if (t().NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) { - return t().numberTypeAnnotation(); - } else if (t().STRING_UNARY_OPERATORS.indexOf(operator) >= 0) { - return t().stringTypeAnnotation(); - } else if (t().BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) { - return t().booleanTypeAnnotation(); - } -} - -function BinaryExpression(node) { - const operator = node.operator; - - if (t().NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) { - return t().numberTypeAnnotation(); - } else if (t().BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) { - return t().booleanTypeAnnotation(); - } else if (operator === "+") { - const right = this.get("right"); - const left = this.get("left"); - - if (left.isBaseType("number") && right.isBaseType("number")) { - return t().numberTypeAnnotation(); - } else if (left.isBaseType("string") || right.isBaseType("string")) { - return t().stringTypeAnnotation(); - } - - return t().unionTypeAnnotation([t().stringTypeAnnotation(), t().numberTypeAnnotation()]); - } -} - -function LogicalExpression() { - return t().createUnionTypeAnnotation([this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()]); -} - -function ConditionalExpression() { - return t().createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()]); -} - -function SequenceExpression() { - return this.get("expressions").pop().getTypeAnnotation(); -} - -function ParenthesizedExpression() { - return this.get("expression").getTypeAnnotation(); -} - -function AssignmentExpression() { - return this.get("right").getTypeAnnotation(); -} - -function UpdateExpression(node) { - const operator = node.operator; - - if (operator === "++" || operator === "--") { - return t().numberTypeAnnotation(); - } -} - -function StringLiteral() { - return t().stringTypeAnnotation(); -} - -function NumericLiteral() { - return t().numberTypeAnnotation(); -} - -function BooleanLiteral() { - return t().booleanTypeAnnotation(); -} - -function NullLiteral() { - return t().nullLiteralTypeAnnotation(); -} - -function RegExpLiteral() { - return t().genericTypeAnnotation(t().identifier("RegExp")); -} - -function ObjectExpression() { - return t().genericTypeAnnotation(t().identifier("Object")); -} - -function ArrayExpression() { - return t().genericTypeAnnotation(t().identifier("Array")); -} - -function RestElement() { - return ArrayExpression(); -} - -RestElement.validParent = true; - -function Func() { - return t().genericTypeAnnotation(t().identifier("Function")); -} - -const isArrayFrom = t().buildMatchMemberExpression("Array.from"); -const isObjectKeys = t().buildMatchMemberExpression("Object.keys"); -const isObjectValues = t().buildMatchMemberExpression("Object.values"); -const isObjectEntries = t().buildMatchMemberExpression("Object.entries"); - -function CallExpression() { - const { - callee - } = this.node; - - if (isObjectKeys(callee)) { - return t().arrayTypeAnnotation(t().stringTypeAnnotation()); - } else if (isArrayFrom(callee) || isObjectValues(callee)) { - return t().arrayTypeAnnotation(t().anyTypeAnnotation()); - } else if (isObjectEntries(callee)) { - return t().arrayTypeAnnotation(t().tupleTypeAnnotation([t().stringTypeAnnotation(), t().anyTypeAnnotation()])); - } - - return resolveCall(this.get("callee")); -} - -function TaggedTemplateExpression() { - return resolveCall(this.get("tag")); -} - -function resolveCall(callee) { - callee = callee.resolve(); - - if (callee.isFunction()) { - if (callee.is("async")) { - if (callee.is("generator")) { - return t().genericTypeAnnotation(t().identifier("AsyncIterator")); - } else { - return t().genericTypeAnnotation(t().identifier("Promise")); - } - } else { - if (callee.node.returnType) { - return callee.node.returnType; - } else {} - } - } -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/introspection.js b/node_modules/@babel/traverse/lib/path/introspection.js deleted file mode 100644 index 3eab2763..00000000 --- a/node_modules/@babel/traverse/lib/path/introspection.js +++ /dev/null @@ -1,371 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.matchesPattern = matchesPattern; -exports.has = has; -exports.isStatic = isStatic; -exports.isnt = isnt; -exports.equals = equals; -exports.isNodeType = isNodeType; -exports.canHaveVariableDeclarationOrExpression = canHaveVariableDeclarationOrExpression; -exports.canSwapBetweenExpressionAndStatement = canSwapBetweenExpressionAndStatement; -exports.isCompletionRecord = isCompletionRecord; -exports.isStatementOrBlock = isStatementOrBlock; -exports.referencesImport = referencesImport; -exports.getSource = getSource; -exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore; -exports._guessExecutionStatusRelativeTo = _guessExecutionStatusRelativeTo; -exports._guessExecutionStatusRelativeToDifferentFunctions = _guessExecutionStatusRelativeToDifferentFunctions; -exports.resolve = resolve; -exports._resolve = _resolve; -exports.isConstantExpression = isConstantExpression; -exports.isInStrictMode = isInStrictMode; -exports.is = void 0; - -function _includes() { - const data = _interopRequireDefault(require("lodash/includes")); - - _includes = function () { - return data; - }; - - return data; -} - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function matchesPattern(pattern, allowPartial) { - return t().matchesPattern(this.node, pattern, allowPartial); -} - -function has(key) { - const val = this.node && this.node[key]; - - if (val && Array.isArray(val)) { - return !!val.length; - } else { - return !!val; - } -} - -function isStatic() { - return this.scope.isStatic(this.node); -} - -const is = has; -exports.is = is; - -function isnt(key) { - return !this.has(key); -} - -function equals(key, value) { - return this.node[key] === value; -} - -function isNodeType(type) { - return t().isType(this.type, type); -} - -function canHaveVariableDeclarationOrExpression() { - return (this.key === "init" || this.key === "left") && this.parentPath.isFor(); -} - -function canSwapBetweenExpressionAndStatement(replacement) { - if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) { - return false; - } - - if (this.isExpression()) { - return t().isBlockStatement(replacement); - } else if (this.isBlockStatement()) { - return t().isExpression(replacement); - } - - return false; -} - -function isCompletionRecord(allowInsideFunction) { - let path = this; - let first = true; - - do { - const container = path.container; - - if (path.isFunction() && !first) { - return !!allowInsideFunction; - } - - first = false; - - if (Array.isArray(container) && path.key !== container.length - 1) { - return false; - } - } while ((path = path.parentPath) && !path.isProgram()); - - return true; -} - -function isStatementOrBlock() { - if (this.parentPath.isLabeledStatement() || t().isBlockStatement(this.container)) { - return false; - } else { - return (0, _includes().default)(t().STATEMENT_OR_BLOCK_KEYS, this.key); - } -} - -function referencesImport(moduleSource, importName) { - if (!this.isReferencedIdentifier()) return false; - const binding = this.scope.getBinding(this.node.name); - if (!binding || binding.kind !== "module") return false; - const path = binding.path; - const parent = path.parentPath; - if (!parent.isImportDeclaration()) return false; - - if (parent.node.source.value === moduleSource) { - if (!importName) return true; - } else { - return false; - } - - if (path.isImportDefaultSpecifier() && importName === "default") { - return true; - } - - if (path.isImportNamespaceSpecifier() && importName === "*") { - return true; - } - - if (path.isImportSpecifier() && path.node.imported.name === importName) { - return true; - } - - return false; -} - -function getSource() { - const node = this.node; - - if (node.end) { - const code = this.hub.getCode(); - if (code) return code.slice(node.start, node.end); - } - - return ""; -} - -function willIMaybeExecuteBefore(target) { - return this._guessExecutionStatusRelativeTo(target) !== "after"; -} - -function _guessExecutionStatusRelativeTo(target) { - const targetFuncParent = target.scope.getFunctionParent() || target.scope.getProgramParent(); - const selfFuncParent = this.scope.getFunctionParent() || target.scope.getProgramParent(); - - if (targetFuncParent.node !== selfFuncParent.node) { - const status = this._guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent); - - if (status) { - return status; - } else { - target = targetFuncParent.path; - } - } - - const targetPaths = target.getAncestry(); - if (targetPaths.indexOf(this) >= 0) return "after"; - const selfPaths = this.getAncestry(); - let commonPath; - let targetIndex; - let selfIndex; - - for (selfIndex = 0; selfIndex < selfPaths.length; selfIndex++) { - const selfPath = selfPaths[selfIndex]; - targetIndex = targetPaths.indexOf(selfPath); - - if (targetIndex >= 0) { - commonPath = selfPath; - break; - } - } - - if (!commonPath) { - return "before"; - } - - const targetRelationship = targetPaths[targetIndex - 1]; - const selfRelationship = selfPaths[selfIndex - 1]; - - if (!targetRelationship || !selfRelationship) { - return "before"; - } - - if (targetRelationship.listKey && targetRelationship.container === selfRelationship.container) { - return targetRelationship.key > selfRelationship.key ? "before" : "after"; - } - - const keys = t().VISITOR_KEYS[commonPath.type]; - const targetKeyPosition = keys.indexOf(targetRelationship.key); - const selfKeyPosition = keys.indexOf(selfRelationship.key); - return targetKeyPosition > selfKeyPosition ? "before" : "after"; -} - -function _guessExecutionStatusRelativeToDifferentFunctions(targetFuncParent) { - const targetFuncPath = targetFuncParent.path; - if (!targetFuncPath.isFunctionDeclaration()) return; - const binding = targetFuncPath.scope.getBinding(targetFuncPath.node.id.name); - if (!binding.references) return "before"; - const referencePaths = binding.referencePaths; - - for (const path of referencePaths) { - if (path.key !== "callee" || !path.parentPath.isCallExpression()) { - return; - } - } - - let allStatus; - - for (const path of referencePaths) { - const childOfFunction = !!path.find(path => path.node === targetFuncPath.node); - if (childOfFunction) continue; - - const status = this._guessExecutionStatusRelativeTo(path); - - if (allStatus) { - if (allStatus !== status) return; - } else { - allStatus = status; - } - } - - return allStatus; -} - -function resolve(dangerous, resolved) { - return this._resolve(dangerous, resolved) || this; -} - -function _resolve(dangerous, resolved) { - if (resolved && resolved.indexOf(this) >= 0) return; - resolved = resolved || []; - resolved.push(this); - - if (this.isVariableDeclarator()) { - if (this.get("id").isIdentifier()) { - return this.get("init").resolve(dangerous, resolved); - } else {} - } else if (this.isReferencedIdentifier()) { - const binding = this.scope.getBinding(this.node.name); - if (!binding) return; - if (!binding.constant) return; - if (binding.kind === "module") return; - - if (binding.path !== this) { - const ret = binding.path.resolve(dangerous, resolved); - if (this.find(parent => parent.node === ret.node)) return; - return ret; - } - } else if (this.isTypeCastExpression()) { - return this.get("expression").resolve(dangerous, resolved); - } else if (dangerous && this.isMemberExpression()) { - const targetKey = this.toComputedKey(); - if (!t().isLiteral(targetKey)) return; - const targetName = targetKey.value; - const target = this.get("object").resolve(dangerous, resolved); - - if (target.isObjectExpression()) { - const props = target.get("properties"); - - for (const prop of props) { - if (!prop.isProperty()) continue; - const key = prop.get("key"); - let match = prop.isnt("computed") && key.isIdentifier({ - name: targetName - }); - match = match || key.isLiteral({ - value: targetName - }); - if (match) return prop.get("value").resolve(dangerous, resolved); - } - } else if (target.isArrayExpression() && !isNaN(+targetName)) { - const elems = target.get("elements"); - const elem = elems[targetName]; - if (elem) return elem.resolve(dangerous, resolved); - } - } -} - -function isConstantExpression() { - if (this.isIdentifier()) { - const binding = this.scope.getBinding(this.node.name); - if (!binding) return false; - return binding.constant; - } - - if (this.isLiteral()) { - if (this.isRegExpLiteral()) { - return false; - } - - if (this.isTemplateLiteral()) { - return this.get("expressions").every(expression => expression.isConstantExpression()); - } - - return true; - } - - if (this.isUnaryExpression()) { - if (this.get("operator").node !== "void") { - return false; - } - - return this.get("argument").isConstantExpression(); - } - - if (this.isBinaryExpression()) { - return this.get("left").isConstantExpression() && this.get("right").isConstantExpression(); - } - - return false; -} - -function isInStrictMode() { - const start = this.isProgram() ? this : this.parentPath; - const strictParent = start.find(path => { - if (path.isProgram({ - sourceType: "module" - })) return true; - if (path.isClass()) return true; - if (!path.isProgram() && !path.isFunction()) return false; - - if (path.isArrowFunctionExpression() && !path.get("body").isBlockStatement()) { - return false; - } - - let { - node - } = path; - if (path.isFunction()) node = node.body; - - for (const directive of node.directives) { - if (directive.value.value === "use strict") { - return true; - } - } - }); - return !!strictParent; -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/lib/hoister.js b/node_modules/@babel/traverse/lib/path/lib/hoister.js deleted file mode 100644 index 544d7882..00000000 --- a/node_modules/@babel/traverse/lib/path/lib/hoister.js +++ /dev/null @@ -1,188 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const referenceVisitor = { - ReferencedIdentifier(path, state) { - if (path.isJSXIdentifier() && t().react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) { - return; - } - - if (path.node.name === "this") { - let scope = path.scope; - - do { - if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) { - break; - } - } while (scope = scope.parent); - - if (scope) state.breakOnScopePaths.push(scope.path); - } - - const binding = path.scope.getBinding(path.node.name); - if (!binding) return; - if (binding !== state.scope.getBinding(path.node.name)) return; - state.bindings[path.node.name] = binding; - } - -}; - -class PathHoister { - constructor(path, scope) { - this.breakOnScopePaths = []; - this.bindings = {}; - this.scopes = []; - this.scope = scope; - this.path = path; - this.attachAfter = false; - } - - isCompatibleScope(scope) { - for (const key of Object.keys(this.bindings)) { - const binding = this.bindings[key]; - - if (!scope.bindingIdentifierEquals(key, binding.identifier)) { - return false; - } - } - - return true; - } - - getCompatibleScopes() { - let scope = this.path.scope; - - do { - if (this.isCompatibleScope(scope)) { - this.scopes.push(scope); - } else { - break; - } - - if (this.breakOnScopePaths.indexOf(scope.path) >= 0) { - break; - } - } while (scope = scope.parent); - } - - getAttachmentPath() { - let path = this._getAttachmentPath(); - - if (!path) return; - let targetScope = path.scope; - - if (targetScope.path === path) { - targetScope = path.scope.parent; - } - - if (targetScope.path.isProgram() || targetScope.path.isFunction()) { - for (const name of Object.keys(this.bindings)) { - if (!targetScope.hasOwnBinding(name)) continue; - const binding = this.bindings[name]; - - if (binding.kind === "param" || binding.path.parentKey === "params") { - continue; - } - - const bindingParentPath = this.getAttachmentParentForPath(binding.path); - - if (bindingParentPath.key >= path.key) { - this.attachAfter = true; - path = binding.path; - - for (const violationPath of binding.constantViolations) { - if (this.getAttachmentParentForPath(violationPath).key > path.key) { - path = violationPath; - } - } - } - } - } - - return path; - } - - _getAttachmentPath() { - const scopes = this.scopes; - const scope = scopes.pop(); - if (!scope) return; - - if (scope.path.isFunction()) { - if (this.hasOwnParamBindings(scope)) { - if (this.scope === scope) return; - const bodies = scope.path.get("body").get("body"); - - for (let i = 0; i < bodies.length; i++) { - if (bodies[i].node._blockHoist) continue; - return bodies[i]; - } - } else { - return this.getNextScopeAttachmentParent(); - } - } else if (scope.path.isProgram()) { - return this.getNextScopeAttachmentParent(); - } - } - - getNextScopeAttachmentParent() { - const scope = this.scopes.pop(); - if (scope) return this.getAttachmentParentForPath(scope.path); - } - - getAttachmentParentForPath(path) { - do { - if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) { - return path; - } - } while (path = path.parentPath); - } - - hasOwnParamBindings(scope) { - for (const name of Object.keys(this.bindings)) { - if (!scope.hasOwnBinding(name)) continue; - const binding = this.bindings[name]; - if (binding.kind === "param" && binding.constant) return true; - } - - return false; - } - - run() { - this.path.traverse(referenceVisitor, this); - this.getCompatibleScopes(); - const attachTo = this.getAttachmentPath(); - if (!attachTo) return; - if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return; - let uid = attachTo.scope.generateUidIdentifier("ref"); - const declarator = t().variableDeclarator(uid, this.path.node); - const insertFn = this.attachAfter ? "insertAfter" : "insertBefore"; - const [attached] = attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : t().variableDeclaration("var", [declarator])]); - const parent = this.path.parentPath; - - if (parent.isJSXElement() && this.path.container === parent.node.children) { - uid = t().JSXExpressionContainer(uid); - } - - this.path.replaceWith(t().cloneNode(uid)); - return attachTo.isVariableDeclarator() ? attached.get("init") : attached.get("declarations.0.init"); - } - -} - -exports.default = PathHoister; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js b/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js deleted file mode 100644 index 23ec8fe6..00000000 --- a/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.hooks = void 0; -const hooks = [function (self, parent) { - const removeParent = self.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self.key === "declaration" && parent.isExportDeclaration() || self.key === "body" && parent.isLabeledStatement() || self.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self.key === "expression" && parent.isExpressionStatement(); - - if (removeParent) { - parent.remove(); - return true; - } -}, function (self, parent) { - if (parent.isSequenceExpression() && parent.node.expressions.length === 1) { - parent.replaceWith(parent.node.expressions[0]); - return true; - } -}, function (self, parent) { - if (parent.isBinary()) { - if (self.key === "left") { - parent.replaceWith(parent.node.right); - } else { - parent.replaceWith(parent.node.left); - } - - return true; - } -}, function (self, parent) { - if (parent.isIfStatement() && (self.key === "consequent" || self.key === "alternate") || self.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) { - self.replaceWith({ - type: "BlockStatement", - body: [] - }); - return true; - } -}]; -exports.hooks = hooks; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/lib/virtual-types.js b/node_modules/@babel/traverse/lib/path/lib/virtual-types.js deleted file mode 100644 index 2ac7cf04..00000000 --- a/node_modules/@babel/traverse/lib/path/lib/virtual-types.js +++ /dev/null @@ -1,216 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ForAwaitStatement = exports.NumericLiteralTypeAnnotation = exports.ExistentialTypeParam = exports.SpreadProperty = exports.RestProperty = exports.Flow = exports.Pure = exports.Generated = exports.User = exports.Var = exports.BlockScoped = exports.Referenced = exports.Scope = exports.Expression = exports.Statement = exports.BindingIdentifier = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = void 0; - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const ReferencedIdentifier = { - types: ["Identifier", "JSXIdentifier"], - - checkPath(path, opts) { - const { - node, - parent - } = path; - - if (!t().isIdentifier(node, opts) && !t().isJSXMemberExpression(parent, opts)) { - if (t().isJSXIdentifier(node, opts)) { - if (t().react.isCompatTag(node.name)) return false; - } else { - return false; - } - } - - return t().isReferenced(node, parent, path.parentPath.parent); - } - -}; -exports.ReferencedIdentifier = ReferencedIdentifier; -const ReferencedMemberExpression = { - types: ["MemberExpression"], - - checkPath({ - node, - parent - }) { - return t().isMemberExpression(node) && t().isReferenced(node, parent); - } - -}; -exports.ReferencedMemberExpression = ReferencedMemberExpression; -const BindingIdentifier = { - types: ["Identifier"], - - checkPath(path) { - const { - node, - parent - } = path; - const grandparent = path.parentPath.parent; - return t().isIdentifier(node) && t().isBinding(node, parent, grandparent); - } - -}; -exports.BindingIdentifier = BindingIdentifier; -const Statement = { - types: ["Statement"], - - checkPath({ - node, - parent - }) { - if (t().isStatement(node)) { - if (t().isVariableDeclaration(node)) { - if (t().isForXStatement(parent, { - left: node - })) return false; - if (t().isForStatement(parent, { - init: node - })) return false; - } - - return true; - } else { - return false; - } - } - -}; -exports.Statement = Statement; -const Expression = { - types: ["Expression"], - - checkPath(path) { - if (path.isIdentifier()) { - return path.isReferencedIdentifier(); - } else { - return t().isExpression(path.node); - } - } - -}; -exports.Expression = Expression; -const Scope = { - types: ["Scopable"], - - checkPath(path) { - return t().isScope(path.node, path.parent); - } - -}; -exports.Scope = Scope; -const Referenced = { - checkPath(path) { - return t().isReferenced(path.node, path.parent); - } - -}; -exports.Referenced = Referenced; -const BlockScoped = { - checkPath(path) { - return t().isBlockScoped(path.node); - } - -}; -exports.BlockScoped = BlockScoped; -const Var = { - types: ["VariableDeclaration"], - - checkPath(path) { - return t().isVar(path.node); - } - -}; -exports.Var = Var; -const User = { - checkPath(path) { - return path.node && !!path.node.loc; - } - -}; -exports.User = User; -const Generated = { - checkPath(path) { - return !path.isUser(); - } - -}; -exports.Generated = Generated; -const Pure = { - checkPath(path, opts) { - return path.scope.isPure(path.node, opts); - } - -}; -exports.Pure = Pure; -const Flow = { - types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"], - - checkPath({ - node - }) { - if (t().isFlow(node)) { - return true; - } else if (t().isImportDeclaration(node)) { - return node.importKind === "type" || node.importKind === "typeof"; - } else if (t().isExportDeclaration(node)) { - return node.exportKind === "type"; - } else if (t().isImportSpecifier(node)) { - return node.importKind === "type" || node.importKind === "typeof"; - } else { - return false; - } - } - -}; -exports.Flow = Flow; -const RestProperty = { - types: ["RestElement"], - - checkPath(path) { - return path.parentPath && path.parentPath.isObjectPattern(); - } - -}; -exports.RestProperty = RestProperty; -const SpreadProperty = { - types: ["RestElement"], - - checkPath(path) { - return path.parentPath && path.parentPath.isObjectExpression(); - } - -}; -exports.SpreadProperty = SpreadProperty; -const ExistentialTypeParam = { - types: ["ExistsTypeAnnotation"] -}; -exports.ExistentialTypeParam = ExistentialTypeParam; -const NumericLiteralTypeAnnotation = { - types: ["NumberLiteralTypeAnnotation"] -}; -exports.NumericLiteralTypeAnnotation = NumericLiteralTypeAnnotation; -const ForAwaitStatement = { - types: ["ForOfStatement"], - - checkPath({ - node - }) { - return node.await === true; - } - -}; -exports.ForAwaitStatement = ForAwaitStatement; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/modification.js b/node_modules/@babel/traverse/lib/path/modification.js deleted file mode 100644 index 34cee6fb..00000000 --- a/node_modules/@babel/traverse/lib/path/modification.js +++ /dev/null @@ -1,222 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.insertBefore = insertBefore; -exports._containerInsert = _containerInsert; -exports._containerInsertBefore = _containerInsertBefore; -exports._containerInsertAfter = _containerInsertAfter; -exports.insertAfter = insertAfter; -exports.updateSiblingKeys = updateSiblingKeys; -exports._verifyNodeList = _verifyNodeList; -exports.unshiftContainer = unshiftContainer; -exports.pushContainer = pushContainer; -exports.hoist = hoist; - -var _cache = require("../cache"); - -var _hoister = _interopRequireDefault(require("./lib/hoister")); - -var _index = _interopRequireDefault(require("./index")); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function insertBefore(nodes) { - this._assertUnremoved(); - - nodes = this._verifyNodeList(nodes); - const { - parentPath - } = this; - - if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) { - return parentPath.insertBefore(nodes); - } else if (this.isNodeType("Expression") && !this.isJSXElement() || parentPath.isForStatement() && this.key === "init") { - if (this.node) nodes.push(this.node); - return this.replaceExpressionWithStatements(nodes); - } else if (Array.isArray(this.container)) { - return this._containerInsertBefore(nodes); - } else if (this.isStatementOrBlock()) { - const shouldInsertCurrentNode = this.node && (!this.isExpressionStatement() || this.node.expression != null); - this.replaceWith(t().blockStatement(shouldInsertCurrentNode ? [this.node] : [])); - return this.unshiftContainer("body", nodes); - } else { - throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?"); - } -} - -function _containerInsert(from, nodes) { - this.updateSiblingKeys(from, nodes.length); - const paths = []; - this.container.splice(from, 0, ...nodes); - - for (let i = 0; i < nodes.length; i++) { - const to = from + i; - const path = this.getSibling(to); - paths.push(path); - - if (this.context && this.context.queue) { - path.pushContext(this.context); - } - } - - const contexts = this._getQueueContexts(); - - for (const path of paths) { - path.setScope(); - path.debug("Inserted."); - - for (const context of contexts) { - context.maybeQueue(path, true); - } - } - - return paths; -} - -function _containerInsertBefore(nodes) { - return this._containerInsert(this.key, nodes); -} - -function _containerInsertAfter(nodes) { - return this._containerInsert(this.key + 1, nodes); -} - -function insertAfter(nodes) { - this._assertUnremoved(); - - nodes = this._verifyNodeList(nodes); - const { - parentPath - } = this; - - if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) { - return parentPath.insertAfter(nodes.map(node => { - return t().isExpression(node) ? t().expressionStatement(node) : node; - })); - } else if (this.isNodeType("Expression") && !this.isJSXElement() || parentPath.isForStatement() && this.key === "init") { - if (this.node) { - let { - scope - } = this; - - if (parentPath.isMethod({ - computed: true, - key: this.node - })) { - scope = scope.parent; - } - - const temp = scope.generateDeclaredUidIdentifier(); - nodes.unshift(t().expressionStatement(t().assignmentExpression("=", t().cloneNode(temp), this.node))); - nodes.push(t().expressionStatement(t().cloneNode(temp))); - } - - return this.replaceExpressionWithStatements(nodes); - } else if (Array.isArray(this.container)) { - return this._containerInsertAfter(nodes); - } else if (this.isStatementOrBlock()) { - const shouldInsertCurrentNode = this.node && (!this.isExpressionStatement() || this.node.expression != null); - this.replaceWith(t().blockStatement(shouldInsertCurrentNode ? [this.node] : [])); - return this.pushContainer("body", nodes); - } else { - throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?"); - } -} - -function updateSiblingKeys(fromIndex, incrementBy) { - if (!this.parent) return; - - const paths = _cache.path.get(this.parent); - - for (let i = 0; i < paths.length; i++) { - const path = paths[i]; - - if (path.key >= fromIndex) { - path.key += incrementBy; - } - } -} - -function _verifyNodeList(nodes) { - if (!nodes) { - return []; - } - - if (nodes.constructor !== Array) { - nodes = [nodes]; - } - - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - let msg; - - if (!node) { - msg = "has falsy node"; - } else if (typeof node !== "object") { - msg = "contains a non-object node"; - } else if (!node.type) { - msg = "without a type"; - } else if (node instanceof _index.default) { - msg = "has a NodePath when it expected a raw object"; - } - - if (msg) { - const type = Array.isArray(node) ? "array" : typeof node; - throw new Error(`Node list ${msg} with the index of ${i} and type of ${type}`); - } - } - - return nodes; -} - -function unshiftContainer(listKey, nodes) { - this._assertUnremoved(); - - nodes = this._verifyNodeList(nodes); - - const path = _index.default.get({ - parentPath: this, - parent: this.node, - container: this.node[listKey], - listKey, - key: 0 - }); - - return path._containerInsertBefore(nodes); -} - -function pushContainer(listKey, nodes) { - this._assertUnremoved(); - - nodes = this._verifyNodeList(nodes); - const container = this.node[listKey]; - - const path = _index.default.get({ - parentPath: this, - parent: this.node, - container: container, - listKey, - key: container.length - }); - - return path.replaceWithMultiple(nodes); -} - -function hoist(scope = this.scope) { - const hoister = new _hoister.default(this, scope); - return hoister.run(); -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/removal.js b/node_modules/@babel/traverse/lib/path/removal.js deleted file mode 100644 index d509a6de..00000000 --- a/node_modules/@babel/traverse/lib/path/removal.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.remove = remove; -exports._removeFromScope = _removeFromScope; -exports._callRemovalHooks = _callRemovalHooks; -exports._remove = _remove; -exports._markRemoved = _markRemoved; -exports._assertUnremoved = _assertUnremoved; - -var _removalHooks = require("./lib/removal-hooks"); - -function remove() { - this._assertUnremoved(); - - this.resync(); - - this._removeFromScope(); - - if (this._callRemovalHooks()) { - this._markRemoved(); - - return; - } - - this.shareCommentsWithSiblings(); - - this._remove(); - - this._markRemoved(); -} - -function _removeFromScope() { - const bindings = this.getBindingIdentifiers(); - Object.keys(bindings).forEach(name => this.scope.removeBinding(name)); -} - -function _callRemovalHooks() { - for (const fn of _removalHooks.hooks) { - if (fn(this, this.parentPath)) return true; - } -} - -function _remove() { - if (Array.isArray(this.container)) { - this.container.splice(this.key, 1); - this.updateSiblingKeys(this.key, -1); - } else { - this._replaceWith(null); - } -} - -function _markRemoved() { - this.shouldSkip = true; - this.removed = true; - this.node = null; -} - -function _assertUnremoved() { - if (this.removed) { - throw this.buildCodeFrameError("NodePath has been removed so is read-only."); - } -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/path/replacement.js b/node_modules/@babel/traverse/lib/path/replacement.js deleted file mode 100644 index a204ca6e..00000000 --- a/node_modules/@babel/traverse/lib/path/replacement.js +++ /dev/null @@ -1,266 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.replaceWithMultiple = replaceWithMultiple; -exports.replaceWithSourceString = replaceWithSourceString; -exports.replaceWith = replaceWith; -exports._replaceWith = _replaceWith; -exports.replaceExpressionWithStatements = replaceExpressionWithStatements; -exports.replaceInline = replaceInline; - -function _codeFrame() { - const data = require("@babel/code-frame"); - - _codeFrame = function () { - return data; - }; - - return data; -} - -var _index = _interopRequireDefault(require("../index")); - -var _index2 = _interopRequireDefault(require("./index")); - -function _parser() { - const data = require("@babel/parser"); - - _parser = function () { - return data; - }; - - return data; -} - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const hoistVariablesVisitor = { - Function(path) { - path.skip(); - }, - - VariableDeclaration(path) { - if (path.node.kind !== "var") return; - const bindings = path.getBindingIdentifiers(); - - for (const key of Object.keys(bindings)) { - path.scope.push({ - id: bindings[key] - }); - } - - const exprs = []; - - for (const declar of path.node.declarations) { - if (declar.init) { - exprs.push(t().expressionStatement(t().assignmentExpression("=", declar.id, declar.init))); - } - } - - path.replaceWithMultiple(exprs); - } - -}; - -function replaceWithMultiple(nodes) { - this.resync(); - nodes = this._verifyNodeList(nodes); - t().inheritLeadingComments(nodes[0], this.node); - t().inheritTrailingComments(nodes[nodes.length - 1], this.node); - this.node = this.container[this.key] = null; - const paths = this.insertAfter(nodes); - - if (this.node) { - this.requeue(); - } else { - this.remove(); - } - - return paths; -} - -function replaceWithSourceString(replacement) { - this.resync(); - - try { - replacement = `(${replacement})`; - replacement = (0, _parser().parse)(replacement); - } catch (err) { - const loc = err.loc; - - if (loc) { - err.message += " - make sure this is an expression.\n" + (0, _codeFrame().codeFrameColumns)(replacement, { - start: { - line: loc.line, - column: loc.column + 1 - } - }); - err.code = "BABEL_REPLACE_SOURCE_ERROR"; - } - - throw err; - } - - replacement = replacement.program.body[0].expression; - - _index.default.removeProperties(replacement); - - return this.replaceWith(replacement); -} - -function replaceWith(replacement) { - this.resync(); - - if (this.removed) { - throw new Error("You can't replace this node, we've already removed it"); - } - - if (replacement instanceof _index2.default) { - replacement = replacement.node; - } - - if (!replacement) { - throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead"); - } - - if (this.node === replacement) { - return [this]; - } - - if (this.isProgram() && !t().isProgram(replacement)) { - throw new Error("You can only replace a Program root node with another Program node"); - } - - if (Array.isArray(replacement)) { - throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`"); - } - - if (typeof replacement === "string") { - throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`"); - } - - let nodePath = ""; - - if (this.isNodeType("Statement") && t().isExpression(replacement)) { - if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) { - replacement = t().expressionStatement(replacement); - nodePath = "expression"; - } - } - - if (this.isNodeType("Expression") && t().isStatement(replacement)) { - if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) { - return this.replaceExpressionWithStatements([replacement]); - } - } - - const oldNode = this.node; - - if (oldNode) { - t().inheritsComments(replacement, oldNode); - t().removeComments(oldNode); - } - - this._replaceWith(replacement); - - this.type = replacement.type; - this.setScope(); - this.requeue(); - return [nodePath ? this.get(nodePath) : this]; -} - -function _replaceWith(node) { - if (!this.container) { - throw new ReferenceError("Container is falsy"); - } - - if (this.inList) { - t().validate(this.parent, this.key, [node]); - } else { - t().validate(this.parent, this.key, node); - } - - this.debug(`Replace with ${node && node.type}`); - this.node = this.container[this.key] = node; -} - -function replaceExpressionWithStatements(nodes) { - this.resync(); - const toSequenceExpression = t().toSequenceExpression(nodes, this.scope); - - if (toSequenceExpression) { - return this.replaceWith(toSequenceExpression)[0].get("expressions"); - } - - const functionParent = this.getFunctionParent(); - const isParentAsync = functionParent && functionParent.is("async"); - const container = t().arrowFunctionExpression([], t().blockStatement(nodes)); - this.replaceWith(t().callExpression(container, [])); - this.traverse(hoistVariablesVisitor); - const completionRecords = this.get("callee").getCompletionRecords(); - - for (const path of completionRecords) { - if (!path.isExpressionStatement()) continue; - const loop = path.findParent(path => path.isLoop()); - - if (loop) { - let uid = loop.getData("expressionReplacementReturnUid"); - - if (!uid) { - const callee = this.get("callee"); - uid = callee.scope.generateDeclaredUidIdentifier("ret"); - callee.get("body").pushContainer("body", t().returnStatement(t().cloneNode(uid))); - loop.setData("expressionReplacementReturnUid", uid); - } else { - uid = t().identifier(uid.name); - } - - path.get("expression").replaceWith(t().assignmentExpression("=", t().cloneNode(uid), path.node.expression)); - } else { - path.replaceWith(t().returnStatement(path.node.expression)); - } - } - - const callee = this.get("callee"); - callee.arrowFunctionToExpression(); - - if (isParentAsync && _index.default.hasType(this.get("callee.body").node, "AwaitExpression", t().FUNCTION_TYPES)) { - callee.set("async", true); - this.replaceWith(t().awaitExpression(this.node)); - } - - return callee.get("body.body"); -} - -function replaceInline(nodes) { - this.resync(); - - if (Array.isArray(nodes)) { - if (Array.isArray(this.container)) { - nodes = this._verifyNodeList(nodes); - - const paths = this._containerInsertAfter(nodes); - - this.remove(); - return paths; - } else { - return this.replaceWithMultiple(nodes); - } - } else { - return this.replaceWith(nodes); - } -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/scope/binding.js b/node_modules/@babel/traverse/lib/scope/binding.js deleted file mode 100644 index d19f1168..00000000 --- a/node_modules/@babel/traverse/lib/scope/binding.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -class Binding { - constructor({ - identifier, - scope, - path, - kind - }) { - this.identifier = identifier; - this.scope = scope; - this.path = path; - this.kind = kind; - this.constantViolations = []; - this.constant = true; - this.referencePaths = []; - this.referenced = false; - this.references = 0; - this.clearValue(); - } - - deoptValue() { - this.clearValue(); - this.hasDeoptedValue = true; - } - - setValue(value) { - if (this.hasDeoptedValue) return; - this.hasValue = true; - this.value = value; - } - - clearValue() { - this.hasDeoptedValue = false; - this.hasValue = false; - this.value = null; - } - - reassign(path) { - this.constant = false; - - if (this.constantViolations.indexOf(path) !== -1) { - return; - } - - this.constantViolations.push(path); - } - - reference(path) { - if (this.referencePaths.indexOf(path) !== -1) { - return; - } - - this.referenced = true; - this.references++; - this.referencePaths.push(path); - } - - dereference() { - this.references--; - this.referenced = !!this.references; - } - -} - -exports.default = Binding; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/scope/index.js b/node_modules/@babel/traverse/lib/scope/index.js deleted file mode 100644 index b27f2267..00000000 --- a/node_modules/@babel/traverse/lib/scope/index.js +++ /dev/null @@ -1,892 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -function _includes() { - const data = _interopRequireDefault(require("lodash/includes")); - - _includes = function () { - return data; - }; - - return data; -} - -function _repeat() { - const data = _interopRequireDefault(require("lodash/repeat")); - - _repeat = function () { - return data; - }; - - return data; -} - -var _renamer = _interopRequireDefault(require("./lib/renamer")); - -var _index = _interopRequireDefault(require("../index")); - -function _defaults() { - const data = _interopRequireDefault(require("lodash/defaults")); - - _defaults = function () { - return data; - }; - - return data; -} - -var _binding = _interopRequireDefault(require("./binding")); - -function _globals() { - const data = _interopRequireDefault(require("globals")); - - _globals = function () { - return data; - }; - - return data; -} - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -var _cache = require("../cache"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function gatherNodeParts(node, parts) { - if (t().isModuleDeclaration(node)) { - if (node.source) { - gatherNodeParts(node.source, parts); - } else if (node.specifiers && node.specifiers.length) { - for (const specifier of node.specifiers) { - gatherNodeParts(specifier, parts); - } - } else if (node.declaration) { - gatherNodeParts(node.declaration, parts); - } - } else if (t().isModuleSpecifier(node)) { - gatherNodeParts(node.local, parts); - } else if (t().isMemberExpression(node)) { - gatherNodeParts(node.object, parts); - gatherNodeParts(node.property, parts); - } else if (t().isIdentifier(node)) { - parts.push(node.name); - } else if (t().isLiteral(node)) { - parts.push(node.value); - } else if (t().isCallExpression(node)) { - gatherNodeParts(node.callee, parts); - } else if (t().isObjectExpression(node) || t().isObjectPattern(node)) { - for (const prop of node.properties) { - gatherNodeParts(prop.key || prop.argument, parts); - } - } else if (t().isPrivateName(node)) { - gatherNodeParts(node.id, parts); - } else if (t().isThisExpression(node)) { - parts.push("this"); - } else if (t().isSuper(node)) { - parts.push("super"); - } -} - -const collectorVisitor = { - For(path) { - for (const key of t().FOR_INIT_KEYS) { - const declar = path.get(key); - - if (declar.isVar()) { - const parentScope = path.scope.getFunctionParent() || path.scope.getProgramParent(); - parentScope.registerBinding("var", declar); - } - } - }, - - Declaration(path) { - if (path.isBlockScoped()) return; - - if (path.isExportDeclaration() && path.get("declaration").isDeclaration()) { - return; - } - - const parent = path.scope.getFunctionParent() || path.scope.getProgramParent(); - parent.registerDeclaration(path); - }, - - ReferencedIdentifier(path, state) { - state.references.push(path); - }, - - ForXStatement(path, state) { - const left = path.get("left"); - - if (left.isPattern() || left.isIdentifier()) { - state.constantViolations.push(path); - } - }, - - ExportDeclaration: { - exit(path) { - const { - node, - scope - } = path; - const declar = node.declaration; - - if (t().isClassDeclaration(declar) || t().isFunctionDeclaration(declar)) { - const id = declar.id; - if (!id) return; - const binding = scope.getBinding(id.name); - if (binding) binding.reference(path); - } else if (t().isVariableDeclaration(declar)) { - for (const decl of declar.declarations) { - for (const name of Object.keys(t().getBindingIdentifiers(decl))) { - const binding = scope.getBinding(name); - if (binding) binding.reference(path); - } - } - } - } - - }, - - LabeledStatement(path) { - path.scope.getProgramParent().addGlobal(path.node); - path.scope.getBlockParent().registerDeclaration(path); - }, - - AssignmentExpression(path, state) { - state.assignments.push(path); - }, - - UpdateExpression(path, state) { - state.constantViolations.push(path); - }, - - UnaryExpression(path, state) { - if (path.node.operator === "delete") { - state.constantViolations.push(path); - } - }, - - BlockScoped(path) { - let scope = path.scope; - if (scope.path === path) scope = scope.parent; - scope.getBlockParent().registerDeclaration(path); - }, - - ClassDeclaration(path) { - const id = path.node.id; - if (!id) return; - const name = id.name; - path.scope.bindings[name] = path.scope.getBinding(name); - }, - - Block(path) { - const paths = path.get("body"); - - for (const bodyPath of paths) { - if (bodyPath.isFunctionDeclaration()) { - path.scope.getBlockParent().registerDeclaration(bodyPath); - } - } - } - -}; -let uid = 0; - -class Scope { - constructor(path) { - const { - node - } = path; - - const cached = _cache.scope.get(node); - - if (cached && cached.path === path) { - return cached; - } - - _cache.scope.set(node, this); - - this.uid = uid++; - this.block = node; - this.path = path; - this.labels = new Map(); - } - - get parent() { - const parent = this.path.findParent(p => p.isScope()); - return parent && parent.scope; - } - - get parentBlock() { - return this.path.parent; - } - - get hub() { - return this.path.hub; - } - - traverse(node, opts, state) { - (0, _index.default)(node, opts, this, state, this.path); - } - - generateDeclaredUidIdentifier(name) { - const id = this.generateUidIdentifier(name); - this.push({ - id - }); - return t().cloneNode(id); - } - - generateUidIdentifier(name) { - return t().identifier(this.generateUid(name)); - } - - generateUid(name = "temp") { - name = t().toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, ""); - let uid; - let i = 0; - - do { - uid = this._generateUid(name, i); - i++; - } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid)); - - const program = this.getProgramParent(); - program.references[uid] = true; - program.uids[uid] = true; - return uid; - } - - _generateUid(name, i) { - let id = name; - if (i > 1) id += i; - return `_${id}`; - } - - generateUidBasedOnNode(parent, defaultName) { - let node = parent; - - if (t().isAssignmentExpression(parent)) { - node = parent.left; - } else if (t().isVariableDeclarator(parent)) { - node = parent.id; - } else if (t().isObjectProperty(node) || t().isObjectMethod(node)) { - node = node.key; - } - - const parts = []; - gatherNodeParts(node, parts); - let id = parts.join("$"); - id = id.replace(/^_/, "") || defaultName || "ref"; - return this.generateUid(id.slice(0, 20)); - } - - generateUidIdentifierBasedOnNode(parent, defaultName) { - return t().identifier(this.generateUidBasedOnNode(parent, defaultName)); - } - - isStatic(node) { - if (t().isThisExpression(node) || t().isSuper(node)) { - return true; - } - - if (t().isIdentifier(node)) { - const binding = this.getBinding(node.name); - - if (binding) { - return binding.constant; - } else { - return this.hasBinding(node.name); - } - } - - return false; - } - - maybeGenerateMemoised(node, dontPush) { - if (this.isStatic(node)) { - return null; - } else { - const id = this.generateUidIdentifierBasedOnNode(node); - - if (!dontPush) { - this.push({ - id - }); - return t().cloneNode(id); - } - - return id; - } - } - - checkBlockScopedCollisions(local, kind, name, id) { - if (kind === "param") return; - if (local.kind === "local") return; - const duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const"); - - if (duplicate) { - throw this.hub.buildError(id, `Duplicate declaration "${name}"`, TypeError); - } - } - - rename(oldName, newName, block) { - const binding = this.getBinding(oldName); - - if (binding) { - newName = newName || this.generateUidIdentifier(oldName).name; - return new _renamer.default(binding, oldName, newName).rename(block); - } - } - - _renameFromMap(map, oldName, newName, value) { - if (map[oldName]) { - map[newName] = value; - map[oldName] = null; - } - } - - dump() { - const sep = (0, _repeat().default)("-", 60); - console.log(sep); - let scope = this; - - do { - console.log("#", scope.block.type); - - for (const name of Object.keys(scope.bindings)) { - const binding = scope.bindings[name]; - console.log(" -", name, { - constant: binding.constant, - references: binding.references, - violations: binding.constantViolations.length, - kind: binding.kind - }); - } - } while (scope = scope.parent); - - console.log(sep); - } - - toArray(node, i) { - if (t().isIdentifier(node)) { - const binding = this.getBinding(node.name); - - if (binding && binding.constant && binding.path.isGenericType("Array")) { - return node; - } - } - - if (t().isArrayExpression(node)) { - return node; - } - - if (t().isIdentifier(node, { - name: "arguments" - })) { - return t().callExpression(t().memberExpression(t().memberExpression(t().memberExpression(t().identifier("Array"), t().identifier("prototype")), t().identifier("slice")), t().identifier("call")), [node]); - } - - let helperName; - const args = [node]; - - if (i === true) { - helperName = "toConsumableArray"; - } else if (i) { - args.push(t().numericLiteral(i)); - helperName = "slicedToArray"; - } else { - helperName = "toArray"; - } - - return t().callExpression(this.hub.addHelper(helperName), args); - } - - hasLabel(name) { - return !!this.getLabel(name); - } - - getLabel(name) { - return this.labels.get(name); - } - - registerLabel(path) { - this.labels.set(path.node.label.name, path); - } - - registerDeclaration(path) { - if (path.isLabeledStatement()) { - this.registerLabel(path); - } else if (path.isFunctionDeclaration()) { - this.registerBinding("hoisted", path.get("id"), path); - } else if (path.isVariableDeclaration()) { - const declarations = path.get("declarations"); - - for (const declar of declarations) { - this.registerBinding(path.node.kind, declar); - } - } else if (path.isClassDeclaration()) { - this.registerBinding("let", path); - } else if (path.isImportDeclaration()) { - const specifiers = path.get("specifiers"); - - for (const specifier of specifiers) { - this.registerBinding("module", specifier); - } - } else if (path.isExportDeclaration()) { - const declar = path.get("declaration"); - - if (declar.isClassDeclaration() || declar.isFunctionDeclaration() || declar.isVariableDeclaration()) { - this.registerDeclaration(declar); - } - } else { - this.registerBinding("unknown", path); - } - } - - buildUndefinedNode() { - if (this.hasBinding("undefined")) { - return t().unaryExpression("void", t().numericLiteral(0), true); - } else { - return t().identifier("undefined"); - } - } - - registerConstantViolation(path) { - const ids = path.getBindingIdentifiers(); - - for (const name of Object.keys(ids)) { - const binding = this.getBinding(name); - if (binding) binding.reassign(path); - } - } - - registerBinding(kind, path, bindingPath = path) { - if (!kind) throw new ReferenceError("no `kind`"); - - if (path.isVariableDeclaration()) { - const declarators = path.get("declarations"); - - for (const declar of declarators) { - this.registerBinding(kind, declar); - } - - return; - } - - const parent = this.getProgramParent(); - const ids = path.getOuterBindingIdentifiers(true); - - for (const name of Object.keys(ids)) { - for (const id of ids[name]) { - const local = this.getOwnBinding(name); - - if (local) { - if (local.identifier === id) continue; - this.checkBlockScopedCollisions(local, kind, name, id); - } - - parent.references[name] = true; - - if (local) { - this.registerConstantViolation(bindingPath); - } else { - this.bindings[name] = new _binding.default({ - identifier: id, - scope: this, - path: bindingPath, - kind: kind - }); - } - } - } - } - - addGlobal(node) { - this.globals[node.name] = node; - } - - hasUid(name) { - let scope = this; - - do { - if (scope.uids[name]) return true; - } while (scope = scope.parent); - - return false; - } - - hasGlobal(name) { - let scope = this; - - do { - if (scope.globals[name]) return true; - } while (scope = scope.parent); - - return false; - } - - hasReference(name) { - let scope = this; - - do { - if (scope.references[name]) return true; - } while (scope = scope.parent); - - return false; - } - - isPure(node, constantsOnly) { - if (t().isIdentifier(node)) { - const binding = this.getBinding(node.name); - if (!binding) return false; - if (constantsOnly) return binding.constant; - return true; - } else if (t().isClass(node)) { - if (node.superClass && !this.isPure(node.superClass, constantsOnly)) { - return false; - } - - return this.isPure(node.body, constantsOnly); - } else if (t().isClassBody(node)) { - for (const method of node.body) { - if (!this.isPure(method, constantsOnly)) return false; - } - - return true; - } else if (t().isBinary(node)) { - return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly); - } else if (t().isArrayExpression(node)) { - for (const elem of node.elements) { - if (!this.isPure(elem, constantsOnly)) return false; - } - - return true; - } else if (t().isObjectExpression(node)) { - for (const prop of node.properties) { - if (!this.isPure(prop, constantsOnly)) return false; - } - - return true; - } else if (t().isClassMethod(node)) { - if (node.computed && !this.isPure(node.key, constantsOnly)) return false; - if (node.kind === "get" || node.kind === "set") return false; - return true; - } else if (t().isProperty(node)) { - if (node.computed && !this.isPure(node.key, constantsOnly)) return false; - return this.isPure(node.value, constantsOnly); - } else if (t().isUnaryExpression(node)) { - return this.isPure(node.argument, constantsOnly); - } else if (t().isTaggedTemplateExpression(node)) { - return t().matchesPattern(node.tag, "String.raw") && !this.hasBinding("String", true) && this.isPure(node.quasi, constantsOnly); - } else if (t().isTemplateLiteral(node)) { - for (const expression of node.expressions) { - if (!this.isPure(expression, constantsOnly)) return false; - } - - return true; - } else { - return t().isPureish(node); - } - } - - setData(key, val) { - return this.data[key] = val; - } - - getData(key) { - let scope = this; - - do { - const data = scope.data[key]; - if (data != null) return data; - } while (scope = scope.parent); - } - - removeData(key) { - let scope = this; - - do { - const data = scope.data[key]; - if (data != null) scope.data[key] = null; - } while (scope = scope.parent); - } - - init() { - if (!this.references) this.crawl(); - } - - crawl() { - const path = this.path; - this.references = Object.create(null); - this.bindings = Object.create(null); - this.globals = Object.create(null); - this.uids = Object.create(null); - this.data = Object.create(null); - - if (path.isLoop()) { - for (const key of t().FOR_INIT_KEYS) { - const node = path.get(key); - if (node.isBlockScoped()) this.registerBinding(node.node.kind, node); - } - } - - if (path.isFunctionExpression() && path.has("id")) { - if (!path.get("id").node[t().NOT_LOCAL_BINDING]) { - this.registerBinding("local", path.get("id"), path); - } - } - - if (path.isClassExpression() && path.has("id")) { - if (!path.get("id").node[t().NOT_LOCAL_BINDING]) { - this.registerBinding("local", path); - } - } - - if (path.isFunction()) { - const params = path.get("params"); - - for (const param of params) { - this.registerBinding("param", param); - } - } - - if (path.isCatchClause()) { - this.registerBinding("let", path); - } - - const parent = this.getProgramParent(); - if (parent.crawling) return; - const state = { - references: [], - constantViolations: [], - assignments: [] - }; - this.crawling = true; - path.traverse(collectorVisitor, state); - this.crawling = false; - - for (const path of state.assignments) { - const ids = path.getBindingIdentifiers(); - let programParent; - - for (const name of Object.keys(ids)) { - if (path.scope.getBinding(name)) continue; - programParent = programParent || path.scope.getProgramParent(); - programParent.addGlobal(ids[name]); - } - - path.scope.registerConstantViolation(path); - } - - for (const ref of state.references) { - const binding = ref.scope.getBinding(ref.node.name); - - if (binding) { - binding.reference(ref); - } else { - ref.scope.getProgramParent().addGlobal(ref.node); - } - } - - for (const path of state.constantViolations) { - path.scope.registerConstantViolation(path); - } - } - - push(opts) { - let path = this.path; - - if (!path.isBlockStatement() && !path.isProgram()) { - path = this.getBlockParent().path; - } - - if (path.isSwitchStatement()) { - path = (this.getFunctionParent() || this.getProgramParent()).path; - } - - if (path.isLoop() || path.isCatchClause() || path.isFunction()) { - path.ensureBlock(); - path = path.get("body"); - } - - const unique = opts.unique; - const kind = opts.kind || "var"; - const blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist; - const dataKey = `declaration:${kind}:${blockHoist}`; - let declarPath = !unique && path.getData(dataKey); - - if (!declarPath) { - const declar = t().variableDeclaration(kind, []); - declar._blockHoist = blockHoist; - [declarPath] = path.unshiftContainer("body", [declar]); - if (!unique) path.setData(dataKey, declarPath); - } - - const declarator = t().variableDeclarator(opts.id, opts.init); - declarPath.node.declarations.push(declarator); - this.registerBinding(kind, declarPath.get("declarations").pop()); - } - - getProgramParent() { - let scope = this; - - do { - if (scope.path.isProgram()) { - return scope; - } - } while (scope = scope.parent); - - throw new Error("Couldn't find a Program"); - } - - getFunctionParent() { - let scope = this; - - do { - if (scope.path.isFunctionParent()) { - return scope; - } - } while (scope = scope.parent); - - return null; - } - - getBlockParent() { - let scope = this; - - do { - if (scope.path.isBlockParent()) { - return scope; - } - } while (scope = scope.parent); - - throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program..."); - } - - getAllBindings() { - const ids = Object.create(null); - let scope = this; - - do { - (0, _defaults().default)(ids, scope.bindings); - scope = scope.parent; - } while (scope); - - return ids; - } - - getAllBindingsOfKind() { - const ids = Object.create(null); - - for (const kind of arguments) { - let scope = this; - - do { - for (const name of Object.keys(scope.bindings)) { - const binding = scope.bindings[name]; - if (binding.kind === kind) ids[name] = binding; - } - - scope = scope.parent; - } while (scope); - } - - return ids; - } - - bindingIdentifierEquals(name, node) { - return this.getBindingIdentifier(name) === node; - } - - getBinding(name) { - let scope = this; - - do { - const binding = scope.getOwnBinding(name); - if (binding) return binding; - } while (scope = scope.parent); - } - - getOwnBinding(name) { - return this.bindings[name]; - } - - getBindingIdentifier(name) { - const info = this.getBinding(name); - return info && info.identifier; - } - - getOwnBindingIdentifier(name) { - const binding = this.bindings[name]; - return binding && binding.identifier; - } - - hasOwnBinding(name) { - return !!this.getOwnBinding(name); - } - - hasBinding(name, noGlobals) { - if (!name) return false; - if (this.hasOwnBinding(name)) return true; - if (this.parentHasBinding(name, noGlobals)) return true; - if (this.hasUid(name)) return true; - if (!noGlobals && (0, _includes().default)(Scope.globals, name)) return true; - if (!noGlobals && (0, _includes().default)(Scope.contextVariables, name)) return true; - return false; - } - - parentHasBinding(name, noGlobals) { - return this.parent && this.parent.hasBinding(name, noGlobals); - } - - moveBindingTo(name, scope) { - const info = this.getBinding(name); - - if (info) { - info.scope.removeOwnBinding(name); - info.scope = scope; - scope.bindings[name] = info; - } - } - - removeOwnBinding(name) { - delete this.bindings[name]; - } - - removeBinding(name) { - const info = this.getBinding(name); - - if (info) { - info.scope.removeOwnBinding(name); - } - - let scope = this; - - do { - if (scope.uids[name]) { - scope.uids[name] = false; - } - } while (scope = scope.parent); - } - -} - -exports.default = Scope; -Scope.globals = Object.keys(_globals().default.builtin); -Scope.contextVariables = ["arguments", "undefined", "Infinity", "NaN"]; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/scope/lib/renamer.js b/node_modules/@babel/traverse/lib/scope/lib/renamer.js deleted file mode 100644 index b7a10ec6..00000000 --- a/node_modules/@babel/traverse/lib/scope/lib/renamer.js +++ /dev/null @@ -1,138 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _binding = _interopRequireDefault(require("../binding")); - -function _helperSplitExportDeclaration() { - const data = _interopRequireDefault(require("@babel/helper-split-export-declaration")); - - _helperSplitExportDeclaration = function () { - return data; - }; - - return data; -} - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const renameVisitor = { - ReferencedIdentifier({ - node - }, state) { - if (node.name === state.oldName) { - node.name = state.newName; - } - }, - - Scope(path, state) { - if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) { - path.skip(); - } - }, - - "AssignmentExpression|Declaration"(path, state) { - const ids = path.getOuterBindingIdentifiers(); - - for (const name in ids) { - if (name === state.oldName) ids[name].name = state.newName; - } - } - -}; - -class Renamer { - constructor(binding, oldName, newName) { - this.newName = newName; - this.oldName = oldName; - this.binding = binding; - } - - maybeConvertFromExportDeclaration(parentDeclar) { - const maybeExportDeclar = parentDeclar.parentPath; - - if (!maybeExportDeclar.isExportDeclaration()) { - return; - } - - if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get("declaration").node.id) { - return; - } - - (0, _helperSplitExportDeclaration().default)(maybeExportDeclar); - } - - maybeConvertFromClassFunctionDeclaration(path) { - return; - if (!path.isFunctionDeclaration() && !path.isClassDeclaration()) return; - if (this.binding.kind !== "hoisted") return; - path.node.id = t().identifier(this.oldName); - path.node._blockHoist = 3; - path.replaceWith(t().variableDeclaration("let", [t().variableDeclarator(t().identifier(this.newName), t().toExpression(path.node))])); - } - - maybeConvertFromClassFunctionExpression(path) { - return; - if (!path.isFunctionExpression() && !path.isClassExpression()) return; - if (this.binding.kind !== "local") return; - path.node.id = t().identifier(this.oldName); - this.binding.scope.parent.push({ - id: t().identifier(this.newName) - }); - path.replaceWith(t().assignmentExpression("=", t().identifier(this.newName), path.node)); - } - - rename(block) { - const { - binding, - oldName, - newName - } = this; - const { - scope, - path - } = binding; - const parentDeclar = path.find(path => path.isDeclaration() || path.isFunctionExpression() || path.isClassExpression()); - - if (parentDeclar) { - const bindingIds = parentDeclar.getOuterBindingIdentifiers(); - - if (bindingIds[oldName] === binding.identifier) { - this.maybeConvertFromExportDeclaration(parentDeclar); - } - } - - scope.traverse(block || scope.block, renameVisitor, this); - - if (!block) { - scope.removeOwnBinding(oldName); - scope.bindings[newName] = binding; - this.binding.identifier.name = newName; - } - - if (binding.type === "hoisted") {} - - if (parentDeclar) { - this.maybeConvertFromClassFunctionDeclaration(parentDeclar); - this.maybeConvertFromClassFunctionExpression(parentDeclar); - } - } - -} - -exports.default = Renamer; \ No newline at end of file diff --git a/node_modules/@babel/traverse/lib/visitors.js b/node_modules/@babel/traverse/lib/visitors.js deleted file mode 100644 index 7483fe17..00000000 --- a/node_modules/@babel/traverse/lib/visitors.js +++ /dev/null @@ -1,254 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.explode = explode; -exports.verify = verify; -exports.merge = merge; - -var virtualTypes = _interopRequireWildcard(require("./path/lib/virtual-types")); - -function t() { - const data = _interopRequireWildcard(require("@babel/types")); - - t = function () { - return data; - }; - - return data; -} - -function _clone() { - const data = _interopRequireDefault(require("lodash/clone")); - - _clone = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function explode(visitor) { - if (visitor._exploded) return visitor; - visitor._exploded = true; - - for (const nodeType of Object.keys(visitor)) { - if (shouldIgnoreKey(nodeType)) continue; - const parts = nodeType.split("|"); - if (parts.length === 1) continue; - const fns = visitor[nodeType]; - delete visitor[nodeType]; - - for (const part of parts) { - visitor[part] = fns; - } - } - - verify(visitor); - delete visitor.__esModule; - ensureEntranceObjects(visitor); - ensureCallbackArrays(visitor); - - for (const nodeType of Object.keys(visitor)) { - if (shouldIgnoreKey(nodeType)) continue; - const wrapper = virtualTypes[nodeType]; - if (!wrapper) continue; - const fns = visitor[nodeType]; - - for (const type of Object.keys(fns)) { - fns[type] = wrapCheck(wrapper, fns[type]); - } - - delete visitor[nodeType]; - - if (wrapper.types) { - for (const type of wrapper.types) { - if (visitor[type]) { - mergePair(visitor[type], fns); - } else { - visitor[type] = fns; - } - } - } else { - mergePair(visitor, fns); - } - } - - for (const nodeType of Object.keys(visitor)) { - if (shouldIgnoreKey(nodeType)) continue; - const fns = visitor[nodeType]; - let aliases = t().FLIPPED_ALIAS_KEYS[nodeType]; - const deprecratedKey = t().DEPRECATED_KEYS[nodeType]; - - if (deprecratedKey) { - console.trace(`Visitor defined for ${nodeType} but it has been renamed to ${deprecratedKey}`); - aliases = [deprecratedKey]; - } - - if (!aliases) continue; - delete visitor[nodeType]; - - for (const alias of aliases) { - const existing = visitor[alias]; - - if (existing) { - mergePair(existing, fns); - } else { - visitor[alias] = (0, _clone().default)(fns); - } - } - } - - for (const nodeType of Object.keys(visitor)) { - if (shouldIgnoreKey(nodeType)) continue; - ensureCallbackArrays(visitor[nodeType]); - } - - return visitor; -} - -function verify(visitor) { - if (visitor._verified) return; - - if (typeof visitor === "function") { - throw new Error("You passed `traverse()` a function when it expected a visitor object, " + "are you sure you didn't mean `{ enter: Function }`?"); - } - - for (const nodeType of Object.keys(visitor)) { - if (nodeType === "enter" || nodeType === "exit") { - validateVisitorMethods(nodeType, visitor[nodeType]); - } - - if (shouldIgnoreKey(nodeType)) continue; - - if (t().TYPES.indexOf(nodeType) < 0) { - throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type`); - } - - const visitors = visitor[nodeType]; - - if (typeof visitors === "object") { - for (const visitorKey of Object.keys(visitors)) { - if (visitorKey === "enter" || visitorKey === "exit") { - validateVisitorMethods(`${nodeType}.${visitorKey}`, visitors[visitorKey]); - } else { - throw new Error("You passed `traverse()` a visitor object with the property " + `${nodeType} that has the invalid property ${visitorKey}`); - } - } - } - } - - visitor._verified = true; -} - -function validateVisitorMethods(path, val) { - const fns = [].concat(val); - - for (const fn of fns) { - if (typeof fn !== "function") { - throw new TypeError(`Non-function found defined in ${path} with type ${typeof fn}`); - } - } -} - -function merge(visitors, states = [], wrapper) { - const rootVisitor = {}; - - for (let i = 0; i < visitors.length; i++) { - const visitor = visitors[i]; - const state = states[i]; - explode(visitor); - - for (const type of Object.keys(visitor)) { - let visitorType = visitor[type]; - - if (state || wrapper) { - visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper); - } - - const nodeVisitor = rootVisitor[type] = rootVisitor[type] || {}; - mergePair(nodeVisitor, visitorType); - } - } - - return rootVisitor; -} - -function wrapWithStateOrWrapper(oldVisitor, state, wrapper) { - const newVisitor = {}; - - for (const key of Object.keys(oldVisitor)) { - let fns = oldVisitor[key]; - if (!Array.isArray(fns)) continue; - fns = fns.map(function (fn) { - let newFn = fn; - - if (state) { - newFn = function (path) { - return fn.call(state, path, state); - }; - } - - if (wrapper) { - newFn = wrapper(state.key, key, newFn); - } - - return newFn; - }); - newVisitor[key] = fns; - } - - return newVisitor; -} - -function ensureEntranceObjects(obj) { - for (const key of Object.keys(obj)) { - if (shouldIgnoreKey(key)) continue; - const fns = obj[key]; - - if (typeof fns === "function") { - obj[key] = { - enter: fns - }; - } - } -} - -function ensureCallbackArrays(obj) { - if (obj.enter && !Array.isArray(obj.enter)) obj.enter = [obj.enter]; - if (obj.exit && !Array.isArray(obj.exit)) obj.exit = [obj.exit]; -} - -function wrapCheck(wrapper, fn) { - const newFn = function (path) { - if (wrapper.checkPath(path)) { - return fn.apply(this, arguments); - } - }; - - newFn.toString = () => fn.toString(); - - return newFn; -} - -function shouldIgnoreKey(key) { - if (key[0] === "_") return true; - if (key === "enter" || key === "exit" || key === "shouldSkip") return true; - - if (key === "blacklist" || key === "noScope" || key === "skipKeys") { - return true; - } - - return false; -} - -function mergePair(dest, src) { - for (const key of Object.keys(src)) { - dest[key] = [].concat(dest[key] || [], src[key]); - } -} \ No newline at end of file diff --git a/node_modules/@babel/traverse/node_modules/debug/CHANGELOG.md b/node_modules/@babel/traverse/node_modules/debug/CHANGELOG.md deleted file mode 100644 index 820d21e3..00000000 --- a/node_modules/@babel/traverse/node_modules/debug/CHANGELOG.md +++ /dev/null @@ -1,395 +0,0 @@ - -3.1.0 / 2017-09-26 -================== - - * Add `DEBUG_HIDE_DATE` env var (#486) - * Remove ReDoS regexp in %o formatter (#504) - * Remove "component" from package.json - * Remove `component.json` - * Ignore package-lock.json - * Examples: fix colors printout - * Fix: browser detection - * Fix: spelling mistake (#496, @EdwardBetts) - -3.0.1 / 2017-08-24 -================== - - * Fix: Disable colors in Edge and Internet Explorer (#489) - -3.0.0 / 2017-08-08 -================== - - * Breaking: Remove DEBUG_FD (#406) - * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418) - * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408) - * Addition: document `enabled` flag (#465) - * Addition: add 256 colors mode (#481) - * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440) - * Update: component: update "ms" to v2.0.0 - * Update: separate the Node and Browser tests in Travis-CI - * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots - * Update: separate Node.js and web browser examples for organization - * Update: update "browserify" to v14.4.0 - * Fix: fix Readme typo (#473) - -2.6.9 / 2017-09-22 -================== - - * remove ReDoS regexp in %o formatter (#504) - -2.6.8 / 2017-05-18 -================== - - * Fix: Check for undefined on browser globals (#462, @marbemac) - -2.6.7 / 2017-05-16 -================== - - * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) - * Fix: Inline extend function in node implementation (#452, @dougwilson) - * Docs: Fix typo (#455, @msasad) - -2.6.5 / 2017-04-27 -================== - - * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) - * Misc: clean up browser reference checks (#447, @thebigredgeek) - * Misc: add npm-debug.log to .gitignore (@thebigredgeek) - - -2.6.4 / 2017-04-20 -================== - - * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) - * Chore: ignore bower.json in npm installations. (#437, @joaovieira) - * Misc: update "ms" to v0.7.3 (@tootallnate) - -2.6.3 / 2017-03-13 -================== - - * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) - * Docs: Changelog fix (@thebigredgeek) - -2.6.2 / 2017-03-10 -================== - - * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) - * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) - * Docs: Add Slackin invite badge (@tootallnate) - -2.6.1 / 2017-02-10 -================== - - * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error - * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) - * Fix: IE8 "Expected identifier" error (#414, @vgoma) - * Fix: Namespaces would not disable once enabled (#409, @musikov) - -2.6.0 / 2016-12-28 -================== - - * Fix: added better null pointer checks for browser useColors (@thebigredgeek) - * Improvement: removed explicit `window.debug` export (#404, @tootallnate) - * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) - -2.5.2 / 2016-12-25 -================== - - * Fix: reference error on window within webworkers (#393, @KlausTrainer) - * Docs: fixed README typo (#391, @lurch) - * Docs: added notice about v3 api discussion (@thebigredgeek) - -2.5.1 / 2016-12-20 -================== - - * Fix: babel-core compatibility - -2.5.0 / 2016-12-20 -================== - - * Fix: wrong reference in bower file (@thebigredgeek) - * Fix: webworker compatibility (@thebigredgeek) - * Fix: output formatting issue (#388, @kribblo) - * Fix: babel-loader compatibility (#383, @escwald) - * Misc: removed built asset from repo and publications (@thebigredgeek) - * Misc: moved source files to /src (#378, @yamikuronue) - * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) - * Test: coveralls integration (#378, @yamikuronue) - * Docs: simplified language in the opening paragraph (#373, @yamikuronue) - -2.4.5 / 2016-12-17 -================== - - * Fix: `navigator` undefined in Rhino (#376, @jochenberger) - * Fix: custom log function (#379, @hsiliev) - * Improvement: bit of cleanup + linting fixes (@thebigredgeek) - * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) - * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) - -2.4.4 / 2016-12-14 -================== - - * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) - -2.4.3 / 2016-12-14 -================== - - * Fix: navigation.userAgent error for react native (#364, @escwald) - -2.4.2 / 2016-12-14 -================== - - * Fix: browser colors (#367, @tootallnate) - * Misc: travis ci integration (@thebigredgeek) - * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) - -2.4.1 / 2016-12-13 -================== - - * Fix: typo that broke the package (#356) - -2.4.0 / 2016-12-13 -================== - - * Fix: bower.json references unbuilt src entry point (#342, @justmatt) - * Fix: revert "handle regex special characters" (@tootallnate) - * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) - * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) - * Improvement: allow colors in workers (#335, @botverse) - * Improvement: use same color for same namespace. (#338, @lchenay) - -2.3.3 / 2016-11-09 -================== - - * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) - * Fix: Returning `localStorage` saved values (#331, Levi Thomason) - * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) - -2.3.2 / 2016-11-09 -================== - - * Fix: be super-safe in index.js as well (@TooTallNate) - * Fix: should check whether process exists (Tom Newby) - -2.3.1 / 2016-11-09 -================== - - * Fix: Added electron compatibility (#324, @paulcbetts) - * Improvement: Added performance optimizations (@tootallnate) - * Readme: Corrected PowerShell environment variable example (#252, @gimre) - * Misc: Removed yarn lock file from source control (#321, @fengmk2) - -2.3.0 / 2016-11-07 -================== - - * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) - * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) - * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) - * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) - * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) - * Package: Update "ms" to 0.7.2 (#315, @DevSide) - * Package: removed superfluous version property from bower.json (#207 @kkirsche) - * Readme: fix USE_COLORS to DEBUG_COLORS - * Readme: Doc fixes for format string sugar (#269, @mlucool) - * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) - * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) - * Readme: better docs for browser support (#224, @matthewmueller) - * Tooling: Added yarn integration for development (#317, @thebigredgeek) - * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) - * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) - * Misc: Updated contributors (@thebigredgeek) - -2.2.0 / 2015-05-09 -================== - - * package: update "ms" to v0.7.1 (#202, @dougwilson) - * README: add logging to file example (#193, @DanielOchoa) - * README: fixed a typo (#191, @amir-s) - * browser: expose `storage` (#190, @stephenmathieson) - * Makefile: add a `distclean` target (#189, @stephenmathieson) - -2.1.3 / 2015-03-13 -================== - - * Updated stdout/stderr example (#186) - * Updated example/stdout.js to match debug current behaviour - * Renamed example/stderr.js to stdout.js - * Update Readme.md (#184) - * replace high intensity foreground color for bold (#182, #183) - -2.1.2 / 2015-03-01 -================== - - * dist: recompile - * update "ms" to v0.7.0 - * package: update "browserify" to v9.0.3 - * component: fix "ms.js" repo location - * changed bower package name - * updated documentation about using debug in a browser - * fix: security error on safari (#167, #168, @yields) - -2.1.1 / 2014-12-29 -================== - - * browser: use `typeof` to check for `console` existence - * browser: check for `console.log` truthiness (fix IE 8/9) - * browser: add support for Chrome apps - * Readme: added Windows usage remarks - * Add `bower.json` to properly support bower install - -2.1.0 / 2014-10-15 -================== - - * node: implement `DEBUG_FD` env variable support - * package: update "browserify" to v6.1.0 - * package: add "license" field to package.json (#135, @panuhorsmalahti) - -2.0.0 / 2014-09-01 -================== - - * package: update "browserify" to v5.11.0 - * node: use stderr rather than stdout for logging (#29, @stephenmathieson) - -1.0.4 / 2014-07-15 -================== - - * dist: recompile - * example: remove `console.info()` log usage - * example: add "Content-Type" UTF-8 header to browser example - * browser: place %c marker after the space character - * browser: reset the "content" color via `color: inherit` - * browser: add colors support for Firefox >= v31 - * debug: prefer an instance `log()` function over the global one (#119) - * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) - -1.0.3 / 2014-07-09 -================== - - * Add support for multiple wildcards in namespaces (#122, @seegno) - * browser: fix lint - -1.0.2 / 2014-06-10 -================== - - * browser: update color palette (#113, @gscottolson) - * common: make console logging function configurable (#108, @timoxley) - * node: fix %o colors on old node <= 0.8.x - * Makefile: find node path using shell/which (#109, @timoxley) - -1.0.1 / 2014-06-06 -================== - - * browser: use `removeItem()` to clear localStorage - * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) - * package: add "contributors" section - * node: fix comment typo - * README: list authors - -1.0.0 / 2014-06-04 -================== - - * make ms diff be global, not be scope - * debug: ignore empty strings in enable() - * node: make DEBUG_COLORS able to disable coloring - * *: export the `colors` array - * npmignore: don't publish the `dist` dir - * Makefile: refactor to use browserify - * package: add "browserify" as a dev dependency - * Readme: add Web Inspector Colors section - * node: reset terminal color for the debug content - * node: map "%o" to `util.inspect()` - * browser: map "%j" to `JSON.stringify()` - * debug: add custom "formatters" - * debug: use "ms" module for humanizing the diff - * Readme: add "bash" syntax highlighting - * browser: add Firebug color support - * browser: add colors for WebKit browsers - * node: apply log to `console` - * rewrite: abstract common logic for Node & browsers - * add .jshintrc file - -0.8.1 / 2014-04-14 -================== - - * package: re-add the "component" section - -0.8.0 / 2014-03-30 -================== - - * add `enable()` method for nodejs. Closes #27 - * change from stderr to stdout - * remove unnecessary index.js file - -0.7.4 / 2013-11-13 -================== - - * remove "browserify" key from package.json (fixes something in browserify) - -0.7.3 / 2013-10-30 -================== - - * fix: catch localStorage security error when cookies are blocked (Chrome) - * add debug(err) support. Closes #46 - * add .browser prop to package.json. Closes #42 - -0.7.2 / 2013-02-06 -================== - - * fix package.json - * fix: Mobile Safari (private mode) is broken with debug - * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript - -0.7.1 / 2013-02-05 -================== - - * add repository URL to package.json - * add DEBUG_COLORED to force colored output - * add browserify support - * fix component. Closes #24 - -0.7.0 / 2012-05-04 -================== - - * Added .component to package.json - * Added debug.component.js build - -0.6.0 / 2012-03-16 -================== - - * Added support for "-" prefix in DEBUG [Vinay Pulim] - * Added `.enabled` flag to the node version [TooTallNate] - -0.5.0 / 2012-02-02 -================== - - * Added: humanize diffs. Closes #8 - * Added `debug.disable()` to the CS variant - * Removed padding. Closes #10 - * Fixed: persist client-side variant again. Closes #9 - -0.4.0 / 2012-02-01 -================== - - * Added browser variant support for older browsers [TooTallNate] - * Added `debug.enable('project:*')` to browser variant [TooTallNate] - * Added padding to diff (moved it to the right) - -0.3.0 / 2012-01-26 -================== - - * Added millisecond diff when isatty, otherwise UTC string - -0.2.0 / 2012-01-22 -================== - - * Added wildcard support - -0.1.0 / 2011-12-02 -================== - - * Added: remove colors unless stderr isatty [TooTallNate] - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/@babel/traverse/node_modules/debug/LICENSE b/node_modules/@babel/traverse/node_modules/debug/LICENSE deleted file mode 100644 index 658c933d..00000000 --- a/node_modules/@babel/traverse/node_modules/debug/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/@babel/traverse/node_modules/debug/README.md b/node_modules/@babel/traverse/node_modules/debug/README.md deleted file mode 100644 index 88dae35d..00000000 --- a/node_modules/@babel/traverse/node_modules/debug/README.md +++ /dev/null @@ -1,455 +0,0 @@ -# debug -[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - - - -A tiny JavaScript debugging utility modelled after Node.js core's debugging -technique. Works in Node.js and web browsers. - -## Installation - -```bash -$ npm install debug -``` - -## Usage - -`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. - -Example [_app.js_](./examples/node/app.js): - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %o', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example [_worker.js_](./examples/node/worker.js): - -```js -var a = require('debug')('worker:a') - , b = require('debug')('worker:b'); - -function work() { - a('doing lots of uninteresting work'); - setTimeout(work, Math.random() * 1000); -} - -work(); - -function workb() { - b('doing some work'); - setTimeout(workb, Math.random() * 2000); -} - -workb(); -``` - -The `DEBUG` environment variable is then used to enable these based on space or -comma-delimited names. - -Here are some examples: - -screen shot 2017-08-08 at 12 53 04 pm -screen shot 2017-08-08 at 12 53 38 pm -screen shot 2017-08-08 at 12 53 25 pm - -#### Windows command prompt notes - -##### CMD - -On Windows the environment variable is set using the `set` command. - -```cmd -set DEBUG=*,-not_this -``` - -Example: - -```cmd -set DEBUG=* & node app.js -``` - -##### PowerShell (VS Code default) - -PowerShell uses different syntax to set environment variables. - -```cmd -$env:DEBUG = "*,-not_this" -``` - -Example: - -```cmd -$env:DEBUG='app';node app.js -``` - -Then, run the program to be debugged as usual. - -npm script example: -```js - "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", -``` - -## Namespace Colors - -Every debug instance has a color generated for it based on its namespace name. -This helps when visually parsing the debug output to identify which debug instance -a debug line belongs to. - -#### Node.js - -In Node.js, colors are enabled when stderr is a TTY. You also _should_ install -the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, -otherwise debug will only use a small handful of basic colors. - - - -#### Web Browser - -Colors are also enabled on "Web Inspectors" that understand the `%c` formatting -option. These are WebKit web inspectors, Firefox ([since version -31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) -and the Firebug plugin for Firefox (any version). - - - - -## Millisecond diff - -When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - - -When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: - - - - -## Conventions - -If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. - -## Wildcards - -The `*` character may be used as a wildcard. Suppose for example your library has -debuggers named "connect:bodyParser", "connect:compress", "connect:session", -instead of listing all three with -`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do -`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - -You can also exclude specific debuggers by prefixing them with a "-" character. -For example, `DEBUG=*,-connect:*` would include all debuggers except those -starting with "connect:". - -## Environment Variables - -When running through Node.js, you can set a few environment variables that will -change the behavior of the debug logging: - -| Name | Purpose | -|-----------|-------------------------------------------------| -| `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | -| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | -| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - - -__Note:__ The environment variables beginning with `DEBUG_` end up being -converted into an Options object that gets used with `%o`/`%O` formatters. -See the Node.js documentation for -[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) -for the complete list. - -## Formatters - -Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. -Below are the officially supported formatters: - -| Formatter | Representation | -|-----------|----------------| -| `%O` | Pretty-print an Object on multiple lines. | -| `%o` | Pretty-print an Object all on a single line. | -| `%s` | String. | -| `%d` | Number (both integer and float). | -| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | -| `%%` | Single percent sign ('%'). This does not consume an argument. | - - -### Custom formatters - -You can add custom formatters by extending the `debug.formatters` object. -For example, if you wanted to add support for rendering a Buffer as hex with -`%h`, you could do something like: - -```js -const createDebug = require('debug') -createDebug.formatters.h = (v) => { - return v.toString('hex') -} - -// …elsewhere -const debug = createDebug('foo') -debug('this is hex: %h', new Buffer('hello world')) -// foo this is hex: 68656c6c6f20776f726c6421 +0ms -``` - - -## Browser Support - -You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), -or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), -if you don't want to build it yourself. - -Debug's enable state is currently persisted by `localStorage`. -Consider the situation shown below where you have `worker:a` and `worker:b`, -and wish to debug both. You can enable this using `localStorage.debug`: - -```js -localStorage.debug = 'worker:*' -``` - -And then refresh the page. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - - -## Output streams - - By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: - -Example [_stdout.js_](./examples/node/stdout.js): - -```js -var debug = require('debug'); -var error = debug('app:error'); - -// by default stderr is used -error('goes to stderr!'); - -var log = debug('app:log'); -// set this namespace to log via console.log -log.log = console.log.bind(console); // don't forget to bind to console! -log('goes to stdout'); -error('still goes to stderr!'); - -// set all output to go via console.info -// overrides all per-namespace log settings -debug.log = console.info.bind(console); -error('now goes to stdout via console.info'); -log('still goes to stdout, but via console.info now'); -``` - -## Extend -You can simply extend debugger -```js -const log = require('debug')('auth'); - -//creates new debug instance with extended namespace -const logSign = log.extend('sign'); -const logLogin = log.extend('login'); - -log('hello'); // auth hello -logSign('hello'); //auth:sign hello -logLogin('hello'); //auth:login hello -``` - -## Set dynamically - -You can also enable debug dynamically by calling the `enable()` method : - -```js -let debug = require('debug'); - -console.log(1, debug.enabled('test')); - -debug.enable('test'); -console.log(2, debug.enabled('test')); - -debug.disable(); -console.log(3, debug.enabled('test')); - -``` - -print : -``` -1 false -2 true -3 false -``` - -Usage : -`enable(namespaces)` -`namespaces` can include modes separated by a colon and wildcards. - -Note that calling `enable()` completely overrides previously set DEBUG variable : - -``` -$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' -=> false -``` - -`disable()` - -Will disable all namespaces. The functions returns the namespaces currently -enabled (and skipped). This can be useful if you want to disable debugging -temporarily without knowing what was enabled to begin with. - -For example: - -```js -let debug = require('debug'); -debug.enable('foo:*,-foo:bar'); -let namespaces = debug.disable(); -debug.enable(namespaces); -``` - -Note: There is no guarantee that the string will be identical to the initial -enable string, but semantically they will be identical. - -## Checking whether a debug target is enabled - -After you've created a debug instance, you can determine whether or not it is -enabled by checking the `enabled` property: - -```javascript -const debug = require('debug')('http'); - -if (debug.enabled) { - // do stuff... -} -``` - -You can also manually toggle this property to force the debug instance to be -enabled or disabled. - - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - - Andrew Rhyne - -## Backers - -Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Sponsors - -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## License - -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/traverse/node_modules/debug/dist/debug.js b/node_modules/@babel/traverse/node_modules/debug/dist/debug.js deleted file mode 100644 index 89ad0c21..00000000 --- a/node_modules/@babel/traverse/node_modules/debug/dist/debug.js +++ /dev/null @@ -1,912 +0,0 @@ -"use strict"; - -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } - -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -(function (f) { - if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") { - module.exports = f(); - } else if (typeof define === "function" && define.amd) { - define([], f); - } else { - var g; - - if (typeof window !== "undefined") { - g = window; - } else if (typeof global !== "undefined") { - g = global; - } else if (typeof self !== "undefined") { - g = self; - } else { - g = this; - } - - g.debug = f(); - } -})(function () { - var define, module, exports; - return function () { - function r(e, n, t) { - function o(i, f) { - if (!n[i]) { - if (!e[i]) { - var c = "function" == typeof require && require; - if (!f && c) return c(i, !0); - if (u) return u(i, !0); - var a = new Error("Cannot find module '" + i + "'"); - throw a.code = "MODULE_NOT_FOUND", a; - } - - var p = n[i] = { - exports: {} - }; - e[i][0].call(p.exports, function (r) { - var n = e[i][1][r]; - return o(n || r); - }, p, p.exports, r, e, n, t); - } - - return n[i].exports; - } - - for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) { - o(t[i]); - } - - return o; - } - - return r; - }()({ - 1: [function (require, module, exports) { - /** - * Helpers. - */ - var s = 1000; - var m = s * 60; - var h = m * 60; - var d = h * 24; - var w = d * 7; - var y = d * 365.25; - /** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - - module.exports = function (val, options) { - options = options || {}; - - var type = _typeof(val); - - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isNaN(val) === false) { - return options.long ? fmtLong(val) : fmtShort(val); - } - - throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val)); - }; - /** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - - - function parse(str) { - str = String(str); - - if (str.length > 100) { - return; - } - - var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); - - if (!match) { - return; - } - - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - - case 'weeks': - case 'week': - case 'w': - return n * w; - - case 'days': - case 'day': - case 'd': - return n * d; - - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - - default: - return undefined; - } - } - /** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - - - function fmtShort(ms) { - var msAbs = Math.abs(ms); - - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - - return ms + 'ms'; - } - /** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - - - function fmtLong(ms) { - var msAbs = Math.abs(ms); - - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - - return ms + ' ms'; - } - /** - * Pluralization helper. - */ - - - function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); - } - }, {}], - 2: [function (require, module, exports) { - // shim for using process in browser - var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it - // don't break things. But we need to wrap it in a try catch in case it is - // wrapped in strict mode code which doesn't define any globals. It's inside a - // function because try/catches deoptimize in certain engines. - - var cachedSetTimeout; - var cachedClearTimeout; - - function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); - } - - function defaultClearTimeout() { - throw new Error('clearTimeout has not been defined'); - } - - (function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } - })(); - - function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } // if setTimeout wasn't available but was latter defined - - - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch (e) { - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch (e) { - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - } - - function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } // if clearTimeout wasn't available but was latter defined - - - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e) { - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e) { - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - } - - var queue = []; - var draining = false; - var currentQueue; - var queueIndex = -1; - - function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - - draining = false; - - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - - if (queue.length) { - drainQueue(); - } - } - - function drainQueue() { - if (draining) { - return; - } - - var timeout = runTimeout(cleanUpNextTick); - draining = true; - var len = queue.length; - - while (len) { - currentQueue = queue; - queue = []; - - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - - queueIndex = -1; - len = queue.length; - } - - currentQueue = null; - draining = false; - runClearTimeout(timeout); - } - - process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - - queue.push(new Item(fun, args)); - - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } - }; // v8 likes predictible objects - - - function Item(fun, array) { - this.fun = fun; - this.array = array; - } - - Item.prototype.run = function () { - this.fun.apply(null, this.array); - }; - - process.title = 'browser'; - process.browser = true; - process.env = {}; - process.argv = []; - process.version = ''; // empty string to avoid regexp issues - - process.versions = {}; - - function noop() {} - - process.on = noop; - process.addListener = noop; - process.once = noop; - process.off = noop; - process.removeListener = noop; - process.removeAllListeners = noop; - process.emit = noop; - process.prependListener = noop; - process.prependOnceListener = noop; - - process.listeners = function (name) { - return []; - }; - - process.binding = function (name) { - throw new Error('process.binding is not supported'); - }; - - process.cwd = function () { - return '/'; - }; - - process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); - }; - - process.umask = function () { - return 0; - }; - }, {}], - 3: [function (require, module, exports) { - /** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require('ms'); - Object.keys(env).forEach(function (key) { - createDebug[key] = env[key]; - }); - /** - * Active `debug` instances. - */ - - createDebug.instances = []; - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - - createDebug.formatters = {}; - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - - function selectColor(namespace) { - var hash = 0; - - for (var i = 0; i < namespace.length; i++) { - hash = (hash << 5) - hash + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - - createDebug.selectColor = selectColor; - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - - function createDebug(namespace) { - var prevTime; - - function debug() { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - // Disabled? - if (!debug.enabled) { - return; - } - - var self = debug; // Set `diff` timestamp - - var curr = Number(new Date()); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } // Apply any `formatters` transformations - - - var index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return match; - } - - index++; - var formatter = createDebug.formatters[format]; - - if (typeof formatter === 'function') { - var val = args[index]; - match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format` - - args.splice(index, 1); - index--; - } - - return match; - }); // Apply env-specific formatting (colors, etc.) - - createDebug.formatArgs.call(self, args); - var logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.enabled = createDebug.enabled(namespace); - debug.useColors = createDebug.useColors(); - debug.color = selectColor(namespace); - debug.destroy = destroy; - debug.extend = extend; // Debug.formatArgs = formatArgs; - // debug.rawLog = rawLog; - // env-specific initialization logic for debug instances - - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - createDebug.instances.push(debug); - return debug; - } - - function destroy() { - var index = createDebug.instances.indexOf(this); - - if (index !== -1) { - createDebug.instances.splice(index, 1); - return true; - } - - return false; - } - - function extend(namespace, delimiter) { - var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - - - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.names = []; - createDebug.skips = []; - var i; - var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - var len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } - - namespaces = split[i].replace(/\*/g, '.*?'); - - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - - for (i = 0; i < createDebug.instances.length; i++) { - var instance = createDebug.instances[i]; - instance.enabled = createDebug.enabled(instance.namespace); - } - } - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - - - function disable() { - var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) { - return '-' + namespace; - }))).join(','); - createDebug.enable(''); - return namespaces; - } - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - - - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } - - var i; - var len; - - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } - - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } - - return false; - } - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - - - function toNamespace(regexp) { - return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*'); - } - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - - - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - - return val; - } - - createDebug.enable(createDebug.load()); - return createDebug; - } - - module.exports = setup; - }, { - "ms": 1 - }], - 4: [function (require, module, exports) { - (function (process) { - /* eslint-env browser */ - - /** - * This is the web browser implementation of `debug()`. - */ - exports.log = log; - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.storage = localstorage(); - /** - * Colors. - */ - - 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']; - /** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - // eslint-disable-next-line complexity - - function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } // Internet Explorer and Edge do not support colors. - - - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - - - return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 - typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker - typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); - } - /** - * Colorize log arguments if enabled. - * - * @api public - */ - - - function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - var c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - - var index = 0; - var lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, function (match) { - if (match === '%%') { - return; - } - - index++; - - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - args.splice(lastC, 0, c); - } - /** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". - * - * @api public - */ - - - function log() { - var _console; - - // This hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments); - } - /** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - - - function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) {// Swallow - // XXX (@Qix-) should we be logging these? - } - } - /** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - - - function load() { - var r; - - try { - r = exports.storage.getItem('debug'); - } catch (error) {} // Swallow - // XXX (@Qix-) should we be logging these? - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - - - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; - } - /** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - - - function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) {// Swallow - // XXX (@Qix-) should we be logging these? - } - } - - module.exports = require('./common')(exports); - var formatters = module.exports.formatters; - /** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - - formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } - }; - }).call(this, require('_process')); - }, { - "./common": 3, - "_process": 2 - }] - }, {}, [4])(4); -}); diff --git a/node_modules/@babel/traverse/node_modules/debug/package.json b/node_modules/@babel/traverse/node_modules/debug/package.json deleted file mode 100644 index 8b3e2cbf..00000000 --- a/node_modules/@babel/traverse/node_modules/debug/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "_args": [ - [ - "debug@4.1.1", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "debug@4.1.1", - "_id": "debug@4.1.1", - "_inBundle": false, - "_integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "_location": "/@babel/traverse/debug", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "debug@4.1.1", - "name": "debug", - "escapedName": "debug", - "rawSpec": "4.1.1", - "saveSpec": null, - "fetchSpec": "4.1.1" - }, - "_requiredBy": [ - "/@babel/traverse" - ], - "_resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "_spec": "4.1.1", - "_where": "E:\\python\\setup-php", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "browser": "./src/browser.js", - "bugs": { - "url": "https://github.com/visionmedia/debug/issues" - }, - "contributors": [ - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io" - }, - { - "name": "Andrew Rhyne", - "email": "rhyneandrew@gmail.com" - } - ], - "dependencies": { - "ms": "^2.1.1" - }, - "description": "small debugging utility", - "devDependencies": { - "@babel/cli": "^7.0.0", - "@babel/core": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "browserify": "14.4.0", - "chai": "^3.5.0", - "concurrently": "^3.1.0", - "coveralls": "^3.0.2", - "istanbul": "^0.4.5", - "karma": "^3.0.0", - "karma-chai": "^0.1.0", - "karma-mocha": "^1.3.0", - "karma-phantomjs-launcher": "^1.0.2", - "mocha": "^5.2.0", - "mocha-lcov-reporter": "^1.2.0", - "rimraf": "^2.5.4", - "xo": "^0.23.0" - }, - "files": [ - "src", - "dist/debug.js", - "LICENSE", - "README.md" - ], - "homepage": "https://github.com/visionmedia/debug#readme", - "keywords": [ - "debug", - "log", - "debugger" - ], - "license": "MIT", - "main": "./src/index.js", - "name": "debug", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "scripts": { - "build": "npm run build:debug && npm run build:test", - "build:debug": "babel -o dist/debug.js dist/debug.es6.js > dist/debug.js", - "build:test": "babel -d dist test.js", - "clean": "rimraf dist coverage", - "lint": "xo", - "prebuild:debug": "mkdir -p dist && browserify --standalone debug -o dist/debug.es6.js .", - "pretest:browser": "npm run build", - "test": "npm run test:node && npm run test:browser", - "test:browser": "karma start --single-run", - "test:coverage": "cat ./coverage/lcov.info | coveralls", - "test:node": "istanbul cover _mocha -- test.js" - }, - "unpkg": "./dist/debug.js", - "version": "4.1.1" -} diff --git a/node_modules/@babel/traverse/node_modules/debug/src/browser.js b/node_modules/@babel/traverse/node_modules/debug/src/browser.js deleted file mode 100644 index 5f34c0d0..00000000 --- a/node_modules/@babel/traverse/node_modules/debug/src/browser.js +++ /dev/null @@ -1,264 +0,0 @@ -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ - -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); - -/** - * Colors. - */ - -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' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". - * - * @api public - */ -function log(...args) { - // This hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return typeof console === 'object' && - console.log && - console.log(...args); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug'); - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; diff --git a/node_modules/@babel/traverse/node_modules/debug/src/common.js b/node_modules/@babel/traverse/node_modules/debug/src/common.js deleted file mode 100644 index 2f82b8dc..00000000 --- a/node_modules/@babel/traverse/node_modules/debug/src/common.js +++ /dev/null @@ -1,266 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require('ms'); - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * Active `debug` instances. - */ - createDebug.instances = []; - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } - - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return match; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.enabled = createDebug.enabled(namespace); - debug.useColors = createDebug.useColors(); - debug.color = selectColor(namespace); - debug.destroy = destroy; - debug.extend = extend; - // Debug.formatArgs = formatArgs; - // debug.rawLog = rawLog; - - // env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - createDebug.instances.push(debug); - - return debug; - } - - function destroy() { - const index = createDebug.instances.indexOf(this); - if (index !== -1) { - createDebug.instances.splice(index, 1); - return true; - } - return false; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - - createDebug.names = []; - createDebug.skips = []; - - let i; - const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - const len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } - - namespaces = split[i].replace(/\*/g, '.*?'); - - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - - for (i = 0; i < createDebug.instances.length; i++) { - const instance = createDebug.instances[i]; - instance.enabled = createDebug.enabled(instance.namespace); - } - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } - - let i; - let len; - - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } - - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } - - return false; - } - - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - function toNamespace(regexp) { - return regexp.toString() - .substring(2, regexp.toString().length - 2) - .replace(/\.\*\?$/, '*'); - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - - createDebug.enable(createDebug.load()); - - return createDebug; -} - -module.exports = setup; diff --git a/node_modules/@babel/traverse/node_modules/debug/src/index.js b/node_modules/@babel/traverse/node_modules/debug/src/index.js deleted file mode 100644 index bf4c57f2..00000000 --- a/node_modules/@babel/traverse/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/node_modules/@babel/traverse/node_modules/debug/src/node.js b/node_modules/@babel/traverse/node_modules/debug/src/node.js deleted file mode 100644 index 5e1f1541..00000000 --- a/node_modules/@babel/traverse/node_modules/debug/src/node.js +++ /dev/null @@ -1,257 +0,0 @@ -/** - * Module dependencies. - */ - -const tty = require('tty'); -const util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - */ - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = require('supports-color'); - - if (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) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} - -/** - * Invokes `util.format()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.format(...args) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init(debug) { - debug.inspectOpts = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .replace(/\s*\n\s*/g, ' '); -}; - -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; diff --git a/node_modules/@babel/traverse/node_modules/ms/index.js b/node_modules/@babel/traverse/node_modules/ms/index.js deleted file mode 100644 index c4498bcc..00000000 --- a/node_modules/@babel/traverse/node_modules/ms/index.js +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); -} diff --git a/node_modules/@babel/traverse/node_modules/ms/license.md b/node_modules/@babel/traverse/node_modules/ms/license.md deleted file mode 100644 index 69b61253..00000000 --- a/node_modules/@babel/traverse/node_modules/ms/license.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Zeit, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@babel/traverse/node_modules/ms/package.json b/node_modules/@babel/traverse/node_modules/ms/package.json deleted file mode 100644 index fbbf9a69..00000000 --- a/node_modules/@babel/traverse/node_modules/ms/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_args": [ - [ - "ms@2.1.2", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "ms@2.1.2", - "_id": "ms@2.1.2", - "_inBundle": false, - "_integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "_location": "/@babel/traverse/ms", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "ms@2.1.2", - "name": "ms", - "escapedName": "ms", - "rawSpec": "2.1.2", - "saveSpec": null, - "fetchSpec": "2.1.2" - }, - "_requiredBy": [ - "/@babel/traverse/debug" - ], - "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "_spec": "2.1.2", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/zeit/ms/issues" - }, - "description": "Tiny millisecond conversion utility", - "devDependencies": { - "eslint": "4.12.1", - "expect.js": "0.3.1", - "husky": "0.14.3", - "lint-staged": "5.0.0", - "mocha": "4.0.1" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - } - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/zeit/ms#readme", - "license": "MIT", - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write", - "git add" - ] - }, - "main": "./index", - "name": "ms", - "repository": { - "type": "git", - "url": "git+https://github.com/zeit/ms.git" - }, - "scripts": { - "lint": "eslint lib/* bin/*", - "precommit": "lint-staged", - "test": "mocha tests.js" - }, - "version": "2.1.2" -} diff --git a/node_modules/@babel/traverse/node_modules/ms/readme.md b/node_modules/@babel/traverse/node_modules/ms/readme.md deleted file mode 100644 index 9a1996b1..00000000 --- a/node_modules/@babel/traverse/node_modules/ms/readme.md +++ /dev/null @@ -1,60 +0,0 @@ -# ms - -[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) -[![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/zeit) - -Use this package to easily convert various time formats to milliseconds. - -## Examples - -```js -ms('2 days') // 172800000 -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2.5 hrs') // 9000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('1y') // 31557600000 -ms('100') // 100 -ms('-3 days') // -259200000 -ms('-1h') // -3600000 -ms('-200') // -200 -``` - -### Convert from Milliseconds - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(-3 * 60000) // "-3m" -ms(ms('10 hours')) // "10h" -``` - -### Time Format Written-Out - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(-3 * 60000, { long: true }) // "-3 minutes" -ms(ms('10 hours'), { long: true }) // "10 hours" -``` - -## Features - -- Works both in [Node.js](https://nodejs.org) and in the browser -- If a number is supplied to `ms`, a string with a unit is returned -- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) -- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned - -## Related Packages - -- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. - -## Caught a Bug? - -1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device -2. Link the package to the global module directory: `npm link` -3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! - -As always, you can run the tests using: `npm test` diff --git a/node_modules/@babel/traverse/package.json b/node_modules/@babel/traverse/package.json deleted file mode 100644 index c288969b..00000000 --- a/node_modules/@babel/traverse/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_args": [ - [ - "@babel/traverse@7.5.5", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@babel/traverse@7.5.5", - "_id": "@babel/traverse@7.5.5", - "_inBundle": false, - "_integrity": "sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ==", - "_location": "/@babel/traverse", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/traverse@7.5.5", - "name": "@babel/traverse", - "escapedName": "@babel%2ftraverse", - "scope": "@babel", - "rawSpec": "7.5.5", - "saveSpec": null, - "fetchSpec": "7.5.5" - }, - "_requiredBy": [ - "/@babel/core", - "/@babel/helpers", - "/istanbul-lib-instrument", - "/jest-circus", - "/jest-jasmine2" - ], - "_resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.5.tgz", - "_spec": "7.5.5", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "dependencies": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.5.5", - "@babel/helper-function-name": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.4.4", - "@babel/parser": "^7.5.5", - "@babel/types": "^7.5.5", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" - }, - "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", - "devDependencies": { - "@babel/helper-plugin-test-runner": "^7.0.0" - }, - "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/traverse", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-traverse" - }, - "version": "7.5.5" -} diff --git a/node_modules/@babel/types/LICENSE b/node_modules/@babel/types/LICENSE deleted file mode 100644 index f31575ec..00000000 --- a/node_modules/@babel/types/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/types/README.md b/node_modules/@babel/types/README.md deleted file mode 100644 index 8d33374d..00000000 --- a/node_modules/@babel/types/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/types - -> Babel Types is a Lodash-esque utility library for AST nodes - -See our website [@babel/types](https://babeljs.io/docs/en/next/babel-types.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20types%22+is%3Aopen) associated with this package. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/types -``` - -or using yarn: - -```sh -yarn add @babel/types --dev -``` diff --git a/node_modules/@babel/types/lib/asserts/assertNode.js b/node_modules/@babel/types/lib/asserts/assertNode.js deleted file mode 100644 index 194ec716..00000000 --- a/node_modules/@babel/types/lib/asserts/assertNode.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = assertNode; - -var _isNode = _interopRequireDefault(require("../validators/isNode")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function assertNode(node) { - if (!(0, _isNode.default)(node)) { - const type = node && node.type || JSON.stringify(node); - throw new TypeError(`Not a valid node of type "${type}"`); - } -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/asserts/generated/index.js b/node_modules/@babel/types/lib/asserts/generated/index.js deleted file mode 100644 index a9f59b08..00000000 --- a/node_modules/@babel/types/lib/asserts/generated/index.js +++ /dev/null @@ -1,1364 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.assertArrayExpression = assertArrayExpression; -exports.assertAssignmentExpression = assertAssignmentExpression; -exports.assertBinaryExpression = assertBinaryExpression; -exports.assertInterpreterDirective = assertInterpreterDirective; -exports.assertDirective = assertDirective; -exports.assertDirectiveLiteral = assertDirectiveLiteral; -exports.assertBlockStatement = assertBlockStatement; -exports.assertBreakStatement = assertBreakStatement; -exports.assertCallExpression = assertCallExpression; -exports.assertCatchClause = assertCatchClause; -exports.assertConditionalExpression = assertConditionalExpression; -exports.assertContinueStatement = assertContinueStatement; -exports.assertDebuggerStatement = assertDebuggerStatement; -exports.assertDoWhileStatement = assertDoWhileStatement; -exports.assertEmptyStatement = assertEmptyStatement; -exports.assertExpressionStatement = assertExpressionStatement; -exports.assertFile = assertFile; -exports.assertForInStatement = assertForInStatement; -exports.assertForStatement = assertForStatement; -exports.assertFunctionDeclaration = assertFunctionDeclaration; -exports.assertFunctionExpression = assertFunctionExpression; -exports.assertIdentifier = assertIdentifier; -exports.assertIfStatement = assertIfStatement; -exports.assertLabeledStatement = assertLabeledStatement; -exports.assertStringLiteral = assertStringLiteral; -exports.assertNumericLiteral = assertNumericLiteral; -exports.assertNullLiteral = assertNullLiteral; -exports.assertBooleanLiteral = assertBooleanLiteral; -exports.assertRegExpLiteral = assertRegExpLiteral; -exports.assertLogicalExpression = assertLogicalExpression; -exports.assertMemberExpression = assertMemberExpression; -exports.assertNewExpression = assertNewExpression; -exports.assertProgram = assertProgram; -exports.assertObjectExpression = assertObjectExpression; -exports.assertObjectMethod = assertObjectMethod; -exports.assertObjectProperty = assertObjectProperty; -exports.assertRestElement = assertRestElement; -exports.assertReturnStatement = assertReturnStatement; -exports.assertSequenceExpression = assertSequenceExpression; -exports.assertParenthesizedExpression = assertParenthesizedExpression; -exports.assertSwitchCase = assertSwitchCase; -exports.assertSwitchStatement = assertSwitchStatement; -exports.assertThisExpression = assertThisExpression; -exports.assertThrowStatement = assertThrowStatement; -exports.assertTryStatement = assertTryStatement; -exports.assertUnaryExpression = assertUnaryExpression; -exports.assertUpdateExpression = assertUpdateExpression; -exports.assertVariableDeclaration = assertVariableDeclaration; -exports.assertVariableDeclarator = assertVariableDeclarator; -exports.assertWhileStatement = assertWhileStatement; -exports.assertWithStatement = assertWithStatement; -exports.assertAssignmentPattern = assertAssignmentPattern; -exports.assertArrayPattern = assertArrayPattern; -exports.assertArrowFunctionExpression = assertArrowFunctionExpression; -exports.assertClassBody = assertClassBody; -exports.assertClassDeclaration = assertClassDeclaration; -exports.assertClassExpression = assertClassExpression; -exports.assertExportAllDeclaration = assertExportAllDeclaration; -exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration; -exports.assertExportNamedDeclaration = assertExportNamedDeclaration; -exports.assertExportSpecifier = assertExportSpecifier; -exports.assertForOfStatement = assertForOfStatement; -exports.assertImportDeclaration = assertImportDeclaration; -exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier; -exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier; -exports.assertImportSpecifier = assertImportSpecifier; -exports.assertMetaProperty = assertMetaProperty; -exports.assertClassMethod = assertClassMethod; -exports.assertObjectPattern = assertObjectPattern; -exports.assertSpreadElement = assertSpreadElement; -exports.assertSuper = assertSuper; -exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression; -exports.assertTemplateElement = assertTemplateElement; -exports.assertTemplateLiteral = assertTemplateLiteral; -exports.assertYieldExpression = assertYieldExpression; -exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation; -exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation; -exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation; -exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation; -exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation; -exports.assertClassImplements = assertClassImplements; -exports.assertDeclareClass = assertDeclareClass; -exports.assertDeclareFunction = assertDeclareFunction; -exports.assertDeclareInterface = assertDeclareInterface; -exports.assertDeclareModule = assertDeclareModule; -exports.assertDeclareModuleExports = assertDeclareModuleExports; -exports.assertDeclareTypeAlias = assertDeclareTypeAlias; -exports.assertDeclareOpaqueType = assertDeclareOpaqueType; -exports.assertDeclareVariable = assertDeclareVariable; -exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration; -exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration; -exports.assertDeclaredPredicate = assertDeclaredPredicate; -exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation; -exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation; -exports.assertFunctionTypeParam = assertFunctionTypeParam; -exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation; -exports.assertInferredPredicate = assertInferredPredicate; -exports.assertInterfaceExtends = assertInterfaceExtends; -exports.assertInterfaceDeclaration = assertInterfaceDeclaration; -exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation; -exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation; -exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation; -exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation; -exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation; -exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation; -exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation; -exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation; -exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot; -exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty; -exports.assertObjectTypeIndexer = assertObjectTypeIndexer; -exports.assertObjectTypeProperty = assertObjectTypeProperty; -exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty; -exports.assertOpaqueType = assertOpaqueType; -exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier; -exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation; -exports.assertStringTypeAnnotation = assertStringTypeAnnotation; -exports.assertThisTypeAnnotation = assertThisTypeAnnotation; -exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation; -exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation; -exports.assertTypeAlias = assertTypeAlias; -exports.assertTypeAnnotation = assertTypeAnnotation; -exports.assertTypeCastExpression = assertTypeCastExpression; -exports.assertTypeParameter = assertTypeParameter; -exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration; -exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation; -exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation; -exports.assertVariance = assertVariance; -exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation; -exports.assertJSXAttribute = assertJSXAttribute; -exports.assertJSXClosingElement = assertJSXClosingElement; -exports.assertJSXElement = assertJSXElement; -exports.assertJSXEmptyExpression = assertJSXEmptyExpression; -exports.assertJSXExpressionContainer = assertJSXExpressionContainer; -exports.assertJSXSpreadChild = assertJSXSpreadChild; -exports.assertJSXIdentifier = assertJSXIdentifier; -exports.assertJSXMemberExpression = assertJSXMemberExpression; -exports.assertJSXNamespacedName = assertJSXNamespacedName; -exports.assertJSXOpeningElement = assertJSXOpeningElement; -exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute; -exports.assertJSXText = assertJSXText; -exports.assertJSXFragment = assertJSXFragment; -exports.assertJSXOpeningFragment = assertJSXOpeningFragment; -exports.assertJSXClosingFragment = assertJSXClosingFragment; -exports.assertNoop = assertNoop; -exports.assertPlaceholder = assertPlaceholder; -exports.assertArgumentPlaceholder = assertArgumentPlaceholder; -exports.assertAwaitExpression = assertAwaitExpression; -exports.assertBindExpression = assertBindExpression; -exports.assertClassProperty = assertClassProperty; -exports.assertOptionalMemberExpression = assertOptionalMemberExpression; -exports.assertPipelineTopicExpression = assertPipelineTopicExpression; -exports.assertPipelineBareFunction = assertPipelineBareFunction; -exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference; -exports.assertOptionalCallExpression = assertOptionalCallExpression; -exports.assertClassPrivateProperty = assertClassPrivateProperty; -exports.assertClassPrivateMethod = assertClassPrivateMethod; -exports.assertImport = assertImport; -exports.assertDecorator = assertDecorator; -exports.assertDoExpression = assertDoExpression; -exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier; -exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier; -exports.assertPrivateName = assertPrivateName; -exports.assertBigIntLiteral = assertBigIntLiteral; -exports.assertTSParameterProperty = assertTSParameterProperty; -exports.assertTSDeclareFunction = assertTSDeclareFunction; -exports.assertTSDeclareMethod = assertTSDeclareMethod; -exports.assertTSQualifiedName = assertTSQualifiedName; -exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration; -exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration; -exports.assertTSPropertySignature = assertTSPropertySignature; -exports.assertTSMethodSignature = assertTSMethodSignature; -exports.assertTSIndexSignature = assertTSIndexSignature; -exports.assertTSAnyKeyword = assertTSAnyKeyword; -exports.assertTSUnknownKeyword = assertTSUnknownKeyword; -exports.assertTSNumberKeyword = assertTSNumberKeyword; -exports.assertTSObjectKeyword = assertTSObjectKeyword; -exports.assertTSBooleanKeyword = assertTSBooleanKeyword; -exports.assertTSStringKeyword = assertTSStringKeyword; -exports.assertTSSymbolKeyword = assertTSSymbolKeyword; -exports.assertTSVoidKeyword = assertTSVoidKeyword; -exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword; -exports.assertTSNullKeyword = assertTSNullKeyword; -exports.assertTSNeverKeyword = assertTSNeverKeyword; -exports.assertTSThisType = assertTSThisType; -exports.assertTSFunctionType = assertTSFunctionType; -exports.assertTSConstructorType = assertTSConstructorType; -exports.assertTSTypeReference = assertTSTypeReference; -exports.assertTSTypePredicate = assertTSTypePredicate; -exports.assertTSTypeQuery = assertTSTypeQuery; -exports.assertTSTypeLiteral = assertTSTypeLiteral; -exports.assertTSArrayType = assertTSArrayType; -exports.assertTSTupleType = assertTSTupleType; -exports.assertTSOptionalType = assertTSOptionalType; -exports.assertTSRestType = assertTSRestType; -exports.assertTSUnionType = assertTSUnionType; -exports.assertTSIntersectionType = assertTSIntersectionType; -exports.assertTSConditionalType = assertTSConditionalType; -exports.assertTSInferType = assertTSInferType; -exports.assertTSParenthesizedType = assertTSParenthesizedType; -exports.assertTSTypeOperator = assertTSTypeOperator; -exports.assertTSIndexedAccessType = assertTSIndexedAccessType; -exports.assertTSMappedType = assertTSMappedType; -exports.assertTSLiteralType = assertTSLiteralType; -exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments; -exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration; -exports.assertTSInterfaceBody = assertTSInterfaceBody; -exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration; -exports.assertTSAsExpression = assertTSAsExpression; -exports.assertTSTypeAssertion = assertTSTypeAssertion; -exports.assertTSEnumDeclaration = assertTSEnumDeclaration; -exports.assertTSEnumMember = assertTSEnumMember; -exports.assertTSModuleDeclaration = assertTSModuleDeclaration; -exports.assertTSModuleBlock = assertTSModuleBlock; -exports.assertTSImportType = assertTSImportType; -exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration; -exports.assertTSExternalModuleReference = assertTSExternalModuleReference; -exports.assertTSNonNullExpression = assertTSNonNullExpression; -exports.assertTSExportAssignment = assertTSExportAssignment; -exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration; -exports.assertTSTypeAnnotation = assertTSTypeAnnotation; -exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation; -exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration; -exports.assertTSTypeParameter = assertTSTypeParameter; -exports.assertExpression = assertExpression; -exports.assertBinary = assertBinary; -exports.assertScopable = assertScopable; -exports.assertBlockParent = assertBlockParent; -exports.assertBlock = assertBlock; -exports.assertStatement = assertStatement; -exports.assertTerminatorless = assertTerminatorless; -exports.assertCompletionStatement = assertCompletionStatement; -exports.assertConditional = assertConditional; -exports.assertLoop = assertLoop; -exports.assertWhile = assertWhile; -exports.assertExpressionWrapper = assertExpressionWrapper; -exports.assertFor = assertFor; -exports.assertForXStatement = assertForXStatement; -exports.assertFunction = assertFunction; -exports.assertFunctionParent = assertFunctionParent; -exports.assertPureish = assertPureish; -exports.assertDeclaration = assertDeclaration; -exports.assertPatternLike = assertPatternLike; -exports.assertLVal = assertLVal; -exports.assertTSEntityName = assertTSEntityName; -exports.assertLiteral = assertLiteral; -exports.assertImmutable = assertImmutable; -exports.assertUserWhitespacable = assertUserWhitespacable; -exports.assertMethod = assertMethod; -exports.assertObjectMember = assertObjectMember; -exports.assertProperty = assertProperty; -exports.assertUnaryLike = assertUnaryLike; -exports.assertPattern = assertPattern; -exports.assertClass = assertClass; -exports.assertModuleDeclaration = assertModuleDeclaration; -exports.assertExportDeclaration = assertExportDeclaration; -exports.assertModuleSpecifier = assertModuleSpecifier; -exports.assertFlow = assertFlow; -exports.assertFlowType = assertFlowType; -exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation; -exports.assertFlowDeclaration = assertFlowDeclaration; -exports.assertFlowPredicate = assertFlowPredicate; -exports.assertJSX = assertJSX; -exports.assertPrivate = assertPrivate; -exports.assertTSTypeElement = assertTSTypeElement; -exports.assertTSType = assertTSType; -exports.assertNumberLiteral = assertNumberLiteral; -exports.assertRegexLiteral = assertRegexLiteral; -exports.assertRestProperty = assertRestProperty; -exports.assertSpreadProperty = assertSpreadProperty; - -var _is = _interopRequireDefault(require("../../validators/is")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function assert(type, node, opts) { - if (!(0, _is.default)(type, node, opts)) { - throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`); - } -} - -function assertArrayExpression(node, opts = {}) { - assert("ArrayExpression", node, opts); -} - -function assertAssignmentExpression(node, opts = {}) { - assert("AssignmentExpression", node, opts); -} - -function assertBinaryExpression(node, opts = {}) { - assert("BinaryExpression", node, opts); -} - -function assertInterpreterDirective(node, opts = {}) { - assert("InterpreterDirective", node, opts); -} - -function assertDirective(node, opts = {}) { - assert("Directive", node, opts); -} - -function assertDirectiveLiteral(node, opts = {}) { - assert("DirectiveLiteral", node, opts); -} - -function assertBlockStatement(node, opts = {}) { - assert("BlockStatement", node, opts); -} - -function assertBreakStatement(node, opts = {}) { - assert("BreakStatement", node, opts); -} - -function assertCallExpression(node, opts = {}) { - assert("CallExpression", node, opts); -} - -function assertCatchClause(node, opts = {}) { - assert("CatchClause", node, opts); -} - -function assertConditionalExpression(node, opts = {}) { - assert("ConditionalExpression", node, opts); -} - -function assertContinueStatement(node, opts = {}) { - assert("ContinueStatement", node, opts); -} - -function assertDebuggerStatement(node, opts = {}) { - assert("DebuggerStatement", node, opts); -} - -function assertDoWhileStatement(node, opts = {}) { - assert("DoWhileStatement", node, opts); -} - -function assertEmptyStatement(node, opts = {}) { - assert("EmptyStatement", node, opts); -} - -function assertExpressionStatement(node, opts = {}) { - assert("ExpressionStatement", node, opts); -} - -function assertFile(node, opts = {}) { - assert("File", node, opts); -} - -function assertForInStatement(node, opts = {}) { - assert("ForInStatement", node, opts); -} - -function assertForStatement(node, opts = {}) { - assert("ForStatement", node, opts); -} - -function assertFunctionDeclaration(node, opts = {}) { - assert("FunctionDeclaration", node, opts); -} - -function assertFunctionExpression(node, opts = {}) { - assert("FunctionExpression", node, opts); -} - -function assertIdentifier(node, opts = {}) { - assert("Identifier", node, opts); -} - -function assertIfStatement(node, opts = {}) { - assert("IfStatement", node, opts); -} - -function assertLabeledStatement(node, opts = {}) { - assert("LabeledStatement", node, opts); -} - -function assertStringLiteral(node, opts = {}) { - assert("StringLiteral", node, opts); -} - -function assertNumericLiteral(node, opts = {}) { - assert("NumericLiteral", node, opts); -} - -function assertNullLiteral(node, opts = {}) { - assert("NullLiteral", node, opts); -} - -function assertBooleanLiteral(node, opts = {}) { - assert("BooleanLiteral", node, opts); -} - -function assertRegExpLiteral(node, opts = {}) { - assert("RegExpLiteral", node, opts); -} - -function assertLogicalExpression(node, opts = {}) { - assert("LogicalExpression", node, opts); -} - -function assertMemberExpression(node, opts = {}) { - assert("MemberExpression", node, opts); -} - -function assertNewExpression(node, opts = {}) { - assert("NewExpression", node, opts); -} - -function assertProgram(node, opts = {}) { - assert("Program", node, opts); -} - -function assertObjectExpression(node, opts = {}) { - assert("ObjectExpression", node, opts); -} - -function assertObjectMethod(node, opts = {}) { - assert("ObjectMethod", node, opts); -} - -function assertObjectProperty(node, opts = {}) { - assert("ObjectProperty", node, opts); -} - -function assertRestElement(node, opts = {}) { - assert("RestElement", node, opts); -} - -function assertReturnStatement(node, opts = {}) { - assert("ReturnStatement", node, opts); -} - -function assertSequenceExpression(node, opts = {}) { - assert("SequenceExpression", node, opts); -} - -function assertParenthesizedExpression(node, opts = {}) { - assert("ParenthesizedExpression", node, opts); -} - -function assertSwitchCase(node, opts = {}) { - assert("SwitchCase", node, opts); -} - -function assertSwitchStatement(node, opts = {}) { - assert("SwitchStatement", node, opts); -} - -function assertThisExpression(node, opts = {}) { - assert("ThisExpression", node, opts); -} - -function assertThrowStatement(node, opts = {}) { - assert("ThrowStatement", node, opts); -} - -function assertTryStatement(node, opts = {}) { - assert("TryStatement", node, opts); -} - -function assertUnaryExpression(node, opts = {}) { - assert("UnaryExpression", node, opts); -} - -function assertUpdateExpression(node, opts = {}) { - assert("UpdateExpression", node, opts); -} - -function assertVariableDeclaration(node, opts = {}) { - assert("VariableDeclaration", node, opts); -} - -function assertVariableDeclarator(node, opts = {}) { - assert("VariableDeclarator", node, opts); -} - -function assertWhileStatement(node, opts = {}) { - assert("WhileStatement", node, opts); -} - -function assertWithStatement(node, opts = {}) { - assert("WithStatement", node, opts); -} - -function assertAssignmentPattern(node, opts = {}) { - assert("AssignmentPattern", node, opts); -} - -function assertArrayPattern(node, opts = {}) { - assert("ArrayPattern", node, opts); -} - -function assertArrowFunctionExpression(node, opts = {}) { - assert("ArrowFunctionExpression", node, opts); -} - -function assertClassBody(node, opts = {}) { - assert("ClassBody", node, opts); -} - -function assertClassDeclaration(node, opts = {}) { - assert("ClassDeclaration", node, opts); -} - -function assertClassExpression(node, opts = {}) { - assert("ClassExpression", node, opts); -} - -function assertExportAllDeclaration(node, opts = {}) { - assert("ExportAllDeclaration", node, opts); -} - -function assertExportDefaultDeclaration(node, opts = {}) { - assert("ExportDefaultDeclaration", node, opts); -} - -function assertExportNamedDeclaration(node, opts = {}) { - assert("ExportNamedDeclaration", node, opts); -} - -function assertExportSpecifier(node, opts = {}) { - assert("ExportSpecifier", node, opts); -} - -function assertForOfStatement(node, opts = {}) { - assert("ForOfStatement", node, opts); -} - -function assertImportDeclaration(node, opts = {}) { - assert("ImportDeclaration", node, opts); -} - -function assertImportDefaultSpecifier(node, opts = {}) { - assert("ImportDefaultSpecifier", node, opts); -} - -function assertImportNamespaceSpecifier(node, opts = {}) { - assert("ImportNamespaceSpecifier", node, opts); -} - -function assertImportSpecifier(node, opts = {}) { - assert("ImportSpecifier", node, opts); -} - -function assertMetaProperty(node, opts = {}) { - assert("MetaProperty", node, opts); -} - -function assertClassMethod(node, opts = {}) { - assert("ClassMethod", node, opts); -} - -function assertObjectPattern(node, opts = {}) { - assert("ObjectPattern", node, opts); -} - -function assertSpreadElement(node, opts = {}) { - assert("SpreadElement", node, opts); -} - -function assertSuper(node, opts = {}) { - assert("Super", node, opts); -} - -function assertTaggedTemplateExpression(node, opts = {}) { - assert("TaggedTemplateExpression", node, opts); -} - -function assertTemplateElement(node, opts = {}) { - assert("TemplateElement", node, opts); -} - -function assertTemplateLiteral(node, opts = {}) { - assert("TemplateLiteral", node, opts); -} - -function assertYieldExpression(node, opts = {}) { - assert("YieldExpression", node, opts); -} - -function assertAnyTypeAnnotation(node, opts = {}) { - assert("AnyTypeAnnotation", node, opts); -} - -function assertArrayTypeAnnotation(node, opts = {}) { - assert("ArrayTypeAnnotation", node, opts); -} - -function assertBooleanTypeAnnotation(node, opts = {}) { - assert("BooleanTypeAnnotation", node, opts); -} - -function assertBooleanLiteralTypeAnnotation(node, opts = {}) { - assert("BooleanLiteralTypeAnnotation", node, opts); -} - -function assertNullLiteralTypeAnnotation(node, opts = {}) { - assert("NullLiteralTypeAnnotation", node, opts); -} - -function assertClassImplements(node, opts = {}) { - assert("ClassImplements", node, opts); -} - -function assertDeclareClass(node, opts = {}) { - assert("DeclareClass", node, opts); -} - -function assertDeclareFunction(node, opts = {}) { - assert("DeclareFunction", node, opts); -} - -function assertDeclareInterface(node, opts = {}) { - assert("DeclareInterface", node, opts); -} - -function assertDeclareModule(node, opts = {}) { - assert("DeclareModule", node, opts); -} - -function assertDeclareModuleExports(node, opts = {}) { - assert("DeclareModuleExports", node, opts); -} - -function assertDeclareTypeAlias(node, opts = {}) { - assert("DeclareTypeAlias", node, opts); -} - -function assertDeclareOpaqueType(node, opts = {}) { - assert("DeclareOpaqueType", node, opts); -} - -function assertDeclareVariable(node, opts = {}) { - assert("DeclareVariable", node, opts); -} - -function assertDeclareExportDeclaration(node, opts = {}) { - assert("DeclareExportDeclaration", node, opts); -} - -function assertDeclareExportAllDeclaration(node, opts = {}) { - assert("DeclareExportAllDeclaration", node, opts); -} - -function assertDeclaredPredicate(node, opts = {}) { - assert("DeclaredPredicate", node, opts); -} - -function assertExistsTypeAnnotation(node, opts = {}) { - assert("ExistsTypeAnnotation", node, opts); -} - -function assertFunctionTypeAnnotation(node, opts = {}) { - assert("FunctionTypeAnnotation", node, opts); -} - -function assertFunctionTypeParam(node, opts = {}) { - assert("FunctionTypeParam", node, opts); -} - -function assertGenericTypeAnnotation(node, opts = {}) { - assert("GenericTypeAnnotation", node, opts); -} - -function assertInferredPredicate(node, opts = {}) { - assert("InferredPredicate", node, opts); -} - -function assertInterfaceExtends(node, opts = {}) { - assert("InterfaceExtends", node, opts); -} - -function assertInterfaceDeclaration(node, opts = {}) { - assert("InterfaceDeclaration", node, opts); -} - -function assertInterfaceTypeAnnotation(node, opts = {}) { - assert("InterfaceTypeAnnotation", node, opts); -} - -function assertIntersectionTypeAnnotation(node, opts = {}) { - assert("IntersectionTypeAnnotation", node, opts); -} - -function assertMixedTypeAnnotation(node, opts = {}) { - assert("MixedTypeAnnotation", node, opts); -} - -function assertEmptyTypeAnnotation(node, opts = {}) { - assert("EmptyTypeAnnotation", node, opts); -} - -function assertNullableTypeAnnotation(node, opts = {}) { - assert("NullableTypeAnnotation", node, opts); -} - -function assertNumberLiteralTypeAnnotation(node, opts = {}) { - assert("NumberLiteralTypeAnnotation", node, opts); -} - -function assertNumberTypeAnnotation(node, opts = {}) { - assert("NumberTypeAnnotation", node, opts); -} - -function assertObjectTypeAnnotation(node, opts = {}) { - assert("ObjectTypeAnnotation", node, opts); -} - -function assertObjectTypeInternalSlot(node, opts = {}) { - assert("ObjectTypeInternalSlot", node, opts); -} - -function assertObjectTypeCallProperty(node, opts = {}) { - assert("ObjectTypeCallProperty", node, opts); -} - -function assertObjectTypeIndexer(node, opts = {}) { - assert("ObjectTypeIndexer", node, opts); -} - -function assertObjectTypeProperty(node, opts = {}) { - assert("ObjectTypeProperty", node, opts); -} - -function assertObjectTypeSpreadProperty(node, opts = {}) { - assert("ObjectTypeSpreadProperty", node, opts); -} - -function assertOpaqueType(node, opts = {}) { - assert("OpaqueType", node, opts); -} - -function assertQualifiedTypeIdentifier(node, opts = {}) { - assert("QualifiedTypeIdentifier", node, opts); -} - -function assertStringLiteralTypeAnnotation(node, opts = {}) { - assert("StringLiteralTypeAnnotation", node, opts); -} - -function assertStringTypeAnnotation(node, opts = {}) { - assert("StringTypeAnnotation", node, opts); -} - -function assertThisTypeAnnotation(node, opts = {}) { - assert("ThisTypeAnnotation", node, opts); -} - -function assertTupleTypeAnnotation(node, opts = {}) { - assert("TupleTypeAnnotation", node, opts); -} - -function assertTypeofTypeAnnotation(node, opts = {}) { - assert("TypeofTypeAnnotation", node, opts); -} - -function assertTypeAlias(node, opts = {}) { - assert("TypeAlias", node, opts); -} - -function assertTypeAnnotation(node, opts = {}) { - assert("TypeAnnotation", node, opts); -} - -function assertTypeCastExpression(node, opts = {}) { - assert("TypeCastExpression", node, opts); -} - -function assertTypeParameter(node, opts = {}) { - assert("TypeParameter", node, opts); -} - -function assertTypeParameterDeclaration(node, opts = {}) { - assert("TypeParameterDeclaration", node, opts); -} - -function assertTypeParameterInstantiation(node, opts = {}) { - assert("TypeParameterInstantiation", node, opts); -} - -function assertUnionTypeAnnotation(node, opts = {}) { - assert("UnionTypeAnnotation", node, opts); -} - -function assertVariance(node, opts = {}) { - assert("Variance", node, opts); -} - -function assertVoidTypeAnnotation(node, opts = {}) { - assert("VoidTypeAnnotation", node, opts); -} - -function assertJSXAttribute(node, opts = {}) { - assert("JSXAttribute", node, opts); -} - -function assertJSXClosingElement(node, opts = {}) { - assert("JSXClosingElement", node, opts); -} - -function assertJSXElement(node, opts = {}) { - assert("JSXElement", node, opts); -} - -function assertJSXEmptyExpression(node, opts = {}) { - assert("JSXEmptyExpression", node, opts); -} - -function assertJSXExpressionContainer(node, opts = {}) { - assert("JSXExpressionContainer", node, opts); -} - -function assertJSXSpreadChild(node, opts = {}) { - assert("JSXSpreadChild", node, opts); -} - -function assertJSXIdentifier(node, opts = {}) { - assert("JSXIdentifier", node, opts); -} - -function assertJSXMemberExpression(node, opts = {}) { - assert("JSXMemberExpression", node, opts); -} - -function assertJSXNamespacedName(node, opts = {}) { - assert("JSXNamespacedName", node, opts); -} - -function assertJSXOpeningElement(node, opts = {}) { - assert("JSXOpeningElement", node, opts); -} - -function assertJSXSpreadAttribute(node, opts = {}) { - assert("JSXSpreadAttribute", node, opts); -} - -function assertJSXText(node, opts = {}) { - assert("JSXText", node, opts); -} - -function assertJSXFragment(node, opts = {}) { - assert("JSXFragment", node, opts); -} - -function assertJSXOpeningFragment(node, opts = {}) { - assert("JSXOpeningFragment", node, opts); -} - -function assertJSXClosingFragment(node, opts = {}) { - assert("JSXClosingFragment", node, opts); -} - -function assertNoop(node, opts = {}) { - assert("Noop", node, opts); -} - -function assertPlaceholder(node, opts = {}) { - assert("Placeholder", node, opts); -} - -function assertArgumentPlaceholder(node, opts = {}) { - assert("ArgumentPlaceholder", node, opts); -} - -function assertAwaitExpression(node, opts = {}) { - assert("AwaitExpression", node, opts); -} - -function assertBindExpression(node, opts = {}) { - assert("BindExpression", node, opts); -} - -function assertClassProperty(node, opts = {}) { - assert("ClassProperty", node, opts); -} - -function assertOptionalMemberExpression(node, opts = {}) { - assert("OptionalMemberExpression", node, opts); -} - -function assertPipelineTopicExpression(node, opts = {}) { - assert("PipelineTopicExpression", node, opts); -} - -function assertPipelineBareFunction(node, opts = {}) { - assert("PipelineBareFunction", node, opts); -} - -function assertPipelinePrimaryTopicReference(node, opts = {}) { - assert("PipelinePrimaryTopicReference", node, opts); -} - -function assertOptionalCallExpression(node, opts = {}) { - assert("OptionalCallExpression", node, opts); -} - -function assertClassPrivateProperty(node, opts = {}) { - assert("ClassPrivateProperty", node, opts); -} - -function assertClassPrivateMethod(node, opts = {}) { - assert("ClassPrivateMethod", node, opts); -} - -function assertImport(node, opts = {}) { - assert("Import", node, opts); -} - -function assertDecorator(node, opts = {}) { - assert("Decorator", node, opts); -} - -function assertDoExpression(node, opts = {}) { - assert("DoExpression", node, opts); -} - -function assertExportDefaultSpecifier(node, opts = {}) { - assert("ExportDefaultSpecifier", node, opts); -} - -function assertExportNamespaceSpecifier(node, opts = {}) { - assert("ExportNamespaceSpecifier", node, opts); -} - -function assertPrivateName(node, opts = {}) { - assert("PrivateName", node, opts); -} - -function assertBigIntLiteral(node, opts = {}) { - assert("BigIntLiteral", node, opts); -} - -function assertTSParameterProperty(node, opts = {}) { - assert("TSParameterProperty", node, opts); -} - -function assertTSDeclareFunction(node, opts = {}) { - assert("TSDeclareFunction", node, opts); -} - -function assertTSDeclareMethod(node, opts = {}) { - assert("TSDeclareMethod", node, opts); -} - -function assertTSQualifiedName(node, opts = {}) { - assert("TSQualifiedName", node, opts); -} - -function assertTSCallSignatureDeclaration(node, opts = {}) { - assert("TSCallSignatureDeclaration", node, opts); -} - -function assertTSConstructSignatureDeclaration(node, opts = {}) { - assert("TSConstructSignatureDeclaration", node, opts); -} - -function assertTSPropertySignature(node, opts = {}) { - assert("TSPropertySignature", node, opts); -} - -function assertTSMethodSignature(node, opts = {}) { - assert("TSMethodSignature", node, opts); -} - -function assertTSIndexSignature(node, opts = {}) { - assert("TSIndexSignature", node, opts); -} - -function assertTSAnyKeyword(node, opts = {}) { - assert("TSAnyKeyword", node, opts); -} - -function assertTSUnknownKeyword(node, opts = {}) { - assert("TSUnknownKeyword", node, opts); -} - -function assertTSNumberKeyword(node, opts = {}) { - assert("TSNumberKeyword", node, opts); -} - -function assertTSObjectKeyword(node, opts = {}) { - assert("TSObjectKeyword", node, opts); -} - -function assertTSBooleanKeyword(node, opts = {}) { - assert("TSBooleanKeyword", node, opts); -} - -function assertTSStringKeyword(node, opts = {}) { - assert("TSStringKeyword", node, opts); -} - -function assertTSSymbolKeyword(node, opts = {}) { - assert("TSSymbolKeyword", node, opts); -} - -function assertTSVoidKeyword(node, opts = {}) { - assert("TSVoidKeyword", node, opts); -} - -function assertTSUndefinedKeyword(node, opts = {}) { - assert("TSUndefinedKeyword", node, opts); -} - -function assertTSNullKeyword(node, opts = {}) { - assert("TSNullKeyword", node, opts); -} - -function assertTSNeverKeyword(node, opts = {}) { - assert("TSNeverKeyword", node, opts); -} - -function assertTSThisType(node, opts = {}) { - assert("TSThisType", node, opts); -} - -function assertTSFunctionType(node, opts = {}) { - assert("TSFunctionType", node, opts); -} - -function assertTSConstructorType(node, opts = {}) { - assert("TSConstructorType", node, opts); -} - -function assertTSTypeReference(node, opts = {}) { - assert("TSTypeReference", node, opts); -} - -function assertTSTypePredicate(node, opts = {}) { - assert("TSTypePredicate", node, opts); -} - -function assertTSTypeQuery(node, opts = {}) { - assert("TSTypeQuery", node, opts); -} - -function assertTSTypeLiteral(node, opts = {}) { - assert("TSTypeLiteral", node, opts); -} - -function assertTSArrayType(node, opts = {}) { - assert("TSArrayType", node, opts); -} - -function assertTSTupleType(node, opts = {}) { - assert("TSTupleType", node, opts); -} - -function assertTSOptionalType(node, opts = {}) { - assert("TSOptionalType", node, opts); -} - -function assertTSRestType(node, opts = {}) { - assert("TSRestType", node, opts); -} - -function assertTSUnionType(node, opts = {}) { - assert("TSUnionType", node, opts); -} - -function assertTSIntersectionType(node, opts = {}) { - assert("TSIntersectionType", node, opts); -} - -function assertTSConditionalType(node, opts = {}) { - assert("TSConditionalType", node, opts); -} - -function assertTSInferType(node, opts = {}) { - assert("TSInferType", node, opts); -} - -function assertTSParenthesizedType(node, opts = {}) { - assert("TSParenthesizedType", node, opts); -} - -function assertTSTypeOperator(node, opts = {}) { - assert("TSTypeOperator", node, opts); -} - -function assertTSIndexedAccessType(node, opts = {}) { - assert("TSIndexedAccessType", node, opts); -} - -function assertTSMappedType(node, opts = {}) { - assert("TSMappedType", node, opts); -} - -function assertTSLiteralType(node, opts = {}) { - assert("TSLiteralType", node, opts); -} - -function assertTSExpressionWithTypeArguments(node, opts = {}) { - assert("TSExpressionWithTypeArguments", node, opts); -} - -function assertTSInterfaceDeclaration(node, opts = {}) { - assert("TSInterfaceDeclaration", node, opts); -} - -function assertTSInterfaceBody(node, opts = {}) { - assert("TSInterfaceBody", node, opts); -} - -function assertTSTypeAliasDeclaration(node, opts = {}) { - assert("TSTypeAliasDeclaration", node, opts); -} - -function assertTSAsExpression(node, opts = {}) { - assert("TSAsExpression", node, opts); -} - -function assertTSTypeAssertion(node, opts = {}) { - assert("TSTypeAssertion", node, opts); -} - -function assertTSEnumDeclaration(node, opts = {}) { - assert("TSEnumDeclaration", node, opts); -} - -function assertTSEnumMember(node, opts = {}) { - assert("TSEnumMember", node, opts); -} - -function assertTSModuleDeclaration(node, opts = {}) { - assert("TSModuleDeclaration", node, opts); -} - -function assertTSModuleBlock(node, opts = {}) { - assert("TSModuleBlock", node, opts); -} - -function assertTSImportType(node, opts = {}) { - assert("TSImportType", node, opts); -} - -function assertTSImportEqualsDeclaration(node, opts = {}) { - assert("TSImportEqualsDeclaration", node, opts); -} - -function assertTSExternalModuleReference(node, opts = {}) { - assert("TSExternalModuleReference", node, opts); -} - -function assertTSNonNullExpression(node, opts = {}) { - assert("TSNonNullExpression", node, opts); -} - -function assertTSExportAssignment(node, opts = {}) { - assert("TSExportAssignment", node, opts); -} - -function assertTSNamespaceExportDeclaration(node, opts = {}) { - assert("TSNamespaceExportDeclaration", node, opts); -} - -function assertTSTypeAnnotation(node, opts = {}) { - assert("TSTypeAnnotation", node, opts); -} - -function assertTSTypeParameterInstantiation(node, opts = {}) { - assert("TSTypeParameterInstantiation", node, opts); -} - -function assertTSTypeParameterDeclaration(node, opts = {}) { - assert("TSTypeParameterDeclaration", node, opts); -} - -function assertTSTypeParameter(node, opts = {}) { - assert("TSTypeParameter", node, opts); -} - -function assertExpression(node, opts = {}) { - assert("Expression", node, opts); -} - -function assertBinary(node, opts = {}) { - assert("Binary", node, opts); -} - -function assertScopable(node, opts = {}) { - assert("Scopable", node, opts); -} - -function assertBlockParent(node, opts = {}) { - assert("BlockParent", node, opts); -} - -function assertBlock(node, opts = {}) { - assert("Block", node, opts); -} - -function assertStatement(node, opts = {}) { - assert("Statement", node, opts); -} - -function assertTerminatorless(node, opts = {}) { - assert("Terminatorless", node, opts); -} - -function assertCompletionStatement(node, opts = {}) { - assert("CompletionStatement", node, opts); -} - -function assertConditional(node, opts = {}) { - assert("Conditional", node, opts); -} - -function assertLoop(node, opts = {}) { - assert("Loop", node, opts); -} - -function assertWhile(node, opts = {}) { - assert("While", node, opts); -} - -function assertExpressionWrapper(node, opts = {}) { - assert("ExpressionWrapper", node, opts); -} - -function assertFor(node, opts = {}) { - assert("For", node, opts); -} - -function assertForXStatement(node, opts = {}) { - assert("ForXStatement", node, opts); -} - -function assertFunction(node, opts = {}) { - assert("Function", node, opts); -} - -function assertFunctionParent(node, opts = {}) { - assert("FunctionParent", node, opts); -} - -function assertPureish(node, opts = {}) { - assert("Pureish", node, opts); -} - -function assertDeclaration(node, opts = {}) { - assert("Declaration", node, opts); -} - -function assertPatternLike(node, opts = {}) { - assert("PatternLike", node, opts); -} - -function assertLVal(node, opts = {}) { - assert("LVal", node, opts); -} - -function assertTSEntityName(node, opts = {}) { - assert("TSEntityName", node, opts); -} - -function assertLiteral(node, opts = {}) { - assert("Literal", node, opts); -} - -function assertImmutable(node, opts = {}) { - assert("Immutable", node, opts); -} - -function assertUserWhitespacable(node, opts = {}) { - assert("UserWhitespacable", node, opts); -} - -function assertMethod(node, opts = {}) { - assert("Method", node, opts); -} - -function assertObjectMember(node, opts = {}) { - assert("ObjectMember", node, opts); -} - -function assertProperty(node, opts = {}) { - assert("Property", node, opts); -} - -function assertUnaryLike(node, opts = {}) { - assert("UnaryLike", node, opts); -} - -function assertPattern(node, opts = {}) { - assert("Pattern", node, opts); -} - -function assertClass(node, opts = {}) { - assert("Class", node, opts); -} - -function assertModuleDeclaration(node, opts = {}) { - assert("ModuleDeclaration", node, opts); -} - -function assertExportDeclaration(node, opts = {}) { - assert("ExportDeclaration", node, opts); -} - -function assertModuleSpecifier(node, opts = {}) { - assert("ModuleSpecifier", node, opts); -} - -function assertFlow(node, opts = {}) { - assert("Flow", node, opts); -} - -function assertFlowType(node, opts = {}) { - assert("FlowType", node, opts); -} - -function assertFlowBaseAnnotation(node, opts = {}) { - assert("FlowBaseAnnotation", node, opts); -} - -function assertFlowDeclaration(node, opts = {}) { - assert("FlowDeclaration", node, opts); -} - -function assertFlowPredicate(node, opts = {}) { - assert("FlowPredicate", node, opts); -} - -function assertJSX(node, opts = {}) { - assert("JSX", node, opts); -} - -function assertPrivate(node, opts = {}) { - assert("Private", node, opts); -} - -function assertTSTypeElement(node, opts = {}) { - assert("TSTypeElement", node, opts); -} - -function assertTSType(node, opts = {}) { - assert("TSType", node, opts); -} - -function assertNumberLiteral(node, opts) { - console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); - assert("NumberLiteral", node, opts); -} - -function assertRegexLiteral(node, opts) { - console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); - assert("RegexLiteral", node, opts); -} - -function assertRestProperty(node, opts) { - console.trace("The node type RestProperty has been renamed to RestElement"); - assert("RestProperty", node, opts); -} - -function assertSpreadProperty(node, opts) { - console.trace("The node type SpreadProperty has been renamed to SpreadElement"); - assert("SpreadProperty", node, opts); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/builders/builder.js b/node_modules/@babel/types/lib/builders/builder.js deleted file mode 100644 index b42fac2f..00000000 --- a/node_modules/@babel/types/lib/builders/builder.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = builder; - -function _clone() { - const data = _interopRequireDefault(require("lodash/clone")); - - _clone = function () { - return data; - }; - - return data; -} - -var _definitions = require("../definitions"); - -var _validate = _interopRequireDefault(require("../validators/validate")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function builder(type, ...args) { - const keys = _definitions.BUILDER_KEYS[type]; - const countArgs = args.length; - - if (countArgs > keys.length) { - throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys.length}`); - } - - const node = { - type - }; - let i = 0; - keys.forEach(key => { - const field = _definitions.NODE_FIELDS[type][key]; - let arg; - if (i < countArgs) arg = args[i]; - if (arg === undefined) arg = (0, _clone().default)(field.default); - node[key] = arg; - i++; - }); - - for (const key of Object.keys(node)) { - (0, _validate.default)(node, key, node[key]); - } - - return node; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js b/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js deleted file mode 100644 index 4724335f..00000000 --- a/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = createTypeAnnotationBasedOnTypeof; - -var _generated = require("../generated"); - -function createTypeAnnotationBasedOnTypeof(type) { - if (type === "string") { - return (0, _generated.stringTypeAnnotation)(); - } else if (type === "number") { - return (0, _generated.numberTypeAnnotation)(); - } else if (type === "undefined") { - return (0, _generated.voidTypeAnnotation)(); - } else if (type === "boolean") { - return (0, _generated.booleanTypeAnnotation)(); - } else if (type === "function") { - return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function")); - } else if (type === "object") { - return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object")); - } else if (type === "symbol") { - return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol")); - } else { - throw new Error("Invalid typeof value"); - } -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js b/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js deleted file mode 100644 index df76b010..00000000 --- a/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = createUnionTypeAnnotation; - -var _generated = require("../generated"); - -var _removeTypeDuplicates = _interopRequireDefault(require("../../modifications/flow/removeTypeDuplicates")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function createUnionTypeAnnotation(types) { - const flattened = (0, _removeTypeDuplicates.default)(types); - - if (flattened.length === 1) { - return flattened[0]; - } else { - return (0, _generated.unionTypeAnnotation)(flattened); - } -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/builders/generated/index.js b/node_modules/@babel/types/lib/builders/generated/index.js deleted file mode 100644 index 06d0127d..00000000 --- a/node_modules/@babel/types/lib/builders/generated/index.js +++ /dev/null @@ -1,1148 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.arrayExpression = exports.ArrayExpression = ArrayExpression; -exports.assignmentExpression = exports.AssignmentExpression = AssignmentExpression; -exports.binaryExpression = exports.BinaryExpression = BinaryExpression; -exports.interpreterDirective = exports.InterpreterDirective = InterpreterDirective; -exports.directive = exports.Directive = Directive; -exports.directiveLiteral = exports.DirectiveLiteral = DirectiveLiteral; -exports.blockStatement = exports.BlockStatement = BlockStatement; -exports.breakStatement = exports.BreakStatement = BreakStatement; -exports.callExpression = exports.CallExpression = CallExpression; -exports.catchClause = exports.CatchClause = CatchClause; -exports.conditionalExpression = exports.ConditionalExpression = ConditionalExpression; -exports.continueStatement = exports.ContinueStatement = ContinueStatement; -exports.debuggerStatement = exports.DebuggerStatement = DebuggerStatement; -exports.doWhileStatement = exports.DoWhileStatement = DoWhileStatement; -exports.emptyStatement = exports.EmptyStatement = EmptyStatement; -exports.expressionStatement = exports.ExpressionStatement = ExpressionStatement; -exports.file = exports.File = File; -exports.forInStatement = exports.ForInStatement = ForInStatement; -exports.forStatement = exports.ForStatement = ForStatement; -exports.functionDeclaration = exports.FunctionDeclaration = FunctionDeclaration; -exports.functionExpression = exports.FunctionExpression = FunctionExpression; -exports.identifier = exports.Identifier = Identifier; -exports.ifStatement = exports.IfStatement = IfStatement; -exports.labeledStatement = exports.LabeledStatement = LabeledStatement; -exports.stringLiteral = exports.StringLiteral = StringLiteral; -exports.numericLiteral = exports.NumericLiteral = NumericLiteral; -exports.nullLiteral = exports.NullLiteral = NullLiteral; -exports.booleanLiteral = exports.BooleanLiteral = BooleanLiteral; -exports.regExpLiteral = exports.RegExpLiteral = RegExpLiteral; -exports.logicalExpression = exports.LogicalExpression = LogicalExpression; -exports.memberExpression = exports.MemberExpression = MemberExpression; -exports.newExpression = exports.NewExpression = NewExpression; -exports.program = exports.Program = Program; -exports.objectExpression = exports.ObjectExpression = ObjectExpression; -exports.objectMethod = exports.ObjectMethod = ObjectMethod; -exports.objectProperty = exports.ObjectProperty = ObjectProperty; -exports.restElement = exports.RestElement = RestElement; -exports.returnStatement = exports.ReturnStatement = ReturnStatement; -exports.sequenceExpression = exports.SequenceExpression = SequenceExpression; -exports.parenthesizedExpression = exports.ParenthesizedExpression = ParenthesizedExpression; -exports.switchCase = exports.SwitchCase = SwitchCase; -exports.switchStatement = exports.SwitchStatement = SwitchStatement; -exports.thisExpression = exports.ThisExpression = ThisExpression; -exports.throwStatement = exports.ThrowStatement = ThrowStatement; -exports.tryStatement = exports.TryStatement = TryStatement; -exports.unaryExpression = exports.UnaryExpression = UnaryExpression; -exports.updateExpression = exports.UpdateExpression = UpdateExpression; -exports.variableDeclaration = exports.VariableDeclaration = VariableDeclaration; -exports.variableDeclarator = exports.VariableDeclarator = VariableDeclarator; -exports.whileStatement = exports.WhileStatement = WhileStatement; -exports.withStatement = exports.WithStatement = WithStatement; -exports.assignmentPattern = exports.AssignmentPattern = AssignmentPattern; -exports.arrayPattern = exports.ArrayPattern = ArrayPattern; -exports.arrowFunctionExpression = exports.ArrowFunctionExpression = ArrowFunctionExpression; -exports.classBody = exports.ClassBody = ClassBody; -exports.classDeclaration = exports.ClassDeclaration = ClassDeclaration; -exports.classExpression = exports.ClassExpression = ClassExpression; -exports.exportAllDeclaration = exports.ExportAllDeclaration = ExportAllDeclaration; -exports.exportDefaultDeclaration = exports.ExportDefaultDeclaration = ExportDefaultDeclaration; -exports.exportNamedDeclaration = exports.ExportNamedDeclaration = ExportNamedDeclaration; -exports.exportSpecifier = exports.ExportSpecifier = ExportSpecifier; -exports.forOfStatement = exports.ForOfStatement = ForOfStatement; -exports.importDeclaration = exports.ImportDeclaration = ImportDeclaration; -exports.importDefaultSpecifier = exports.ImportDefaultSpecifier = ImportDefaultSpecifier; -exports.importNamespaceSpecifier = exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; -exports.importSpecifier = exports.ImportSpecifier = ImportSpecifier; -exports.metaProperty = exports.MetaProperty = MetaProperty; -exports.classMethod = exports.ClassMethod = ClassMethod; -exports.objectPattern = exports.ObjectPattern = ObjectPattern; -exports.spreadElement = exports.SpreadElement = SpreadElement; -exports.super = exports.Super = Super; -exports.taggedTemplateExpression = exports.TaggedTemplateExpression = TaggedTemplateExpression; -exports.templateElement = exports.TemplateElement = TemplateElement; -exports.templateLiteral = exports.TemplateLiteral = TemplateLiteral; -exports.yieldExpression = exports.YieldExpression = YieldExpression; -exports.anyTypeAnnotation = exports.AnyTypeAnnotation = AnyTypeAnnotation; -exports.arrayTypeAnnotation = exports.ArrayTypeAnnotation = ArrayTypeAnnotation; -exports.booleanTypeAnnotation = exports.BooleanTypeAnnotation = BooleanTypeAnnotation; -exports.booleanLiteralTypeAnnotation = exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation; -exports.nullLiteralTypeAnnotation = exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation; -exports.classImplements = exports.ClassImplements = ClassImplements; -exports.declareClass = exports.DeclareClass = DeclareClass; -exports.declareFunction = exports.DeclareFunction = DeclareFunction; -exports.declareInterface = exports.DeclareInterface = DeclareInterface; -exports.declareModule = exports.DeclareModule = DeclareModule; -exports.declareModuleExports = exports.DeclareModuleExports = DeclareModuleExports; -exports.declareTypeAlias = exports.DeclareTypeAlias = DeclareTypeAlias; -exports.declareOpaqueType = exports.DeclareOpaqueType = DeclareOpaqueType; -exports.declareVariable = exports.DeclareVariable = DeclareVariable; -exports.declareExportDeclaration = exports.DeclareExportDeclaration = DeclareExportDeclaration; -exports.declareExportAllDeclaration = exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration; -exports.declaredPredicate = exports.DeclaredPredicate = DeclaredPredicate; -exports.existsTypeAnnotation = exports.ExistsTypeAnnotation = ExistsTypeAnnotation; -exports.functionTypeAnnotation = exports.FunctionTypeAnnotation = FunctionTypeAnnotation; -exports.functionTypeParam = exports.FunctionTypeParam = FunctionTypeParam; -exports.genericTypeAnnotation = exports.GenericTypeAnnotation = GenericTypeAnnotation; -exports.inferredPredicate = exports.InferredPredicate = InferredPredicate; -exports.interfaceExtends = exports.InterfaceExtends = InterfaceExtends; -exports.interfaceDeclaration = exports.InterfaceDeclaration = InterfaceDeclaration; -exports.interfaceTypeAnnotation = exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation; -exports.intersectionTypeAnnotation = exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation; -exports.mixedTypeAnnotation = exports.MixedTypeAnnotation = MixedTypeAnnotation; -exports.emptyTypeAnnotation = exports.EmptyTypeAnnotation = EmptyTypeAnnotation; -exports.nullableTypeAnnotation = exports.NullableTypeAnnotation = NullableTypeAnnotation; -exports.numberLiteralTypeAnnotation = exports.NumberLiteralTypeAnnotation = NumberLiteralTypeAnnotation; -exports.numberTypeAnnotation = exports.NumberTypeAnnotation = NumberTypeAnnotation; -exports.objectTypeAnnotation = exports.ObjectTypeAnnotation = ObjectTypeAnnotation; -exports.objectTypeInternalSlot = exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot; -exports.objectTypeCallProperty = exports.ObjectTypeCallProperty = ObjectTypeCallProperty; -exports.objectTypeIndexer = exports.ObjectTypeIndexer = ObjectTypeIndexer; -exports.objectTypeProperty = exports.ObjectTypeProperty = ObjectTypeProperty; -exports.objectTypeSpreadProperty = exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty; -exports.opaqueType = exports.OpaqueType = OpaqueType; -exports.qualifiedTypeIdentifier = exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier; -exports.stringLiteralTypeAnnotation = exports.StringLiteralTypeAnnotation = StringLiteralTypeAnnotation; -exports.stringTypeAnnotation = exports.StringTypeAnnotation = StringTypeAnnotation; -exports.thisTypeAnnotation = exports.ThisTypeAnnotation = ThisTypeAnnotation; -exports.tupleTypeAnnotation = exports.TupleTypeAnnotation = TupleTypeAnnotation; -exports.typeofTypeAnnotation = exports.TypeofTypeAnnotation = TypeofTypeAnnotation; -exports.typeAlias = exports.TypeAlias = TypeAlias; -exports.typeAnnotation = exports.TypeAnnotation = TypeAnnotation; -exports.typeCastExpression = exports.TypeCastExpression = TypeCastExpression; -exports.typeParameter = exports.TypeParameter = TypeParameter; -exports.typeParameterDeclaration = exports.TypeParameterDeclaration = TypeParameterDeclaration; -exports.typeParameterInstantiation = exports.TypeParameterInstantiation = TypeParameterInstantiation; -exports.unionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation; -exports.variance = exports.Variance = Variance; -exports.voidTypeAnnotation = exports.VoidTypeAnnotation = VoidTypeAnnotation; -exports.jSXAttribute = exports.jsxAttribute = exports.JSXAttribute = JSXAttribute; -exports.jSXClosingElement = exports.jsxClosingElement = exports.JSXClosingElement = JSXClosingElement; -exports.jSXElement = exports.jsxElement = exports.JSXElement = JSXElement; -exports.jSXEmptyExpression = exports.jsxEmptyExpression = exports.JSXEmptyExpression = JSXEmptyExpression; -exports.jSXExpressionContainer = exports.jsxExpressionContainer = exports.JSXExpressionContainer = JSXExpressionContainer; -exports.jSXSpreadChild = exports.jsxSpreadChild = exports.JSXSpreadChild = JSXSpreadChild; -exports.jSXIdentifier = exports.jsxIdentifier = exports.JSXIdentifier = JSXIdentifier; -exports.jSXMemberExpression = exports.jsxMemberExpression = exports.JSXMemberExpression = JSXMemberExpression; -exports.jSXNamespacedName = exports.jsxNamespacedName = exports.JSXNamespacedName = JSXNamespacedName; -exports.jSXOpeningElement = exports.jsxOpeningElement = exports.JSXOpeningElement = JSXOpeningElement; -exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = exports.JSXSpreadAttribute = JSXSpreadAttribute; -exports.jSXText = exports.jsxText = exports.JSXText = JSXText; -exports.jSXFragment = exports.jsxFragment = exports.JSXFragment = JSXFragment; -exports.jSXOpeningFragment = exports.jsxOpeningFragment = exports.JSXOpeningFragment = JSXOpeningFragment; -exports.jSXClosingFragment = exports.jsxClosingFragment = exports.JSXClosingFragment = JSXClosingFragment; -exports.noop = exports.Noop = Noop; -exports.placeholder = exports.Placeholder = Placeholder; -exports.argumentPlaceholder = exports.ArgumentPlaceholder = ArgumentPlaceholder; -exports.awaitExpression = exports.AwaitExpression = AwaitExpression; -exports.bindExpression = exports.BindExpression = BindExpression; -exports.classProperty = exports.ClassProperty = ClassProperty; -exports.optionalMemberExpression = exports.OptionalMemberExpression = OptionalMemberExpression; -exports.pipelineTopicExpression = exports.PipelineTopicExpression = PipelineTopicExpression; -exports.pipelineBareFunction = exports.PipelineBareFunction = PipelineBareFunction; -exports.pipelinePrimaryTopicReference = exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference; -exports.optionalCallExpression = exports.OptionalCallExpression = OptionalCallExpression; -exports.classPrivateProperty = exports.ClassPrivateProperty = ClassPrivateProperty; -exports.classPrivateMethod = exports.ClassPrivateMethod = ClassPrivateMethod; -exports.import = exports.Import = Import; -exports.decorator = exports.Decorator = Decorator; -exports.doExpression = exports.DoExpression = DoExpression; -exports.exportDefaultSpecifier = exports.ExportDefaultSpecifier = ExportDefaultSpecifier; -exports.exportNamespaceSpecifier = exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier; -exports.privateName = exports.PrivateName = PrivateName; -exports.bigIntLiteral = exports.BigIntLiteral = BigIntLiteral; -exports.tSParameterProperty = exports.tsParameterProperty = exports.TSParameterProperty = TSParameterProperty; -exports.tSDeclareFunction = exports.tsDeclareFunction = exports.TSDeclareFunction = TSDeclareFunction; -exports.tSDeclareMethod = exports.tsDeclareMethod = exports.TSDeclareMethod = TSDeclareMethod; -exports.tSQualifiedName = exports.tsQualifiedName = exports.TSQualifiedName = TSQualifiedName; -exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration; -exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration; -exports.tSPropertySignature = exports.tsPropertySignature = exports.TSPropertySignature = TSPropertySignature; -exports.tSMethodSignature = exports.tsMethodSignature = exports.TSMethodSignature = TSMethodSignature; -exports.tSIndexSignature = exports.tsIndexSignature = exports.TSIndexSignature = TSIndexSignature; -exports.tSAnyKeyword = exports.tsAnyKeyword = exports.TSAnyKeyword = TSAnyKeyword; -exports.tSUnknownKeyword = exports.tsUnknownKeyword = exports.TSUnknownKeyword = TSUnknownKeyword; -exports.tSNumberKeyword = exports.tsNumberKeyword = exports.TSNumberKeyword = TSNumberKeyword; -exports.tSObjectKeyword = exports.tsObjectKeyword = exports.TSObjectKeyword = TSObjectKeyword; -exports.tSBooleanKeyword = exports.tsBooleanKeyword = exports.TSBooleanKeyword = TSBooleanKeyword; -exports.tSStringKeyword = exports.tsStringKeyword = exports.TSStringKeyword = TSStringKeyword; -exports.tSSymbolKeyword = exports.tsSymbolKeyword = exports.TSSymbolKeyword = TSSymbolKeyword; -exports.tSVoidKeyword = exports.tsVoidKeyword = exports.TSVoidKeyword = TSVoidKeyword; -exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = exports.TSUndefinedKeyword = TSUndefinedKeyword; -exports.tSNullKeyword = exports.tsNullKeyword = exports.TSNullKeyword = TSNullKeyword; -exports.tSNeverKeyword = exports.tsNeverKeyword = exports.TSNeverKeyword = TSNeverKeyword; -exports.tSThisType = exports.tsThisType = exports.TSThisType = TSThisType; -exports.tSFunctionType = exports.tsFunctionType = exports.TSFunctionType = TSFunctionType; -exports.tSConstructorType = exports.tsConstructorType = exports.TSConstructorType = TSConstructorType; -exports.tSTypeReference = exports.tsTypeReference = exports.TSTypeReference = TSTypeReference; -exports.tSTypePredicate = exports.tsTypePredicate = exports.TSTypePredicate = TSTypePredicate; -exports.tSTypeQuery = exports.tsTypeQuery = exports.TSTypeQuery = TSTypeQuery; -exports.tSTypeLiteral = exports.tsTypeLiteral = exports.TSTypeLiteral = TSTypeLiteral; -exports.tSArrayType = exports.tsArrayType = exports.TSArrayType = TSArrayType; -exports.tSTupleType = exports.tsTupleType = exports.TSTupleType = TSTupleType; -exports.tSOptionalType = exports.tsOptionalType = exports.TSOptionalType = TSOptionalType; -exports.tSRestType = exports.tsRestType = exports.TSRestType = TSRestType; -exports.tSUnionType = exports.tsUnionType = exports.TSUnionType = TSUnionType; -exports.tSIntersectionType = exports.tsIntersectionType = exports.TSIntersectionType = TSIntersectionType; -exports.tSConditionalType = exports.tsConditionalType = exports.TSConditionalType = TSConditionalType; -exports.tSInferType = exports.tsInferType = exports.TSInferType = TSInferType; -exports.tSParenthesizedType = exports.tsParenthesizedType = exports.TSParenthesizedType = TSParenthesizedType; -exports.tSTypeOperator = exports.tsTypeOperator = exports.TSTypeOperator = TSTypeOperator; -exports.tSIndexedAccessType = exports.tsIndexedAccessType = exports.TSIndexedAccessType = TSIndexedAccessType; -exports.tSMappedType = exports.tsMappedType = exports.TSMappedType = TSMappedType; -exports.tSLiteralType = exports.tsLiteralType = exports.TSLiteralType = TSLiteralType; -exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments; -exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = exports.TSInterfaceDeclaration = TSInterfaceDeclaration; -exports.tSInterfaceBody = exports.tsInterfaceBody = exports.TSInterfaceBody = TSInterfaceBody; -exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration; -exports.tSAsExpression = exports.tsAsExpression = exports.TSAsExpression = TSAsExpression; -exports.tSTypeAssertion = exports.tsTypeAssertion = exports.TSTypeAssertion = TSTypeAssertion; -exports.tSEnumDeclaration = exports.tsEnumDeclaration = exports.TSEnumDeclaration = TSEnumDeclaration; -exports.tSEnumMember = exports.tsEnumMember = exports.TSEnumMember = TSEnumMember; -exports.tSModuleDeclaration = exports.tsModuleDeclaration = exports.TSModuleDeclaration = TSModuleDeclaration; -exports.tSModuleBlock = exports.tsModuleBlock = exports.TSModuleBlock = TSModuleBlock; -exports.tSImportType = exports.tsImportType = exports.TSImportType = TSImportType; -exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration; -exports.tSExternalModuleReference = exports.tsExternalModuleReference = exports.TSExternalModuleReference = TSExternalModuleReference; -exports.tSNonNullExpression = exports.tsNonNullExpression = exports.TSNonNullExpression = TSNonNullExpression; -exports.tSExportAssignment = exports.tsExportAssignment = exports.TSExportAssignment = TSExportAssignment; -exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration; -exports.tSTypeAnnotation = exports.tsTypeAnnotation = exports.TSTypeAnnotation = TSTypeAnnotation; -exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation; -exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = exports.TSTypeParameterDeclaration = TSTypeParameterDeclaration; -exports.tSTypeParameter = exports.tsTypeParameter = exports.TSTypeParameter = TSTypeParameter; -exports.numberLiteral = exports.NumberLiteral = NumberLiteral; -exports.regexLiteral = exports.RegexLiteral = RegexLiteral; -exports.restProperty = exports.RestProperty = RestProperty; -exports.spreadProperty = exports.SpreadProperty = SpreadProperty; - -var _builder = _interopRequireDefault(require("../builder")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function ArrayExpression(...args) { - return (0, _builder.default)("ArrayExpression", ...args); -} - -function AssignmentExpression(...args) { - return (0, _builder.default)("AssignmentExpression", ...args); -} - -function BinaryExpression(...args) { - return (0, _builder.default)("BinaryExpression", ...args); -} - -function InterpreterDirective(...args) { - return (0, _builder.default)("InterpreterDirective", ...args); -} - -function Directive(...args) { - return (0, _builder.default)("Directive", ...args); -} - -function DirectiveLiteral(...args) { - return (0, _builder.default)("DirectiveLiteral", ...args); -} - -function BlockStatement(...args) { - return (0, _builder.default)("BlockStatement", ...args); -} - -function BreakStatement(...args) { - return (0, _builder.default)("BreakStatement", ...args); -} - -function CallExpression(...args) { - return (0, _builder.default)("CallExpression", ...args); -} - -function CatchClause(...args) { - return (0, _builder.default)("CatchClause", ...args); -} - -function ConditionalExpression(...args) { - return (0, _builder.default)("ConditionalExpression", ...args); -} - -function ContinueStatement(...args) { - return (0, _builder.default)("ContinueStatement", ...args); -} - -function DebuggerStatement(...args) { - return (0, _builder.default)("DebuggerStatement", ...args); -} - -function DoWhileStatement(...args) { - return (0, _builder.default)("DoWhileStatement", ...args); -} - -function EmptyStatement(...args) { - return (0, _builder.default)("EmptyStatement", ...args); -} - -function ExpressionStatement(...args) { - return (0, _builder.default)("ExpressionStatement", ...args); -} - -function File(...args) { - return (0, _builder.default)("File", ...args); -} - -function ForInStatement(...args) { - return (0, _builder.default)("ForInStatement", ...args); -} - -function ForStatement(...args) { - return (0, _builder.default)("ForStatement", ...args); -} - -function FunctionDeclaration(...args) { - return (0, _builder.default)("FunctionDeclaration", ...args); -} - -function FunctionExpression(...args) { - return (0, _builder.default)("FunctionExpression", ...args); -} - -function Identifier(...args) { - return (0, _builder.default)("Identifier", ...args); -} - -function IfStatement(...args) { - return (0, _builder.default)("IfStatement", ...args); -} - -function LabeledStatement(...args) { - return (0, _builder.default)("LabeledStatement", ...args); -} - -function StringLiteral(...args) { - return (0, _builder.default)("StringLiteral", ...args); -} - -function NumericLiteral(...args) { - return (0, _builder.default)("NumericLiteral", ...args); -} - -function NullLiteral(...args) { - return (0, _builder.default)("NullLiteral", ...args); -} - -function BooleanLiteral(...args) { - return (0, _builder.default)("BooleanLiteral", ...args); -} - -function RegExpLiteral(...args) { - return (0, _builder.default)("RegExpLiteral", ...args); -} - -function LogicalExpression(...args) { - return (0, _builder.default)("LogicalExpression", ...args); -} - -function MemberExpression(...args) { - return (0, _builder.default)("MemberExpression", ...args); -} - -function NewExpression(...args) { - return (0, _builder.default)("NewExpression", ...args); -} - -function Program(...args) { - return (0, _builder.default)("Program", ...args); -} - -function ObjectExpression(...args) { - return (0, _builder.default)("ObjectExpression", ...args); -} - -function ObjectMethod(...args) { - return (0, _builder.default)("ObjectMethod", ...args); -} - -function ObjectProperty(...args) { - return (0, _builder.default)("ObjectProperty", ...args); -} - -function RestElement(...args) { - return (0, _builder.default)("RestElement", ...args); -} - -function ReturnStatement(...args) { - return (0, _builder.default)("ReturnStatement", ...args); -} - -function SequenceExpression(...args) { - return (0, _builder.default)("SequenceExpression", ...args); -} - -function ParenthesizedExpression(...args) { - return (0, _builder.default)("ParenthesizedExpression", ...args); -} - -function SwitchCase(...args) { - return (0, _builder.default)("SwitchCase", ...args); -} - -function SwitchStatement(...args) { - return (0, _builder.default)("SwitchStatement", ...args); -} - -function ThisExpression(...args) { - return (0, _builder.default)("ThisExpression", ...args); -} - -function ThrowStatement(...args) { - return (0, _builder.default)("ThrowStatement", ...args); -} - -function TryStatement(...args) { - return (0, _builder.default)("TryStatement", ...args); -} - -function UnaryExpression(...args) { - return (0, _builder.default)("UnaryExpression", ...args); -} - -function UpdateExpression(...args) { - return (0, _builder.default)("UpdateExpression", ...args); -} - -function VariableDeclaration(...args) { - return (0, _builder.default)("VariableDeclaration", ...args); -} - -function VariableDeclarator(...args) { - return (0, _builder.default)("VariableDeclarator", ...args); -} - -function WhileStatement(...args) { - return (0, _builder.default)("WhileStatement", ...args); -} - -function WithStatement(...args) { - return (0, _builder.default)("WithStatement", ...args); -} - -function AssignmentPattern(...args) { - return (0, _builder.default)("AssignmentPattern", ...args); -} - -function ArrayPattern(...args) { - return (0, _builder.default)("ArrayPattern", ...args); -} - -function ArrowFunctionExpression(...args) { - return (0, _builder.default)("ArrowFunctionExpression", ...args); -} - -function ClassBody(...args) { - return (0, _builder.default)("ClassBody", ...args); -} - -function ClassDeclaration(...args) { - return (0, _builder.default)("ClassDeclaration", ...args); -} - -function ClassExpression(...args) { - return (0, _builder.default)("ClassExpression", ...args); -} - -function ExportAllDeclaration(...args) { - return (0, _builder.default)("ExportAllDeclaration", ...args); -} - -function ExportDefaultDeclaration(...args) { - return (0, _builder.default)("ExportDefaultDeclaration", ...args); -} - -function ExportNamedDeclaration(...args) { - return (0, _builder.default)("ExportNamedDeclaration", ...args); -} - -function ExportSpecifier(...args) { - return (0, _builder.default)("ExportSpecifier", ...args); -} - -function ForOfStatement(...args) { - return (0, _builder.default)("ForOfStatement", ...args); -} - -function ImportDeclaration(...args) { - return (0, _builder.default)("ImportDeclaration", ...args); -} - -function ImportDefaultSpecifier(...args) { - return (0, _builder.default)("ImportDefaultSpecifier", ...args); -} - -function ImportNamespaceSpecifier(...args) { - return (0, _builder.default)("ImportNamespaceSpecifier", ...args); -} - -function ImportSpecifier(...args) { - return (0, _builder.default)("ImportSpecifier", ...args); -} - -function MetaProperty(...args) { - return (0, _builder.default)("MetaProperty", ...args); -} - -function ClassMethod(...args) { - return (0, _builder.default)("ClassMethod", ...args); -} - -function ObjectPattern(...args) { - return (0, _builder.default)("ObjectPattern", ...args); -} - -function SpreadElement(...args) { - return (0, _builder.default)("SpreadElement", ...args); -} - -function Super(...args) { - return (0, _builder.default)("Super", ...args); -} - -function TaggedTemplateExpression(...args) { - return (0, _builder.default)("TaggedTemplateExpression", ...args); -} - -function TemplateElement(...args) { - return (0, _builder.default)("TemplateElement", ...args); -} - -function TemplateLiteral(...args) { - return (0, _builder.default)("TemplateLiteral", ...args); -} - -function YieldExpression(...args) { - return (0, _builder.default)("YieldExpression", ...args); -} - -function AnyTypeAnnotation(...args) { - return (0, _builder.default)("AnyTypeAnnotation", ...args); -} - -function ArrayTypeAnnotation(...args) { - return (0, _builder.default)("ArrayTypeAnnotation", ...args); -} - -function BooleanTypeAnnotation(...args) { - return (0, _builder.default)("BooleanTypeAnnotation", ...args); -} - -function BooleanLiteralTypeAnnotation(...args) { - return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...args); -} - -function NullLiteralTypeAnnotation(...args) { - return (0, _builder.default)("NullLiteralTypeAnnotation", ...args); -} - -function ClassImplements(...args) { - return (0, _builder.default)("ClassImplements", ...args); -} - -function DeclareClass(...args) { - return (0, _builder.default)("DeclareClass", ...args); -} - -function DeclareFunction(...args) { - return (0, _builder.default)("DeclareFunction", ...args); -} - -function DeclareInterface(...args) { - return (0, _builder.default)("DeclareInterface", ...args); -} - -function DeclareModule(...args) { - return (0, _builder.default)("DeclareModule", ...args); -} - -function DeclareModuleExports(...args) { - return (0, _builder.default)("DeclareModuleExports", ...args); -} - -function DeclareTypeAlias(...args) { - return (0, _builder.default)("DeclareTypeAlias", ...args); -} - -function DeclareOpaqueType(...args) { - return (0, _builder.default)("DeclareOpaqueType", ...args); -} - -function DeclareVariable(...args) { - return (0, _builder.default)("DeclareVariable", ...args); -} - -function DeclareExportDeclaration(...args) { - return (0, _builder.default)("DeclareExportDeclaration", ...args); -} - -function DeclareExportAllDeclaration(...args) { - return (0, _builder.default)("DeclareExportAllDeclaration", ...args); -} - -function DeclaredPredicate(...args) { - return (0, _builder.default)("DeclaredPredicate", ...args); -} - -function ExistsTypeAnnotation(...args) { - return (0, _builder.default)("ExistsTypeAnnotation", ...args); -} - -function FunctionTypeAnnotation(...args) { - return (0, _builder.default)("FunctionTypeAnnotation", ...args); -} - -function FunctionTypeParam(...args) { - return (0, _builder.default)("FunctionTypeParam", ...args); -} - -function GenericTypeAnnotation(...args) { - return (0, _builder.default)("GenericTypeAnnotation", ...args); -} - -function InferredPredicate(...args) { - return (0, _builder.default)("InferredPredicate", ...args); -} - -function InterfaceExtends(...args) { - return (0, _builder.default)("InterfaceExtends", ...args); -} - -function InterfaceDeclaration(...args) { - return (0, _builder.default)("InterfaceDeclaration", ...args); -} - -function InterfaceTypeAnnotation(...args) { - return (0, _builder.default)("InterfaceTypeAnnotation", ...args); -} - -function IntersectionTypeAnnotation(...args) { - return (0, _builder.default)("IntersectionTypeAnnotation", ...args); -} - -function MixedTypeAnnotation(...args) { - return (0, _builder.default)("MixedTypeAnnotation", ...args); -} - -function EmptyTypeAnnotation(...args) { - return (0, _builder.default)("EmptyTypeAnnotation", ...args); -} - -function NullableTypeAnnotation(...args) { - return (0, _builder.default)("NullableTypeAnnotation", ...args); -} - -function NumberLiteralTypeAnnotation(...args) { - return (0, _builder.default)("NumberLiteralTypeAnnotation", ...args); -} - -function NumberTypeAnnotation(...args) { - return (0, _builder.default)("NumberTypeAnnotation", ...args); -} - -function ObjectTypeAnnotation(...args) { - return (0, _builder.default)("ObjectTypeAnnotation", ...args); -} - -function ObjectTypeInternalSlot(...args) { - return (0, _builder.default)("ObjectTypeInternalSlot", ...args); -} - -function ObjectTypeCallProperty(...args) { - return (0, _builder.default)("ObjectTypeCallProperty", ...args); -} - -function ObjectTypeIndexer(...args) { - return (0, _builder.default)("ObjectTypeIndexer", ...args); -} - -function ObjectTypeProperty(...args) { - return (0, _builder.default)("ObjectTypeProperty", ...args); -} - -function ObjectTypeSpreadProperty(...args) { - return (0, _builder.default)("ObjectTypeSpreadProperty", ...args); -} - -function OpaqueType(...args) { - return (0, _builder.default)("OpaqueType", ...args); -} - -function QualifiedTypeIdentifier(...args) { - return (0, _builder.default)("QualifiedTypeIdentifier", ...args); -} - -function StringLiteralTypeAnnotation(...args) { - return (0, _builder.default)("StringLiteralTypeAnnotation", ...args); -} - -function StringTypeAnnotation(...args) { - return (0, _builder.default)("StringTypeAnnotation", ...args); -} - -function ThisTypeAnnotation(...args) { - return (0, _builder.default)("ThisTypeAnnotation", ...args); -} - -function TupleTypeAnnotation(...args) { - return (0, _builder.default)("TupleTypeAnnotation", ...args); -} - -function TypeofTypeAnnotation(...args) { - return (0, _builder.default)("TypeofTypeAnnotation", ...args); -} - -function TypeAlias(...args) { - return (0, _builder.default)("TypeAlias", ...args); -} - -function TypeAnnotation(...args) { - return (0, _builder.default)("TypeAnnotation", ...args); -} - -function TypeCastExpression(...args) { - return (0, _builder.default)("TypeCastExpression", ...args); -} - -function TypeParameter(...args) { - return (0, _builder.default)("TypeParameter", ...args); -} - -function TypeParameterDeclaration(...args) { - return (0, _builder.default)("TypeParameterDeclaration", ...args); -} - -function TypeParameterInstantiation(...args) { - return (0, _builder.default)("TypeParameterInstantiation", ...args); -} - -function UnionTypeAnnotation(...args) { - return (0, _builder.default)("UnionTypeAnnotation", ...args); -} - -function Variance(...args) { - return (0, _builder.default)("Variance", ...args); -} - -function VoidTypeAnnotation(...args) { - return (0, _builder.default)("VoidTypeAnnotation", ...args); -} - -function JSXAttribute(...args) { - return (0, _builder.default)("JSXAttribute", ...args); -} - -function JSXClosingElement(...args) { - return (0, _builder.default)("JSXClosingElement", ...args); -} - -function JSXElement(...args) { - return (0, _builder.default)("JSXElement", ...args); -} - -function JSXEmptyExpression(...args) { - return (0, _builder.default)("JSXEmptyExpression", ...args); -} - -function JSXExpressionContainer(...args) { - return (0, _builder.default)("JSXExpressionContainer", ...args); -} - -function JSXSpreadChild(...args) { - return (0, _builder.default)("JSXSpreadChild", ...args); -} - -function JSXIdentifier(...args) { - return (0, _builder.default)("JSXIdentifier", ...args); -} - -function JSXMemberExpression(...args) { - return (0, _builder.default)("JSXMemberExpression", ...args); -} - -function JSXNamespacedName(...args) { - return (0, _builder.default)("JSXNamespacedName", ...args); -} - -function JSXOpeningElement(...args) { - return (0, _builder.default)("JSXOpeningElement", ...args); -} - -function JSXSpreadAttribute(...args) { - return (0, _builder.default)("JSXSpreadAttribute", ...args); -} - -function JSXText(...args) { - return (0, _builder.default)("JSXText", ...args); -} - -function JSXFragment(...args) { - return (0, _builder.default)("JSXFragment", ...args); -} - -function JSXOpeningFragment(...args) { - return (0, _builder.default)("JSXOpeningFragment", ...args); -} - -function JSXClosingFragment(...args) { - return (0, _builder.default)("JSXClosingFragment", ...args); -} - -function Noop(...args) { - return (0, _builder.default)("Noop", ...args); -} - -function Placeholder(...args) { - return (0, _builder.default)("Placeholder", ...args); -} - -function ArgumentPlaceholder(...args) { - return (0, _builder.default)("ArgumentPlaceholder", ...args); -} - -function AwaitExpression(...args) { - return (0, _builder.default)("AwaitExpression", ...args); -} - -function BindExpression(...args) { - return (0, _builder.default)("BindExpression", ...args); -} - -function ClassProperty(...args) { - return (0, _builder.default)("ClassProperty", ...args); -} - -function OptionalMemberExpression(...args) { - return (0, _builder.default)("OptionalMemberExpression", ...args); -} - -function PipelineTopicExpression(...args) { - return (0, _builder.default)("PipelineTopicExpression", ...args); -} - -function PipelineBareFunction(...args) { - return (0, _builder.default)("PipelineBareFunction", ...args); -} - -function PipelinePrimaryTopicReference(...args) { - return (0, _builder.default)("PipelinePrimaryTopicReference", ...args); -} - -function OptionalCallExpression(...args) { - return (0, _builder.default)("OptionalCallExpression", ...args); -} - -function ClassPrivateProperty(...args) { - return (0, _builder.default)("ClassPrivateProperty", ...args); -} - -function ClassPrivateMethod(...args) { - return (0, _builder.default)("ClassPrivateMethod", ...args); -} - -function Import(...args) { - return (0, _builder.default)("Import", ...args); -} - -function Decorator(...args) { - return (0, _builder.default)("Decorator", ...args); -} - -function DoExpression(...args) { - return (0, _builder.default)("DoExpression", ...args); -} - -function ExportDefaultSpecifier(...args) { - return (0, _builder.default)("ExportDefaultSpecifier", ...args); -} - -function ExportNamespaceSpecifier(...args) { - return (0, _builder.default)("ExportNamespaceSpecifier", ...args); -} - -function PrivateName(...args) { - return (0, _builder.default)("PrivateName", ...args); -} - -function BigIntLiteral(...args) { - return (0, _builder.default)("BigIntLiteral", ...args); -} - -function TSParameterProperty(...args) { - return (0, _builder.default)("TSParameterProperty", ...args); -} - -function TSDeclareFunction(...args) { - return (0, _builder.default)("TSDeclareFunction", ...args); -} - -function TSDeclareMethod(...args) { - return (0, _builder.default)("TSDeclareMethod", ...args); -} - -function TSQualifiedName(...args) { - return (0, _builder.default)("TSQualifiedName", ...args); -} - -function TSCallSignatureDeclaration(...args) { - return (0, _builder.default)("TSCallSignatureDeclaration", ...args); -} - -function TSConstructSignatureDeclaration(...args) { - return (0, _builder.default)("TSConstructSignatureDeclaration", ...args); -} - -function TSPropertySignature(...args) { - return (0, _builder.default)("TSPropertySignature", ...args); -} - -function TSMethodSignature(...args) { - return (0, _builder.default)("TSMethodSignature", ...args); -} - -function TSIndexSignature(...args) { - return (0, _builder.default)("TSIndexSignature", ...args); -} - -function TSAnyKeyword(...args) { - return (0, _builder.default)("TSAnyKeyword", ...args); -} - -function TSUnknownKeyword(...args) { - return (0, _builder.default)("TSUnknownKeyword", ...args); -} - -function TSNumberKeyword(...args) { - return (0, _builder.default)("TSNumberKeyword", ...args); -} - -function TSObjectKeyword(...args) { - return (0, _builder.default)("TSObjectKeyword", ...args); -} - -function TSBooleanKeyword(...args) { - return (0, _builder.default)("TSBooleanKeyword", ...args); -} - -function TSStringKeyword(...args) { - return (0, _builder.default)("TSStringKeyword", ...args); -} - -function TSSymbolKeyword(...args) { - return (0, _builder.default)("TSSymbolKeyword", ...args); -} - -function TSVoidKeyword(...args) { - return (0, _builder.default)("TSVoidKeyword", ...args); -} - -function TSUndefinedKeyword(...args) { - return (0, _builder.default)("TSUndefinedKeyword", ...args); -} - -function TSNullKeyword(...args) { - return (0, _builder.default)("TSNullKeyword", ...args); -} - -function TSNeverKeyword(...args) { - return (0, _builder.default)("TSNeverKeyword", ...args); -} - -function TSThisType(...args) { - return (0, _builder.default)("TSThisType", ...args); -} - -function TSFunctionType(...args) { - return (0, _builder.default)("TSFunctionType", ...args); -} - -function TSConstructorType(...args) { - return (0, _builder.default)("TSConstructorType", ...args); -} - -function TSTypeReference(...args) { - return (0, _builder.default)("TSTypeReference", ...args); -} - -function TSTypePredicate(...args) { - return (0, _builder.default)("TSTypePredicate", ...args); -} - -function TSTypeQuery(...args) { - return (0, _builder.default)("TSTypeQuery", ...args); -} - -function TSTypeLiteral(...args) { - return (0, _builder.default)("TSTypeLiteral", ...args); -} - -function TSArrayType(...args) { - return (0, _builder.default)("TSArrayType", ...args); -} - -function TSTupleType(...args) { - return (0, _builder.default)("TSTupleType", ...args); -} - -function TSOptionalType(...args) { - return (0, _builder.default)("TSOptionalType", ...args); -} - -function TSRestType(...args) { - return (0, _builder.default)("TSRestType", ...args); -} - -function TSUnionType(...args) { - return (0, _builder.default)("TSUnionType", ...args); -} - -function TSIntersectionType(...args) { - return (0, _builder.default)("TSIntersectionType", ...args); -} - -function TSConditionalType(...args) { - return (0, _builder.default)("TSConditionalType", ...args); -} - -function TSInferType(...args) { - return (0, _builder.default)("TSInferType", ...args); -} - -function TSParenthesizedType(...args) { - return (0, _builder.default)("TSParenthesizedType", ...args); -} - -function TSTypeOperator(...args) { - return (0, _builder.default)("TSTypeOperator", ...args); -} - -function TSIndexedAccessType(...args) { - return (0, _builder.default)("TSIndexedAccessType", ...args); -} - -function TSMappedType(...args) { - return (0, _builder.default)("TSMappedType", ...args); -} - -function TSLiteralType(...args) { - return (0, _builder.default)("TSLiteralType", ...args); -} - -function TSExpressionWithTypeArguments(...args) { - return (0, _builder.default)("TSExpressionWithTypeArguments", ...args); -} - -function TSInterfaceDeclaration(...args) { - return (0, _builder.default)("TSInterfaceDeclaration", ...args); -} - -function TSInterfaceBody(...args) { - return (0, _builder.default)("TSInterfaceBody", ...args); -} - -function TSTypeAliasDeclaration(...args) { - return (0, _builder.default)("TSTypeAliasDeclaration", ...args); -} - -function TSAsExpression(...args) { - return (0, _builder.default)("TSAsExpression", ...args); -} - -function TSTypeAssertion(...args) { - return (0, _builder.default)("TSTypeAssertion", ...args); -} - -function TSEnumDeclaration(...args) { - return (0, _builder.default)("TSEnumDeclaration", ...args); -} - -function TSEnumMember(...args) { - return (0, _builder.default)("TSEnumMember", ...args); -} - -function TSModuleDeclaration(...args) { - return (0, _builder.default)("TSModuleDeclaration", ...args); -} - -function TSModuleBlock(...args) { - return (0, _builder.default)("TSModuleBlock", ...args); -} - -function TSImportType(...args) { - return (0, _builder.default)("TSImportType", ...args); -} - -function TSImportEqualsDeclaration(...args) { - return (0, _builder.default)("TSImportEqualsDeclaration", ...args); -} - -function TSExternalModuleReference(...args) { - return (0, _builder.default)("TSExternalModuleReference", ...args); -} - -function TSNonNullExpression(...args) { - return (0, _builder.default)("TSNonNullExpression", ...args); -} - -function TSExportAssignment(...args) { - return (0, _builder.default)("TSExportAssignment", ...args); -} - -function TSNamespaceExportDeclaration(...args) { - return (0, _builder.default)("TSNamespaceExportDeclaration", ...args); -} - -function TSTypeAnnotation(...args) { - return (0, _builder.default)("TSTypeAnnotation", ...args); -} - -function TSTypeParameterInstantiation(...args) { - return (0, _builder.default)("TSTypeParameterInstantiation", ...args); -} - -function TSTypeParameterDeclaration(...args) { - return (0, _builder.default)("TSTypeParameterDeclaration", ...args); -} - -function TSTypeParameter(...args) { - return (0, _builder.default)("TSTypeParameter", ...args); -} - -function NumberLiteral(...args) { - console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); - return NumberLiteral("NumberLiteral", ...args); -} - -function RegexLiteral(...args) { - console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); - return RegexLiteral("RegexLiteral", ...args); -} - -function RestProperty(...args) { - console.trace("The node type RestProperty has been renamed to RestElement"); - return RestProperty("RestProperty", ...args); -} - -function SpreadProperty(...args) { - console.trace("The node type SpreadProperty has been renamed to SpreadElement"); - return SpreadProperty("SpreadProperty", ...args); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/builders/react/buildChildren.js b/node_modules/@babel/types/lib/builders/react/buildChildren.js deleted file mode 100644 index 91e7cbd9..00000000 --- a/node_modules/@babel/types/lib/builders/react/buildChildren.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = buildChildren; - -var _generated = require("../../validators/generated"); - -var _cleanJSXElementLiteralChild = _interopRequireDefault(require("../../utils/react/cleanJSXElementLiteralChild")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function buildChildren(node) { - const elements = []; - - for (let i = 0; i < node.children.length; i++) { - let child = node.children[i]; - - if ((0, _generated.isJSXText)(child)) { - (0, _cleanJSXElementLiteralChild.default)(child, elements); - continue; - } - - if ((0, _generated.isJSXExpressionContainer)(child)) child = child.expression; - if ((0, _generated.isJSXEmptyExpression)(child)) continue; - elements.push(child); - } - - return elements; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/clone/clone.js b/node_modules/@babel/types/lib/clone/clone.js deleted file mode 100644 index 9595f6e2..00000000 --- a/node_modules/@babel/types/lib/clone/clone.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = clone; - -var _cloneNode = _interopRequireDefault(require("./cloneNode")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function clone(node) { - return (0, _cloneNode.default)(node, false); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/clone/cloneDeep.js b/node_modules/@babel/types/lib/clone/cloneDeep.js deleted file mode 100644 index eb29c536..00000000 --- a/node_modules/@babel/types/lib/clone/cloneDeep.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = cloneDeep; - -var _cloneNode = _interopRequireDefault(require("./cloneNode")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function cloneDeep(node) { - return (0, _cloneNode.default)(node); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/clone/cloneNode.js b/node_modules/@babel/types/lib/clone/cloneNode.js deleted file mode 100644 index ce9cb8c1..00000000 --- a/node_modules/@babel/types/lib/clone/cloneNode.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = cloneNode; - -var _definitions = require("../definitions"); - -const has = Function.call.bind(Object.prototype.hasOwnProperty); - -function cloneIfNode(obj, deep) { - if (obj && typeof obj.type === "string" && obj.type !== "CommentLine" && obj.type !== "CommentBlock") { - return cloneNode(obj, deep); - } - - return obj; -} - -function cloneIfNodeOrArray(obj, deep) { - if (Array.isArray(obj)) { - return obj.map(node => cloneIfNode(node, deep)); - } - - return cloneIfNode(obj, deep); -} - -function cloneNode(node, deep = true) { - if (!node) return node; - const { - type - } = node; - const newNode = { - type - }; - - if (type === "Identifier") { - newNode.name = node.name; - - if (has(node, "optional") && typeof node.optional === "boolean") { - newNode.optional = node.optional; - } - - if (has(node, "typeAnnotation")) { - newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true) : node.typeAnnotation; - } - } else if (!has(_definitions.NODE_FIELDS, type)) { - throw new Error(`Unknown node type: "${type}"`); - } else { - for (const field of Object.keys(_definitions.NODE_FIELDS[type])) { - if (has(node, field)) { - newNode[field] = deep ? cloneIfNodeOrArray(node[field], true) : node[field]; - } - } - } - - if (has(node, "loc")) { - newNode.loc = node.loc; - } - - if (has(node, "leadingComments")) { - newNode.leadingComments = node.leadingComments; - } - - if (has(node, "innerComments")) { - newNode.innerComments = node.innerComments; - } - - if (has(node, "trailingComments")) { - newNode.trailingComments = node.trailingComments; - } - - if (has(node, "extra")) { - newNode.extra = Object.assign({}, node.extra); - } - - return newNode; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js b/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js deleted file mode 100644 index 5622af7b..00000000 --- a/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = cloneWithoutLoc; - -var _clone = _interopRequireDefault(require("./clone")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function cloneWithoutLoc(node) { - const newNode = (0, _clone.default)(node); - newNode.loc = null; - return newNode; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/comments/addComment.js b/node_modules/@babel/types/lib/comments/addComment.js deleted file mode 100644 index ff586514..00000000 --- a/node_modules/@babel/types/lib/comments/addComment.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = addComment; - -var _addComments = _interopRequireDefault(require("./addComments")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function addComment(node, type, content, line) { - return (0, _addComments.default)(node, type, [{ - type: line ? "CommentLine" : "CommentBlock", - value: content - }]); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/comments/addComments.js b/node_modules/@babel/types/lib/comments/addComments.js deleted file mode 100644 index f3a61df7..00000000 --- a/node_modules/@babel/types/lib/comments/addComments.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = addComments; - -function addComments(node, type, comments) { - if (!comments || !node) return node; - const key = `${type}Comments`; - - if (node[key]) { - if (type === "leading") { - node[key] = comments.concat(node[key]); - } else { - node[key] = node[key].concat(comments); - } - } else { - node[key] = comments; - } - - return node; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/comments/inheritInnerComments.js b/node_modules/@babel/types/lib/comments/inheritInnerComments.js deleted file mode 100644 index fbe59dec..00000000 --- a/node_modules/@babel/types/lib/comments/inheritInnerComments.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = inheritInnerComments; - -var _inherit = _interopRequireDefault(require("../utils/inherit")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function inheritInnerComments(child, parent) { - (0, _inherit.default)("innerComments", child, parent); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/comments/inheritLeadingComments.js b/node_modules/@babel/types/lib/comments/inheritLeadingComments.js deleted file mode 100644 index ccb02ec5..00000000 --- a/node_modules/@babel/types/lib/comments/inheritLeadingComments.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = inheritLeadingComments; - -var _inherit = _interopRequireDefault(require("../utils/inherit")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function inheritLeadingComments(child, parent) { - (0, _inherit.default)("leadingComments", child, parent); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/comments/inheritTrailingComments.js b/node_modules/@babel/types/lib/comments/inheritTrailingComments.js deleted file mode 100644 index bce1e2d9..00000000 --- a/node_modules/@babel/types/lib/comments/inheritTrailingComments.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = inheritTrailingComments; - -var _inherit = _interopRequireDefault(require("../utils/inherit")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function inheritTrailingComments(child, parent) { - (0, _inherit.default)("trailingComments", child, parent); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/comments/inheritsComments.js b/node_modules/@babel/types/lib/comments/inheritsComments.js deleted file mode 100644 index fd942d86..00000000 --- a/node_modules/@babel/types/lib/comments/inheritsComments.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = inheritsComments; - -var _inheritTrailingComments = _interopRequireDefault(require("./inheritTrailingComments")); - -var _inheritLeadingComments = _interopRequireDefault(require("./inheritLeadingComments")); - -var _inheritInnerComments = _interopRequireDefault(require("./inheritInnerComments")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function inheritsComments(child, parent) { - (0, _inheritTrailingComments.default)(child, parent); - (0, _inheritLeadingComments.default)(child, parent); - (0, _inheritInnerComments.default)(child, parent); - return child; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/comments/removeComments.js b/node_modules/@babel/types/lib/comments/removeComments.js deleted file mode 100644 index fe34f1a8..00000000 --- a/node_modules/@babel/types/lib/comments/removeComments.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = removeComments; - -var _constants = require("../constants"); - -function removeComments(node) { - _constants.COMMENT_KEYS.forEach(key => { - node[key] = null; - }); - - return node; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/constants/generated/index.js b/node_modules/@babel/types/lib/constants/generated/index.js deleted file mode 100644 index 6072495e..00000000 --- a/node_modules/@babel/types/lib/constants/generated/index.js +++ /dev/null @@ -1,93 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0; - -var _definitions = require("../../definitions"); - -const EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"]; -exports.EXPRESSION_TYPES = EXPRESSION_TYPES; -const BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"]; -exports.BINARY_TYPES = BINARY_TYPES; -const SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"]; -exports.SCOPABLE_TYPES = SCOPABLE_TYPES; -const BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"]; -exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES; -const BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"]; -exports.BLOCK_TYPES = BLOCK_TYPES; -const STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"]; -exports.STATEMENT_TYPES = STATEMENT_TYPES; -const TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"]; -exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES; -const COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"]; -exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES; -const CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"]; -exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES; -const LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"]; -exports.LOOP_TYPES = LOOP_TYPES; -const WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"]; -exports.WHILE_TYPES = WHILE_TYPES; -const EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"]; -exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES; -const FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"]; -exports.FOR_TYPES = FOR_TYPES; -const FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"]; -exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES; -const FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"]; -exports.FUNCTION_TYPES = FUNCTION_TYPES; -const FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"]; -exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES; -const PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"]; -exports.PUREISH_TYPES = PUREISH_TYPES; -const DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"]; -exports.DECLARATION_TYPES = DECLARATION_TYPES; -const PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"]; -exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES; -const LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"]; -exports.LVAL_TYPES = LVAL_TYPES; -const TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"]; -exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES; -const LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"]; -exports.LITERAL_TYPES = LITERAL_TYPES; -const IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"]; -exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES; -const USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"]; -exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES; -const METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"]; -exports.METHOD_TYPES = METHOD_TYPES; -const OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"]; -exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES; -const PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"]; -exports.PROPERTY_TYPES = PROPERTY_TYPES; -const UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"]; -exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES; -const PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"]; -exports.PATTERN_TYPES = PATTERN_TYPES; -const CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"]; -exports.CLASS_TYPES = CLASS_TYPES; -const MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"]; -exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES; -const EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"]; -exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES; -const MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"]; -exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES; -const FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"]; -exports.FLOW_TYPES = FLOW_TYPES; -const FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"]; -exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES; -const FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"]; -exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES; -const FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"]; -exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES; -const FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"]; -exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES; -const JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"]; -exports.JSX_TYPES = JSX_TYPES; -const PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"]; -exports.PRIVATE_TYPES = PRIVATE_TYPES; -const TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"]; -exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES; -const TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"]; -exports.TSTYPE_TYPES = TSTYPE_TYPES; \ No newline at end of file diff --git a/node_modules/@babel/types/lib/constants/index.js b/node_modules/@babel/types/lib/constants/index.js deleted file mode 100644 index a60b106f..00000000 --- a/node_modules/@babel/types/lib/constants/index.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0; -const STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"]; -exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS; -const FLATTENABLE_KEYS = ["body", "expressions"]; -exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS; -const FOR_INIT_KEYS = ["left", "init"]; -exports.FOR_INIT_KEYS = FOR_INIT_KEYS; -const COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; -exports.COMMENT_KEYS = COMMENT_KEYS; -const LOGICAL_OPERATORS = ["||", "&&", "??"]; -exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS; -const UPDATE_OPERATORS = ["++", "--"]; -exports.UPDATE_OPERATORS = UPDATE_OPERATORS; -const BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="]; -exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS; -const EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; -exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS; -const COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"]; -exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS; -const BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS]; -exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS; -const NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; -exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS; -const BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS]; -exports.BINARY_OPERATORS = BINARY_OPERATORS; -const BOOLEAN_UNARY_OPERATORS = ["delete", "!"]; -exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS; -const NUMBER_UNARY_OPERATORS = ["+", "-", "~"]; -exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS; -const STRING_UNARY_OPERATORS = ["typeof"]; -exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS; -const UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS]; -exports.UNARY_OPERATORS = UNARY_OPERATORS; -const INHERIT_KEYS = { - optional: ["typeAnnotation", "typeParameters", "returnType"], - force: ["start", "loc", "end"] -}; -exports.INHERIT_KEYS = INHERIT_KEYS; -const BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped"); -exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL; -const NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding"); -exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING; \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/ensureBlock.js b/node_modules/@babel/types/lib/converters/ensureBlock.js deleted file mode 100644 index 2836b365..00000000 --- a/node_modules/@babel/types/lib/converters/ensureBlock.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = ensureBlock; - -var _toBlock = _interopRequireDefault(require("./toBlock")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function ensureBlock(node, key = "body") { - return node[key] = (0, _toBlock.default)(node[key], node); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js b/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js deleted file mode 100644 index fadd0f04..00000000 --- a/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = gatherSequenceExpressions; - -var _getBindingIdentifiers = _interopRequireDefault(require("../retrievers/getBindingIdentifiers")); - -var _generated = require("../validators/generated"); - -var _generated2 = require("../builders/generated"); - -var _cloneNode = _interopRequireDefault(require("../clone/cloneNode")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function gatherSequenceExpressions(nodes, scope, declars) { - const exprs = []; - let ensureLastUndefined = true; - - for (const node of nodes) { - ensureLastUndefined = false; - - if ((0, _generated.isExpression)(node)) { - exprs.push(node); - } else if ((0, _generated.isExpressionStatement)(node)) { - exprs.push(node.expression); - } else if ((0, _generated.isVariableDeclaration)(node)) { - if (node.kind !== "var") return; - - for (const declar of node.declarations) { - const bindings = (0, _getBindingIdentifiers.default)(declar); - - for (const key of Object.keys(bindings)) { - declars.push({ - kind: node.kind, - id: (0, _cloneNode.default)(bindings[key]) - }); - } - - if (declar.init) { - exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init)); - } - } - - ensureLastUndefined = true; - } else if ((0, _generated.isIfStatement)(node)) { - const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode(); - const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode(); - if (!consequent || !alternate) return; - exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate)); - } else if ((0, _generated.isBlockStatement)(node)) { - const body = gatherSequenceExpressions(node.body, scope, declars); - if (!body) return; - exprs.push(body); - } else if ((0, _generated.isEmptyStatement)(node)) { - ensureLastUndefined = true; - } else { - return; - } - } - - if (ensureLastUndefined) { - exprs.push(scope.buildUndefinedNode()); - } - - if (exprs.length === 1) { - return exprs[0]; - } else { - return (0, _generated2.sequenceExpression)(exprs); - } -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js b/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js deleted file mode 100644 index b9d165b6..00000000 --- a/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toBindingIdentifierName; - -var _toIdentifier = _interopRequireDefault(require("./toIdentifier")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function toBindingIdentifierName(name) { - name = (0, _toIdentifier.default)(name); - if (name === "eval" || name === "arguments") name = "_" + name; - return name; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toBlock.js b/node_modules/@babel/types/lib/converters/toBlock.js deleted file mode 100644 index 19886833..00000000 --- a/node_modules/@babel/types/lib/converters/toBlock.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toBlock; - -var _generated = require("../validators/generated"); - -var _generated2 = require("../builders/generated"); - -function toBlock(node, parent) { - if ((0, _generated.isBlockStatement)(node)) { - return node; - } - - let blockNodes = []; - - if ((0, _generated.isEmptyStatement)(node)) { - blockNodes = []; - } else { - if (!(0, _generated.isStatement)(node)) { - if ((0, _generated.isFunction)(parent)) { - node = (0, _generated2.returnStatement)(node); - } else { - node = (0, _generated2.expressionStatement)(node); - } - } - - blockNodes = [node]; - } - - return (0, _generated2.blockStatement)(blockNodes); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toComputedKey.js b/node_modules/@babel/types/lib/converters/toComputedKey.js deleted file mode 100644 index 31e6770f..00000000 --- a/node_modules/@babel/types/lib/converters/toComputedKey.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toComputedKey; - -var _generated = require("../validators/generated"); - -var _generated2 = require("../builders/generated"); - -function toComputedKey(node, key = node.key || node.property) { - if (!node.computed && (0, _generated.isIdentifier)(key)) key = (0, _generated2.stringLiteral)(key.name); - return key; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toExpression.js b/node_modules/@babel/types/lib/converters/toExpression.js deleted file mode 100644 index 6e58b0de..00000000 --- a/node_modules/@babel/types/lib/converters/toExpression.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toExpression; - -var _generated = require("../validators/generated"); - -function toExpression(node) { - if ((0, _generated.isExpressionStatement)(node)) { - node = node.expression; - } - - if ((0, _generated.isExpression)(node)) { - return node; - } - - if ((0, _generated.isClass)(node)) { - node.type = "ClassExpression"; - } else if ((0, _generated.isFunction)(node)) { - node.type = "FunctionExpression"; - } - - if (!(0, _generated.isExpression)(node)) { - throw new Error(`cannot turn ${node.type} to an expression`); - } - - return node; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toIdentifier.js b/node_modules/@babel/types/lib/converters/toIdentifier.js deleted file mode 100644 index e55db41f..00000000 --- a/node_modules/@babel/types/lib/converters/toIdentifier.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toIdentifier; - -var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function toIdentifier(name) { - name = name + ""; - name = name.replace(/[^a-zA-Z0-9$_]/g, "-"); - name = name.replace(/^[-0-9]+/, ""); - name = name.replace(/[-\s]+(.)?/g, function (match, c) { - return c ? c.toUpperCase() : ""; - }); - - if (!(0, _isValidIdentifier.default)(name)) { - name = `_${name}`; - } - - return name || "_"; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toKeyAlias.js b/node_modules/@babel/types/lib/converters/toKeyAlias.js deleted file mode 100644 index c48fd0e7..00000000 --- a/node_modules/@babel/types/lib/converters/toKeyAlias.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toKeyAlias; - -var _generated = require("../validators/generated"); - -var _cloneNode = _interopRequireDefault(require("../clone/cloneNode")); - -var _removePropertiesDeep = _interopRequireDefault(require("../modifications/removePropertiesDeep")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function toKeyAlias(node, key = node.key) { - let alias; - - if (node.kind === "method") { - return toKeyAlias.increment() + ""; - } else if ((0, _generated.isIdentifier)(key)) { - alias = key.name; - } else if ((0, _generated.isStringLiteral)(key)) { - alias = JSON.stringify(key.value); - } else { - alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key))); - } - - if (node.computed) { - alias = `[${alias}]`; - } - - if (node.static) { - alias = `static:${alias}`; - } - - return alias; -} - -toKeyAlias.uid = 0; - -toKeyAlias.increment = function () { - if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) { - return toKeyAlias.uid = 0; - } else { - return toKeyAlias.uid++; - } -}; \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toSequenceExpression.js b/node_modules/@babel/types/lib/converters/toSequenceExpression.js deleted file mode 100644 index 2e221db4..00000000 --- a/node_modules/@babel/types/lib/converters/toSequenceExpression.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toSequenceExpression; - -var _gatherSequenceExpressions = _interopRequireDefault(require("./gatherSequenceExpressions")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function toSequenceExpression(nodes, scope) { - if (!nodes || !nodes.length) return; - const declars = []; - const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars); - if (!result) return; - - for (const declar of declars) { - scope.push(declar); - } - - return result; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/toStatement.js b/node_modules/@babel/types/lib/converters/toStatement.js deleted file mode 100644 index 69b22ae0..00000000 --- a/node_modules/@babel/types/lib/converters/toStatement.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toStatement; - -var _generated = require("../validators/generated"); - -var _generated2 = require("../builders/generated"); - -function toStatement(node, ignore) { - if ((0, _generated.isStatement)(node)) { - return node; - } - - let mustHaveId = false; - let newType; - - if ((0, _generated.isClass)(node)) { - mustHaveId = true; - newType = "ClassDeclaration"; - } else if ((0, _generated.isFunction)(node)) { - mustHaveId = true; - newType = "FunctionDeclaration"; - } else if ((0, _generated.isAssignmentExpression)(node)) { - return (0, _generated2.expressionStatement)(node); - } - - if (mustHaveId && !node.id) { - newType = false; - } - - if (!newType) { - if (ignore) { - return false; - } else { - throw new Error(`cannot turn ${node.type} to a statement`); - } - } - - node.type = newType; - return node; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/converters/valueToNode.js b/node_modules/@babel/types/lib/converters/valueToNode.js deleted file mode 100644 index 9e19dbfa..00000000 --- a/node_modules/@babel/types/lib/converters/valueToNode.js +++ /dev/null @@ -1,104 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = valueToNode; - -function _isPlainObject() { - const data = _interopRequireDefault(require("lodash/isPlainObject")); - - _isPlainObject = function () { - return data; - }; - - return data; -} - -function _isRegExp() { - const data = _interopRequireDefault(require("lodash/isRegExp")); - - _isRegExp = function () { - return data; - }; - - return data; -} - -var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier")); - -var _generated = require("../builders/generated"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function valueToNode(value) { - if (value === undefined) { - return (0, _generated.identifier)("undefined"); - } - - if (value === true || value === false) { - return (0, _generated.booleanLiteral)(value); - } - - if (value === null) { - return (0, _generated.nullLiteral)(); - } - - if (typeof value === "string") { - return (0, _generated.stringLiteral)(value); - } - - if (typeof value === "number") { - let result; - - if (Number.isFinite(value)) { - result = (0, _generated.numericLiteral)(Math.abs(value)); - } else { - let numerator; - - if (Number.isNaN(value)) { - numerator = (0, _generated.numericLiteral)(0); - } else { - numerator = (0, _generated.numericLiteral)(1); - } - - result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0)); - } - - if (value < 0 || Object.is(value, -0)) { - result = (0, _generated.unaryExpression)("-", result); - } - - return result; - } - - if ((0, _isRegExp().default)(value)) { - const pattern = value.source; - const flags = value.toString().match(/\/([a-z]+|)$/)[1]; - return (0, _generated.regExpLiteral)(pattern, flags); - } - - if (Array.isArray(value)) { - return (0, _generated.arrayExpression)(value.map(valueToNode)); - } - - if ((0, _isPlainObject().default)(value)) { - const props = []; - - for (const key of Object.keys(value)) { - let nodeKey; - - if ((0, _isValidIdentifier.default)(key)) { - nodeKey = (0, _generated.identifier)(key); - } else { - nodeKey = (0, _generated.stringLiteral)(key); - } - - props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key]))); - } - - return (0, _generated.objectExpression)(props); - } - - throw new Error("don't know how to turn this value into a node"); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/core.js b/node_modules/@babel/types/lib/definitions/core.js deleted file mode 100644 index d759890c..00000000 --- a/node_modules/@babel/types/lib/definitions/core.js +++ /dev/null @@ -1,725 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0; - -var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier")); - -var _constants = require("../constants"); - -var _utils = _interopRequireWildcard(require("./utils")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -(0, _utils.default)("ArrayExpression", { - fields: { - elements: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), - default: [] - } - }, - visitor: ["elements"], - aliases: ["Expression"] -}); -(0, _utils.default)("AssignmentExpression", { - fields: { - operator: { - validate: (0, _utils.assertValueType)("string") - }, - left: { - validate: (0, _utils.assertNodeType)("LVal") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - } - }, - builder: ["operator", "left", "right"], - visitor: ["left", "right"], - aliases: ["Expression"] -}); -(0, _utils.default)("BinaryExpression", { - builder: ["operator", "left", "right"], - fields: { - operator: { - validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS) - }, - left: { - validate: (0, _utils.assertNodeType)("Expression") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - } - }, - visitor: ["left", "right"], - aliases: ["Binary", "Expression"] -}); -(0, _utils.default)("InterpreterDirective", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("string") - } - } -}); -(0, _utils.default)("Directive", { - visitor: ["value"], - fields: { - value: { - validate: (0, _utils.assertNodeType)("DirectiveLiteral") - } - } -}); -(0, _utils.default)("DirectiveLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("string") - } - } -}); -(0, _utils.default)("BlockStatement", { - builder: ["body", "directives"], - visitor: ["directives", "body"], - fields: { - directives: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), - default: [] - }, - body: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) - } - }, - aliases: ["Scopable", "BlockParent", "Block", "Statement"] -}); -(0, _utils.default)("BreakStatement", { - visitor: ["label"], - fields: { - label: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - } - }, - aliases: ["Statement", "Terminatorless", "CompletionStatement"] -}); -(0, _utils.default)("CallExpression", { - visitor: ["callee", "arguments", "typeParameters", "typeArguments"], - builder: ["callee", "arguments"], - aliases: ["Expression"], - fields: { - callee: { - validate: (0, _utils.assertNodeType)("Expression") - }, - arguments: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) - }, - optional: { - validate: (0, _utils.assertOneOf)(true, false), - optional: true - }, - typeArguments: { - validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), - optional: true - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), - optional: true - } - } -}); -(0, _utils.default)("CatchClause", { - visitor: ["param", "body"], - fields: { - param: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }, - aliases: ["Scopable", "BlockParent"] -}); -(0, _utils.default)("ConditionalExpression", { - visitor: ["test", "consequent", "alternate"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression") - }, - consequent: { - validate: (0, _utils.assertNodeType)("Expression") - }, - alternate: { - validate: (0, _utils.assertNodeType)("Expression") - } - }, - aliases: ["Expression", "Conditional"] -}); -(0, _utils.default)("ContinueStatement", { - visitor: ["label"], - fields: { - label: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - } - }, - aliases: ["Statement", "Terminatorless", "CompletionStatement"] -}); -(0, _utils.default)("DebuggerStatement", { - aliases: ["Statement"] -}); -(0, _utils.default)("DoWhileStatement", { - visitor: ["test", "body"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - }, - aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"] -}); -(0, _utils.default)("EmptyStatement", { - aliases: ["Statement"] -}); -(0, _utils.default)("ExpressionStatement", { - visitor: ["expression"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - }, - aliases: ["Statement", "ExpressionWrapper"] -}); -(0, _utils.default)("File", { - builder: ["program", "comments", "tokens"], - visitor: ["program"], - fields: { - program: { - validate: (0, _utils.assertNodeType)("Program") - } - } -}); -(0, _utils.default)("ForInStatement", { - visitor: ["left", "right", "body"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], - fields: { - left: { - validate: (0, _utils.assertNodeType)("VariableDeclaration", "LVal") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); -(0, _utils.default)("ForStatement", { - visitor: ["init", "test", "update", "body"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"], - fields: { - init: { - validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"), - optional: true - }, - test: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - }, - update: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); -const functionCommon = { - params: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty"))) - }, - generator: { - default: false, - validate: (0, _utils.assertValueType)("boolean") - }, - async: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - } -}; -exports.functionCommon = functionCommon; -const functionTypeAnnotationCommon = { - returnType: { - validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), - optional: true - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), - optional: true - } -}; -exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon; -const functionDeclarationCommon = Object.assign({}, functionCommon, { - declare: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - id: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - } -}); -exports.functionDeclarationCommon = functionDeclarationCommon; -(0, _utils.default)("FunctionDeclaration", { - builder: ["id", "params", "body", "generator", "async"], - visitor: ["id", "params", "body", "returnType", "typeParameters"], - fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, { - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }), - aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"] -}); -(0, _utils.default)("FunctionExpression", { - inherits: "FunctionDeclaration", - aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], - fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { - id: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }) -}); -const patternLikeCommon = { - typeAnnotation: { - validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), - optional: true - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) - } -}; -exports.patternLikeCommon = patternLikeCommon; -(0, _utils.default)("Identifier", { - builder: ["name"], - visitor: ["typeAnnotation", "decorators"], - aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"], - fields: Object.assign({}, patternLikeCommon, { - name: { - validate: (0, _utils.chain)(function (node, key, val) { - if (!(0, _isValidIdentifier.default)(val)) {} - }, (0, _utils.assertValueType)("string")) - }, - optional: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - } - }) -}); -(0, _utils.default)("IfStatement", { - visitor: ["test", "consequent", "alternate"], - aliases: ["Statement", "Conditional"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression") - }, - consequent: { - validate: (0, _utils.assertNodeType)("Statement") - }, - alternate: { - optional: true, - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); -(0, _utils.default)("LabeledStatement", { - visitor: ["label", "body"], - aliases: ["Statement"], - fields: { - label: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); -(0, _utils.default)("StringLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("string") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); -(0, _utils.default)("NumericLiteral", { - builder: ["value"], - deprecatedAlias: "NumberLiteral", - fields: { - value: { - validate: (0, _utils.assertValueType)("number") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); -(0, _utils.default)("NullLiteral", { - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); -(0, _utils.default)("BooleanLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("boolean") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); -(0, _utils.default)("RegExpLiteral", { - builder: ["pattern", "flags"], - deprecatedAlias: "RegexLiteral", - aliases: ["Expression", "Literal"], - fields: { - pattern: { - validate: (0, _utils.assertValueType)("string") - }, - flags: { - validate: (0, _utils.assertValueType)("string"), - default: "" - } - } -}); -(0, _utils.default)("LogicalExpression", { - builder: ["operator", "left", "right"], - visitor: ["left", "right"], - aliases: ["Binary", "Expression"], - fields: { - operator: { - validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS) - }, - left: { - validate: (0, _utils.assertNodeType)("Expression") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("MemberExpression", { - builder: ["object", "property", "computed", "optional"], - visitor: ["object", "property"], - aliases: ["Expression", "LVal"], - fields: { - object: { - validate: (0, _utils.assertNodeType)("Expression") - }, - property: { - validate: function () { - const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName"); - const computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - const validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }() - }, - computed: { - default: false - }, - optional: { - validate: (0, _utils.assertOneOf)(true, false), - optional: true - } - } -}); -(0, _utils.default)("NewExpression", { - inherits: "CallExpression" -}); -(0, _utils.default)("Program", { - visitor: ["directives", "body"], - builder: ["body", "directives", "sourceType", "interpreter"], - fields: { - sourceFile: { - validate: (0, _utils.assertValueType)("string") - }, - sourceType: { - validate: (0, _utils.assertOneOf)("script", "module"), - default: "script" - }, - interpreter: { - validate: (0, _utils.assertNodeType)("InterpreterDirective"), - default: null, - optional: true - }, - directives: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), - default: [] - }, - body: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) - } - }, - aliases: ["Scopable", "BlockParent", "Block"] -}); -(0, _utils.default)("ObjectExpression", { - visitor: ["properties"], - aliases: ["Expression"], - fields: { - properties: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement"))) - } - } -}); -(0, _utils.default)("ObjectMethod", { - builder: ["kind", "key", "params", "body", "computed"], - fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, { - kind: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("method", "get", "set")), - default: "method" - }, - computed: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - }, - key: { - validate: function () { - const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); - const computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - const validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }() - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }), - visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], - aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"] -}); -(0, _utils.default)("ObjectProperty", { - builder: ["key", "value", "computed", "shorthand", "decorators"], - fields: { - computed: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - }, - key: { - validate: function () { - const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); - const computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - const validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }() - }, - value: { - validate: (0, _utils.assertNodeType)("Expression", "PatternLike") - }, - shorthand: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - } - }, - visitor: ["key", "value", "decorators"], - aliases: ["UserWhitespacable", "Property", "ObjectMember"] -}); -(0, _utils.default)("RestElement", { - visitor: ["argument", "typeAnnotation"], - builder: ["argument"], - aliases: ["LVal", "PatternLike"], - deprecatedAlias: "RestProperty", - fields: Object.assign({}, patternLikeCommon, { - argument: { - validate: (0, _utils.assertNodeType)("LVal") - } - }) -}); -(0, _utils.default)("ReturnStatement", { - visitor: ["argument"], - aliases: ["Statement", "Terminatorless", "CompletionStatement"], - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - } - } -}); -(0, _utils.default)("SequenceExpression", { - visitor: ["expressions"], - fields: { - expressions: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression"))) - } - }, - aliases: ["Expression"] -}); -(0, _utils.default)("ParenthesizedExpression", { - visitor: ["expression"], - aliases: ["Expression", "ExpressionWrapper"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("SwitchCase", { - visitor: ["test", "consequent"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - }, - consequent: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) - } - } -}); -(0, _utils.default)("SwitchStatement", { - visitor: ["discriminant", "cases"], - aliases: ["Statement", "BlockParent", "Scopable"], - fields: { - discriminant: { - validate: (0, _utils.assertNodeType)("Expression") - }, - cases: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase"))) - } - } -}); -(0, _utils.default)("ThisExpression", { - aliases: ["Expression"] -}); -(0, _utils.default)("ThrowStatement", { - visitor: ["argument"], - aliases: ["Statement", "Terminatorless", "CompletionStatement"], - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("TryStatement", { - visitor: ["block", "handler", "finalizer"], - aliases: ["Statement"], - fields: { - block: { - validate: (0, _utils.assertNodeType)("BlockStatement") - }, - handler: { - optional: true, - validate: (0, _utils.assertNodeType)("CatchClause") - }, - finalizer: { - optional: true, - validate: (0, _utils.assertNodeType)("BlockStatement") - } - } -}); -(0, _utils.default)("UnaryExpression", { - builder: ["operator", "argument", "prefix"], - fields: { - prefix: { - default: true - }, - argument: { - validate: (0, _utils.assertNodeType)("Expression") - }, - operator: { - validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS) - } - }, - visitor: ["argument"], - aliases: ["UnaryLike", "Expression"] -}); -(0, _utils.default)("UpdateExpression", { - builder: ["operator", "argument", "prefix"], - fields: { - prefix: { - default: false - }, - argument: { - validate: (0, _utils.assertNodeType)("Expression") - }, - operator: { - validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS) - } - }, - visitor: ["argument"], - aliases: ["Expression"] -}); -(0, _utils.default)("VariableDeclaration", { - builder: ["kind", "declarations"], - visitor: ["declarations"], - aliases: ["Statement", "Declaration"], - fields: { - declare: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - kind: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("var", "let", "const")) - }, - declarations: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator"))) - } - } -}); -(0, _utils.default)("VariableDeclarator", { - visitor: ["id", "init"], - fields: { - id: { - validate: (0, _utils.assertNodeType)("LVal") - }, - definite: { - optional: true, - validate: (0, _utils.assertValueType)("boolean") - }, - init: { - optional: true, - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("WhileStatement", { - visitor: ["test", "body"], - aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement", "Statement") - } - } -}); -(0, _utils.default)("WithStatement", { - visitor: ["object", "body"], - aliases: ["Statement"], - fields: { - object: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement", "Statement") - } - } -}); \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/es2015.js b/node_modules/@babel/types/lib/definitions/es2015.js deleted file mode 100644 index 71e01365..00000000 --- a/node_modules/@babel/types/lib/definitions/es2015.js +++ /dev/null @@ -1,401 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = void 0; - -var _utils = _interopRequireWildcard(require("./utils")); - -var _core = require("./core"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -(0, _utils.default)("AssignmentPattern", { - visitor: ["left", "right", "decorators"], - builder: ["left", "right"], - aliases: ["Pattern", "PatternLike", "LVal"], - fields: Object.assign({}, _core.patternLikeCommon, { - left: { - validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) - } - }) -}); -(0, _utils.default)("ArrayPattern", { - visitor: ["elements", "typeAnnotation"], - builder: ["elements"], - aliases: ["Pattern", "PatternLike", "LVal"], - fields: Object.assign({}, _core.patternLikeCommon, { - elements: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("PatternLike"))) - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) - } - }) -}); -(0, _utils.default)("ArrowFunctionExpression", { - builder: ["params", "body", "async"], - visitor: ["params", "body", "returnType", "typeParameters"], - aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], - fields: Object.assign({}, _core.functionCommon, _core.functionTypeAnnotationCommon, { - expression: { - validate: (0, _utils.assertValueType)("boolean") - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement", "Expression") - } - }) -}); -(0, _utils.default)("ClassBody", { - visitor: ["body"], - fields: { - body: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature"))) - } - } -}); -const classCommon = { - typeParameters: { - validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), - optional: true - }, - body: { - validate: (0, _utils.assertNodeType)("ClassBody") - }, - superClass: { - optional: true, - validate: (0, _utils.assertNodeType)("Expression") - }, - superTypeParameters: { - validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), - optional: true - }, - implements: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))), - optional: true - } -}; -(0, _utils.default)("ClassDeclaration", { - builder: ["id", "superClass", "body", "decorators"], - visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"], - aliases: ["Scopable", "Class", "Statement", "Declaration", "Pureish"], - fields: Object.assign({}, classCommon, { - declare: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - abstract: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - id: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - } - }) -}); -(0, _utils.default)("ClassExpression", { - inherits: "ClassDeclaration", - aliases: ["Scopable", "Class", "Expression", "Pureish"], - fields: Object.assign({}, classCommon, { - id: { - optional: true, - validate: (0, _utils.assertNodeType)("Identifier") - }, - body: { - validate: (0, _utils.assertNodeType)("ClassBody") - }, - superClass: { - optional: true, - validate: (0, _utils.assertNodeType)("Expression") - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - } - }) -}); -(0, _utils.default)("ExportAllDeclaration", { - visitor: ["source"], - aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], - fields: { - source: { - validate: (0, _utils.assertNodeType)("StringLiteral") - } - } -}); -(0, _utils.default)("ExportDefaultDeclaration", { - visitor: ["declaration"], - aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], - fields: { - declaration: { - validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression") - } - } -}); -(0, _utils.default)("ExportNamedDeclaration", { - visitor: ["declaration", "specifiers", "source"], - aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], - fields: { - declaration: { - validate: (0, _utils.assertNodeType)("Declaration"), - optional: true - }, - specifiers: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier"))) - }, - source: { - validate: (0, _utils.assertNodeType)("StringLiteral"), - optional: true - }, - exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) - } -}); -(0, _utils.default)("ExportSpecifier", { - visitor: ["local", "exported"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - exported: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("ForOfStatement", { - visitor: ["left", "right", "body"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], - fields: { - left: { - validate: (0, _utils.assertNodeType)("VariableDeclaration", "LVal") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - }, - await: { - default: false, - validate: (0, _utils.assertValueType)("boolean") - } - } -}); -(0, _utils.default)("ImportDeclaration", { - visitor: ["specifiers", "source"], - aliases: ["Statement", "Declaration", "ModuleDeclaration"], - fields: { - specifiers: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier"))) - }, - source: { - validate: (0, _utils.assertNodeType)("StringLiteral") - }, - importKind: { - validate: (0, _utils.assertOneOf)("type", "typeof", "value"), - optional: true - } - } -}); -(0, _utils.default)("ImportDefaultSpecifier", { - visitor: ["local"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("ImportNamespaceSpecifier", { - visitor: ["local"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("ImportSpecifier", { - visitor: ["local", "imported"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - imported: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - importKind: { - validate: (0, _utils.assertOneOf)("type", "typeof"), - optional: true - } - } -}); -(0, _utils.default)("MetaProperty", { - visitor: ["meta", "property"], - aliases: ["Expression"], - fields: { - meta: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - property: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -const classMethodOrPropertyCommon = { - abstract: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - accessibility: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")), - optional: true - }, - static: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - computed: { - default: false, - validate: (0, _utils.assertValueType)("boolean") - }, - optional: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - key: { - validate: (0, _utils.chain)(function () { - const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); - const computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - const validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression")) - } -}; -exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon; -const classMethodOrDeclareMethodCommon = Object.assign({}, _core.functionCommon, classMethodOrPropertyCommon, { - kind: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("get", "set", "method", "constructor")), - default: "method" - }, - access: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")), - optional: true - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - } -}); -exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon; -(0, _utils.default)("ClassMethod", { - aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"], - builder: ["kind", "key", "params", "body", "computed", "static"], - visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], - fields: Object.assign({}, classMethodOrDeclareMethodCommon, _core.functionTypeAnnotationCommon, { - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }) -}); -(0, _utils.default)("ObjectPattern", { - visitor: ["properties", "typeAnnotation", "decorators"], - builder: ["properties"], - aliases: ["Pattern", "PatternLike", "LVal"], - fields: Object.assign({}, _core.patternLikeCommon, { - properties: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty"))) - } - }) -}); -(0, _utils.default)("SpreadElement", { - visitor: ["argument"], - aliases: ["UnaryLike"], - deprecatedAlias: "SpreadProperty", - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("Super", { - aliases: ["Expression"] -}); -(0, _utils.default)("TaggedTemplateExpression", { - visitor: ["tag", "quasi"], - aliases: ["Expression"], - fields: { - tag: { - validate: (0, _utils.assertNodeType)("Expression") - }, - quasi: { - validate: (0, _utils.assertNodeType)("TemplateLiteral") - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), - optional: true - } - } -}); -(0, _utils.default)("TemplateElement", { - builder: ["value", "tail"], - fields: { - value: { - validate: (0, _utils.assertShape)({ - raw: { - validate: (0, _utils.assertValueType)("string") - }, - cooked: { - validate: (0, _utils.assertValueType)("string"), - optional: true - } - }) - }, - tail: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - } - } -}); -(0, _utils.default)("TemplateLiteral", { - visitor: ["quasis", "expressions"], - aliases: ["Expression", "Literal"], - fields: { - quasis: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement"))) - }, - expressions: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression"))) - } - } -}); -(0, _utils.default)("YieldExpression", { - builder: ["argument", "delegate"], - visitor: ["argument"], - aliases: ["Expression", "Terminatorless"], - fields: { - delegate: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - }, - argument: { - optional: true, - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/experimental.js b/node_modules/@babel/types/lib/definitions/experimental.js deleted file mode 100644 index 3332a600..00000000 --- a/node_modules/@babel/types/lib/definitions/experimental.js +++ /dev/null @@ -1,205 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -var _es = require("./es2015"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -(0, _utils.default)("ArgumentPlaceholder", {}); -(0, _utils.default)("AwaitExpression", { - builder: ["argument"], - visitor: ["argument"], - aliases: ["Expression", "Terminatorless"], - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("BindExpression", { - visitor: ["object", "callee"], - aliases: ["Expression"], - fields: {} -}); -(0, _utils.default)("ClassProperty", { - visitor: ["key", "value", "typeAnnotation", "decorators"], - builder: ["key", "value", "typeAnnotation", "decorators", "computed"], - aliases: ["Property"], - fields: Object.assign({}, _es.classMethodOrPropertyCommon, { - value: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - }, - definite: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - typeAnnotation: { - validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), - optional: true - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - }, - readonly: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - } - }) -}); -(0, _utils.default)("OptionalMemberExpression", { - builder: ["object", "property", "computed", "optional"], - visitor: ["object", "property"], - aliases: ["Expression"], - fields: { - object: { - validate: (0, _utils.assertNodeType)("Expression") - }, - property: { - validate: function () { - const normal = (0, _utils.assertNodeType)("Identifier"); - const computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - const validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }() - }, - computed: { - default: false - }, - optional: { - validate: (0, _utils.assertValueType)("boolean") - } - } -}); -(0, _utils.default)("PipelineTopicExpression", { - builder: ["expression"], - visitor: ["expression"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("PipelineBareFunction", { - builder: ["callee"], - visitor: ["callee"], - fields: { - callee: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("PipelinePrimaryTopicReference", { - aliases: ["Expression"] -}); -(0, _utils.default)("OptionalCallExpression", { - visitor: ["callee", "arguments", "typeParameters", "typeArguments"], - builder: ["callee", "arguments", "optional"], - aliases: ["Expression"], - fields: { - callee: { - validate: (0, _utils.assertNodeType)("Expression") - }, - arguments: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName"))) - }, - optional: { - validate: (0, _utils.assertValueType)("boolean") - }, - typeArguments: { - validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), - optional: true - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), - optional: true - } - } -}); -(0, _utils.default)("ClassPrivateProperty", { - visitor: ["key", "value"], - builder: ["key", "value"], - aliases: ["Property", "Private"], - fields: { - key: { - validate: (0, _utils.assertNodeType)("PrivateName") - }, - value: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - } - } -}); -(0, _utils.default)("ClassPrivateMethod", { - builder: ["kind", "key", "params", "body", "static"], - visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], - aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"], - fields: Object.assign({}, _es.classMethodOrDeclareMethodCommon, { - key: { - validate: (0, _utils.assertNodeType)("PrivateName") - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }) -}); -(0, _utils.default)("Import", { - aliases: ["Expression"] -}); -(0, _utils.default)("Decorator", { - visitor: ["expression"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("DoExpression", { - visitor: ["body"], - aliases: ["Expression"], - fields: { - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - } -}); -(0, _utils.default)("ExportDefaultSpecifier", { - visitor: ["exported"], - aliases: ["ModuleSpecifier"], - fields: { - exported: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("ExportNamespaceSpecifier", { - visitor: ["exported"], - aliases: ["ModuleSpecifier"], - fields: { - exported: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("PrivateName", { - visitor: ["id"], - aliases: ["Private"], - fields: { - id: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("BigIntLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("string") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/flow.js b/node_modules/@babel/types/lib/definitions/flow.js deleted file mode 100644 index 07db5e38..00000000 --- a/node_modules/@babel/types/lib/definitions/flow.js +++ /dev/null @@ -1,386 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const defineInterfaceishType = (name, typeParameterType = "TypeParameterDeclaration") => { - (0, _utils.default)(name, { - builder: ["id", "typeParameters", "extends", "body"], - visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)(typeParameterType), - extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), - mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), - implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")), - body: (0, _utils.validateType)("ObjectTypeAnnotation") - } - }); -}; - -(0, _utils.default)("AnyTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("ArrayTypeAnnotation", { - visitor: ["elementType"], - aliases: ["Flow", "FlowType"], - fields: { - elementType: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("BooleanTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("BooleanLiteralTypeAnnotation", { - builder: ["value"], - aliases: ["Flow", "FlowType"], - fields: { - value: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("NullLiteralTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("ClassImplements", { - visitor: ["id", "typeParameters"], - aliases: ["Flow"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") - } -}); -defineInterfaceishType("DeclareClass"); -(0, _utils.default)("DeclareFunction", { - visitor: ["id"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - predicate: (0, _utils.validateOptionalType)("DeclaredPredicate") - } -}); -defineInterfaceishType("DeclareInterface"); -(0, _utils.default)("DeclareModule", { - builder: ["id", "body", "kind"], - visitor: ["id", "body"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), - body: (0, _utils.validateType)("BlockStatement"), - kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES")) - } -}); -(0, _utils.default)("DeclareModuleExports", { - visitor: ["typeAnnotation"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - typeAnnotation: (0, _utils.validateType)("TypeAnnotation") - } -}); -(0, _utils.default)("DeclareTypeAlias", { - visitor: ["id", "typeParameters", "right"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - right: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("DeclareOpaqueType", { - visitor: ["id", "typeParameters", "supertype"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - supertype: (0, _utils.validateOptionalType)("FlowType") - } -}); -(0, _utils.default)("DeclareVariable", { - visitor: ["id"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier") - } -}); -(0, _utils.default)("DeclareExportDeclaration", { - visitor: ["declaration", "specifiers", "source"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - declaration: (0, _utils.validateOptionalType)("Flow"), - specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])), - source: (0, _utils.validateOptionalType)("StringLiteral"), - default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("DeclareExportAllDeclaration", { - visitor: ["source"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - source: (0, _utils.validateType)("StringLiteral"), - exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) - } -}); -(0, _utils.default)("DeclaredPredicate", { - visitor: ["value"], - aliases: ["Flow", "FlowPredicate"], - fields: { - value: (0, _utils.validateType)("Flow") - } -}); -(0, _utils.default)("ExistsTypeAnnotation", { - aliases: ["Flow", "FlowType"] -}); -(0, _utils.default)("FunctionTypeAnnotation", { - visitor: ["typeParameters", "params", "rest", "returnType"], - aliases: ["Flow", "FlowType"], - fields: { - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")), - rest: (0, _utils.validateOptionalType)("FunctionTypeParam"), - returnType: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("FunctionTypeParam", { - visitor: ["name", "typeAnnotation"], - aliases: ["Flow"], - fields: { - name: (0, _utils.validateOptionalType)("Identifier"), - typeAnnotation: (0, _utils.validateType)("FlowType"), - optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("GenericTypeAnnotation", { - visitor: ["id", "typeParameters"], - aliases: ["Flow", "FlowType"], - fields: { - id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") - } -}); -(0, _utils.default)("InferredPredicate", { - aliases: ["Flow", "FlowPredicate"] -}); -(0, _utils.default)("InterfaceExtends", { - visitor: ["id", "typeParameters"], - aliases: ["Flow"], - fields: { - id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") - } -}); -defineInterfaceishType("InterfaceDeclaration"); -(0, _utils.default)("InterfaceTypeAnnotation", { - visitor: ["extends", "body"], - aliases: ["Flow", "FlowType"], - fields: { - extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), - body: (0, _utils.validateType)("ObjectTypeAnnotation") - } -}); -(0, _utils.default)("IntersectionTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow", "FlowType"], - fields: { - types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) - } -}); -(0, _utils.default)("MixedTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("EmptyTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("NullableTypeAnnotation", { - visitor: ["typeAnnotation"], - aliases: ["Flow", "FlowType"], - fields: { - typeAnnotation: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("NumberLiteralTypeAnnotation", { - builder: ["value"], - aliases: ["Flow", "FlowType"], - fields: { - value: (0, _utils.validate)((0, _utils.assertValueType)("number")) - } -}); -(0, _utils.default)("NumberTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("ObjectTypeAnnotation", { - visitor: ["properties", "indexers", "callProperties", "internalSlots"], - aliases: ["Flow", "FlowType"], - builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"], - fields: { - properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])), - indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")), - callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")), - internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")), - exact: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - }, - inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("ObjectTypeInternalSlot", { - visitor: ["id", "value", "optional", "static", "method"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - id: (0, _utils.validateType)("Identifier"), - value: (0, _utils.validateType)("FlowType"), - optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - method: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("ObjectTypeCallProperty", { - visitor: ["value"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - value: (0, _utils.validateType)("FlowType"), - static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("ObjectTypeIndexer", { - visitor: ["id", "key", "value", "variance"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - id: (0, _utils.validateOptionalType)("Identifier"), - key: (0, _utils.validateType)("FlowType"), - value: (0, _utils.validateType)("FlowType"), - static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - variance: (0, _utils.validateOptionalType)("Variance") - } -}); -(0, _utils.default)("ObjectTypeProperty", { - visitor: ["key", "value", "variance"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - key: (0, _utils.validateType)(["Identifier", "StringLiteral"]), - value: (0, _utils.validateType)("FlowType"), - kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")), - static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - variance: (0, _utils.validateOptionalType)("Variance") - } -}); -(0, _utils.default)("ObjectTypeSpreadProperty", { - visitor: ["argument"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - argument: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("OpaqueType", { - visitor: ["id", "typeParameters", "supertype", "impltype"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - supertype: (0, _utils.validateOptionalType)("FlowType"), - impltype: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("QualifiedTypeIdentifier", { - visitor: ["id", "qualification"], - aliases: ["Flow"], - fields: { - id: (0, _utils.validateType)("Identifier"), - qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]) - } -}); -(0, _utils.default)("StringLiteralTypeAnnotation", { - builder: ["value"], - aliases: ["Flow", "FlowType"], - fields: { - value: (0, _utils.validate)((0, _utils.assertValueType)("string")) - } -}); -(0, _utils.default)("StringTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("ThisTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("TupleTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow", "FlowType"], - fields: { - types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) - } -}); -(0, _utils.default)("TypeofTypeAnnotation", { - visitor: ["argument"], - aliases: ["Flow", "FlowType"], - fields: { - argument: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("TypeAlias", { - visitor: ["id", "typeParameters", "right"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - right: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("TypeAnnotation", { - aliases: ["Flow"], - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("TypeCastExpression", { - visitor: ["expression", "typeAnnotation"], - aliases: ["Flow", "ExpressionWrapper", "Expression"], - fields: { - expression: (0, _utils.validateType)("Expression"), - typeAnnotation: (0, _utils.validateType)("TypeAnnotation") - } -}); -(0, _utils.default)("TypeParameter", { - aliases: ["Flow"], - visitor: ["bound", "default", "variance"], - fields: { - name: (0, _utils.validate)((0, _utils.assertValueType)("string")), - bound: (0, _utils.validateOptionalType)("TypeAnnotation"), - default: (0, _utils.validateOptionalType)("FlowType"), - variance: (0, _utils.validateOptionalType)("Variance") - } -}); -(0, _utils.default)("TypeParameterDeclaration", { - aliases: ["Flow"], - visitor: ["params"], - fields: { - params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter")) - } -}); -(0, _utils.default)("TypeParameterInstantiation", { - aliases: ["Flow"], - visitor: ["params"], - fields: { - params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) - } -}); -(0, _utils.default)("UnionTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow", "FlowType"], - fields: { - types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) - } -}); -(0, _utils.default)("Variance", { - aliases: ["Flow"], - builder: ["kind"], - fields: { - kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus")) - } -}); -(0, _utils.default)("VoidTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/index.js b/node_modules/@babel/types/lib/definitions/index.js deleted file mode 100644 index 7f28569f..00000000 --- a/node_modules/@babel/types/lib/definitions/index.js +++ /dev/null @@ -1,101 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "VISITOR_KEYS", { - enumerable: true, - get: function () { - return _utils.VISITOR_KEYS; - } -}); -Object.defineProperty(exports, "ALIAS_KEYS", { - enumerable: true, - get: function () { - return _utils.ALIAS_KEYS; - } -}); -Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", { - enumerable: true, - get: function () { - return _utils.FLIPPED_ALIAS_KEYS; - } -}); -Object.defineProperty(exports, "NODE_FIELDS", { - enumerable: true, - get: function () { - return _utils.NODE_FIELDS; - } -}); -Object.defineProperty(exports, "BUILDER_KEYS", { - enumerable: true, - get: function () { - return _utils.BUILDER_KEYS; - } -}); -Object.defineProperty(exports, "DEPRECATED_KEYS", { - enumerable: true, - get: function () { - return _utils.DEPRECATED_KEYS; - } -}); -Object.defineProperty(exports, "PLACEHOLDERS", { - enumerable: true, - get: function () { - return _placeholders.PLACEHOLDERS; - } -}); -Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", { - enumerable: true, - get: function () { - return _placeholders.PLACEHOLDERS_ALIAS; - } -}); -Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", { - enumerable: true, - get: function () { - return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS; - } -}); -exports.TYPES = void 0; - -function _toFastProperties() { - const data = _interopRequireDefault(require("to-fast-properties")); - - _toFastProperties = function () { - return data; - }; - - return data; -} - -require("./core"); - -require("./es2015"); - -require("./flow"); - -require("./jsx"); - -require("./misc"); - -require("./experimental"); - -require("./typescript"); - -var _utils = require("./utils"); - -var _placeholders = require("./placeholders"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -(0, _toFastProperties().default)(_utils.VISITOR_KEYS); -(0, _toFastProperties().default)(_utils.ALIAS_KEYS); -(0, _toFastProperties().default)(_utils.FLIPPED_ALIAS_KEYS); -(0, _toFastProperties().default)(_utils.NODE_FIELDS); -(0, _toFastProperties().default)(_utils.BUILDER_KEYS); -(0, _toFastProperties().default)(_utils.DEPRECATED_KEYS); -(0, _toFastProperties().default)(_placeholders.PLACEHOLDERS_ALIAS); -(0, _toFastProperties().default)(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS); -const TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS)); -exports.TYPES = TYPES; \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/jsx.js b/node_modules/@babel/types/lib/definitions/jsx.js deleted file mode 100644 index 60d37e98..00000000 --- a/node_modules/@babel/types/lib/definitions/jsx.js +++ /dev/null @@ -1,160 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -(0, _utils.default)("JSXAttribute", { - visitor: ["name", "value"], - aliases: ["JSX", "Immutable"], - fields: { - name: { - validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName") - }, - value: { - optional: true, - validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer") - } - } -}); -(0, _utils.default)("JSXClosingElement", { - visitor: ["name"], - aliases: ["JSX", "Immutable"], - fields: { - name: { - validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression") - } - } -}); -(0, _utils.default)("JSXElement", { - builder: ["openingElement", "closingElement", "children", "selfClosing"], - visitor: ["openingElement", "children", "closingElement"], - aliases: ["JSX", "Immutable", "Expression"], - fields: { - openingElement: { - validate: (0, _utils.assertNodeType)("JSXOpeningElement") - }, - closingElement: { - optional: true, - validate: (0, _utils.assertNodeType)("JSXClosingElement") - }, - children: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) - } - } -}); -(0, _utils.default)("JSXEmptyExpression", { - aliases: ["JSX"] -}); -(0, _utils.default)("JSXExpressionContainer", { - visitor: ["expression"], - aliases: ["JSX", "Immutable"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression") - } - } -}); -(0, _utils.default)("JSXSpreadChild", { - visitor: ["expression"], - aliases: ["JSX", "Immutable"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("JSXIdentifier", { - builder: ["name"], - aliases: ["JSX"], - fields: { - name: { - validate: (0, _utils.assertValueType)("string") - } - } -}); -(0, _utils.default)("JSXMemberExpression", { - visitor: ["object", "property"], - aliases: ["JSX"], - fields: { - object: { - validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier") - }, - property: { - validate: (0, _utils.assertNodeType)("JSXIdentifier") - } - } -}); -(0, _utils.default)("JSXNamespacedName", { - visitor: ["namespace", "name"], - aliases: ["JSX"], - fields: { - namespace: { - validate: (0, _utils.assertNodeType)("JSXIdentifier") - }, - name: { - validate: (0, _utils.assertNodeType)("JSXIdentifier") - } - } -}); -(0, _utils.default)("JSXOpeningElement", { - builder: ["name", "attributes", "selfClosing"], - visitor: ["name", "attributes"], - aliases: ["JSX", "Immutable"], - fields: { - name: { - validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression") - }, - selfClosing: { - default: false, - validate: (0, _utils.assertValueType)("boolean") - }, - attributes: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute"))) - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), - optional: true - } - } -}); -(0, _utils.default)("JSXSpreadAttribute", { - visitor: ["argument"], - aliases: ["JSX"], - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("JSXText", { - aliases: ["JSX", "Immutable"], - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("string") - } - } -}); -(0, _utils.default)("JSXFragment", { - builder: ["openingFragment", "closingFragment", "children"], - visitor: ["openingFragment", "children", "closingFragment"], - aliases: ["JSX", "Immutable", "Expression"], - fields: { - openingFragment: { - validate: (0, _utils.assertNodeType)("JSXOpeningFragment") - }, - closingFragment: { - validate: (0, _utils.assertNodeType)("JSXClosingFragment") - }, - children: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) - } - } -}); -(0, _utils.default)("JSXOpeningFragment", { - aliases: ["JSX", "Immutable"] -}); -(0, _utils.default)("JSXClosingFragment", { - aliases: ["JSX", "Immutable"] -}); \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/misc.js b/node_modules/@babel/types/lib/definitions/misc.js deleted file mode 100644 index ecc4db67..00000000 --- a/node_modules/@babel/types/lib/definitions/misc.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -var _placeholders = require("./placeholders"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -(0, _utils.default)("Noop", { - visitor: [] -}); -(0, _utils.default)("Placeholder", { - visitor: [], - builder: ["expectedNode", "name"], - fields: { - name: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - expectedNode: { - validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS) - } - } -}); \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/placeholders.js b/node_modules/@babel/types/lib/definitions/placeholders.js deleted file mode 100644 index 0edf7b2e..00000000 --- a/node_modules/@babel/types/lib/definitions/placeholders.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0; - -var _utils = require("./utils"); - -const PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"]; -exports.PLACEHOLDERS = PLACEHOLDERS; -const PLACEHOLDERS_ALIAS = { - Declaration: ["Statement"], - Pattern: ["PatternLike", "LVal"] -}; -exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS; - -for (const type of PLACEHOLDERS) { - const alias = _utils.ALIAS_KEYS[type]; - if (alias && alias.length) PLACEHOLDERS_ALIAS[type] = alias; -} - -const PLACEHOLDERS_FLIPPED_ALIAS = {}; -exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS; -Object.keys(PLACEHOLDERS_ALIAS).forEach(type => { - PLACEHOLDERS_ALIAS[type].forEach(alias => { - if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) { - PLACEHOLDERS_FLIPPED_ALIAS[alias] = []; - } - - PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type); - }); -}); \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/typescript.js b/node_modules/@babel/types/lib/definitions/typescript.js deleted file mode 100644 index 4d9be114..00000000 --- a/node_modules/@babel/types/lib/definitions/typescript.js +++ /dev/null @@ -1,412 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -var _core = require("./core"); - -var _es = require("./es2015"); - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -const bool = (0, _utils.assertValueType)("boolean"); -const tSFunctionTypeAnnotationCommon = { - returnType: { - validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"), - optional: true - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"), - optional: true - } -}; -(0, _utils.default)("TSParameterProperty", { - aliases: ["LVal"], - visitor: ["parameter"], - fields: { - accessibility: { - validate: (0, _utils.assertOneOf)("public", "private", "protected"), - optional: true - }, - readonly: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - parameter: { - validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern") - } - } -}); -(0, _utils.default)("TSDeclareFunction", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "typeParameters", "params", "returnType"], - fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon) -}); -(0, _utils.default)("TSDeclareMethod", { - visitor: ["decorators", "key", "typeParameters", "params", "returnType"], - fields: Object.assign({}, _es.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon) -}); -(0, _utils.default)("TSQualifiedName", { - aliases: ["TSEntityName"], - visitor: ["left", "right"], - fields: { - left: (0, _utils.validateType)("TSEntityName"), - right: (0, _utils.validateType)("Identifier") - } -}); -const signatureDeclarationCommon = { - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), - parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]), - typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") -}; -const callConstructSignatureDeclaration = { - aliases: ["TSTypeElement"], - visitor: ["typeParameters", "parameters", "typeAnnotation"], - fields: signatureDeclarationCommon -}; -(0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration); -(0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration); -const namedTypeElementCommon = { - key: (0, _utils.validateType)("Expression"), - computed: (0, _utils.validate)(bool), - optional: (0, _utils.validateOptional)(bool) -}; -(0, _utils.default)("TSPropertySignature", { - aliases: ["TSTypeElement"], - visitor: ["key", "typeAnnotation", "initializer"], - fields: Object.assign({}, namedTypeElementCommon, { - readonly: (0, _utils.validateOptional)(bool), - typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), - initializer: (0, _utils.validateOptionalType)("Expression") - }) -}); -(0, _utils.default)("TSMethodSignature", { - aliases: ["TSTypeElement"], - visitor: ["key", "typeParameters", "parameters", "typeAnnotation"], - fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon) -}); -(0, _utils.default)("TSIndexSignature", { - aliases: ["TSTypeElement"], - visitor: ["parameters", "typeAnnotation"], - fields: { - readonly: (0, _utils.validateOptional)(bool), - parameters: (0, _utils.validateArrayOfType)("Identifier"), - typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") - } -}); -const tsKeywordTypes = ["TSAnyKeyword", "TSUnknownKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSBooleanKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSVoidKeyword", "TSUndefinedKeyword", "TSNullKeyword", "TSNeverKeyword"]; - -for (const type of tsKeywordTypes) { - (0, _utils.default)(type, { - aliases: ["TSType"], - visitor: [], - fields: {} - }); -} - -(0, _utils.default)("TSThisType", { - aliases: ["TSType"], - visitor: [], - fields: {} -}); -const fnOrCtr = { - aliases: ["TSType"], - visitor: ["typeParameters", "parameters", "typeAnnotation"], - fields: signatureDeclarationCommon -}; -(0, _utils.default)("TSFunctionType", fnOrCtr); -(0, _utils.default)("TSConstructorType", fnOrCtr); -(0, _utils.default)("TSTypeReference", { - aliases: ["TSType"], - visitor: ["typeName", "typeParameters"], - fields: { - typeName: (0, _utils.validateType)("TSEntityName"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") - } -}); -(0, _utils.default)("TSTypePredicate", { - aliases: ["TSType"], - visitor: ["parameterName", "typeAnnotation"], - fields: { - parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]), - typeAnnotation: (0, _utils.validateType)("TSTypeAnnotation") - } -}); -(0, _utils.default)("TSTypeQuery", { - aliases: ["TSType"], - visitor: ["exprName"], - fields: { - exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"]) - } -}); -(0, _utils.default)("TSTypeLiteral", { - aliases: ["TSType"], - visitor: ["members"], - fields: { - members: (0, _utils.validateArrayOfType)("TSTypeElement") - } -}); -(0, _utils.default)("TSArrayType", { - aliases: ["TSType"], - visitor: ["elementType"], - fields: { - elementType: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSTupleType", { - aliases: ["TSType"], - visitor: ["elementTypes"], - fields: { - elementTypes: (0, _utils.validateArrayOfType)("TSType") - } -}); -(0, _utils.default)("TSOptionalType", { - aliases: ["TSType"], - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSRestType", { - aliases: ["TSType"], - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -const unionOrIntersection = { - aliases: ["TSType"], - visitor: ["types"], - fields: { - types: (0, _utils.validateArrayOfType)("TSType") - } -}; -(0, _utils.default)("TSUnionType", unionOrIntersection); -(0, _utils.default)("TSIntersectionType", unionOrIntersection); -(0, _utils.default)("TSConditionalType", { - aliases: ["TSType"], - visitor: ["checkType", "extendsType", "trueType", "falseType"], - fields: { - checkType: (0, _utils.validateType)("TSType"), - extendsType: (0, _utils.validateType)("TSType"), - trueType: (0, _utils.validateType)("TSType"), - falseType: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSInferType", { - aliases: ["TSType"], - visitor: ["typeParameter"], - fields: { - typeParameter: (0, _utils.validateType)("TSTypeParameter") - } -}); -(0, _utils.default)("TSParenthesizedType", { - aliases: ["TSType"], - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSTypeOperator", { - aliases: ["TSType"], - visitor: ["typeAnnotation"], - fields: { - operator: (0, _utils.validate)((0, _utils.assertValueType)("string")), - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSIndexedAccessType", { - aliases: ["TSType"], - visitor: ["objectType", "indexType"], - fields: { - objectType: (0, _utils.validateType)("TSType"), - indexType: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSMappedType", { - aliases: ["TSType"], - visitor: ["typeParameter", "typeAnnotation"], - fields: { - readonly: (0, _utils.validateOptional)(bool), - typeParameter: (0, _utils.validateType)("TSTypeParameter"), - optional: (0, _utils.validateOptional)(bool), - typeAnnotation: (0, _utils.validateOptionalType)("TSType") - } -}); -(0, _utils.default)("TSLiteralType", { - aliases: ["TSType"], - visitor: ["literal"], - fields: { - literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral"]) - } -}); -(0, _utils.default)("TSExpressionWithTypeArguments", { - aliases: ["TSType"], - visitor: ["expression", "typeParameters"], - fields: { - expression: (0, _utils.validateType)("TSEntityName"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") - } -}); -(0, _utils.default)("TSInterfaceDeclaration", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "typeParameters", "extends", "body"], - fields: { - declare: (0, _utils.validateOptional)(bool), - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), - extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")), - body: (0, _utils.validateType)("TSInterfaceBody") - } -}); -(0, _utils.default)("TSInterfaceBody", { - visitor: ["body"], - fields: { - body: (0, _utils.validateArrayOfType)("TSTypeElement") - } -}); -(0, _utils.default)("TSTypeAliasDeclaration", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "typeParameters", "typeAnnotation"], - fields: { - declare: (0, _utils.validateOptional)(bool), - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSAsExpression", { - aliases: ["Expression"], - visitor: ["expression", "typeAnnotation"], - fields: { - expression: (0, _utils.validateType)("Expression"), - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSTypeAssertion", { - aliases: ["Expression"], - visitor: ["typeAnnotation", "expression"], - fields: { - typeAnnotation: (0, _utils.validateType)("TSType"), - expression: (0, _utils.validateType)("Expression") - } -}); -(0, _utils.default)("TSEnumDeclaration", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "members"], - fields: { - declare: (0, _utils.validateOptional)(bool), - const: (0, _utils.validateOptional)(bool), - id: (0, _utils.validateType)("Identifier"), - members: (0, _utils.validateArrayOfType)("TSEnumMember"), - initializer: (0, _utils.validateOptionalType)("Expression") - } -}); -(0, _utils.default)("TSEnumMember", { - visitor: ["id", "initializer"], - fields: { - id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), - initializer: (0, _utils.validateOptionalType)("Expression") - } -}); -(0, _utils.default)("TSModuleDeclaration", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "body"], - fields: { - declare: (0, _utils.validateOptional)(bool), - global: (0, _utils.validateOptional)(bool), - id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), - body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"]) - } -}); -(0, _utils.default)("TSModuleBlock", { - aliases: ["Scopable", "Block", "BlockParent"], - visitor: ["body"], - fields: { - body: (0, _utils.validateArrayOfType)("Statement") - } -}); -(0, _utils.default)("TSImportType", { - aliases: ["TSType"], - visitor: ["argument", "qualifier", "typeParameters"], - fields: { - argument: (0, _utils.validateType)("StringLiteral"), - qualifier: (0, _utils.validateOptionalType)("TSEntityName"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") - } -}); -(0, _utils.default)("TSImportEqualsDeclaration", { - aliases: ["Statement"], - visitor: ["id", "moduleReference"], - fields: { - isExport: (0, _utils.validate)(bool), - id: (0, _utils.validateType)("Identifier"), - moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"]) - } -}); -(0, _utils.default)("TSExternalModuleReference", { - visitor: ["expression"], - fields: { - expression: (0, _utils.validateType)("StringLiteral") - } -}); -(0, _utils.default)("TSNonNullExpression", { - aliases: ["Expression"], - visitor: ["expression"], - fields: { - expression: (0, _utils.validateType)("Expression") - } -}); -(0, _utils.default)("TSExportAssignment", { - aliases: ["Statement"], - visitor: ["expression"], - fields: { - expression: (0, _utils.validateType)("Expression") - } -}); -(0, _utils.default)("TSNamespaceExportDeclaration", { - aliases: ["Statement"], - visitor: ["id"], - fields: { - id: (0, _utils.validateType)("Identifier") - } -}); -(0, _utils.default)("TSTypeAnnotation", { - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: { - validate: (0, _utils.assertNodeType)("TSType") - } - } -}); -(0, _utils.default)("TSTypeParameterInstantiation", { - visitor: ["params"], - fields: { - params: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType"))) - } - } -}); -(0, _utils.default)("TSTypeParameterDeclaration", { - visitor: ["params"], - fields: { - params: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter"))) - } - } -}); -(0, _utils.default)("TSTypeParameter", { - visitor: ["constraint", "default"], - fields: { - name: { - validate: (0, _utils.assertValueType)("string") - }, - constraint: { - validate: (0, _utils.assertNodeType)("TSType"), - optional: true - }, - default: { - validate: (0, _utils.assertNodeType)("TSType"), - optional: true - } - } -}); \ No newline at end of file diff --git a/node_modules/@babel/types/lib/definitions/utils.js b/node_modules/@babel/types/lib/definitions/utils.js deleted file mode 100644 index 95ba9740..00000000 --- a/node_modules/@babel/types/lib/definitions/utils.js +++ /dev/null @@ -1,249 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.validate = validate; -exports.typeIs = typeIs; -exports.validateType = validateType; -exports.validateOptional = validateOptional; -exports.validateOptionalType = validateOptionalType; -exports.arrayOf = arrayOf; -exports.arrayOfType = arrayOfType; -exports.validateArrayOfType = validateArrayOfType; -exports.assertEach = assertEach; -exports.assertOneOf = assertOneOf; -exports.assertNodeType = assertNodeType; -exports.assertNodeOrValueType = assertNodeOrValueType; -exports.assertValueType = assertValueType; -exports.assertShape = assertShape; -exports.chain = chain; -exports.default = defineType; -exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0; - -var _is = _interopRequireDefault(require("../validators/is")); - -var _validate = require("../validators/validate"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const VISITOR_KEYS = {}; -exports.VISITOR_KEYS = VISITOR_KEYS; -const ALIAS_KEYS = {}; -exports.ALIAS_KEYS = ALIAS_KEYS; -const FLIPPED_ALIAS_KEYS = {}; -exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS; -const NODE_FIELDS = {}; -exports.NODE_FIELDS = NODE_FIELDS; -const BUILDER_KEYS = {}; -exports.BUILDER_KEYS = BUILDER_KEYS; -const DEPRECATED_KEYS = {}; -exports.DEPRECATED_KEYS = DEPRECATED_KEYS; - -function getType(val) { - if (Array.isArray(val)) { - return "array"; - } else if (val === null) { - return "null"; - } else if (val === undefined) { - return "undefined"; - } else { - return typeof val; - } -} - -function validate(validate) { - return { - validate - }; -} - -function typeIs(typeName) { - return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName); -} - -function validateType(typeName) { - return validate(typeIs(typeName)); -} - -function validateOptional(validate) { - return { - validate, - optional: true - }; -} - -function validateOptionalType(typeName) { - return { - validate: typeIs(typeName), - optional: true - }; -} - -function arrayOf(elementType) { - return chain(assertValueType("array"), assertEach(elementType)); -} - -function arrayOfType(typeName) { - return arrayOf(typeIs(typeName)); -} - -function validateArrayOfType(typeName) { - return validate(arrayOfType(typeName)); -} - -function assertEach(callback) { - function validator(node, key, val) { - if (!Array.isArray(val)) return; - - for (let i = 0; i < val.length; i++) { - callback(node, `${key}[${i}]`, val[i]); - } - } - - validator.each = callback; - return validator; -} - -function assertOneOf(...values) { - function validate(node, key, val) { - if (values.indexOf(val) < 0) { - throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`); - } - } - - validate.oneOf = values; - return validate; -} - -function assertNodeType(...types) { - function validate(node, key, val) { - let valid = false; - - for (const type of types) { - if ((0, _is.default)(type, val)) { - valid = true; - break; - } - } - - if (!valid) { - throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} ` + `but instead got ${JSON.stringify(val && val.type)}`); - } - } - - validate.oneOfNodeTypes = types; - return validate; -} - -function assertNodeOrValueType(...types) { - function validate(node, key, val) { - let valid = false; - - for (const type of types) { - if (getType(val) === type || (0, _is.default)(type, val)) { - valid = true; - break; - } - } - - if (!valid) { - throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} ` + `but instead got ${JSON.stringify(val && val.type)}`); - } - } - - validate.oneOfNodeOrValueTypes = types; - return validate; -} - -function assertValueType(type) { - function validate(node, key, val) { - const valid = getType(val) === type; - - if (!valid) { - throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`); - } - } - - validate.type = type; - return validate; -} - -function assertShape(shape) { - function validate(node, key, val) { - const errors = []; - - for (const property of Object.keys(shape)) { - try { - (0, _validate.validateField)(node, property, val[property], shape[property]); - } catch (error) { - if (error instanceof TypeError) { - errors.push(error.message); - continue; - } - - throw error; - } - } - - if (errors.length) { - throw new TypeError(`Property ${key} of ${node.type} expected to have the following:\n${errors.join("\n")}`); - } - } - - validate.shapeOf = shape; - return validate; -} - -function chain(...fns) { - function validate(...args) { - for (const fn of fns) { - fn(...args); - } - } - - validate.chainOf = fns; - return validate; -} - -function defineType(type, opts = {}) { - const inherits = opts.inherits && store[opts.inherits] || {}; - const fields = opts.fields || inherits.fields || {}; - const visitor = opts.visitor || inherits.visitor || []; - const aliases = opts.aliases || inherits.aliases || []; - const builder = opts.builder || inherits.builder || opts.visitor || []; - - if (opts.deprecatedAlias) { - DEPRECATED_KEYS[opts.deprecatedAlias] = type; - } - - for (const key of visitor.concat(builder)) { - fields[key] = fields[key] || {}; - } - - for (const key of Object.keys(fields)) { - const field = fields[key]; - - if (builder.indexOf(key) === -1) { - field.optional = true; - } - - if (field.default === undefined) { - field.default = null; - } else if (!field.validate) { - field.validate = assertValueType(getType(field.default)); - } - } - - VISITOR_KEYS[type] = opts.visitor = visitor; - BUILDER_KEYS[type] = opts.builder = builder; - NODE_FIELDS[type] = opts.fields = fields; - ALIAS_KEYS[type] = opts.aliases = aliases; - aliases.forEach(alias => { - FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || []; - FLIPPED_ALIAS_KEYS[alias].push(type); - }); - store[type] = opts; -} - -const store = {}; \ No newline at end of file diff --git a/node_modules/@babel/types/lib/index.d.ts b/node_modules/@babel/types/lib/index.d.ts deleted file mode 100644 index 8612561d..00000000 --- a/node_modules/@babel/types/lib/index.d.ts +++ /dev/null @@ -1,2073 +0,0 @@ -// NOTE: This file is autogenerated. Do not modify. -// See packages/babel-types/scripts/generators/typescript.js for script used. - -interface BaseComment { - value: string; - start: number; - end: number; - loc: SourceLocation; - type: "CommentBlock" | "CommentLine"; -} - -export interface CommentBlock extends BaseComment { - type: "CommentBlock"; -} - -export interface CommentLine extends BaseComment { - type: "CommentLine"; -} - -export type Comment = CommentBlock | CommentLine; - -export interface SourceLocation { - start: { - line: number; - column: number; - }; - - end: { - line: number; - column: number; - }; -} - -interface BaseNode { - leadingComments: ReadonlyArray | null; - innerComments: ReadonlyArray | null; - trailingComments: ReadonlyArray | null; - start: number | null; - end: number | null; - loc: SourceLocation | null; - type: Node["type"]; -} - -export type Node = AnyTypeAnnotation | ArgumentPlaceholder | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BigIntLiteral | Binary | BinaryExpression | BindExpression | Block | BlockParent | BlockStatement | BooleanLiteral | BooleanLiteralTypeAnnotation | BooleanTypeAnnotation | BreakStatement | CallExpression | CatchClause | Class | ClassBody | ClassDeclaration | ClassExpression | ClassImplements | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | CompletionStatement | Conditional | ConditionalExpression | ContinueStatement | DebuggerStatement | Declaration | DeclareClass | DeclareExportAllDeclaration | DeclareExportDeclaration | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareOpaqueType | DeclareTypeAlias | DeclareVariable | DeclaredPredicate | Decorator | Directive | DirectiveLiteral | DoExpression | DoWhileStatement | EmptyStatement | EmptyTypeAnnotation | ExistsTypeAnnotation | ExportAllDeclaration | ExportDeclaration | ExportDefaultDeclaration | ExportDefaultSpecifier | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportSpecifier | Expression | ExpressionStatement | ExpressionWrapper | File | Flow | FlowBaseAnnotation | FlowDeclaration | FlowPredicate | FlowType | For | ForInStatement | ForOfStatement | ForStatement | ForXStatement | Function | FunctionDeclaration | FunctionExpression | FunctionParent | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | Identifier | IfStatement | Immutable | Import | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | InferredPredicate | InterfaceDeclaration | InterfaceExtends | InterfaceTypeAnnotation | InterpreterDirective | IntersectionTypeAnnotation | JSX | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LVal | LabeledStatement | Literal | LogicalExpression | Loop | MemberExpression | MetaProperty | Method | MixedTypeAnnotation | ModuleDeclaration | ModuleSpecifier | NewExpression | Noop | NullLiteral | NullLiteralTypeAnnotation | NullableTypeAnnotation | NumberLiteral | NumberLiteralTypeAnnotation | NumberTypeAnnotation | NumericLiteral | ObjectExpression | ObjectMember | ObjectMethod | ObjectPattern | ObjectProperty | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | Pattern | PatternLike | PipelineBareFunction | PipelinePrimaryTopicReference | PipelineTopicExpression | Placeholder | Private | PrivateName | Program | Property | Pureish | QualifiedTypeIdentifier | RegExpLiteral | RegexLiteral | RestElement | RestProperty | ReturnStatement | Scopable | SequenceExpression | SpreadElement | SpreadProperty | Statement | StringLiteral | StringLiteralTypeAnnotation | StringTypeAnnotation | Super | SwitchCase | SwitchStatement | TSAnyKeyword | TSArrayType | TSAsExpression | TSBooleanKeyword | TSCallSignatureDeclaration | TSConditionalType | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSEntityName | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExpressionWithTypeArguments | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexSignature | TSIndexedAccessType | TSInferType | TSInterfaceBody | TSInterfaceDeclaration | TSIntersectionType | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSParenthesizedType | TSPropertySignature | TSQualifiedName | TSRestType | TSStringKeyword | TSSymbolKeyword | TSThisType | TSTupleType | TSType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeElement | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | TaggedTemplateExpression | TemplateElement | TemplateLiteral | Terminatorless | ThisExpression | ThisTypeAnnotation | ThrowStatement | TryStatement | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | TypeofTypeAnnotation | UnaryExpression | UnaryLike | UnionTypeAnnotation | UpdateExpression | UserWhitespacable | VariableDeclaration | VariableDeclarator | Variance | VoidTypeAnnotation | While | WhileStatement | WithStatement | YieldExpression; - -export interface ArrayExpression extends BaseNode { - type: "ArrayExpression"; - elements: Array; -} - -export interface AssignmentExpression extends BaseNode { - type: "AssignmentExpression"; - operator: string; - left: LVal; - right: Expression; -} - -export interface BinaryExpression extends BaseNode { - type: "BinaryExpression"; - operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<="; - left: Expression; - right: Expression; -} - -export interface InterpreterDirective extends BaseNode { - type: "InterpreterDirective"; - value: string; -} - -export interface Directive extends BaseNode { - type: "Directive"; - value: DirectiveLiteral; -} - -export interface DirectiveLiteral extends BaseNode { - type: "DirectiveLiteral"; - value: string; -} - -export interface BlockStatement extends BaseNode { - type: "BlockStatement"; - body: Array; - directives: Array; -} - -export interface BreakStatement extends BaseNode { - type: "BreakStatement"; - label: Identifier | null; -} - -export interface CallExpression extends BaseNode { - type: "CallExpression"; - callee: Expression; - arguments: Array; - optional: true | false | null; - typeArguments: TypeParameterInstantiation | null; - typeParameters: TSTypeParameterInstantiation | null; -} - -export interface CatchClause extends BaseNode { - type: "CatchClause"; - param: Identifier | null; - body: BlockStatement; -} - -export interface ConditionalExpression extends BaseNode { - type: "ConditionalExpression"; - test: Expression; - consequent: Expression; - alternate: Expression; -} - -export interface ContinueStatement extends BaseNode { - type: "ContinueStatement"; - label: Identifier | null; -} - -export interface DebuggerStatement extends BaseNode { - type: "DebuggerStatement"; -} - -export interface DoWhileStatement extends BaseNode { - type: "DoWhileStatement"; - test: Expression; - body: Statement; -} - -export interface EmptyStatement extends BaseNode { - type: "EmptyStatement"; -} - -export interface ExpressionStatement extends BaseNode { - type: "ExpressionStatement"; - expression: Expression; -} - -export interface File extends BaseNode { - type: "File"; - program: Program; - comments: any; - tokens: any; -} - -export interface ForInStatement extends BaseNode { - type: "ForInStatement"; - left: VariableDeclaration | LVal; - right: Expression; - body: Statement; -} - -export interface ForStatement extends BaseNode { - type: "ForStatement"; - init: VariableDeclaration | Expression | null; - test: Expression | null; - update: Expression | null; - body: Statement; -} - -export interface FunctionDeclaration extends BaseNode { - type: "FunctionDeclaration"; - id: Identifier | null; - params: Array; - body: BlockStatement; - generator: boolean; - async: boolean; - declare: boolean | null; - returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface FunctionExpression extends BaseNode { - type: "FunctionExpression"; - id: Identifier | null; - params: Array; - body: BlockStatement; - generator: boolean; - async: boolean; - returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface Identifier extends BaseNode { - type: "Identifier"; - name: string; - decorators: Array | null; - optional: boolean | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; -} - -export interface IfStatement extends BaseNode { - type: "IfStatement"; - test: Expression; - consequent: Statement; - alternate: Statement | null; -} - -export interface LabeledStatement extends BaseNode { - type: "LabeledStatement"; - label: Identifier; - body: Statement; -} - -export interface StringLiteral extends BaseNode { - type: "StringLiteral"; - value: string; -} - -export interface NumericLiteral extends BaseNode { - type: "NumericLiteral"; - value: number; -} - -export interface NullLiteral extends BaseNode { - type: "NullLiteral"; -} - -export interface BooleanLiteral extends BaseNode { - type: "BooleanLiteral"; - value: boolean; -} - -export interface RegExpLiteral extends BaseNode { - type: "RegExpLiteral"; - pattern: string; - flags: string; -} - -export interface LogicalExpression extends BaseNode { - type: "LogicalExpression"; - operator: "||" | "&&" | "??"; - left: Expression; - right: Expression; -} - -export interface MemberExpression extends BaseNode { - type: "MemberExpression"; - object: Expression; - property: any; - computed: boolean; - optional: true | false | null; -} - -export interface NewExpression extends BaseNode { - type: "NewExpression"; - callee: Expression; - arguments: Array; - optional: true | false | null; - typeArguments: TypeParameterInstantiation | null; - typeParameters: TSTypeParameterInstantiation | null; -} - -export interface Program extends BaseNode { - type: "Program"; - body: Array; - directives: Array; - sourceType: "script" | "module"; - interpreter: InterpreterDirective | null; - sourceFile: string | null; -} - -export interface ObjectExpression extends BaseNode { - type: "ObjectExpression"; - properties: Array; -} - -export interface ObjectMethod extends BaseNode { - type: "ObjectMethod"; - kind: "method" | "get" | "set"; - key: any; - params: Array; - body: BlockStatement; - computed: boolean; - async: boolean; - decorators: Array | null; - generator: boolean; - returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface ObjectProperty extends BaseNode { - type: "ObjectProperty"; - key: any; - value: Expression | PatternLike; - computed: boolean; - shorthand: boolean; - decorators: Array | null; -} - -export interface RestElement extends BaseNode { - type: "RestElement"; - argument: LVal; - decorators: Array | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; -} - -export interface ReturnStatement extends BaseNode { - type: "ReturnStatement"; - argument: Expression | null; -} - -export interface SequenceExpression extends BaseNode { - type: "SequenceExpression"; - expressions: Array; -} - -export interface ParenthesizedExpression extends BaseNode { - type: "ParenthesizedExpression"; - expression: Expression; -} - -export interface SwitchCase extends BaseNode { - type: "SwitchCase"; - test: Expression | null; - consequent: Array; -} - -export interface SwitchStatement extends BaseNode { - type: "SwitchStatement"; - discriminant: Expression; - cases: Array; -} - -export interface ThisExpression extends BaseNode { - type: "ThisExpression"; -} - -export interface ThrowStatement extends BaseNode { - type: "ThrowStatement"; - argument: Expression; -} - -export interface TryStatement extends BaseNode { - type: "TryStatement"; - block: BlockStatement; - handler: CatchClause | null; - finalizer: BlockStatement | null; -} - -export interface UnaryExpression extends BaseNode { - type: "UnaryExpression"; - operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof"; - argument: Expression; - prefix: boolean; -} - -export interface UpdateExpression extends BaseNode { - type: "UpdateExpression"; - operator: "++" | "--"; - argument: Expression; - prefix: boolean; -} - -export interface VariableDeclaration extends BaseNode { - type: "VariableDeclaration"; - kind: "var" | "let" | "const"; - declarations: Array; - declare: boolean | null; -} - -export interface VariableDeclarator extends BaseNode { - type: "VariableDeclarator"; - id: LVal; - init: Expression | null; - definite: boolean | null; -} - -export interface WhileStatement extends BaseNode { - type: "WhileStatement"; - test: Expression; - body: BlockStatement | Statement; -} - -export interface WithStatement extends BaseNode { - type: "WithStatement"; - object: Expression; - body: BlockStatement | Statement; -} - -export interface AssignmentPattern extends BaseNode { - type: "AssignmentPattern"; - left: Identifier | ObjectPattern | ArrayPattern | MemberExpression; - right: Expression; - decorators: Array | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; -} - -export interface ArrayPattern extends BaseNode { - type: "ArrayPattern"; - elements: Array; - decorators: Array | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; -} - -export interface ArrowFunctionExpression extends BaseNode { - type: "ArrowFunctionExpression"; - params: Array; - body: BlockStatement | Expression; - async: boolean; - expression: boolean | null; - generator: boolean; - returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface ClassBody extends BaseNode { - type: "ClassBody"; - body: Array; -} - -export interface ClassDeclaration extends BaseNode { - type: "ClassDeclaration"; - id: Identifier | null; - superClass: Expression | null; - body: ClassBody; - decorators: Array | null; - abstract: boolean | null; - declare: boolean | null; - implements: Array | null; - mixins: any | null; - superTypeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface ClassExpression extends BaseNode { - type: "ClassExpression"; - id: Identifier | null; - superClass: Expression | null; - body: ClassBody; - decorators: Array | null; - implements: Array | null; - mixins: any | null; - superTypeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface ExportAllDeclaration extends BaseNode { - type: "ExportAllDeclaration"; - source: StringLiteral; -} - -export interface ExportDefaultDeclaration extends BaseNode { - type: "ExportDefaultDeclaration"; - declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression; -} - -export interface ExportNamedDeclaration extends BaseNode { - type: "ExportNamedDeclaration"; - declaration: Declaration | null; - specifiers: Array; - source: StringLiteral | null; - exportKind: "type" | "value" | null; -} - -export interface ExportSpecifier extends BaseNode { - type: "ExportSpecifier"; - local: Identifier; - exported: Identifier; -} - -export interface ForOfStatement extends BaseNode { - type: "ForOfStatement"; - left: VariableDeclaration | LVal; - right: Expression; - body: Statement; - await: boolean; -} - -export interface ImportDeclaration extends BaseNode { - type: "ImportDeclaration"; - specifiers: Array; - source: StringLiteral; - importKind: "type" | "typeof" | "value" | null; -} - -export interface ImportDefaultSpecifier extends BaseNode { - type: "ImportDefaultSpecifier"; - local: Identifier; -} - -export interface ImportNamespaceSpecifier extends BaseNode { - type: "ImportNamespaceSpecifier"; - local: Identifier; -} - -export interface ImportSpecifier extends BaseNode { - type: "ImportSpecifier"; - local: Identifier; - imported: Identifier; - importKind: "type" | "typeof" | null; -} - -export interface MetaProperty extends BaseNode { - type: "MetaProperty"; - meta: Identifier; - property: Identifier; -} - -export interface ClassMethod extends BaseNode { - type: "ClassMethod"; - kind: "get" | "set" | "method" | "constructor"; - key: Identifier | StringLiteral | NumericLiteral | Expression; - params: Array; - body: BlockStatement; - computed: boolean; - static: boolean | null; - abstract: boolean | null; - access: "public" | "private" | "protected" | null; - accessibility: "public" | "private" | "protected" | null; - async: boolean; - decorators: Array | null; - generator: boolean; - optional: boolean | null; - returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface ObjectPattern extends BaseNode { - type: "ObjectPattern"; - properties: Array; - decorators: Array | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; -} - -export interface SpreadElement extends BaseNode { - type: "SpreadElement"; - argument: Expression; -} - -export interface Super extends BaseNode { - type: "Super"; -} - -export interface TaggedTemplateExpression extends BaseNode { - type: "TaggedTemplateExpression"; - tag: Expression; - quasi: TemplateLiteral; - typeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; -} - -export interface TemplateElement extends BaseNode { - type: "TemplateElement"; - value: { raw: string, cooked?: string }; - tail: boolean; -} - -export interface TemplateLiteral extends BaseNode { - type: "TemplateLiteral"; - quasis: Array; - expressions: Array; -} - -export interface YieldExpression extends BaseNode { - type: "YieldExpression"; - argument: Expression | null; - delegate: boolean; -} - -export interface AnyTypeAnnotation extends BaseNode { - type: "AnyTypeAnnotation"; -} - -export interface ArrayTypeAnnotation extends BaseNode { - type: "ArrayTypeAnnotation"; - elementType: FlowType; -} - -export interface BooleanTypeAnnotation extends BaseNode { - type: "BooleanTypeAnnotation"; -} - -export interface BooleanLiteralTypeAnnotation extends BaseNode { - type: "BooleanLiteralTypeAnnotation"; - value: boolean; -} - -export interface NullLiteralTypeAnnotation extends BaseNode { - type: "NullLiteralTypeAnnotation"; -} - -export interface ClassImplements extends BaseNode { - type: "ClassImplements"; - id: Identifier; - typeParameters: TypeParameterInstantiation | null; -} - -export interface DeclareClass extends BaseNode { - type: "DeclareClass"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - extends: Array | null; - body: ObjectTypeAnnotation; - implements: Array | null; - mixins: Array | null; -} - -export interface DeclareFunction extends BaseNode { - type: "DeclareFunction"; - id: Identifier; - predicate: DeclaredPredicate | null; -} - -export interface DeclareInterface extends BaseNode { - type: "DeclareInterface"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - extends: Array | null; - body: ObjectTypeAnnotation; - implements: Array | null; - mixins: Array | null; -} - -export interface DeclareModule extends BaseNode { - type: "DeclareModule"; - id: Identifier | StringLiteral; - body: BlockStatement; - kind: "CommonJS" | "ES" | null; -} - -export interface DeclareModuleExports extends BaseNode { - type: "DeclareModuleExports"; - typeAnnotation: TypeAnnotation; -} - -export interface DeclareTypeAlias extends BaseNode { - type: "DeclareTypeAlias"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - right: FlowType; -} - -export interface DeclareOpaqueType extends BaseNode { - type: "DeclareOpaqueType"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - supertype: FlowType | null; -} - -export interface DeclareVariable extends BaseNode { - type: "DeclareVariable"; - id: Identifier; -} - -export interface DeclareExportDeclaration extends BaseNode { - type: "DeclareExportDeclaration"; - declaration: Flow | null; - specifiers: Array | null; - source: StringLiteral | null; - default: boolean | null; -} - -export interface DeclareExportAllDeclaration extends BaseNode { - type: "DeclareExportAllDeclaration"; - source: StringLiteral; - exportKind: "type" | "value" | null; -} - -export interface DeclaredPredicate extends BaseNode { - type: "DeclaredPredicate"; - value: Flow; -} - -export interface ExistsTypeAnnotation extends BaseNode { - type: "ExistsTypeAnnotation"; -} - -export interface FunctionTypeAnnotation extends BaseNode { - type: "FunctionTypeAnnotation"; - typeParameters: TypeParameterDeclaration | null; - params: Array; - rest: FunctionTypeParam | null; - returnType: FlowType; -} - -export interface FunctionTypeParam extends BaseNode { - type: "FunctionTypeParam"; - name: Identifier | null; - typeAnnotation: FlowType; - optional: boolean | null; -} - -export interface GenericTypeAnnotation extends BaseNode { - type: "GenericTypeAnnotation"; - id: Identifier | QualifiedTypeIdentifier; - typeParameters: TypeParameterInstantiation | null; -} - -export interface InferredPredicate extends BaseNode { - type: "InferredPredicate"; -} - -export interface InterfaceExtends extends BaseNode { - type: "InterfaceExtends"; - id: Identifier | QualifiedTypeIdentifier; - typeParameters: TypeParameterInstantiation | null; -} - -export interface InterfaceDeclaration extends BaseNode { - type: "InterfaceDeclaration"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - extends: Array | null; - body: ObjectTypeAnnotation; - implements: Array | null; - mixins: Array | null; -} - -export interface InterfaceTypeAnnotation extends BaseNode { - type: "InterfaceTypeAnnotation"; - extends: Array | null; - body: ObjectTypeAnnotation; -} - -export interface IntersectionTypeAnnotation extends BaseNode { - type: "IntersectionTypeAnnotation"; - types: Array; -} - -export interface MixedTypeAnnotation extends BaseNode { - type: "MixedTypeAnnotation"; -} - -export interface EmptyTypeAnnotation extends BaseNode { - type: "EmptyTypeAnnotation"; -} - -export interface NullableTypeAnnotation extends BaseNode { - type: "NullableTypeAnnotation"; - typeAnnotation: FlowType; -} - -export interface NumberLiteralTypeAnnotation extends BaseNode { - type: "NumberLiteralTypeAnnotation"; - value: number; -} - -export interface NumberTypeAnnotation extends BaseNode { - type: "NumberTypeAnnotation"; -} - -export interface ObjectTypeAnnotation extends BaseNode { - type: "ObjectTypeAnnotation"; - properties: Array; - indexers: Array | null; - callProperties: Array | null; - internalSlots: Array | null; - exact: boolean; - inexact: boolean | null; -} - -export interface ObjectTypeInternalSlot extends BaseNode { - type: "ObjectTypeInternalSlot"; - id: Identifier; - value: FlowType; - optional: boolean; - static: boolean; - method: boolean; -} - -export interface ObjectTypeCallProperty extends BaseNode { - type: "ObjectTypeCallProperty"; - value: FlowType; - static: boolean | null; -} - -export interface ObjectTypeIndexer extends BaseNode { - type: "ObjectTypeIndexer"; - id: Identifier | null; - key: FlowType; - value: FlowType; - variance: Variance | null; - static: boolean | null; -} - -export interface ObjectTypeProperty extends BaseNode { - type: "ObjectTypeProperty"; - key: Identifier | StringLiteral; - value: FlowType; - variance: Variance | null; - kind: "init" | "get" | "set" | null; - optional: boolean | null; - proto: boolean | null; - static: boolean | null; -} - -export interface ObjectTypeSpreadProperty extends BaseNode { - type: "ObjectTypeSpreadProperty"; - argument: FlowType; -} - -export interface OpaqueType extends BaseNode { - type: "OpaqueType"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - supertype: FlowType | null; - impltype: FlowType; -} - -export interface QualifiedTypeIdentifier extends BaseNode { - type: "QualifiedTypeIdentifier"; - id: Identifier; - qualification: Identifier | QualifiedTypeIdentifier; -} - -export interface StringLiteralTypeAnnotation extends BaseNode { - type: "StringLiteralTypeAnnotation"; - value: string; -} - -export interface StringTypeAnnotation extends BaseNode { - type: "StringTypeAnnotation"; -} - -export interface ThisTypeAnnotation extends BaseNode { - type: "ThisTypeAnnotation"; -} - -export interface TupleTypeAnnotation extends BaseNode { - type: "TupleTypeAnnotation"; - types: Array; -} - -export interface TypeofTypeAnnotation extends BaseNode { - type: "TypeofTypeAnnotation"; - argument: FlowType; -} - -export interface TypeAlias extends BaseNode { - type: "TypeAlias"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - right: FlowType; -} - -export interface TypeAnnotation extends BaseNode { - type: "TypeAnnotation"; - typeAnnotation: FlowType; -} - -export interface TypeCastExpression extends BaseNode { - type: "TypeCastExpression"; - expression: Expression; - typeAnnotation: TypeAnnotation; -} - -export interface TypeParameter extends BaseNode { - type: "TypeParameter"; - bound: TypeAnnotation | null; - default: FlowType | null; - variance: Variance | null; - name: string | null; -} - -export interface TypeParameterDeclaration extends BaseNode { - type: "TypeParameterDeclaration"; - params: Array; -} - -export interface TypeParameterInstantiation extends BaseNode { - type: "TypeParameterInstantiation"; - params: Array; -} - -export interface UnionTypeAnnotation extends BaseNode { - type: "UnionTypeAnnotation"; - types: Array; -} - -export interface Variance extends BaseNode { - type: "Variance"; - kind: "minus" | "plus"; -} - -export interface VoidTypeAnnotation extends BaseNode { - type: "VoidTypeAnnotation"; -} - -export interface JSXAttribute extends BaseNode { - type: "JSXAttribute"; - name: JSXIdentifier | JSXNamespacedName; - value: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null; -} - -export interface JSXClosingElement extends BaseNode { - type: "JSXClosingElement"; - name: JSXIdentifier | JSXMemberExpression; -} - -export interface JSXElement extends BaseNode { - type: "JSXElement"; - openingElement: JSXOpeningElement; - closingElement: JSXClosingElement | null; - children: Array; - selfClosing: any; -} - -export interface JSXEmptyExpression extends BaseNode { - type: "JSXEmptyExpression"; -} - -export interface JSXExpressionContainer extends BaseNode { - type: "JSXExpressionContainer"; - expression: Expression | JSXEmptyExpression; -} - -export interface JSXSpreadChild extends BaseNode { - type: "JSXSpreadChild"; - expression: Expression; -} - -export interface JSXIdentifier extends BaseNode { - type: "JSXIdentifier"; - name: string; -} - -export interface JSXMemberExpression extends BaseNode { - type: "JSXMemberExpression"; - object: JSXMemberExpression | JSXIdentifier; - property: JSXIdentifier; -} - -export interface JSXNamespacedName extends BaseNode { - type: "JSXNamespacedName"; - namespace: JSXIdentifier; - name: JSXIdentifier; -} - -export interface JSXOpeningElement extends BaseNode { - type: "JSXOpeningElement"; - name: JSXIdentifier | JSXMemberExpression; - attributes: Array; - selfClosing: boolean; - typeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; -} - -export interface JSXSpreadAttribute extends BaseNode { - type: "JSXSpreadAttribute"; - argument: Expression; -} - -export interface JSXText extends BaseNode { - type: "JSXText"; - value: string; -} - -export interface JSXFragment extends BaseNode { - type: "JSXFragment"; - openingFragment: JSXOpeningFragment; - closingFragment: JSXClosingFragment; - children: Array; -} - -export interface JSXOpeningFragment extends BaseNode { - type: "JSXOpeningFragment"; -} - -export interface JSXClosingFragment extends BaseNode { - type: "JSXClosingFragment"; -} - -export interface Noop extends BaseNode { - type: "Noop"; -} - -export interface Placeholder extends BaseNode { - type: "Placeholder"; - expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern"; - name: Identifier; -} - -export interface ArgumentPlaceholder extends BaseNode { - type: "ArgumentPlaceholder"; -} - -export interface AwaitExpression extends BaseNode { - type: "AwaitExpression"; - argument: Expression; -} - -export interface BindExpression extends BaseNode { - type: "BindExpression"; - object: any; - callee: any; -} - -export interface ClassProperty extends BaseNode { - type: "ClassProperty"; - key: Identifier | StringLiteral | NumericLiteral | Expression; - value: Expression | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; - decorators: Array | null; - computed: boolean; - abstract: boolean | null; - accessibility: "public" | "private" | "protected" | null; - definite: boolean | null; - optional: boolean | null; - readonly: boolean | null; - static: boolean | null; -} - -export interface OptionalMemberExpression extends BaseNode { - type: "OptionalMemberExpression"; - object: Expression; - property: any; - computed: boolean; - optional: boolean; -} - -export interface PipelineTopicExpression extends BaseNode { - type: "PipelineTopicExpression"; - expression: Expression; -} - -export interface PipelineBareFunction extends BaseNode { - type: "PipelineBareFunction"; - callee: Expression; -} - -export interface PipelinePrimaryTopicReference extends BaseNode { - type: "PipelinePrimaryTopicReference"; -} - -export interface OptionalCallExpression extends BaseNode { - type: "OptionalCallExpression"; - callee: Expression; - arguments: Array; - optional: boolean; - typeArguments: TypeParameterInstantiation | null; - typeParameters: TSTypeParameterInstantiation | null; -} - -export interface ClassPrivateProperty extends BaseNode { - type: "ClassPrivateProperty"; - key: PrivateName; - value: Expression | null; -} - -export interface ClassPrivateMethod extends BaseNode { - type: "ClassPrivateMethod"; - kind: "get" | "set" | "method" | "constructor"; - key: PrivateName; - params: Array; - body: BlockStatement; - static: boolean | null; - abstract: boolean | null; - access: "public" | "private" | "protected" | null; - accessibility: "public" | "private" | "protected" | null; - async: boolean; - computed: boolean; - decorators: Array | null; - generator: boolean; - optional: boolean | null; - returnType: any | null; - typeParameters: any | null; -} - -export interface Import extends BaseNode { - type: "Import"; -} - -export interface Decorator extends BaseNode { - type: "Decorator"; - expression: Expression; -} - -export interface DoExpression extends BaseNode { - type: "DoExpression"; - body: BlockStatement; -} - -export interface ExportDefaultSpecifier extends BaseNode { - type: "ExportDefaultSpecifier"; - exported: Identifier; -} - -export interface ExportNamespaceSpecifier extends BaseNode { - type: "ExportNamespaceSpecifier"; - exported: Identifier; -} - -export interface PrivateName extends BaseNode { - type: "PrivateName"; - id: Identifier; -} - -export interface BigIntLiteral extends BaseNode { - type: "BigIntLiteral"; - value: string; -} - -export interface TSParameterProperty extends BaseNode { - type: "TSParameterProperty"; - parameter: Identifier | AssignmentPattern; - accessibility: "public" | "private" | "protected" | null; - readonly: boolean | null; -} - -export interface TSDeclareFunction extends BaseNode { - type: "TSDeclareFunction"; - id: Identifier | null; - typeParameters: TSTypeParameterDeclaration | Noop | null; - params: Array; - returnType: TSTypeAnnotation | Noop | null; - async: boolean; - declare: boolean | null; - generator: boolean; -} - -export interface TSDeclareMethod extends BaseNode { - type: "TSDeclareMethod"; - decorators: Array | null; - key: Identifier | StringLiteral | NumericLiteral | Expression; - typeParameters: TSTypeParameterDeclaration | Noop | null; - params: Array; - returnType: TSTypeAnnotation | Noop | null; - abstract: boolean | null; - access: "public" | "private" | "protected" | null; - accessibility: "public" | "private" | "protected" | null; - async: boolean; - computed: boolean; - generator: boolean; - kind: "get" | "set" | "method" | "constructor"; - optional: boolean | null; - static: boolean | null; -} - -export interface TSQualifiedName extends BaseNode { - type: "TSQualifiedName"; - left: TSEntityName; - right: Identifier; -} - -export interface TSCallSignatureDeclaration extends BaseNode { - type: "TSCallSignatureDeclaration"; - typeParameters: TSTypeParameterDeclaration | null; - parameters: Array; - typeAnnotation: TSTypeAnnotation | null; -} - -export interface TSConstructSignatureDeclaration extends BaseNode { - type: "TSConstructSignatureDeclaration"; - typeParameters: TSTypeParameterDeclaration | null; - parameters: Array; - typeAnnotation: TSTypeAnnotation | null; -} - -export interface TSPropertySignature extends BaseNode { - type: "TSPropertySignature"; - key: Expression; - typeAnnotation: TSTypeAnnotation | null; - initializer: Expression | null; - computed: boolean | null; - optional: boolean | null; - readonly: boolean | null; -} - -export interface TSMethodSignature extends BaseNode { - type: "TSMethodSignature"; - key: Expression; - typeParameters: TSTypeParameterDeclaration | null; - parameters: Array; - typeAnnotation: TSTypeAnnotation | null; - computed: boolean | null; - optional: boolean | null; -} - -export interface TSIndexSignature extends BaseNode { - type: "TSIndexSignature"; - parameters: Array; - typeAnnotation: TSTypeAnnotation | null; - readonly: boolean | null; -} - -export interface TSAnyKeyword extends BaseNode { - type: "TSAnyKeyword"; -} - -export interface TSUnknownKeyword extends BaseNode { - type: "TSUnknownKeyword"; -} - -export interface TSNumberKeyword extends BaseNode { - type: "TSNumberKeyword"; -} - -export interface TSObjectKeyword extends BaseNode { - type: "TSObjectKeyword"; -} - -export interface TSBooleanKeyword extends BaseNode { - type: "TSBooleanKeyword"; -} - -export interface TSStringKeyword extends BaseNode { - type: "TSStringKeyword"; -} - -export interface TSSymbolKeyword extends BaseNode { - type: "TSSymbolKeyword"; -} - -export interface TSVoidKeyword extends BaseNode { - type: "TSVoidKeyword"; -} - -export interface TSUndefinedKeyword extends BaseNode { - type: "TSUndefinedKeyword"; -} - -export interface TSNullKeyword extends BaseNode { - type: "TSNullKeyword"; -} - -export interface TSNeverKeyword extends BaseNode { - type: "TSNeverKeyword"; -} - -export interface TSThisType extends BaseNode { - type: "TSThisType"; -} - -export interface TSFunctionType extends BaseNode { - type: "TSFunctionType"; - typeParameters: TSTypeParameterDeclaration | null; - parameters: Array; - typeAnnotation: TSTypeAnnotation | null; -} - -export interface TSConstructorType extends BaseNode { - type: "TSConstructorType"; - typeParameters: TSTypeParameterDeclaration | null; - parameters: Array; - typeAnnotation: TSTypeAnnotation | null; -} - -export interface TSTypeReference extends BaseNode { - type: "TSTypeReference"; - typeName: TSEntityName; - typeParameters: TSTypeParameterInstantiation | null; -} - -export interface TSTypePredicate extends BaseNode { - type: "TSTypePredicate"; - parameterName: Identifier | TSThisType; - typeAnnotation: TSTypeAnnotation; -} - -export interface TSTypeQuery extends BaseNode { - type: "TSTypeQuery"; - exprName: TSEntityName | TSImportType; -} - -export interface TSTypeLiteral extends BaseNode { - type: "TSTypeLiteral"; - members: Array; -} - -export interface TSArrayType extends BaseNode { - type: "TSArrayType"; - elementType: TSType; -} - -export interface TSTupleType extends BaseNode { - type: "TSTupleType"; - elementTypes: Array; -} - -export interface TSOptionalType extends BaseNode { - type: "TSOptionalType"; - typeAnnotation: TSType; -} - -export interface TSRestType extends BaseNode { - type: "TSRestType"; - typeAnnotation: TSType; -} - -export interface TSUnionType extends BaseNode { - type: "TSUnionType"; - types: Array; -} - -export interface TSIntersectionType extends BaseNode { - type: "TSIntersectionType"; - types: Array; -} - -export interface TSConditionalType extends BaseNode { - type: "TSConditionalType"; - checkType: TSType; - extendsType: TSType; - trueType: TSType; - falseType: TSType; -} - -export interface TSInferType extends BaseNode { - type: "TSInferType"; - typeParameter: TSTypeParameter; -} - -export interface TSParenthesizedType extends BaseNode { - type: "TSParenthesizedType"; - typeAnnotation: TSType; -} - -export interface TSTypeOperator extends BaseNode { - type: "TSTypeOperator"; - typeAnnotation: TSType; - operator: string | null; -} - -export interface TSIndexedAccessType extends BaseNode { - type: "TSIndexedAccessType"; - objectType: TSType; - indexType: TSType; -} - -export interface TSMappedType extends BaseNode { - type: "TSMappedType"; - typeParameter: TSTypeParameter; - typeAnnotation: TSType | null; - optional: boolean | null; - readonly: boolean | null; -} - -export interface TSLiteralType extends BaseNode { - type: "TSLiteralType"; - literal: NumericLiteral | StringLiteral | BooleanLiteral; -} - -export interface TSExpressionWithTypeArguments extends BaseNode { - type: "TSExpressionWithTypeArguments"; - expression: TSEntityName; - typeParameters: TSTypeParameterInstantiation | null; -} - -export interface TSInterfaceDeclaration extends BaseNode { - type: "TSInterfaceDeclaration"; - id: Identifier; - typeParameters: TSTypeParameterDeclaration | null; - extends: Array | null; - body: TSInterfaceBody; - declare: boolean | null; -} - -export interface TSInterfaceBody extends BaseNode { - type: "TSInterfaceBody"; - body: Array; -} - -export interface TSTypeAliasDeclaration extends BaseNode { - type: "TSTypeAliasDeclaration"; - id: Identifier; - typeParameters: TSTypeParameterDeclaration | null; - typeAnnotation: TSType; - declare: boolean | null; -} - -export interface TSAsExpression extends BaseNode { - type: "TSAsExpression"; - expression: Expression; - typeAnnotation: TSType; -} - -export interface TSTypeAssertion extends BaseNode { - type: "TSTypeAssertion"; - typeAnnotation: TSType; - expression: Expression; -} - -export interface TSEnumDeclaration extends BaseNode { - type: "TSEnumDeclaration"; - id: Identifier; - members: Array; - const: boolean | null; - declare: boolean | null; - initializer: Expression | null; -} - -export interface TSEnumMember extends BaseNode { - type: "TSEnumMember"; - id: Identifier | StringLiteral; - initializer: Expression | null; -} - -export interface TSModuleDeclaration extends BaseNode { - type: "TSModuleDeclaration"; - id: Identifier | StringLiteral; - body: TSModuleBlock | TSModuleDeclaration; - declare: boolean | null; - global: boolean | null; -} - -export interface TSModuleBlock extends BaseNode { - type: "TSModuleBlock"; - body: Array; -} - -export interface TSImportType extends BaseNode { - type: "TSImportType"; - argument: StringLiteral; - qualifier: TSEntityName | null; - typeParameters: TSTypeParameterInstantiation | null; -} - -export interface TSImportEqualsDeclaration extends BaseNode { - type: "TSImportEqualsDeclaration"; - id: Identifier; - moduleReference: TSEntityName | TSExternalModuleReference; - isExport: boolean | null; -} - -export interface TSExternalModuleReference extends BaseNode { - type: "TSExternalModuleReference"; - expression: StringLiteral; -} - -export interface TSNonNullExpression extends BaseNode { - type: "TSNonNullExpression"; - expression: Expression; -} - -export interface TSExportAssignment extends BaseNode { - type: "TSExportAssignment"; - expression: Expression; -} - -export interface TSNamespaceExportDeclaration extends BaseNode { - type: "TSNamespaceExportDeclaration"; - id: Identifier; -} - -export interface TSTypeAnnotation extends BaseNode { - type: "TSTypeAnnotation"; - typeAnnotation: TSType; -} - -export interface TSTypeParameterInstantiation extends BaseNode { - type: "TSTypeParameterInstantiation"; - params: Array; -} - -export interface TSTypeParameterDeclaration extends BaseNode { - type: "TSTypeParameterDeclaration"; - params: Array; -} - -export interface TSTypeParameter extends BaseNode { - type: "TSTypeParameter"; - constraint: TSType | null; - default: TSType | null; - name: string | null; -} - -/** - * @deprecated Use `NumericLiteral` - */ -export type NumberLiteral = NumericLiteral; - -/** - * @deprecated Use `RegExpLiteral` - */ -export type RegexLiteral = RegExpLiteral; - -/** - * @deprecated Use `RestElement` - */ -export type RestProperty = RestElement; - -/** - * @deprecated Use `SpreadElement` - */ -export type SpreadProperty = SpreadElement; - -export type Expression = ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression | ConditionalExpression | FunctionExpression | Identifier | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | ObjectExpression | SequenceExpression | ParenthesizedExpression | ThisExpression | UnaryExpression | UpdateExpression | ArrowFunctionExpression | ClassExpression | MetaProperty | Super | TaggedTemplateExpression | TemplateLiteral | YieldExpression | TypeCastExpression | JSXElement | JSXFragment | AwaitExpression | BindExpression | OptionalMemberExpression | PipelinePrimaryTopicReference | OptionalCallExpression | Import | DoExpression | BigIntLiteral | TSAsExpression | TSTypeAssertion | TSNonNullExpression; -export type Binary = BinaryExpression | LogicalExpression; -export type Scopable = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ClassDeclaration | ClassExpression | ForOfStatement | ClassMethod | ClassPrivateMethod | TSModuleBlock; -export type BlockParent = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ForOfStatement | ClassMethod | ClassPrivateMethod | TSModuleBlock; -export type Block = BlockStatement | Program | TSModuleBlock; -export type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForStatement | FunctionDeclaration | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | VariableDeclaration | WhileStatement | WithStatement | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ForOfStatement | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSImportEqualsDeclaration | TSExportAssignment | TSNamespaceExportDeclaration; -export type Terminatorless = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement | YieldExpression | AwaitExpression; -export type CompletionStatement = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement; -export type Conditional = ConditionalExpression | IfStatement; -export type Loop = DoWhileStatement | ForInStatement | ForStatement | WhileStatement | ForOfStatement; -export type While = DoWhileStatement | WhileStatement; -export type ExpressionWrapper = ExpressionStatement | ParenthesizedExpression | TypeCastExpression; -export type For = ForInStatement | ForStatement | ForOfStatement; -export type ForXStatement = ForInStatement | ForOfStatement; -export type Function = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod; -export type FunctionParent = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod; -export type Pureish = FunctionDeclaration | FunctionExpression | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | ArrowFunctionExpression | ClassDeclaration | ClassExpression | BigIntLiteral; -export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration; -export type PatternLike = Identifier | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern; -export type LVal = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | TSParameterProperty; -export type TSEntityName = Identifier | TSQualifiedName; -export type Literal = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | TemplateLiteral | BigIntLiteral; -export type Immutable = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | JSXAttribute | JSXClosingElement | JSXElement | JSXExpressionContainer | JSXSpreadChild | JSXOpeningElement | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment | BigIntLiteral; -export type UserWhitespacable = ObjectMethod | ObjectProperty | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty; -export type Method = ObjectMethod | ClassMethod | ClassPrivateMethod; -export type ObjectMember = ObjectMethod | ObjectProperty; -export type Property = ObjectProperty | ClassProperty | ClassPrivateProperty; -export type UnaryLike = UnaryExpression | SpreadElement; -export type Pattern = AssignmentPattern | ArrayPattern | ObjectPattern; -export type Class = ClassDeclaration | ClassExpression; -export type ModuleDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration; -export type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration; -export type ModuleSpecifier = ExportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier; -export type Flow = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ClassImplements | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | DeclaredPredicate | ExistsTypeAnnotation | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | InferredPredicate | InterfaceExtends | InterfaceDeclaration | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | QualifiedTypeIdentifier | StringLiteralTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | UnionTypeAnnotation | Variance | VoidTypeAnnotation; -export type FlowType = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ExistsTypeAnnotation | FunctionTypeAnnotation | GenericTypeAnnotation | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | StringLiteralTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | UnionTypeAnnotation | VoidTypeAnnotation; -export type FlowBaseAnnotation = AnyTypeAnnotation | BooleanTypeAnnotation | NullLiteralTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NumberTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | VoidTypeAnnotation; -export type FlowDeclaration = DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias; -export type FlowPredicate = DeclaredPredicate | InferredPredicate; -export type JSX = JSXAttribute | JSXClosingElement | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXSpreadChild | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXSpreadAttribute | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment; -export type Private = ClassPrivateProperty | ClassPrivateMethod | PrivateName; -export type TSTypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature; -export type TSType = TSAnyKeyword | TSUnknownKeyword | TSNumberKeyword | TSObjectKeyword | TSBooleanKeyword | TSStringKeyword | TSSymbolKeyword | TSVoidKeyword | TSUndefinedKeyword | TSNullKeyword | TSNeverKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSImportType; - -export interface Aliases { - Expression: Expression; - Binary: Binary; - Scopable: Scopable; - BlockParent: BlockParent; - Block: Block; - Statement: Statement; - Terminatorless: Terminatorless; - CompletionStatement: CompletionStatement; - Conditional: Conditional; - Loop: Loop; - While: While; - ExpressionWrapper: ExpressionWrapper; - For: For; - ForXStatement: ForXStatement; - Function: Function; - FunctionParent: FunctionParent; - Pureish: Pureish; - Declaration: Declaration; - PatternLike: PatternLike; - LVal: LVal; - TSEntityName: TSEntityName; - Literal: Literal; - Immutable: Immutable; - UserWhitespacable: UserWhitespacable; - Method: Method; - ObjectMember: ObjectMember; - Property: Property; - UnaryLike: UnaryLike; - Pattern: Pattern; - Class: Class; - ModuleDeclaration: ModuleDeclaration; - ExportDeclaration: ExportDeclaration; - ModuleSpecifier: ModuleSpecifier; - Flow: Flow; - FlowType: FlowType; - FlowBaseAnnotation: FlowBaseAnnotation; - FlowDeclaration: FlowDeclaration; - FlowPredicate: FlowPredicate; - JSX: JSX; - Private: Private; - TSTypeElement: TSTypeElement; - TSType: TSType; -} - -export function arrayExpression(elements?: Array): ArrayExpression; -export function assignmentExpression(operator: string, left: LVal, right: Expression): AssignmentExpression; -export function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: Expression, right: Expression): BinaryExpression; -export function interpreterDirective(value: string): InterpreterDirective; -export function directive(value: DirectiveLiteral): Directive; -export function directiveLiteral(value: string): DirectiveLiteral; -export function blockStatement(body: Array, directives?: Array): BlockStatement; -export function breakStatement(label?: Identifier | null): BreakStatement; -export function callExpression(callee: Expression, _arguments: Array, optional?: true | false | null, typeArguments?: TypeParameterInstantiation | null, typeParameters?: TSTypeParameterInstantiation | null): CallExpression; -export function catchClause(param: Identifier | null | undefined, body: BlockStatement): CatchClause; -export function conditionalExpression(test: Expression, consequent: Expression, alternate: Expression): ConditionalExpression; -export function continueStatement(label?: Identifier | null): ContinueStatement; -export function debuggerStatement(): DebuggerStatement; -export function doWhileStatement(test: Expression, body: Statement): DoWhileStatement; -export function emptyStatement(): EmptyStatement; -export function expressionStatement(expression: Expression): ExpressionStatement; -export function file(program: Program, comments: any, tokens: any): File; -export function forInStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement): ForInStatement; -export function forStatement(init: VariableDeclaration | Expression | null | undefined, test: Expression | null | undefined, update: Expression | null | undefined, body: Statement): ForStatement; -export function functionDeclaration(id: Identifier | null | undefined, params: Array, body: BlockStatement, generator?: boolean, async?: boolean, declare?: boolean | null, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): FunctionDeclaration; -export function functionExpression(id: Identifier | null | undefined, params: Array, body: BlockStatement, generator?: boolean, async?: boolean, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): FunctionExpression; -export function identifier(name: string, decorators?: Array | null, optional?: boolean | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): Identifier; -export function ifStatement(test: Expression, consequent: Statement, alternate?: Statement | null): IfStatement; -export function labeledStatement(label: Identifier, body: Statement): LabeledStatement; -export function stringLiteral(value: string): StringLiteral; -export function numericLiteral(value: number): NumericLiteral; -export function nullLiteral(): NullLiteral; -export function booleanLiteral(value: boolean): BooleanLiteral; -export function regExpLiteral(pattern: string, flags?: string): RegExpLiteral; -export function logicalExpression(operator: "||" | "&&" | "??", left: Expression, right: Expression): LogicalExpression; -export function memberExpression(object: Expression, property: any, computed?: boolean, optional?: true | false | null): MemberExpression; -export function newExpression(callee: Expression, _arguments: Array, optional?: true | false | null, typeArguments?: TypeParameterInstantiation | null, typeParameters?: TSTypeParameterInstantiation | null): NewExpression; -export function program(body: Array, directives?: Array, sourceType?: "script" | "module", interpreter?: InterpreterDirective | null, sourceFile?: string | null): Program; -export function objectExpression(properties: Array): ObjectExpression; -export function objectMethod(kind: "method" | "get" | "set" | undefined, key: any, params: Array, body: BlockStatement, computed?: boolean, async?: boolean, decorators?: Array | null, generator?: boolean, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ObjectMethod; -export function objectProperty(key: any, value: Expression | PatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array | null): ObjectProperty; -export function restElement(argument: LVal, decorators?: Array | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): RestElement; -export function returnStatement(argument?: Expression | null): ReturnStatement; -export function sequenceExpression(expressions: Array): SequenceExpression; -export function parenthesizedExpression(expression: Expression): ParenthesizedExpression; -export function switchCase(test: Expression | null | undefined, consequent: Array): SwitchCase; -export function switchStatement(discriminant: Expression, cases: Array): SwitchStatement; -export function thisExpression(): ThisExpression; -export function throwStatement(argument: Expression): ThrowStatement; -export function tryStatement(block: BlockStatement, handler?: CatchClause | null, finalizer?: BlockStatement | null): TryStatement; -export function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: Expression, prefix?: boolean): UnaryExpression; -export function updateExpression(operator: "++" | "--", argument: Expression, prefix?: boolean): UpdateExpression; -export function variableDeclaration(kind: "var" | "let" | "const", declarations: Array, declare?: boolean | null): VariableDeclaration; -export function variableDeclarator(id: LVal, init?: Expression | null, definite?: boolean | null): VariableDeclarator; -export function whileStatement(test: Expression, body: BlockStatement | Statement): WhileStatement; -export function withStatement(object: Expression, body: BlockStatement | Statement): WithStatement; -export function assignmentPattern(left: Identifier | ObjectPattern | ArrayPattern | MemberExpression, right: Expression, decorators?: Array | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): AssignmentPattern; -export function arrayPattern(elements: Array, decorators?: Array | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): ArrayPattern; -export function arrowFunctionExpression(params: Array, body: BlockStatement | Expression, async?: boolean, expression?: boolean | null, generator?: boolean, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ArrowFunctionExpression; -export function classBody(body: Array): ClassBody; -export function classDeclaration(id: Identifier | null | undefined, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array | null, abstract?: boolean | null, declare?: boolean | null, _implements?: Array | null, mixins?: any | null, superTypeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ClassDeclaration; -export function classExpression(id: Identifier | null | undefined, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array | null, _implements?: Array | null, mixins?: any | null, superTypeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ClassExpression; -export function exportAllDeclaration(source: StringLiteral): ExportAllDeclaration; -export function exportDefaultDeclaration(declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression): ExportDefaultDeclaration; -export function exportNamedDeclaration(declaration: Declaration | null | undefined, specifiers: Array, source?: StringLiteral | null, exportKind?: "type" | "value" | null): ExportNamedDeclaration; -export function exportSpecifier(local: Identifier, exported: Identifier): ExportSpecifier; -export function forOfStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement, _await?: boolean): ForOfStatement; -export function importDeclaration(specifiers: Array, source: StringLiteral, importKind?: "type" | "typeof" | "value" | null): ImportDeclaration; -export function importDefaultSpecifier(local: Identifier): ImportDefaultSpecifier; -export function importNamespaceSpecifier(local: Identifier): ImportNamespaceSpecifier; -export function importSpecifier(local: Identifier, imported: Identifier, importKind?: "type" | "typeof" | null): ImportSpecifier; -export function metaProperty(meta: Identifier, property: Identifier): MetaProperty; -export function classMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, params: Array, body: BlockStatement, computed?: boolean, _static?: boolean | null, abstract?: boolean | null, access?: "public" | "private" | "protected" | null, accessibility?: "public" | "private" | "protected" | null, async?: boolean, decorators?: Array | null, generator?: boolean, optional?: boolean | null, returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null, typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null): ClassMethod; -export function objectPattern(properties: Array, decorators?: Array | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null): ObjectPattern; -export function spreadElement(argument: Expression): SpreadElement; -export function taggedTemplateExpression(tag: Expression, quasi: TemplateLiteral, typeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null): TaggedTemplateExpression; -export function templateElement(value: { raw: string, cooked?: string }, tail?: boolean): TemplateElement; -export function templateLiteral(quasis: Array, expressions: Array): TemplateLiteral; -export function yieldExpression(argument?: Expression | null, delegate?: boolean): YieldExpression; -export function anyTypeAnnotation(): AnyTypeAnnotation; -export function arrayTypeAnnotation(elementType: FlowType): ArrayTypeAnnotation; -export function booleanTypeAnnotation(): BooleanTypeAnnotation; -export function booleanLiteralTypeAnnotation(value: boolean): BooleanLiteralTypeAnnotation; -export function nullLiteralTypeAnnotation(): NullLiteralTypeAnnotation; -export function classImplements(id: Identifier, typeParameters?: TypeParameterInstantiation | null): ClassImplements; -export function declareClass(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: ObjectTypeAnnotation, _implements?: Array | null, mixins?: Array | null): DeclareClass; -export function declareFunction(id: Identifier, predicate?: DeclaredPredicate | null): DeclareFunction; -export function declareInterface(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: ObjectTypeAnnotation, _implements?: Array | null, mixins?: Array | null): DeclareInterface; -export function declareModule(id: Identifier | StringLiteral, body: BlockStatement, kind?: "CommonJS" | "ES" | null): DeclareModule; -export function declareModuleExports(typeAnnotation: TypeAnnotation): DeclareModuleExports; -export function declareTypeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): DeclareTypeAlias; -export function declareOpaqueType(id: Identifier, typeParameters?: TypeParameterDeclaration | null, supertype?: FlowType | null): DeclareOpaqueType; -export function declareVariable(id: Identifier): DeclareVariable; -export function declareExportDeclaration(declaration?: Flow | null, specifiers?: Array | null, source?: StringLiteral | null, _default?: boolean | null): DeclareExportDeclaration; -export function declareExportAllDeclaration(source: StringLiteral, exportKind?: "type" | "value" | null): DeclareExportAllDeclaration; -export function declaredPredicate(value: Flow): DeclaredPredicate; -export function existsTypeAnnotation(): ExistsTypeAnnotation; -export function functionTypeAnnotation(typeParameters: TypeParameterDeclaration | null | undefined, params: Array, rest: FunctionTypeParam | null | undefined, returnType: FlowType): FunctionTypeAnnotation; -export function functionTypeParam(name: Identifier | null | undefined, typeAnnotation: FlowType, optional?: boolean | null): FunctionTypeParam; -export function genericTypeAnnotation(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): GenericTypeAnnotation; -export function inferredPredicate(): InferredPredicate; -export function interfaceExtends(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): InterfaceExtends; -export function interfaceDeclaration(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: ObjectTypeAnnotation, _implements?: Array | null, mixins?: Array | null): InterfaceDeclaration; -export function interfaceTypeAnnotation(_extends: Array | null | undefined, body: ObjectTypeAnnotation): InterfaceTypeAnnotation; -export function intersectionTypeAnnotation(types: Array): IntersectionTypeAnnotation; -export function mixedTypeAnnotation(): MixedTypeAnnotation; -export function emptyTypeAnnotation(): EmptyTypeAnnotation; -export function nullableTypeAnnotation(typeAnnotation: FlowType): NullableTypeAnnotation; -export function numberLiteralTypeAnnotation(value: number): NumberLiteralTypeAnnotation; -export function numberTypeAnnotation(): NumberTypeAnnotation; -export function objectTypeAnnotation(properties: Array, indexers?: Array | null, callProperties?: Array | null, internalSlots?: Array | null, exact?: boolean, inexact?: boolean | null): ObjectTypeAnnotation; -export function objectTypeInternalSlot(id: Identifier, value: FlowType, optional: boolean, _static: boolean, method: boolean): ObjectTypeInternalSlot; -export function objectTypeCallProperty(value: FlowType, _static?: boolean | null): ObjectTypeCallProperty; -export function objectTypeIndexer(id: Identifier | null | undefined, key: FlowType, value: FlowType, variance?: Variance | null, _static?: boolean | null): ObjectTypeIndexer; -export function objectTypeProperty(key: Identifier | StringLiteral, value: FlowType, variance?: Variance | null, kind?: "init" | "get" | "set" | null, optional?: boolean | null, proto?: boolean | null, _static?: boolean | null): ObjectTypeProperty; -export function objectTypeSpreadProperty(argument: FlowType): ObjectTypeSpreadProperty; -export function opaqueType(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, supertype: FlowType | null | undefined, impltype: FlowType): OpaqueType; -export function qualifiedTypeIdentifier(id: Identifier, qualification: Identifier | QualifiedTypeIdentifier): QualifiedTypeIdentifier; -export function stringLiteralTypeAnnotation(value: string): StringLiteralTypeAnnotation; -export function stringTypeAnnotation(): StringTypeAnnotation; -export function thisTypeAnnotation(): ThisTypeAnnotation; -export function tupleTypeAnnotation(types: Array): TupleTypeAnnotation; -export function typeofTypeAnnotation(argument: FlowType): TypeofTypeAnnotation; -export function typeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): TypeAlias; -export function typeAnnotation(typeAnnotation: FlowType): TypeAnnotation; -export function typeCastExpression(expression: Expression, typeAnnotation: TypeAnnotation): TypeCastExpression; -export function typeParameter(bound?: TypeAnnotation | null, _default?: FlowType | null, variance?: Variance | null, name?: string | null): TypeParameter; -export function typeParameterDeclaration(params: Array): TypeParameterDeclaration; -export function typeParameterInstantiation(params: Array): TypeParameterInstantiation; -export function unionTypeAnnotation(types: Array): UnionTypeAnnotation; -export function variance(kind: "minus" | "plus"): Variance; -export function voidTypeAnnotation(): VoidTypeAnnotation; -export function jsxAttribute(name: JSXIdentifier | JSXNamespacedName, value?: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null): JSXAttribute; -export function jsxClosingElement(name: JSXIdentifier | JSXMemberExpression): JSXClosingElement; -export function jsxElement(openingElement: JSXOpeningElement, closingElement: JSXClosingElement | null | undefined, children: Array, selfClosing: any): JSXElement; -export function jsxEmptyExpression(): JSXEmptyExpression; -export function jsxExpressionContainer(expression: Expression | JSXEmptyExpression): JSXExpressionContainer; -export function jsxSpreadChild(expression: Expression): JSXSpreadChild; -export function jsxIdentifier(name: string): JSXIdentifier; -export function jsxMemberExpression(object: JSXMemberExpression | JSXIdentifier, property: JSXIdentifier): JSXMemberExpression; -export function jsxNamespacedName(namespace: JSXIdentifier, name: JSXIdentifier): JSXNamespacedName; -export function jsxOpeningElement(name: JSXIdentifier | JSXMemberExpression, attributes: Array, selfClosing?: boolean, typeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null): JSXOpeningElement; -export function jsxSpreadAttribute(argument: Expression): JSXSpreadAttribute; -export function jsxText(value: string): JSXText; -export function jsxFragment(openingFragment: JSXOpeningFragment, closingFragment: JSXClosingFragment, children: Array): JSXFragment; -export function jsxOpeningFragment(): JSXOpeningFragment; -export function jsxClosingFragment(): JSXClosingFragment; -export function noop(): Noop; -export function placeholder(expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern", name: Identifier): Placeholder; -export function argumentPlaceholder(): ArgumentPlaceholder; -export function awaitExpression(argument: Expression): AwaitExpression; -export function bindExpression(object: any, callee: any): BindExpression; -export function classProperty(key: Identifier | StringLiteral | NumericLiteral | Expression, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array | null, computed?: boolean, abstract?: boolean | null, accessibility?: "public" | "private" | "protected" | null, definite?: boolean | null, optional?: boolean | null, readonly?: boolean | null, _static?: boolean | null): ClassProperty; -export function optionalMemberExpression(object: Expression, property: any, computed: boolean | undefined, optional: boolean): OptionalMemberExpression; -export function pipelineTopicExpression(expression: Expression): PipelineTopicExpression; -export function pipelineBareFunction(callee: Expression): PipelineBareFunction; -export function pipelinePrimaryTopicReference(): PipelinePrimaryTopicReference; -export function optionalCallExpression(callee: Expression, _arguments: Array, optional: boolean, typeArguments?: TypeParameterInstantiation | null, typeParameters?: TSTypeParameterInstantiation | null): OptionalCallExpression; -export function classPrivateProperty(key: PrivateName, value?: Expression | null): ClassPrivateProperty; -export function classPrivateMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: PrivateName, params: Array, body: BlockStatement, _static?: boolean | null, abstract?: boolean | null, access?: "public" | "private" | "protected" | null, accessibility?: "public" | "private" | "protected" | null, async?: boolean, computed?: boolean, decorators?: Array | null, generator?: boolean, optional?: boolean | null, returnType?: any | null, typeParameters?: any | null): ClassPrivateMethod; -export function decorator(expression: Expression): Decorator; -export function doExpression(body: BlockStatement): DoExpression; -export function exportDefaultSpecifier(exported: Identifier): ExportDefaultSpecifier; -export function exportNamespaceSpecifier(exported: Identifier): ExportNamespaceSpecifier; -export function privateName(id: Identifier): PrivateName; -export function bigIntLiteral(value: string): BigIntLiteral; -export function tsParameterProperty(parameter: Identifier | AssignmentPattern, accessibility?: "public" | "private" | "protected" | null, readonly?: boolean | null): TSParameterProperty; -export function tsDeclareFunction(id: Identifier | null | undefined, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array, returnType?: TSTypeAnnotation | Noop | null, async?: boolean, declare?: boolean | null, generator?: boolean): TSDeclareFunction; -export function tsDeclareMethod(decorators: Array | null | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array, returnType?: TSTypeAnnotation | Noop | null, abstract?: boolean | null, access?: "public" | "private" | "protected" | null, accessibility?: "public" | "private" | "protected" | null, async?: boolean, computed?: boolean, generator?: boolean, kind?: "get" | "set" | "method" | "constructor", optional?: boolean | null, _static?: boolean | null): TSDeclareMethod; -export function tsQualifiedName(left: TSEntityName, right: Identifier): TSQualifiedName; -export function tsCallSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSCallSignatureDeclaration; -export function tsConstructSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSConstructSignatureDeclaration; -export function tsPropertySignature(key: Expression, typeAnnotation?: TSTypeAnnotation | null, initializer?: Expression | null, computed?: boolean | null, optional?: boolean | null, readonly?: boolean | null): TSPropertySignature; -export function tsMethodSignature(key: Expression, typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null, computed?: boolean | null, optional?: boolean | null): TSMethodSignature; -export function tsIndexSignature(parameters: Array, typeAnnotation?: TSTypeAnnotation | null, readonly?: boolean | null): TSIndexSignature; -export function tsAnyKeyword(): TSAnyKeyword; -export function tsUnknownKeyword(): TSUnknownKeyword; -export function tsNumberKeyword(): TSNumberKeyword; -export function tsObjectKeyword(): TSObjectKeyword; -export function tsBooleanKeyword(): TSBooleanKeyword; -export function tsStringKeyword(): TSStringKeyword; -export function tsSymbolKeyword(): TSSymbolKeyword; -export function tsVoidKeyword(): TSVoidKeyword; -export function tsUndefinedKeyword(): TSUndefinedKeyword; -export function tsNullKeyword(): TSNullKeyword; -export function tsNeverKeyword(): TSNeverKeyword; -export function tsThisType(): TSThisType; -export function tsFunctionType(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSFunctionType; -export function tsConstructorType(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSConstructorType; -export function tsTypeReference(typeName: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSTypeReference; -export function tsTypePredicate(parameterName: Identifier | TSThisType, typeAnnotation: TSTypeAnnotation): TSTypePredicate; -export function tsTypeQuery(exprName: TSEntityName | TSImportType): TSTypeQuery; -export function tsTypeLiteral(members: Array): TSTypeLiteral; -export function tsArrayType(elementType: TSType): TSArrayType; -export function tsTupleType(elementTypes: Array): TSTupleType; -export function tsOptionalType(typeAnnotation: TSType): TSOptionalType; -export function tsRestType(typeAnnotation: TSType): TSRestType; -export function tsUnionType(types: Array): TSUnionType; -export function tsIntersectionType(types: Array): TSIntersectionType; -export function tsConditionalType(checkType: TSType, extendsType: TSType, trueType: TSType, falseType: TSType): TSConditionalType; -export function tsInferType(typeParameter: TSTypeParameter): TSInferType; -export function tsParenthesizedType(typeAnnotation: TSType): TSParenthesizedType; -export function tsTypeOperator(typeAnnotation: TSType, operator?: string | null): TSTypeOperator; -export function tsIndexedAccessType(objectType: TSType, indexType: TSType): TSIndexedAccessType; -export function tsMappedType(typeParameter: TSTypeParameter, typeAnnotation?: TSType | null, optional?: boolean | null, readonly?: boolean | null): TSMappedType; -export function tsLiteralType(literal: NumericLiteral | StringLiteral | BooleanLiteral): TSLiteralType; -export function tsExpressionWithTypeArguments(expression: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSExpressionWithTypeArguments; -export function tsInterfaceDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: TSInterfaceBody, declare?: boolean | null): TSInterfaceDeclaration; -export function tsInterfaceBody(body: Array): TSInterfaceBody; -export function tsTypeAliasDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, typeAnnotation: TSType, declare?: boolean | null): TSTypeAliasDeclaration; -export function tsAsExpression(expression: Expression, typeAnnotation: TSType): TSAsExpression; -export function tsTypeAssertion(typeAnnotation: TSType, expression: Expression): TSTypeAssertion; -export function tsEnumDeclaration(id: Identifier, members: Array, _const?: boolean | null, declare?: boolean | null, initializer?: Expression | null): TSEnumDeclaration; -export function tsEnumMember(id: Identifier | StringLiteral, initializer?: Expression | null): TSEnumMember; -export function tsModuleDeclaration(id: Identifier | StringLiteral, body: TSModuleBlock | TSModuleDeclaration, declare?: boolean | null, global?: boolean | null): TSModuleDeclaration; -export function tsModuleBlock(body: Array): TSModuleBlock; -export function tsImportType(argument: StringLiteral, qualifier?: TSEntityName | null, typeParameters?: TSTypeParameterInstantiation | null): TSImportType; -export function tsImportEqualsDeclaration(id: Identifier, moduleReference: TSEntityName | TSExternalModuleReference, isExport?: boolean | null): TSImportEqualsDeclaration; -export function tsExternalModuleReference(expression: StringLiteral): TSExternalModuleReference; -export function tsNonNullExpression(expression: Expression): TSNonNullExpression; -export function tsExportAssignment(expression: Expression): TSExportAssignment; -export function tsNamespaceExportDeclaration(id: Identifier): TSNamespaceExportDeclaration; -export function tsTypeAnnotation(typeAnnotation: TSType): TSTypeAnnotation; -export function tsTypeParameterInstantiation(params: Array): TSTypeParameterInstantiation; -export function tsTypeParameterDeclaration(params: Array): TSTypeParameterDeclaration; -export function tsTypeParameter(constraint?: TSType | null, _default?: TSType | null, name?: string | null): TSTypeParameter; -export function isAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is AnyTypeAnnotation; -export function isArgumentPlaceholder(node: object | null | undefined, opts?: object | null): node is ArgumentPlaceholder; -export function isArrayExpression(node: object | null | undefined, opts?: object | null): node is ArrayExpression; -export function isArrayPattern(node: object | null | undefined, opts?: object | null): node is ArrayPattern; -export function isArrayTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ArrayTypeAnnotation; -export function isArrowFunctionExpression(node: object | null | undefined, opts?: object | null): node is ArrowFunctionExpression; -export function isAssignmentExpression(node: object | null | undefined, opts?: object | null): node is AssignmentExpression; -export function isAssignmentPattern(node: object | null | undefined, opts?: object | null): node is AssignmentPattern; -export function isAwaitExpression(node: object | null | undefined, opts?: object | null): node is AwaitExpression; -export function isBigIntLiteral(node: object | null | undefined, opts?: object | null): node is BigIntLiteral; -export function isBinary(node: object | null | undefined, opts?: object | null): node is Binary; -export function isBinaryExpression(node: object | null | undefined, opts?: object | null): node is BinaryExpression; -export function isBindExpression(node: object | null | undefined, opts?: object | null): node is BindExpression; -export function isBlock(node: object | null | undefined, opts?: object | null): node is Block; -export function isBlockParent(node: object | null | undefined, opts?: object | null): node is BlockParent; -export function isBlockStatement(node: object | null | undefined, opts?: object | null): node is BlockStatement; -export function isBooleanLiteral(node: object | null | undefined, opts?: object | null): node is BooleanLiteral; -export function isBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanLiteralTypeAnnotation; -export function isBooleanTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanTypeAnnotation; -export function isBreakStatement(node: object | null | undefined, opts?: object | null): node is BreakStatement; -export function isCallExpression(node: object | null | undefined, opts?: object | null): node is CallExpression; -export function isCatchClause(node: object | null | undefined, opts?: object | null): node is CatchClause; -export function isClass(node: object | null | undefined, opts?: object | null): node is Class; -export function isClassBody(node: object | null | undefined, opts?: object | null): node is ClassBody; -export function isClassDeclaration(node: object | null | undefined, opts?: object | null): node is ClassDeclaration; -export function isClassExpression(node: object | null | undefined, opts?: object | null): node is ClassExpression; -export function isClassImplements(node: object | null | undefined, opts?: object | null): node is ClassImplements; -export function isClassMethod(node: object | null | undefined, opts?: object | null): node is ClassMethod; -export function isClassPrivateMethod(node: object | null | undefined, opts?: object | null): node is ClassPrivateMethod; -export function isClassPrivateProperty(node: object | null | undefined, opts?: object | null): node is ClassPrivateProperty; -export function isClassProperty(node: object | null | undefined, opts?: object | null): node is ClassProperty; -export function isCompletionStatement(node: object | null | undefined, opts?: object | null): node is CompletionStatement; -export function isConditional(node: object | null | undefined, opts?: object | null): node is Conditional; -export function isConditionalExpression(node: object | null | undefined, opts?: object | null): node is ConditionalExpression; -export function isContinueStatement(node: object | null | undefined, opts?: object | null): node is ContinueStatement; -export function isDebuggerStatement(node: object | null | undefined, opts?: object | null): node is DebuggerStatement; -export function isDeclaration(node: object | null | undefined, opts?: object | null): node is Declaration; -export function isDeclareClass(node: object | null | undefined, opts?: object | null): node is DeclareClass; -export function isDeclareExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportAllDeclaration; -export function isDeclareExportDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportDeclaration; -export function isDeclareFunction(node: object | null | undefined, opts?: object | null): node is DeclareFunction; -export function isDeclareInterface(node: object | null | undefined, opts?: object | null): node is DeclareInterface; -export function isDeclareModule(node: object | null | undefined, opts?: object | null): node is DeclareModule; -export function isDeclareModuleExports(node: object | null | undefined, opts?: object | null): node is DeclareModuleExports; -export function isDeclareOpaqueType(node: object | null | undefined, opts?: object | null): node is DeclareOpaqueType; -export function isDeclareTypeAlias(node: object | null | undefined, opts?: object | null): node is DeclareTypeAlias; -export function isDeclareVariable(node: object | null | undefined, opts?: object | null): node is DeclareVariable; -export function isDeclaredPredicate(node: object | null | undefined, opts?: object | null): node is DeclaredPredicate; -export function isDecorator(node: object | null | undefined, opts?: object | null): node is Decorator; -export function isDirective(node: object | null | undefined, opts?: object | null): node is Directive; -export function isDirectiveLiteral(node: object | null | undefined, opts?: object | null): node is DirectiveLiteral; -export function isDoExpression(node: object | null | undefined, opts?: object | null): node is DoExpression; -export function isDoWhileStatement(node: object | null | undefined, opts?: object | null): node is DoWhileStatement; -export function isEmptyStatement(node: object | null | undefined, opts?: object | null): node is EmptyStatement; -export function isEmptyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is EmptyTypeAnnotation; -export function isExistsTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ExistsTypeAnnotation; -export function isExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is ExportAllDeclaration; -export function isExportDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDeclaration; -export function isExportDefaultDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDefaultDeclaration; -export function isExportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ExportDefaultSpecifier; -export function isExportNamedDeclaration(node: object | null | undefined, opts?: object | null): node is ExportNamedDeclaration; -export function isExportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ExportNamespaceSpecifier; -export function isExportSpecifier(node: object | null | undefined, opts?: object | null): node is ExportSpecifier; -export function isExpression(node: object | null | undefined, opts?: object | null): node is Expression; -export function isExpressionStatement(node: object | null | undefined, opts?: object | null): node is ExpressionStatement; -export function isExpressionWrapper(node: object | null | undefined, opts?: object | null): node is ExpressionWrapper; -export function isFile(node: object | null | undefined, opts?: object | null): node is File; -export function isFlow(node: object | null | undefined, opts?: object | null): node is Flow; -export function isFlowBaseAnnotation(node: object | null | undefined, opts?: object | null): node is FlowBaseAnnotation; -export function isFlowDeclaration(node: object | null | undefined, opts?: object | null): node is FlowDeclaration; -export function isFlowPredicate(node: object | null | undefined, opts?: object | null): node is FlowPredicate; -export function isFlowType(node: object | null | undefined, opts?: object | null): node is FlowType; -export function isFor(node: object | null | undefined, opts?: object | null): node is For; -export function isForInStatement(node: object | null | undefined, opts?: object | null): node is ForInStatement; -export function isForOfStatement(node: object | null | undefined, opts?: object | null): node is ForOfStatement; -export function isForStatement(node: object | null | undefined, opts?: object | null): node is ForStatement; -export function isForXStatement(node: object | null | undefined, opts?: object | null): node is ForXStatement; -export function isFunction(node: object | null | undefined, opts?: object | null): node is Function; -export function isFunctionDeclaration(node: object | null | undefined, opts?: object | null): node is FunctionDeclaration; -export function isFunctionExpression(node: object | null | undefined, opts?: object | null): node is FunctionExpression; -export function isFunctionParent(node: object | null | undefined, opts?: object | null): node is FunctionParent; -export function isFunctionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is FunctionTypeAnnotation; -export function isFunctionTypeParam(node: object | null | undefined, opts?: object | null): node is FunctionTypeParam; -export function isGenericTypeAnnotation(node: object | null | undefined, opts?: object | null): node is GenericTypeAnnotation; -export function isIdentifier(node: object | null | undefined, opts?: object | null): node is Identifier; -export function isIfStatement(node: object | null | undefined, opts?: object | null): node is IfStatement; -export function isImmutable(node: object | null | undefined, opts?: object | null): node is Immutable; -export function isImport(node: object | null | undefined, opts?: object | null): node is Import; -export function isImportDeclaration(node: object | null | undefined, opts?: object | null): node is ImportDeclaration; -export function isImportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ImportDefaultSpecifier; -export function isImportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ImportNamespaceSpecifier; -export function isImportSpecifier(node: object | null | undefined, opts?: object | null): node is ImportSpecifier; -export function isInferredPredicate(node: object | null | undefined, opts?: object | null): node is InferredPredicate; -export function isInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is InterfaceDeclaration; -export function isInterfaceExtends(node: object | null | undefined, opts?: object | null): node is InterfaceExtends; -export function isInterfaceTypeAnnotation(node: object | null | undefined, opts?: object | null): node is InterfaceTypeAnnotation; -export function isInterpreterDirective(node: object | null | undefined, opts?: object | null): node is InterpreterDirective; -export function isIntersectionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is IntersectionTypeAnnotation; -export function isJSX(node: object | null | undefined, opts?: object | null): node is JSX; -export function isJSXAttribute(node: object | null | undefined, opts?: object | null): node is JSXAttribute; -export function isJSXClosingElement(node: object | null | undefined, opts?: object | null): node is JSXClosingElement; -export function isJSXClosingFragment(node: object | null | undefined, opts?: object | null): node is JSXClosingFragment; -export function isJSXElement(node: object | null | undefined, opts?: object | null): node is JSXElement; -export function isJSXEmptyExpression(node: object | null | undefined, opts?: object | null): node is JSXEmptyExpression; -export function isJSXExpressionContainer(node: object | null | undefined, opts?: object | null): node is JSXExpressionContainer; -export function isJSXFragment(node: object | null | undefined, opts?: object | null): node is JSXFragment; -export function isJSXIdentifier(node: object | null | undefined, opts?: object | null): node is JSXIdentifier; -export function isJSXMemberExpression(node: object | null | undefined, opts?: object | null): node is JSXMemberExpression; -export function isJSXNamespacedName(node: object | null | undefined, opts?: object | null): node is JSXNamespacedName; -export function isJSXOpeningElement(node: object | null | undefined, opts?: object | null): node is JSXOpeningElement; -export function isJSXOpeningFragment(node: object | null | undefined, opts?: object | null): node is JSXOpeningFragment; -export function isJSXSpreadAttribute(node: object | null | undefined, opts?: object | null): node is JSXSpreadAttribute; -export function isJSXSpreadChild(node: object | null | undefined, opts?: object | null): node is JSXSpreadChild; -export function isJSXText(node: object | null | undefined, opts?: object | null): node is JSXText; -export function isLVal(node: object | null | undefined, opts?: object | null): node is LVal; -export function isLabeledStatement(node: object | null | undefined, opts?: object | null): node is LabeledStatement; -export function isLiteral(node: object | null | undefined, opts?: object | null): node is Literal; -export function isLogicalExpression(node: object | null | undefined, opts?: object | null): node is LogicalExpression; -export function isLoop(node: object | null | undefined, opts?: object | null): node is Loop; -export function isMemberExpression(node: object | null | undefined, opts?: object | null): node is MemberExpression; -export function isMetaProperty(node: object | null | undefined, opts?: object | null): node is MetaProperty; -export function isMethod(node: object | null | undefined, opts?: object | null): node is Method; -export function isMixedTypeAnnotation(node: object | null | undefined, opts?: object | null): node is MixedTypeAnnotation; -export function isModuleDeclaration(node: object | null | undefined, opts?: object | null): node is ModuleDeclaration; -export function isModuleSpecifier(node: object | null | undefined, opts?: object | null): node is ModuleSpecifier; -export function isNewExpression(node: object | null | undefined, opts?: object | null): node is NewExpression; -export function isNoop(node: object | null | undefined, opts?: object | null): node is Noop; -export function isNullLiteral(node: object | null | undefined, opts?: object | null): node is NullLiteral; -export function isNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullLiteralTypeAnnotation; -export function isNullableTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullableTypeAnnotation; -export function isNumberLiteral(node: object | null | undefined, opts?: object | null): boolean; -export function isNumberLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberLiteralTypeAnnotation; -export function isNumberTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberTypeAnnotation; -export function isNumericLiteral(node: object | null | undefined, opts?: object | null): node is NumericLiteral; -export function isObjectExpression(node: object | null | undefined, opts?: object | null): node is ObjectExpression; -export function isObjectMember(node: object | null | undefined, opts?: object | null): node is ObjectMember; -export function isObjectMethod(node: object | null | undefined, opts?: object | null): node is ObjectMethod; -export function isObjectPattern(node: object | null | undefined, opts?: object | null): node is ObjectPattern; -export function isObjectProperty(node: object | null | undefined, opts?: object | null): node is ObjectProperty; -export function isObjectTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ObjectTypeAnnotation; -export function isObjectTypeCallProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeCallProperty; -export function isObjectTypeIndexer(node: object | null | undefined, opts?: object | null): node is ObjectTypeIndexer; -export function isObjectTypeInternalSlot(node: object | null | undefined, opts?: object | null): node is ObjectTypeInternalSlot; -export function isObjectTypeProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeProperty; -export function isObjectTypeSpreadProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeSpreadProperty; -export function isOpaqueType(node: object | null | undefined, opts?: object | null): node is OpaqueType; -export function isOptionalCallExpression(node: object | null | undefined, opts?: object | null): node is OptionalCallExpression; -export function isOptionalMemberExpression(node: object | null | undefined, opts?: object | null): node is OptionalMemberExpression; -export function isParenthesizedExpression(node: object | null | undefined, opts?: object | null): node is ParenthesizedExpression; -export function isPattern(node: object | null | undefined, opts?: object | null): node is Pattern; -export function isPatternLike(node: object | null | undefined, opts?: object | null): node is PatternLike; -export function isPipelineBareFunction(node: object | null | undefined, opts?: object | null): node is PipelineBareFunction; -export function isPipelinePrimaryTopicReference(node: object | null | undefined, opts?: object | null): node is PipelinePrimaryTopicReference; -export function isPipelineTopicExpression(node: object | null | undefined, opts?: object | null): node is PipelineTopicExpression; -export function isPlaceholder(node: object | null | undefined, opts?: object | null): node is Placeholder; -export function isPrivate(node: object | null | undefined, opts?: object | null): node is Private; -export function isPrivateName(node: object | null | undefined, opts?: object | null): node is PrivateName; -export function isProgram(node: object | null | undefined, opts?: object | null): node is Program; -export function isProperty(node: object | null | undefined, opts?: object | null): node is Property; -export function isPureish(node: object | null | undefined, opts?: object | null): node is Pureish; -export function isQualifiedTypeIdentifier(node: object | null | undefined, opts?: object | null): node is QualifiedTypeIdentifier; -export function isRegExpLiteral(node: object | null | undefined, opts?: object | null): node is RegExpLiteral; -export function isRegexLiteral(node: object | null | undefined, opts?: object | null): boolean; -export function isRestElement(node: object | null | undefined, opts?: object | null): node is RestElement; -export function isRestProperty(node: object | null | undefined, opts?: object | null): boolean; -export function isReturnStatement(node: object | null | undefined, opts?: object | null): node is ReturnStatement; -export function isScopable(node: object | null | undefined, opts?: object | null): node is Scopable; -export function isSequenceExpression(node: object | null | undefined, opts?: object | null): node is SequenceExpression; -export function isSpreadElement(node: object | null | undefined, opts?: object | null): node is SpreadElement; -export function isSpreadProperty(node: object | null | undefined, opts?: object | null): boolean; -export function isStatement(node: object | null | undefined, opts?: object | null): node is Statement; -export function isStringLiteral(node: object | null | undefined, opts?: object | null): node is StringLiteral; -export function isStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringLiteralTypeAnnotation; -export function isStringTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringTypeAnnotation; -export function isSuper(node: object | null | undefined, opts?: object | null): node is Super; -export function isSwitchCase(node: object | null | undefined, opts?: object | null): node is SwitchCase; -export function isSwitchStatement(node: object | null | undefined, opts?: object | null): node is SwitchStatement; -export function isTSAnyKeyword(node: object | null | undefined, opts?: object | null): node is TSAnyKeyword; -export function isTSArrayType(node: object | null | undefined, opts?: object | null): node is TSArrayType; -export function isTSAsExpression(node: object | null | undefined, opts?: object | null): node is TSAsExpression; -export function isTSBooleanKeyword(node: object | null | undefined, opts?: object | null): node is TSBooleanKeyword; -export function isTSCallSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSCallSignatureDeclaration; -export function isTSConditionalType(node: object | null | undefined, opts?: object | null): node is TSConditionalType; -export function isTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSConstructSignatureDeclaration; -export function isTSConstructorType(node: object | null | undefined, opts?: object | null): node is TSConstructorType; -export function isTSDeclareFunction(node: object | null | undefined, opts?: object | null): node is TSDeclareFunction; -export function isTSDeclareMethod(node: object | null | undefined, opts?: object | null): node is TSDeclareMethod; -export function isTSEntityName(node: object | null | undefined, opts?: object | null): node is TSEntityName; -export function isTSEnumDeclaration(node: object | null | undefined, opts?: object | null): node is TSEnumDeclaration; -export function isTSEnumMember(node: object | null | undefined, opts?: object | null): node is TSEnumMember; -export function isTSExportAssignment(node: object | null | undefined, opts?: object | null): node is TSExportAssignment; -export function isTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object | null): node is TSExpressionWithTypeArguments; -export function isTSExternalModuleReference(node: object | null | undefined, opts?: object | null): node is TSExternalModuleReference; -export function isTSFunctionType(node: object | null | undefined, opts?: object | null): node is TSFunctionType; -export function isTSImportEqualsDeclaration(node: object | null | undefined, opts?: object | null): node is TSImportEqualsDeclaration; -export function isTSImportType(node: object | null | undefined, opts?: object | null): node is TSImportType; -export function isTSIndexSignature(node: object | null | undefined, opts?: object | null): node is TSIndexSignature; -export function isTSIndexedAccessType(node: object | null | undefined, opts?: object | null): node is TSIndexedAccessType; -export function isTSInferType(node: object | null | undefined, opts?: object | null): node is TSInferType; -export function isTSInterfaceBody(node: object | null | undefined, opts?: object | null): node is TSInterfaceBody; -export function isTSInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is TSInterfaceDeclaration; -export function isTSIntersectionType(node: object | null | undefined, opts?: object | null): node is TSIntersectionType; -export function isTSLiteralType(node: object | null | undefined, opts?: object | null): node is TSLiteralType; -export function isTSMappedType(node: object | null | undefined, opts?: object | null): node is TSMappedType; -export function isTSMethodSignature(node: object | null | undefined, opts?: object | null): node is TSMethodSignature; -export function isTSModuleBlock(node: object | null | undefined, opts?: object | null): node is TSModuleBlock; -export function isTSModuleDeclaration(node: object | null | undefined, opts?: object | null): node is TSModuleDeclaration; -export function isTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object | null): node is TSNamespaceExportDeclaration; -export function isTSNeverKeyword(node: object | null | undefined, opts?: object | null): node is TSNeverKeyword; -export function isTSNonNullExpression(node: object | null | undefined, opts?: object | null): node is TSNonNullExpression; -export function isTSNullKeyword(node: object | null | undefined, opts?: object | null): node is TSNullKeyword; -export function isTSNumberKeyword(node: object | null | undefined, opts?: object | null): node is TSNumberKeyword; -export function isTSObjectKeyword(node: object | null | undefined, opts?: object | null): node is TSObjectKeyword; -export function isTSOptionalType(node: object | null | undefined, opts?: object | null): node is TSOptionalType; -export function isTSParameterProperty(node: object | null | undefined, opts?: object | null): node is TSParameterProperty; -export function isTSParenthesizedType(node: object | null | undefined, opts?: object | null): node is TSParenthesizedType; -export function isTSPropertySignature(node: object | null | undefined, opts?: object | null): node is TSPropertySignature; -export function isTSQualifiedName(node: object | null | undefined, opts?: object | null): node is TSQualifiedName; -export function isTSRestType(node: object | null | undefined, opts?: object | null): node is TSRestType; -export function isTSStringKeyword(node: object | null | undefined, opts?: object | null): node is TSStringKeyword; -export function isTSSymbolKeyword(node: object | null | undefined, opts?: object | null): node is TSSymbolKeyword; -export function isTSThisType(node: object | null | undefined, opts?: object | null): node is TSThisType; -export function isTSTupleType(node: object | null | undefined, opts?: object | null): node is TSTupleType; -export function isTSType(node: object | null | undefined, opts?: object | null): node is TSType; -export function isTSTypeAliasDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeAliasDeclaration; -export function isTSTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TSTypeAnnotation; -export function isTSTypeAssertion(node: object | null | undefined, opts?: object | null): node is TSTypeAssertion; -export function isTSTypeElement(node: object | null | undefined, opts?: object | null): node is TSTypeElement; -export function isTSTypeLiteral(node: object | null | undefined, opts?: object | null): node is TSTypeLiteral; -export function isTSTypeOperator(node: object | null | undefined, opts?: object | null): node is TSTypeOperator; -export function isTSTypeParameter(node: object | null | undefined, opts?: object | null): node is TSTypeParameter; -export function isTSTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeParameterDeclaration; -export function isTSTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TSTypeParameterInstantiation; -export function isTSTypePredicate(node: object | null | undefined, opts?: object | null): node is TSTypePredicate; -export function isTSTypeQuery(node: object | null | undefined, opts?: object | null): node is TSTypeQuery; -export function isTSTypeReference(node: object | null | undefined, opts?: object | null): node is TSTypeReference; -export function isTSUndefinedKeyword(node: object | null | undefined, opts?: object | null): node is TSUndefinedKeyword; -export function isTSUnionType(node: object | null | undefined, opts?: object | null): node is TSUnionType; -export function isTSUnknownKeyword(node: object | null | undefined, opts?: object | null): node is TSUnknownKeyword; -export function isTSVoidKeyword(node: object | null | undefined, opts?: object | null): node is TSVoidKeyword; -export function isTaggedTemplateExpression(node: object | null | undefined, opts?: object | null): node is TaggedTemplateExpression; -export function isTemplateElement(node: object | null | undefined, opts?: object | null): node is TemplateElement; -export function isTemplateLiteral(node: object | null | undefined, opts?: object | null): node is TemplateLiteral; -export function isTerminatorless(node: object | null | undefined, opts?: object | null): node is Terminatorless; -export function isThisExpression(node: object | null | undefined, opts?: object | null): node is ThisExpression; -export function isThisTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ThisTypeAnnotation; -export function isThrowStatement(node: object | null | undefined, opts?: object | null): node is ThrowStatement; -export function isTryStatement(node: object | null | undefined, opts?: object | null): node is TryStatement; -export function isTupleTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TupleTypeAnnotation; -export function isTypeAlias(node: object | null | undefined, opts?: object | null): node is TypeAlias; -export function isTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeAnnotation; -export function isTypeCastExpression(node: object | null | undefined, opts?: object | null): node is TypeCastExpression; -export function isTypeParameter(node: object | null | undefined, opts?: object | null): node is TypeParameter; -export function isTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TypeParameterDeclaration; -export function isTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TypeParameterInstantiation; -export function isTypeofTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeofTypeAnnotation; -export function isUnaryExpression(node: object | null | undefined, opts?: object | null): node is UnaryExpression; -export function isUnaryLike(node: object | null | undefined, opts?: object | null): node is UnaryLike; -export function isUnionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is UnionTypeAnnotation; -export function isUpdateExpression(node: object | null | undefined, opts?: object | null): node is UpdateExpression; -export function isUserWhitespacable(node: object | null | undefined, opts?: object | null): node is UserWhitespacable; -export function isVariableDeclaration(node: object | null | undefined, opts?: object | null): node is VariableDeclaration; -export function isVariableDeclarator(node: object | null | undefined, opts?: object | null): node is VariableDeclarator; -export function isVariance(node: object | null | undefined, opts?: object | null): node is Variance; -export function isVoidTypeAnnotation(node: object | null | undefined, opts?: object | null): node is VoidTypeAnnotation; -export function isWhile(node: object | null | undefined, opts?: object | null): node is While; -export function isWhileStatement(node: object | null | undefined, opts?: object | null): node is WhileStatement; -export function isWithStatement(node: object | null | undefined, opts?: object | null): node is WithStatement; -export function isYieldExpression(node: object | null | undefined, opts?: object | null): node is YieldExpression; -export function validate(n: Node, key: string, value: any): void; -export function clone(n: T): T; -export function cloneDeep(n: T): T; -export function removeProperties( - n: Node, - opts?: { preserveComments: boolean } | null -): void; -export function removePropertiesDeep( - n: T, - opts?: { preserveComments: boolean } | null -): T; -export type TraversalAncestors = ReadonlyArray<{ - node: Node, - key: string, - index?: number, -}>; -export type TraversalHandler = (node: Node, parent: TraversalAncestors, type: T) => void; -export type TraversalHandlers = { - enter?: TraversalHandler, - exit?: TraversalHandler, -}; -export function traverse(n: Node, h: TraversalHandler | TraversalHandlers, state?: T): void; diff --git a/node_modules/@babel/types/lib/index.js b/node_modules/@babel/types/lib/index.js deleted file mode 100644 index f5bb66b0..00000000 --- a/node_modules/@babel/types/lib/index.js +++ /dev/null @@ -1,579 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var _exportNames = { - react: true, - assertNode: true, - createTypeAnnotationBasedOnTypeof: true, - createUnionTypeAnnotation: true, - cloneNode: true, - clone: true, - cloneDeep: true, - cloneWithoutLoc: true, - addComment: true, - addComments: true, - inheritInnerComments: true, - inheritLeadingComments: true, - inheritsComments: true, - inheritTrailingComments: true, - removeComments: true, - ensureBlock: true, - toBindingIdentifierName: true, - toBlock: true, - toComputedKey: true, - toExpression: true, - toIdentifier: true, - toKeyAlias: true, - toSequenceExpression: true, - toStatement: true, - valueToNode: true, - appendToMemberExpression: true, - inherits: true, - prependToMemberExpression: true, - removeProperties: true, - removePropertiesDeep: true, - removeTypeDuplicates: true, - getBindingIdentifiers: true, - getOuterBindingIdentifiers: true, - traverse: true, - traverseFast: true, - shallowEqual: true, - is: true, - isBinding: true, - isBlockScoped: true, - isImmutable: true, - isLet: true, - isNode: true, - isNodesEquivalent: true, - isPlaceholderType: true, - isReferenced: true, - isScope: true, - isSpecifierDefault: true, - isType: true, - isValidES3Identifier: true, - isValidIdentifier: true, - isVar: true, - matchesPattern: true, - validate: true, - buildMatchMemberExpression: true -}; -Object.defineProperty(exports, "assertNode", { - enumerable: true, - get: function () { - return _assertNode.default; - } -}); -Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", { - enumerable: true, - get: function () { - return _createTypeAnnotationBasedOnTypeof.default; - } -}); -Object.defineProperty(exports, "createUnionTypeAnnotation", { - enumerable: true, - get: function () { - return _createUnionTypeAnnotation.default; - } -}); -Object.defineProperty(exports, "cloneNode", { - enumerable: true, - get: function () { - return _cloneNode.default; - } -}); -Object.defineProperty(exports, "clone", { - enumerable: true, - get: function () { - return _clone.default; - } -}); -Object.defineProperty(exports, "cloneDeep", { - enumerable: true, - get: function () { - return _cloneDeep.default; - } -}); -Object.defineProperty(exports, "cloneWithoutLoc", { - enumerable: true, - get: function () { - return _cloneWithoutLoc.default; - } -}); -Object.defineProperty(exports, "addComment", { - enumerable: true, - get: function () { - return _addComment.default; - } -}); -Object.defineProperty(exports, "addComments", { - enumerable: true, - get: function () { - return _addComments.default; - } -}); -Object.defineProperty(exports, "inheritInnerComments", { - enumerable: true, - get: function () { - return _inheritInnerComments.default; - } -}); -Object.defineProperty(exports, "inheritLeadingComments", { - enumerable: true, - get: function () { - return _inheritLeadingComments.default; - } -}); -Object.defineProperty(exports, "inheritsComments", { - enumerable: true, - get: function () { - return _inheritsComments.default; - } -}); -Object.defineProperty(exports, "inheritTrailingComments", { - enumerable: true, - get: function () { - return _inheritTrailingComments.default; - } -}); -Object.defineProperty(exports, "removeComments", { - enumerable: true, - get: function () { - return _removeComments.default; - } -}); -Object.defineProperty(exports, "ensureBlock", { - enumerable: true, - get: function () { - return _ensureBlock.default; - } -}); -Object.defineProperty(exports, "toBindingIdentifierName", { - enumerable: true, - get: function () { - return _toBindingIdentifierName.default; - } -}); -Object.defineProperty(exports, "toBlock", { - enumerable: true, - get: function () { - return _toBlock.default; - } -}); -Object.defineProperty(exports, "toComputedKey", { - enumerable: true, - get: function () { - return _toComputedKey.default; - } -}); -Object.defineProperty(exports, "toExpression", { - enumerable: true, - get: function () { - return _toExpression.default; - } -}); -Object.defineProperty(exports, "toIdentifier", { - enumerable: true, - get: function () { - return _toIdentifier.default; - } -}); -Object.defineProperty(exports, "toKeyAlias", { - enumerable: true, - get: function () { - return _toKeyAlias.default; - } -}); -Object.defineProperty(exports, "toSequenceExpression", { - enumerable: true, - get: function () { - return _toSequenceExpression.default; - } -}); -Object.defineProperty(exports, "toStatement", { - enumerable: true, - get: function () { - return _toStatement.default; - } -}); -Object.defineProperty(exports, "valueToNode", { - enumerable: true, - get: function () { - return _valueToNode.default; - } -}); -Object.defineProperty(exports, "appendToMemberExpression", { - enumerable: true, - get: function () { - return _appendToMemberExpression.default; - } -}); -Object.defineProperty(exports, "inherits", { - enumerable: true, - get: function () { - return _inherits.default; - } -}); -Object.defineProperty(exports, "prependToMemberExpression", { - enumerable: true, - get: function () { - return _prependToMemberExpression.default; - } -}); -Object.defineProperty(exports, "removeProperties", { - enumerable: true, - get: function () { - return _removeProperties.default; - } -}); -Object.defineProperty(exports, "removePropertiesDeep", { - enumerable: true, - get: function () { - return _removePropertiesDeep.default; - } -}); -Object.defineProperty(exports, "removeTypeDuplicates", { - enumerable: true, - get: function () { - return _removeTypeDuplicates.default; - } -}); -Object.defineProperty(exports, "getBindingIdentifiers", { - enumerable: true, - get: function () { - return _getBindingIdentifiers.default; - } -}); -Object.defineProperty(exports, "getOuterBindingIdentifiers", { - enumerable: true, - get: function () { - return _getOuterBindingIdentifiers.default; - } -}); -Object.defineProperty(exports, "traverse", { - enumerable: true, - get: function () { - return _traverse.default; - } -}); -Object.defineProperty(exports, "traverseFast", { - enumerable: true, - get: function () { - return _traverseFast.default; - } -}); -Object.defineProperty(exports, "shallowEqual", { - enumerable: true, - get: function () { - return _shallowEqual.default; - } -}); -Object.defineProperty(exports, "is", { - enumerable: true, - get: function () { - return _is.default; - } -}); -Object.defineProperty(exports, "isBinding", { - enumerable: true, - get: function () { - return _isBinding.default; - } -}); -Object.defineProperty(exports, "isBlockScoped", { - enumerable: true, - get: function () { - return _isBlockScoped.default; - } -}); -Object.defineProperty(exports, "isImmutable", { - enumerable: true, - get: function () { - return _isImmutable.default; - } -}); -Object.defineProperty(exports, "isLet", { - enumerable: true, - get: function () { - return _isLet.default; - } -}); -Object.defineProperty(exports, "isNode", { - enumerable: true, - get: function () { - return _isNode.default; - } -}); -Object.defineProperty(exports, "isNodesEquivalent", { - enumerable: true, - get: function () { - return _isNodesEquivalent.default; - } -}); -Object.defineProperty(exports, "isPlaceholderType", { - enumerable: true, - get: function () { - return _isPlaceholderType.default; - } -}); -Object.defineProperty(exports, "isReferenced", { - enumerable: true, - get: function () { - return _isReferenced.default; - } -}); -Object.defineProperty(exports, "isScope", { - enumerable: true, - get: function () { - return _isScope.default; - } -}); -Object.defineProperty(exports, "isSpecifierDefault", { - enumerable: true, - get: function () { - return _isSpecifierDefault.default; - } -}); -Object.defineProperty(exports, "isType", { - enumerable: true, - get: function () { - return _isType.default; - } -}); -Object.defineProperty(exports, "isValidES3Identifier", { - enumerable: true, - get: function () { - return _isValidES3Identifier.default; - } -}); -Object.defineProperty(exports, "isValidIdentifier", { - enumerable: true, - get: function () { - return _isValidIdentifier.default; - } -}); -Object.defineProperty(exports, "isVar", { - enumerable: true, - get: function () { - return _isVar.default; - } -}); -Object.defineProperty(exports, "matchesPattern", { - enumerable: true, - get: function () { - return _matchesPattern.default; - } -}); -Object.defineProperty(exports, "validate", { - enumerable: true, - get: function () { - return _validate.default; - } -}); -Object.defineProperty(exports, "buildMatchMemberExpression", { - enumerable: true, - get: function () { - return _buildMatchMemberExpression.default; - } -}); -exports.react = void 0; - -var _isReactComponent = _interopRequireDefault(require("./validators/react/isReactComponent")); - -var _isCompatTag = _interopRequireDefault(require("./validators/react/isCompatTag")); - -var _buildChildren = _interopRequireDefault(require("./builders/react/buildChildren")); - -var _assertNode = _interopRequireDefault(require("./asserts/assertNode")); - -var _generated = require("./asserts/generated"); - -Object.keys(_generated).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _generated[key]; - } - }); -}); - -var _createTypeAnnotationBasedOnTypeof = _interopRequireDefault(require("./builders/flow/createTypeAnnotationBasedOnTypeof")); - -var _createUnionTypeAnnotation = _interopRequireDefault(require("./builders/flow/createUnionTypeAnnotation")); - -var _generated2 = require("./builders/generated"); - -Object.keys(_generated2).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _generated2[key]; - } - }); -}); - -var _cloneNode = _interopRequireDefault(require("./clone/cloneNode")); - -var _clone = _interopRequireDefault(require("./clone/clone")); - -var _cloneDeep = _interopRequireDefault(require("./clone/cloneDeep")); - -var _cloneWithoutLoc = _interopRequireDefault(require("./clone/cloneWithoutLoc")); - -var _addComment = _interopRequireDefault(require("./comments/addComment")); - -var _addComments = _interopRequireDefault(require("./comments/addComments")); - -var _inheritInnerComments = _interopRequireDefault(require("./comments/inheritInnerComments")); - -var _inheritLeadingComments = _interopRequireDefault(require("./comments/inheritLeadingComments")); - -var _inheritsComments = _interopRequireDefault(require("./comments/inheritsComments")); - -var _inheritTrailingComments = _interopRequireDefault(require("./comments/inheritTrailingComments")); - -var _removeComments = _interopRequireDefault(require("./comments/removeComments")); - -var _generated3 = require("./constants/generated"); - -Object.keys(_generated3).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _generated3[key]; - } - }); -}); - -var _constants = require("./constants"); - -Object.keys(_constants).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _constants[key]; - } - }); -}); - -var _ensureBlock = _interopRequireDefault(require("./converters/ensureBlock")); - -var _toBindingIdentifierName = _interopRequireDefault(require("./converters/toBindingIdentifierName")); - -var _toBlock = _interopRequireDefault(require("./converters/toBlock")); - -var _toComputedKey = _interopRequireDefault(require("./converters/toComputedKey")); - -var _toExpression = _interopRequireDefault(require("./converters/toExpression")); - -var _toIdentifier = _interopRequireDefault(require("./converters/toIdentifier")); - -var _toKeyAlias = _interopRequireDefault(require("./converters/toKeyAlias")); - -var _toSequenceExpression = _interopRequireDefault(require("./converters/toSequenceExpression")); - -var _toStatement = _interopRequireDefault(require("./converters/toStatement")); - -var _valueToNode = _interopRequireDefault(require("./converters/valueToNode")); - -var _definitions = require("./definitions"); - -Object.keys(_definitions).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _definitions[key]; - } - }); -}); - -var _appendToMemberExpression = _interopRequireDefault(require("./modifications/appendToMemberExpression")); - -var _inherits = _interopRequireDefault(require("./modifications/inherits")); - -var _prependToMemberExpression = _interopRequireDefault(require("./modifications/prependToMemberExpression")); - -var _removeProperties = _interopRequireDefault(require("./modifications/removeProperties")); - -var _removePropertiesDeep = _interopRequireDefault(require("./modifications/removePropertiesDeep")); - -var _removeTypeDuplicates = _interopRequireDefault(require("./modifications/flow/removeTypeDuplicates")); - -var _getBindingIdentifiers = _interopRequireDefault(require("./retrievers/getBindingIdentifiers")); - -var _getOuterBindingIdentifiers = _interopRequireDefault(require("./retrievers/getOuterBindingIdentifiers")); - -var _traverse = _interopRequireDefault(require("./traverse/traverse")); - -var _traverseFast = _interopRequireDefault(require("./traverse/traverseFast")); - -var _shallowEqual = _interopRequireDefault(require("./utils/shallowEqual")); - -var _is = _interopRequireDefault(require("./validators/is")); - -var _isBinding = _interopRequireDefault(require("./validators/isBinding")); - -var _isBlockScoped = _interopRequireDefault(require("./validators/isBlockScoped")); - -var _isImmutable = _interopRequireDefault(require("./validators/isImmutable")); - -var _isLet = _interopRequireDefault(require("./validators/isLet")); - -var _isNode = _interopRequireDefault(require("./validators/isNode")); - -var _isNodesEquivalent = _interopRequireDefault(require("./validators/isNodesEquivalent")); - -var _isPlaceholderType = _interopRequireDefault(require("./validators/isPlaceholderType")); - -var _isReferenced = _interopRequireDefault(require("./validators/isReferenced")); - -var _isScope = _interopRequireDefault(require("./validators/isScope")); - -var _isSpecifierDefault = _interopRequireDefault(require("./validators/isSpecifierDefault")); - -var _isType = _interopRequireDefault(require("./validators/isType")); - -var _isValidES3Identifier = _interopRequireDefault(require("./validators/isValidES3Identifier")); - -var _isValidIdentifier = _interopRequireDefault(require("./validators/isValidIdentifier")); - -var _isVar = _interopRequireDefault(require("./validators/isVar")); - -var _matchesPattern = _interopRequireDefault(require("./validators/matchesPattern")); - -var _validate = _interopRequireDefault(require("./validators/validate")); - -var _buildMatchMemberExpression = _interopRequireDefault(require("./validators/buildMatchMemberExpression")); - -var _generated4 = require("./validators/generated"); - -Object.keys(_generated4).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _generated4[key]; - } - }); -}); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const react = { - isReactComponent: _isReactComponent.default, - isCompatTag: _isCompatTag.default, - buildChildren: _buildChildren.default -}; -exports.react = react; \ No newline at end of file diff --git a/node_modules/@babel/types/lib/index.js.flow b/node_modules/@babel/types/lib/index.js.flow deleted file mode 100644 index c7e80a15..00000000 --- a/node_modules/@babel/types/lib/index.js.flow +++ /dev/null @@ -1,1975 +0,0 @@ -// NOTE: This file is autogenerated. Do not modify. -// See packages/babel-types/scripts/generators/flow.js for script used. - -declare class BabelNodeComment { - value: string; - start: number; - end: number; - loc: BabelNodeSourceLocation; -} - -declare class BabelNodeCommentBlock extends BabelNodeComment { - type: "CommentBlock"; -} - -declare class BabelNodeCommentLine extends BabelNodeComment { - type: "CommentLine"; -} - -declare class BabelNodeSourceLocation { - start: { - line: number; - column: number; - }; - - end: { - line: number; - column: number; - }; -} - -declare class BabelNode { - leadingComments?: Array; - innerComments?: Array; - trailingComments?: Array; - start: ?number; - end: ?number; - loc: ?BabelNodeSourceLocation; -} - -declare class BabelNodeArrayExpression extends BabelNode { - type: "ArrayExpression"; - elements?: Array; -} - -declare class BabelNodeAssignmentExpression extends BabelNode { - type: "AssignmentExpression"; - operator: string; - left: BabelNodeLVal; - right: BabelNodeExpression; -} - -declare class BabelNodeBinaryExpression extends BabelNode { - type: "BinaryExpression"; - operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<="; - left: BabelNodeExpression; - right: BabelNodeExpression; -} - -declare class BabelNodeInterpreterDirective extends BabelNode { - type: "InterpreterDirective"; - value: string; -} - -declare class BabelNodeDirective extends BabelNode { - type: "Directive"; - value: BabelNodeDirectiveLiteral; -} - -declare class BabelNodeDirectiveLiteral extends BabelNode { - type: "DirectiveLiteral"; - value: string; -} - -declare class BabelNodeBlockStatement extends BabelNode { - type: "BlockStatement"; - body: Array; - directives?: Array; -} - -declare class BabelNodeBreakStatement extends BabelNode { - type: "BreakStatement"; - label?: BabelNodeIdentifier; -} - -declare class BabelNodeCallExpression extends BabelNode { - type: "CallExpression"; - callee: BabelNodeExpression; - arguments: Array; - optional?: true | false; - typeArguments?: BabelNodeTypeParameterInstantiation; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeCatchClause extends BabelNode { - type: "CatchClause"; - param?: BabelNodeIdentifier; - body: BabelNodeBlockStatement; -} - -declare class BabelNodeConditionalExpression extends BabelNode { - type: "ConditionalExpression"; - test: BabelNodeExpression; - consequent: BabelNodeExpression; - alternate: BabelNodeExpression; -} - -declare class BabelNodeContinueStatement extends BabelNode { - type: "ContinueStatement"; - label?: BabelNodeIdentifier; -} - -declare class BabelNodeDebuggerStatement extends BabelNode { - type: "DebuggerStatement"; -} - -declare class BabelNodeDoWhileStatement extends BabelNode { - type: "DoWhileStatement"; - test: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeEmptyStatement extends BabelNode { - type: "EmptyStatement"; -} - -declare class BabelNodeExpressionStatement extends BabelNode { - type: "ExpressionStatement"; - expression: BabelNodeExpression; -} - -declare class BabelNodeFile extends BabelNode { - type: "File"; - program: BabelNodeProgram; - comments: any; - tokens: any; -} - -declare class BabelNodeForInStatement extends BabelNode { - type: "ForInStatement"; - left: BabelNodeVariableDeclaration | BabelNodeLVal; - right: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeForStatement extends BabelNode { - type: "ForStatement"; - init?: BabelNodeVariableDeclaration | BabelNodeExpression; - test?: BabelNodeExpression; - update?: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeFunctionDeclaration extends BabelNode { - type: "FunctionDeclaration"; - id?: BabelNodeIdentifier; - params: Array; - body: BabelNodeBlockStatement; - generator?: boolean; - async?: boolean; - declare?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeFunctionExpression extends BabelNode { - type: "FunctionExpression"; - id?: BabelNodeIdentifier; - params: Array; - body: BabelNodeBlockStatement; - generator?: boolean; - async?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeIdentifier extends BabelNode { - type: "Identifier"; - name: string; - decorators?: Array; - optional?: boolean; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeIfStatement extends BabelNode { - type: "IfStatement"; - test: BabelNodeExpression; - consequent: BabelNodeStatement; - alternate?: BabelNodeStatement; -} - -declare class BabelNodeLabeledStatement extends BabelNode { - type: "LabeledStatement"; - label: BabelNodeIdentifier; - body: BabelNodeStatement; -} - -declare class BabelNodeStringLiteral extends BabelNode { - type: "StringLiteral"; - value: string; -} - -declare class BabelNodeNumericLiteral extends BabelNode { - type: "NumericLiteral"; - value: number; -} - -declare class BabelNodeNullLiteral extends BabelNode { - type: "NullLiteral"; -} - -declare class BabelNodeBooleanLiteral extends BabelNode { - type: "BooleanLiteral"; - value: boolean; -} - -declare class BabelNodeRegExpLiteral extends BabelNode { - type: "RegExpLiteral"; - pattern: string; - flags?: string; -} - -declare class BabelNodeLogicalExpression extends BabelNode { - type: "LogicalExpression"; - operator: "||" | "&&" | "??"; - left: BabelNodeExpression; - right: BabelNodeExpression; -} - -declare class BabelNodeMemberExpression extends BabelNode { - type: "MemberExpression"; - object: BabelNodeExpression; - property: any; - computed?: boolean; - optional?: true | false; -} - -declare class BabelNodeNewExpression extends BabelNode { - type: "NewExpression"; - callee: BabelNodeExpression; - arguments: Array; - optional?: true | false; - typeArguments?: BabelNodeTypeParameterInstantiation; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeProgram extends BabelNode { - type: "Program"; - body: Array; - directives?: Array; - sourceType?: "script" | "module"; - interpreter?: BabelNodeInterpreterDirective; - sourceFile?: string; -} - -declare class BabelNodeObjectExpression extends BabelNode { - type: "ObjectExpression"; - properties: Array; -} - -declare class BabelNodeObjectMethod extends BabelNode { - type: "ObjectMethod"; - kind?: "method" | "get" | "set"; - key: any; - params: Array; - body: BabelNodeBlockStatement; - computed?: boolean; - async?: boolean; - decorators?: Array; - generator?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeObjectProperty extends BabelNode { - type: "ObjectProperty"; - key: any; - value: BabelNodeExpression | BabelNodePatternLike; - computed?: boolean; - shorthand?: boolean; - decorators?: Array; -} - -declare class BabelNodeRestElement extends BabelNode { - type: "RestElement"; - argument: BabelNodeLVal; - decorators?: Array; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeReturnStatement extends BabelNode { - type: "ReturnStatement"; - argument?: BabelNodeExpression; -} - -declare class BabelNodeSequenceExpression extends BabelNode { - type: "SequenceExpression"; - expressions: Array; -} - -declare class BabelNodeParenthesizedExpression extends BabelNode { - type: "ParenthesizedExpression"; - expression: BabelNodeExpression; -} - -declare class BabelNodeSwitchCase extends BabelNode { - type: "SwitchCase"; - test?: BabelNodeExpression; - consequent: Array; -} - -declare class BabelNodeSwitchStatement extends BabelNode { - type: "SwitchStatement"; - discriminant: BabelNodeExpression; - cases: Array; -} - -declare class BabelNodeThisExpression extends BabelNode { - type: "ThisExpression"; -} - -declare class BabelNodeThrowStatement extends BabelNode { - type: "ThrowStatement"; - argument: BabelNodeExpression; -} - -declare class BabelNodeTryStatement extends BabelNode { - type: "TryStatement"; - block: BabelNodeBlockStatement; - handler?: BabelNodeCatchClause; - finalizer?: BabelNodeBlockStatement; -} - -declare class BabelNodeUnaryExpression extends BabelNode { - type: "UnaryExpression"; - operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof"; - argument: BabelNodeExpression; - prefix?: boolean; -} - -declare class BabelNodeUpdateExpression extends BabelNode { - type: "UpdateExpression"; - operator: "++" | "--"; - argument: BabelNodeExpression; - prefix?: boolean; -} - -declare class BabelNodeVariableDeclaration extends BabelNode { - type: "VariableDeclaration"; - kind: "var" | "let" | "const"; - declarations: Array; - declare?: boolean; -} - -declare class BabelNodeVariableDeclarator extends BabelNode { - type: "VariableDeclarator"; - id: BabelNodeLVal; - init?: BabelNodeExpression; - definite?: boolean; -} - -declare class BabelNodeWhileStatement extends BabelNode { - type: "WhileStatement"; - test: BabelNodeExpression; - body: BabelNodeBlockStatement | BabelNodeStatement; -} - -declare class BabelNodeWithStatement extends BabelNode { - type: "WithStatement"; - object: BabelNodeExpression; - body: BabelNodeBlockStatement | BabelNodeStatement; -} - -declare class BabelNodeAssignmentPattern extends BabelNode { - type: "AssignmentPattern"; - left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression; - right: BabelNodeExpression; - decorators?: Array; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeArrayPattern extends BabelNode { - type: "ArrayPattern"; - elements: Array; - decorators?: Array; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeArrowFunctionExpression extends BabelNode { - type: "ArrowFunctionExpression"; - params: Array; - body: BabelNodeBlockStatement | BabelNodeExpression; - async?: boolean; - expression?: boolean; - generator?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeClassBody extends BabelNode { - type: "ClassBody"; - body: Array; -} - -declare class BabelNodeClassDeclaration extends BabelNode { - type: "ClassDeclaration"; - id?: BabelNodeIdentifier; - superClass?: BabelNodeExpression; - body: BabelNodeClassBody; - decorators?: Array; - abstract?: boolean; - declare?: boolean; - mixins?: any; - superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeClassExpression extends BabelNode { - type: "ClassExpression"; - id?: BabelNodeIdentifier; - superClass?: BabelNodeExpression; - body: BabelNodeClassBody; - decorators?: Array; - mixins?: any; - superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeExportAllDeclaration extends BabelNode { - type: "ExportAllDeclaration"; - source: BabelNodeStringLiteral; -} - -declare class BabelNodeExportDefaultDeclaration extends BabelNode { - type: "ExportDefaultDeclaration"; - declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression; -} - -declare class BabelNodeExportNamedDeclaration extends BabelNode { - type: "ExportNamedDeclaration"; - declaration?: BabelNodeDeclaration; - specifiers: Array; - source?: BabelNodeStringLiteral; - exportKind?: "type" | "value"; -} - -declare class BabelNodeExportSpecifier extends BabelNode { - type: "ExportSpecifier"; - local: BabelNodeIdentifier; - exported: BabelNodeIdentifier; -} - -declare class BabelNodeForOfStatement extends BabelNode { - type: "ForOfStatement"; - left: BabelNodeVariableDeclaration | BabelNodeLVal; - right: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeImportDeclaration extends BabelNode { - type: "ImportDeclaration"; - specifiers: Array; - source: BabelNodeStringLiteral; - importKind?: "type" | "typeof" | "value"; -} - -declare class BabelNodeImportDefaultSpecifier extends BabelNode { - type: "ImportDefaultSpecifier"; - local: BabelNodeIdentifier; -} - -declare class BabelNodeImportNamespaceSpecifier extends BabelNode { - type: "ImportNamespaceSpecifier"; - local: BabelNodeIdentifier; -} - -declare class BabelNodeImportSpecifier extends BabelNode { - type: "ImportSpecifier"; - local: BabelNodeIdentifier; - imported: BabelNodeIdentifier; - importKind?: "type" | "typeof"; -} - -declare class BabelNodeMetaProperty extends BabelNode { - type: "MetaProperty"; - meta: BabelNodeIdentifier; - property: BabelNodeIdentifier; -} - -declare class BabelNodeClassMethod extends BabelNode { - type: "ClassMethod"; - kind?: "get" | "set" | "method" | "constructor"; - key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; - params: Array; - body: BabelNodeBlockStatement; - computed?: boolean; - abstract?: boolean; - access?: "public" | "private" | "protected"; - accessibility?: "public" | "private" | "protected"; - async?: boolean; - decorators?: Array; - generator?: boolean; - optional?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeObjectPattern extends BabelNode { - type: "ObjectPattern"; - properties: Array; - decorators?: Array; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeSpreadElement extends BabelNode { - type: "SpreadElement"; - argument: BabelNodeExpression; -} - -declare class BabelNodeSuper extends BabelNode { - type: "Super"; -} - -declare class BabelNodeTaggedTemplateExpression extends BabelNode { - type: "TaggedTemplateExpression"; - tag: BabelNodeExpression; - quasi: BabelNodeTemplateLiteral; - typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeTemplateElement extends BabelNode { - type: "TemplateElement"; - value: { raw: string, cooked?: string }; - tail?: boolean; -} - -declare class BabelNodeTemplateLiteral extends BabelNode { - type: "TemplateLiteral"; - quasis: Array; - expressions: Array; -} - -declare class BabelNodeYieldExpression extends BabelNode { - type: "YieldExpression"; - argument?: BabelNodeExpression; - delegate?: boolean; -} - -declare class BabelNodeAnyTypeAnnotation extends BabelNode { - type: "AnyTypeAnnotation"; -} - -declare class BabelNodeArrayTypeAnnotation extends BabelNode { - type: "ArrayTypeAnnotation"; - elementType: BabelNodeFlowType; -} - -declare class BabelNodeBooleanTypeAnnotation extends BabelNode { - type: "BooleanTypeAnnotation"; -} - -declare class BabelNodeBooleanLiteralTypeAnnotation extends BabelNode { - type: "BooleanLiteralTypeAnnotation"; - value: boolean; -} - -declare class BabelNodeNullLiteralTypeAnnotation extends BabelNode { - type: "NullLiteralTypeAnnotation"; -} - -declare class BabelNodeClassImplements extends BabelNode { - type: "ClassImplements"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterInstantiation; -} - -declare class BabelNodeDeclareClass extends BabelNode { - type: "DeclareClass"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - body: BabelNodeObjectTypeAnnotation; - mixins?: Array; -} - -declare class BabelNodeDeclareFunction extends BabelNode { - type: "DeclareFunction"; - id: BabelNodeIdentifier; - predicate?: BabelNodeDeclaredPredicate; -} - -declare class BabelNodeDeclareInterface extends BabelNode { - type: "DeclareInterface"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - body: BabelNodeObjectTypeAnnotation; - mixins?: Array; -} - -declare class BabelNodeDeclareModule extends BabelNode { - type: "DeclareModule"; - id: BabelNodeIdentifier | BabelNodeStringLiteral; - body: BabelNodeBlockStatement; - kind?: "CommonJS" | "ES"; -} - -declare class BabelNodeDeclareModuleExports extends BabelNode { - type: "DeclareModuleExports"; - typeAnnotation: BabelNodeTypeAnnotation; -} - -declare class BabelNodeDeclareTypeAlias extends BabelNode { - type: "DeclareTypeAlias"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - right: BabelNodeFlowType; -} - -declare class BabelNodeDeclareOpaqueType extends BabelNode { - type: "DeclareOpaqueType"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - supertype?: BabelNodeFlowType; -} - -declare class BabelNodeDeclareVariable extends BabelNode { - type: "DeclareVariable"; - id: BabelNodeIdentifier; -} - -declare class BabelNodeDeclareExportDeclaration extends BabelNode { - type: "DeclareExportDeclaration"; - declaration?: BabelNodeFlow; - specifiers?: Array; - source?: BabelNodeStringLiteral; -} - -declare class BabelNodeDeclareExportAllDeclaration extends BabelNode { - type: "DeclareExportAllDeclaration"; - source: BabelNodeStringLiteral; - exportKind?: "type" | "value"; -} - -declare class BabelNodeDeclaredPredicate extends BabelNode { - type: "DeclaredPredicate"; - value: BabelNodeFlow; -} - -declare class BabelNodeExistsTypeAnnotation extends BabelNode { - type: "ExistsTypeAnnotation"; -} - -declare class BabelNodeFunctionTypeAnnotation extends BabelNode { - type: "FunctionTypeAnnotation"; - typeParameters?: BabelNodeTypeParameterDeclaration; - params: Array; - rest?: BabelNodeFunctionTypeParam; - returnType: BabelNodeFlowType; -} - -declare class BabelNodeFunctionTypeParam extends BabelNode { - type: "FunctionTypeParam"; - name?: BabelNodeIdentifier; - typeAnnotation: BabelNodeFlowType; - optional?: boolean; -} - -declare class BabelNodeGenericTypeAnnotation extends BabelNode { - type: "GenericTypeAnnotation"; - id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; - typeParameters?: BabelNodeTypeParameterInstantiation; -} - -declare class BabelNodeInferredPredicate extends BabelNode { - type: "InferredPredicate"; -} - -declare class BabelNodeInterfaceExtends extends BabelNode { - type: "InterfaceExtends"; - id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; - typeParameters?: BabelNodeTypeParameterInstantiation; -} - -declare class BabelNodeInterfaceDeclaration extends BabelNode { - type: "InterfaceDeclaration"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - body: BabelNodeObjectTypeAnnotation; - mixins?: Array; -} - -declare class BabelNodeInterfaceTypeAnnotation extends BabelNode { - type: "InterfaceTypeAnnotation"; - body: BabelNodeObjectTypeAnnotation; -} - -declare class BabelNodeIntersectionTypeAnnotation extends BabelNode { - type: "IntersectionTypeAnnotation"; - types: Array; -} - -declare class BabelNodeMixedTypeAnnotation extends BabelNode { - type: "MixedTypeAnnotation"; -} - -declare class BabelNodeEmptyTypeAnnotation extends BabelNode { - type: "EmptyTypeAnnotation"; -} - -declare class BabelNodeNullableTypeAnnotation extends BabelNode { - type: "NullableTypeAnnotation"; - typeAnnotation: BabelNodeFlowType; -} - -declare class BabelNodeNumberLiteralTypeAnnotation extends BabelNode { - type: "NumberLiteralTypeAnnotation"; - value: number; -} - -declare class BabelNodeNumberTypeAnnotation extends BabelNode { - type: "NumberTypeAnnotation"; -} - -declare class BabelNodeObjectTypeAnnotation extends BabelNode { - type: "ObjectTypeAnnotation"; - properties: Array; - indexers?: Array; - callProperties?: Array; - internalSlots?: Array; - exact?: boolean; - inexact?: boolean; -} - -declare class BabelNodeObjectTypeInternalSlot extends BabelNode { - type: "ObjectTypeInternalSlot"; - id: BabelNodeIdentifier; - value: BabelNodeFlowType; - optional: boolean; - method: boolean; -} - -declare class BabelNodeObjectTypeCallProperty extends BabelNode { - type: "ObjectTypeCallProperty"; - value: BabelNodeFlowType; -} - -declare class BabelNodeObjectTypeIndexer extends BabelNode { - type: "ObjectTypeIndexer"; - id?: BabelNodeIdentifier; - key: BabelNodeFlowType; - value: BabelNodeFlowType; - variance?: BabelNodeVariance; -} - -declare class BabelNodeObjectTypeProperty extends BabelNode { - type: "ObjectTypeProperty"; - key: BabelNodeIdentifier | BabelNodeStringLiteral; - value: BabelNodeFlowType; - variance?: BabelNodeVariance; - kind?: "init" | "get" | "set"; - optional?: boolean; - proto?: boolean; -} - -declare class BabelNodeObjectTypeSpreadProperty extends BabelNode { - type: "ObjectTypeSpreadProperty"; - argument: BabelNodeFlowType; -} - -declare class BabelNodeOpaqueType extends BabelNode { - type: "OpaqueType"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - supertype?: BabelNodeFlowType; - impltype: BabelNodeFlowType; -} - -declare class BabelNodeQualifiedTypeIdentifier extends BabelNode { - type: "QualifiedTypeIdentifier"; - id: BabelNodeIdentifier; - qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; -} - -declare class BabelNodeStringLiteralTypeAnnotation extends BabelNode { - type: "StringLiteralTypeAnnotation"; - value: string; -} - -declare class BabelNodeStringTypeAnnotation extends BabelNode { - type: "StringTypeAnnotation"; -} - -declare class BabelNodeThisTypeAnnotation extends BabelNode { - type: "ThisTypeAnnotation"; -} - -declare class BabelNodeTupleTypeAnnotation extends BabelNode { - type: "TupleTypeAnnotation"; - types: Array; -} - -declare class BabelNodeTypeofTypeAnnotation extends BabelNode { - type: "TypeofTypeAnnotation"; - argument: BabelNodeFlowType; -} - -declare class BabelNodeTypeAlias extends BabelNode { - type: "TypeAlias"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - right: BabelNodeFlowType; -} - -declare class BabelNodeTypeAnnotation extends BabelNode { - type: "TypeAnnotation"; - typeAnnotation: BabelNodeFlowType; -} - -declare class BabelNodeTypeCastExpression extends BabelNode { - type: "TypeCastExpression"; - expression: BabelNodeExpression; - typeAnnotation: BabelNodeTypeAnnotation; -} - -declare class BabelNodeTypeParameter extends BabelNode { - type: "TypeParameter"; - bound?: BabelNodeTypeAnnotation; - variance?: BabelNodeVariance; - name?: string; -} - -declare class BabelNodeTypeParameterDeclaration extends BabelNode { - type: "TypeParameterDeclaration"; - params: Array; -} - -declare class BabelNodeTypeParameterInstantiation extends BabelNode { - type: "TypeParameterInstantiation"; - params: Array; -} - -declare class BabelNodeUnionTypeAnnotation extends BabelNode { - type: "UnionTypeAnnotation"; - types: Array; -} - -declare class BabelNodeVariance extends BabelNode { - type: "Variance"; - kind: "minus" | "plus"; -} - -declare class BabelNodeVoidTypeAnnotation extends BabelNode { - type: "VoidTypeAnnotation"; -} - -declare class BabelNodeJSXAttribute extends BabelNode { - type: "JSXAttribute"; - name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName; - value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer; -} - -declare class BabelNodeJSXClosingElement extends BabelNode { - type: "JSXClosingElement"; - name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression; -} - -declare class BabelNodeJSXElement extends BabelNode { - type: "JSXElement"; - openingElement: BabelNodeJSXOpeningElement; - closingElement?: BabelNodeJSXClosingElement; - children: Array; - selfClosing: any; -} - -declare class BabelNodeJSXEmptyExpression extends BabelNode { - type: "JSXEmptyExpression"; -} - -declare class BabelNodeJSXExpressionContainer extends BabelNode { - type: "JSXExpressionContainer"; - expression: BabelNodeExpression | BabelNodeJSXEmptyExpression; -} - -declare class BabelNodeJSXSpreadChild extends BabelNode { - type: "JSXSpreadChild"; - expression: BabelNodeExpression; -} - -declare class BabelNodeJSXIdentifier extends BabelNode { - type: "JSXIdentifier"; - name: string; -} - -declare class BabelNodeJSXMemberExpression extends BabelNode { - type: "JSXMemberExpression"; - object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier; - property: BabelNodeJSXIdentifier; -} - -declare class BabelNodeJSXNamespacedName extends BabelNode { - type: "JSXNamespacedName"; - namespace: BabelNodeJSXIdentifier; - name: BabelNodeJSXIdentifier; -} - -declare class BabelNodeJSXOpeningElement extends BabelNode { - type: "JSXOpeningElement"; - name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression; - attributes: Array; - selfClosing?: boolean; - typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeJSXSpreadAttribute extends BabelNode { - type: "JSXSpreadAttribute"; - argument: BabelNodeExpression; -} - -declare class BabelNodeJSXText extends BabelNode { - type: "JSXText"; - value: string; -} - -declare class BabelNodeJSXFragment extends BabelNode { - type: "JSXFragment"; - openingFragment: BabelNodeJSXOpeningFragment; - closingFragment: BabelNodeJSXClosingFragment; - children: Array; -} - -declare class BabelNodeJSXOpeningFragment extends BabelNode { - type: "JSXOpeningFragment"; -} - -declare class BabelNodeJSXClosingFragment extends BabelNode { - type: "JSXClosingFragment"; -} - -declare class BabelNodeNoop extends BabelNode { - type: "Noop"; -} - -declare class BabelNodePlaceholder extends BabelNode { - type: "Placeholder"; - expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern"; - name: BabelNodeIdentifier; -} - -declare class BabelNodeArgumentPlaceholder extends BabelNode { - type: "ArgumentPlaceholder"; -} - -declare class BabelNodeAwaitExpression extends BabelNode { - type: "AwaitExpression"; - argument: BabelNodeExpression; -} - -declare class BabelNodeBindExpression extends BabelNode { - type: "BindExpression"; - object: any; - callee: any; -} - -declare class BabelNodeClassProperty extends BabelNode { - type: "ClassProperty"; - key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; - value?: BabelNodeExpression; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - decorators?: Array; - computed?: boolean; - abstract?: boolean; - accessibility?: "public" | "private" | "protected"; - definite?: boolean; - optional?: boolean; - readonly?: boolean; -} - -declare class BabelNodeOptionalMemberExpression extends BabelNode { - type: "OptionalMemberExpression"; - object: BabelNodeExpression; - property: any; - computed?: boolean; - optional: boolean; -} - -declare class BabelNodePipelineTopicExpression extends BabelNode { - type: "PipelineTopicExpression"; - expression: BabelNodeExpression; -} - -declare class BabelNodePipelineBareFunction extends BabelNode { - type: "PipelineBareFunction"; - callee: BabelNodeExpression; -} - -declare class BabelNodePipelinePrimaryTopicReference extends BabelNode { - type: "PipelinePrimaryTopicReference"; -} - -declare class BabelNodeOptionalCallExpression extends BabelNode { - type: "OptionalCallExpression"; - callee: BabelNodeExpression; - arguments: Array; - optional: boolean; - typeArguments?: BabelNodeTypeParameterInstantiation; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeClassPrivateProperty extends BabelNode { - type: "ClassPrivateProperty"; - key: BabelNodePrivateName; - value?: BabelNodeExpression; -} - -declare class BabelNodeClassPrivateMethod extends BabelNode { - type: "ClassPrivateMethod"; - kind?: "get" | "set" | "method" | "constructor"; - key: BabelNodePrivateName; - params: Array; - body: BabelNodeBlockStatement; - abstract?: boolean; - access?: "public" | "private" | "protected"; - accessibility?: "public" | "private" | "protected"; - async?: boolean; - computed?: boolean; - decorators?: Array; - generator?: boolean; - optional?: boolean; - returnType?: any; - typeParameters?: any; -} - -declare class BabelNodeImport extends BabelNode { - type: "Import"; -} - -declare class BabelNodeDecorator extends BabelNode { - type: "Decorator"; - expression: BabelNodeExpression; -} - -declare class BabelNodeDoExpression extends BabelNode { - type: "DoExpression"; - body: BabelNodeBlockStatement; -} - -declare class BabelNodeExportDefaultSpecifier extends BabelNode { - type: "ExportDefaultSpecifier"; - exported: BabelNodeIdentifier; -} - -declare class BabelNodeExportNamespaceSpecifier extends BabelNode { - type: "ExportNamespaceSpecifier"; - exported: BabelNodeIdentifier; -} - -declare class BabelNodePrivateName extends BabelNode { - type: "PrivateName"; - id: BabelNodeIdentifier; -} - -declare class BabelNodeBigIntLiteral extends BabelNode { - type: "BigIntLiteral"; - value: string; -} - -declare class BabelNodeTSParameterProperty extends BabelNode { - type: "TSParameterProperty"; - parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern; - accessibility?: "public" | "private" | "protected"; - readonly?: boolean; -} - -declare class BabelNodeTSDeclareFunction extends BabelNode { - type: "TSDeclareFunction"; - id?: BabelNodeIdentifier; - typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; - params: Array; - returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop; - async?: boolean; - declare?: boolean; - generator?: boolean; -} - -declare class BabelNodeTSDeclareMethod extends BabelNode { - type: "TSDeclareMethod"; - decorators?: Array; - key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; - typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; - params: Array; - returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop; - abstract?: boolean; - access?: "public" | "private" | "protected"; - accessibility?: "public" | "private" | "protected"; - async?: boolean; - computed?: boolean; - generator?: boolean; - kind?: "get" | "set" | "method" | "constructor"; - optional?: boolean; -} - -declare class BabelNodeTSQualifiedName extends BabelNode { - type: "TSQualifiedName"; - left: BabelNodeTSEntityName; - right: BabelNodeIdentifier; -} - -declare class BabelNodeTSCallSignatureDeclaration extends BabelNode { - type: "TSCallSignatureDeclaration"; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; -} - -declare class BabelNodeTSConstructSignatureDeclaration extends BabelNode { - type: "TSConstructSignatureDeclaration"; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; -} - -declare class BabelNodeTSPropertySignature extends BabelNode { - type: "TSPropertySignature"; - key: BabelNodeExpression; - typeAnnotation?: BabelNodeTSTypeAnnotation; - initializer?: BabelNodeExpression; - computed?: boolean; - optional?: boolean; - readonly?: boolean; -} - -declare class BabelNodeTSMethodSignature extends BabelNode { - type: "TSMethodSignature"; - key: BabelNodeExpression; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; - computed?: boolean; - optional?: boolean; -} - -declare class BabelNodeTSIndexSignature extends BabelNode { - type: "TSIndexSignature"; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; - readonly?: boolean; -} - -declare class BabelNodeTSAnyKeyword extends BabelNode { - type: "TSAnyKeyword"; -} - -declare class BabelNodeTSUnknownKeyword extends BabelNode { - type: "TSUnknownKeyword"; -} - -declare class BabelNodeTSNumberKeyword extends BabelNode { - type: "TSNumberKeyword"; -} - -declare class BabelNodeTSObjectKeyword extends BabelNode { - type: "TSObjectKeyword"; -} - -declare class BabelNodeTSBooleanKeyword extends BabelNode { - type: "TSBooleanKeyword"; -} - -declare class BabelNodeTSStringKeyword extends BabelNode { - type: "TSStringKeyword"; -} - -declare class BabelNodeTSSymbolKeyword extends BabelNode { - type: "TSSymbolKeyword"; -} - -declare class BabelNodeTSVoidKeyword extends BabelNode { - type: "TSVoidKeyword"; -} - -declare class BabelNodeTSUndefinedKeyword extends BabelNode { - type: "TSUndefinedKeyword"; -} - -declare class BabelNodeTSNullKeyword extends BabelNode { - type: "TSNullKeyword"; -} - -declare class BabelNodeTSNeverKeyword extends BabelNode { - type: "TSNeverKeyword"; -} - -declare class BabelNodeTSThisType extends BabelNode { - type: "TSThisType"; -} - -declare class BabelNodeTSFunctionType extends BabelNode { - type: "TSFunctionType"; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; -} - -declare class BabelNodeTSConstructorType extends BabelNode { - type: "TSConstructorType"; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; -} - -declare class BabelNodeTSTypeReference extends BabelNode { - type: "TSTypeReference"; - typeName: BabelNodeTSEntityName; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeTSTypePredicate extends BabelNode { - type: "TSTypePredicate"; - parameterName: BabelNodeIdentifier | BabelNodeTSThisType; - typeAnnotation: BabelNodeTSTypeAnnotation; -} - -declare class BabelNodeTSTypeQuery extends BabelNode { - type: "TSTypeQuery"; - exprName: BabelNodeTSEntityName | BabelNodeTSImportType; -} - -declare class BabelNodeTSTypeLiteral extends BabelNode { - type: "TSTypeLiteral"; - members: Array; -} - -declare class BabelNodeTSArrayType extends BabelNode { - type: "TSArrayType"; - elementType: BabelNodeTSType; -} - -declare class BabelNodeTSTupleType extends BabelNode { - type: "TSTupleType"; - elementTypes: Array; -} - -declare class BabelNodeTSOptionalType extends BabelNode { - type: "TSOptionalType"; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSRestType extends BabelNode { - type: "TSRestType"; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSUnionType extends BabelNode { - type: "TSUnionType"; - types: Array; -} - -declare class BabelNodeTSIntersectionType extends BabelNode { - type: "TSIntersectionType"; - types: Array; -} - -declare class BabelNodeTSConditionalType extends BabelNode { - type: "TSConditionalType"; - checkType: BabelNodeTSType; - extendsType: BabelNodeTSType; - trueType: BabelNodeTSType; - falseType: BabelNodeTSType; -} - -declare class BabelNodeTSInferType extends BabelNode { - type: "TSInferType"; - typeParameter: BabelNodeTSTypeParameter; -} - -declare class BabelNodeTSParenthesizedType extends BabelNode { - type: "TSParenthesizedType"; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSTypeOperator extends BabelNode { - type: "TSTypeOperator"; - typeAnnotation: BabelNodeTSType; - operator?: string; -} - -declare class BabelNodeTSIndexedAccessType extends BabelNode { - type: "TSIndexedAccessType"; - objectType: BabelNodeTSType; - indexType: BabelNodeTSType; -} - -declare class BabelNodeTSMappedType extends BabelNode { - type: "TSMappedType"; - typeParameter: BabelNodeTSTypeParameter; - typeAnnotation?: BabelNodeTSType; - optional?: boolean; - readonly?: boolean; -} - -declare class BabelNodeTSLiteralType extends BabelNode { - type: "TSLiteralType"; - literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral; -} - -declare class BabelNodeTSExpressionWithTypeArguments extends BabelNode { - type: "TSExpressionWithTypeArguments"; - expression: BabelNodeTSEntityName; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeTSInterfaceDeclaration extends BabelNode { - type: "TSInterfaceDeclaration"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - body: BabelNodeTSInterfaceBody; - declare?: boolean; -} - -declare class BabelNodeTSInterfaceBody extends BabelNode { - type: "TSInterfaceBody"; - body: Array; -} - -declare class BabelNodeTSTypeAliasDeclaration extends BabelNode { - type: "TSTypeAliasDeclaration"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - typeAnnotation: BabelNodeTSType; - declare?: boolean; -} - -declare class BabelNodeTSAsExpression extends BabelNode { - type: "TSAsExpression"; - expression: BabelNodeExpression; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSTypeAssertion extends BabelNode { - type: "TSTypeAssertion"; - typeAnnotation: BabelNodeTSType; - expression: BabelNodeExpression; -} - -declare class BabelNodeTSEnumDeclaration extends BabelNode { - type: "TSEnumDeclaration"; - id: BabelNodeIdentifier; - members: Array; - declare?: boolean; - initializer?: BabelNodeExpression; -} - -declare class BabelNodeTSEnumMember extends BabelNode { - type: "TSEnumMember"; - id: BabelNodeIdentifier | BabelNodeStringLiteral; - initializer?: BabelNodeExpression; -} - -declare class BabelNodeTSModuleDeclaration extends BabelNode { - type: "TSModuleDeclaration"; - id: BabelNodeIdentifier | BabelNodeStringLiteral; - body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration; - declare?: boolean; - global?: boolean; -} - -declare class BabelNodeTSModuleBlock extends BabelNode { - type: "TSModuleBlock"; - body: Array; -} - -declare class BabelNodeTSImportType extends BabelNode { - type: "TSImportType"; - argument: BabelNodeStringLiteral; - qualifier?: BabelNodeTSEntityName; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeTSImportEqualsDeclaration extends BabelNode { - type: "TSImportEqualsDeclaration"; - id: BabelNodeIdentifier; - moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference; - isExport?: boolean; -} - -declare class BabelNodeTSExternalModuleReference extends BabelNode { - type: "TSExternalModuleReference"; - expression: BabelNodeStringLiteral; -} - -declare class BabelNodeTSNonNullExpression extends BabelNode { - type: "TSNonNullExpression"; - expression: BabelNodeExpression; -} - -declare class BabelNodeTSExportAssignment extends BabelNode { - type: "TSExportAssignment"; - expression: BabelNodeExpression; -} - -declare class BabelNodeTSNamespaceExportDeclaration extends BabelNode { - type: "TSNamespaceExportDeclaration"; - id: BabelNodeIdentifier; -} - -declare class BabelNodeTSTypeAnnotation extends BabelNode { - type: "TSTypeAnnotation"; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSTypeParameterInstantiation extends BabelNode { - type: "TSTypeParameterInstantiation"; - params: Array; -} - -declare class BabelNodeTSTypeParameterDeclaration extends BabelNode { - type: "TSTypeParameterDeclaration"; - params: Array; -} - -declare class BabelNodeTSTypeParameter extends BabelNode { - type: "TSTypeParameter"; - constraint?: BabelNodeTSType; - name?: string; -} - -type BabelNodeExpression = BabelNodeArrayExpression | BabelNodeAssignmentExpression | BabelNodeBinaryExpression | BabelNodeCallExpression | BabelNodeConditionalExpression | BabelNodeFunctionExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeLogicalExpression | BabelNodeMemberExpression | BabelNodeNewExpression | BabelNodeObjectExpression | BabelNodeSequenceExpression | BabelNodeParenthesizedExpression | BabelNodeThisExpression | BabelNodeUnaryExpression | BabelNodeUpdateExpression | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeMetaProperty | BabelNodeSuper | BabelNodeTaggedTemplateExpression | BabelNodeTemplateLiteral | BabelNodeYieldExpression | BabelNodeTypeCastExpression | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeAwaitExpression | BabelNodeBindExpression | BabelNodeOptionalMemberExpression | BabelNodePipelinePrimaryTopicReference | BabelNodeOptionalCallExpression | BabelNodeImport | BabelNodeDoExpression | BabelNodeBigIntLiteral | BabelNodeTSAsExpression | BabelNodeTSTypeAssertion | BabelNodeTSNonNullExpression; -type BabelNodeBinary = BabelNodeBinaryExpression | BabelNodeLogicalExpression; -type BabelNodeScopable = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeClassDeclaration | BabelNodeClassExpression | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeTSModuleBlock; -type BabelNodeBlockParent = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeTSModuleBlock; -type BabelNodeBlock = BabelNodeBlockStatement | BabelNodeProgram | BabelNodeTSModuleBlock; -type BabelNodeStatement = BabelNodeBlockStatement | BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeDebuggerStatement | BabelNodeDoWhileStatement | BabelNodeEmptyStatement | BabelNodeExpressionStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeIfStatement | BabelNodeLabeledStatement | BabelNodeReturnStatement | BabelNodeSwitchStatement | BabelNodeThrowStatement | BabelNodeTryStatement | BabelNodeVariableDeclaration | BabelNodeWhileStatement | BabelNodeWithStatement | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeForOfStatement | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration | BabelNodeTSImportEqualsDeclaration | BabelNodeTSExportAssignment | BabelNodeTSNamespaceExportDeclaration; -type BabelNodeTerminatorless = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement | BabelNodeYieldExpression | BabelNodeAwaitExpression; -type BabelNodeCompletionStatement = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement; -type BabelNodeConditional = BabelNodeConditionalExpression | BabelNodeIfStatement; -type BabelNodeLoop = BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeWhileStatement | BabelNodeForOfStatement; -type BabelNodeWhile = BabelNodeDoWhileStatement | BabelNodeWhileStatement; -type BabelNodeExpressionWrapper = BabelNodeExpressionStatement | BabelNodeParenthesizedExpression | BabelNodeTypeCastExpression; -type BabelNodeFor = BabelNodeForInStatement | BabelNodeForStatement | BabelNodeForOfStatement; -type BabelNodeForXStatement = BabelNodeForInStatement | BabelNodeForOfStatement; -type BabelNodeFunction = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod; -type BabelNodeFunctionParent = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod; -type BabelNodePureish = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeArrowFunctionExpression | BabelNodeClassDeclaration | BabelNodeClassExpression | BabelNodeBigIntLiteral; -type BabelNodeDeclaration = BabelNodeFunctionDeclaration | BabelNodeVariableDeclaration | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration; -type BabelNodePatternLike = BabelNodeIdentifier | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern; -type BabelNodeLVal = BabelNodeIdentifier | BabelNodeMemberExpression | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern | BabelNodeTSParameterProperty; -type BabelNodeTSEntityName = BabelNodeIdentifier | BabelNodeTSQualifiedName; -type BabelNodeLiteral = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeTemplateLiteral | BabelNodeBigIntLiteral; -type BabelNodeImmutable = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXOpeningElement | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment | BabelNodeBigIntLiteral; -type BabelNodeUserWhitespacable = BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty; -type BabelNodeMethod = BabelNodeObjectMethod | BabelNodeClassMethod | BabelNodeClassPrivateMethod; -type BabelNodeObjectMember = BabelNodeObjectMethod | BabelNodeObjectProperty; -type BabelNodeProperty = BabelNodeObjectProperty | BabelNodeClassProperty | BabelNodeClassPrivateProperty; -type BabelNodeUnaryLike = BabelNodeUnaryExpression | BabelNodeSpreadElement; -type BabelNodePattern = BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern; -type BabelNodeClass = BabelNodeClassDeclaration | BabelNodeClassExpression; -type BabelNodeModuleDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration; -type BabelNodeExportDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration; -type BabelNodeModuleSpecifier = BabelNodeExportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier | BabelNodeImportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier; -type BabelNodeFlow = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeClassImplements | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeDeclaredPredicate | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeFunctionTypeParam | BabelNodeGenericTypeAnnotation | BabelNodeInferredPredicate | BabelNodeInterfaceExtends | BabelNodeInterfaceDeclaration | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty | BabelNodeOpaqueType | BabelNodeQualifiedTypeIdentifier | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeTypeAlias | BabelNodeTypeAnnotation | BabelNodeTypeCastExpression | BabelNodeTypeParameter | BabelNodeTypeParameterDeclaration | BabelNodeTypeParameterInstantiation | BabelNodeUnionTypeAnnotation | BabelNodeVariance | BabelNodeVoidTypeAnnotation; -type BabelNodeFlowType = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeGenericTypeAnnotation | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeUnionTypeAnnotation | BabelNodeVoidTypeAnnotation; -type BabelNodeFlowBaseAnnotation = BabelNodeAnyTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeVoidTypeAnnotation; -type BabelNodeFlowDeclaration = BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias; -type BabelNodeFlowPredicate = BabelNodeDeclaredPredicate | BabelNodeInferredPredicate; -type BabelNodeJSX = BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXEmptyExpression | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName | BabelNodeJSXOpeningElement | BabelNodeJSXSpreadAttribute | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment; -type BabelNodePrivate = BabelNodeClassPrivateProperty | BabelNodeClassPrivateMethod | BabelNodePrivateName; -type BabelNodeTSTypeElement = BabelNodeTSCallSignatureDeclaration | BabelNodeTSConstructSignatureDeclaration | BabelNodeTSPropertySignature | BabelNodeTSMethodSignature | BabelNodeTSIndexSignature; -type BabelNodeTSType = BabelNodeTSAnyKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSVoidKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSNullKeyword | BabelNodeTSNeverKeyword | BabelNodeTSThisType | BabelNodeTSFunctionType | BabelNodeTSConstructorType | BabelNodeTSTypeReference | BabelNodeTSTypePredicate | BabelNodeTSTypeQuery | BabelNodeTSTypeLiteral | BabelNodeTSArrayType | BabelNodeTSTupleType | BabelNodeTSOptionalType | BabelNodeTSRestType | BabelNodeTSUnionType | BabelNodeTSIntersectionType | BabelNodeTSConditionalType | BabelNodeTSInferType | BabelNodeTSParenthesizedType | BabelNodeTSTypeOperator | BabelNodeTSIndexedAccessType | BabelNodeTSMappedType | BabelNodeTSLiteralType | BabelNodeTSExpressionWithTypeArguments | BabelNodeTSImportType; - -declare module "@babel/types" { - declare function arrayExpression(elements?: Array): BabelNodeArrayExpression; - declare function assignmentExpression(operator: string, left: BabelNodeLVal, right: BabelNodeExpression): BabelNodeAssignmentExpression; - declare function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeBinaryExpression; - declare function interpreterDirective(value: string): BabelNodeInterpreterDirective; - declare function directive(value: BabelNodeDirectiveLiteral): BabelNodeDirective; - declare function directiveLiteral(value: string): BabelNodeDirectiveLiteral; - declare function blockStatement(body: Array, directives?: Array): BabelNodeBlockStatement; - declare function breakStatement(label?: BabelNodeIdentifier): BabelNodeBreakStatement; - declare function callExpression(callee: BabelNodeExpression, _arguments: Array, optional?: true | false, typeArguments?: BabelNodeTypeParameterInstantiation, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeCallExpression; - declare function catchClause(param?: BabelNodeIdentifier, body: BabelNodeBlockStatement): BabelNodeCatchClause; - declare function conditionalExpression(test: BabelNodeExpression, consequent: BabelNodeExpression, alternate: BabelNodeExpression): BabelNodeConditionalExpression; - declare function continueStatement(label?: BabelNodeIdentifier): BabelNodeContinueStatement; - declare function debuggerStatement(): BabelNodeDebuggerStatement; - declare function doWhileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeDoWhileStatement; - declare function emptyStatement(): BabelNodeEmptyStatement; - declare function expressionStatement(expression: BabelNodeExpression): BabelNodeExpressionStatement; - declare function file(program: BabelNodeProgram, comments: any, tokens: any): BabelNodeFile; - declare function forInStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForInStatement; - declare function forStatement(init?: BabelNodeVariableDeclaration | BabelNodeExpression, test?: BabelNodeExpression, update?: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForStatement; - declare function functionDeclaration(id?: BabelNodeIdentifier, params: Array, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean, declare?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeFunctionDeclaration; - declare function functionExpression(id?: BabelNodeIdentifier, params: Array, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeFunctionExpression; - declare function identifier(name: string, decorators?: Array, optional?: boolean, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeIdentifier; - declare function ifStatement(test: BabelNodeExpression, consequent: BabelNodeStatement, alternate?: BabelNodeStatement): BabelNodeIfStatement; - declare function labeledStatement(label: BabelNodeIdentifier, body: BabelNodeStatement): BabelNodeLabeledStatement; - declare function stringLiteral(value: string): BabelNodeStringLiteral; - declare function numericLiteral(value: number): BabelNodeNumericLiteral; - declare function nullLiteral(): BabelNodeNullLiteral; - declare function booleanLiteral(value: boolean): BabelNodeBooleanLiteral; - declare function regExpLiteral(pattern: string, flags?: string): BabelNodeRegExpLiteral; - declare function logicalExpression(operator: "||" | "&&" | "??", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeLogicalExpression; - declare function memberExpression(object: BabelNodeExpression, property: any, computed?: boolean, optional?: true | false): BabelNodeMemberExpression; - declare function newExpression(callee: BabelNodeExpression, _arguments: Array, optional?: true | false, typeArguments?: BabelNodeTypeParameterInstantiation, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeNewExpression; - declare function program(body: Array, directives?: Array, sourceType?: "script" | "module", interpreter?: BabelNodeInterpreterDirective, sourceFile?: string): BabelNodeProgram; - declare function objectExpression(properties: Array): BabelNodeObjectExpression; - declare function objectMethod(kind?: "method" | "get" | "set", key: any, params: Array, body: BabelNodeBlockStatement, computed?: boolean, async?: boolean, decorators?: Array, generator?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeObjectMethod; - declare function objectProperty(key: any, value: BabelNodeExpression | BabelNodePatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array): BabelNodeObjectProperty; - declare function restElement(argument: BabelNodeLVal, decorators?: Array, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeRestElement; - declare function returnStatement(argument?: BabelNodeExpression): BabelNodeReturnStatement; - declare function sequenceExpression(expressions: Array): BabelNodeSequenceExpression; - declare function parenthesizedExpression(expression: BabelNodeExpression): BabelNodeParenthesizedExpression; - declare function switchCase(test?: BabelNodeExpression, consequent: Array): BabelNodeSwitchCase; - declare function switchStatement(discriminant: BabelNodeExpression, cases: Array): BabelNodeSwitchStatement; - declare function thisExpression(): BabelNodeThisExpression; - declare function throwStatement(argument: BabelNodeExpression): BabelNodeThrowStatement; - declare function tryStatement(block: BabelNodeBlockStatement, handler?: BabelNodeCatchClause, finalizer?: BabelNodeBlockStatement): BabelNodeTryStatement; - declare function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUnaryExpression; - declare function updateExpression(operator: "++" | "--", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUpdateExpression; - declare function variableDeclaration(kind: "var" | "let" | "const", declarations: Array, declare?: boolean): BabelNodeVariableDeclaration; - declare function variableDeclarator(id: BabelNodeLVal, init?: BabelNodeExpression, definite?: boolean): BabelNodeVariableDeclarator; - declare function whileStatement(test: BabelNodeExpression, body: BabelNodeBlockStatement | BabelNodeStatement): BabelNodeWhileStatement; - declare function withStatement(object: BabelNodeExpression, body: BabelNodeBlockStatement | BabelNodeStatement): BabelNodeWithStatement; - declare function assignmentPattern(left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression, right: BabelNodeExpression, decorators?: Array, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeAssignmentPattern; - declare function arrayPattern(elements: Array, decorators?: Array, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeArrayPattern; - declare function arrowFunctionExpression(params: Array, body: BabelNodeBlockStatement | BabelNodeExpression, async?: boolean, expression?: boolean, generator?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeArrowFunctionExpression; - declare function classBody(body: Array): BabelNodeClassBody; - declare function classDeclaration(id?: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array, abstract?: boolean, declare?: boolean, _implements?: Array, mixins?: any, superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeClassDeclaration; - declare function classExpression(id?: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array, _implements?: Array, mixins?: any, superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeClassExpression; - declare function exportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeExportAllDeclaration; - declare function exportDefaultDeclaration(declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression): BabelNodeExportDefaultDeclaration; - declare function exportNamedDeclaration(declaration?: BabelNodeDeclaration, specifiers: Array, source?: BabelNodeStringLiteral, exportKind?: "type" | "value"): BabelNodeExportNamedDeclaration; - declare function exportSpecifier(local: BabelNodeIdentifier, exported: BabelNodeIdentifier): BabelNodeExportSpecifier; - declare function forOfStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement, _await?: boolean): BabelNodeForOfStatement; - declare function importDeclaration(specifiers: Array, source: BabelNodeStringLiteral, importKind?: "type" | "typeof" | "value"): BabelNodeImportDeclaration; - declare function importDefaultSpecifier(local: BabelNodeIdentifier): BabelNodeImportDefaultSpecifier; - declare function importNamespaceSpecifier(local: BabelNodeIdentifier): BabelNodeImportNamespaceSpecifier; - declare function importSpecifier(local: BabelNodeIdentifier, imported: BabelNodeIdentifier, importKind?: "type" | "typeof"): BabelNodeImportSpecifier; - declare function metaProperty(meta: BabelNodeIdentifier, property: BabelNodeIdentifier): BabelNodeMetaProperty; - declare function classMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, params: Array, body: BabelNodeBlockStatement, computed?: boolean, _static?: boolean, abstract?: boolean, access?: "public" | "private" | "protected", accessibility?: "public" | "private" | "protected", async?: boolean, decorators?: Array, generator?: boolean, optional?: boolean, returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop): BabelNodeClassMethod; - declare function objectPattern(properties: Array, decorators?: Array, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeObjectPattern; - declare function spreadElement(argument: BabelNodeExpression): BabelNodeSpreadElement; - declare function taggedTemplateExpression(tag: BabelNodeExpression, quasi: BabelNodeTemplateLiteral, typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation): BabelNodeTaggedTemplateExpression; - declare function templateElement(value: { raw: string, cooked?: string }, tail?: boolean): BabelNodeTemplateElement; - declare function templateLiteral(quasis: Array, expressions: Array): BabelNodeTemplateLiteral; - declare function yieldExpression(argument?: BabelNodeExpression, delegate?: boolean): BabelNodeYieldExpression; - declare function anyTypeAnnotation(): BabelNodeAnyTypeAnnotation; - declare function arrayTypeAnnotation(elementType: BabelNodeFlowType): BabelNodeArrayTypeAnnotation; - declare function booleanTypeAnnotation(): BabelNodeBooleanTypeAnnotation; - declare function booleanLiteralTypeAnnotation(value: boolean): BabelNodeBooleanLiteralTypeAnnotation; - declare function nullLiteralTypeAnnotation(): BabelNodeNullLiteralTypeAnnotation; - declare function classImplements(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeClassImplements; - declare function declareClass(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array, body: BabelNodeObjectTypeAnnotation, _implements?: Array, mixins?: Array): BabelNodeDeclareClass; - declare function declareFunction(id: BabelNodeIdentifier, predicate?: BabelNodeDeclaredPredicate): BabelNodeDeclareFunction; - declare function declareInterface(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array, body: BabelNodeObjectTypeAnnotation, _implements?: Array, mixins?: Array): BabelNodeDeclareInterface; - declare function declareModule(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeBlockStatement, kind?: "CommonJS" | "ES"): BabelNodeDeclareModule; - declare function declareModuleExports(typeAnnotation: BabelNodeTypeAnnotation): BabelNodeDeclareModuleExports; - declare function declareTypeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeDeclareTypeAlias; - declare function declareOpaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType): BabelNodeDeclareOpaqueType; - declare function declareVariable(id: BabelNodeIdentifier): BabelNodeDeclareVariable; - declare function declareExportDeclaration(declaration?: BabelNodeFlow, specifiers?: Array, source?: BabelNodeStringLiteral, _default?: boolean): BabelNodeDeclareExportDeclaration; - declare function declareExportAllDeclaration(source: BabelNodeStringLiteral, exportKind?: "type" | "value"): BabelNodeDeclareExportAllDeclaration; - declare function declaredPredicate(value: BabelNodeFlow): BabelNodeDeclaredPredicate; - declare function existsTypeAnnotation(): BabelNodeExistsTypeAnnotation; - declare function functionTypeAnnotation(typeParameters?: BabelNodeTypeParameterDeclaration, params: Array, rest?: BabelNodeFunctionTypeParam, returnType: BabelNodeFlowType): BabelNodeFunctionTypeAnnotation; - declare function functionTypeParam(name?: BabelNodeIdentifier, typeAnnotation: BabelNodeFlowType, optional?: boolean): BabelNodeFunctionTypeParam; - declare function genericTypeAnnotation(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeGenericTypeAnnotation; - declare function inferredPredicate(): BabelNodeInferredPredicate; - declare function interfaceExtends(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeInterfaceExtends; - declare function interfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array, body: BabelNodeObjectTypeAnnotation, _implements?: Array, mixins?: Array): BabelNodeInterfaceDeclaration; - declare function interfaceTypeAnnotation(_extends?: Array, body: BabelNodeObjectTypeAnnotation): BabelNodeInterfaceTypeAnnotation; - declare function intersectionTypeAnnotation(types: Array): BabelNodeIntersectionTypeAnnotation; - declare function mixedTypeAnnotation(): BabelNodeMixedTypeAnnotation; - declare function emptyTypeAnnotation(): BabelNodeEmptyTypeAnnotation; - declare function nullableTypeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeNullableTypeAnnotation; - declare function numberLiteralTypeAnnotation(value: number): BabelNodeNumberLiteralTypeAnnotation; - declare function numberTypeAnnotation(): BabelNodeNumberTypeAnnotation; - declare function objectTypeAnnotation(properties: Array, indexers?: Array, callProperties?: Array, internalSlots?: Array, exact?: boolean, inexact?: boolean): BabelNodeObjectTypeAnnotation; - declare function objectTypeInternalSlot(id: BabelNodeIdentifier, value: BabelNodeFlowType, optional: boolean, _static: boolean, method: boolean): BabelNodeObjectTypeInternalSlot; - declare function objectTypeCallProperty(value: BabelNodeFlowType, _static?: boolean): BabelNodeObjectTypeCallProperty; - declare function objectTypeIndexer(id?: BabelNodeIdentifier, key: BabelNodeFlowType, value: BabelNodeFlowType, variance?: BabelNodeVariance, _static?: boolean): BabelNodeObjectTypeIndexer; - declare function objectTypeProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral, value: BabelNodeFlowType, variance?: BabelNodeVariance, kind?: "init" | "get" | "set", optional?: boolean, proto?: boolean, _static?: boolean): BabelNodeObjectTypeProperty; - declare function objectTypeSpreadProperty(argument: BabelNodeFlowType): BabelNodeObjectTypeSpreadProperty; - declare function opaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType, impltype: BabelNodeFlowType): BabelNodeOpaqueType; - declare function qualifiedTypeIdentifier(id: BabelNodeIdentifier, qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier): BabelNodeQualifiedTypeIdentifier; - declare function stringLiteralTypeAnnotation(value: string): BabelNodeStringLiteralTypeAnnotation; - declare function stringTypeAnnotation(): BabelNodeStringTypeAnnotation; - declare function thisTypeAnnotation(): BabelNodeThisTypeAnnotation; - declare function tupleTypeAnnotation(types: Array): BabelNodeTupleTypeAnnotation; - declare function typeofTypeAnnotation(argument: BabelNodeFlowType): BabelNodeTypeofTypeAnnotation; - declare function typeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeTypeAlias; - declare function typeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeTypeAnnotation; - declare function typeCastExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTypeAnnotation): BabelNodeTypeCastExpression; - declare function typeParameter(bound?: BabelNodeTypeAnnotation, _default?: BabelNodeFlowType, variance?: BabelNodeVariance, name?: string): BabelNodeTypeParameter; - declare function typeParameterDeclaration(params: Array): BabelNodeTypeParameterDeclaration; - declare function typeParameterInstantiation(params: Array): BabelNodeTypeParameterInstantiation; - declare function unionTypeAnnotation(types: Array): BabelNodeUnionTypeAnnotation; - declare function variance(kind: "minus" | "plus"): BabelNodeVariance; - declare function voidTypeAnnotation(): BabelNodeVoidTypeAnnotation; - declare function jsxAttribute(name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName, value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer): BabelNodeJSXAttribute; - declare function jsxClosingElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression): BabelNodeJSXClosingElement; - declare function jsxElement(openingElement: BabelNodeJSXOpeningElement, closingElement?: BabelNodeJSXClosingElement, children: Array, selfClosing: any): BabelNodeJSXElement; - declare function jsxEmptyExpression(): BabelNodeJSXEmptyExpression; - declare function jsxExpressionContainer(expression: BabelNodeExpression | BabelNodeJSXEmptyExpression): BabelNodeJSXExpressionContainer; - declare function jsxSpreadChild(expression: BabelNodeExpression): BabelNodeJSXSpreadChild; - declare function jsxIdentifier(name: string): BabelNodeJSXIdentifier; - declare function jsxMemberExpression(object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier, property: BabelNodeJSXIdentifier): BabelNodeJSXMemberExpression; - declare function jsxNamespacedName(namespace: BabelNodeJSXIdentifier, name: BabelNodeJSXIdentifier): BabelNodeJSXNamespacedName; - declare function jsxOpeningElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression, attributes: Array, selfClosing?: boolean, typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation): BabelNodeJSXOpeningElement; - declare function jsxSpreadAttribute(argument: BabelNodeExpression): BabelNodeJSXSpreadAttribute; - declare function jsxText(value: string): BabelNodeJSXText; - declare function jsxFragment(openingFragment: BabelNodeJSXOpeningFragment, closingFragment: BabelNodeJSXClosingFragment, children: Array): BabelNodeJSXFragment; - declare function jsxOpeningFragment(): BabelNodeJSXOpeningFragment; - declare function jsxClosingFragment(): BabelNodeJSXClosingFragment; - declare function noop(): BabelNodeNoop; - declare function placeholder(expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern", name: BabelNodeIdentifier): BabelNodePlaceholder; - declare function argumentPlaceholder(): BabelNodeArgumentPlaceholder; - declare function awaitExpression(argument: BabelNodeExpression): BabelNodeAwaitExpression; - declare function bindExpression(object: any, callee: any): BabelNodeBindExpression; - declare function classProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, value?: BabelNodeExpression, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, decorators?: Array, computed?: boolean, abstract?: boolean, accessibility?: "public" | "private" | "protected", definite?: boolean, optional?: boolean, readonly?: boolean, _static?: boolean): BabelNodeClassProperty; - declare function optionalMemberExpression(object: BabelNodeExpression, property: any, computed?: boolean, optional: boolean): BabelNodeOptionalMemberExpression; - declare function pipelineTopicExpression(expression: BabelNodeExpression): BabelNodePipelineTopicExpression; - declare function pipelineBareFunction(callee: BabelNodeExpression): BabelNodePipelineBareFunction; - declare function pipelinePrimaryTopicReference(): BabelNodePipelinePrimaryTopicReference; - declare function optionalCallExpression(callee: BabelNodeExpression, _arguments: Array, optional: boolean, typeArguments?: BabelNodeTypeParameterInstantiation, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeOptionalCallExpression; - declare function classPrivateProperty(key: BabelNodePrivateName, value?: BabelNodeExpression): BabelNodeClassPrivateProperty; - declare function classPrivateMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodePrivateName, params: Array, body: BabelNodeBlockStatement, _static?: boolean, abstract?: boolean, access?: "public" | "private" | "protected", accessibility?: "public" | "private" | "protected", async?: boolean, computed?: boolean, decorators?: Array, generator?: boolean, optional?: boolean, returnType?: any, typeParameters?: any): BabelNodeClassPrivateMethod; - declare function decorator(expression: BabelNodeExpression): BabelNodeDecorator; - declare function doExpression(body: BabelNodeBlockStatement): BabelNodeDoExpression; - declare function exportDefaultSpecifier(exported: BabelNodeIdentifier): BabelNodeExportDefaultSpecifier; - declare function exportNamespaceSpecifier(exported: BabelNodeIdentifier): BabelNodeExportNamespaceSpecifier; - declare function privateName(id: BabelNodeIdentifier): BabelNodePrivateName; - declare function bigIntLiteral(value: string): BabelNodeBigIntLiteral; - declare function tsParameterProperty(parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern, accessibility?: "public" | "private" | "protected", readonly?: boolean): BabelNodeTSParameterProperty; - declare function tsDeclareFunction(id?: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop, async?: boolean, declare?: boolean, generator?: boolean): BabelNodeTSDeclareFunction; - declare function tsDeclareMethod(decorators?: Array, key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop, abstract?: boolean, access?: "public" | "private" | "protected", accessibility?: "public" | "private" | "protected", async?: boolean, computed?: boolean, generator?: boolean, kind?: "get" | "set" | "method" | "constructor", optional?: boolean, _static?: boolean): BabelNodeTSDeclareMethod; - declare function tsQualifiedName(left: BabelNodeTSEntityName, right: BabelNodeIdentifier): BabelNodeTSQualifiedName; - declare function tsCallSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSCallSignatureDeclaration; - declare function tsConstructSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructSignatureDeclaration; - declare function tsPropertySignature(key: BabelNodeExpression, typeAnnotation?: BabelNodeTSTypeAnnotation, initializer?: BabelNodeExpression, computed?: boolean, optional?: boolean, readonly?: boolean): BabelNodeTSPropertySignature; - declare function tsMethodSignature(key: BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation, computed?: boolean, optional?: boolean): BabelNodeTSMethodSignature; - declare function tsIndexSignature(parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation, readonly?: boolean): BabelNodeTSIndexSignature; - declare function tsAnyKeyword(): BabelNodeTSAnyKeyword; - declare function tsUnknownKeyword(): BabelNodeTSUnknownKeyword; - declare function tsNumberKeyword(): BabelNodeTSNumberKeyword; - declare function tsObjectKeyword(): BabelNodeTSObjectKeyword; - declare function tsBooleanKeyword(): BabelNodeTSBooleanKeyword; - declare function tsStringKeyword(): BabelNodeTSStringKeyword; - declare function tsSymbolKeyword(): BabelNodeTSSymbolKeyword; - declare function tsVoidKeyword(): BabelNodeTSVoidKeyword; - declare function tsUndefinedKeyword(): BabelNodeTSUndefinedKeyword; - declare function tsNullKeyword(): BabelNodeTSNullKeyword; - declare function tsNeverKeyword(): BabelNodeTSNeverKeyword; - declare function tsThisType(): BabelNodeTSThisType; - declare function tsFunctionType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSFunctionType; - declare function tsConstructorType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructorType; - declare function tsTypeReference(typeName: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSTypeReference; - declare function tsTypePredicate(parameterName: BabelNodeIdentifier | BabelNodeTSThisType, typeAnnotation: BabelNodeTSTypeAnnotation): BabelNodeTSTypePredicate; - declare function tsTypeQuery(exprName: BabelNodeTSEntityName | BabelNodeTSImportType): BabelNodeTSTypeQuery; - declare function tsTypeLiteral(members: Array): BabelNodeTSTypeLiteral; - declare function tsArrayType(elementType: BabelNodeTSType): BabelNodeTSArrayType; - declare function tsTupleType(elementTypes: Array): BabelNodeTSTupleType; - declare function tsOptionalType(typeAnnotation: BabelNodeTSType): BabelNodeTSOptionalType; - declare function tsRestType(typeAnnotation: BabelNodeTSType): BabelNodeTSRestType; - declare function tsUnionType(types: Array): BabelNodeTSUnionType; - declare function tsIntersectionType(types: Array): BabelNodeTSIntersectionType; - declare function tsConditionalType(checkType: BabelNodeTSType, extendsType: BabelNodeTSType, trueType: BabelNodeTSType, falseType: BabelNodeTSType): BabelNodeTSConditionalType; - declare function tsInferType(typeParameter: BabelNodeTSTypeParameter): BabelNodeTSInferType; - declare function tsParenthesizedType(typeAnnotation: BabelNodeTSType): BabelNodeTSParenthesizedType; - declare function tsTypeOperator(typeAnnotation: BabelNodeTSType, operator?: string): BabelNodeTSTypeOperator; - declare function tsIndexedAccessType(objectType: BabelNodeTSType, indexType: BabelNodeTSType): BabelNodeTSIndexedAccessType; - declare function tsMappedType(typeParameter: BabelNodeTSTypeParameter, typeAnnotation?: BabelNodeTSType, optional?: boolean, readonly?: boolean): BabelNodeTSMappedType; - declare function tsLiteralType(literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral): BabelNodeTSLiteralType; - declare function tsExpressionWithTypeArguments(expression: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSExpressionWithTypeArguments; - declare function tsInterfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, _extends?: Array, body: BabelNodeTSInterfaceBody, declare?: boolean): BabelNodeTSInterfaceDeclaration; - declare function tsInterfaceBody(body: Array): BabelNodeTSInterfaceBody; - declare function tsTypeAliasDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, typeAnnotation: BabelNodeTSType, declare?: boolean): BabelNodeTSTypeAliasDeclaration; - declare function tsAsExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTSType): BabelNodeTSAsExpression; - declare function tsTypeAssertion(typeAnnotation: BabelNodeTSType, expression: BabelNodeExpression): BabelNodeTSTypeAssertion; - declare function tsEnumDeclaration(id: BabelNodeIdentifier, members: Array, _const?: boolean, declare?: boolean, initializer?: BabelNodeExpression): BabelNodeTSEnumDeclaration; - declare function tsEnumMember(id: BabelNodeIdentifier | BabelNodeStringLiteral, initializer?: BabelNodeExpression): BabelNodeTSEnumMember; - declare function tsModuleDeclaration(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration, declare?: boolean, global?: boolean): BabelNodeTSModuleDeclaration; - declare function tsModuleBlock(body: Array): BabelNodeTSModuleBlock; - declare function tsImportType(argument: BabelNodeStringLiteral, qualifier?: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSImportType; - declare function tsImportEqualsDeclaration(id: BabelNodeIdentifier, moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference, isExport?: boolean): BabelNodeTSImportEqualsDeclaration; - declare function tsExternalModuleReference(expression: BabelNodeStringLiteral): BabelNodeTSExternalModuleReference; - declare function tsNonNullExpression(expression: BabelNodeExpression): BabelNodeTSNonNullExpression; - declare function tsExportAssignment(expression: BabelNodeExpression): BabelNodeTSExportAssignment; - declare function tsNamespaceExportDeclaration(id: BabelNodeIdentifier): BabelNodeTSNamespaceExportDeclaration; - declare function tsTypeAnnotation(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeAnnotation; - declare function tsTypeParameterInstantiation(params: Array): BabelNodeTSTypeParameterInstantiation; - declare function tsTypeParameterDeclaration(params: Array): BabelNodeTSTypeParameterDeclaration; - declare function tsTypeParameter(constraint?: BabelNodeTSType, _default?: BabelNodeTSType, name?: string): BabelNodeTSTypeParameter; - declare function isArrayExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayExpression) - declare function isAssignmentExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentExpression) - declare function isBinaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBinaryExpression) - declare function isInterpreterDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterpreterDirective) - declare function isDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirective) - declare function isDirectiveLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirectiveLiteral) - declare function isBlockStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBlockStatement) - declare function isBreakStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBreakStatement) - declare function isCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCallExpression) - declare function isCatchClause(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCatchClause) - declare function isConditionalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeConditionalExpression) - declare function isContinueStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeContinueStatement) - declare function isDebuggerStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDebuggerStatement) - declare function isDoWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoWhileStatement) - declare function isEmptyStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyStatement) - declare function isExpressionStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExpressionStatement) - declare function isFile(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFile) - declare function isForInStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForInStatement) - declare function isForStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForStatement) - declare function isFunctionDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionDeclaration) - declare function isFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionExpression) - declare function isIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIdentifier) - declare function isIfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIfStatement) - declare function isLabeledStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLabeledStatement) - declare function isStringLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteral) - declare function isNumericLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumericLiteral) - declare function isNullLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteral) - declare function isBooleanLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteral) - declare function isRegExpLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRegExpLiteral) - declare function isLogicalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLogicalExpression) - declare function isMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMemberExpression) - declare function isNewExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNewExpression) - declare function isProgram(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeProgram) - declare function isObjectExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectExpression) - declare function isObjectMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectMethod) - declare function isObjectProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectProperty) - declare function isRestElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRestElement) - declare function isReturnStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeReturnStatement) - declare function isSequenceExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSequenceExpression) - declare function isParenthesizedExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeParenthesizedExpression) - declare function isSwitchCase(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchCase) - declare function isSwitchStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchStatement) - declare function isThisExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisExpression) - declare function isThrowStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThrowStatement) - declare function isTryStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTryStatement) - declare function isUnaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnaryExpression) - declare function isUpdateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUpdateExpression) - declare function isVariableDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclaration) - declare function isVariableDeclarator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclarator) - declare function isWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWhileStatement) - declare function isWithStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWithStatement) - declare function isAssignmentPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentPattern) - declare function isArrayPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayPattern) - declare function isArrowFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrowFunctionExpression) - declare function isClassBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassBody) - declare function isClassDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassDeclaration) - declare function isClassExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassExpression) - declare function isExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportAllDeclaration) - declare function isExportDefaultDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultDeclaration) - declare function isExportNamedDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamedDeclaration) - declare function isExportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportSpecifier) - declare function isForOfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForOfStatement) - declare function isImportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDeclaration) - declare function isImportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDefaultSpecifier) - declare function isImportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportNamespaceSpecifier) - declare function isImportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportSpecifier) - declare function isMetaProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMetaProperty) - declare function isClassMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassMethod) - declare function isObjectPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectPattern) - declare function isSpreadElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSpreadElement) - declare function isSuper(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSuper) - declare function isTaggedTemplateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTaggedTemplateExpression) - declare function isTemplateElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateElement) - declare function isTemplateLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateLiteral) - declare function isYieldExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeYieldExpression) - declare function isAnyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAnyTypeAnnotation) - declare function isArrayTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayTypeAnnotation) - declare function isBooleanTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanTypeAnnotation) - declare function isBooleanLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteralTypeAnnotation) - declare function isNullLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteralTypeAnnotation) - declare function isClassImplements(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassImplements) - declare function isDeclareClass(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareClass) - declare function isDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareFunction) - declare function isDeclareInterface(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareInterface) - declare function isDeclareModule(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModule) - declare function isDeclareModuleExports(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModuleExports) - declare function isDeclareTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareTypeAlias) - declare function isDeclareOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareOpaqueType) - declare function isDeclareVariable(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareVariable) - declare function isDeclareExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportDeclaration) - declare function isDeclareExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportAllDeclaration) - declare function isDeclaredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclaredPredicate) - declare function isExistsTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExistsTypeAnnotation) - declare function isFunctionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeAnnotation) - declare function isFunctionTypeParam(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeParam) - declare function isGenericTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeGenericTypeAnnotation) - declare function isInferredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInferredPredicate) - declare function isInterfaceExtends(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceExtends) - declare function isInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceDeclaration) - declare function isInterfaceTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceTypeAnnotation) - declare function isIntersectionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIntersectionTypeAnnotation) - declare function isMixedTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMixedTypeAnnotation) - declare function isEmptyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyTypeAnnotation) - declare function isNullableTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullableTypeAnnotation) - declare function isNumberLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberLiteralTypeAnnotation) - declare function isNumberTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberTypeAnnotation) - declare function isObjectTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeAnnotation) - declare function isObjectTypeInternalSlot(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeInternalSlot) - declare function isObjectTypeCallProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeCallProperty) - declare function isObjectTypeIndexer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeIndexer) - declare function isObjectTypeProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeProperty) - declare function isObjectTypeSpreadProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeSpreadProperty) - declare function isOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOpaqueType) - declare function isQualifiedTypeIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeQualifiedTypeIdentifier) - declare function isStringLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteralTypeAnnotation) - declare function isStringTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringTypeAnnotation) - declare function isThisTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisTypeAnnotation) - declare function isTupleTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTupleTypeAnnotation) - declare function isTypeofTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeofTypeAnnotation) - declare function isTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAlias) - declare function isTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAnnotation) - declare function isTypeCastExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeCastExpression) - declare function isTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameter) - declare function isTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterDeclaration) - declare function isTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterInstantiation) - declare function isUnionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnionTypeAnnotation) - declare function isVariance(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariance) - declare function isVoidTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVoidTypeAnnotation) - declare function isJSXAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXAttribute) - declare function isJSXClosingElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingElement) - declare function isJSXElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXElement) - declare function isJSXEmptyExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXEmptyExpression) - declare function isJSXExpressionContainer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXExpressionContainer) - declare function isJSXSpreadChild(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadChild) - declare function isJSXIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXIdentifier) - declare function isJSXMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXMemberExpression) - declare function isJSXNamespacedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXNamespacedName) - declare function isJSXOpeningElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningElement) - declare function isJSXSpreadAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadAttribute) - declare function isJSXText(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXText) - declare function isJSXFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXFragment) - declare function isJSXOpeningFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningFragment) - declare function isJSXClosingFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingFragment) - declare function isNoop(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNoop) - declare function isPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePlaceholder) - declare function isArgumentPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArgumentPlaceholder) - declare function isAwaitExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAwaitExpression) - declare function isBindExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBindExpression) - declare function isClassProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassProperty) - declare function isOptionalMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalMemberExpression) - declare function isPipelineTopicExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineTopicExpression) - declare function isPipelineBareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineBareFunction) - declare function isPipelinePrimaryTopicReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelinePrimaryTopicReference) - declare function isOptionalCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalCallExpression) - declare function isClassPrivateProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateProperty) - declare function isClassPrivateMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateMethod) - declare function isImport(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImport) - declare function isDecorator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDecorator) - declare function isDoExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoExpression) - declare function isExportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultSpecifier) - declare function isExportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamespaceSpecifier) - declare function isPrivateName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePrivateName) - declare function isBigIntLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBigIntLiteral) - declare function isTSParameterProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParameterProperty) - declare function isTSDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareFunction) - declare function isTSDeclareMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareMethod) - declare function isTSQualifiedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSQualifiedName) - declare function isTSCallSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSCallSignatureDeclaration) - declare function isTSConstructSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructSignatureDeclaration) - declare function isTSPropertySignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSPropertySignature) - declare function isTSMethodSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMethodSignature) - declare function isTSIndexSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexSignature) - declare function isTSAnyKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAnyKeyword) - declare function isTSUnknownKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnknownKeyword) - declare function isTSNumberKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNumberKeyword) - declare function isTSObjectKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSObjectKeyword) - declare function isTSBooleanKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSBooleanKeyword) - declare function isTSStringKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSStringKeyword) - declare function isTSSymbolKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSSymbolKeyword) - declare function isTSVoidKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSVoidKeyword) - declare function isTSUndefinedKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUndefinedKeyword) - declare function isTSNullKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNullKeyword) - declare function isTSNeverKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNeverKeyword) - declare function isTSThisType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSThisType) - declare function isTSFunctionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSFunctionType) - declare function isTSConstructorType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructorType) - declare function isTSTypeReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeReference) - declare function isTSTypePredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypePredicate) - declare function isTSTypeQuery(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeQuery) - declare function isTSTypeLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeLiteral) - declare function isTSArrayType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSArrayType) - declare function isTSTupleType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTupleType) - declare function isTSOptionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSOptionalType) - declare function isTSRestType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSRestType) - declare function isTSUnionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnionType) - declare function isTSIntersectionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIntersectionType) - declare function isTSConditionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConditionalType) - declare function isTSInferType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInferType) - declare function isTSParenthesizedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParenthesizedType) - declare function isTSTypeOperator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeOperator) - declare function isTSIndexedAccessType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexedAccessType) - declare function isTSMappedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMappedType) - declare function isTSLiteralType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSLiteralType) - declare function isTSExpressionWithTypeArguments(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExpressionWithTypeArguments) - declare function isTSInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceDeclaration) - declare function isTSInterfaceBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceBody) - declare function isTSTypeAliasDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAliasDeclaration) - declare function isTSAsExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAsExpression) - declare function isTSTypeAssertion(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAssertion) - declare function isTSEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumDeclaration) - declare function isTSEnumMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumMember) - declare function isTSModuleDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleDeclaration) - declare function isTSModuleBlock(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleBlock) - declare function isTSImportType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportType) - declare function isTSImportEqualsDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportEqualsDeclaration) - declare function isTSExternalModuleReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExternalModuleReference) - declare function isTSNonNullExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNonNullExpression) - declare function isTSExportAssignment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExportAssignment) - declare function isTSNamespaceExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNamespaceExportDeclaration) - declare function isTSTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAnnotation) - declare function isTSTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterInstantiation) - declare function isTSTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterDeclaration) - declare function isTSTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameter) - declare function isExpression(node: ?Object, opts?: ?Object): boolean - declare function isBinary(node: ?Object, opts?: ?Object): boolean - declare function isScopable(node: ?Object, opts?: ?Object): boolean - declare function isBlockParent(node: ?Object, opts?: ?Object): boolean - declare function isBlock(node: ?Object, opts?: ?Object): boolean - declare function isStatement(node: ?Object, opts?: ?Object): boolean - declare function isTerminatorless(node: ?Object, opts?: ?Object): boolean - declare function isCompletionStatement(node: ?Object, opts?: ?Object): boolean - declare function isConditional(node: ?Object, opts?: ?Object): boolean - declare function isLoop(node: ?Object, opts?: ?Object): boolean - declare function isWhile(node: ?Object, opts?: ?Object): boolean - declare function isExpressionWrapper(node: ?Object, opts?: ?Object): boolean - declare function isFor(node: ?Object, opts?: ?Object): boolean - declare function isForXStatement(node: ?Object, opts?: ?Object): boolean - declare function isFunction(node: ?Object, opts?: ?Object): boolean - declare function isFunctionParent(node: ?Object, opts?: ?Object): boolean - declare function isPureish(node: ?Object, opts?: ?Object): boolean - declare function isDeclaration(node: ?Object, opts?: ?Object): boolean - declare function isPatternLike(node: ?Object, opts?: ?Object): boolean - declare function isLVal(node: ?Object, opts?: ?Object): boolean - declare function isTSEntityName(node: ?Object, opts?: ?Object): boolean - declare function isLiteral(node: ?Object, opts?: ?Object): boolean - declare function isImmutable(node: ?Object, opts?: ?Object): boolean - declare function isUserWhitespacable(node: ?Object, opts?: ?Object): boolean - declare function isMethod(node: ?Object, opts?: ?Object): boolean - declare function isObjectMember(node: ?Object, opts?: ?Object): boolean - declare function isProperty(node: ?Object, opts?: ?Object): boolean - declare function isUnaryLike(node: ?Object, opts?: ?Object): boolean - declare function isPattern(node: ?Object, opts?: ?Object): boolean - declare function isClass(node: ?Object, opts?: ?Object): boolean - declare function isModuleDeclaration(node: ?Object, opts?: ?Object): boolean - declare function isExportDeclaration(node: ?Object, opts?: ?Object): boolean - declare function isModuleSpecifier(node: ?Object, opts?: ?Object): boolean - declare function isFlow(node: ?Object, opts?: ?Object): boolean - declare function isFlowType(node: ?Object, opts?: ?Object): boolean - declare function isFlowBaseAnnotation(node: ?Object, opts?: ?Object): boolean - declare function isFlowDeclaration(node: ?Object, opts?: ?Object): boolean - declare function isFlowPredicate(node: ?Object, opts?: ?Object): boolean - declare function isJSX(node: ?Object, opts?: ?Object): boolean - declare function isPrivate(node: ?Object, opts?: ?Object): boolean - declare function isTSTypeElement(node: ?Object, opts?: ?Object): boolean - declare function isTSType(node: ?Object, opts?: ?Object): boolean - declare function isNumberLiteral(node: ?Object, opts?: ?Object): boolean - declare function isRegexLiteral(node: ?Object, opts?: ?Object): boolean - declare function isRestProperty(node: ?Object, opts?: ?Object): boolean - declare function isSpreadProperty(node: ?Object, opts?: ?Object): boolean - declare function validate(n: BabelNode, key: string, value: mixed): void; - declare function clone(n: T): T; - declare function cloneDeep(n: T): T; - declare function removeProperties(n: T, opts: ?{}): void; - declare function removePropertiesDeep(n: T, opts: ?{}): T; - declare type TraversalAncestors = Array<{ - node: BabelNode, - key: string, - index?: number, - }>; - declare type TraversalHandler = (BabelNode, TraversalAncestors, T) => void; - declare type TraversalHandlers = { - enter?: TraversalHandler, - exit?: TraversalHandler, - }; - declare function traverse(n: BabelNode, TraversalHandler | TraversalHandlers, state?: T): void; -} diff --git a/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js b/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js deleted file mode 100644 index 6a0ac93c..00000000 --- a/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = appendToMemberExpression; - -var _generated = require("../builders/generated"); - -function appendToMemberExpression(member, append, computed = false) { - member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed); - member.property = append; - member.computed = !!computed; - return member; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js b/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js deleted file mode 100644 index 58026839..00000000 --- a/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js +++ /dev/null @@ -1,74 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = removeTypeDuplicates; - -var _generated = require("../../validators/generated"); - -function removeTypeDuplicates(nodes) { - const generics = {}; - const bases = {}; - const typeGroups = []; - const types = []; - - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (!node) continue; - - if (types.indexOf(node) >= 0) { - continue; - } - - if ((0, _generated.isAnyTypeAnnotation)(node)) { - return [node]; - } - - if ((0, _generated.isFlowBaseAnnotation)(node)) { - bases[node.type] = node; - continue; - } - - if ((0, _generated.isUnionTypeAnnotation)(node)) { - if (typeGroups.indexOf(node.types) < 0) { - nodes = nodes.concat(node.types); - typeGroups.push(node.types); - } - - continue; - } - - if ((0, _generated.isGenericTypeAnnotation)(node)) { - const name = node.id.name; - - if (generics[name]) { - let existing = generics[name]; - - if (existing.typeParameters) { - if (node.typeParameters) { - existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params)); - } - } else { - existing = node.typeParameters; - } - } else { - generics[name] = node; - } - - continue; - } - - types.push(node); - } - - for (const type of Object.keys(bases)) { - types.push(bases[type]); - } - - for (const name of Object.keys(generics)) { - types.push(generics[name]); - } - - return types; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/modifications/inherits.js b/node_modules/@babel/types/lib/modifications/inherits.js deleted file mode 100644 index 64d72fcf..00000000 --- a/node_modules/@babel/types/lib/modifications/inherits.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = inherits; - -var _constants = require("../constants"); - -var _inheritsComments = _interopRequireDefault(require("../comments/inheritsComments")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function inherits(child, parent) { - if (!child || !parent) return child; - - for (const key of _constants.INHERIT_KEYS.optional) { - if (child[key] == null) { - child[key] = parent[key]; - } - } - - for (const key of Object.keys(parent)) { - if (key[0] === "_" && key !== "__clone") child[key] = parent[key]; - } - - for (const key of _constants.INHERIT_KEYS.force) { - child[key] = parent[key]; - } - - (0, _inheritsComments.default)(child, parent); - return child; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js b/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js deleted file mode 100644 index ee6de0ec..00000000 --- a/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = prependToMemberExpression; - -var _generated = require("../builders/generated"); - -function prependToMemberExpression(member, prepend) { - member.object = (0, _generated.memberExpression)(prepend, member.object); - return member; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/modifications/removeProperties.js b/node_modules/@babel/types/lib/modifications/removeProperties.js deleted file mode 100644 index f9cf8e60..00000000 --- a/node_modules/@babel/types/lib/modifications/removeProperties.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = removeProperties; - -var _constants = require("../constants"); - -const CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"]; - -const CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS); - -function removeProperties(node, opts = {}) { - const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS; - - for (const key of map) { - if (node[key] != null) node[key] = undefined; - } - - for (const key of Object.keys(node)) { - if (key[0] === "_" && node[key] != null) node[key] = undefined; - } - - const symbols = Object.getOwnPropertySymbols(node); - - for (const sym of symbols) { - node[sym] = null; - } -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js b/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js deleted file mode 100644 index d11a84a8..00000000 --- a/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = removePropertiesDeep; - -var _traverseFast = _interopRequireDefault(require("../traverse/traverseFast")); - -var _removeProperties = _interopRequireDefault(require("./removeProperties")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function removePropertiesDeep(tree, opts) { - (0, _traverseFast.default)(tree, _removeProperties.default, opts); - return tree; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js b/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js deleted file mode 100644 index 189f4b8e..00000000 --- a/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js +++ /dev/null @@ -1,103 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = getBindingIdentifiers; - -var _generated = require("../validators/generated"); - -function getBindingIdentifiers(node, duplicates, outerOnly) { - let search = [].concat(node); - const ids = Object.create(null); - - while (search.length) { - const id = search.shift(); - if (!id) continue; - const keys = getBindingIdentifiers.keys[id.type]; - - if ((0, _generated.isIdentifier)(id)) { - if (duplicates) { - const _ids = ids[id.name] = ids[id.name] || []; - - _ids.push(id); - } else { - ids[id.name] = id; - } - - continue; - } - - if ((0, _generated.isExportDeclaration)(id)) { - if ((0, _generated.isDeclaration)(id.declaration)) { - search.push(id.declaration); - } - - continue; - } - - if (outerOnly) { - if ((0, _generated.isFunctionDeclaration)(id)) { - search.push(id.id); - continue; - } - - if ((0, _generated.isFunctionExpression)(id)) { - continue; - } - } - - if (keys) { - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - - if (id[key]) { - search = search.concat(id[key]); - } - } - } - } - - return ids; -} - -getBindingIdentifiers.keys = { - DeclareClass: ["id"], - DeclareFunction: ["id"], - DeclareModule: ["id"], - DeclareVariable: ["id"], - DeclareInterface: ["id"], - DeclareTypeAlias: ["id"], - DeclareOpaqueType: ["id"], - InterfaceDeclaration: ["id"], - TypeAlias: ["id"], - OpaqueType: ["id"], - CatchClause: ["param"], - LabeledStatement: ["label"], - UnaryExpression: ["argument"], - AssignmentExpression: ["left"], - ImportSpecifier: ["local"], - ImportNamespaceSpecifier: ["local"], - ImportDefaultSpecifier: ["local"], - ImportDeclaration: ["specifiers"], - ExportSpecifier: ["exported"], - ExportNamespaceSpecifier: ["exported"], - ExportDefaultSpecifier: ["exported"], - FunctionDeclaration: ["id", "params"], - FunctionExpression: ["id", "params"], - ArrowFunctionExpression: ["params"], - ObjectMethod: ["params"], - ClassMethod: ["params"], - ForInStatement: ["left"], - ForOfStatement: ["left"], - ClassDeclaration: ["id"], - ClassExpression: ["id"], - RestElement: ["argument"], - UpdateExpression: ["argument"], - ObjectProperty: ["value"], - AssignmentPattern: ["left"], - ArrayPattern: ["elements"], - ObjectPattern: ["properties"], - VariableDeclaration: ["declarations"], - VariableDeclarator: ["id"] -}; \ No newline at end of file diff --git a/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js b/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js deleted file mode 100644 index 8e1e3cb2..00000000 --- a/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = getOuterBindingIdentifiers; - -var _getBindingIdentifiers = _interopRequireDefault(require("./getBindingIdentifiers")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getOuterBindingIdentifiers(node, duplicates) { - return (0, _getBindingIdentifiers.default)(node, duplicates, true); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/traverse/traverse.js b/node_modules/@babel/types/lib/traverse/traverse.js deleted file mode 100644 index 775aed1e..00000000 --- a/node_modules/@babel/types/lib/traverse/traverse.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = traverse; - -var _definitions = require("../definitions"); - -function traverse(node, handlers, state) { - if (typeof handlers === "function") { - handlers = { - enter: handlers - }; - } - - const { - enter, - exit - } = handlers; - traverseSimpleImpl(node, enter, exit, state, []); -} - -function traverseSimpleImpl(node, enter, exit, state, ancestors) { - const keys = _definitions.VISITOR_KEYS[node.type]; - if (!keys) return; - if (enter) enter(node, ancestors, state); - - for (const key of keys) { - const subNode = node[key]; - - if (Array.isArray(subNode)) { - for (let i = 0; i < subNode.length; i++) { - const child = subNode[i]; - if (!child) continue; - ancestors.push({ - node, - key, - index: i - }); - traverseSimpleImpl(child, enter, exit, state, ancestors); - ancestors.pop(); - } - } else if (subNode) { - ancestors.push({ - node, - key - }); - traverseSimpleImpl(subNode, enter, exit, state, ancestors); - ancestors.pop(); - } - } - - if (exit) exit(node, ancestors, state); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/traverse/traverseFast.js b/node_modules/@babel/types/lib/traverse/traverseFast.js deleted file mode 100644 index f038dd83..00000000 --- a/node_modules/@babel/types/lib/traverse/traverseFast.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = traverseFast; - -var _definitions = require("../definitions"); - -function traverseFast(node, enter, opts) { - if (!node) return; - const keys = _definitions.VISITOR_KEYS[node.type]; - if (!keys) return; - opts = opts || {}; - enter(node, opts); - - for (const key of keys) { - const subNode = node[key]; - - if (Array.isArray(subNode)) { - for (const node of subNode) { - traverseFast(node, enter, opts); - } - } else { - traverseFast(subNode, enter, opts); - } - } -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/utils/inherit.js b/node_modules/@babel/types/lib/utils/inherit.js deleted file mode 100644 index 46b32efe..00000000 --- a/node_modules/@babel/types/lib/utils/inherit.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = inherit; - -function _uniq() { - const data = _interopRequireDefault(require("lodash/uniq")); - - _uniq = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function inherit(key, child, parent) { - if (child && parent) { - child[key] = (0, _uniq().default)([].concat(child[key], parent[key]).filter(Boolean)); - } -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js b/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js deleted file mode 100644 index f0ca1336..00000000 --- a/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = cleanJSXElementLiteralChild; - -var _generated = require("../../builders/generated"); - -function cleanJSXElementLiteralChild(child, args) { - const lines = child.value.split(/\r\n|\n|\r/); - let lastNonEmptyLine = 0; - - for (let i = 0; i < lines.length; i++) { - if (lines[i].match(/[^ \t]/)) { - lastNonEmptyLine = i; - } - } - - let str = ""; - - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - const isFirstLine = i === 0; - const isLastLine = i === lines.length - 1; - const isLastNonEmptyLine = i === lastNonEmptyLine; - let trimmedLine = line.replace(/\t/g, " "); - - if (!isFirstLine) { - trimmedLine = trimmedLine.replace(/^[ ]+/, ""); - } - - if (!isLastLine) { - trimmedLine = trimmedLine.replace(/[ ]+$/, ""); - } - - if (trimmedLine) { - if (!isLastNonEmptyLine) { - trimmedLine += " "; - } - - str += trimmedLine; - } - } - - if (str) args.push((0, _generated.stringLiteral)(str)); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/utils/shallowEqual.js b/node_modules/@babel/types/lib/utils/shallowEqual.js deleted file mode 100644 index fae259e4..00000000 --- a/node_modules/@babel/types/lib/utils/shallowEqual.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = shallowEqual; - -function shallowEqual(actual, expected) { - const keys = Object.keys(expected); - - for (const key of keys) { - if (actual[key] !== expected[key]) { - return false; - } - } - - return true; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js b/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js deleted file mode 100644 index 0faa29c5..00000000 --- a/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = buildMatchMemberExpression; - -var _matchesPattern = _interopRequireDefault(require("./matchesPattern")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function buildMatchMemberExpression(match, allowPartial) { - const parts = match.split("."); - return member => (0, _matchesPattern.default)(member, parts, allowPartial); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/generated/index.js b/node_modules/@babel/types/lib/validators/generated/index.js deleted file mode 100644 index 24ffceb4..00000000 --- a/node_modules/@babel/types/lib/validators/generated/index.js +++ /dev/null @@ -1,4317 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isArrayExpression = isArrayExpression; -exports.isAssignmentExpression = isAssignmentExpression; -exports.isBinaryExpression = isBinaryExpression; -exports.isInterpreterDirective = isInterpreterDirective; -exports.isDirective = isDirective; -exports.isDirectiveLiteral = isDirectiveLiteral; -exports.isBlockStatement = isBlockStatement; -exports.isBreakStatement = isBreakStatement; -exports.isCallExpression = isCallExpression; -exports.isCatchClause = isCatchClause; -exports.isConditionalExpression = isConditionalExpression; -exports.isContinueStatement = isContinueStatement; -exports.isDebuggerStatement = isDebuggerStatement; -exports.isDoWhileStatement = isDoWhileStatement; -exports.isEmptyStatement = isEmptyStatement; -exports.isExpressionStatement = isExpressionStatement; -exports.isFile = isFile; -exports.isForInStatement = isForInStatement; -exports.isForStatement = isForStatement; -exports.isFunctionDeclaration = isFunctionDeclaration; -exports.isFunctionExpression = isFunctionExpression; -exports.isIdentifier = isIdentifier; -exports.isIfStatement = isIfStatement; -exports.isLabeledStatement = isLabeledStatement; -exports.isStringLiteral = isStringLiteral; -exports.isNumericLiteral = isNumericLiteral; -exports.isNullLiteral = isNullLiteral; -exports.isBooleanLiteral = isBooleanLiteral; -exports.isRegExpLiteral = isRegExpLiteral; -exports.isLogicalExpression = isLogicalExpression; -exports.isMemberExpression = isMemberExpression; -exports.isNewExpression = isNewExpression; -exports.isProgram = isProgram; -exports.isObjectExpression = isObjectExpression; -exports.isObjectMethod = isObjectMethod; -exports.isObjectProperty = isObjectProperty; -exports.isRestElement = isRestElement; -exports.isReturnStatement = isReturnStatement; -exports.isSequenceExpression = isSequenceExpression; -exports.isParenthesizedExpression = isParenthesizedExpression; -exports.isSwitchCase = isSwitchCase; -exports.isSwitchStatement = isSwitchStatement; -exports.isThisExpression = isThisExpression; -exports.isThrowStatement = isThrowStatement; -exports.isTryStatement = isTryStatement; -exports.isUnaryExpression = isUnaryExpression; -exports.isUpdateExpression = isUpdateExpression; -exports.isVariableDeclaration = isVariableDeclaration; -exports.isVariableDeclarator = isVariableDeclarator; -exports.isWhileStatement = isWhileStatement; -exports.isWithStatement = isWithStatement; -exports.isAssignmentPattern = isAssignmentPattern; -exports.isArrayPattern = isArrayPattern; -exports.isArrowFunctionExpression = isArrowFunctionExpression; -exports.isClassBody = isClassBody; -exports.isClassDeclaration = isClassDeclaration; -exports.isClassExpression = isClassExpression; -exports.isExportAllDeclaration = isExportAllDeclaration; -exports.isExportDefaultDeclaration = isExportDefaultDeclaration; -exports.isExportNamedDeclaration = isExportNamedDeclaration; -exports.isExportSpecifier = isExportSpecifier; -exports.isForOfStatement = isForOfStatement; -exports.isImportDeclaration = isImportDeclaration; -exports.isImportDefaultSpecifier = isImportDefaultSpecifier; -exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier; -exports.isImportSpecifier = isImportSpecifier; -exports.isMetaProperty = isMetaProperty; -exports.isClassMethod = isClassMethod; -exports.isObjectPattern = isObjectPattern; -exports.isSpreadElement = isSpreadElement; -exports.isSuper = isSuper; -exports.isTaggedTemplateExpression = isTaggedTemplateExpression; -exports.isTemplateElement = isTemplateElement; -exports.isTemplateLiteral = isTemplateLiteral; -exports.isYieldExpression = isYieldExpression; -exports.isAnyTypeAnnotation = isAnyTypeAnnotation; -exports.isArrayTypeAnnotation = isArrayTypeAnnotation; -exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation; -exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation; -exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation; -exports.isClassImplements = isClassImplements; -exports.isDeclareClass = isDeclareClass; -exports.isDeclareFunction = isDeclareFunction; -exports.isDeclareInterface = isDeclareInterface; -exports.isDeclareModule = isDeclareModule; -exports.isDeclareModuleExports = isDeclareModuleExports; -exports.isDeclareTypeAlias = isDeclareTypeAlias; -exports.isDeclareOpaqueType = isDeclareOpaqueType; -exports.isDeclareVariable = isDeclareVariable; -exports.isDeclareExportDeclaration = isDeclareExportDeclaration; -exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration; -exports.isDeclaredPredicate = isDeclaredPredicate; -exports.isExistsTypeAnnotation = isExistsTypeAnnotation; -exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation; -exports.isFunctionTypeParam = isFunctionTypeParam; -exports.isGenericTypeAnnotation = isGenericTypeAnnotation; -exports.isInferredPredicate = isInferredPredicate; -exports.isInterfaceExtends = isInterfaceExtends; -exports.isInterfaceDeclaration = isInterfaceDeclaration; -exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation; -exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation; -exports.isMixedTypeAnnotation = isMixedTypeAnnotation; -exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation; -exports.isNullableTypeAnnotation = isNullableTypeAnnotation; -exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation; -exports.isNumberTypeAnnotation = isNumberTypeAnnotation; -exports.isObjectTypeAnnotation = isObjectTypeAnnotation; -exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot; -exports.isObjectTypeCallProperty = isObjectTypeCallProperty; -exports.isObjectTypeIndexer = isObjectTypeIndexer; -exports.isObjectTypeProperty = isObjectTypeProperty; -exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty; -exports.isOpaqueType = isOpaqueType; -exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier; -exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation; -exports.isStringTypeAnnotation = isStringTypeAnnotation; -exports.isThisTypeAnnotation = isThisTypeAnnotation; -exports.isTupleTypeAnnotation = isTupleTypeAnnotation; -exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation; -exports.isTypeAlias = isTypeAlias; -exports.isTypeAnnotation = isTypeAnnotation; -exports.isTypeCastExpression = isTypeCastExpression; -exports.isTypeParameter = isTypeParameter; -exports.isTypeParameterDeclaration = isTypeParameterDeclaration; -exports.isTypeParameterInstantiation = isTypeParameterInstantiation; -exports.isUnionTypeAnnotation = isUnionTypeAnnotation; -exports.isVariance = isVariance; -exports.isVoidTypeAnnotation = isVoidTypeAnnotation; -exports.isJSXAttribute = isJSXAttribute; -exports.isJSXClosingElement = isJSXClosingElement; -exports.isJSXElement = isJSXElement; -exports.isJSXEmptyExpression = isJSXEmptyExpression; -exports.isJSXExpressionContainer = isJSXExpressionContainer; -exports.isJSXSpreadChild = isJSXSpreadChild; -exports.isJSXIdentifier = isJSXIdentifier; -exports.isJSXMemberExpression = isJSXMemberExpression; -exports.isJSXNamespacedName = isJSXNamespacedName; -exports.isJSXOpeningElement = isJSXOpeningElement; -exports.isJSXSpreadAttribute = isJSXSpreadAttribute; -exports.isJSXText = isJSXText; -exports.isJSXFragment = isJSXFragment; -exports.isJSXOpeningFragment = isJSXOpeningFragment; -exports.isJSXClosingFragment = isJSXClosingFragment; -exports.isNoop = isNoop; -exports.isPlaceholder = isPlaceholder; -exports.isArgumentPlaceholder = isArgumentPlaceholder; -exports.isAwaitExpression = isAwaitExpression; -exports.isBindExpression = isBindExpression; -exports.isClassProperty = isClassProperty; -exports.isOptionalMemberExpression = isOptionalMemberExpression; -exports.isPipelineTopicExpression = isPipelineTopicExpression; -exports.isPipelineBareFunction = isPipelineBareFunction; -exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference; -exports.isOptionalCallExpression = isOptionalCallExpression; -exports.isClassPrivateProperty = isClassPrivateProperty; -exports.isClassPrivateMethod = isClassPrivateMethod; -exports.isImport = isImport; -exports.isDecorator = isDecorator; -exports.isDoExpression = isDoExpression; -exports.isExportDefaultSpecifier = isExportDefaultSpecifier; -exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier; -exports.isPrivateName = isPrivateName; -exports.isBigIntLiteral = isBigIntLiteral; -exports.isTSParameterProperty = isTSParameterProperty; -exports.isTSDeclareFunction = isTSDeclareFunction; -exports.isTSDeclareMethod = isTSDeclareMethod; -exports.isTSQualifiedName = isTSQualifiedName; -exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration; -exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration; -exports.isTSPropertySignature = isTSPropertySignature; -exports.isTSMethodSignature = isTSMethodSignature; -exports.isTSIndexSignature = isTSIndexSignature; -exports.isTSAnyKeyword = isTSAnyKeyword; -exports.isTSUnknownKeyword = isTSUnknownKeyword; -exports.isTSNumberKeyword = isTSNumberKeyword; -exports.isTSObjectKeyword = isTSObjectKeyword; -exports.isTSBooleanKeyword = isTSBooleanKeyword; -exports.isTSStringKeyword = isTSStringKeyword; -exports.isTSSymbolKeyword = isTSSymbolKeyword; -exports.isTSVoidKeyword = isTSVoidKeyword; -exports.isTSUndefinedKeyword = isTSUndefinedKeyword; -exports.isTSNullKeyword = isTSNullKeyword; -exports.isTSNeverKeyword = isTSNeverKeyword; -exports.isTSThisType = isTSThisType; -exports.isTSFunctionType = isTSFunctionType; -exports.isTSConstructorType = isTSConstructorType; -exports.isTSTypeReference = isTSTypeReference; -exports.isTSTypePredicate = isTSTypePredicate; -exports.isTSTypeQuery = isTSTypeQuery; -exports.isTSTypeLiteral = isTSTypeLiteral; -exports.isTSArrayType = isTSArrayType; -exports.isTSTupleType = isTSTupleType; -exports.isTSOptionalType = isTSOptionalType; -exports.isTSRestType = isTSRestType; -exports.isTSUnionType = isTSUnionType; -exports.isTSIntersectionType = isTSIntersectionType; -exports.isTSConditionalType = isTSConditionalType; -exports.isTSInferType = isTSInferType; -exports.isTSParenthesizedType = isTSParenthesizedType; -exports.isTSTypeOperator = isTSTypeOperator; -exports.isTSIndexedAccessType = isTSIndexedAccessType; -exports.isTSMappedType = isTSMappedType; -exports.isTSLiteralType = isTSLiteralType; -exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments; -exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration; -exports.isTSInterfaceBody = isTSInterfaceBody; -exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration; -exports.isTSAsExpression = isTSAsExpression; -exports.isTSTypeAssertion = isTSTypeAssertion; -exports.isTSEnumDeclaration = isTSEnumDeclaration; -exports.isTSEnumMember = isTSEnumMember; -exports.isTSModuleDeclaration = isTSModuleDeclaration; -exports.isTSModuleBlock = isTSModuleBlock; -exports.isTSImportType = isTSImportType; -exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration; -exports.isTSExternalModuleReference = isTSExternalModuleReference; -exports.isTSNonNullExpression = isTSNonNullExpression; -exports.isTSExportAssignment = isTSExportAssignment; -exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration; -exports.isTSTypeAnnotation = isTSTypeAnnotation; -exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation; -exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration; -exports.isTSTypeParameter = isTSTypeParameter; -exports.isExpression = isExpression; -exports.isBinary = isBinary; -exports.isScopable = isScopable; -exports.isBlockParent = isBlockParent; -exports.isBlock = isBlock; -exports.isStatement = isStatement; -exports.isTerminatorless = isTerminatorless; -exports.isCompletionStatement = isCompletionStatement; -exports.isConditional = isConditional; -exports.isLoop = isLoop; -exports.isWhile = isWhile; -exports.isExpressionWrapper = isExpressionWrapper; -exports.isFor = isFor; -exports.isForXStatement = isForXStatement; -exports.isFunction = isFunction; -exports.isFunctionParent = isFunctionParent; -exports.isPureish = isPureish; -exports.isDeclaration = isDeclaration; -exports.isPatternLike = isPatternLike; -exports.isLVal = isLVal; -exports.isTSEntityName = isTSEntityName; -exports.isLiteral = isLiteral; -exports.isImmutable = isImmutable; -exports.isUserWhitespacable = isUserWhitespacable; -exports.isMethod = isMethod; -exports.isObjectMember = isObjectMember; -exports.isProperty = isProperty; -exports.isUnaryLike = isUnaryLike; -exports.isPattern = isPattern; -exports.isClass = isClass; -exports.isModuleDeclaration = isModuleDeclaration; -exports.isExportDeclaration = isExportDeclaration; -exports.isModuleSpecifier = isModuleSpecifier; -exports.isFlow = isFlow; -exports.isFlowType = isFlowType; -exports.isFlowBaseAnnotation = isFlowBaseAnnotation; -exports.isFlowDeclaration = isFlowDeclaration; -exports.isFlowPredicate = isFlowPredicate; -exports.isJSX = isJSX; -exports.isPrivate = isPrivate; -exports.isTSTypeElement = isTSTypeElement; -exports.isTSType = isTSType; -exports.isNumberLiteral = isNumberLiteral; -exports.isRegexLiteral = isRegexLiteral; -exports.isRestProperty = isRestProperty; -exports.isSpreadProperty = isSpreadProperty; - -var _shallowEqual = _interopRequireDefault(require("../../utils/shallowEqual")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isArrayExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ArrayExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isAssignmentExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "AssignmentExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBinaryExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BinaryExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInterpreterDirective(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "InterpreterDirective") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDirective(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Directive") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDirectiveLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DirectiveLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBlockStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BlockStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBreakStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BreakStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isCallExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "CallExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isCatchClause(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "CatchClause") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isConditionalExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ConditionalExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isContinueStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ContinueStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDebuggerStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DebuggerStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDoWhileStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DoWhileStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEmptyStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "EmptyStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExpressionStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExpressionStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFile(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "File") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isForInStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ForInStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isForStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ForStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FunctionDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FunctionExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isIdentifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Identifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isIfStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "IfStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLabeledStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "LabeledStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isStringLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "StringLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNumericLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NumericLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNullLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NullLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBooleanLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BooleanLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isRegExpLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "RegExpLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLogicalExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "LogicalExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isMemberExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "MemberExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNewExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NewExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isProgram(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Program") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectMethod(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectMethod") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isRestElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "RestElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isReturnStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ReturnStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSequenceExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "SequenceExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isParenthesizedExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ParenthesizedExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSwitchCase(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "SwitchCase") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSwitchStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "SwitchStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isThisExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ThisExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isThrowStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ThrowStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTryStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TryStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUnaryExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "UnaryExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUpdateExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "UpdateExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isVariableDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "VariableDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isVariableDeclarator(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "VariableDeclarator") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isWhileStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "WhileStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isWithStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "WithStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isAssignmentPattern(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "AssignmentPattern") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isArrayPattern(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ArrayPattern") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isArrowFunctionExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ArrowFunctionExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassBody(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassBody") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportAllDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportAllDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportDefaultDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportDefaultDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportNamedDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportNamedDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isForOfStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ForOfStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImportDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ImportDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImportDefaultSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ImportDefaultSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImportNamespaceSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ImportNamespaceSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImportSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ImportSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isMetaProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "MetaProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassMethod(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassMethod") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectPattern(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectPattern") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSpreadElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "SpreadElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSuper(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Super") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTaggedTemplateExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TaggedTemplateExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTemplateElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TemplateElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTemplateLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TemplateLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isYieldExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "YieldExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isAnyTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "AnyTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isArrayTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ArrayTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBooleanTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BooleanTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBooleanLiteralTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BooleanLiteralTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNullLiteralTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NullLiteralTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassImplements(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassImplements") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareClass(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareClass") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareFunction(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareFunction") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareInterface(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareInterface") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareModule(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareModule") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareModuleExports(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareModuleExports") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareTypeAlias(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareTypeAlias") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareOpaqueType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareOpaqueType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareVariable(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareVariable") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareExportDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareExportDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareExportAllDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareExportAllDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclaredPredicate(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclaredPredicate") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExistsTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExistsTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FunctionTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionTypeParam(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FunctionTypeParam") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isGenericTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "GenericTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInferredPredicate(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "InferredPredicate") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInterfaceExtends(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "InterfaceExtends") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInterfaceDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "InterfaceDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInterfaceTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "InterfaceTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isIntersectionTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "IntersectionTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isMixedTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "MixedTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEmptyTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "EmptyTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNullableTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NullableTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNumberLiteralTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NumberLiteralTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNumberTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NumberTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeInternalSlot(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeInternalSlot") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeCallProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeCallProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeIndexer(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeIndexer") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeSpreadProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeSpreadProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isOpaqueType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "OpaqueType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isQualifiedTypeIdentifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "QualifiedTypeIdentifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isStringLiteralTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "StringLiteralTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isStringTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "StringTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isThisTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ThisTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTupleTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TupleTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeofTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeofTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeAlias(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeAlias") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeCastExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeCastExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeParameter(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeParameter") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeParameterDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeParameterDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeParameterInstantiation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeParameterInstantiation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUnionTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "UnionTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isVariance(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Variance") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isVoidTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "VoidTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXAttribute(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXAttribute") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXClosingElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXClosingElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXEmptyExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXEmptyExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXExpressionContainer(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXExpressionContainer") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXSpreadChild(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXSpreadChild") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXIdentifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXIdentifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXMemberExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXMemberExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXNamespacedName(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXNamespacedName") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXOpeningElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXOpeningElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXSpreadAttribute(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXSpreadAttribute") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXText(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXText") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXFragment(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXFragment") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXOpeningFragment(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXOpeningFragment") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXClosingFragment(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXClosingFragment") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNoop(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Noop") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPlaceholder(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Placeholder") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isArgumentPlaceholder(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ArgumentPlaceholder") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isAwaitExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "AwaitExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBindExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BindExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isOptionalMemberExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "OptionalMemberExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPipelineTopicExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "PipelineTopicExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPipelineBareFunction(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "PipelineBareFunction") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPipelinePrimaryTopicReference(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "PipelinePrimaryTopicReference") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isOptionalCallExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "OptionalCallExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassPrivateProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassPrivateProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassPrivateMethod(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassPrivateMethod") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImport(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Import") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDecorator(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Decorator") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDoExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DoExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportDefaultSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportDefaultSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportNamespaceSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportNamespaceSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPrivateName(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "PrivateName") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBigIntLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BigIntLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSParameterProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSParameterProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSDeclareFunction(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSDeclareFunction") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSDeclareMethod(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSDeclareMethod") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSQualifiedName(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSQualifiedName") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSCallSignatureDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSCallSignatureDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSConstructSignatureDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSConstructSignatureDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSPropertySignature(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSPropertySignature") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSMethodSignature(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSMethodSignature") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSIndexSignature(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSIndexSignature") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSAnyKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSAnyKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSUnknownKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSUnknownKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNumberKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSNumberKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSObjectKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSObjectKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSBooleanKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSBooleanKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSStringKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSStringKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSSymbolKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSSymbolKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSVoidKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSVoidKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSUndefinedKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSUndefinedKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNullKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSNullKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNeverKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSNeverKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSThisType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSThisType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSFunctionType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSFunctionType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSConstructorType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSConstructorType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeReference(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeReference") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypePredicate(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypePredicate") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeQuery(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeQuery") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSArrayType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSArrayType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTupleType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTupleType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSOptionalType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSOptionalType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSRestType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSRestType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSUnionType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSUnionType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSIntersectionType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSIntersectionType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSConditionalType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSConditionalType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSInferType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSInferType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSParenthesizedType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSParenthesizedType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeOperator(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeOperator") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSIndexedAccessType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSIndexedAccessType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSMappedType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSMappedType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSLiteralType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSLiteralType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSExpressionWithTypeArguments(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSExpressionWithTypeArguments") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSInterfaceDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSInterfaceDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSInterfaceBody(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSInterfaceBody") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeAliasDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeAliasDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSAsExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSAsExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeAssertion(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeAssertion") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSEnumDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSEnumDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSEnumMember(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSEnumMember") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSModuleDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSModuleDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSModuleBlock(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSModuleBlock") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSImportType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSImportType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSImportEqualsDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSImportEqualsDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSExternalModuleReference(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSExternalModuleReference") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNonNullExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSNonNullExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSExportAssignment(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSExportAssignment") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNamespaceExportDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSNamespaceExportDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeParameterInstantiation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeParameterInstantiation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeParameterDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeParameterDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeParameter(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeParameter") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Expression" || "ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "AwaitExpression" === nodeType || "BindExpression" === nodeType || "OptionalMemberExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "OptionalCallExpression" === nodeType || "Import" === nodeType || "DoExpression" === nodeType || "BigIntLiteral" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBinary(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Binary" || "BinaryExpression" === nodeType || "LogicalExpression" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isScopable(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Scopable" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBlockParent(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BlockParent" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBlock(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Block" || "BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Statement" || "BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTerminatorless(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Terminatorless" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isCompletionStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "CompletionStatement" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isConditional(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Conditional" || "ConditionalExpression" === nodeType || "IfStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLoop(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Loop" || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isWhile(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "While" || "DoWhileStatement" === nodeType || "WhileStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExpressionWrapper(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExpressionWrapper" || "ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFor(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "For" || "ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isForXStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ForXStatement" || "ForInStatement" === nodeType || "ForOfStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunction(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Function" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionParent(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FunctionParent" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPureish(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Pureish" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Declaration" || "FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPatternLike(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "PatternLike" || "Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLVal(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "LVal" || "Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSEntityName(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSEntityName" || "Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Literal" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImmutable(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Immutable" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUserWhitespacable(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "UserWhitespacable" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isMethod(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Method" || "ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectMember(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectMember" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Property" || "ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUnaryLike(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "UnaryLike" || "UnaryExpression" === nodeType || "SpreadElement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPattern(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Pattern" || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClass(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Class" || "ClassDeclaration" === nodeType || "ClassExpression" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isModuleDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ModuleDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isModuleSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ModuleSpecifier" || "ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlow(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Flow" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlowType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FlowType" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlowBaseAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FlowBaseAnnotation" || "AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlowDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FlowDeclaration" || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlowPredicate(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FlowPredicate" || "DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSX(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSX" || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPrivate(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Private" || "ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeElement" || "TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSType" || "TSAnyKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNumberLiteral(node, opts) { - console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NumberLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isRegexLiteral(node, opts) { - console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "RegexLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isRestProperty(node, opts) { - console.trace("The node type RestProperty has been renamed to RestElement"); - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "RestProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSpreadProperty(node, opts) { - console.trace("The node type SpreadProperty has been renamed to SpreadElement"); - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "SpreadProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/is.js b/node_modules/@babel/types/lib/validators/is.js deleted file mode 100644 index a68c1088..00000000 --- a/node_modules/@babel/types/lib/validators/is.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = is; - -var _shallowEqual = _interopRequireDefault(require("../utils/shallowEqual")); - -var _isType = _interopRequireDefault(require("./isType")); - -var _isPlaceholderType = _interopRequireDefault(require("./isPlaceholderType")); - -var _definitions = require("../definitions"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function is(type, node, opts) { - if (!node) return false; - const matches = (0, _isType.default)(node.type, type); - - if (!matches) { - if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) { - return (0, _isPlaceholderType.default)(node.expectedNode, type); - } - - return false; - } - - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isBinding.js b/node_modules/@babel/types/lib/validators/isBinding.js deleted file mode 100644 index e18ad197..00000000 --- a/node_modules/@babel/types/lib/validators/isBinding.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isBinding; - -var _getBindingIdentifiers = _interopRequireDefault(require("../retrievers/getBindingIdentifiers")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isBinding(node, parent, grandparent) { - if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") { - return false; - } - - const keys = _getBindingIdentifiers.default.keys[parent.type]; - - if (keys) { - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - const val = parent[key]; - - if (Array.isArray(val)) { - if (val.indexOf(node) >= 0) return true; - } else { - if (val === node) return true; - } - } - } - - return false; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isBlockScoped.js b/node_modules/@babel/types/lib/validators/isBlockScoped.js deleted file mode 100644 index 7e6549e0..00000000 --- a/node_modules/@babel/types/lib/validators/isBlockScoped.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isBlockScoped; - -var _generated = require("./generated"); - -var _isLet = _interopRequireDefault(require("./isLet")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isBlockScoped(node) { - return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isImmutable.js b/node_modules/@babel/types/lib/validators/isImmutable.js deleted file mode 100644 index b00b23d4..00000000 --- a/node_modules/@babel/types/lib/validators/isImmutable.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isImmutable; - -var _isType = _interopRequireDefault(require("./isType")); - -var _generated = require("./generated"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isImmutable(node) { - if ((0, _isType.default)(node.type, "Immutable")) return true; - - if ((0, _generated.isIdentifier)(node)) { - if (node.name === "undefined") { - return true; - } else { - return false; - } - } - - return false; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isLet.js b/node_modules/@babel/types/lib/validators/isLet.js deleted file mode 100644 index 93d75628..00000000 --- a/node_modules/@babel/types/lib/validators/isLet.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isLet; - -var _generated = require("./generated"); - -var _constants = require("../constants"); - -function isLet(node) { - return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isNode.js b/node_modules/@babel/types/lib/validators/isNode.js deleted file mode 100644 index e88a47aa..00000000 --- a/node_modules/@babel/types/lib/validators/isNode.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isNode; - -var _definitions = require("../definitions"); - -function isNode(node) { - return !!(node && _definitions.VISITOR_KEYS[node.type]); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isNodesEquivalent.js b/node_modules/@babel/types/lib/validators/isNodesEquivalent.js deleted file mode 100644 index 0c3b8ac4..00000000 --- a/node_modules/@babel/types/lib/validators/isNodesEquivalent.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isNodesEquivalent; - -var _definitions = require("../definitions"); - -function isNodesEquivalent(a, b) { - if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) { - return a === b; - } - - if (a.type !== b.type) { - return false; - } - - const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type); - const visitorKeys = _definitions.VISITOR_KEYS[a.type]; - - for (const field of fields) { - if (typeof a[field] !== typeof b[field]) { - return false; - } - - if (a[field] == null && b[field] == null) { - continue; - } else if (a[field] == null || b[field] == null) { - return false; - } - - if (Array.isArray(a[field])) { - if (!Array.isArray(b[field])) { - return false; - } - - if (a[field].length !== b[field].length) { - return false; - } - - for (let i = 0; i < a[field].length; i++) { - if (!isNodesEquivalent(a[field][i], b[field][i])) { - return false; - } - } - - continue; - } - - if (typeof a[field] === "object" && (!visitorKeys || !visitorKeys.includes(field))) { - for (const key of Object.keys(a[field])) { - if (a[field][key] !== b[field][key]) { - return false; - } - } - - continue; - } - - if (!isNodesEquivalent(a[field], b[field])) { - return false; - } - } - - return true; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isPlaceholderType.js b/node_modules/@babel/types/lib/validators/isPlaceholderType.js deleted file mode 100644 index e8271de0..00000000 --- a/node_modules/@babel/types/lib/validators/isPlaceholderType.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isPlaceholderType; - -var _definitions = require("../definitions"); - -function isPlaceholderType(placeholderType, targetType) { - if (placeholderType === targetType) return true; - const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType]; - - if (aliases) { - for (const alias of aliases) { - if (targetType === alias) return true; - } - } - - return false; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isReferenced.js b/node_modules/@babel/types/lib/validators/isReferenced.js deleted file mode 100644 index 46598dd1..00000000 --- a/node_modules/@babel/types/lib/validators/isReferenced.js +++ /dev/null @@ -1,112 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isReferenced; - -function isReferenced(node, parent, grandparent) { - switch (parent.type) { - case "MemberExpression": - case "JSXMemberExpression": - case "OptionalMemberExpression": - if (parent.property === node) { - return !!parent.computed; - } - - return parent.object === node; - - case "VariableDeclarator": - return parent.init === node; - - case "ArrowFunctionExpression": - return parent.body === node; - - case "ExportSpecifier": - if (parent.source) { - return false; - } - - return parent.local === node; - - case "PrivateName": - return false; - - case "ObjectProperty": - case "ClassProperty": - case "ClassPrivateProperty": - case "ClassMethod": - case "ClassPrivateMethod": - case "ObjectMethod": - if (parent.key === node) { - return !!parent.computed; - } - - if (parent.value === node) { - return !grandparent || grandparent.type !== "ObjectPattern"; - } - - return true; - - case "ClassDeclaration": - case "ClassExpression": - return parent.superClass === node; - - case "AssignmentExpression": - return parent.right === node; - - case "AssignmentPattern": - return parent.right === node; - - case "LabeledStatement": - return false; - - case "CatchClause": - return false; - - case "RestElement": - return false; - - case "BreakStatement": - case "ContinueStatement": - return false; - - case "FunctionDeclaration": - case "FunctionExpression": - return false; - - case "ExportNamespaceSpecifier": - case "ExportDefaultSpecifier": - return false; - - case "ImportDefaultSpecifier": - case "ImportNamespaceSpecifier": - case "ImportSpecifier": - return false; - - case "JSXAttribute": - return false; - - case "ObjectPattern": - case "ArrayPattern": - return false; - - case "MetaProperty": - return false; - - case "ObjectTypeProperty": - return parent.key !== node; - - case "TSEnumMember": - return parent.id !== node; - - case "TSPropertySignature": - if (parent.key === node) { - return !!parent.computed; - } - - return true; - } - - return true; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isScope.js b/node_modules/@babel/types/lib/validators/isScope.js deleted file mode 100644 index c808631f..00000000 --- a/node_modules/@babel/types/lib/validators/isScope.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isScope; - -var _generated = require("./generated"); - -function isScope(node, parent) { - if ((0, _generated.isBlockStatement)(node) && (0, _generated.isFunction)(parent, { - body: node - })) { - return false; - } - - if ((0, _generated.isBlockStatement)(node) && (0, _generated.isCatchClause)(parent, { - body: node - })) { - return false; - } - - return (0, _generated.isScopable)(node); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isSpecifierDefault.js b/node_modules/@babel/types/lib/validators/isSpecifierDefault.js deleted file mode 100644 index 25431cc2..00000000 --- a/node_modules/@babel/types/lib/validators/isSpecifierDefault.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isSpecifierDefault; - -var _generated = require("./generated"); - -function isSpecifierDefault(specifier) { - return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, { - name: "default" - }); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isType.js b/node_modules/@babel/types/lib/validators/isType.js deleted file mode 100644 index 59d31dfb..00000000 --- a/node_modules/@babel/types/lib/validators/isType.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isType; - -var _definitions = require("../definitions"); - -function isType(nodeType, targetType) { - if (nodeType === targetType) return true; - if (_definitions.ALIAS_KEYS[targetType]) return false; - const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType]; - - if (aliases) { - if (aliases[0] === nodeType) return true; - - for (const alias of aliases) { - if (nodeType === alias) return true; - } - } - - return false; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isValidES3Identifier.js b/node_modules/@babel/types/lib/validators/isValidES3Identifier.js deleted file mode 100644 index 8455cab2..00000000 --- a/node_modules/@babel/types/lib/validators/isValidES3Identifier.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isValidES3Identifier; - -var _isValidIdentifier = _interopRequireDefault(require("./isValidIdentifier")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const RESERVED_WORDS_ES3_ONLY = new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]); - -function isValidES3Identifier(name) { - return (0, _isValidIdentifier.default)(name) && !RESERVED_WORDS_ES3_ONLY.has(name); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isValidIdentifier.js b/node_modules/@babel/types/lib/validators/isValidIdentifier.js deleted file mode 100644 index 8c54b7ac..00000000 --- a/node_modules/@babel/types/lib/validators/isValidIdentifier.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isValidIdentifier; - -function _esutils() { - const data = _interopRequireDefault(require("esutils")); - - _esutils = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isValidIdentifier(name) { - if (typeof name !== "string" || _esutils().default.keyword.isReservedWordES6(name, true)) { - return false; - } else if (name === "await") { - return false; - } else { - return _esutils().default.keyword.isIdentifierNameES6(name); - } -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/isVar.js b/node_modules/@babel/types/lib/validators/isVar.js deleted file mode 100644 index a34801d1..00000000 --- a/node_modules/@babel/types/lib/validators/isVar.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isVar; - -var _generated = require("./generated"); - -var _constants = require("../constants"); - -function isVar(node) { - return (0, _generated.isVariableDeclaration)(node, { - kind: "var" - }) && !node[_constants.BLOCK_SCOPED_SYMBOL]; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/matchesPattern.js b/node_modules/@babel/types/lib/validators/matchesPattern.js deleted file mode 100644 index 538e011f..00000000 --- a/node_modules/@babel/types/lib/validators/matchesPattern.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = matchesPattern; - -var _generated = require("./generated"); - -function matchesPattern(member, match, allowPartial) { - if (!(0, _generated.isMemberExpression)(member)) return false; - const parts = Array.isArray(match) ? match : match.split("."); - const nodes = []; - let node; - - for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) { - nodes.push(node.property); - } - - nodes.push(node); - if (nodes.length < parts.length) return false; - if (!allowPartial && nodes.length > parts.length) return false; - - for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) { - const node = nodes[j]; - let value; - - if ((0, _generated.isIdentifier)(node)) { - value = node.name; - } else if ((0, _generated.isStringLiteral)(node)) { - value = node.value; - } else { - return false; - } - - if (parts[i] !== value) return false; - } - - return true; -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/react/isCompatTag.js b/node_modules/@babel/types/lib/validators/react/isCompatTag.js deleted file mode 100644 index 57761c2b..00000000 --- a/node_modules/@babel/types/lib/validators/react/isCompatTag.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isCompatTag; - -function isCompatTag(tagName) { - return !!tagName && /^[a-z]/.test(tagName); -} \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/react/isReactComponent.js b/node_modules/@babel/types/lib/validators/react/isReactComponent.js deleted file mode 100644 index 33b30d71..00000000 --- a/node_modules/@babel/types/lib/validators/react/isReactComponent.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _buildMatchMemberExpression = _interopRequireDefault(require("../buildMatchMemberExpression")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component"); -var _default = isReactComponent; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/@babel/types/lib/validators/validate.js b/node_modules/@babel/types/lib/validators/validate.js deleted file mode 100644 index 092da991..00000000 --- a/node_modules/@babel/types/lib/validators/validate.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = validate; -exports.validateField = validateField; - -var _definitions = require("../definitions"); - -function validate(node, key, val) { - if (!node) return; - const fields = _definitions.NODE_FIELDS[node.type]; - if (!fields) return; - const field = fields[key]; - validateField(node, key, val, field); -} - -function validateField(node, key, val, field) { - if (!field || !field.validate) return; - if (field.optional && val == null) return; - field.validate(node, key, val); -} \ No newline at end of file diff --git a/node_modules/@babel/types/package.json b/node_modules/@babel/types/package.json deleted file mode 100644 index 6e30300a..00000000 --- a/node_modules/@babel/types/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "@babel/types@7.5.5", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@babel/types@7.5.5", - "_id": "@babel/types@7.5.5", - "_inBundle": false, - "_integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==", - "_location": "/@babel/types", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@babel/types@7.5.5", - "name": "@babel/types", - "escapedName": "@babel%2ftypes", - "scope": "@babel", - "rawSpec": "7.5.5", - "saveSpec": null, - "fetchSpec": "7.5.5" - }, - "_requiredBy": [ - "/@babel/core", - "/@babel/generator", - "/@babel/helper-function-name", - "/@babel/helper-get-function-arity", - "/@babel/helper-split-export-declaration", - "/@babel/helpers", - "/@babel/template", - "/@babel/traverse", - "/@types/babel__core", - "/@types/babel__generator", - "/@types/babel__template", - "/@types/babel__traverse", - "/istanbul-lib-instrument", - "/jest-snapshot" - ], - "_resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz", - "_spec": "7.5.5", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sebastian McKenzie", - "email": "sebmck@gmail.com" - }, - "dependencies": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - }, - "description": "Babel Types is a Lodash-esque utility library for AST nodes", - "devDependencies": { - "@babel/generator": "^7.5.5", - "@babel/parser": "^7.5.5" - }, - "gitHead": "0407f034f09381b95e9cabefbf6b176c76485a43", - "homepage": "https://babeljs.io/", - "license": "MIT", - "main": "lib/index.js", - "name": "@babel/types", - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-types" - }, - "types": "lib/index.d.ts", - "version": "7.5.5" -} diff --git a/node_modules/@babel/types/scripts/generateTypeHelpers.js b/node_modules/@babel/types/scripts/generateTypeHelpers.js deleted file mode 100644 index bf0b036c..00000000 --- a/node_modules/@babel/types/scripts/generateTypeHelpers.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -const path = require("path"); -const chalk = require("chalk"); -const generateBuilders = require("./generators/generateBuilders"); -const generateValidators = require("./generators/generateValidators"); -const generateAsserts = require("./generators/generateAsserts"); -const generateConstants = require("./generators/generateConstants"); -const format = require("../../../scripts/utils/formatCode"); -const writeFile = require("../../../scripts/utils/writeFileAndMkDir"); - -const baseDir = path.join(__dirname, "../src"); - -console.log("Generating @babel/types dynamic functions"); - -const buildersFile = path.join(baseDir, "builders/generated/index.js"); -writeFile(buildersFile, format(generateBuilders(), buildersFile)); -console.log(` ${chalk.green("✔")} Generated builders`); - -const validatorsFile = path.join(baseDir, "validators/generated/index.js"); -writeFile(validatorsFile, format(generateValidators(), validatorsFile)); -console.log(` ${chalk.green("✔")} Generated validators`); - -const assertsFile = path.join(baseDir, "asserts/generated/index.js"); -writeFile(assertsFile, format(generateAsserts(), assertsFile)); -console.log(` ${chalk.green("✔")} Generated asserts`); - -const constantsFile = path.join(baseDir, "constants/generated/index.js"); -writeFile(constantsFile, format(generateConstants(), constantsFile)); -console.log(` ${chalk.green("✔")} Generated constants`); diff --git a/node_modules/@babel/types/scripts/generators/docs.js b/node_modules/@babel/types/scripts/generators/docs.js deleted file mode 100644 index 3bbb5236..00000000 --- a/node_modules/@babel/types/scripts/generators/docs.js +++ /dev/null @@ -1,117 +0,0 @@ -"use strict"; - -const util = require("util"); -const stringifyValidator = require("../utils/stringifyValidator"); -const toFunctionName = require("../utils/toFunctionName"); - -const types = require("../../"); - -const readme = [ - `# @babel/types - -> This module contains methods for building ASTs manually and for checking the types of AST nodes. - -## Install - -\`\`\`sh -npm install --save-dev @babel/types -\`\`\` - -## API`, -]; - -const customTypes = { - ClassMethod: { - key: "if computed then `Expression` else `Identifier | Literal`", - }, - Identifier: { - name: "`string`", - }, - MemberExpression: { - property: "if computed then `Expression` else `Identifier`", - }, - ObjectMethod: { - key: "if computed then `Expression` else `Identifier | Literal`", - }, - ObjectProperty: { - key: "if computed then `Expression` else `Identifier | Literal`", - }, -}; -Object.keys(types.BUILDER_KEYS) - .sort() - .forEach(function(key) { - readme.push("### " + key[0].toLowerCase() + key.substr(1)); - readme.push("```javascript"); - readme.push( - "t." + - toFunctionName(key) + - "(" + - types.BUILDER_KEYS[key].join(", ") + - ")" - ); - readme.push("```"); - readme.push(""); - readme.push( - "See also `t.is" + - key + - "(node, opts)` and `t.assert" + - key + - "(node, opts)`." - ); - readme.push(""); - if (types.ALIAS_KEYS[key] && types.ALIAS_KEYS[key].length) { - readme.push( - "Aliases: " + - types.ALIAS_KEYS[key] - .map(function(key) { - return "`" + key + "`"; - }) - .join(", ") - ); - readme.push(""); - } - Object.keys(types.NODE_FIELDS[key]) - .sort(function(fieldA, fieldB) { - const indexA = types.BUILDER_KEYS[key].indexOf(fieldA); - const indexB = types.BUILDER_KEYS[key].indexOf(fieldB); - if (indexA === indexB) return fieldA < fieldB ? -1 : 1; - if (indexA === -1) return 1; - if (indexB === -1) return -1; - return indexA - indexB; - }) - .forEach(function(field) { - const defaultValue = types.NODE_FIELDS[key][field].default; - const fieldDescription = ["`" + field + "`"]; - const validator = types.NODE_FIELDS[key][field].validate; - if (customTypes[key] && customTypes[key][field]) { - fieldDescription.push(`: ${customTypes[key][field]}`); - } else if (validator) { - try { - fieldDescription.push( - ": `" + stringifyValidator(validator, "") + "`" - ); - } catch (ex) { - if (ex.code === "UNEXPECTED_VALIDATOR_TYPE") { - console.log( - "Unrecognised validator type for " + key + "." + field - ); - console.dir(ex.validator, { depth: 10, colors: true }); - } - } - } - if (defaultValue !== null || types.NODE_FIELDS[key][field].optional) { - fieldDescription.push( - " (default: `" + util.inspect(defaultValue) + "`)" - ); - } else { - fieldDescription.push(" (required)"); - } - readme.push(" - " + fieldDescription.join("")); - }); - - readme.push(""); - readme.push("---"); - readme.push(""); - }); - -process.stdout.write(readme.join("\n")); diff --git a/node_modules/@babel/types/scripts/generators/flow.js b/node_modules/@babel/types/scripts/generators/flow.js deleted file mode 100644 index daab2411..00000000 --- a/node_modules/@babel/types/scripts/generators/flow.js +++ /dev/null @@ -1,153 +0,0 @@ -"use strict"; - -const t = require("../../"); -const stringifyValidator = require("../utils/stringifyValidator"); -const toFunctionName = require("../utils/toFunctionName"); - -const NODE_PREFIX = "BabelNode"; - -let code = `// NOTE: This file is autogenerated. Do not modify. -// See packages/babel-types/scripts/generators/flow.js for script used. - -declare class ${NODE_PREFIX}Comment { - value: string; - start: number; - end: number; - loc: ${NODE_PREFIX}SourceLocation; -} - -declare class ${NODE_PREFIX}CommentBlock extends ${NODE_PREFIX}Comment { - type: "CommentBlock"; -} - -declare class ${NODE_PREFIX}CommentLine extends ${NODE_PREFIX}Comment { - type: "CommentLine"; -} - -declare class ${NODE_PREFIX}SourceLocation { - start: { - line: number; - column: number; - }; - - end: { - line: number; - column: number; - }; -} - -declare class ${NODE_PREFIX} { - leadingComments?: Array<${NODE_PREFIX}Comment>; - innerComments?: Array<${NODE_PREFIX}Comment>; - trailingComments?: Array<${NODE_PREFIX}Comment>; - start: ?number; - end: ?number; - loc: ?${NODE_PREFIX}SourceLocation; -}\n\n`; - -// - -const lines = []; - -for (const type in t.NODE_FIELDS) { - const fields = t.NODE_FIELDS[type]; - - const struct = ['type: "' + type + '";']; - const args = []; - - Object.keys(t.NODE_FIELDS[type]) - .sort((fieldA, fieldB) => { - const indexA = t.BUILDER_KEYS[type].indexOf(fieldA); - const indexB = t.BUILDER_KEYS[type].indexOf(fieldB); - if (indexA === indexB) return fieldA < fieldB ? -1 : 1; - if (indexA === -1) return 1; - if (indexB === -1) return -1; - return indexA - indexB; - }) - .forEach(fieldName => { - const field = fields[fieldName]; - - let suffix = ""; - if (field.optional || field.default != null) suffix += "?"; - - let typeAnnotation = "any"; - - const validate = field.validate; - if (validate) { - typeAnnotation = stringifyValidator(validate, NODE_PREFIX); - } - - if (typeAnnotation) { - suffix += ": " + typeAnnotation; - } - - args.push(t.toBindingIdentifierName(fieldName) + suffix); - - if (t.isValidIdentifier(fieldName)) { - struct.push(fieldName + suffix + ";"); - } - }); - - code += `declare class ${NODE_PREFIX}${type} extends ${NODE_PREFIX} { - ${struct.join("\n ").trim()} -}\n\n`; - - // Flow chokes on super() and import() :/ - if (type !== "Super" && type !== "Import") { - lines.push( - `declare function ${toFunctionName(type)}(${args.join( - ", " - )}): ${NODE_PREFIX}${type};` - ); - } -} - -for (let i = 0; i < t.TYPES.length; i++) { - let decl = `declare function is${ - t.TYPES[i] - }(node: ?Object, opts?: ?Object): boolean`; - - if (t.NODE_FIELDS[t.TYPES[i]]) { - decl += ` %checks (node instanceof ${NODE_PREFIX}${t.TYPES[i]})`; - } - - lines.push(decl); -} - -lines.push( - `declare function validate(n: BabelNode, key: string, value: mixed): void;`, - `declare function clone(n: T): T;`, - `declare function cloneDeep(n: T): T;`, - `declare function removeProperties(n: T, opts: ?{}): void;`, - `declare function removePropertiesDeep(n: T, opts: ?{}): T;`, - `declare type TraversalAncestors = Array<{ - node: BabelNode, - key: string, - index?: number, - }>; - declare type TraversalHandler = (BabelNode, TraversalAncestors, T) => void; - declare type TraversalHandlers = { - enter?: TraversalHandler, - exit?: TraversalHandler, - };`.replace(/(^|\n) {2}/g, "$1"), - // eslint-disable-next-line - `declare function traverse(n: BabelNode, TraversalHandler | TraversalHandlers, state?: T): void;` -); - -for (const type in t.FLIPPED_ALIAS_KEYS) { - const types = t.FLIPPED_ALIAS_KEYS[type]; - code += `type ${NODE_PREFIX}${type} = ${types - .map(type => `${NODE_PREFIX}${type}`) - .join(" | ")};\n`; -} - -code += `\ndeclare module "@babel/types" { - ${lines - .join("\n") - .replace(/\n/g, "\n ") - .trim()} -}\n`; - -// - -process.stdout.write(code); diff --git a/node_modules/@babel/types/scripts/generators/generateAsserts.js b/node_modules/@babel/types/scripts/generators/generateAsserts.js deleted file mode 100644 index 150e8557..00000000 --- a/node_modules/@babel/types/scripts/generators/generateAsserts.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -const definitions = require("../../lib/definitions"); - -function addAssertHelper(type) { - return `export function assert${type}(node: Object, opts?: Object = {}): void { - assert("${type}", node, opts) } - `; -} - -module.exports = function generateAsserts() { - let output = `// @flow -/* - * This file is auto-generated! Do not modify it directly. - * To re-generate run 'make build' - */ -import is from "../../validators/is"; - -function assert(type: string, node: Object, opts?: Object): void { - if (!is(type, node, opts)) { - throw new Error( - \`Expected type "\${type}" with option \${JSON.stringify(opts)}, but instead got "\${node.type}".\`, - ); - } -}\n\n`; - - Object.keys(definitions.VISITOR_KEYS).forEach(type => { - output += addAssertHelper(type); - }); - - Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => { - output += addAssertHelper(type); - }); - - Object.keys(definitions.DEPRECATED_KEYS).forEach(type => { - const newType = definitions.DEPRECATED_KEYS[type]; - output += `export function assert${type}(node: Object, opts: Object): void { - console.trace("The node type ${type} has been renamed to ${newType}"); - assert("${type}", node, opts); -}\n`; - }); - - return output; -}; diff --git a/node_modules/@babel/types/scripts/generators/generateBuilders.js b/node_modules/@babel/types/scripts/generators/generateBuilders.js deleted file mode 100644 index 08a5b6fc..00000000 --- a/node_modules/@babel/types/scripts/generators/generateBuilders.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -const definitions = require("../../lib/definitions"); -const formatBuilderName = require("../utils/formatBuilderName"); -const lowerFirst = require("../utils/lowerFirst"); - -module.exports = function generateBuilders() { - let output = `// @flow -/* - * This file is auto-generated! Do not modify it directly. - * To re-generate run 'make build' - */ -import builder from "../builder";\n\n`; - - Object.keys(definitions.BUILDER_KEYS).forEach(type => { - output += `export function ${type}(...args: Array): Object { return builder("${type}", ...args); } -export { ${type} as ${formatBuilderName(type)} };\n`; - - // This is needed for backwards compatibility. - // It should be removed in the next major version. - // JSXIdentifier -> jSXIdentifier - if (/^[A-Z]{2}/.test(type)) { - output += `export { ${type} as ${lowerFirst(type)} }\n`; - } - }); - - Object.keys(definitions.DEPRECATED_KEYS).forEach(type => { - const newType = definitions.DEPRECATED_KEYS[type]; - output += `export function ${type}(...args: Array): Object { - console.trace("The node type ${type} has been renamed to ${newType}"); - return ${type}("${type}", ...args); -} -export { ${type} as ${formatBuilderName(type)} };\n`; - - // This is needed for backwards compatibility. - // It should be removed in the next major version. - // JSXIdentifier -> jSXIdentifier - if (/^[A-Z]{2}/.test(type)) { - output += `export { ${type} as ${lowerFirst(type)} }\n`; - } - }); - - return output; -}; diff --git a/node_modules/@babel/types/scripts/generators/generateConstants.js b/node_modules/@babel/types/scripts/generators/generateConstants.js deleted file mode 100644 index 1e4d2cab..00000000 --- a/node_modules/@babel/types/scripts/generators/generateConstants.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -const definitions = require("../../lib/definitions"); - -module.exports = function generateConstants() { - let output = `// @flow -/* - * This file is auto-generated! Do not modify it directly. - * To re-generate run 'make build' - */ -import { FLIPPED_ALIAS_KEYS } from "../../definitions";\n\n`; - - Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => { - output += `export const ${type.toUpperCase()}_TYPES = FLIPPED_ALIAS_KEYS["${type}"];\n`; - }); - - return output; -}; diff --git a/node_modules/@babel/types/scripts/generators/generateValidators.js b/node_modules/@babel/types/scripts/generators/generateValidators.js deleted file mode 100644 index 1455f99e..00000000 --- a/node_modules/@babel/types/scripts/generators/generateValidators.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -const definitions = require("../../lib/definitions"); - -const has = Function.call.bind(Object.prototype.hasOwnProperty); - -function joinComparisons(leftArr, right) { - return ( - leftArr.map(JSON.stringify).join(` === ${right} || `) + ` === ${right}` - ); -} - -function addIsHelper(type, aliasKeys, deprecated) { - const targetType = JSON.stringify(type); - let aliasSource = ""; - if (aliasKeys) { - aliasSource = " || " + joinComparisons(aliasKeys, "nodeType"); - } - - let placeholderSource = ""; - const placeholderTypes = []; - if ( - definitions.PLACEHOLDERS.includes(type) && - has(definitions.FLIPPED_ALIAS_KEYS, type) - ) { - placeholderTypes.push(type); - } - if (has(definitions.PLACEHOLDERS_FLIPPED_ALIAS, type)) { - placeholderTypes.push(...definitions.PLACEHOLDERS_FLIPPED_ALIAS[type]); - } - if (placeholderTypes.length > 0) { - placeholderSource = - ' || nodeType === "Placeholder" && (' + - joinComparisons(placeholderTypes, "node.expectedNode") + - ")"; - } - - return `export function is${type}(node: ?Object, opts?: Object): boolean { - ${deprecated || ""} - if (!node) return false; - - const nodeType = node.type; - if (nodeType === ${targetType}${aliasSource}${placeholderSource}) { - if (typeof opts === "undefined") { - return true; - } else { - return shallowEqual(node, opts); - } - } - - return false; - } - `; -} - -module.exports = function generateValidators() { - let output = `// @flow -/* - * This file is auto-generated! Do not modify it directly. - * To re-generate run 'make build' - */ -import shallowEqual from "../../utils/shallowEqual";\n\n`; - - Object.keys(definitions.VISITOR_KEYS).forEach(type => { - output += addIsHelper(type); - }); - - Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => { - output += addIsHelper(type, definitions.FLIPPED_ALIAS_KEYS[type]); - }); - - Object.keys(definitions.DEPRECATED_KEYS).forEach(type => { - const newType = definitions.DEPRECATED_KEYS[type]; - const deprecated = `console.trace("The node type ${type} has been renamed to ${newType}");`; - output += addIsHelper(type, null, deprecated); - }); - - return output; -}; diff --git a/node_modules/@babel/types/scripts/generators/typescript.js b/node_modules/@babel/types/scripts/generators/typescript.js deleted file mode 100644 index b6019ec3..00000000 --- a/node_modules/@babel/types/scripts/generators/typescript.js +++ /dev/null @@ -1,200 +0,0 @@ -"use strict"; - -const t = require("../../"); -const stringifyValidator = require("../utils/stringifyValidator"); -const toFunctionName = require("../utils/toFunctionName"); - -let code = `// NOTE: This file is autogenerated. Do not modify. -// See packages/babel-types/scripts/generators/typescript.js for script used. - -interface BaseComment { - value: string; - start: number; - end: number; - loc: SourceLocation; - type: "CommentBlock" | "CommentLine"; -} - -export interface CommentBlock extends BaseComment { - type: "CommentBlock"; -} - -export interface CommentLine extends BaseComment { - type: "CommentLine"; -} - -export type Comment = CommentBlock | CommentLine; - -export interface SourceLocation { - start: { - line: number; - column: number; - }; - - end: { - line: number; - column: number; - }; -} - -interface BaseNode { - leadingComments: ReadonlyArray | null; - innerComments: ReadonlyArray | null; - trailingComments: ReadonlyArray | null; - start: number | null; - end: number | null; - loc: SourceLocation | null; - type: Node["type"]; -} - -export type Node = ${t.TYPES.sort().join(" | ")};\n\n`; - -// - -const lines = []; - -for (const type in t.NODE_FIELDS) { - const fields = t.NODE_FIELDS[type]; - const fieldNames = sortFieldNames(Object.keys(t.NODE_FIELDS[type]), type); - - const struct = ['type: "' + type + '";']; - const args = []; - - fieldNames.forEach(fieldName => { - const field = fields[fieldName]; - let typeAnnotation = stringifyValidator(field.validate, ""); - - if (isNullable(field) && !hasDefault(field)) { - typeAnnotation += " | null"; - } - - if (areAllRemainingFieldsNullable(fieldName, fieldNames, fields)) { - args.push( - `${t.toBindingIdentifierName(fieldName)}${ - isNullable(field) ? "?:" : ":" - } ${typeAnnotation}` - ); - } else { - args.push( - `${t.toBindingIdentifierName(fieldName)}: ${typeAnnotation}${ - isNullable(field) ? " | undefined" : "" - }` - ); - } - - const alphaNumeric = /^\w+$/; - - if (t.isValidIdentifier(fieldName) || alphaNumeric.test(fieldName)) { - struct.push(`${fieldName}: ${typeAnnotation};`); - } else { - struct.push(`"${fieldName}": ${typeAnnotation};`); - } - }); - - code += `export interface ${type} extends BaseNode { - ${struct.join("\n ").trim()} -}\n\n`; - - // super and import are reserved words in JavaScript - if (type !== "Super" && type !== "Import") { - lines.push( - `export function ${toFunctionName(type)}(${args.join(", ")}): ${type};` - ); - } -} - -for (let i = 0; i < t.TYPES.length; i++) { - let decl = `export function is${ - t.TYPES[i] - }(node: object | null | undefined, opts?: object | null): `; - - if (t.NODE_FIELDS[t.TYPES[i]]) { - decl += `node is ${t.TYPES[i]};`; - } else if (t.FLIPPED_ALIAS_KEYS[t.TYPES[i]]) { - decl += `node is ${t.TYPES[i]};`; - } else { - decl += `boolean;`; - } - - lines.push(decl); -} - -lines.push( - `export function validate(n: Node, key: string, value: any): void;`, - `export function clone(n: T): T;`, - `export function cloneDeep(n: T): T;`, - `export function removeProperties( - n: Node, - opts?: { preserveComments: boolean } | null -): void;`, - `export function removePropertiesDeep( - n: T, - opts?: { preserveComments: boolean } | null -): T;`, - `export type TraversalAncestors = ReadonlyArray<{ - node: Node, - key: string, - index?: number, - }>; - export type TraversalHandler = (node: Node, parent: TraversalAncestors, type: T) => void; - export type TraversalHandlers = { - enter?: TraversalHandler, - exit?: TraversalHandler, - };`.replace(/(^|\n) {2}/g, "$1"), - // eslint-disable-next-line - `export function traverse(n: Node, h: TraversalHandler | TraversalHandlers, state?: T): void;` -); - -for (const type in t.DEPRECATED_KEYS) { - code += `/** - * @deprecated Use \`${t.DEPRECATED_KEYS[type]}\` - */ -export type ${type} = ${t.DEPRECATED_KEYS[type]};\n -`; -} - -for (const type in t.FLIPPED_ALIAS_KEYS) { - const types = t.FLIPPED_ALIAS_KEYS[type]; - code += `export type ${type} = ${types - .map(type => `${type}`) - .join(" | ")};\n`; -} -code += "\n"; - -code += "export interface Aliases {\n"; -for (const type in t.FLIPPED_ALIAS_KEYS) { - code += ` ${type}: ${type};\n`; -} -code += "}\n\n"; - -code += lines.join("\n") + "\n"; - -// - -process.stdout.write(code); - -// - -function areAllRemainingFieldsNullable(fieldName, fieldNames, fields) { - const index = fieldNames.indexOf(fieldName); - return fieldNames.slice(index).every(_ => isNullable(fields[_])); -} - -function hasDefault(field) { - return field.default != null; -} - -function isNullable(field) { - return field.optional || hasDefault(field); -} - -function sortFieldNames(fields, type) { - return fields.sort((fieldA, fieldB) => { - const indexA = t.BUILDER_KEYS[type].indexOf(fieldA); - const indexB = t.BUILDER_KEYS[type].indexOf(fieldB); - if (indexA === indexB) return fieldA < fieldB ? -1 : 1; - if (indexA === -1) return 1; - if (indexB === -1) return -1; - return indexA - indexB; - }); -} diff --git a/node_modules/@babel/types/scripts/utils/formatBuilderName.js b/node_modules/@babel/types/scripts/utils/formatBuilderName.js deleted file mode 100644 index 1b543a9b..00000000 --- a/node_modules/@babel/types/scripts/utils/formatBuilderName.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -const toLowerCase = Function.call.bind("".toLowerCase); - -module.exports = function formatBuilderName(type) { - // FunctionExpression -> functionExpression - // JSXIdentifier -> jsxIdentifier - return type.replace(/^([A-Z](?=[a-z])|[A-Z]+(?=[A-Z]))/, toLowerCase); -}; diff --git a/node_modules/@babel/types/scripts/utils/lowerFirst.js b/node_modules/@babel/types/scripts/utils/lowerFirst.js deleted file mode 100644 index 9e7b0cee..00000000 --- a/node_modules/@babel/types/scripts/utils/lowerFirst.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -module.exports = function lowerFirst(string) { - return string[0].toLowerCase() + string.slice(1); -}; diff --git a/node_modules/@babel/types/scripts/utils/stringifyValidator.js b/node_modules/@babel/types/scripts/utils/stringifyValidator.js deleted file mode 100644 index 2ea1e803..00000000 --- a/node_modules/@babel/types/scripts/utils/stringifyValidator.js +++ /dev/null @@ -1,66 +0,0 @@ -module.exports = function stringifyValidator(validator, nodePrefix) { - if (validator === undefined) { - return "any"; - } - - if (validator.each) { - return `Array<${stringifyValidator(validator.each, nodePrefix)}>`; - } - - if (validator.chainOf) { - return stringifyValidator(validator.chainOf[1], nodePrefix); - } - - if (validator.oneOf) { - return validator.oneOf.map(JSON.stringify).join(" | "); - } - - if (validator.oneOfNodeTypes) { - return validator.oneOfNodeTypes.map(_ => nodePrefix + _).join(" | "); - } - - if (validator.oneOfNodeOrValueTypes) { - return validator.oneOfNodeOrValueTypes - .map(_ => { - return isValueType(_) ? _ : nodePrefix + _; - }) - .join(" | "); - } - - if (validator.type) { - return validator.type; - } - - if (validator.shapeOf) { - return ( - "{ " + - Object.keys(validator.shapeOf) - .map(shapeKey => { - const propertyDefinition = validator.shapeOf[shapeKey]; - if (propertyDefinition.validate) { - const isOptional = - propertyDefinition.optional || propertyDefinition.default != null; - return ( - shapeKey + - (isOptional ? "?: " : ": ") + - stringifyValidator(propertyDefinition.validate) - ); - } - return null; - }) - .filter(Boolean) - .join(", ") + - " }" - ); - } - - return ["any"]; -}; - -/** - * Heuristic to decide whether or not the given type is a value type (eg. "null") - * or a Node type (eg. "Expression"). - */ -function isValueType(type) { - return type.charAt(0).toLowerCase() === type.charAt(0); -} diff --git a/node_modules/@babel/types/scripts/utils/toFunctionName.js b/node_modules/@babel/types/scripts/utils/toFunctionName.js deleted file mode 100644 index 627c9a7d..00000000 --- a/node_modules/@babel/types/scripts/utils/toFunctionName.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = function toFunctionName(typeName) { - const _ = typeName.replace(/^TS/, "ts").replace(/^JSX/, "jsx"); - return _.slice(0, 1).toLowerCase() + _.slice(1); -}; diff --git a/node_modules/@cnakazawa/watch/LICENSE b/node_modules/@cnakazawa/watch/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/@cnakazawa/watch/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/@cnakazawa/watch/README.md b/node_modules/@cnakazawa/watch/README.md deleted file mode 100644 index f0a0415f..00000000 --- a/node_modules/@cnakazawa/watch/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# watch -- Utilities for watching file trees in node.js - -## Install - -
-  npm install watch
-
- -## Purpose - -The intention of this module is provide tools that make managing the watching of file & directory trees easier. - -#### watch.watchTree(root, [options,] callback) - -The first argument is the directory root you want to watch. - -The options object is passed to fs.watchFile but can also be used to provide two additional watchTree specific options: - -* `'ignoreDotFiles'` - When true this option means that when the file tree is walked it will ignore files that being with "." -* `'filter'` - You can use this option to provide a function that returns true or false for each file and directory to decide whether or not that file/directory is included in the watcher. -* `'interval'` - Specifies the interval duration in seconds, the time period between polling for file changes. -* `'ignoreUnreadableDir'` - When true, this options means that when a file can't be read, this file is silently skipped. -* `'ignoreNotPermitted'` - When true, this options means that when a file can't be read due to permission issues, this file is silently skipped. -* `'ignoreDirectoryPattern'` - When a regex pattern is set, e.g. /node_modules/, these directories are silently skipped. - -The callback takes 3 arguments. The first is the file that was modified. The second is the current stat object for that file and the third is the previous stat object. - -When a file is new the previous stat object is null. - -When watchTree is finished walking the tree and adding all the listeners it passes the file hash (keys are the file/directory names and the values are the current stat objects) as the first argument and null as both the previous and current stat object arguments. - -
-  watch.watchTree('/home/mikeal', function (f, curr, prev) {
-    if (typeof f == "object" && prev === null && curr === null) {
-      // Finished walking the tree
-    } else if (prev === null) {
-      // f is a new file
-    } else if (curr.nlink === 0) {
-      // f was removed
-    } else {
-      // f was changed
-    }
-  })
-
- -### watch.unwatchTree(root) - -Unwatch a previously watched directory root using `watch.watchTree`. - -### watch.createMonitor(root, [options,] callback) - -This function creates an EventEmitter that gives notifications for different changes that happen to the file and directory tree under the given root argument. - -The options object is passed to watch.watchTree. - -The callback receives the monitor object. - -The monitor object contains a property, `files`, which is a hash of files and directories as keys with the current stat object as the value. - -The monitor has the following events. - -* `'created'` - New file has been created. Two arguments, the filename and the stat object. -* `'removed'` - A file has been moved or deleted. Two arguments, the filename and the stat object for the fd. -* `'changed'` - A file has been changed. Three arguments, the filename, the current stat object, and the previous stat object. - -The monitor can be stopped using `.stop` (calls `unwatchTree`). - -
-  var watch = require('watch')
-  watch.createMonitor('/home/mikeal', function (monitor) {
-    monitor.files['/home/mikeal/.zshrc'] // Stat object for my zshrc.
-    monitor.on("created", function (f, stat) {
-      // Handle new files
-    })
-    monitor.on("changed", function (f, curr, prev) {
-      // Handle file changes
-    })
-    monitor.on("removed", function (f, stat) {
-      // Handle removed files
-    })
-    monitor.stop(); // Stop watching
-  })
-
- -### CLI - -This module includes a simple command line interface, which you can install with `npm install watch -g`. - - -``` -Usage: watch [...directory] [OPTIONS] - -OPTIONS: - --wait= - Duration, in seconds, that watching will be disabled - after running . Setting this option will - throttle calls to for the specified duration. - - --filter= - Path to a require-able .js file that exports a filter - function to be passed to watchTreeOptions.filter. - Path is resolved relative to process.cwd(). - - --interval= - Specifies the interval duration in seconds, the time period between polling for file changes. - - --ignoreDotFiles, -d - Ignores dot or hidden files in the watch [directory]. - - --ignoreUnreadable, -u - Silently ignores files that cannot be read within the - watch [directory]. - - --ignoreDirectoryPattern=, -p - Silently skips directories that match the regular - expression. -``` - -It will watch the given directories (defaults to the current working directory) with `watchTree` and run the given command every time a file changes. - -### Examples - -As stated above the pattern is: - - watch [...directory] [OPTIONS] - -To run the watch command in the terminal you have to write the following: - - watch 'npm run test -s' directory - -As the command has to be written in quotation marks Windows users may need to use double quotes rather than single quotes - - watch "npm run test -s" directory - -Note: Because Windows users may need to use double quotes rather than single quotes they need to escape the them in npm scripts - - "scripts": { - "watch:osx": "watch 'npm run test -s' source" - "watch:windows": "watch \"npm run test -s\" source", - } - - -## Contributing - -### Releasing - -On the latest clean `master`: - -``` -npm run release:major -npm run release:minor -npm run release:patch -``` diff --git a/node_modules/@cnakazawa/watch/cli.js b/node_modules/@cnakazawa/watch/cli.js deleted file mode 100644 index 8299e4f4..00000000 --- a/node_modules/@cnakazawa/watch/cli.js +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env node - -var argv = require('minimist')(process.argv.slice(2)) -var execshell = require('exec-sh') -var path = require('path') -var watch = require('./main.js') - -if(argv._.length === 0) { - console.error([ - 'Usage: watch [...directory]', - '[--wait=]', - '[--filter=]', - '[--interval=]', - '[--ignoreDotFiles]', - '[--ignoreUnreadable]', - '[--ignoreDirectoryPattern]' - ].join(' ')) - process.exit() -} - -var watchTreeOpts = {} -var command = argv._[0] -var dirs = [] - -var i -var argLen = argv._.length -if (argLen > 1) { - for(i = 1; i< argLen; i++) { - dirs.push(argv._[i]) - } -} else { - dirs.push(process.cwd()) -} - -var waitTime = Number(argv.wait || argv.w) -if (argv.interval || argv.i) { - watchTreeOpts.interval = Number(argv.interval || argv.i || 0.2); -} - -if(argv.ignoreDotFiles || argv.d) - watchTreeOpts.ignoreDotFiles = true - -if(argv.ignoreUnreadable || argv.u) - watchTreeOpts.ignoreUnreadableDir = true - -if(argv.ignoreDirectoryPattern || argv.p) { - var match = (argv.ignoreDirectoryPattern || argv.p).match(/^\/(.*)\/([gimuy]*)$/); - watchTreeOpts.ignoreDirectoryPattern = new RegExp(match[1], match[2]) -} - -if(argv.filter || argv.f) { - try { - watchTreeOpts.filter = require(path.resolve(process.cwd(), argv.filter || argv.f)) - } catch (e) { - console.error(e) - process.exit(1) - } -} - -var wait = false - -var dirLen = dirs.length -var skip = dirLen - 1 -for(i = 0; i < dirLen; i++) { - var dir = dirs[i] - console.error('> Watching', dir) - watch.watchTree(dir, watchTreeOpts, function (f, curr, prev) { - if(skip) { - skip-- - return - } - if(wait) return - - execshell(command) - - if(waitTime > 0) { - wait = true - setTimeout(function () { - wait = false - }, waitTime * 1000) - } - }) -} diff --git a/node_modules/@cnakazawa/watch/main.js b/node_modules/@cnakazawa/watch/main.js deleted file mode 100644 index b82becb6..00000000 --- a/node_modules/@cnakazawa/watch/main.js +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright 2010-2011 Mikeal Rogers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -var sys = require('util') - , fs = require('fs') - , path = require('path') - , events = require('events') - ; - -function walk (dir, options, callback) { - if (!callback) {callback = options; options = {}} - if (!callback.files) callback.files = {}; - if (!callback.pending) callback.pending = 0; - callback.pending += 1; - fs.stat(dir, function (err, stat) { - if (err) return callback(err); - callback.files[dir] = stat; - fs.readdir(dir, function (err, files) { - if (err) { - if(err.code === 'EACCES' && options.ignoreUnreadableDir) return callback(); - return callback(err); - } - callback.pending -= 1; - files.forEach(function (f, index) { - f = path.join(dir, f); - callback.pending += 1; - fs.stat(f, function (err, stat) { - var enoent = false - , done = false; - - if (err) { - if (err.code !== 'ENOENT' && (err.code !== 'EPERM' && options.ignoreNotPermitted)) { - return callback(err); - } else { - enoent = true; - } - } - callback.pending -= 1; - done = callback.pending === 0; - if (!enoent) { - if (options.ignoreDotFiles && path.basename(f)[0] === '.') return done && callback(null, callback.files); - if (options.filter && !options.filter(f, stat)) return done && callback(null, callback.files); - callback.files[f] = stat; - if (stat.isDirectory() && !(options.ignoreDirectoryPattern && options.ignoreDirectoryPattern.test(f))) walk(f, options, callback); - done = callback.pending === 0; - if (done) callback(null, callback.files); - } - }) - }) - if (callback.pending === 0) callback(null, callback.files); - }) - if (callback.pending === 0) callback(null, callback.files); - }) - -} - -var watchedFiles = Object.create(null); - -exports.watchTree = function ( root, options, callback ) { - if (!callback) {callback = options; options = {}} - walk(root, options, function (err, files) { - if (err) throw err; - var fileWatcher = function (f) { - var fsOptions = {}; - if (options.interval) { - fsOptions.interval = options.interval * 1000; - } - fs.watchFile(f, fsOptions, function (c, p) { - // Check if anything actually changed in stat - if (files[f] && !files[f].isDirectory() && c.nlink !== 0 && files[f].mtime.getTime() == c.mtime.getTime()) return; - files[f] = c; - if (!files[f].isDirectory()) callback(f, c, p); - else { - fs.readdir(f, function (err, nfiles) { - if (err) return; - nfiles.forEach(function (b) { - var file = path.join(f, b); - if (!files[file] && (options.ignoreDotFiles !== true || b[0] != '.')) { - fs.stat(file, function (err, stat) { - if (options.filter && !options.filter(file, stat)) return; - callback(file, stat, null); - files[file] = stat; - fileWatcher(file); - }) - } - }) - }) - } - if (c.nlink === 0) { - // unwatch removed files. - delete files[f] - fs.unwatchFile(f); - } - }) - } - fileWatcher(root); - for (var i in files) { - fileWatcher(i); - } - watchedFiles[root] = files; - callback(files, null, null); - }) -} - -exports.unwatchTree = function (root) { - if (!watchedFiles[root]) return; - Object.keys(watchedFiles[root]).forEach(fs.unwatchFile); - watchedFiles[root] = false; -}; - -exports.createMonitor = function (root, options, cb) { - if (!cb) {cb = options; options = {}} - var monitor = new events.EventEmitter(); - monitor.stop = exports.unwatchTree.bind(null, root); - - var prevFile = {file: null,action: null,stat: null}; - exports.watchTree(root, options, function (f, curr, prev) { - // if not curr, prev, but f is an object - if (typeof f == "object" && prev == null && curr === null) { - monitor.files = f; - return cb(monitor); - } - - // if not prev and either prevFile.file is not f or prevFile.action is not created - if (!prev) { - if (prevFile.file != f || prevFile.action != "created") { - prevFile = { file: f, action: "created", stat: curr }; - return monitor.emit("created", f, curr); - } - } - - // if curr.nlink is 0 and either prevFile.file is not f or prevFile.action is not removed - if (curr) { - if (curr.nlink === 0) { - if (prevFile.file != f || prevFile.action != "removed") { - prevFile = { file: f, action: "removed", stat: curr }; - return monitor.emit("removed", f, curr); - } - } - } - - // if prevFile.file is null or prevFile.stat.mtime is not the same as curr.mtime - if (prevFile.file === null) { - return monitor.emit("changed", f, curr, prev); - } - // stat might return null, so catch errors - try { - if (prevFile.stat.mtime.getTime() !== curr.mtime.getTime()) { - return monitor.emit("changed", f, curr, prev); - } - } catch(e) { - return monitor.emit("changed", f, curr, prev); - } - }) -} - -exports.walk = walk; diff --git a/node_modules/@cnakazawa/watch/package.json b/node_modules/@cnakazawa/watch/package.json deleted file mode 100644 index 2fb649b2..00000000 --- a/node_modules/@cnakazawa/watch/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_args": [ - [ - "@cnakazawa/watch@1.0.3", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@cnakazawa/watch@1.0.3", - "_id": "@cnakazawa/watch@1.0.3", - "_inBundle": false, - "_integrity": "sha512-r5160ogAvGyHsal38Kux7YYtodEKOj89RGb28ht1jh3SJb08VwRwAKKJL0bGb04Zd/3r9FL3BFIc3bBidYffCA==", - "_location": "/@cnakazawa/watch", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@cnakazawa/watch@1.0.3", - "name": "@cnakazawa/watch", - "escapedName": "@cnakazawa%2fwatch", - "scope": "@cnakazawa", - "rawSpec": "1.0.3", - "saveSpec": null, - "fetchSpec": "1.0.3" - }, - "_requiredBy": [ - "/sane" - ], - "_resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.3.tgz", - "_spec": "1.0.3", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com" - }, - "bin": { - "watch": "./cli.js" - }, - "bugs": { - "url": "https://github.com/mikeal/watch/issues" - }, - "dependencies": { - "exec-sh": "^0.3.2", - "minimist": "^1.2.0" - }, - "description": "Utilities for watching file trees.", - "directories": { - "lib": "lib" - }, - "engines": { - "node": ">=0.1.95" - }, - "homepage": "https://github.com/mikeal/watch", - "keywords": [ - "util", - "utility", - "fs", - "files" - ], - "license": "Apache-2.0", - "main": "./main", - "name": "@cnakazawa/watch", - "repository": { - "type": "git", - "url": "git://github.com/mikeal/watch.git" - }, - "scripts": { - "release:major": "bash scripts/release.sh major", - "release:minor": "bash scripts/release.sh minor", - "release:patch": "bash scripts/release.sh patch" - }, - "version": "1.0.3" -} diff --git a/node_modules/@cnakazawa/watch/scripts/release.sh b/node_modules/@cnakazawa/watch/scripts/release.sh deleted file mode 100644 index f49d5d11..00000000 --- a/node_modules/@cnakazawa/watch/scripts/release.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env bash - -# ensure git is latest clean branch -# require npm user -# bump package version -# commit -# create tag -# push commit & tag -# publish - -usage() { - echo "" - echo " Usage: bash $0 " -} - -print() { - echo "NPM RELEASE: $1" -} - -run() { - local version=$1 - - # ensure git is ready, fetch before making comparisons - git fetch - local local_sha=$(git rev-parse @) - local remote_sha=$(git rev-parse @{u}) - local base_sha=$(git merge-base @ @{u}) - - if [[ -n $(git status --porcelain) ]]; then - print "Commit or stash you changes before releasing" - exit 1 - else - print "Working directory is clean" - fi - - if [ $local_sha = $remote_sha ]; then - print "Local branch is up-to-date." - elif [ $local_sha = $base_sha ]; then - print "You need to pull changes before you can release." - exit 1 - elif [ $remote_sha = $base_sha ]; then - print "You need to push changes before you can release." - exit 1 - else - print "Your branch has diverged from the remote, you cannot release." - exit 1 - fi - - # ensure npm is ready - local npm_user=$(npm whoami) - local is_collaborator=$(npm access ls-collaborators | grep ".*$npm_user.*:.*write.*") - local is_owner=$(npm owner ls | grep ".*$npm_user <.*") - - if ! [[ "$npm_user" ]]; then - print "You must be logged in to NPM to publish, run \"npm login\" first." - exit 1 - fi - - if [[ -z "$is_collaborator" ]] && [[ -z "$is_owner" ]]; then - print "$npm_user is not an NPM owner or collaborator. Request access from:" - npm owner ls - exit 1 - fi - - # all checks out, publish - print "Publishing new $version version as $npm_user." - - print "...npm version $version" - npm version ${version} - - print "...git push" - git push - - print "...git push --follow-tags" - git push --follow-tags - - print "...npm publish" - npm publish -} - -case $1 in - "major" | "minor" | "patch") - run $1 - ;; - - *) - usage - exit 1 - ;; -esac diff --git a/node_modules/@cnakazawa/watch/test/d/d/t b/node_modules/@cnakazawa/watch/test/d/d/t deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/@cnakazawa/watch/test/d/t b/node_modules/@cnakazawa/watch/test/d/t deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/@cnakazawa/watch/test/test_monitor.js b/node_modules/@cnakazawa/watch/test/test_monitor.js deleted file mode 100644 index 59e776da..00000000 --- a/node_modules/@cnakazawa/watch/test/test_monitor.js +++ /dev/null @@ -1,31 +0,0 @@ -var watch = require('../main') - , assert = require('assert') - , path = require('path') - , fs = require('fs') - , target = path.join(__dirname, "d/t") - ; - -function clearFile() { - fs.writeFileSync(target, '') -} - -clearFile() - -// test if changed event is fired correctly -watch.createMonitor(__dirname, { interval: 150 }, - function (monitor) { - monitor.once('changed', function (f) { - assert.equal(f, target); - clearFile(); - process.exit(0) - }) - - fs.writeFile(target, 'Test Write\n', function (err) { - if (err) throw err; - - setTimeout(function () { - // should have got the other assert done by now - assert.ok(false); - }, 300); - }) -}); diff --git a/node_modules/@cnakazawa/watch/test/test_monitorRootDirectory.js b/node_modules/@cnakazawa/watch/test/test_monitorRootDirectory.js deleted file mode 100644 index e3df5951..00000000 --- a/node_modules/@cnakazawa/watch/test/test_monitorRootDirectory.js +++ /dev/null @@ -1,28 +0,0 @@ -var fs, watch, watch_original; -watch = require('../main'); -watch_original = require('watch'); -fs = require('fs'); - -watch.createMonitor(__dirname, function (monitor) { - monitor.on("created", function (f, stat) { - console.log(f + " created"); - }); - monitor.on("changed", function (f, curr, prev) { - console.log(f + " changed"); - }); - monitor.on("removed", function (f, stat) { - console.log(f + " removed"); - }); -}); - -watch_original.createMonitor(__dirname, function (monitor) { - monitor.on("created", function (f, stat) { - console.log("ORIGINAL: " + f + " created"); - }); - monitor.on("changed", function (f, curr, prev) { - console.log("ORIGINAL: " + f + " changed"); - }); - monitor.on("removed", function (f, stat) { - console.log("ORIGINAL: " + f + " removed"); - }); -}); \ No newline at end of file diff --git a/node_modules/@cnakazawa/watch/test/test_watchTree.js b/node_modules/@cnakazawa/watch/test/test_watchTree.js deleted file mode 100644 index 727b22d3..00000000 --- a/node_modules/@cnakazawa/watch/test/test_watchTree.js +++ /dev/null @@ -1,23 +0,0 @@ -var fs = require('fs') - , watch = require('../main') - , assert = require('assert') - ; - -// -// Demonstrate that the function of 'filter' is semantically inconsistent with -// usual convention, that returning true means 'keep this'. -// -function isDirOrQ(f, stat) { return stat.isDirectory() || f === 'Q'; } - -watch.watchTree(__dirname, { filter: isDirOrQ }, function (f, curr, prev) { - if (typeof f == 'object' && prev === null && curr === null) { - Object.keys(f).forEach(function(name) { - var stat = f[name]; - assert(isDirOrQ(name, stat)); - }); - - // If the process never exits then `unwatchTree` failed to unwatch all - // the files. - watch.unwatchTree(__dirname); - } -}); diff --git a/node_modules/@jest/console/LICENSE b/node_modules/@jest/console/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/@jest/console/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/@jest/console/build/BufferedConsole.d.ts b/node_modules/@jest/console/build/BufferedConsole.d.ts deleted file mode 100644 index 3d2fa8d5..00000000 --- a/node_modules/@jest/console/build/BufferedConsole.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Console } from 'console'; -import { SourceMapRegistry } from '@jest/source-map'; -import { ConsoleBuffer, LogMessage, LogType } from './types'; -export default class BufferedConsole extends Console { - private _buffer; - private _counters; - private _timers; - private _groupDepth; - private _getSourceMaps; - constructor(getSourceMaps: () => SourceMapRegistry | null | undefined); - static write(buffer: ConsoleBuffer, type: LogType, message: LogMessage, level?: number | null, sourceMaps?: SourceMapRegistry | null): import("./types").LogEntry[]; - private _log; - assert(value: any, message?: string | Error): void; - count(label?: string): void; - countReset(label?: string): void; - debug(firstArg: any, ...rest: Array): void; - dir(firstArg: any, ...rest: Array): void; - dirxml(firstArg: any, ...rest: Array): void; - error(firstArg: any, ...rest: Array): void; - group(title?: string, ...rest: Array): void; - groupCollapsed(title?: string, ...rest: Array): void; - groupEnd(): void; - info(firstArg: any, ...rest: Array): void; - log(firstArg: any, ...rest: Array): void; - time(label?: string): void; - timeEnd(label?: string): void; - warn(firstArg: any, ...rest: Array): void; - getBuffer(): import("./types").LogEntry[] | undefined; -} -//# sourceMappingURL=BufferedConsole.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/console/build/BufferedConsole.d.ts.map b/node_modules/@jest/console/build/BufferedConsole.d.ts.map deleted file mode 100644 index ff2edc9f..00000000 --- a/node_modules/@jest/console/build/BufferedConsole.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BufferedConsole.d.ts","sourceRoot":"","sources":["../src/BufferedConsole.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAGhC,OAAO,EAAc,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAChE,OAAO,EACL,aAAa,EAEb,UAAU,EAEV,OAAO,EACR,MAAM,SAAS,CAAC;AAEjB,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,OAAO;IAClD,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,SAAS,CAAc;IAC/B,OAAO,CAAC,OAAO,CAAY;IAC3B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,cAAc,CAA6C;gBAEvD,aAAa,EAAE,MAAM,iBAAiB,GAAG,IAAI,GAAG,SAAS;IAgBrE,MAAM,CAAC,KAAK,CACV,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,UAAU,EACnB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,EACrB,UAAU,CAAC,EAAE,iBAAiB,GAAG,IAAI;IAcvC,OAAO,CAAC,IAAI;IAUZ,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK;IAQ3C,KAAK,CAAC,KAAK,GAAE,MAAkB;IAQ/B,UAAU,CAAC,KAAK,GAAE,MAAkB;IAIpC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIxC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAItC,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIzC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIxC,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAQzC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAQlD,QAAQ;IAMR,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIvC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAItC,IAAI,CAAC,KAAK,GAAE,MAAkB;IAQ9B,OAAO,CAAC,KAAK,GAAE,MAAkB;IAWjC,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIvC,SAAS;CAGV"} \ No newline at end of file diff --git a/node_modules/@jest/console/build/BufferedConsole.js b/node_modules/@jest/console/build/BufferedConsole.js deleted file mode 100644 index 361272af..00000000 --- a/node_modules/@jest/console/build/BufferedConsole.js +++ /dev/null @@ -1,232 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _assert() { - const data = _interopRequireDefault(require('assert')); - - _assert = function _assert() { - return data; - }; - - return data; -} - -function _console() { - const data = require('console'); - - _console = function _console() { - return data; - }; - - return data; -} - -function _util() { - const data = require('util'); - - _util = function _util() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _sourceMap() { - const data = require('@jest/source-map'); - - _sourceMap = function _sourceMap() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class BufferedConsole extends _console().Console { - constructor(getSourceMaps) { - const buffer = []; - super({ - write: message => { - BufferedConsole.write(buffer, 'log', message, null, getSourceMaps()); - return true; - } - }); - - _defineProperty(this, '_buffer', void 0); - - _defineProperty(this, '_counters', void 0); - - _defineProperty(this, '_timers', void 0); - - _defineProperty(this, '_groupDepth', void 0); - - _defineProperty(this, '_getSourceMaps', void 0); - - this._getSourceMaps = getSourceMaps; - this._buffer = buffer; - this._counters = {}; - this._timers = {}; - this._groupDepth = 0; - } - - static write(buffer, type, message, level, sourceMaps) { - const callsite = (0, _sourceMap().getCallsite)( - level != null ? level : 2, - sourceMaps - ); - const origin = callsite.getFileName() + ':' + callsite.getLineNumber(); - buffer.push({ - message, - origin, - type - }); - return buffer; - } - - _log(type, message) { - BufferedConsole.write( - this._buffer, - type, - ' '.repeat(this._groupDepth) + message, - 3, - this._getSourceMaps() - ); - } - - assert(value, message) { - try { - (0, _assert().default)(value, message); - } catch (error) { - this._log('assert', error.toString()); - } - } - - count(label = 'default') { - if (!this._counters[label]) { - this._counters[label] = 0; - } - - this._log( - 'count', - (0, _util().format)(`${label}: ${++this._counters[label]}`) - ); - } - - countReset(label = 'default') { - this._counters[label] = 0; - } - - debug(firstArg, ...rest) { - this._log('debug', (0, _util().format)(firstArg, ...rest)); - } - - dir(firstArg, ...rest) { - this._log('dir', (0, _util().format)(firstArg, ...rest)); - } - - dirxml(firstArg, ...rest) { - this._log('dirxml', (0, _util().format)(firstArg, ...rest)); - } - - error(firstArg, ...rest) { - this._log('error', (0, _util().format)(firstArg, ...rest)); - } - - group(title, ...rest) { - this._groupDepth++; - - if (title || rest.length > 0) { - this._log( - 'group', - _chalk().default.bold((0, _util().format)(title, ...rest)) - ); - } - } - - groupCollapsed(title, ...rest) { - this._groupDepth++; - - if (title || rest.length > 0) { - this._log( - 'groupCollapsed', - _chalk().default.bold((0, _util().format)(title, ...rest)) - ); - } - } - - groupEnd() { - if (this._groupDepth > 0) { - this._groupDepth--; - } - } - - info(firstArg, ...rest) { - this._log('info', (0, _util().format)(firstArg, ...rest)); - } - - log(firstArg, ...rest) { - this._log('log', (0, _util().format)(firstArg, ...rest)); - } - - time(label = 'default') { - if (this._timers[label]) { - return; - } - - this._timers[label] = new Date(); - } - - timeEnd(label = 'default') { - const startTime = this._timers[label]; - - if (startTime) { - const endTime = new Date(); - const time = endTime.getTime() - startTime.getTime(); - - this._log('time', (0, _util().format)(`${label}: ${time}ms`)); - - delete this._timers[label]; - } - } - - warn(firstArg, ...rest) { - this._log('warn', (0, _util().format)(firstArg, ...rest)); - } - - getBuffer() { - return this._buffer.length ? this._buffer : undefined; - } -} - -exports.default = BufferedConsole; diff --git a/node_modules/@jest/console/build/CustomConsole.d.ts b/node_modules/@jest/console/build/CustomConsole.d.ts deleted file mode 100644 index 696aa790..00000000 --- a/node_modules/@jest/console/build/CustomConsole.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Console } from 'console'; -import { LogMessage, LogType } from './types'; -declare type Formatter = (type: LogType, message: LogMessage) => string; -export default class CustomConsole extends Console { - private _stdout; - private _stderr; - private _formatBuffer; - private _counters; - private _timers; - private _groupDepth; - constructor(stdout: NodeJS.WritableStream, stderr: NodeJS.WritableStream, formatBuffer?: Formatter); - private _log; - private _logError; - assert(value: any, message?: string | Error): void; - count(label?: string): void; - countReset(label?: string): void; - debug(firstArg: any, ...args: Array): void; - dir(firstArg: any, ...args: Array): void; - dirxml(firstArg: any, ...args: Array): void; - error(firstArg: any, ...args: Array): void; - group(title?: string, ...args: Array): void; - groupCollapsed(title?: string, ...args: Array): void; - groupEnd(): void; - info(firstArg: any, ...args: Array): void; - log(firstArg: any, ...args: Array): void; - time(label?: string): void; - timeEnd(label?: string): void; - warn(firstArg: any, ...args: Array): void; - getBuffer(): undefined; -} -export {}; -//# sourceMappingURL=CustomConsole.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/console/build/CustomConsole.d.ts.map b/node_modules/@jest/console/build/CustomConsole.d.ts.map deleted file mode 100644 index 83349b0d..00000000 --- a/node_modules/@jest/console/build/CustomConsole.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CustomConsole.d.ts","sourceRoot":"","sources":["../src/CustomConsole.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAIH,OAAO,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAc,UAAU,EAAa,OAAO,EAAC,MAAM,SAAS,CAAC;AASpE,aAAK,SAAS,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,KAAK,MAAM,CAAC;AAEhE,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,OAAO;IAChD,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,aAAa,CAAY;IACjC,OAAO,CAAC,SAAS,CAAc;IAC/B,OAAO,CAAC,OAAO,CAAY;IAC3B,OAAO,CAAC,WAAW,CAAS;gBAG1B,MAAM,EAAE,MAAM,CAAC,cAAc,EAC7B,MAAM,EAAE,MAAM,CAAC,cAAc,EAC7B,YAAY,GAAE,SAAuC;IAWvD,OAAO,CAAC,IAAI;IAOZ,OAAO,CAAC,SAAS;IAOjB,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK;IAQ3C,KAAK,CAAC,KAAK,GAAE,MAAkB;IAQ/B,UAAU,CAAC,KAAK,GAAE,MAAkB;IAIpC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIxC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAItC,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIzC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIxC,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAQzC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAQlD,QAAQ;IAMR,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIvC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAItC,IAAI,CAAC,KAAK,GAAE,MAAkB;IAQ9B,OAAO,CAAC,KAAK,GAAE,MAAkB;IAWjC,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAIvC,SAAS;CAGV"} \ No newline at end of file diff --git a/node_modules/@jest/console/build/CustomConsole.js b/node_modules/@jest/console/build/CustomConsole.js deleted file mode 100644 index a3e1a47e..00000000 --- a/node_modules/@jest/console/build/CustomConsole.js +++ /dev/null @@ -1,216 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _assert() { - const data = _interopRequireDefault(require('assert')); - - _assert = function _assert() { - return data; - }; - - return data; -} - -function _util() { - const data = require('util'); - - _util = function _util() { - return data; - }; - - return data; -} - -function _console() { - const data = require('console'); - - _console = function _console() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -// TODO: Copied from `jest-util`. Import from it in Jest 25 -function clearLine(stream) { - if (stream.isTTY) { - stream.write('\x1b[999D\x1b[K'); - } -} - -class CustomConsole extends _console().Console { - constructor(stdout, stderr, formatBuffer = (_type, message) => message) { - super(stdout, stderr); - - _defineProperty(this, '_stdout', void 0); - - _defineProperty(this, '_stderr', void 0); - - _defineProperty(this, '_formatBuffer', void 0); - - _defineProperty(this, '_counters', void 0); - - _defineProperty(this, '_timers', void 0); - - _defineProperty(this, '_groupDepth', void 0); - - this._stdout = stdout; - this._stderr = stderr; - this._formatBuffer = formatBuffer; - this._counters = {}; - this._timers = {}; - this._groupDepth = 0; - } - - _log(type, message) { - clearLine(this._stdout); - super.log( - this._formatBuffer(type, ' '.repeat(this._groupDepth) + message) - ); - } - - _logError(type, message) { - clearLine(this._stderr); - super.error( - this._formatBuffer(type, ' '.repeat(this._groupDepth) + message) - ); - } - - assert(value, message) { - try { - (0, _assert().default)(value, message); - } catch (error) { - this._logError('assert', error.toString()); - } - } - - count(label = 'default') { - if (!this._counters[label]) { - this._counters[label] = 0; - } - - this._log( - 'count', - (0, _util().format)(`${label}: ${++this._counters[label]}`) - ); - } - - countReset(label = 'default') { - this._counters[label] = 0; - } - - debug(firstArg, ...args) { - this._log('debug', (0, _util().format)(firstArg, ...args)); - } - - dir(firstArg, ...args) { - this._log('dir', (0, _util().format)(firstArg, ...args)); - } - - dirxml(firstArg, ...args) { - this._log('dirxml', (0, _util().format)(firstArg, ...args)); - } - - error(firstArg, ...args) { - this._logError('error', (0, _util().format)(firstArg, ...args)); - } - - group(title, ...args) { - this._groupDepth++; - - if (title || args.length > 0) { - this._log( - 'group', - _chalk().default.bold((0, _util().format)(title, ...args)) - ); - } - } - - groupCollapsed(title, ...args) { - this._groupDepth++; - - if (title || args.length > 0) { - this._log( - 'groupCollapsed', - _chalk().default.bold((0, _util().format)(title, ...args)) - ); - } - } - - groupEnd() { - if (this._groupDepth > 0) { - this._groupDepth--; - } - } - - info(firstArg, ...args) { - this._log('info', (0, _util().format)(firstArg, ...args)); - } - - log(firstArg, ...args) { - this._log('log', (0, _util().format)(firstArg, ...args)); - } - - time(label = 'default') { - if (this._timers[label]) { - return; - } - - this._timers[label] = new Date(); - } - - timeEnd(label = 'default') { - const startTime = this._timers[label]; - - if (startTime) { - const endTime = new Date().getTime(); - const time = endTime - startTime.getTime(); - - this._log('time', (0, _util().format)(`${label}: ${time}ms`)); - - delete this._timers[label]; - } - } - - warn(firstArg, ...args) { - this._logError('warn', (0, _util().format)(firstArg, ...args)); - } - - getBuffer() { - return undefined; - } -} - -exports.default = CustomConsole; diff --git a/node_modules/@jest/console/build/NullConsole.d.ts b/node_modules/@jest/console/build/NullConsole.d.ts deleted file mode 100644 index 29a9949b..00000000 --- a/node_modules/@jest/console/build/NullConsole.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import CustomConsole from './CustomConsole'; -export default class NullConsole extends CustomConsole { - assert(): void; - debug(): void; - dir(): void; - error(): void; - info(): void; - log(): void; - time(): void; - timeEnd(): void; - trace(): void; - warn(): void; -} -//# sourceMappingURL=NullConsole.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/console/build/NullConsole.d.ts.map b/node_modules/@jest/console/build/NullConsole.d.ts.map deleted file mode 100644 index 34ab7c8f..00000000 --- a/node_modules/@jest/console/build/NullConsole.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NullConsole.d.ts","sourceRoot":"","sources":["../src/NullConsole.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,aAAa;IACpD,MAAM;IACN,KAAK;IACL,GAAG;IACH,KAAK;IACL,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,OAAO;IACP,KAAK;IACL,IAAI;CACL"} \ No newline at end of file diff --git a/node_modules/@jest/console/build/NullConsole.js b/node_modules/@jest/console/build/NullConsole.js deleted file mode 100644 index d0feaaf6..00000000 --- a/node_modules/@jest/console/build/NullConsole.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _CustomConsole = _interopRequireDefault(require('./CustomConsole')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -class NullConsole extends _CustomConsole.default { - assert() {} - - debug() {} - - dir() {} - - error() {} - - info() {} - - log() {} - - time() {} - - timeEnd() {} - - trace() {} - - warn() {} -} - -exports.default = NullConsole; diff --git a/node_modules/@jest/console/build/getConsoleOutput.d.ts b/node_modules/@jest/console/build/getConsoleOutput.d.ts deleted file mode 100644 index f16f2f89..00000000 --- a/node_modules/@jest/console/build/getConsoleOutput.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare const _default: (root: string, verbose: boolean, buffer: import("./types").LogEntry[]) => string; -export default _default; -//# sourceMappingURL=getConsoleOutput.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/console/build/getConsoleOutput.d.ts.map b/node_modules/@jest/console/build/getConsoleOutput.d.ts.map deleted file mode 100644 index 64a22c8b..00000000 --- a/node_modules/@jest/console/build/getConsoleOutput.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getConsoleOutput.d.ts","sourceRoot":"","sources":["../src/getConsoleOutput.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAOH,wBA+BE"} \ No newline at end of file diff --git a/node_modules/@jest/console/build/getConsoleOutput.js b/node_modules/@jest/console/build/getConsoleOutput.js deleted file mode 100644 index 3774196a..00000000 --- a/node_modules/@jest/console/build/getConsoleOutput.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _slash() { - const data = _interopRequireDefault(require('slash')); - - _slash = function _slash() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var _default = (root, verbose, buffer) => { - const TITLE_INDENT = verbose ? ' ' : ' '; - const CONSOLE_INDENT = TITLE_INDENT + ' '; - return buffer.reduce((output, {type, message, origin}) => { - origin = (0, _slash().default)(_path().default.relative(root, origin)); - message = message - .split(/\n/) - .map(line => CONSOLE_INDENT + line) - .join('\n'); - let typeMessage = 'console.' + type; - - if (type === 'warn') { - message = _chalk().default.yellow(message); - typeMessage = _chalk().default.yellow(typeMessage); - } else if (type === 'error') { - message = _chalk().default.red(message); - typeMessage = _chalk().default.red(typeMessage); - } - - return ( - output + - TITLE_INDENT + - _chalk().default.dim(typeMessage) + - ' ' + - _chalk().default.dim(origin) + - '\n' + - message + - '\n' - ); - }, ''); -}; - -exports.default = _default; diff --git a/node_modules/@jest/console/build/index.d.ts b/node_modules/@jest/console/build/index.d.ts deleted file mode 100644 index 6ce9d4d3..00000000 --- a/node_modules/@jest/console/build/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export { default as BufferedConsole } from './BufferedConsole'; -export { default as CustomConsole } from './CustomConsole'; -export { default as NullConsole } from './NullConsole'; -export { default as getConsoleOutput } from './getConsoleOutput'; -export { ConsoleBuffer, LogMessage, LogType } from './types'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/console/build/index.d.ts.map b/node_modules/@jest/console/build/index.d.ts.map deleted file mode 100644 index 0015eb09..00000000 --- a/node_modules/@jest/console/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAC,aAAa,EAAE,UAAU,EAAE,OAAO,EAAC,MAAM,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/console/build/index.js b/node_modules/@jest/console/build/index.js deleted file mode 100644 index 2c5a57cf..00000000 --- a/node_modules/@jest/console/build/index.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -Object.defineProperty(exports, 'BufferedConsole', { - enumerable: true, - get: function get() { - return _BufferedConsole.default; - } -}); -Object.defineProperty(exports, 'CustomConsole', { - enumerable: true, - get: function get() { - return _CustomConsole.default; - } -}); -Object.defineProperty(exports, 'NullConsole', { - enumerable: true, - get: function get() { - return _NullConsole.default; - } -}); -Object.defineProperty(exports, 'getConsoleOutput', { - enumerable: true, - get: function get() { - return _getConsoleOutput.default; - } -}); -Object.defineProperty(exports, 'ConsoleBuffer', { - enumerable: true, - get: function get() { - return _types.ConsoleBuffer; - } -}); -Object.defineProperty(exports, 'LogMessage', { - enumerable: true, - get: function get() { - return _types.LogMessage; - } -}); -Object.defineProperty(exports, 'LogType', { - enumerable: true, - get: function get() { - return _types.LogType; - } -}); - -var _BufferedConsole = _interopRequireDefault(require('./BufferedConsole')); - -var _CustomConsole = _interopRequireDefault(require('./CustomConsole')); - -var _NullConsole = _interopRequireDefault(require('./NullConsole')); - -var _getConsoleOutput = _interopRequireDefault(require('./getConsoleOutput')); - -var _types = require('./types'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} diff --git a/node_modules/@jest/console/build/types.d.ts b/node_modules/@jest/console/build/types.d.ts deleted file mode 100644 index d006f81d..00000000 --- a/node_modules/@jest/console/build/types.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare type LogMessage = string; -export declare type LogEntry = { - message: LogMessage; - origin: string; - type: LogType; -}; -export declare type LogCounters = { - [label: string]: number; -}; -export declare type LogTimers = { - [label: string]: Date; -}; -export declare type LogType = 'assert' | 'count' | 'debug' | 'dir' | 'dirxml' | 'error' | 'group' | 'groupCollapsed' | 'info' | 'log' | 'time' | 'warn'; -export declare type ConsoleBuffer = Array; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/console/build/types.d.ts.map b/node_modules/@jest/console/build/types.d.ts.map deleted file mode 100644 index f92a5c99..00000000 --- a/node_modules/@jest/console/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oBAAY,UAAU,GAAG,MAAM,CAAC;AAEhC,oBAAY,QAAQ,GAAG;IACrB,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,oBAAY,WAAW,GAAG;IACxB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,oBAAY,OAAO,GACf,QAAQ,GACR,OAAO,GACP,OAAO,GACP,KAAK,GACL,QAAQ,GACR,OAAO,GACP,OAAO,GACP,gBAAgB,GAChB,MAAM,GACN,KAAK,GACL,MAAM,GACN,MAAM,CAAC;AAEX,oBAAY,aAAa,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/console/build/types.js b/node_modules/@jest/console/build/types.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/@jest/console/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/@jest/console/node_modules/slash/index.js b/node_modules/@jest/console/node_modules/slash/index.js deleted file mode 100644 index 75d72501..00000000 --- a/node_modules/@jest/console/node_modules/slash/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -module.exports = input => { - const isExtendedLengthPath = /^\\\\\?\\/.test(input); - const hasNonAscii = /[^\u0000-\u0080]+/.test(input); // eslint-disable-line no-control-regex - - if (isExtendedLengthPath || hasNonAscii) { - return input; - } - - return input.replace(/\\/g, '/'); -}; diff --git a/node_modules/@jest/console/node_modules/slash/license b/node_modules/@jest/console/node_modules/slash/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/@jest/console/node_modules/slash/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@jest/console/node_modules/slash/package.json b/node_modules/@jest/console/node_modules/slash/package.json deleted file mode 100644 index f3c15552..00000000 --- a/node_modules/@jest/console/node_modules/slash/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "slash@2.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "slash@2.0.0", - "_id": "slash@2.0.0", - "_inBundle": false, - "_integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "_location": "/@jest/console/slash", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "slash@2.0.0", - "name": "slash", - "escapedName": "slash", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/@jest/console" - ], - "_resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/slash/issues" - }, - "description": "Convert Windows backslash paths to slash paths", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/slash#readme", - "keywords": [ - "path", - "seperator", - "sep", - "slash", - "backslash", - "windows", - "win" - ], - "license": "MIT", - "name": "slash", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/slash.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0" -} diff --git a/node_modules/@jest/console/node_modules/slash/readme.md b/node_modules/@jest/console/node_modules/slash/readme.md deleted file mode 100644 index 5e2fedbc..00000000 --- a/node_modules/@jest/console/node_modules/slash/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# slash [![Build Status](https://travis-ci.org/sindresorhus/slash.svg?branch=master)](https://travis-ci.org/sindresorhus/slash) - -> Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar` - -[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters. - -This was created since the `path` methods in Node outputs `\\` paths on Windows. - - -## Install - -``` -$ npm install slash -``` - - -## Usage - -```js -const path = require('path'); -const slash = require('slash'); - -const str = path.join('foo', 'bar'); -// Unix => foo/bar -// Windows => foo\\bar - -slash(str); -// Unix => foo/bar -// Windows => foo/bar -``` - - -## API - -### slash(path) - -Type: `string` - -Accepts a Windows backslash path and returns a slash path. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/@jest/console/package.json b/node_modules/@jest/console/package.json deleted file mode 100644 index 04caa41c..00000000 --- a/node_modules/@jest/console/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_args": [ - [ - "@jest/console@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@jest/console@24.9.0", - "_id": "@jest/console@24.9.0", - "_inBundle": false, - "_integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", - "_location": "/@jest/console", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@jest/console@24.9.0", - "name": "@jest/console", - "escapedName": "@jest%2fconsole", - "scope": "@jest", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core", - "/@jest/test-result", - "/jest-runner", - "/jest-runtime", - "/jest-util" - ], - "_resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/source-map": "^24.9.0", - "chalk": "^2.0.1", - "slash": "^2.0.0" - }, - "devDependencies": { - "@types/slash": "^2.0.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "@jest/console", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-console" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/@jest/core/README.md b/node_modules/@jest/core/README.md deleted file mode 100644 index e5852b60..00000000 --- a/node_modules/@jest/core/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# @jest/core - -Jest is currently working on providing a programmatic API. This is under development, and usage of this package directly is currently not supported. diff --git a/node_modules/@jest/core/build/FailedTestsCache.d.ts b/node_modules/@jest/core/build/FailedTestsCache.d.ts deleted file mode 100644 index d69cc59a..00000000 --- a/node_modules/@jest/core/build/FailedTestsCache.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Test } from 'jest-runner'; -import { Config } from '@jest/types'; -import { TestResult } from '@jest/test-result'; -export default class FailedTestsCache { - private _enabledTestsMap?; - filterTests(tests: Array): Array; - setTestResults(testResults: Array): void; - updateConfig(globalConfig: Config.GlobalConfig): Config.GlobalConfig; -} -//# sourceMappingURL=FailedTestsCache.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/FailedTestsCache.d.ts.map b/node_modules/@jest/core/build/FailedTestsCache.d.ts.map deleted file mode 100644 index a7733b17..00000000 --- a/node_modules/@jest/core/build/FailedTestsCache.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FailedTestsCache.d.ts","sourceRoot":"","sources":["../src/FailedTestsCache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAI7C,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACnC,OAAO,CAAC,gBAAgB,CAAC,CAAU;IAEnC,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;IAS5C,cAAc,CAAC,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC;IAmB7C,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY;CAQrE"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/FailedTestsCache.js b/node_modules/@jest/core/build/FailedTestsCache.js deleted file mode 100644 index a062afc4..00000000 --- a/node_modules/@jest/core/build/FailedTestsCache.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -class FailedTestsCache { - constructor() { - _defineProperty(this, '_enabledTestsMap', void 0); - } - - filterTests(tests) { - const enabledTestsMap = this._enabledTestsMap; - - if (!enabledTestsMap) { - return tests; - } - - return tests.filter(testResult => enabledTestsMap[testResult.path]); - } - - setTestResults(testResults) { - this._enabledTestsMap = (testResults || []) - .filter(testResult => testResult.numFailingTests) - .reduce((suiteMap, testResult) => { - suiteMap[testResult.testFilePath] = testResult.testResults - .filter(test => test.status === 'failed') - .reduce((testMap, test) => { - testMap[test.fullName] = true; - return testMap; - }, {}); - return suiteMap; - }, {}); - this._enabledTestsMap = Object.freeze(this._enabledTestsMap); - } - - updateConfig(globalConfig) { - if (!this._enabledTestsMap) { - return globalConfig; - } - - const newConfig = _objectSpread({}, globalConfig); - - newConfig.enabledTestsMap = this._enabledTestsMap; - return Object.freeze(newConfig); - } -} - -exports.default = FailedTestsCache; diff --git a/node_modules/@jest/core/build/ReporterDispatcher.d.ts b/node_modules/@jest/core/build/ReporterDispatcher.d.ts deleted file mode 100644 index b96046ba..00000000 --- a/node_modules/@jest/core/build/ReporterDispatcher.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { AggregatedResult, TestResult } from '@jest/test-result'; -import { Test } from 'jest-runner'; -import { Context } from 'jest-runtime'; -import { Reporter, ReporterOnStartOptions } from '@jest/reporters'; -export default class ReporterDispatcher { - private _reporters; - constructor(); - register(reporter: Reporter): void; - unregister(ReporterClass: Function): void; - onTestResult(test: Test, testResult: TestResult, results: AggregatedResult): Promise; - onTestStart(test: Test): Promise; - onRunStart(results: AggregatedResult, options: ReporterOnStartOptions): Promise; - onRunComplete(contexts: Set, results: AggregatedResult): Promise; - getErrors(): Array; - hasErrors(): boolean; -} -//# sourceMappingURL=ReporterDispatcher.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/ReporterDispatcher.d.ts.map b/node_modules/@jest/core/build/ReporterDispatcher.d.ts.map deleted file mode 100644 index 2f696215..00000000 --- a/node_modules/@jest/core/build/ReporterDispatcher.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ReporterDispatcher.d.ts","sourceRoot":"","sources":["../src/ReporterDispatcher.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,gBAAgB,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,QAAQ,EAAE,sBAAsB,EAAC,MAAM,iBAAiB,CAAC;AAEjE,MAAM,CAAC,OAAO,OAAO,kBAAkB;IACrC,OAAO,CAAC,UAAU,CAAkB;;IAMpC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAIlC,UAAU,CAAC,aAAa,EAAE,QAAQ;IAM5B,YAAY,CAChB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,gBAAgB;IAarB,WAAW,CAAC,IAAI,EAAE,IAAI;IAMtB,UAAU,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,sBAAsB;IAMrE,aAAa,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,gBAAgB;IAQrE,SAAS,IAAI,KAAK,CAAC,KAAK,CAAC;IAOzB,SAAS,IAAI,OAAO;CAGrB"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/ReporterDispatcher.js b/node_modules/@jest/core/build/ReporterDispatcher.js deleted file mode 100644 index c385b6fd..00000000 --- a/node_modules/@jest/core/build/ReporterDispatcher.js +++ /dev/null @@ -1,231 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -class ReporterDispatcher { - constructor() { - _defineProperty(this, '_reporters', void 0); - - this._reporters = []; - } - - register(reporter) { - this._reporters.push(reporter); - } - - unregister(ReporterClass) { - this._reporters = this._reporters.filter( - reporter => !(reporter instanceof ReporterClass) - ); - } - - onTestResult(test, testResult, results) { - var _this = this; - - return _asyncToGenerator(function*() { - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = _this._reporters[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const reporter = _step.value; - reporter.onTestResult && - (yield reporter.onTestResult(test, testResult, results)); - } // Release memory if unused later. - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - testResult.sourceMaps = undefined; - testResult.coverage = undefined; - testResult.console = undefined; - })(); - } - - onTestStart(test) { - var _this2 = this; - - return _asyncToGenerator(function*() { - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for ( - var _iterator2 = _this2._reporters[Symbol.iterator](), _step2; - !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); - _iteratorNormalCompletion2 = true - ) { - const reporter = _step2.value; - reporter.onTestStart && (yield reporter.onTestStart(test)); - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - })(); - } - - onRunStart(results, options) { - var _this3 = this; - - return _asyncToGenerator(function*() { - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for ( - var _iterator3 = _this3._reporters[Symbol.iterator](), _step3; - !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); - _iteratorNormalCompletion3 = true - ) { - const reporter = _step3.value; - reporter.onRunStart && (yield reporter.onRunStart(results, options)); - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return != null) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - })(); - } - - onRunComplete(contexts, results) { - var _this4 = this; - - return _asyncToGenerator(function*() { - var _iteratorNormalCompletion4 = true; - var _didIteratorError4 = false; - var _iteratorError4 = undefined; - - try { - for ( - var _iterator4 = _this4._reporters[Symbol.iterator](), _step4; - !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); - _iteratorNormalCompletion4 = true - ) { - const reporter = _step4.value; - reporter.onRunComplete && - (yield reporter.onRunComplete(contexts, results)); - } - } catch (err) { - _didIteratorError4 = true; - _iteratorError4 = err; - } finally { - try { - if (!_iteratorNormalCompletion4 && _iterator4.return != null) { - _iterator4.return(); - } - } finally { - if (_didIteratorError4) { - throw _iteratorError4; - } - } - } - })(); - } // Return a list of last errors for every reporter - - getErrors() { - return this._reporters.reduce((list, reporter) => { - const error = reporter.getLastError && reporter.getLastError(); - return error ? list.concat(error) : list; - }, []); - } - - hasErrors() { - return this.getErrors().length !== 0; - } -} - -exports.default = ReporterDispatcher; diff --git a/node_modules/@jest/core/build/SearchSource.d.ts b/node_modules/@jest/core/build/SearchSource.d.ts deleted file mode 100644 index 75fe4054..00000000 --- a/node_modules/@jest/core/build/SearchSource.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Context } from 'jest-runtime'; -import { Config } from '@jest/types'; -import { Test } from 'jest-runner'; -import { ChangedFiles } from 'jest-changed-files'; -import { Filter, Stats } from './types'; -export declare type SearchResult = { - noSCM?: boolean; - stats?: Stats; - collectCoverageFrom?: Set; - tests: Array; - total?: number; -}; -export declare type TestSelectionConfig = { - input?: string; - findRelatedTests?: boolean; - onlyChanged?: boolean; - paths?: Array; - shouldTreatInputAsPattern?: boolean; - testPathPattern?: string; - watch?: boolean; -}; -export default class SearchSource { - private _context; - private _testPathCases; - constructor(context: Context); - private _filterTestPathsWithStats; - private _getAllTestPaths; - isTestFilePath(path: Config.Path): boolean; - findMatchingTests(testPathPattern?: string): SearchResult; - findRelatedTests(allPaths: Set, collectCoverage: boolean): SearchResult; - findTestsByPaths(paths: Array): SearchResult; - findRelatedTestsFromPattern(paths: Array, collectCoverage: boolean): SearchResult; - findTestRelatedToChangedFiles(changedFilesInfo: ChangedFiles, collectCoverage: boolean): SearchResult; - private _getTestPaths; - getTestPaths(globalConfig: Config.GlobalConfig, changedFiles: ChangedFiles | undefined, filter?: Filter): Promise; -} -//# sourceMappingURL=SearchSource.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/SearchSource.d.ts.map b/node_modules/@jest/core/build/SearchSource.d.ts.map deleted file mode 100644 index a1c4c30b..00000000 --- a/node_modules/@jest/core/build/SearchSource.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SearchSource.d.ts","sourceRoot":"","sources":["../src/SearchSource.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAMhD,OAAO,EAAgB,MAAM,EAAE,KAAK,EAAC,MAAM,SAAS,CAAC;AAErD,oBAAY,YAAY,GAAG;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,mBAAmB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAClC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAeF,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,cAAc,CAAqB;gBAE/B,OAAO,EAAE,OAAO;IAqC5B,OAAO,CAAC,yBAAyB;IA4CjC,OAAO,CAAC,gBAAgB;IAOxB,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO;IAI1C,iBAAiB,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,YAAY;IAIzD,gBAAgB,CACd,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,EAC1B,eAAe,EAAE,OAAO,GACvB,YAAY;IA0Df,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,YAAY;IAWzD,2BAA2B,CACzB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EACzB,eAAe,EAAE,OAAO,GACvB,YAAY;IAUf,6BAA6B,CAC3B,gBAAgB,EAAE,YAAY,EAC9B,eAAe,EAAE,OAAO;IAY1B,OAAO,CAAC,aAAa;IA6Bf,YAAY,CAChB,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,YAAY,EAAE,YAAY,GAAG,SAAS,EACtC,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,YAAY,CAAC;CA4BzB"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/SearchSource.js b/node_modules/@jest/core/build/SearchSource.js deleted file mode 100644 index 624b16a9..00000000 --- a/node_modules/@jest/core/build/SearchSource.js +++ /dev/null @@ -1,425 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _micromatch() { - const data = _interopRequireDefault(require('micromatch')); - - _micromatch = function _micromatch() { - return data; - }; - - return data; -} - -function _jestResolveDependencies() { - const data = _interopRequireDefault(require('jest-resolve-dependencies')); - - _jestResolveDependencies = function _jestResolveDependencies() { - return data; - }; - - return data; -} - -function _jestRegexUtil() { - const data = require('jest-regex-util'); - - _jestRegexUtil = function _jestRegexUtil() { - return data; - }; - - return data; -} - -function _jestConfig() { - const data = require('jest-config'); - - _jestConfig = function _jestConfig() { - return data; - }; - - return data; -} - -function _jestSnapshot() { - const data = require('jest-snapshot'); - - _jestSnapshot = function _jestSnapshot() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const globsToMatcher = globs => path => - _micromatch().default.some( - (0, _jestUtil().replacePathSepForGlob)(path), - globs, - { - dot: true - } - ); - -const regexToMatcher = testRegex => path => - testRegex.some(testRegex => new RegExp(testRegex).test(path)); - -const toTests = (context, tests) => - tests.map(path => ({ - context, - duration: undefined, - path - })); - -class SearchSource { - constructor(context) { - _defineProperty(this, '_context', void 0); - - _defineProperty(this, '_testPathCases', []); - - const config = context.config; - this._context = context; - const rootPattern = new RegExp( - config.roots - .map(dir => - (0, _jestRegexUtil().escapePathForRegex)(dir + _path().default.sep) - ) - .join('|') - ); - - this._testPathCases.push({ - isMatch: path => rootPattern.test(path), - stat: 'roots' - }); - - if (config.testMatch.length) { - this._testPathCases.push({ - isMatch: globsToMatcher(config.testMatch), - stat: 'testMatch' - }); - } - - if (config.testPathIgnorePatterns.length) { - const testIgnorePatternsRegex = new RegExp( - config.testPathIgnorePatterns.join('|') - ); - - this._testPathCases.push({ - isMatch: path => !testIgnorePatternsRegex.test(path), - stat: 'testPathIgnorePatterns' - }); - } - - if (config.testRegex.length) { - this._testPathCases.push({ - isMatch: regexToMatcher(config.testRegex), - stat: 'testRegex' - }); - } - } - - _filterTestPathsWithStats(allPaths, testPathPattern) { - const data = { - stats: { - roots: 0, - testMatch: 0, - testPathIgnorePatterns: 0, - testRegex: 0 - }, - tests: [], - total: allPaths.length - }; - const testCases = Array.from(this._testPathCases); // clone - - if (testPathPattern) { - const regex = (0, _jestUtil().testPathPatternToRegExp)(testPathPattern); - testCases.push({ - isMatch: path => regex.test(path), - stat: 'testPathPattern' - }); - data.stats.testPathPattern = 0; - } - - data.tests = allPaths.filter(test => { - let filterResult = true; - - for (var _i = 0; _i < testCases.length; _i++) { - const _testCases$_i = testCases[_i], - isMatch = _testCases$_i.isMatch, - stat = _testCases$_i.stat; - - if (isMatch(test.path)) { - data.stats[stat]++; - } else { - filterResult = false; - } - } - - return filterResult; - }); - return data; - } - - _getAllTestPaths(testPathPattern) { - return this._filterTestPathsWithStats( - toTests(this._context, this._context.hasteFS.getAllFiles()), - testPathPattern - ); - } - - isTestFilePath(path) { - return this._testPathCases.every(testCase => testCase.isMatch(path)); - } - - findMatchingTests(testPathPattern) { - return this._getAllTestPaths(testPathPattern); - } - - findRelatedTests(allPaths, collectCoverage) { - const dependencyResolver = new (_jestResolveDependencies()).default( - this._context.resolver, - this._context.hasteFS, - (0, _jestSnapshot().buildSnapshotResolver)(this._context.config) - ); - - if (!collectCoverage) { - return { - tests: toTests( - this._context, - dependencyResolver.resolveInverse( - allPaths, - this.isTestFilePath.bind(this), - { - skipNodeResolution: this._context.config.skipNodeResolution - } - ) - ) - }; - } - - const testModulesMap = dependencyResolver.resolveInverseModuleMap( - allPaths, - this.isTestFilePath.bind(this), - { - skipNodeResolution: this._context.config.skipNodeResolution - } - ); - const allPathsAbsolute = Array.from(allPaths).map(p => - _path().default.resolve(p) - ); - const collectCoverageFrom = new Set(); - testModulesMap.forEach(testModule => { - if (!testModule.dependencies) { - return; - } - - testModule.dependencies - .filter(p => allPathsAbsolute.includes(p)) - .map(filename => { - filename = (0, _jestConfig().replaceRootDirInPath)( - this._context.config.rootDir, - filename - ); - return _path().default.isAbsolute(filename) - ? _path().default.relative(this._context.config.rootDir, filename) - : filename; - }) - .forEach(filename => collectCoverageFrom.add(filename)); - }); - return { - collectCoverageFrom, - tests: toTests( - this._context, - testModulesMap.map(testModule => testModule.file) - ) - }; - } - - findTestsByPaths(paths) { - return { - tests: toTests( - this._context, - paths - .map(p => _path().default.resolve(this._context.config.cwd, p)) - .filter(this.isTestFilePath.bind(this)) - ) - }; - } - - findRelatedTestsFromPattern(paths, collectCoverage) { - if (Array.isArray(paths) && paths.length) { - const resolvedPaths = paths.map(p => - _path().default.resolve(this._context.config.cwd, p) - ); - return this.findRelatedTests(new Set(resolvedPaths), collectCoverage); - } - - return { - tests: [] - }; - } - - findTestRelatedToChangedFiles(changedFilesInfo, collectCoverage) { - const repos = changedFilesInfo.repos, - changedFiles = changedFilesInfo.changedFiles; // no SCM (git/hg/...) is found in any of the roots. - - const noSCM = Object.keys(repos).every(scm => repos[scm].size === 0); - return noSCM - ? { - noSCM: true, - tests: [] - } - : this.findRelatedTests(changedFiles, collectCoverage); - } - - _getTestPaths(globalConfig, changedFiles) { - const paths = globalConfig.nonFlagArgs; - - if (globalConfig.onlyChanged) { - if (!changedFiles) { - throw new Error('Changed files must be set when running with -o.'); - } - - return this.findTestRelatedToChangedFiles( - changedFiles, - globalConfig.collectCoverage - ); - } else if (globalConfig.runTestsByPath && paths && paths.length) { - return this.findTestsByPaths(paths); - } else if (globalConfig.findRelatedTests && paths && paths.length) { - return this.findRelatedTestsFromPattern( - paths, - globalConfig.collectCoverage - ); - } else if (globalConfig.testPathPattern != null) { - return this.findMatchingTests(globalConfig.testPathPattern); - } else { - return { - tests: [] - }; - } - } - - getTestPaths(globalConfig, changedFiles, filter) { - var _this = this; - - return _asyncToGenerator(function*() { - const searchResult = _this._getTestPaths(globalConfig, changedFiles); - - const filterPath = globalConfig.filter; - - if (filter) { - const tests = searchResult.tests; - const filterResult = yield filter(tests.map(test => test.path)); - - if (!Array.isArray(filterResult.filtered)) { - throw new Error( - `Filter ${filterPath} did not return a valid test list` - ); - } - - const filteredSet = new Set( - filterResult.filtered.map(result => result.test) - ); - return _objectSpread({}, searchResult, { - tests: tests.filter(test => filteredSet.has(test.path)) - }); - } - - return searchResult; - })(); - } -} - -exports.default = SearchSource; diff --git a/node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts b/node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts deleted file mode 100644 index c39032f2..00000000 --- a/node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { AggregatedResult, AssertionLocation } from '@jest/test-result'; -export default class SnapshotInteractiveMode { - private _pipe; - private _isActive; - private _updateTestRunnerConfig; - private _testAssertions; - private _countPaths; - private _skippedNum; - constructor(pipe: NodeJS.WritableStream); - isActive(): boolean; - getSkippedNum(): number; - private _clearTestSummary; - private _drawUIProgress; - private _drawUIDoneWithSkipped; - private _drawUIDone; - private _drawUIOverlay; - put(key: string): void; - abort(): void; - restart(): void; - updateWithResults(results: AggregatedResult): void; - private _run; - run(failedSnapshotTestAssertions: Array, onConfigChange: (assertion: AssertionLocation | null, shouldUpdateSnapshot: boolean) => unknown): void; -} -//# sourceMappingURL=SnapshotInteractiveMode.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts.map b/node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts.map deleted file mode 100644 index ac8d41e2..00000000 --- a/node_modules/@jest/core/build/SnapshotInteractiveMode.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SnapshotInteractiveMode.d.ts","sourceRoot":"","sources":["../src/SnapshotInteractiveMode.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAIH,OAAO,EAAC,gBAAgB,EAAE,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAMtE,MAAM,CAAC,OAAO,OAAO,uBAAuB;IAC1C,OAAO,CAAC,KAAK,CAAwB;IACrC,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,uBAAuB,CAGlB;IACb,OAAO,CAAC,eAAe,CAA4B;IACnD,OAAO,CAAC,WAAW,CAAU;IAC7B,OAAO,CAAC,WAAW,CAAS;gBAEhB,IAAI,EAAE,MAAM,CAAC,cAAc;IAMvC,QAAQ;IAIR,aAAa;IAIb,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,eAAe;IA0CvB,OAAO,CAAC,sBAAsB;IAiC9B,OAAO,CAAC,WAAW;IAwBnB,OAAO,CAAC,cAAc;IAYtB,GAAG,CAAC,GAAG,EAAE,MAAM;IAqCf,KAAK;IAML,OAAO;IAMP,iBAAiB,CAAC,OAAO,EAAE,gBAAgB;IAiB3C,OAAO,CAAC,IAAI;IAKZ,GAAG,CACD,4BAA4B,EAAE,KAAK,CAAC,iBAAiB,CAAC,EACtD,cAAc,EAAE,CACd,SAAS,EAAE,iBAAiB,GAAG,IAAI,EACnC,oBAAoB,EAAE,OAAO,KAC1B,OAAO;CAYf"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/SnapshotInteractiveMode.js b/node_modules/@jest/core/build/SnapshotInteractiveMode.js deleted file mode 100644 index a83386e7..00000000 --- a/node_modules/@jest/core/build/SnapshotInteractiveMode.js +++ /dev/null @@ -1,328 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _ansiEscapes() { - const data = _interopRequireDefault(require('ansi-escapes')); - - _ansiEscapes = function _ansiEscapes() { - return data; - }; - - return data; -} - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const ARROW = _jestUtil().specialChars.ARROW, - CLEAR = _jestUtil().specialChars.CLEAR; - -class SnapshotInteractiveMode { - constructor(pipe) { - _defineProperty(this, '_pipe', void 0); - - _defineProperty(this, '_isActive', void 0); - - _defineProperty(this, '_updateTestRunnerConfig', void 0); - - _defineProperty(this, '_testAssertions', void 0); - - _defineProperty(this, '_countPaths', void 0); - - _defineProperty(this, '_skippedNum', void 0); - - this._pipe = pipe; - this._isActive = false; - this._skippedNum = 0; - } - - isActive() { - return this._isActive; - } - - getSkippedNum() { - return this._skippedNum; - } - - _clearTestSummary() { - this._pipe.write(_ansiEscapes().default.cursorUp(6)); - - this._pipe.write(_ansiEscapes().default.eraseDown); - } - - _drawUIProgress() { - this._clearTestSummary(); - - const numPass = this._countPaths - this._testAssertions.length; - const numRemaining = this._countPaths - numPass - this._skippedNum; - - let stats = _chalk().default.bold.dim( - (0, _jestUtil().pluralize)('snapshot', numRemaining) + ' remaining' - ); - - if (numPass) { - stats += - ', ' + - _chalk().default.bold.green( - (0, _jestUtil().pluralize)('snapshot', numPass) + ' updated' - ); - } - - if (this._skippedNum) { - stats += - ', ' + - _chalk().default.bold.yellow( - (0, _jestUtil().pluralize)('snapshot', this._skippedNum) + ' skipped' - ); - } - - const messages = [ - '\n' + _chalk().default.bold('Interactive Snapshot Progress'), - ARROW + stats, - '\n' + _chalk().default.bold('Watch Usage'), - _chalk().default.dim(ARROW + 'Press ') + - 'u' + - _chalk().default.dim(' to update failing snapshots for this test.'), - _chalk().default.dim(ARROW + 'Press ') + - 's' + - _chalk().default.dim(' to skip the current test.'), - _chalk().default.dim(ARROW + 'Press ') + - 'q' + - _chalk().default.dim(' to quit Interactive Snapshot Mode.'), - _chalk().default.dim(ARROW + 'Press ') + - 'Enter' + - _chalk().default.dim(' to trigger a test run.') - ]; - - this._pipe.write(messages.filter(Boolean).join('\n') + '\n'); - } - - _drawUIDoneWithSkipped() { - this._pipe.write(CLEAR); - - const numPass = this._countPaths - this._testAssertions.length; - - let stats = _chalk().default.bold.dim( - (0, _jestUtil().pluralize)('snapshot', this._countPaths) + ' reviewed' - ); - - if (numPass) { - stats += - ', ' + - _chalk().default.bold.green( - (0, _jestUtil().pluralize)('snapshot', numPass) + ' updated' - ); - } - - if (this._skippedNum) { - stats += - ', ' + - _chalk().default.bold.yellow( - (0, _jestUtil().pluralize)('snapshot', this._skippedNum) + ' skipped' - ); - } - - const messages = [ - '\n' + _chalk().default.bold('Interactive Snapshot Result'), - ARROW + stats, - '\n' + _chalk().default.bold('Watch Usage'), - _chalk().default.dim(ARROW + 'Press ') + - 'r' + - _chalk().default.dim(' to restart Interactive Snapshot Mode.'), - _chalk().default.dim(ARROW + 'Press ') + - 'q' + - _chalk().default.dim(' to quit Interactive Snapshot Mode.') - ]; - - this._pipe.write(messages.filter(Boolean).join('\n') + '\n'); - } - - _drawUIDone() { - this._pipe.write(CLEAR); - - const numPass = this._countPaths - this._testAssertions.length; - - let stats = _chalk().default.bold.dim( - (0, _jestUtil().pluralize)('snapshot', this._countPaths) + ' reviewed' - ); - - if (numPass) { - stats += - ', ' + - _chalk().default.bold.green( - (0, _jestUtil().pluralize)('snapshot', numPass) + ' updated' - ); - } - - const messages = [ - '\n' + _chalk().default.bold('Interactive Snapshot Result'), - ARROW + stats, - '\n' + _chalk().default.bold('Watch Usage'), - _chalk().default.dim(ARROW + 'Press ') + - 'Enter' + - _chalk().default.dim(' to return to watch mode.') - ]; - - this._pipe.write(messages.filter(Boolean).join('\n') + '\n'); - } - - _drawUIOverlay() { - if (this._testAssertions.length === 0) { - return this._drawUIDone(); - } - - if (this._testAssertions.length - this._skippedNum === 0) { - return this._drawUIDoneWithSkipped(); - } - - return this._drawUIProgress(); - } - - put(key) { - switch (key) { - case 's': - if (this._skippedNum === this._testAssertions.length) break; - this._skippedNum += 1; // move skipped test to the end - - this._testAssertions.push(this._testAssertions.shift()); - - if (this._testAssertions.length - this._skippedNum > 0) { - this._run(false); - } else { - this._drawUIDoneWithSkipped(); - } - - break; - - case 'u': - this._run(true); - - break; - - case 'q': - case _jestWatcher().KEYS.ESCAPE: - this.abort(); - break; - - case 'r': - this.restart(); - break; - - case _jestWatcher().KEYS.ENTER: - if (this._testAssertions.length === 0) { - this.abort(); - } else { - this._run(false); - } - - break; - - default: - break; - } - } - - abort() { - this._isActive = false; - this._skippedNum = 0; - - this._updateTestRunnerConfig(null, false); - } - - restart() { - this._skippedNum = 0; - this._countPaths = this._testAssertions.length; - - this._run(false); - } - - updateWithResults(results) { - const hasSnapshotFailure = !!results.snapshot.failure; - - if (hasSnapshotFailure) { - this._drawUIOverlay(); - - return; - } - - this._testAssertions.shift(); - - if (this._testAssertions.length - this._skippedNum === 0) { - this._drawUIOverlay(); - - return; - } // Go to the next test - - this._run(false); - } - - _run(shouldUpdateSnapshot) { - const testAssertion = this._testAssertions[0]; - - this._updateTestRunnerConfig(testAssertion, shouldUpdateSnapshot); - } - - run(failedSnapshotTestAssertions, onConfigChange) { - if (!failedSnapshotTestAssertions.length) { - return; - } - - this._testAssertions = [...failedSnapshotTestAssertions]; - this._countPaths = this._testAssertions.length; - this._updateTestRunnerConfig = onConfigChange; - this._isActive = true; - - this._run(false); - } -} - -exports.default = SnapshotInteractiveMode; diff --git a/node_modules/@jest/core/build/TestNamePatternPrompt.d.ts b/node_modules/@jest/core/build/TestNamePatternPrompt.d.ts deleted file mode 100644 index 357d363d..00000000 --- a/node_modules/@jest/core/build/TestNamePatternPrompt.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { PatternPrompt, Prompt, ScrollOptions } from 'jest-watcher'; -import { TestResult } from '@jest/test-result'; -export default class TestNamePatternPrompt extends PatternPrompt { - _cachedTestResults: Array; - constructor(pipe: NodeJS.WritableStream, prompt: Prompt); - _onChange(pattern: string, options: ScrollOptions): void; - _printPrompt(pattern: string): void; - _getMatchedTests(pattern: string): string[]; - updateCachedTestResults(testResults?: Array): void; -} -//# sourceMappingURL=TestNamePatternPrompt.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/TestNamePatternPrompt.d.ts.map b/node_modules/@jest/core/build/TestNamePatternPrompt.d.ts.map deleted file mode 100644 index 41e3ebf2..00000000 --- a/node_modules/@jest/core/build/TestNamePatternPrompt.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TestNamePatternPrompt.d.ts","sourceRoot":"","sources":["../src/TestNamePatternPrompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EACL,aAAa,EACb,MAAM,EACN,aAAa,EAGd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAG7C,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,aAAa;IAC9D,kBAAkB,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;gBAE1B,IAAI,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM;IAMvD,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAKjD,YAAY,CAAC,OAAO,EAAE,MAAM;IAM5B,gBAAgB,CAAC,OAAO,EAAE,MAAM;IAsBhC,uBAAuB,CAAC,WAAW,GAAE,KAAK,CAAC,UAAU,CAAM;CAG5D"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/TestNamePatternPrompt.js b/node_modules/@jest/core/build/TestNamePatternPrompt.js deleted file mode 100644 index 292f7cc6..00000000 --- a/node_modules/@jest/core/build/TestNamePatternPrompt.js +++ /dev/null @@ -1,86 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -// TODO: Make underscored props `private` -class TestNamePatternPrompt extends _jestWatcher().PatternPrompt { - constructor(pipe, prompt) { - super(pipe, prompt); - - _defineProperty(this, '_cachedTestResults', void 0); - - this._entityName = 'tests'; - this._cachedTestResults = []; - } - - _onChange(pattern, options) { - super._onChange(pattern, options); - - this._printPrompt(pattern); - } - - _printPrompt(pattern) { - const pipe = this._pipe; - (0, _jestWatcher().printPatternCaret)(pattern, pipe); - (0, _jestWatcher().printRestoredPatternCaret)( - pattern, - this._currentUsageRows, - pipe - ); - } - - _getMatchedTests(pattern) { - let regex; - - try { - regex = new RegExp(pattern, 'i'); - } catch (e) { - return []; - } - - const matchedTests = []; - - this._cachedTestResults.forEach(({testResults}) => - testResults.forEach(({title}) => { - if (regex.test(title)) { - matchedTests.push(title); - } - }) - ); - - return matchedTests; - } - - updateCachedTestResults(testResults = []) { - this._cachedTestResults = testResults; - } -} - -exports.default = TestNamePatternPrompt; diff --git a/node_modules/@jest/core/build/TestPathPatternPrompt.d.ts b/node_modules/@jest/core/build/TestPathPatternPrompt.d.ts deleted file mode 100644 index 847c560b..00000000 --- a/node_modules/@jest/core/build/TestPathPatternPrompt.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Context } from 'jest-runtime'; -import { Test } from 'jest-runner'; -import { PatternPrompt, Prompt, ScrollOptions } from 'jest-watcher'; -import SearchSource from './SearchSource'; -declare type SearchSources = Array<{ - context: Context; - searchSource: SearchSource; -}>; -export default class TestPathPatternPrompt extends PatternPrompt { - _searchSources?: SearchSources; - constructor(pipe: NodeJS.WritableStream, prompt: Prompt); - _onChange(pattern: string, options: ScrollOptions): void; - _printPrompt(pattern: string): void; - _getMatchedTests(pattern: string): Array; - updateSearchSources(searchSources: SearchSources): void; -} -export {}; -//# sourceMappingURL=TestPathPatternPrompt.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/TestPathPatternPrompt.d.ts.map b/node_modules/@jest/core/build/TestPathPatternPrompt.d.ts.map deleted file mode 100644 index 2df9bdb2..00000000 --- a/node_modules/@jest/core/build/TestPathPatternPrompt.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TestPathPatternPrompt.d.ts","sourceRoot":"","sources":["../src/TestPathPatternPrompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EACL,aAAa,EACb,MAAM,EACN,aAAa,EAGd,MAAM,cAAc,CAAC;AACtB,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,aAAK,aAAa,GAAG,KAAK,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC,CAAC;AAGH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,aAAa;IAC9D,cAAc,CAAC,EAAE,aAAa,CAAC;gBAEnB,IAAI,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM;IAKvD,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;IAKjD,YAAY,CAAC,OAAO,EAAE,MAAM;IAM5B,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC;IAiB9C,mBAAmB,CAAC,aAAa,EAAE,aAAa;CAGjD"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/TestPathPatternPrompt.js b/node_modules/@jest/core/build/TestPathPatternPrompt.js deleted file mode 100644 index 0e54eecb..00000000 --- a/node_modules/@jest/core/build/TestPathPatternPrompt.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -// TODO: Make underscored props `private` -class TestPathPatternPrompt extends _jestWatcher().PatternPrompt { - constructor(pipe, prompt) { - super(pipe, prompt); - - _defineProperty(this, '_searchSources', void 0); - - this._entityName = 'filenames'; - } - - _onChange(pattern, options) { - super._onChange(pattern, options); - - this._printPrompt(pattern); - } - - _printPrompt(pattern) { - const pipe = this._pipe; - (0, _jestWatcher().printPatternCaret)(pattern, pipe); - (0, _jestWatcher().printRestoredPatternCaret)( - pattern, - this._currentUsageRows, - pipe - ); - } - - _getMatchedTests(pattern) { - let regex; - - try { - regex = new RegExp(pattern, 'i'); - } catch (e) {} - - let tests = []; - - if (regex && this._searchSources) { - this._searchSources.forEach(({searchSource}) => { - tests = tests.concat(searchSource.findMatchingTests(pattern).tests); - }); - } - - return tests; - } - - updateSearchSources(searchSources) { - this._searchSources = searchSources; - } -} - -exports.default = TestPathPatternPrompt; diff --git a/node_modules/@jest/core/build/TestScheduler.d.ts b/node_modules/@jest/core/build/TestScheduler.d.ts deleted file mode 100644 index e341a192..00000000 --- a/node_modules/@jest/core/build/TestScheduler.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { Test } from 'jest-runner'; -import { Reporter } from '@jest/reporters'; -import { AggregatedResult } from '@jest/test-result'; -import TestWatcher from './TestWatcher'; -export declare type TestSchedulerOptions = { - startRun: (globalConfig: Config.GlobalConfig) => void; -}; -export declare type TestSchedulerContext = { - firstRun: boolean; - previousSuccess: boolean; - changedFiles?: Set; -}; -export default class TestScheduler { - private _dispatcher; - private _globalConfig; - private _options; - private _context; - constructor(globalConfig: Config.GlobalConfig, options: TestSchedulerOptions, context: TestSchedulerContext); - addReporter(reporter: Reporter): void; - removeReporter(ReporterClass: Function): void; - scheduleTests(tests: Array, watcher: TestWatcher): Promise; - private _partitionTests; - private _shouldAddDefaultReporters; - private _setupReporters; - private _setupDefaultReporters; - private _addCustomReporters; - /** - * Get properties of a reporter in an object - * to make dealing with them less painful. - */ - private _getReporterProps; - private _bailIfNeeded; -} -//# sourceMappingURL=TestScheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/TestScheduler.d.ts.map b/node_modules/@jest/core/build/TestScheduler.d.ts.map deleted file mode 100644 index 95946643..00000000 --- a/node_modules/@jest/core/build/TestScheduler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TestScheduler.d.ts","sourceRoot":"","sources":["../src/TestScheduler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,OAAmB,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AAE7C,OAAO,EAML,QAAQ,EACT,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAEL,gBAAgB,EAKjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,WAAW,MAAM,eAAe,CAAC;AAOxC,oBAAY,oBAAoB,GAAG;IACjC,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,YAAY,KAAK,IAAI,CAAC;CACvD,CAAC;AACF,oBAAY,oBAAoB,GAAG;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CACjC,CAAC;AACF,MAAM,CAAC,OAAO,OAAO,aAAa;IAChC,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,QAAQ,CAAuB;gBAGrC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,oBAAoB;IAS/B,WAAW,CAAC,QAAQ,EAAE,QAAQ;IAI9B,cAAc,CAAC,aAAa,EAAE,QAAQ;IAIhC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,WAAW;IAsJ5D,OAAO,CAAC,eAAe;IAuBvB,OAAO,CAAC,0BAA0B;IAWlC,OAAO,CAAC,eAAe;IA+BvB,OAAO,CAAC,sBAAsB;IAkB9B,OAAO,CAAC,mBAAmB;IAsB3B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,aAAa;CAsBtB"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/TestScheduler.js b/node_modules/@jest/core/build/TestScheduler.js deleted file mode 100644 index 98f8d996..00000000 --- a/node_modules/@jest/core/build/TestScheduler.js +++ /dev/null @@ -1,563 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _jestMessageUtil() { - const data = require('jest-message-util'); - - _jestMessageUtil = function _jestMessageUtil() { - return data; - }; - - return data; -} - -function _jestSnapshot() { - const data = _interopRequireDefault(require('jest-snapshot')); - - _jestSnapshot = function _jestSnapshot() { - return data; - }; - - return data; -} - -function _jestRunner() { - const data = _interopRequireDefault(require('jest-runner')); - - _jestRunner = function _jestRunner() { - return data; - }; - - return data; -} - -function _reporters() { - const data = require('@jest/reporters'); - - _reporters = function _reporters() { - return data; - }; - - return data; -} - -function _exit() { - const data = _interopRequireDefault(require('exit')); - - _exit = function _exit() { - return data; - }; - - return data; -} - -function _testResult() { - const data = require('@jest/test-result'); - - _testResult = function _testResult() { - return data; - }; - - return data; -} - -var _ReporterDispatcher = _interopRequireDefault( - require('./ReporterDispatcher') -); - -var _testSchedulerHelper = require('./testSchedulerHelper'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest() - ); -} - -function _nonIterableRest() { - throw new TypeError('Invalid attempt to destructure non-iterable instance'); -} - -function _iterableToArrayLimit(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - try { - for ( - var _i = arr[Symbol.iterator](), _s; - !(_n = (_s = _i.next()).done); - _n = true - ) { - _arr.push(_s.value); - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i['return'] != null) _i['return'](); - } finally { - if (_d) throw _e; - } - } - return _arr; -} - -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -// The default jest-runner is required because it is the default test runner -// and required implicitly through the `runner` ProjectConfig option. -_jestRunner().default; - -class TestScheduler { - constructor(globalConfig, options, context) { - _defineProperty(this, '_dispatcher', void 0); - - _defineProperty(this, '_globalConfig', void 0); - - _defineProperty(this, '_options', void 0); - - _defineProperty(this, '_context', void 0); - - this._dispatcher = new _ReporterDispatcher.default(); - this._globalConfig = globalConfig; - this._options = options; - this._context = context; - - this._setupReporters(); - } - - addReporter(reporter) { - this._dispatcher.register(reporter); - } - - removeReporter(ReporterClass) { - this._dispatcher.unregister(ReporterClass); - } - - scheduleTests(tests, watcher) { - var _this = this; - - return _asyncToGenerator(function*() { - const onStart = _this._dispatcher.onTestStart.bind(_this._dispatcher); - - const timings = []; - const contexts = new Set(); - tests.forEach(test => { - contexts.add(test.context); - - if (test.duration) { - timings.push(test.duration); - } - }); - const aggregatedResults = createAggregatedResults(tests.length); - const estimatedTime = Math.ceil( - getEstimatedTime(timings, _this._globalConfig.maxWorkers) / 1000 - ); - const runInBand = (0, _testSchedulerHelper.shouldRunInBand)( - tests, - timings, - _this._globalConfig - ); - - const onResult = - /*#__PURE__*/ - (function() { - var _ref = _asyncToGenerator(function*(test, testResult) { - if (watcher.isInterrupted()) { - return Promise.resolve(); - } - - if (testResult.testResults.length === 0) { - const message = 'Your test suite must contain at least one test.'; - return onFailure(test, { - message, - stack: new Error(message).stack - }); - } // Throws when the context is leaked after executing a test. - - if (testResult.leaks) { - const message = - _chalk().default.red.bold('EXPERIMENTAL FEATURE!\n') + - 'Your test suite is leaking memory. Please ensure all references are cleaned.\n' + - '\n' + - 'There is a number of things that can leak memory:\n' + - ' - Async operations that have not finished (e.g. fs.readFile).\n' + - ' - Timers not properly mocked (e.g. setInterval, setTimeout).\n' + - ' - Keeping references to the global scope.'; - return onFailure(test, { - message, - stack: new Error(message).stack - }); - } - - (0, _testResult().addResult)(aggregatedResults, testResult); - yield _this._dispatcher.onTestResult( - test, - testResult, - aggregatedResults - ); - return _this._bailIfNeeded(contexts, aggregatedResults, watcher); - }); - - return function onResult(_x, _x2) { - return _ref.apply(this, arguments); - }; - })(); - - const onFailure = - /*#__PURE__*/ - (function() { - var _ref2 = _asyncToGenerator(function*(test, error) { - if (watcher.isInterrupted()) { - return; - } - - const testResult = (0, _testResult().buildFailureTestResult)( - test.path, - error - ); - testResult.failureMessage = (0, _jestMessageUtil().formatExecError)( - testResult.testExecError, - test.context.config, - _this._globalConfig, - test.path - ); - (0, _testResult().addResult)(aggregatedResults, testResult); - yield _this._dispatcher.onTestResult( - test, - testResult, - aggregatedResults - ); - }); - - return function onFailure(_x3, _x4) { - return _ref2.apply(this, arguments); - }; - })(); - - const updateSnapshotState = () => { - contexts.forEach(context => { - const status = _jestSnapshot().default.cleanup( - context.hasteFS, - _this._globalConfig.updateSnapshot, - _jestSnapshot().default.buildSnapshotResolver(context.config), - context.config.testPathIgnorePatterns - ); - - aggregatedResults.snapshot.filesRemoved += status.filesRemoved; - aggregatedResults.snapshot.filesRemovedList = ( - aggregatedResults.snapshot.filesRemovedList || [] - ).concat(status.filesRemovedList); - }); - const updateAll = _this._globalConfig.updateSnapshot === 'all'; - aggregatedResults.snapshot.didUpdate = updateAll; - aggregatedResults.snapshot.failure = !!( - !updateAll && - (aggregatedResults.snapshot.unchecked || - aggregatedResults.snapshot.unmatched || - aggregatedResults.snapshot.filesRemoved) - ); - }; - - yield _this._dispatcher.onRunStart(aggregatedResults, { - estimatedTime, - showStatus: !runInBand - }); - const testRunners = Object.create(null); - contexts.forEach(({config}) => { - if (!testRunners[config.runner]) { - const Runner = require(config.runner); - - testRunners[config.runner] = new Runner(_this._globalConfig, { - changedFiles: _this._context && _this._context.changedFiles - }); - } - }); - - const testsByRunner = _this._partitionTests(testRunners, tests); - - if (testsByRunner) { - try { - var _arr = Object.keys(testRunners); - - for (var _i = 0; _i < _arr.length; _i++) { - const runner = _arr[_i]; - yield testRunners[runner].runTests( - testsByRunner[runner], - watcher, - onStart, - onResult, - onFailure, - { - serial: runInBand || Boolean(testRunners[runner].isSerial) - } - ); - } - } catch (error) { - if (!watcher.isInterrupted()) { - throw error; - } - } - } - - updateSnapshotState(); - aggregatedResults.wasInterrupted = watcher.isInterrupted(); - yield _this._dispatcher.onRunComplete(contexts, aggregatedResults); - const anyTestFailures = !( - aggregatedResults.numFailedTests === 0 && - aggregatedResults.numRuntimeErrorTestSuites === 0 - ); - - const anyReporterErrors = _this._dispatcher.hasErrors(); - - aggregatedResults.success = !( - anyTestFailures || - aggregatedResults.snapshot.failure || - anyReporterErrors - ); - return aggregatedResults; - })(); - } - - _partitionTests(testRunners, tests) { - if (Object.keys(testRunners).length > 1) { - return tests.reduce((testRuns, test) => { - const runner = test.context.config.runner; - - if (!testRuns[runner]) { - testRuns[runner] = []; - } - - testRuns[runner].push(test); - return testRuns; - }, Object.create(null)); - } else if (tests.length > 0 && tests[0] != null) { - // If there is only one runner, don't partition the tests. - return Object.assign(Object.create(null), { - [tests[0].context.config.runner]: tests - }); - } else { - return null; - } - } - - _shouldAddDefaultReporters(reporters) { - return ( - !reporters || - !!reporters.find( - reporter => this._getReporterProps(reporter).path === 'default' - ) - ); - } - - _setupReporters() { - const _this$_globalConfig = this._globalConfig, - collectCoverage = _this$_globalConfig.collectCoverage, - notify = _this$_globalConfig.notify, - reporters = _this$_globalConfig.reporters; - - const isDefault = this._shouldAddDefaultReporters(reporters); - - if (isDefault) { - this._setupDefaultReporters(collectCoverage); - } - - if (!isDefault && collectCoverage) { - this.addReporter( - new (_reporters()).CoverageReporter(this._globalConfig, { - changedFiles: this._context && this._context.changedFiles - }) - ); - } - - if (notify) { - this.addReporter( - new (_reporters()).NotifyReporter( - this._globalConfig, - this._options.startRun, - this._context - ) - ); - } - - if (reporters && Array.isArray(reporters)) { - this._addCustomReporters(reporters); - } - } - - _setupDefaultReporters(collectCoverage) { - this.addReporter( - this._globalConfig.verbose - ? new (_reporters()).VerboseReporter(this._globalConfig) - : new (_reporters()).DefaultReporter(this._globalConfig) - ); - - if (collectCoverage) { - this.addReporter( - new (_reporters()).CoverageReporter(this._globalConfig, { - changedFiles: this._context && this._context.changedFiles - }) - ); - } - - this.addReporter(new (_reporters()).SummaryReporter(this._globalConfig)); - } - - _addCustomReporters(reporters) { - reporters.forEach(reporter => { - const _this$_getReporterPro = this._getReporterProps(reporter), - options = _this$_getReporterPro.options, - path = _this$_getReporterPro.path; - - if (path === 'default') return; - - try { - const Reporter = require(path); - - this.addReporter(new Reporter(this._globalConfig, options)); - } catch (error) { - throw new Error( - 'An error occurred while adding the reporter at path "' + - path + - '".' + - error.message - ); - } - }); - } - /** - * Get properties of a reporter in an object - * to make dealing with them less painful. - */ - - _getReporterProps(reporter) { - if (typeof reporter === 'string') { - return { - options: this._options, - path: reporter - }; - } else if (Array.isArray(reporter)) { - const _reporter = _slicedToArray(reporter, 2), - path = _reporter[0], - options = _reporter[1]; - - return { - options, - path - }; - } - - throw new Error('Reporter should be either a string or an array'); - } - - _bailIfNeeded(contexts, aggregatedResults, watcher) { - if ( - this._globalConfig.bail !== 0 && - aggregatedResults.numFailedTests >= this._globalConfig.bail - ) { - if (watcher.isWatchMode()) { - watcher.setState({ - interrupted: true - }); - } else { - const failureExit = () => (0, _exit().default)(1); - - return this._dispatcher - .onRunComplete(contexts, aggregatedResults) - .then(failureExit) - .catch(failureExit); - } - } - - return Promise.resolve(); - } -} - -exports.default = TestScheduler; - -const createAggregatedResults = numTotalTestSuites => { - const result = (0, _testResult().makeEmptyAggregatedTestResult)(); - result.numTotalTestSuites = numTotalTestSuites; - result.startTime = Date.now(); - result.success = false; - return result; -}; - -const getEstimatedTime = (timings, workers) => { - if (!timings.length) { - return 0; - } - - const max = Math.max.apply(null, timings); - return timings.length <= workers - ? max - : Math.max(timings.reduce((sum, time) => sum + time) / workers, max); -}; diff --git a/node_modules/@jest/core/build/TestWatcher.d.ts b/node_modules/@jest/core/build/TestWatcher.d.ts deleted file mode 100644 index 1855935f..00000000 --- a/node_modules/@jest/core/build/TestWatcher.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { EventEmitter } from 'events'; -declare type State = { - interrupted: boolean; -}; -export default class TestWatcher extends EventEmitter { - state: State; - private _isWatchMode; - constructor({ isWatchMode }: { - isWatchMode: boolean; - }); - setState(state: State): void; - isInterrupted(): boolean; - isWatchMode(): boolean; -} -export {}; -//# sourceMappingURL=TestWatcher.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/TestWatcher.d.ts.map b/node_modules/@jest/core/build/TestWatcher.d.ts.map deleted file mode 100644 index 0714f384..00000000 --- a/node_modules/@jest/core/build/TestWatcher.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TestWatcher.d.ts","sourceRoot":"","sources":["../src/TestWatcher.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAEpC,aAAK,KAAK,GAAG;IACX,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,YAAY;IACnD,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,YAAY,CAAU;gBAElB,EAAC,WAAW,EAAC,EAAE;QAAC,WAAW,EAAE,OAAO,CAAA;KAAC;IAMjD,QAAQ,CAAC,KAAK,EAAE,KAAK;IAKrB,aAAa;IAIb,WAAW;CAGZ"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/TestWatcher.js b/node_modules/@jest/core/build/TestWatcher.js deleted file mode 100644 index a82c4dc0..00000000 --- a/node_modules/@jest/core/build/TestWatcher.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _events() { - const data = require('events'); - - _events = function _events() { - return data; - }; - - return data; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class TestWatcher extends _events().EventEmitter { - constructor({isWatchMode}) { - super(); - - _defineProperty(this, 'state', void 0); - - _defineProperty(this, '_isWatchMode', void 0); - - this.state = { - interrupted: false - }; - this._isWatchMode = isWatchMode; - } - - setState(state) { - Object.assign(this.state, state); - this.emit('change', this.state); - } - - isInterrupted() { - return this.state.interrupted; - } - - isWatchMode() { - return this._isWatchMode; - } -} - -exports.default = TestWatcher; diff --git a/node_modules/@jest/core/build/assets/jest_logo.png b/node_modules/@jest/core/build/assets/jest_logo.png deleted file mode 100644 index 079356bc1611ac3e6016552af1fb4c9339b8165a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3157 zcmV-b465^qP)rw-zqxRs*s6fe_u~mLfT5 z(F6l``ZnC@iAxPC;di&Y2Bz^;igcrC7_exAk?vFpcS@hKAmR=t{{HsvxDf|kU#Ax- zhVyw0STw=d?lc=<8jhcf*qz$5^3~CsM@8mFv#xQYLJU^4UCDN*ukx^IYEL(|`V#*T zz6G4VZ?b;2^+8n=e;^{D4JT7%Q8!hV5wQS9x>Gr3x4fjfOUQg?#2Xyxs=x5Yd)JHv(ZEbgLoG+U@%JN|Cj=U>|{P}8r+F%jG&{QlC7zsgSDhLNz~~F z)Sf@z8SuW`g=?f6rAsKW2xfr!z%Od0oJ_%`ItR%hnFvs>kUmAq0o3v>aiQD~U`E1? zViF8o%6w!#+$n3$GXK_cK1-(BM04NuByQfP8{1UUAMfaLA7?E9RZ6iNeJqwO#&)N1 z0MmRfLj{N}u$DLVl`Eg+`&csNS8Pq_a&O+EYuqRmQ1}|lVBk)l#xf%Vu(J%olGYMu z?ip%Z4ZC8JmDyU-awM4H=AJ=)3dY(e>K7>()Dq^Ji;?G=106eY*LZ0yUeXs3BZSpd z+yCoE|F}oq`#R~PeP%Im0ak#&9}pp!LAEqY@Qownh%3@pEinCr z)zkrO(W=cHYk0w1g1Jll?7&_FV*&XoX%DH1^nz0AIjt1e6&o>?hpUB%FZj?ulTMSa zn#E~#<;54&)mL7Y9osLVK*DP70hq@x)GMB`b5)GWnp!Jq9qAKrCwyOb!2k*#7O#Uh zg>_WG2{I*k8|j>VztAjG{QGmq#-Yah@`bO>N z`z8W(cfsJr%dm_1SaqGMNjjvD-aJ|-&`Me&>BQX=b>r!D{b+TqPZ28fv)5TKm(SaQ z=P{6yjk_s}-0K9*INCWle&={yd*rO*f1`%Z{9QiJ8nirA!H-{T(8cR^D9%c}3&G!a zZp=*GPMd7xW?tj2+`bd>3ZB)8j~f%z3?+Z*hJfXFb;3beH#CbShJNCC-{_nKD$O0w zn6V__^Qw05mszP+TCxE2H)DBTf}$8gpy#!u=E&!z!U`h=gHBDvXf&Km4LXzM5qhw& zLK)NL_8U9J3+wBsPB;|wdGWu!O+S!d4%gBikH^`3e<(S5D9b$W5S~}DJt^q(j@&d- zGdxt$q)!7*cPwT6J-L#fVP&Sv zh%LwO7#He!?DBHp{)U0;4w$n5bKUnvK*K2enf5nzY z%R=9JsJQAC^E}@H6Q_cyI{ttx1Mceyn4_}Ds!`Ud*Y93;Yf%CoHWK)N!3XZzXY>Tjdr6J5 zvgEW(BcST(qaH51;QT$7DY3Q+Yw-i-J*ZSMg6+Ab>hhses{Ujutb{w^bf%0fCzy-u z{mWf6D7Ap&Tpy-qa0Y72D&%LNl9m>eZ&mma&z0Z;rvl7H01NFTkAegtgy*4ftS~G7 zKEBxE4i&E01OP#`@9+0$o>BlpATew)5Bqh*!PhFke~w8W#SqnWE|aXJ#u**cDQzt3 zIvW6F!5Lz%8*o-dx&jw8^H|^^p1N9FAWw5#4Oww?dyd~>(;veqdmA76w^1+Ma2mX1l z6R+gopBXt#x>J>Or%1EXx3D50qdwOR8ZS_)9`*k1xo~&7PzJO-`!4NI()`rUWgP7tYs2L zmZt2=$^yK;ff(~L>3slUEj{A**P+G%loNN3cMS-{^C^)$VuB5ft1d7=RYN}D`CU@a3049I;B8)2NHIcRm+Fki4*&OP41O1`zw z-7IPqFUJ(5VV8wzflSv+!mVSZ8{Li(rUfb$@H|{ji8Re;NIxU}mQ+B}!gW;L(Q_K7 zG+h=F2If`x=C2|HhYd!~f{WK|S0Pr#BpfuHW$}{5(R^rSRA4}SFo~uKT9gUN@5FrZXg+@kMs`XP1*Zir<2B;c9gYI zcC5ZfQ;1~+vM8m)jWmYzfv`?GM3AmGAYGSi*oAcM+C(pN)-tZFrCa!{-jg%~s3sjJ ztt8!R{_o{G0mEJj=?yS9!D9FW-2lRC$Gl?4)v<94+cF+Bv;BL_a>%-;^0nXHGK%A z&L5EbNz*ZFmrJG+K%n)Xz6SGok_T49n_In;X7AFx@(&OrqU}Q~${cDCpDU*sQK8zEtyHJK% z%BKthWta;b=F vcX%i|9Kn(L{|zt_P@vA@JWOa9u?^ -import { Config } from '@jest/types'; -import { AggregatedResult } from '@jest/test-result'; -export declare const runCLI: (argv: import("yargs").Arguments>, projects: string[]) => Promise<{ - results: AggregatedResult; - globalConfig: Config.GlobalConfig; -}>; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/cli/index.d.ts.map b/node_modules/@jest/core/build/cli/index.d.ts.map deleted file mode 100644 index bddb8e86..00000000 --- a/node_modules/@jest/core/build/cli/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAyBnD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8ElB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/cli/index.js b/node_modules/@jest/core/build/cli/index.js deleted file mode 100644 index 3520f731..00000000 --- a/node_modules/@jest/core/build/cli/index.js +++ /dev/null @@ -1,471 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.runCLI = void 0; - -function _console() { - const data = require('@jest/console'); - - _console = function _console() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _jestConfig() { - const data = require('jest-config'); - - _jestConfig = function _jestConfig() { - return data; - }; - - return data; -} - -function _jestRuntime() { - const data = _interopRequireDefault(require('jest-runtime')); - - _jestRuntime = function _jestRuntime() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _rimraf() { - const data = _interopRequireDefault(require('rimraf')); - - _rimraf = function _rimraf() { - return data; - }; - - return data; -} - -function _exit() { - const data = _interopRequireDefault(require('exit')); - - _exit = function _exit() { - return data; - }; - - return data; -} - -var _create_context = _interopRequireDefault(require('../lib/create_context')); - -var _getChangedFilesPromise = _interopRequireDefault( - require('../getChangedFilesPromise') -); - -var _collectHandles = require('../collectHandles'); - -var _handle_deprecation_warnings = _interopRequireDefault( - require('../lib/handle_deprecation_warnings') -); - -var _runJest = _interopRequireDefault(require('../runJest')); - -var _TestWatcher = _interopRequireDefault(require('../TestWatcher')); - -var _watch = _interopRequireDefault(require('../watch')); - -var _pluralize = _interopRequireDefault(require('../pluralize')); - -var _log_debug_messages = _interopRequireDefault( - require('../lib/log_debug_messages') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -const preRunMessagePrint = _jestUtil().preRunMessage.print; - -const runCLI = - /*#__PURE__*/ - (function() { - var _ref = _asyncToGenerator(function*(argv, projects) { - const realFs = require('fs'); - - const fs = require('graceful-fs'); - - fs.gracefulify(realFs); - let results; // If we output a JSON object, we can't write anything to stdout, since - // it'll break the JSON structure and it won't be valid. - - const outputStream = - argv.json || argv.useStderr ? process.stderr : process.stdout; - - const _readConfigs = (0, _jestConfig().readConfigs)(argv, projects), - globalConfig = _readConfigs.globalConfig, - configs = _readConfigs.configs, - hasDeprecationWarnings = _readConfigs.hasDeprecationWarnings; - - if (argv.debug) { - (0, _log_debug_messages.default)(globalConfig, configs, outputStream); - } - - if (argv.showConfig) { - (0, _log_debug_messages.default)(globalConfig, configs, process.stdout); - (0, _exit().default)(0); - } - - if (argv.clearCache) { - configs.forEach(config => { - _rimraf().default.sync(config.cacheDirectory); - - process.stdout.write(`Cleared ${config.cacheDirectory}\n`); - }); - (0, _exit().default)(0); - } - - yield _run( - globalConfig, - configs, - hasDeprecationWarnings, - outputStream, - r => (results = r) - ); - - if (argv.watch || argv.watchAll) { - // If in watch mode, return the promise that will never resolve. - // If the watch mode is interrupted, watch should handle the process - // shutdown. - return new Promise(() => {}); - } - - if (!results) { - throw new Error( - 'AggregatedResult must be present after test run is complete' - ); - } - - const _results = results, - openHandles = _results.openHandles; - - if (openHandles && openHandles.length) { - const formatted = (0, _collectHandles.formatHandleErrors)( - openHandles, - configs[0] - ); - const openHandlesString = (0, _pluralize.default)( - 'open handle', - formatted.length, - 's' - ); - const message = - _chalk().default.red( - `\nJest has detected the following ${openHandlesString} potentially keeping Jest from exiting:\n\n` - ) + formatted.join('\n\n'); - console.error(message); - } - - return { - globalConfig, - results - }; - }); - - return function runCLI(_x, _x2) { - return _ref.apply(this, arguments); - }; - })(); - -exports.runCLI = runCLI; - -const buildContextsAndHasteMaps = - /*#__PURE__*/ - (function() { - var _ref2 = _asyncToGenerator(function*( - configs, - globalConfig, - outputStream - ) { - const hasteMapInstances = Array(configs.length); - const contexts = yield Promise.all( - configs.map( - /*#__PURE__*/ - (function() { - var _ref3 = _asyncToGenerator(function*(config, index) { - (0, _jestUtil().createDirectory)(config.cacheDirectory); - - const hasteMapInstance = _jestRuntime().default.createHasteMap( - config, - { - console: new (_console()).CustomConsole( - outputStream, - outputStream - ), - maxWorkers: globalConfig.maxWorkers, - resetCache: !config.cache, - watch: globalConfig.watch || globalConfig.watchAll, - watchman: globalConfig.watchman - } - ); - - hasteMapInstances[index] = hasteMapInstance; - return (0, - _create_context.default)(config, yield hasteMapInstance.build()); - }); - - return function(_x6, _x7) { - return _ref3.apply(this, arguments); - }; - })() - ) - ); - return { - contexts, - hasteMapInstances - }; - }); - - return function buildContextsAndHasteMaps(_x3, _x4, _x5) { - return _ref2.apply(this, arguments); - }; - })(); - -const _run = - /*#__PURE__*/ - (function() { - var _ref4 = _asyncToGenerator(function*( - globalConfig, - configs, - hasDeprecationWarnings, - outputStream, - onComplete - ) { - // Queries to hg/git can take a while, so we need to start the process - // as soon as possible, so by the time we need the result it's already there. - const changedFilesPromise = (0, _getChangedFilesPromise.default)( - globalConfig, - configs - ); // Filter may need to do an HTTP call or something similar to setup. - // We will wait on an async response from this before using the filter. - - let filter; - - if (globalConfig.filter && !globalConfig.skipFilter) { - const rawFilter = require(globalConfig.filter); - - let filterSetupPromise; - - if (rawFilter.setup) { - // Wrap filter setup Promise to avoid "uncaught Promise" error. - // If an error is returned, we surface it in the return value. - filterSetupPromise = _asyncToGenerator(function*() { - try { - yield rawFilter.setup(); - } catch (err) { - return err; - } - - return undefined; - })(); - } - - filter = - /*#__PURE__*/ - (function() { - var _ref6 = _asyncToGenerator(function*(testPaths) { - if (filterSetupPromise) { - // Expect an undefined return value unless there was an error. - const err = yield filterSetupPromise; - - if (err) { - throw err; - } - } - - return rawFilter(testPaths); - }); - - return function filter(_x13) { - return _ref6.apply(this, arguments); - }; - })(); - } - - const _ref7 = yield buildContextsAndHasteMaps( - configs, - globalConfig, - outputStream - ), - contexts = _ref7.contexts, - hasteMapInstances = _ref7.hasteMapInstances; - - globalConfig.watch || globalConfig.watchAll - ? yield runWatch( - contexts, - configs, - hasDeprecationWarnings, - globalConfig, - outputStream, - hasteMapInstances, - filter - ) - : yield runWithoutWatch( - globalConfig, - contexts, - outputStream, - onComplete, - changedFilesPromise, - filter - ); - }); - - return function _run(_x8, _x9, _x10, _x11, _x12) { - return _ref4.apply(this, arguments); - }; - })(); - -const runWatch = - /*#__PURE__*/ - (function() { - var _ref8 = _asyncToGenerator(function*( - contexts, - _configs, - hasDeprecationWarnings, - globalConfig, - outputStream, - hasteMapInstances, - filter - ) { - if (hasDeprecationWarnings) { - try { - yield (0, _handle_deprecation_warnings.default)( - outputStream, - process.stdin - ); - return (0, _watch.default)( - globalConfig, - contexts, - outputStream, - hasteMapInstances, - undefined, - undefined, - filter - ); - } catch (e) { - (0, _exit().default)(0); - } - } - - return (0, _watch.default)( - globalConfig, - contexts, - outputStream, - hasteMapInstances, - undefined, - undefined, - filter - ); - }); - - return function runWatch(_x14, _x15, _x16, _x17, _x18, _x19, _x20) { - return _ref8.apply(this, arguments); - }; - })(); - -const runWithoutWatch = - /*#__PURE__*/ - (function() { - var _ref9 = _asyncToGenerator(function*( - globalConfig, - contexts, - outputStream, - onComplete, - changedFilesPromise, - filter - ) { - const startRun = - /*#__PURE__*/ - (function() { - var _ref10 = _asyncToGenerator(function*() { - if (!globalConfig.listTests) { - preRunMessagePrint(outputStream); - } - - return (0, _runJest.default)({ - changedFilesPromise, - contexts, - failedTestsCache: undefined, - filter, - globalConfig, - onComplete, - outputStream, - startRun, - testWatcher: new _TestWatcher.default({ - isWatchMode: false - }) - }); - }); - - return function startRun() { - return _ref10.apply(this, arguments); - }; - })(); - - return startRun(); - }); - - return function runWithoutWatch(_x21, _x22, _x23, _x24, _x25, _x26) { - return _ref9.apply(this, arguments); - }; - })(); diff --git a/node_modules/@jest/core/build/collectHandles.d.ts b/node_modules/@jest/core/build/collectHandles.d.ts deleted file mode 100644 index 6005498d..00000000 --- a/node_modules/@jest/core/build/collectHandles.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export default function collectHandles(): () => Array; -export declare function formatHandleErrors(errors: Array, config: Config.ProjectConfig): Array; -//# sourceMappingURL=collectHandles.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/collectHandles.d.ts.map b/node_modules/@jest/core/build/collectHandles.d.ts.map deleted file mode 100644 index fc73af85..00000000 --- a/node_modules/@jest/core/build/collectHandles.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"collectHandles.d.ts","sourceRoot":"","sources":["../src/collectHandles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AA+BnC,MAAM,CAAC,OAAO,UAAU,cAAc,IAAI,MAAM,KAAK,CAAC,KAAK,CAAC,CA0C3D;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,EACpB,MAAM,EAAE,MAAM,CAAC,aAAa,GAC3B,KAAK,CAAC,MAAM,CAAC,CA8Bf"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/collectHandles.js b/node_modules/@jest/core/build/collectHandles.js deleted file mode 100644 index 4dc0d2ab..00000000 --- a/node_modules/@jest/core/build/collectHandles.js +++ /dev/null @@ -1,149 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = collectHandles; -exports.formatHandleErrors = formatHandleErrors; - -function _jestMessageUtil() { - const data = require('jest-message-util'); - - _jestMessageUtil = function _jestMessageUtil() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _stripAnsi() { - const data = _interopRequireDefault(require('strip-ansi')); - - _stripAnsi = function _stripAnsi() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function stackIsFromUser(stack) { - // Either the test file, or something required by it - if (stack.includes('Runtime.requireModule')) { - return true; - } // jest-jasmine it or describe call - - if (stack.includes('asyncJestTest') || stack.includes('asyncJestLifecycle')) { - return true; - } // An async function call from within circus - - if (stack.includes('callAsyncCircusFn')) { - // jest-circus it or describe call - return ( - stack.includes('_callCircusTest') || stack.includes('_callCircusHook') - ); - } - - return false; -} // Inspired by https://github.com/mafintosh/why-is-node-running/blob/master/index.js -// Extracted as we want to format the result ourselves - -function collectHandles() { - const activeHandles = new Map(); - let hook; - - try { - const asyncHooks = require('async_hooks'); - - hook = asyncHooks.createHook({ - destroy(asyncId) { - activeHandles.delete(asyncId); - }, - - init: function initHook(asyncId, type) { - if (type === 'PROMISE' || type === 'TIMERWRAP') { - return; - } - - const error = new (_jestUtil()).ErrorWithStack(type, initHook); - - if (stackIsFromUser(error.stack || '')) { - activeHandles.set(asyncId, error); - } - } - }); - hook.enable(); - } catch (e) { - const nodeMajor = Number(process.versions.node.split('.')[0]); - - if (e.code === 'MODULE_NOT_FOUND' && nodeMajor < 8) { - throw new Error( - 'You can only use --detectOpenHandles on Node 8 and newer.' - ); - } else { - throw e; - } - } - - return () => { - hook.disable(); - const result = Array.from(activeHandles.values()); - activeHandles.clear(); - return result; - }; -} - -function formatHandleErrors(errors, config) { - const stacks = new Set(); - return ( - errors - .map(err => - (0, _jestMessageUtil().formatExecError)( - err, - config, - { - noStackTrace: false - }, - undefined, - true - ) - ) // E.g. timeouts might give multiple traces to the same line of code - // This hairy filtering tries to remove entries with duplicate stack traces - .filter(handle => { - const ansiFree = (0, _stripAnsi().default)(handle); - const match = ansiFree.match(/\s+at(.*)/); - - if (!match || match.length < 2) { - return true; - } - - const stack = ansiFree.substr(ansiFree.indexOf(match[1])).trim(); - - if (stacks.has(stack)) { - return false; - } - - stacks.add(stack); - return true; - }) - ); -} diff --git a/node_modules/@jest/core/build/getChangedFilesPromise.d.ts b/node_modules/@jest/core/build/getChangedFilesPromise.d.ts deleted file mode 100644 index 4481f5a7..00000000 --- a/node_modules/@jest/core/build/getChangedFilesPromise.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -declare const _default: (globalConfig: Config.GlobalConfig, configs: Config.ProjectConfig[]) => Promise | undefined; -export default _default; -//# sourceMappingURL=getChangedFilesPromise.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/getChangedFilesPromise.d.ts.map b/node_modules/@jest/core/build/getChangedFilesPromise.d.ts.map deleted file mode 100644 index 40b60985..00000000 --- a/node_modules/@jest/core/build/getChangedFilesPromise.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getChangedFilesPromise.d.ts","sourceRoot":"","sources":["../src/getChangedFilesPromise.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;;AAKnC,wBA6BE"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/getChangedFilesPromise.js b/node_modules/@jest/core/build/getChangedFilesPromise.js deleted file mode 100644 index f960718b..00000000 --- a/node_modules/@jest/core/build/getChangedFilesPromise.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestChangedFiles() { - const data = require('jest-changed-files'); - - _jestChangedFiles = function _jestChangedFiles() { - return data; - }; - - return data; -} - -function _jestMessageUtil() { - const data = require('jest-message-util'); - - _jestMessageUtil = function _jestMessageUtil() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var _default = (globalConfig, configs) => { - if (globalConfig.onlyChanged) { - const allRootsForAllProjects = configs.reduce( - (roots, config) => [...roots, ...(config.roots || [])], - [] - ); - return (0, _jestChangedFiles().getChangedFilesForRoots)( - allRootsForAllProjects, - { - changedSince: globalConfig.changedSince, - lastCommit: globalConfig.lastCommit, - withAncestor: globalConfig.changedFilesWithAncestor - } - ).catch(e => { - const message = (0, _jestMessageUtil().formatExecError)(e, configs[0], { - noStackTrace: true - }) - .split('\n') - .filter(line => !line.includes('Command failed:')) - .join('\n'); - console.error(_chalk().default.red(`\n\n${message}`)); - process.exit(1); // We do process.exit, so this is dead code - - return Promise.reject(e); - }); - } - - return undefined; -}; - -exports.default = _default; diff --git a/node_modules/@jest/core/build/getNoTestFound.d.ts b/node_modules/@jest/core/build/getNoTestFound.d.ts deleted file mode 100644 index adca936c..00000000 --- a/node_modules/@jest/core/build/getNoTestFound.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { TestRunData } from './types'; -export default function getNoTestFound(testRunData: TestRunData, globalConfig: Config.GlobalConfig): string; -//# sourceMappingURL=getNoTestFound.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFound.d.ts.map b/node_modules/@jest/core/build/getNoTestFound.d.ts.map deleted file mode 100644 index b6ff0778..00000000 --- a/node_modules/@jest/core/build/getNoTestFound.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getNoTestFound.d.ts","sourceRoot":"","sources":["../src/getNoTestFound.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAGpC,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,MAAM,CAAC,YAAY,GAChC,MAAM,CAgCR"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFound.js b/node_modules/@jest/core/build/getNoTestFound.js deleted file mode 100644 index 4e61afec..00000000 --- a/node_modules/@jest/core/build/getNoTestFound.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = getNoTestFound; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -var _pluralize = _interopRequireDefault(require('./pluralize')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function getNoTestFound(testRunData, globalConfig) { - const testFiles = testRunData.reduce( - (current, testRun) => current + (testRun.matches.total || 0), - 0 - ); - let dataMessage; - - if (globalConfig.runTestsByPath) { - dataMessage = `Files: ${globalConfig.nonFlagArgs - .map(p => `"${p}"`) - .join(', ')}`; - } else { - dataMessage = `Pattern: ${_chalk().default.yellow( - globalConfig.testPathPattern - )} - 0 matches`; - } - - return ( - _chalk().default.bold('No tests found, exiting with code 1') + - '\n' + - 'Run with `--passWithNoTests` to exit with code 0' + - '\n' + - `In ${_chalk().default.bold(globalConfig.rootDir)}` + - '\n' + - ` ${(0, _pluralize.default)('file', testFiles, 's')} checked across ${(0, - _pluralize.default)( - 'project', - testRunData.length, - 's' - )}. Run with \`--verbose\` for more details.` + - '\n' + - dataMessage - ); -} diff --git a/node_modules/@jest/core/build/getNoTestFoundFailed.d.ts b/node_modules/@jest/core/build/getNoTestFoundFailed.d.ts deleted file mode 100644 index c4f447b6..00000000 --- a/node_modules/@jest/core/build/getNoTestFoundFailed.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default function getNoTestFoundFailed(): string; -//# sourceMappingURL=getNoTestFoundFailed.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFoundFailed.d.ts.map b/node_modules/@jest/core/build/getNoTestFoundFailed.d.ts.map deleted file mode 100644 index 5c19790c..00000000 --- a/node_modules/@jest/core/build/getNoTestFoundFailed.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getNoTestFoundFailed.d.ts","sourceRoot":"","sources":["../src/getNoTestFoundFailed.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,OAAO,UAAU,oBAAoB,WAK3C"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFoundFailed.js b/node_modules/@jest/core/build/getNoTestFoundFailed.js deleted file mode 100644 index 45e9c716..00000000 --- a/node_modules/@jest/core/build/getNoTestFoundFailed.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = getNoTestFoundFailed; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function getNoTestFoundFailed() { - return ( - _chalk().default.bold('No failed test found.\n') + - _chalk().default.dim('Press `f` to quit "only failed tests" mode.') - ); -} diff --git a/node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.d.ts b/node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.d.ts deleted file mode 100644 index be893318..00000000 --- a/node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default function getNoTestFoundPassWithNoTests(): string; -//# sourceMappingURL=getNoTestFoundPassWithNoTests.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.d.ts.map b/node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.d.ts.map deleted file mode 100644 index 5b02eece..00000000 --- a/node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getNoTestFoundPassWithNoTests.d.ts","sourceRoot":"","sources":["../src/getNoTestFoundPassWithNoTests.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,OAAO,UAAU,6BAA6B,WAEpD"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.js b/node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.js deleted file mode 100644 index d148c89a..00000000 --- a/node_modules/@jest/core/build/getNoTestFoundPassWithNoTests.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = getNoTestFoundPassWithNoTests; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function getNoTestFoundPassWithNoTests() { - return _chalk().default.bold('No tests found, exiting with code 0'); -} diff --git a/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts b/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts deleted file mode 100644 index 4db27416..00000000 --- a/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export default function getNoTestFoundRelatedToChangedFiles(globalConfig: Config.GlobalConfig): string; -//# sourceMappingURL=getNoTestFoundRelatedToChangedFiles.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts.map b/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts.map deleted file mode 100644 index 5a7b29bb..00000000 --- a/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getNoTestFoundRelatedToChangedFiles.d.ts","sourceRoot":"","sources":["../src/getNoTestFoundRelatedToChangedFiles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAGnC,MAAM,CAAC,OAAO,UAAU,mCAAmC,CACzD,YAAY,EAAE,MAAM,CAAC,YAAY,UAiBlC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.js b/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.js deleted file mode 100644 index dbb15d58..00000000 --- a/node_modules/@jest/core/build/getNoTestFoundRelatedToChangedFiles.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = getNoTestFoundRelatedToChangedFiles; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function getNoTestFoundRelatedToChangedFiles(globalConfig) { - const ref = globalConfig.changedSince - ? `"${globalConfig.changedSince}"` - : 'last commit'; - - let msg = _chalk().default.bold( - `No tests found related to files changed since ${ref}.` - ); - - if (_jestUtil().isInteractive) { - msg += _chalk().default.dim( - '\n' + - (globalConfig.watch - ? 'Press `a` to run all tests, or run Jest with `--watchAll`.' - : 'Run Jest without `-o` or with `--all` to run all tests.') - ); - } - - return msg; -} diff --git a/node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts b/node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts deleted file mode 100644 index a9a16698..00000000 --- a/node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { TestRunData } from './types'; -export default function getNoTestFoundVerbose(testRunData: TestRunData, globalConfig: Config.GlobalConfig): string; -//# sourceMappingURL=getNoTestFoundVerbose.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts.map b/node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts.map deleted file mode 100644 index 46523750..00000000 --- a/node_modules/@jest/core/build/getNoTestFoundVerbose.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getNoTestFoundVerbose.d.ts","sourceRoot":"","sources":["../src/getNoTestFoundVerbose.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAQ,WAAW,EAAC,MAAM,SAAS,CAAC;AAE3C,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,MAAM,CAAC,YAAY,GAChC,MAAM,CAqDR"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestFoundVerbose.js b/node_modules/@jest/core/build/getNoTestFoundVerbose.js deleted file mode 100644 index 1527c5ae..00000000 --- a/node_modules/@jest/core/build/getNoTestFoundVerbose.js +++ /dev/null @@ -1,95 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = getNoTestFoundVerbose; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -var _pluralize = _interopRequireDefault(require('./pluralize')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function getNoTestFoundVerbose(testRunData, globalConfig) { - const individualResults = testRunData.map(testRun => { - const stats = testRun.matches.stats || {}; - const config = testRun.context.config; - const statsMessage = Object.keys(stats) - .map(key => { - if (key === 'roots' && config.roots.length === 1) { - return null; - } - - const value = config[key]; - - if (value) { - const valueAsString = Array.isArray(value) - ? value.join(', ') - : String(value); - const matches = (0, _pluralize.default)( - 'match', - stats[key] || 0, - 'es' - ); - return ` ${key}: ${_chalk().default.yellow( - valueAsString - )} - ${matches}`; - } - - return null; - }) - .filter(line => line) - .join('\n'); - return testRun.matches.total - ? `In ${_chalk().default.bold(config.rootDir)}\n` + - ` ${(0, _pluralize.default)( - 'file', - testRun.matches.total || 0, - 's' - )} checked.\n` + - statsMessage - : `No files found in ${config.rootDir}.\n` + - `Make sure Jest's configuration does not exclude this directory.` + - `\nTo set up Jest, make sure a package.json file exists.\n` + - `Jest Documentation: ` + - `facebook.github.io/jest/docs/configuration.html`; - }); - let dataMessage; - - if (globalConfig.runTestsByPath) { - dataMessage = `Files: ${globalConfig.nonFlagArgs - .map(p => `"${p}"`) - .join(', ')}`; - } else { - dataMessage = `Pattern: ${_chalk().default.yellow( - globalConfig.testPathPattern - )} - 0 matches`; - } - - return ( - _chalk().default.bold('No tests found, exiting with code 1') + - '\n' + - 'Run with `--passWithNoTests` to exit with code 0' + - '\n' + - individualResults.join('\n') + - '\n' + - dataMessage - ); -} diff --git a/node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts b/node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts deleted file mode 100644 index 86b3124c..00000000 --- a/node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { TestRunData } from './types'; -export default function getNoTestsFoundMessage(testRunData: TestRunData, globalConfig: Config.GlobalConfig): string; -//# sourceMappingURL=getNoTestsFoundMessage.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts.map b/node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts.map deleted file mode 100644 index f2435973..00000000 --- a/node_modules/@jest/core/build/getNoTestsFoundMessage.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getNoTestsFoundMessage.d.ts","sourceRoot":"","sources":["../src/getNoTestsFoundMessage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAOpC,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,MAAM,CAAC,YAAY,GAChC,MAAM,CAaR"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/getNoTestsFoundMessage.js b/node_modules/@jest/core/build/getNoTestsFoundMessage.js deleted file mode 100644 index fb39bcc2..00000000 --- a/node_modules/@jest/core/build/getNoTestsFoundMessage.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = getNoTestsFoundMessage; - -var _getNoTestFound = _interopRequireDefault(require('./getNoTestFound')); - -var _getNoTestFoundRelatedToChangedFiles = _interopRequireDefault( - require('./getNoTestFoundRelatedToChangedFiles') -); - -var _getNoTestFoundVerbose = _interopRequireDefault( - require('./getNoTestFoundVerbose') -); - -var _getNoTestFoundFailed = _interopRequireDefault( - require('./getNoTestFoundFailed') -); - -var _getNoTestFoundPassWithNoTests = _interopRequireDefault( - require('./getNoTestFoundPassWithNoTests') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function getNoTestsFoundMessage(testRunData, globalConfig) { - if (globalConfig.onlyFailures) { - return (0, _getNoTestFoundFailed.default)(); - } - - if (globalConfig.onlyChanged) { - return (0, _getNoTestFoundRelatedToChangedFiles.default)(globalConfig); - } - - if (globalConfig.passWithNoTests) { - return (0, _getNoTestFoundPassWithNoTests.default)(); - } - - return testRunData.length === 1 || globalConfig.verbose - ? (0, _getNoTestFoundVerbose.default)(testRunData, globalConfig) - : (0, _getNoTestFound.default)(testRunData, globalConfig); -} diff --git a/node_modules/@jest/core/build/jest.d.ts b/node_modules/@jest/core/build/jest.d.ts deleted file mode 100644 index e98d9709..00000000 --- a/node_modules/@jest/core/build/jest.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export { default as SearchSource } from './SearchSource'; -export { default as TestScheduler } from './TestScheduler'; -export { default as TestWatcher } from './TestWatcher'; -export { runCLI } from './cli'; -export { default as getVersion } from './version'; -//# sourceMappingURL=jest.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/jest.d.ts.map b/node_modules/@jest/core/build/jest.d.ts.map deleted file mode 100644 index d2d680d8..00000000 --- a/node_modules/@jest/core/build/jest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jest.d.ts","sourceRoot":"","sources":["../src/jest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,MAAM,EAAC,MAAM,OAAO,CAAC;AAC7B,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/jest.js b/node_modules/@jest/core/build/jest.js deleted file mode 100644 index d56ff98a..00000000 --- a/node_modules/@jest/core/build/jest.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -Object.defineProperty(exports, 'SearchSource', { - enumerable: true, - get: function get() { - return _SearchSource.default; - } -}); -Object.defineProperty(exports, 'TestScheduler', { - enumerable: true, - get: function get() { - return _TestScheduler.default; - } -}); -Object.defineProperty(exports, 'TestWatcher', { - enumerable: true, - get: function get() { - return _TestWatcher.default; - } -}); -Object.defineProperty(exports, 'runCLI', { - enumerable: true, - get: function get() { - return _cli.runCLI; - } -}); -Object.defineProperty(exports, 'getVersion', { - enumerable: true, - get: function get() { - return _version.default; - } -}); - -var _SearchSource = _interopRequireDefault(require('./SearchSource')); - -var _TestScheduler = _interopRequireDefault(require('./TestScheduler')); - -var _TestWatcher = _interopRequireDefault(require('./TestWatcher')); - -var _cli = require('./cli'); - -var _version = _interopRequireDefault(require('./version')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} diff --git a/node_modules/@jest/core/build/lib/active_filters_message.d.ts b/node_modules/@jest/core/build/lib/active_filters_message.d.ts deleted file mode 100644 index 5cc5ea55..00000000 --- a/node_modules/@jest/core/build/lib/active_filters_message.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -declare const activeFilters: (globalConfig: Config.GlobalConfig, delimiter?: string) => string; -export default activeFilters; -//# sourceMappingURL=active_filters_message.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/active_filters_message.d.ts.map b/node_modules/@jest/core/build/lib/active_filters_message.d.ts.map deleted file mode 100644 index aa32bab7..00000000 --- a/node_modules/@jest/core/build/lib/active_filters_message.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"active_filters_message.d.ts","sourceRoot":"","sources":["../../src/lib/active_filters_message.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,QAAA,MAAM,aAAa,mEAuBlB,CAAC;AAEF,eAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/active_filters_message.js b/node_modules/@jest/core/build/lib/active_filters_message.js deleted file mode 100644 index ae3bafa3..00000000 --- a/node_modules/@jest/core/build/lib/active_filters_message.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const activeFilters = (globalConfig, delimiter = '\n') => { - const testNamePattern = globalConfig.testNamePattern, - testPathPattern = globalConfig.testPathPattern; - - if (testNamePattern || testPathPattern) { - const filters = [ - testPathPattern - ? _chalk().default.dim('filename ') + - _chalk().default.yellow('/' + testPathPattern + '/') - : null, - testNamePattern - ? _chalk().default.dim('test name ') + - _chalk().default.yellow('/' + testNamePattern + '/') - : null - ] - .filter(f => f) - .join(', '); - const messages = [ - '\n' + _chalk().default.bold('Active Filters: ') + filters - ]; - return messages.filter(message => !!message).join(delimiter); - } - - return ''; -}; - -var _default = activeFilters; -exports.default = _default; diff --git a/node_modules/@jest/core/build/lib/create_context.d.ts b/node_modules/@jest/core/build/lib/create_context.d.ts deleted file mode 100644 index 53a6ee6f..00000000 --- a/node_modules/@jest/core/build/lib/create_context.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -declare const _default: (config: Config.ProjectConfig, { hasteFS, moduleMap }: import("jest-haste-map/build/types").HasteMap) => import("jest-runtime/build/types").Context; -export default _default; -//# sourceMappingURL=create_context.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/create_context.d.ts.map b/node_modules/@jest/core/build/lib/create_context.d.ts.map deleted file mode 100644 index 80b28221..00000000 --- a/node_modules/@jest/core/build/lib/create_context.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"create_context.d.ts","sourceRoot":"","sources":["../../src/lib/create_context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;;AAInC,wBAQG"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/create_context.js b/node_modules/@jest/core/build/lib/create_context.js deleted file mode 100644 index dd974afa..00000000 --- a/node_modules/@jest/core/build/lib/create_context.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestRuntime() { - const data = _interopRequireDefault(require('jest-runtime')); - - _jestRuntime = function _jestRuntime() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var _default = (config, {hasteFS, moduleMap}) => ({ - config, - hasteFS, - moduleMap, - resolver: _jestRuntime().default.createResolver(config, moduleMap) -}); - -exports.default = _default; diff --git a/node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts b/node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts deleted file mode 100644 index 4f79b44a..00000000 --- a/node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -declare const _default: (pipe: NodeJS.WriteStream, stdin?: NodeJS.ReadStream) => Promise; -export default _default; -//# sourceMappingURL=handle_deprecation_warnings.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts.map b/node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts.map deleted file mode 100644 index 822aa504..00000000 --- a/node_modules/@jest/core/build/lib/handle_deprecation_warnings.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"handle_deprecation_warnings.d.ts","sourceRoot":"","sources":["../../src/lib/handle_deprecation_warnings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AAKH,wBA6BK"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/handle_deprecation_warnings.js b/node_modules/@jest/core/build/lib/handle_deprecation_warnings.js deleted file mode 100644 index 615eeeb9..00000000 --- a/node_modules/@jest/core/build/lib/handle_deprecation_warnings.js +++ /dev/null @@ -1,72 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var _default = (pipe, stdin = process.stdin) => - new Promise((resolve, reject) => { - if (typeof stdin.setRawMode === 'function') { - const messages = [ - _chalk().default.red('There are deprecation warnings.\n'), - _chalk().default.dim(' \u203A Press ') + - 'Enter' + - _chalk().default.dim(' to continue.'), - _chalk().default.dim(' \u203A Press ') + - 'Esc' + - _chalk().default.dim(' to exit.') - ]; - pipe.write(messages.join('\n')); - stdin.setRawMode(true); - stdin.resume(); - stdin.setEncoding('utf8'); - stdin.on('data', key => { - if (key === _jestWatcher().KEYS.ENTER) { - resolve(); - } else if ( - [ - _jestWatcher().KEYS.ESCAPE, - _jestWatcher().KEYS.CONTROL_C, - _jestWatcher().KEYS.CONTROL_D - ].indexOf(key) !== -1 - ) { - reject(); - } - }); - } else { - resolve(); - } - }); - -exports.default = _default; diff --git a/node_modules/@jest/core/build/lib/is_valid_path.d.ts b/node_modules/@jest/core/build/lib/is_valid_path.d.ts deleted file mode 100644 index d0261e1e..00000000 --- a/node_modules/@jest/core/build/lib/is_valid_path.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export default function isValidPath(globalConfig: Config.GlobalConfig, filePath: Config.Path): boolean; -//# sourceMappingURL=is_valid_path.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/is_valid_path.d.ts.map b/node_modules/@jest/core/build/lib/is_valid_path.d.ts.map deleted file mode 100644 index 9d057a5c..00000000 --- a/node_modules/@jest/core/build/lib/is_valid_path.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"is_valid_path.d.ts","sourceRoot":"","sources":["../../src/lib/is_valid_path.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAGnC,MAAM,CAAC,OAAO,UAAU,WAAW,CACjC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,QAAQ,EAAE,MAAM,CAAC,IAAI,WAMtB"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/is_valid_path.js b/node_modules/@jest/core/build/lib/is_valid_path.js deleted file mode 100644 index 7e7c50d4..00000000 --- a/node_modules/@jest/core/build/lib/is_valid_path.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = isValidPath; - -function _jestSnapshot() { - const data = require('jest-snapshot'); - - _jestSnapshot = function _jestSnapshot() { - return data; - }; - - return data; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function isValidPath(globalConfig, filePath) { - return ( - !filePath.includes(globalConfig.coverageDirectory) && - !(0, _jestSnapshot().isSnapshotPath)(filePath) - ); -} diff --git a/node_modules/@jest/core/build/lib/log_debug_messages.d.ts b/node_modules/@jest/core/build/lib/log_debug_messages.d.ts deleted file mode 100644 index 81d9937f..00000000 --- a/node_modules/@jest/core/build/lib/log_debug_messages.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Config } from '@jest/types'; -export default function logDebugMessages(globalConfig: Config.GlobalConfig, configs: Array | Config.ProjectConfig, outputStream: NodeJS.WriteStream): void; -//# sourceMappingURL=log_debug_messages.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/log_debug_messages.d.ts.map b/node_modules/@jest/core/build/lib/log_debug_messages.d.ts.map deleted file mode 100644 index 7a2dec00..00000000 --- a/node_modules/@jest/core/build/lib/log_debug_messages.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"log_debug_messages.d.ts","sourceRoot":"","sources":["../../src/lib/log_debug_messages.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAInC,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,aAAa,EAC3D,YAAY,EAAE,MAAM,CAAC,WAAW,GAC/B,IAAI,CAON"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/log_debug_messages.js b/node_modules/@jest/core/build/lib/log_debug_messages.js deleted file mode 100644 index d465e51b..00000000 --- a/node_modules/@jest/core/build/lib/log_debug_messages.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = logDebugMessages; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const VERSION = require('../../package.json').version; - -function logDebugMessages(globalConfig, configs, outputStream) { - const output = { - configs, - globalConfig, - version: VERSION - }; - outputStream.write(JSON.stringify(output, null, ' ') + '\n'); -} diff --git a/node_modules/@jest/core/build/lib/update_global_config.d.ts b/node_modules/@jest/core/build/lib/update_global_config.d.ts deleted file mode 100644 index 5127c2af..00000000 --- a/node_modules/@jest/core/build/lib/update_global_config.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -declare const _default: (globalConfig: Config.GlobalConfig, options?: Partial & { - mode: "watch" | "watchAll"; -}> & Partial>) => Config.GlobalConfig; -export default _default; -//# sourceMappingURL=update_global_config.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/update_global_config.d.ts.map b/node_modules/@jest/core/build/lib/update_global_config.d.ts.map deleted file mode 100644 index f26aa249..00000000 --- a/node_modules/@jest/core/build/lib/update_global_config.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"update_global_config.d.ts","sourceRoot":"","sources":["../../src/lib/update_global_config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;;;;AAOnC,wBA4FE"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/update_global_config.js b/node_modules/@jest/core/build/lib/update_global_config.js deleted file mode 100644 index 7f7953cf..00000000 --- a/node_modules/@jest/core/build/lib/update_global_config.js +++ /dev/null @@ -1,142 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestRegexUtil() { - const data = require('jest-regex-util'); - - _jestRegexUtil = function _jestRegexUtil() { - return data; - }; - - return data; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -var _default = (globalConfig, options = {}) => { - const newConfig = _objectSpread({}, globalConfig); - - if (options.mode === 'watch') { - newConfig.watch = true; - newConfig.watchAll = false; - } else if (options.mode === 'watchAll') { - newConfig.watch = false; - newConfig.watchAll = true; - } - - if (options.testNamePattern !== undefined) { - newConfig.testNamePattern = options.testNamePattern || ''; - } - - if (options.testPathPattern !== undefined) { - newConfig.testPathPattern = - (0, _jestRegexUtil().replacePathSepForRegex)(options.testPathPattern) || - ''; - } - - newConfig.onlyChanged = false; - newConfig.onlyChanged = - !newConfig.watchAll && - !newConfig.testNamePattern && - !newConfig.testPathPattern; - - if (typeof options.bail === 'boolean') { - newConfig.bail = options.bail ? 1 : 0; - } else if (options.bail !== undefined) { - newConfig.bail = options.bail; - } - - if (options.changedSince !== undefined) { - newConfig.changedSince = options.changedSince; - } - - if (options.collectCoverage !== undefined) { - newConfig.collectCoverage = options.collectCoverage || false; - } - - if (options.collectCoverageFrom !== undefined) { - newConfig.collectCoverageFrom = options.collectCoverageFrom; - } - - if (options.collectCoverageOnlyFrom !== undefined) { - newConfig.collectCoverageOnlyFrom = options.collectCoverageOnlyFrom; - } - - if (options.coverageDirectory !== undefined) { - newConfig.coverageDirectory = options.coverageDirectory; - } - - if (options.coverageReporters !== undefined) { - newConfig.coverageReporters = options.coverageReporters; - } - - if (options.noSCM) { - newConfig.noSCM = true; - } - - if (options.notify !== undefined) { - newConfig.notify = options.notify || false; - } - - if (options.notifyMode !== undefined) { - newConfig.notifyMode = options.notifyMode; - } - - if (options.onlyFailures !== undefined) { - newConfig.onlyFailures = options.onlyFailures || false; - } - - if (options.passWithNoTests !== undefined) { - newConfig.passWithNoTests = true; - } - - if (options.reporters !== undefined) { - newConfig.reporters = options.reporters; - } - - if (options.updateSnapshot !== undefined) { - newConfig.updateSnapshot = options.updateSnapshot; - } - - if (options.verbose !== undefined) { - newConfig.verbose = options.verbose || false; - } - - return Object.freeze(newConfig); -}; - -exports.default = _default; diff --git a/node_modules/@jest/core/build/lib/watch_plugins_helpers.d.ts b/node_modules/@jest/core/build/lib/watch_plugins_helpers.d.ts deleted file mode 100644 index cd71550c..00000000 --- a/node_modules/@jest/core/build/lib/watch_plugins_helpers.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { WatchPlugin, UsageData } from 'jest-watcher'; -export declare const filterInteractivePlugins: (watchPlugins: WatchPlugin[], globalConfig: Config.GlobalConfig) => WatchPlugin[]; -export declare const getSortedUsageRows: (watchPlugins: WatchPlugin[], globalConfig: Config.GlobalConfig) => UsageData[]; -//# sourceMappingURL=watch_plugins_helpers.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/watch_plugins_helpers.d.ts.map b/node_modules/@jest/core/build/lib/watch_plugins_helpers.d.ts.map deleted file mode 100644 index c9d39389..00000000 --- a/node_modules/@jest/core/build/lib/watch_plugins_helpers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"watch_plugins_helpers.d.ts","sourceRoot":"","sources":["../../src/lib/watch_plugins_helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,WAAW,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,wBAAwB,mFAiBpC,CAAC;AAMF,eAAO,MAAM,kBAAkB,iFAyBV,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/lib/watch_plugins_helpers.js b/node_modules/@jest/core/build/lib/watch_plugins_helpers.js deleted file mode 100644 index e1933a1d..00000000 --- a/node_modules/@jest/core/build/lib/watch_plugins_helpers.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.getSortedUsageRows = exports.filterInteractivePlugins = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const filterInteractivePlugins = (watchPlugins, globalConfig) => { - const usageInfos = watchPlugins.map( - p => p.getUsageInfo && p.getUsageInfo(globalConfig) - ); - return watchPlugins.filter((_plugin, i) => { - const usageInfo = usageInfos[i]; - - if (usageInfo) { - const key = usageInfo.key; - return !usageInfos.slice(i + 1).some(u => !!u && key === u.key); - } - - return false; - }); -}; - -exports.filterInteractivePlugins = filterInteractivePlugins; - -function notEmpty(value) { - return value != null; -} - -const getSortedUsageRows = (watchPlugins, globalConfig) => - filterInteractivePlugins(watchPlugins, globalConfig) - .sort((a, b) => { - if (a.isInternal && b.isInternal) { - // internal plugins in the order we specify them - return 0; - } - - if (a.isInternal !== b.isInternal) { - // external plugins afterwards - return a.isInternal ? -1 : 1; - } - - const usageInfoA = a.getUsageInfo && a.getUsageInfo(globalConfig); - const usageInfoB = b.getUsageInfo && b.getUsageInfo(globalConfig); - - if (usageInfoA && usageInfoB) { - // external plugins in alphabetical order - return usageInfoA.key.localeCompare(usageInfoB.key); - } - - return 0; - }) - .map(p => p.getUsageInfo && p.getUsageInfo(globalConfig)) - .filter(notEmpty); - -exports.getSortedUsageRows = getSortedUsageRows; diff --git a/node_modules/@jest/core/build/plugins/quit.d.ts b/node_modules/@jest/core/build/plugins/quit.d.ts deleted file mode 100644 index 43deb876..00000000 --- a/node_modules/@jest/core/build/plugins/quit.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { BaseWatchPlugin } from 'jest-watcher'; -declare class QuitPlugin extends BaseWatchPlugin { - isInternal: true; - constructor(options: { - stdin: NodeJS.ReadStream; - stdout: NodeJS.WriteStream; - }); - run(): Promise; - getUsageInfo(): { - key: string; - prompt: string; - }; -} -export default QuitPlugin; -//# sourceMappingURL=quit.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/quit.d.ts.map b/node_modules/@jest/core/build/plugins/quit.d.ts.map deleted file mode 100644 index da0cbef3..00000000 --- a/node_modules/@jest/core/build/plugins/quit.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"quit.d.ts","sourceRoot":"","sources":["../../src/plugins/quit.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,eAAe,EAAC,MAAM,cAAc,CAAC;AAE7C,cAAM,UAAW,SAAQ,eAAe;IACtC,UAAU,EAAE,IAAI,CAAC;gBAEL,OAAO,EAAE;QAAC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAA;KAAC;IAKrE,GAAG;IAQT,YAAY;;;;CAMb;AAED,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/quit.js b/node_modules/@jest/core/build/plugins/quit.js deleted file mode 100644 index 133dff2f..00000000 --- a/node_modules/@jest/core/build/plugins/quit.js +++ /dev/null @@ -1,96 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class QuitPlugin extends _jestWatcher().BaseWatchPlugin { - constructor(options) { - super(options); - - _defineProperty(this, 'isInternal', void 0); - - this.isInternal = true; - } - - run() { - var _this = this; - - return _asyncToGenerator(function*() { - if (typeof _this._stdin.setRawMode === 'function') { - _this._stdin.setRawMode(false); - } - - _this._stdout.write('\n'); - - process.exit(0); - })(); - } - - getUsageInfo() { - return { - key: 'q', - prompt: 'quit watch mode' - }; - } -} - -var _default = QuitPlugin; -exports.default = _default; diff --git a/node_modules/@jest/core/build/plugins/test_name_pattern.d.ts b/node_modules/@jest/core/build/plugins/test_name_pattern.d.ts deleted file mode 100644 index 7ad78348..00000000 --- a/node_modules/@jest/core/build/plugins/test_name_pattern.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Config } from '@jest/types'; -import { BaseWatchPlugin, Prompt, UpdateConfigCallback } from 'jest-watcher'; -declare class TestNamePatternPlugin extends BaseWatchPlugin { - _prompt: Prompt; - isInternal: true; - constructor(options: { - stdin: NodeJS.ReadStream; - stdout: NodeJS.WriteStream; - }); - getUsageInfo(): { - key: string; - prompt: string; - }; - onKey(key: string): void; - run(globalConfig: Config.GlobalConfig, updateConfigAndRun: UpdateConfigCallback): Promise; -} -export default TestNamePatternPlugin; -//# sourceMappingURL=test_name_pattern.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/test_name_pattern.d.ts.map b/node_modules/@jest/core/build/plugins/test_name_pattern.d.ts.map deleted file mode 100644 index a5445dac..00000000 --- a/node_modules/@jest/core/build/plugins/test_name_pattern.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test_name_pattern.d.ts","sourceRoot":"","sources":["../../src/plugins/test_name_pattern.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,eAAe,EAAE,MAAM,EAAE,oBAAoB,EAAC,MAAM,cAAc,CAAC;AAI3E,cAAM,qBAAsB,SAAQ,eAAe;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;gBAEL,OAAO,EAAE;QAAC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAA;KAAC;IAM3E,YAAY;;;;IAOZ,KAAK,CAAC,GAAG,EAAE,MAAM;IAIjB,GAAG,CACD,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,kBAAkB,EAAE,oBAAoB,GACvC,OAAO,CAAC,IAAI,CAAC;CAmBjB;AAED,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/test_name_pattern.js b/node_modules/@jest/core/build/plugins/test_name_pattern.js deleted file mode 100644 index 7f5c55ea..00000000 --- a/node_modules/@jest/core/build/plugins/test_name_pattern.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -var _TestNamePatternPrompt = _interopRequireDefault( - require('../TestNamePatternPrompt') -); - -var _active_filters_message = _interopRequireDefault( - require('../lib/active_filters_message') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class TestNamePatternPlugin extends _jestWatcher().BaseWatchPlugin { - constructor(options) { - super(options); - - _defineProperty(this, '_prompt', void 0); - - _defineProperty(this, 'isInternal', void 0); - - this._prompt = new (_jestWatcher()).Prompt(); - this.isInternal = true; - } - - getUsageInfo() { - return { - key: 't', - prompt: 'filter by a test name regex pattern' - }; - } - - onKey(key) { - this._prompt.put(key); - } - - run(globalConfig, updateConfigAndRun) { - return new Promise((res, rej) => { - const testNamePatternPrompt = new _TestNamePatternPrompt.default( - this._stdout, - this._prompt - ); - testNamePatternPrompt.run( - value => { - updateConfigAndRun({ - mode: 'watch', - testNamePattern: value - }); - res(); - }, - rej, - { - header: (0, _active_filters_message.default)(globalConfig) - } - ); - }); - } -} - -var _default = TestNamePatternPlugin; -exports.default = _default; diff --git a/node_modules/@jest/core/build/plugins/test_path_pattern.d.ts b/node_modules/@jest/core/build/plugins/test_path_pattern.d.ts deleted file mode 100644 index 86b72096..00000000 --- a/node_modules/@jest/core/build/plugins/test_path_pattern.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Config } from '@jest/types'; -import { BaseWatchPlugin, UpdateConfigCallback } from 'jest-watcher'; -declare class TestPathPatternPlugin extends BaseWatchPlugin { - private _prompt; - isInternal: true; - constructor(options: { - stdin: NodeJS.ReadStream; - stdout: NodeJS.WriteStream; - }); - getUsageInfo(): { - key: string; - prompt: string; - }; - onKey(key: string): void; - run(globalConfig: Config.GlobalConfig, updateConfigAndRun: UpdateConfigCallback): Promise; -} -export default TestPathPatternPlugin; -//# sourceMappingURL=test_path_pattern.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/test_path_pattern.d.ts.map b/node_modules/@jest/core/build/plugins/test_path_pattern.d.ts.map deleted file mode 100644 index fb6b2618..00000000 --- a/node_modules/@jest/core/build/plugins/test_path_pattern.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"test_path_pattern.d.ts","sourceRoot":"","sources":["../../src/plugins/test_path_pattern.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,eAAe,EAAU,oBAAoB,EAAC,MAAM,cAAc,CAAC;AAI3E,cAAM,qBAAsB,SAAQ,eAAe;IACjD,OAAO,CAAC,OAAO,CAAS;IACxB,UAAU,EAAE,IAAI,CAAC;gBAEL,OAAO,EAAE;QAAC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAA;KAAC;IAM3E,YAAY;;;;IAOZ,KAAK,CAAC,GAAG,EAAE,MAAM;IAIjB,GAAG,CACD,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,kBAAkB,EAAE,oBAAoB,GACvC,OAAO,CAAC,IAAI,CAAC;CAmBjB;AAED,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/test_path_pattern.js b/node_modules/@jest/core/build/plugins/test_path_pattern.js deleted file mode 100644 index bef960a3..00000000 --- a/node_modules/@jest/core/build/plugins/test_path_pattern.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -var _TestPathPatternPrompt = _interopRequireDefault( - require('../TestPathPatternPrompt') -); - -var _active_filters_message = _interopRequireDefault( - require('../lib/active_filters_message') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class TestPathPatternPlugin extends _jestWatcher().BaseWatchPlugin { - constructor(options) { - super(options); - - _defineProperty(this, '_prompt', void 0); - - _defineProperty(this, 'isInternal', void 0); - - this._prompt = new (_jestWatcher()).Prompt(); - this.isInternal = true; - } - - getUsageInfo() { - return { - key: 'p', - prompt: 'filter by a filename regex pattern' - }; - } - - onKey(key) { - this._prompt.put(key); - } - - run(globalConfig, updateConfigAndRun) { - return new Promise((res, rej) => { - const testPathPatternPrompt = new _TestPathPatternPrompt.default( - this._stdout, - this._prompt - ); - testPathPatternPrompt.run( - value => { - updateConfigAndRun({ - mode: 'watch', - testPathPattern: value - }); - res(); - }, - rej, - { - header: (0, _active_filters_message.default)(globalConfig) - } - ); - }); - } -} - -var _default = TestPathPatternPlugin; -exports.default = _default; diff --git a/node_modules/@jest/core/build/plugins/update_snapshots.d.ts b/node_modules/@jest/core/build/plugins/update_snapshots.d.ts deleted file mode 100644 index 1baa1f15..00000000 --- a/node_modules/@jest/core/build/plugins/update_snapshots.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Config } from '@jest/types'; -import { BaseWatchPlugin, JestHookSubscriber, UpdateConfigCallback } from 'jest-watcher'; -declare class UpdateSnapshotsPlugin extends BaseWatchPlugin { - private _hasSnapshotFailure; - isInternal: true; - constructor(options: { - stdin: NodeJS.ReadStream; - stdout: NodeJS.WriteStream; - }); - run(_globalConfig: Config.GlobalConfig, updateConfigAndRun: UpdateConfigCallback): Promise; - apply(hooks: JestHookSubscriber): void; - getUsageInfo(): { - key: string; - prompt: string; - } | null; -} -export default UpdateSnapshotsPlugin; -//# sourceMappingURL=update_snapshots.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/update_snapshots.d.ts.map b/node_modules/@jest/core/build/plugins/update_snapshots.d.ts.map deleted file mode 100644 index 895b4519..00000000 --- a/node_modules/@jest/core/build/plugins/update_snapshots.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"update_snapshots.d.ts","sourceRoot":"","sources":["../../src/plugins/update_snapshots.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAEtB,cAAM,qBAAsB,SAAQ,eAAe;IACjD,OAAO,CAAC,mBAAmB,CAAU;IACrC,UAAU,EAAE,IAAI,CAAC;gBAEL,OAAO,EAAE;QAAC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAA;KAAC;IAM3E,GAAG,CACD,aAAa,EAAE,MAAM,CAAC,YAAY,EAClC,kBAAkB,EAAE,oBAAoB,GACvC,OAAO,CAAC,OAAO,CAAC;IAKnB,KAAK,CAAC,KAAK,EAAE,kBAAkB;IAM/B,YAAY;;;;CAUb;AAED,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/update_snapshots.js b/node_modules/@jest/core/build/plugins/update_snapshots.js deleted file mode 100644 index e257d044..00000000 --- a/node_modules/@jest/core/build/plugins/update_snapshots.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class UpdateSnapshotsPlugin extends _jestWatcher().BaseWatchPlugin { - constructor(options) { - super(options); - - _defineProperty(this, '_hasSnapshotFailure', void 0); - - _defineProperty(this, 'isInternal', void 0); - - this.isInternal = true; - this._hasSnapshotFailure = false; - } - - run(_globalConfig, updateConfigAndRun) { - updateConfigAndRun({ - updateSnapshot: 'all' - }); - return Promise.resolve(false); - } - - apply(hooks) { - hooks.onTestRunComplete(results => { - this._hasSnapshotFailure = results.snapshot.failure; - }); - } - - getUsageInfo() { - if (this._hasSnapshotFailure) { - return { - key: 'u', - prompt: 'update failing snapshots' - }; - } - - return null; - } -} - -var _default = UpdateSnapshotsPlugin; -exports.default = _default; diff --git a/node_modules/@jest/core/build/plugins/update_snapshots_interactive.d.ts b/node_modules/@jest/core/build/plugins/update_snapshots_interactive.d.ts deleted file mode 100644 index 50969aab..00000000 --- a/node_modules/@jest/core/build/plugins/update_snapshots_interactive.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { AggregatedResult, AssertionLocation } from '@jest/test-result'; -import { BaseWatchPlugin, JestHookSubscriber } from 'jest-watcher'; -declare class UpdateSnapshotInteractivePlugin extends BaseWatchPlugin { - private _snapshotInteractiveMode; - private _failedSnapshotTestAssertions; - isInternal: true; - getFailedSnapshotTestAssertions(testResults: AggregatedResult): Array; - apply(hooks: JestHookSubscriber): void; - onKey(key: string): void; - run(_globalConfig: Config.GlobalConfig, updateConfigAndRun: Function): Promise; - getUsageInfo(): { - key: string; - prompt: string; - } | null; -} -export default UpdateSnapshotInteractivePlugin; -//# sourceMappingURL=update_snapshots_interactive.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/update_snapshots_interactive.d.ts.map b/node_modules/@jest/core/build/plugins/update_snapshots_interactive.d.ts.map deleted file mode 100644 index e8a90395..00000000 --- a/node_modules/@jest/core/build/plugins/update_snapshots_interactive.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"update_snapshots_interactive.d.ts","sourceRoot":"","sources":["../../src/plugins/update_snapshots_interactive.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAE,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAC,eAAe,EAAE,kBAAkB,EAAC,MAAM,cAAc,CAAC;AAGjE,cAAM,+BAAgC,SAAQ,eAAe;IAC3D,OAAO,CAAC,wBAAwB,CAE9B;IACF,OAAO,CAAC,6BAA6B,CAAgC;IACrE,UAAU,EAAE,IAAI,CAAQ;IAExB,+BAA+B,CAC7B,WAAW,EAAE,gBAAgB,GAC5B,KAAK,CAAC,iBAAiB,CAAC;IAsB3B,KAAK,CAAC,KAAK,EAAE,kBAAkB;IAW/B,KAAK,CAAC,GAAG,EAAE,MAAM;IAMjB,GAAG,CACD,aAAa,EAAE,MAAM,CAAC,YAAY,EAClC,kBAAkB,EAAE,QAAQ,GAC3B,OAAO,CAAC,IAAI,CAAC;IAwBhB,YAAY;;;;CAab;AAED,eAAe,+BAA+B,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/plugins/update_snapshots_interactive.js b/node_modules/@jest/core/build/plugins/update_snapshots_interactive.js deleted file mode 100644 index f274150c..00000000 --- a/node_modules/@jest/core/build/plugins/update_snapshots_interactive.js +++ /dev/null @@ -1,135 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -var _SnapshotInteractiveMode = _interopRequireDefault( - require('../SnapshotInteractiveMode') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class UpdateSnapshotInteractivePlugin extends _jestWatcher().BaseWatchPlugin { - constructor(...args) { - super(...args); - - _defineProperty( - this, - '_snapshotInteractiveMode', - new _SnapshotInteractiveMode.default(this._stdout) - ); - - _defineProperty(this, '_failedSnapshotTestAssertions', []); - - _defineProperty(this, 'isInternal', true); - } - - getFailedSnapshotTestAssertions(testResults) { - const failedTestPaths = []; - - if (testResults.numFailedTests === 0 || !testResults.testResults) { - return failedTestPaths; - } - - testResults.testResults.forEach(testResult => { - if (testResult.snapshot && testResult.snapshot.unmatched) { - testResult.testResults.forEach(result => { - if (result.status === 'failed') { - failedTestPaths.push({ - fullName: result.fullName, - path: testResult.testFilePath - }); - } - }); - } - }); - return failedTestPaths; - } - - apply(hooks) { - hooks.onTestRunComplete(results => { - this._failedSnapshotTestAssertions = this.getFailedSnapshotTestAssertions( - results - ); - - if (this._snapshotInteractiveMode.isActive()) { - this._snapshotInteractiveMode.updateWithResults(results); - } - }); - } - - onKey(key) { - if (this._snapshotInteractiveMode.isActive()) { - this._snapshotInteractiveMode.put(key); - } - } - - run(_globalConfig, updateConfigAndRun) { - if (this._failedSnapshotTestAssertions.length) { - return new Promise(res => { - this._snapshotInteractiveMode.run( - this._failedSnapshotTestAssertions, - (assertion, shouldUpdateSnapshot) => { - updateConfigAndRun({ - mode: 'watch', - testNamePattern: assertion ? `^${assertion.fullName}$` : '', - testPathPattern: assertion ? assertion.path : '', - updateSnapshot: shouldUpdateSnapshot ? 'all' : 'none' - }); - - if (!this._snapshotInteractiveMode.isActive()) { - res(); - } - } - ); - }); - } else { - return Promise.resolve(); - } - } - - getUsageInfo() { - if ( - this._failedSnapshotTestAssertions && - this._failedSnapshotTestAssertions.length > 0 - ) { - return { - key: 'i', - prompt: 'update failing snapshots interactively' - }; - } - - return null; - } -} - -var _default = UpdateSnapshotInteractivePlugin; -exports.default = _default; diff --git a/node_modules/@jest/core/build/pluralize.d.ts b/node_modules/@jest/core/build/pluralize.d.ts deleted file mode 100644 index d3c9b3e4..00000000 --- a/node_modules/@jest/core/build/pluralize.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default function pluralize(word: string, count: number, ending: string): string; -//# sourceMappingURL=pluralize.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/pluralize.d.ts.map b/node_modules/@jest/core/build/pluralize.d.ts.map deleted file mode 100644 index 841ca3a6..00000000 --- a/node_modules/@jest/core/build/pluralize.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pluralize.d.ts","sourceRoot":"","sources":["../src/pluralize.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,UAE5E"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/pluralize.js b/node_modules/@jest/core/build/pluralize.js deleted file mode 100644 index 08695e5d..00000000 --- a/node_modules/@jest/core/build/pluralize.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = pluralize; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function pluralize(word, count, ending) { - return `${count} ${word}${count === 1 ? '' : ending}`; -} diff --git a/node_modules/@jest/core/build/runGlobalHook.d.ts b/node_modules/@jest/core/build/runGlobalHook.d.ts deleted file mode 100644 index d13c154f..00000000 --- a/node_modules/@jest/core/build/runGlobalHook.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -declare const _default: ({ allTests, globalConfig, moduleName, }: { - allTests: import("jest-runner/build/types").Test[]; - globalConfig: Config.GlobalConfig; - moduleName: "globalSetup" | "globalTeardown"; -}) => Promise; -export default _default; -//# sourceMappingURL=runGlobalHook.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/runGlobalHook.d.ts.map b/node_modules/@jest/core/build/runGlobalHook.d.ts.map deleted file mode 100644 index f96021b4..00000000 --- a/node_modules/@jest/core/build/runGlobalHook.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"runGlobalHook.d.ts","sourceRoot":"","sources":["../src/runGlobalHook.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;;;;;;AAKnC,wBAiDE"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/runGlobalHook.js b/node_modules/@jest/core/build/runGlobalHook.js deleted file mode 100644 index 6d1bfb8b..00000000 --- a/node_modules/@jest/core/build/runGlobalHook.js +++ /dev/null @@ -1,149 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _pEachSeries() { - const data = _interopRequireDefault(require('p-each-series')); - - _pEachSeries = function _pEachSeries() { - return data; - }; - - return data; -} - -function _transform() { - const data = require('@jest/transform'); - - _transform = function _transform() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -var _default = - /*#__PURE__*/ - (function() { - var _ref = _asyncToGenerator(function*({ - allTests, - globalConfig, - moduleName - }) { - const globalModulePaths = new Set( - allTests.map(test => test.context.config[moduleName]) - ); - - if (globalConfig[moduleName]) { - globalModulePaths.add(globalConfig[moduleName]); - } - - if (globalModulePaths.size > 0) { - yield (0, _pEachSeries().default)( - Array.from(globalModulePaths), - /*#__PURE__*/ - (function() { - var _ref2 = _asyncToGenerator(function*(modulePath) { - if (!modulePath) { - return; - } - - const correctConfig = allTests.find( - t => t.context.config[moduleName] === modulePath - ); - const projectConfig = correctConfig - ? correctConfig.context.config // Fallback to first config - : allTests[0].context.config; - const transformer = new (_transform()).ScriptTransformer( - projectConfig - ); - yield transformer.requireAndTranspileModule( - modulePath, - /*#__PURE__*/ - (function() { - var _ref3 = _asyncToGenerator(function*(m) { - const globalModule = (0, _jestUtil().interopRequireDefault)( - m - ).default; - - if (typeof globalModule !== 'function') { - throw new TypeError( - `${moduleName} file must export a function at ${modulePath}` - ); - } - - yield globalModule(globalConfig); - }); - - return function(_x3) { - return _ref3.apply(this, arguments); - }; - })() - ); - }); - - return function(_x2) { - return _ref2.apply(this, arguments); - }; - })() - ); - } - - return Promise.resolve(); - }); - - return function(_x) { - return _ref.apply(this, arguments); - }; - })(); - -exports.default = _default; diff --git a/node_modules/@jest/core/build/runJest.d.ts b/node_modules/@jest/core/build/runJest.d.ts deleted file mode 100644 index c234b55b..00000000 --- a/node_modules/@jest/core/build/runJest.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { JestHookEmitter } from 'jest-watcher'; -import { Config } from '@jest/types'; -import { AggregatedResult } from '@jest/test-result'; -import { ChangedFiles } from 'jest-changed-files'; -import FailedTestsCache from './FailedTestsCache'; -import TestWatcher from './TestWatcher'; -import { Filter } from './types'; -declare const _default: ({ contexts, globalConfig, outputStream, testWatcher, jestHooks, startRun, changedFilesPromise, onComplete, failedTestsCache, filter, }: { - globalConfig: Config.GlobalConfig; - contexts: import("jest-runtime/build/types").Context[]; - outputStream: NodeJS.WritableStream; - testWatcher: TestWatcher; - jestHooks?: JestHookEmitter | undefined; - startRun: (globalConfig: Config.GlobalConfig) => void; - changedFilesPromise?: Promise | undefined; - onComplete: (testResults: AggregatedResult) => void; - failedTestsCache?: FailedTestsCache | undefined; - filter?: Filter | undefined; -}) => Promise; -export default _default; -//# sourceMappingURL=runJest.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/runJest.d.ts.map b/node_modules/@jest/core/build/runJest.d.ts.map deleted file mode 100644 index d1dd2b5a..00000000 --- a/node_modules/@jest/core/build/runJest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"runJest.d.ts","sourceRoot":"","sources":["../src/runJest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AASH,OAAO,EAAW,eAAe,EAAC,MAAM,cAAc,CAAC;AAGvD,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EACL,gBAAgB,EAEjB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAC,YAAY,EAAsB,MAAM,oBAAoB,CAAC;AAKrE,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAc,MAAM,EAAC,MAAM,SAAS,CAAC;;;;;;;;;;;;;AA2F5C,wBAgJG"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/runJest.js b/node_modules/@jest/core/build/runJest.js deleted file mode 100644 index 8640c66d..00000000 --- a/node_modules/@jest/core/build/runJest.js +++ /dev/null @@ -1,446 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _realpathNative() { - const data = require('realpath-native'); - - _realpathNative = function _realpathNative() { - return data; - }; - - return data; -} - -function _console() { - const data = require('@jest/console'); - - _console = function _console() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _exit() { - const data = _interopRequireDefault(require('exit')); - - _exit = function _exit() { - return data; - }; - - return data; -} - -function _gracefulFs() { - const data = _interopRequireDefault(require('graceful-fs')); - - _gracefulFs = function _gracefulFs() { - return data; - }; - - return data; -} - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -function _testResult() { - const data = require('@jest/test-result'); - - _testResult = function _testResult() { - return data; - }; - - return data; -} - -var _getNoTestsFoundMessage = _interopRequireDefault( - require('./getNoTestsFoundMessage') -); - -var _runGlobalHook = _interopRequireDefault(require('./runGlobalHook')); - -var _SearchSource = _interopRequireDefault(require('./SearchSource')); - -var _TestScheduler = _interopRequireDefault(require('./TestScheduler')); - -var _collectHandles = _interopRequireDefault(require('./collectHandles')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -const getTestPaths = - /*#__PURE__*/ - (function() { - var _ref = _asyncToGenerator(function*( - globalConfig, - context, - outputStream, - changedFiles, - jestHooks, - filter - ) { - const source = new _SearchSource.default(context); - const data = yield source.getTestPaths( - globalConfig, - changedFiles, - filter - ); - - if (!data.tests.length && globalConfig.onlyChanged && data.noSCM) { - new (_console()).CustomConsole(outputStream, outputStream).log( - 'Jest can only find uncommitted changed files in a git or hg ' + - 'repository. If you make your project a git or hg ' + - 'repository (`git init` or `hg init`), Jest will be able ' + - 'to only run tests related to files changed since the last ' + - 'commit.' - ); - } - - const shouldTestArray = yield Promise.all( - data.tests.map(test => - jestHooks.shouldRunTestSuite({ - config: test.context.config, - duration: test.duration, - testPath: test.path - }) - ) - ); - const filteredTests = data.tests.filter((_test, i) => shouldTestArray[i]); - return _objectSpread({}, data, { - allTests: filteredTests.length, - tests: filteredTests - }); - }); - - return function getTestPaths(_x, _x2, _x3, _x4, _x5, _x6) { - return _ref.apply(this, arguments); - }; - })(); - -const processResults = (runResults, options) => { - const outputFile = options.outputFile, - isJSON = options.json, - onComplete = options.onComplete, - outputStream = options.outputStream, - testResultsProcessor = options.testResultsProcessor, - collectHandles = options.collectHandles; - - if (collectHandles) { - runResults.openHandles = collectHandles(); - } else { - runResults.openHandles = []; - } - - if (testResultsProcessor) { - runResults = require(testResultsProcessor)(runResults); - } - - if (isJSON) { - if (outputFile) { - const cwd = (0, _realpathNative().sync)(process.cwd()); - - const filePath = _path().default.resolve(cwd, outputFile); - - _gracefulFs().default.writeFileSync( - filePath, - JSON.stringify((0, _jestUtil().formatTestResults)(runResults)) - ); - - outputStream.write( - `Test results written to: ${_path().default.relative(cwd, filePath)}\n` - ); - } else { - process.stdout.write( - JSON.stringify((0, _jestUtil().formatTestResults)(runResults)) - ); - } - } - - return onComplete && onComplete(runResults); -}; - -const testSchedulerContext = { - firstRun: true, - previousSuccess: true -}; - -var _default = - /*#__PURE__*/ - (function() { - var _runJest = _asyncToGenerator(function*({ - contexts, - globalConfig, - outputStream, - testWatcher, - jestHooks = new (_jestWatcher()).JestHook().getEmitter(), - startRun, - changedFilesPromise, - onComplete, - failedTestsCache, - filter - }) { - const Sequencer = (0, _jestUtil().interopRequireDefault)( - require(globalConfig.testSequencer) - ).default; - const sequencer = new Sequencer(); - let allTests = []; - - if (changedFilesPromise && globalConfig.watch) { - const _ref2 = yield changedFilesPromise, - repos = _ref2.repos; - - const noSCM = Object.keys(repos).every(scm => repos[scm].size === 0); - - if (noSCM) { - process.stderr.write( - '\n' + - _chalk().default.bold('--watch') + - ' is not supported without git/hg, please use --watchAll ' + - '\n' - ); - (0, _exit().default)(1); - } - } - - const testRunData = yield Promise.all( - contexts.map( - /*#__PURE__*/ - (function() { - var _ref3 = _asyncToGenerator(function*(context) { - const matches = yield getTestPaths( - globalConfig, - context, - outputStream, - changedFilesPromise && (yield changedFilesPromise), - jestHooks, - filter - ); - allTests = allTests.concat(matches.tests); - return { - context, - matches - }; - }); - - return function(_x8) { - return _ref3.apply(this, arguments); - }; - })() - ) - ); - allTests = yield sequencer.sort(allTests); - - if (globalConfig.listTests) { - const testsPaths = Array.from(new Set(allTests.map(test => test.path))); - - if (globalConfig.json) { - console.log(JSON.stringify(testsPaths)); - } else { - console.log(testsPaths.join('\n')); - } - - onComplete && - onComplete((0, _testResult().makeEmptyAggregatedTestResult)()); - return null; - } - - if (globalConfig.onlyFailures && failedTestsCache) { - allTests = failedTestsCache.filterTests(allTests); - globalConfig = failedTestsCache.updateConfig(globalConfig); - } - - const hasTests = allTests.length > 0; - - if (!hasTests) { - const noTestsFoundMessage = (0, _getNoTestsFoundMessage.default)( - testRunData, - globalConfig - ); - - if ( - globalConfig.passWithNoTests || - globalConfig.findRelatedTests || - globalConfig.lastCommit || - globalConfig.onlyChanged - ) { - new (_console()).CustomConsole(outputStream, outputStream).log( - noTestsFoundMessage - ); - } else { - new (_console()).CustomConsole(outputStream, outputStream).error( - noTestsFoundMessage - ); - (0, _exit().default)(1); - } - } else if ( - allTests.length === 1 && - globalConfig.silent !== true && - globalConfig.verbose !== false - ) { - const newConfig = _objectSpread({}, globalConfig, { - verbose: true - }); - - globalConfig = Object.freeze(newConfig); - } - - let collectHandles; - - if (globalConfig.detectOpenHandles) { - collectHandles = (0, _collectHandles.default)(); - } - - if (hasTests) { - yield (0, _runGlobalHook.default)({ - allTests, - globalConfig, - moduleName: 'globalSetup' - }); - } - - if (changedFilesPromise) { - testSchedulerContext.changedFiles = (yield changedFilesPromise).changedFiles; - } - - const results = yield new _TestScheduler.default( - globalConfig, - { - startRun - }, - testSchedulerContext - ).scheduleTests(allTests, testWatcher); - sequencer.cacheResults(allTests, results); - - if (hasTests) { - yield (0, _runGlobalHook.default)({ - allTests, - globalConfig, - moduleName: 'globalTeardown' - }); - } - - return processResults(results, { - collectHandles, - json: globalConfig.json, - onComplete, - outputFile: globalConfig.outputFile, - outputStream, - testResultsProcessor: globalConfig.testResultsProcessor - }); - }); - - function runJest(_x7) { - return _runJest.apply(this, arguments); - } - - return runJest; - })(); - -exports.default = _default; diff --git a/node_modules/@jest/core/build/testSchedulerHelper.d.ts b/node_modules/@jest/core/build/testSchedulerHelper.d.ts deleted file mode 100644 index 9dfc5b77..00000000 --- a/node_modules/@jest/core/build/testSchedulerHelper.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { Test } from 'jest-runner'; -export declare function shouldRunInBand(tests: Array, timings: Array, { detectOpenHandles, maxWorkers, watch, watchAll }: Config.GlobalConfig): boolean; -//# sourceMappingURL=testSchedulerHelper.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/testSchedulerHelper.d.ts.map b/node_modules/@jest/core/build/testSchedulerHelper.d.ts.map deleted file mode 100644 index 01c79112..00000000 --- a/node_modules/@jest/core/build/testSchedulerHelper.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"testSchedulerHelper.d.ts","sourceRoot":"","sources":["../src/testSchedulerHelper.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AAIjC,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAClB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,EACtB,EAAC,iBAAiB,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAC,EAAE,MAAM,CAAC,YAAY,WAgCtE"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/testSchedulerHelper.js b/node_modules/@jest/core/build/testSchedulerHelper.js deleted file mode 100644 index 78cf48c2..00000000 --- a/node_modules/@jest/core/build/testSchedulerHelper.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.shouldRunInBand = shouldRunInBand; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const SLOW_TEST_TIME = 1000; - -function shouldRunInBand( - tests, - timings, - {detectOpenHandles, maxWorkers, watch, watchAll} -) { - // detectOpenHandles makes no sense without runInBand, because it cannot detect leaks in workers - if (detectOpenHandles) { - return true; - } - /* - * Run in band if we only have one test or one worker available, unless we - * are using the watch mode, in which case the TTY has to be responsive and - * we cannot schedule anything in the main thread. Same logic applies to - * watchAll. - * Also, if we are confident from previous runs that the tests will finish - * quickly we also run in band to reduce the overhead of spawning workers. - * Finally, the user can provide the runInBand argument in the CLI to - * force running in band. - * https://github.com/facebook/jest/blob/700e0dadb85f5dc8ff5dac6c7e98956690049734/packages/jest-config/src/getMaxWorkers.js#L14-L17 - */ - - const isWatchMode = watch || watchAll; - const areFastTests = timings.every(timing => timing < SLOW_TEST_TIME); - const oneWorkerOrLess = maxWorkers <= 1; - const oneTestOrLess = tests.length <= 1; - - if (isWatchMode) { - return oneWorkerOrLess || (oneTestOrLess && areFastTests); - } - - return ( - oneWorkerOrLess || - oneTestOrLess || - (tests.length <= 20 && timings.length > 0 && areFastTests) - ); -} diff --git a/node_modules/@jest/core/build/types.d.ts b/node_modules/@jest/core/build/types.d.ts deleted file mode 100644 index 62f92265..00000000 --- a/node_modules/@jest/core/build/types.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Context } from 'jest-runtime'; -import { Test } from 'jest-runner'; -import { Config } from '@jest/types'; -export declare type Stats = { - roots: number; - testMatch: number; - testPathIgnorePatterns: number; - testRegex: number; - testPathPattern?: number; -}; -export declare type TestRunData = Array<{ - context: Context; - matches: { - allTests: number; - tests: Array; - total?: number; - stats?: Stats; - }; -}>; -export declare type TestPathCases = Array<{ - stat: keyof Stats; - isMatch: (path: Config.Path) => boolean; -}>; -export declare type TestPathCasesWithPathPattern = TestPathCases & { - testPathPattern: (path: Config.Path) => boolean; -}; -export declare type FilterResult = { - test: string; - message: string; -}; -export declare type Filter = (testPaths: Array) => Promise<{ - filtered: Array; -}>; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/types.d.ts.map b/node_modules/@jest/core/build/types.d.ts.map deleted file mode 100644 index 90d0d94f..00000000 --- a/node_modules/@jest/core/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,oBAAY,KAAK,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,oBAAY,WAAW,GAAG,KAAK,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE;QACP,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,KAAK,CAAC;KACf,CAAC;CACH,CAAC,CAAC;AAEH,oBAAY,aAAa,GAAG,KAAK,CAAC;IAChC,IAAI,EAAE,MAAM,KAAK,CAAC;IAClB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,KAAK,OAAO,CAAC;CACzC,CAAC,CAAC;AAEH,oBAAY,4BAA4B,GAAG,aAAa,GAAG;IACzD,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,KAAK,OAAO,CAAC;CACjD,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,MAAM,GAAG,CACnB,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,KACrB,OAAO,CAAC;IACX,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;CAC/B,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/types.js b/node_modules/@jest/core/build/types.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/@jest/core/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/@jest/core/build/version.d.ts b/node_modules/@jest/core/build/version.d.ts deleted file mode 100644 index f52c98ea..00000000 --- a/node_modules/@jest/core/build/version.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default function getVersion(): string; -//# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/version.d.ts.map b/node_modules/@jest/core/build/version.d.ts.map deleted file mode 100644 index 95202179..00000000 --- a/node_modules/@jest/core/build/version.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,CAAC,OAAO,UAAU,UAAU,IAAI,MAAM,CAE3C"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/version.js b/node_modules/@jest/core/build/version.js deleted file mode 100644 index 61cf567c..00000000 --- a/node_modules/@jest/core/build/version.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = getVersion; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// Cannot be `import` as it's not under TS root dir -const _require = require('../package.json'), - VERSION = _require.version; - -function getVersion() { - return VERSION; -} diff --git a/node_modules/@jest/core/build/watch.d.ts b/node_modules/@jest/core/build/watch.d.ts deleted file mode 100644 index 2e5a2723..00000000 --- a/node_modules/@jest/core/build/watch.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import HasteMap from 'jest-haste-map'; -import { Context } from 'jest-runtime'; -import { Config } from '@jest/types'; -import { JestHook } from 'jest-watcher'; -import { Filter } from './types'; -export default function watch(initialGlobalConfig: Config.GlobalConfig, contexts: Array, outputStream: NodeJS.WriteStream, hasteMapInstances: Array, stdin?: NodeJS.ReadStream, hooks?: JestHook, filter?: Filter): Promise; -//# sourceMappingURL=watch.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/core/build/watch.d.ts.map b/node_modules/@jest/core/build/watch.d.ts.map deleted file mode 100644 index eae32654..00000000 --- a/node_modules/@jest/core/build/watch.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../src/watch.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAOH,OAAO,QAA4B,MAAM,gBAAgB,CAAC;AAI1D,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AAErC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAGL,QAAQ,EAGT,MAAM,cAAc,CAAC;AAmBtB,OAAO,EAAC,MAAM,EAAC,MAAM,SAAS,CAAC;AAsC/B,MAAM,CAAC,OAAO,UAAU,KAAK,CAC3B,mBAAmB,EAAE,MAAM,CAAC,YAAY,EACxC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,EACxB,YAAY,EAAE,MAAM,CAAC,WAAW,EAChC,iBAAiB,EAAE,KAAK,CAAC,QAAQ,CAAC,EAClC,KAAK,GAAE,MAAM,CAAC,UAA0B,EACxC,KAAK,GAAE,QAAyB,EAChC,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CA2Wf"} \ No newline at end of file diff --git a/node_modules/@jest/core/build/watch.js b/node_modules/@jest/core/build/watch.js deleted file mode 100644 index 2b5c7ddf..00000000 --- a/node_modules/@jest/core/build/watch.js +++ /dev/null @@ -1,776 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = watch; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _ansiEscapes() { - const data = _interopRequireDefault(require('ansi-escapes')); - - _ansiEscapes = function _ansiEscapes() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _exit() { - const data = _interopRequireDefault(require('exit')); - - _exit = function _exit() { - return data; - }; - - return data; -} - -function _slash() { - const data = _interopRequireDefault(require('slash')); - - _slash = function _slash() { - return data; - }; - - return data; -} - -function _jestMessageUtil() { - const data = require('jest-message-util'); - - _jestMessageUtil = function _jestMessageUtil() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _jestValidate() { - const data = require('jest-validate'); - - _jestValidate = function _jestValidate() { - return data; - }; - - return data; -} - -function _jestResolve() { - const data = _interopRequireDefault(require('jest-resolve')); - - _jestResolve = function _jestResolve() { - return data; - }; - - return data; -} - -function _jestWatcher() { - const data = require('jest-watcher'); - - _jestWatcher = function _jestWatcher() { - return data; - }; - - return data; -} - -var _getChangedFilesPromise = _interopRequireDefault( - require('./getChangedFilesPromise') -); - -var _is_valid_path = _interopRequireDefault(require('./lib/is_valid_path')); - -var _create_context = _interopRequireDefault(require('./lib/create_context')); - -var _runJest = _interopRequireDefault(require('./runJest')); - -var _update_global_config = _interopRequireDefault( - require('./lib/update_global_config') -); - -var _SearchSource = _interopRequireDefault(require('./SearchSource')); - -var _TestWatcher = _interopRequireDefault(require('./TestWatcher')); - -var _FailedTestsCache = _interopRequireDefault(require('./FailedTestsCache')); - -var _test_path_pattern = _interopRequireDefault( - require('./plugins/test_path_pattern') -); - -var _test_name_pattern = _interopRequireDefault( - require('./plugins/test_name_pattern') -); - -var _update_snapshots = _interopRequireDefault( - require('./plugins/update_snapshots') -); - -var _update_snapshots_interactive = _interopRequireDefault( - require('./plugins/update_snapshots_interactive') -); - -var _quit = _interopRequireDefault(require('./plugins/quit')); - -var _watch_plugins_helpers = require('./lib/watch_plugins_helpers'); - -var _active_filters_message = _interopRequireDefault( - require('./lib/active_filters_message') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const preRunMessagePrint = _jestUtil().preRunMessage.print; - -let hasExitListener = false; -const INTERNAL_PLUGINS = [ - _test_path_pattern.default, - _test_name_pattern.default, - _update_snapshots.default, - _update_snapshots_interactive.default, - _quit.default -]; -const RESERVED_KEY_PLUGINS = new Map([ - [ - _update_snapshots.default, - { - forbiddenOverwriteMessage: 'updating snapshots', - key: 'u' - } - ], - [ - _update_snapshots_interactive.default, - { - forbiddenOverwriteMessage: 'updating snapshots interactively', - key: 'i' - } - ], - [ - _quit.default, - { - forbiddenOverwriteMessage: 'quitting watch mode' - } - ] -]); - -function watch( - initialGlobalConfig, - contexts, - outputStream, - hasteMapInstances, - stdin = process.stdin, - hooks = new (_jestWatcher()).JestHook(), - filter -) { - // `globalConfig` will be constantly updated and reassigned as a result of - // watch mode interactions. - let globalConfig = initialGlobalConfig; - let activePlugin; - globalConfig = (0, _update_global_config.default)(globalConfig, { - mode: globalConfig.watch ? 'watch' : 'watchAll', - passWithNoTests: true - }); - - const updateConfigAndRun = ({ - bail, - changedSince, - collectCoverage, - collectCoverageFrom, - collectCoverageOnlyFrom, - coverageDirectory, - coverageReporters, - mode, - notify, - notifyMode, - onlyFailures, - reporters, - testNamePattern, - testPathPattern, - updateSnapshot, - verbose - } = {}) => { - const previousUpdateSnapshot = globalConfig.updateSnapshot; - globalConfig = (0, _update_global_config.default)(globalConfig, { - bail, - changedSince, - collectCoverage, - collectCoverageFrom, - collectCoverageOnlyFrom, - coverageDirectory, - coverageReporters, - mode, - notify, - notifyMode, - onlyFailures, - reporters, - testNamePattern, - testPathPattern, - updateSnapshot, - verbose - }); - startRun(globalConfig); - globalConfig = (0, _update_global_config.default)(globalConfig, { - // updateSnapshot is not sticky after a run. - updateSnapshot: - previousUpdateSnapshot === 'all' ? 'none' : previousUpdateSnapshot - }); - }; - - const watchPlugins = INTERNAL_PLUGINS.map( - InternalPlugin => - new InternalPlugin({ - stdin, - stdout: outputStream - }) - ); - watchPlugins.forEach(plugin => { - const hookSubscriber = hooks.getSubscriber(); - - if (plugin.apply) { - plugin.apply(hookSubscriber); - } - }); - - if (globalConfig.watchPlugins != null) { - const watchPluginKeys = new Map(); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = watchPlugins[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const plugin = _step.value; - const reservedInfo = RESERVED_KEY_PLUGINS.get(plugin.constructor) || {}; - const key = reservedInfo.key || getPluginKey(plugin, globalConfig); - - if (!key) { - continue; - } - - const forbiddenOverwriteMessage = - reservedInfo.forbiddenOverwriteMessage; - watchPluginKeys.set(key, { - forbiddenOverwriteMessage, - overwritable: forbiddenOverwriteMessage == null, - plugin - }); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for ( - var _iterator2 = globalConfig.watchPlugins[Symbol.iterator](), _step2; - !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); - _iteratorNormalCompletion2 = true - ) { - const pluginWithConfig = _step2.value; - let plugin; - - try { - const ThirdPartyPlugin = require(pluginWithConfig.path); - - plugin = new ThirdPartyPlugin({ - config: pluginWithConfig.config, - stdin, - stdout: outputStream - }); - } catch (error) { - const errorWithContext = new Error( - `Failed to initialize watch plugin "${_chalk().default.bold( - (0, _slash().default)( - _path().default.relative(process.cwd(), pluginWithConfig.path) - ) - )}":\n\n${(0, _jestMessageUtil().formatExecError)( - error, - contexts[0].config, - { - noStackTrace: false - } - )}` - ); - delete errorWithContext.stack; - return Promise.reject(errorWithContext); - } - - checkForConflicts(watchPluginKeys, plugin, globalConfig); - const hookSubscriber = hooks.getSubscriber(); - - if (plugin.apply) { - plugin.apply(hookSubscriber); - } - - watchPlugins.push(plugin); - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - } - - const failedTestsCache = new _FailedTestsCache.default(); - let searchSources = contexts.map(context => ({ - context, - searchSource: new _SearchSource.default(context) - })); - let isRunning = false; - let testWatcher; - let shouldDisplayWatchUsage = true; - let isWatchUsageDisplayed = false; - - const emitFileChange = () => { - if (hooks.isUsed('onFileChange')) { - const projects = searchSources.map(({context, searchSource}) => ({ - config: context.config, - testPaths: searchSource.findMatchingTests('').tests.map(t => t.path) - })); - hooks.getEmitter().onFileChange({ - projects - }); - } - }; - - emitFileChange(); - hasteMapInstances.forEach((hasteMapInstance, index) => { - hasteMapInstance.on('change', ({eventsQueue, hasteFS, moduleMap}) => { - const validPaths = eventsQueue.filter(({filePath}) => - (0, _is_valid_path.default)(globalConfig, filePath) - ); - - if (validPaths.length) { - const context = (contexts[index] = (0, _create_context.default)( - contexts[index].config, - { - hasteFS, - moduleMap - } - )); - activePlugin = null; - searchSources = searchSources.slice(); - searchSources[index] = { - context, - searchSource: new _SearchSource.default(context) - }; - emitFileChange(); - startRun(globalConfig); - } - }); - }); - - if (!hasExitListener) { - hasExitListener = true; - process.on('exit', () => { - if (activePlugin) { - outputStream.write(_ansiEscapes().default.cursorDown()); - outputStream.write(_ansiEscapes().default.eraseDown); - } - }); - } - - const startRun = globalConfig => { - if (isRunning) { - return Promise.resolve(null); - } - - testWatcher = new _TestWatcher.default({ - isWatchMode: true - }); - _jestUtil().isInteractive && - outputStream.write(_jestUtil().specialChars.CLEAR); - preRunMessagePrint(outputStream); - isRunning = true; - const configs = contexts.map(context => context.config); - const changedFilesPromise = (0, _getChangedFilesPromise.default)( - globalConfig, - configs - ); // Clear cache for required modules - - _jestResolve().default.clearDefaultResolverCache(); - - return (0, _runJest.default)({ - changedFilesPromise, - contexts, - failedTestsCache, - filter, - globalConfig, - jestHooks: hooks.getEmitter(), - onComplete: results => { - isRunning = false; - hooks.getEmitter().onTestRunComplete(results); // Create a new testWatcher instance so that re-runs won't be blocked. - // The old instance that was passed to Jest will still be interrupted - // and prevent test runs from the previous run. - - testWatcher = new _TestWatcher.default({ - isWatchMode: true - }); // Do not show any Watch Usage related stuff when running in a - // non-interactive environment - - if (_jestUtil().isInteractive) { - if (shouldDisplayWatchUsage) { - outputStream.write(usage(globalConfig, watchPlugins)); - shouldDisplayWatchUsage = false; // hide Watch Usage after first run - - isWatchUsageDisplayed = true; - } else { - outputStream.write(showToggleUsagePrompt()); - shouldDisplayWatchUsage = false; - isWatchUsageDisplayed = false; - } - } else { - outputStream.write('\n'); - } - - failedTestsCache.setTestResults(results.testResults); - }, - outputStream, - startRun, - testWatcher - }).catch(( - error // Errors thrown inside `runJest`, e.g. by resolvers, are caught here for - ) => - // continuous watch mode execution. We need to reprint them to the - // terminal and give just a little bit of extra space so they fit below - // `preRunMessagePrint` message nicely. - console.error( - '\n\n' + - (0, _jestMessageUtil().formatExecError)(error, contexts[0].config, { - noStackTrace: false - }) - ) - ); - }; - - const onKeypress = key => { - if ( - key === _jestWatcher().KEYS.CONTROL_C || - key === _jestWatcher().KEYS.CONTROL_D - ) { - if (typeof stdin.setRawMode === 'function') { - stdin.setRawMode(false); - } - - outputStream.write('\n'); - (0, _exit().default)(0); - return; - } - - if (activePlugin != null && activePlugin.onKey) { - // if a plugin is activate, Jest should let it handle keystrokes, so ignore - // them here - activePlugin.onKey(key); - return; - } // Abort test run - - const pluginKeys = (0, _watch_plugins_helpers.getSortedUsageRows)( - watchPlugins, - globalConfig - ).map(usage => Number(usage.key).toString(16)); - - if ( - isRunning && - testWatcher && - ['q', _jestWatcher().KEYS.ENTER, 'a', 'o', 'f'] - .concat(pluginKeys) - .includes(key) - ) { - testWatcher.setState({ - interrupted: true - }); - return; - } - - const matchingWatchPlugin = (0, - _watch_plugins_helpers.filterInteractivePlugins)( - watchPlugins, - globalConfig - ).find(plugin => getPluginKey(plugin, globalConfig) === key); - - if (matchingWatchPlugin != null) { - if (isRunning) { - testWatcher.setState({ - interrupted: true - }); - return; - } // "activate" the plugin, which has jest ignore keystrokes so the plugin - // can handle them - - activePlugin = matchingWatchPlugin; - - if (activePlugin.run) { - activePlugin.run(globalConfig, updateConfigAndRun).then( - shouldRerun => { - activePlugin = null; - - if (shouldRerun) { - updateConfigAndRun(); - } - }, - () => { - activePlugin = null; - onCancelPatternPrompt(); - } - ); - } else { - activePlugin = null; - } - } - - switch (key) { - case _jestWatcher().KEYS.ENTER: - startRun(globalConfig); - break; - - case 'a': - globalConfig = (0, _update_global_config.default)(globalConfig, { - mode: 'watchAll', - testNamePattern: '', - testPathPattern: '' - }); - startRun(globalConfig); - break; - - case 'c': - updateConfigAndRun({ - mode: 'watch', - testNamePattern: '', - testPathPattern: '' - }); - break; - - case 'f': - globalConfig = (0, _update_global_config.default)(globalConfig, { - onlyFailures: !globalConfig.onlyFailures - }); - startRun(globalConfig); - break; - - case 'o': - globalConfig = (0, _update_global_config.default)(globalConfig, { - mode: 'watch', - testNamePattern: '', - testPathPattern: '' - }); - startRun(globalConfig); - break; - - case '?': - break; - - case 'w': - if (!shouldDisplayWatchUsage && !isWatchUsageDisplayed) { - outputStream.write(_ansiEscapes().default.cursorUp()); - outputStream.write(_ansiEscapes().default.eraseDown); - outputStream.write(usage(globalConfig, watchPlugins)); - isWatchUsageDisplayed = true; - shouldDisplayWatchUsage = false; - } - - break; - } - }; - - const onCancelPatternPrompt = () => { - outputStream.write(_ansiEscapes().default.cursorHide); - outputStream.write(_jestUtil().specialChars.CLEAR); - outputStream.write(usage(globalConfig, watchPlugins)); - outputStream.write(_ansiEscapes().default.cursorShow); - }; - - if (typeof stdin.setRawMode === 'function') { - stdin.setRawMode(true); - stdin.resume(); - stdin.setEncoding('utf8'); - stdin.on('data', onKeypress); - } - - startRun(globalConfig); - return Promise.resolve(); -} - -const checkForConflicts = (watchPluginKeys, plugin, globalConfig) => { - const key = getPluginKey(plugin, globalConfig); - - if (!key) { - return; - } - - const conflictor = watchPluginKeys.get(key); - - if (!conflictor || conflictor.overwritable) { - watchPluginKeys.set(key, { - overwritable: false, - plugin - }); - return; - } - - let error; - - if (conflictor.forbiddenOverwriteMessage) { - error = ` - Watch plugin ${_chalk().default.bold.red( - getPluginIdentifier(plugin) - )} attempted to register key ${_chalk().default.bold.red(`<${key}>`)}, - that is reserved internally for ${_chalk().default.bold.red( - conflictor.forbiddenOverwriteMessage - )}. - Please change the configuration key for this plugin.`.trim(); - } else { - const plugins = [conflictor.plugin, plugin] - .map(p => _chalk().default.bold.red(getPluginIdentifier(p))) - .join(' and '); - error = ` - Watch plugins ${plugins} both attempted to register key ${_chalk().default.bold.red( - `<${key}>` - )}. - Please change the key configuration for one of the conflicting plugins to avoid overlap.`.trim(); - } - - throw new (_jestValidate()).ValidationError( - 'Watch plugin configuration error', - error - ); -}; - -const getPluginIdentifier = ( - plugin // This breaks as `displayName` is not defined as a static, but since - // WatchPlugin is an interface, and it is my understanding interface - // static fields are not definable anymore, no idea how to circumvent - // this :-( - // @ts-ignore: leave `displayName` be. -) => plugin.constructor.displayName || plugin.constructor.name; - -const getPluginKey = (plugin, globalConfig) => { - if (typeof plugin.getUsageInfo === 'function') { - return ( - plugin.getUsageInfo(globalConfig) || { - key: null - } - ).key; - } - - return null; -}; - -const usage = (globalConfig, watchPlugins, delimiter = '\n') => { - const messages = [ - (0, _active_filters_message.default)(globalConfig), - globalConfig.testPathPattern || globalConfig.testNamePattern - ? _chalk().default.dim(' \u203A Press ') + - 'c' + - _chalk().default.dim(' to clear filters.') - : null, - '\n' + _chalk().default.bold('Watch Usage'), - globalConfig.watch - ? _chalk().default.dim(' \u203A Press ') + - 'a' + - _chalk().default.dim(' to run all tests.') - : null, - globalConfig.onlyFailures - ? _chalk().default.dim(' \u203A Press ') + - 'f' + - _chalk().default.dim(' to quit "only failed tests" mode.') - : _chalk().default.dim(' \u203A Press ') + - 'f' + - _chalk().default.dim(' to run only failed tests.'), - (globalConfig.watchAll || - globalConfig.testPathPattern || - globalConfig.testNamePattern) && - !globalConfig.noSCM - ? _chalk().default.dim(' \u203A Press ') + - 'o' + - _chalk().default.dim(' to only run tests related to changed files.') - : null, - ...(0, _watch_plugins_helpers.getSortedUsageRows)( - watchPlugins, - globalConfig - ).map( - plugin => - _chalk().default.dim(' \u203A Press') + - ' ' + - plugin.key + - ' ' + - _chalk().default.dim(`to ${plugin.prompt}.`) - ), - _chalk().default.dim(' \u203A Press ') + - 'Enter' + - _chalk().default.dim(' to trigger a test run.') - ]; - return messages.filter(message => !!message).join(delimiter) + '\n'; -}; - -const showToggleUsagePrompt = () => - '\n' + - _chalk().default.bold('Watch Usage: ') + - _chalk().default.dim('Press ') + - 'w' + - _chalk().default.dim(' to show more.'); diff --git a/node_modules/@jest/core/node_modules/slash/index.js b/node_modules/@jest/core/node_modules/slash/index.js deleted file mode 100644 index 75d72501..00000000 --- a/node_modules/@jest/core/node_modules/slash/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -module.exports = input => { - const isExtendedLengthPath = /^\\\\\?\\/.test(input); - const hasNonAscii = /[^\u0000-\u0080]+/.test(input); // eslint-disable-line no-control-regex - - if (isExtendedLengthPath || hasNonAscii) { - return input; - } - - return input.replace(/\\/g, '/'); -}; diff --git a/node_modules/@jest/core/node_modules/slash/license b/node_modules/@jest/core/node_modules/slash/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/@jest/core/node_modules/slash/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@jest/core/node_modules/slash/package.json b/node_modules/@jest/core/node_modules/slash/package.json deleted file mode 100644 index 03414b8b..00000000 --- a/node_modules/@jest/core/node_modules/slash/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "slash@2.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "slash@2.0.0", - "_id": "slash@2.0.0", - "_inBundle": false, - "_integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "_location": "/@jest/core/slash", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "slash@2.0.0", - "name": "slash", - "escapedName": "slash", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/@jest/core" - ], - "_resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/slash/issues" - }, - "description": "Convert Windows backslash paths to slash paths", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/slash#readme", - "keywords": [ - "path", - "seperator", - "sep", - "slash", - "backslash", - "windows", - "win" - ], - "license": "MIT", - "name": "slash", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/slash.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0" -} diff --git a/node_modules/@jest/core/node_modules/slash/readme.md b/node_modules/@jest/core/node_modules/slash/readme.md deleted file mode 100644 index 5e2fedbc..00000000 --- a/node_modules/@jest/core/node_modules/slash/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# slash [![Build Status](https://travis-ci.org/sindresorhus/slash.svg?branch=master)](https://travis-ci.org/sindresorhus/slash) - -> Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar` - -[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters. - -This was created since the `path` methods in Node outputs `\\` paths on Windows. - - -## Install - -``` -$ npm install slash -``` - - -## Usage - -```js -const path = require('path'); -const slash = require('slash'); - -const str = path.join('foo', 'bar'); -// Unix => foo/bar -// Windows => foo\\bar - -slash(str); -// Unix => foo/bar -// Windows => foo/bar -``` - - -## API - -### slash(path) - -Type: `string` - -Accepts a Windows backslash path and returns a slash path. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/@jest/core/package.json b/node_modules/@jest/core/package.json deleted file mode 100644 index 2b318985..00000000 --- a/node_modules/@jest/core/package.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "_args": [ - [ - "@jest/core@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@jest/core@24.9.0", - "_id": "@jest/core@24.9.0", - "_inBundle": false, - "_integrity": "sha512-Fogg3s4wlAr1VX7q+rhV9RVnUv5tD7VuWfYy1+whMiWUrvl7U3QJSJyWcDio9Lq2prqYsZaeTv2Rz24pWGkJ2A==", - "_location": "/@jest/core", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@jest/core@24.9.0", - "name": "@jest/core", - "escapedName": "@jest%2fcore", - "scope": "@jest", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/jest/jest-cli" - ], - "_resolved": "https://registry.npmjs.org/@jest/core/-/core-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/console": "^24.7.1", - "@jest/reporters": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.1", - "exit": "^0.1.2", - "graceful-fs": "^4.1.15", - "jest-changed-files": "^24.9.0", - "jest-config": "^24.9.0", - "jest-haste-map": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.9.0", - "jest-resolve-dependencies": "^24.9.0", - "jest-runner": "^24.9.0", - "jest-runtime": "^24.9.0", - "jest-snapshot": "^24.9.0", - "jest-util": "^24.9.0", - "jest-validate": "^24.9.0", - "jest-watcher": "^24.9.0", - "micromatch": "^3.1.10", - "p-each-series": "^1.0.0", - "realpath-native": "^1.1.0", - "rimraf": "^2.5.4", - "slash": "^2.0.0", - "strip-ansi": "^5.0.0" - }, - "description": "Delightful JavaScript Testing.", - "devDependencies": { - "@jest/test-sequencer": "^24.9.0", - "@types/ansi-escapes": "^3.0.1", - "@types/exit": "^0.1.30", - "@types/graceful-fs": "^4.1.2", - "@types/micromatch": "^3.1.0", - "@types/p-each-series": "1.0.0", - "@types/rimraf": "^2.0.2", - "@types/slash": "^2.0.0", - "@types/strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://jestjs.io/", - "keywords": [ - "ava", - "babel", - "coverage", - "easy", - "expect", - "facebook", - "immersive", - "instant", - "jasmine", - "jest", - "jsdom", - "mocha", - "mocking", - "painless", - "qunit", - "runner", - "sandboxed", - "snapshot", - "tap", - "tape", - "test", - "testing", - "typescript", - "watch" - ], - "license": "MIT", - "main": "build/jest.js", - "name": "@jest/core", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-core" - }, - "types": "build/jest.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/@jest/environment/build/index.d.ts b/node_modules/@jest/environment/build/index.d.ts deleted file mode 100644 index 5e55181f..00000000 --- a/node_modules/@jest/environment/build/index.d.ts +++ /dev/null @@ -1,264 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -/// -import { Script } from 'vm'; -import { Circus, Config, Global } from '@jest/types'; -import jestMock, { ModuleMocker } from 'jest-mock'; -import { ScriptTransformer } from '@jest/transform'; -import { JestFakeTimers as FakeTimers } from '@jest/fake-timers'; -declare type JestMockFn = typeof jestMock.fn; -declare type JestMockSpyOn = typeof jestMock.spyOn; -export declare type EnvironmentContext = Partial<{ - console: Console; - docblockPragmas: Record>; - testPath: Config.Path; -}>; -export declare type ModuleWrapper = (module: Module, exports: Module['exports'], require: Module['require'], __dirname: string, __filename: Module['filename'], global: Global.Global, jest: Jest, ...extraGlobals: Array) => unknown; -export declare class JestEnvironment { - constructor(config: Config.ProjectConfig, context?: EnvironmentContext); - global: Global.Global; - fakeTimers: FakeTimers | null; - moduleMocker: ModuleMocker | null; - runScript(script: Script): { - [ScriptTransformer.EVAL_RESULT_VARIABLE]: ModuleWrapper; - } | null; - setup(): Promise; - teardown(): Promise; - handleTestEvent?(event: Circus.Event, state: Circus.State): void; -} -export declare type Module = NodeModule; -export interface LocalModuleRequire extends NodeRequire { - requireActual(moduleName: string): unknown; - requireMock(moduleName: string): unknown; -} -export interface Jest { - /** - * Provides a way to add Jasmine-compatible matchers into your Jest context. - * - * @deprecated Use `expect.extend` instead - */ - addMatchers(matchers: Record): void; - /** - * Advances all timers by the needed milliseconds so that only the next timeouts/intervals will run. - * Optionally, you can provide steps, so it will run steps amount of next timeouts/intervals. - */ - advanceTimersToNextTimer(steps?: number): void; - /** - * Disables automatic mocking in the module loader. - */ - autoMockOff(): Jest; - /** - * Enables automatic mocking in the module loader. - */ - autoMockOn(): Jest; - /** - * Clears the mock.calls and mock.instances properties of all mocks. - * Equivalent to calling .mockClear() on every mocked function. - */ - clearAllMocks(): Jest; - /** - * Removes any pending timers from the timer system. If any timers have been - * scheduled, they will be cleared and will never have the opportunity to - * execute in the future. - */ - clearAllTimers(): void; - /** - * Indicates that the module system should never return a mocked version - * of the specified module, including all of the specified module's - * dependencies. - */ - deepUnmock(moduleName: string): Jest; - /** - * Disables automatic mocking in the module loader. - * - * After this method is called, all `require()`s will return the real - * versions of each module (rather than a mocked version). - */ - disableAutomock(): Jest; - /** - * When using `babel-jest`, calls to mock will automatically be hoisted to - * the top of the code block. Use this method if you want to explicitly avoid - * this behavior. - */ - doMock(moduleName: string, moduleFactory?: () => unknown): Jest; - /** - * Indicates that the module system should never return a mocked version - * of the specified module from require() (e.g. that it should always return - * the real module). - */ - dontMock(moduleName: string): Jest; - /** - * Enables automatic mocking in the module loader. - */ - enableAutomock(): Jest; - /** - * Creates a mock function. Optionally takes a mock implementation. - */ - fn: JestMockFn; - /** - * Given the name of a module, use the automatic mocking system to generate a - * mocked version of the module for you. - * - * This is useful when you want to create a manual mock that extends the - * automatic mock's behavior. - */ - genMockFromModule(moduleName: string): unknown; - /** - * Determines if the given function is a mocked function. - */ - isMockFunction(fn: Function): fn is ReturnType; - /** - * Mocks a module with an auto-mocked version when it is being required. - */ - mock(moduleName: string, moduleFactory?: () => unknown, options?: { - virtual?: boolean; - }): Jest; - /** - * Returns the actual module instead of a mock, bypassing all checks on - * whether the module should receive a mock implementation or not. - * - * @example - ``` - jest.mock('../myModule', () => { - // Require the original module to not be mocked... - const originalModule = jest.requireActual(moduleName); - return { - __esModule: true, // Use it when dealing with esModules - ...originalModule, - getRandom: jest.fn().mockReturnValue(10), - }; - }); - - const getRandom = require('../myModule').getRandom; - - getRandom(); // Always returns 10 - ``` - */ - requireActual: (moduleName: string) => unknown; - /** - * Returns a mock module instead of the actual module, bypassing all checks - * on whether the module should be required normally or not. - */ - requireMock: (moduleName: string) => unknown; - /** - * Resets the state of all mocks. - * Equivalent to calling .mockReset() on every mocked function. - */ - resetAllMocks(): Jest; - /** - * Resets the module registry - the cache of all required modules. This is - * useful to isolate modules where local state might conflict between tests. - * - * @deprecated Use `jest.resetModules()` - */ - resetModuleRegistry(): Jest; - /** - * Resets the module registry - the cache of all required modules. This is - * useful to isolate modules where local state might conflict between tests. - */ - resetModules(): Jest; - /** - * Restores all mocks back to their original value. Equivalent to calling - * `.mockRestore` on every mocked function. - * - * Beware that jest.restoreAllMocks() only works when the mock was created with - * jest.spyOn; other mocks will require you to manually restore them. - */ - restoreAllMocks(): Jest; - /** - * Runs failed tests n-times until they pass or until the max number of - * retries is exhausted. This only works with `jest-circus`! - */ - retryTimes(numRetries: number): Jest; - /** - * Exhausts tasks queued by setImmediate(). - */ - runAllImmediates(): void; - /** - * Exhausts the micro-task queue (usually interfaced in node via - * process.nextTick). - */ - runAllTicks(): void; - /** - * Exhausts the macro-task queue (i.e., all tasks queued by setTimeout() - * and setInterval()). - */ - runAllTimers(): void; - /** - * Executes only the macro-tasks that are currently pending (i.e., only the - * tasks that have been queued by setTimeout() or setInterval() up to this - * point). If any of the currently pending macro-tasks schedule new - * macro-tasks, those new tasks will not be executed by this call. - */ - runOnlyPendingTimers(): void; - /** - * Advances all timers by msToRun milliseconds. All pending "macro-tasks" - * that have been queued via setTimeout() or setInterval(), and would be - * executed within this timeframe will be executed. - */ - advanceTimersByTime(msToRun: number): void; - /** - * Executes only the macro task queue (i.e. all tasks queued by setTimeout() - * or setInterval() and setImmediate()). - * - * @deprecated Use `jest.advanceTimersByTime()` - */ - runTimersToTime(msToRun: number): void; - /** - * Returns the number of fake timers still left to run. - */ - getTimerCount(): number; - /** - * Explicitly supplies the mock object that the module system should return - * for the specified module. - * - * Note It is recommended to use `jest.mock()` instead. The `jest.mock` - * API's second argument is a module factory instead of the expected - * exported module object. - */ - setMock(moduleName: string, moduleExports: unknown): Jest; - /** - * Set the default timeout interval for tests and before/after hooks in - * milliseconds. - * - * Note: The default timeout interval is 5 seconds if this method is not - * called. - */ - setTimeout(timeout: number): Jest; - /** - * Creates a mock function similar to `jest.fn` but also tracks calls to - * `object[methodName]`. - * - * Note: By default, jest.spyOn also calls the spied method. This is - * different behavior from most other test libraries. - */ - spyOn: JestMockSpyOn; - /** - * Indicates that the module system should never return a mocked version of - * the specified module from require() (e.g. that it should always return the - * real module). - */ - unmock(moduleName: string): Jest; - /** - * Instructs Jest to use fake versions of the standard timer functions. - */ - useFakeTimers(): Jest; - /** - * Instructs Jest to use the real versions of the standard timer functions. - */ - useRealTimers(): Jest; - /** - * `jest.isolateModules(fn)` goes a step further than `jest.resetModules()` - * and creates a sandbox registry for the modules that are loaded inside - * the callback function. This is useful to isolate specific modules for - * every test so that local module state doesn't conflict between tests. - */ - isolateModules(fn: () => void): Jest; -} -export {}; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/environment/build/index.d.ts.map b/node_modules/@jest/environment/build/index.d.ts.map deleted file mode 100644 index e564980d..00000000 --- a/node_modules/@jest/environment/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAC,MAAM,aAAa,CAAC;AACnD,OAAO,QAAQ,EAAE,EAAC,YAAY,EAAC,MAAM,WAAW,CAAC;AACjD,OAAO,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAC,cAAc,IAAI,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE/D,aAAK,UAAU,GAAG,OAAO,QAAQ,CAAC,EAAE,CAAC;AACrC,aAAK,aAAa,GAAG,OAAO,QAAQ,CAAC,KAAK,CAAC;AAI3C,oBAAY,kBAAkB,GAAG,OAAO,CAAC;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACxD,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;CACvB,CAAC,CAAC;AAGH,oBAAY,aAAa,GAAG,CAC1B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,EAC1B,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,EAC1B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,EAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,IAAI,EAAE,IAAI,EACV,GAAG,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,KACvD,OAAO,CAAC;AAEb,MAAM,CAAC,OAAO,OAAO,eAAe;gBACtB,MAAM,EAAE,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,EAAE,kBAAkB;IACtE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IACvC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,SAAS,CACP,MAAM,EAAE,MAAM,GACb;QAAC,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,EAAE,aAAa,CAAA;KAAC,GAAG,IAAI;IACnE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IACtB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IACzB,eAAe,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,GAAG,IAAI;CACjE;AAED,oBAAY,MAAM,GAAG,UAAU,CAAC;AAEhC,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3C,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1C;AAGD,MAAM,WAAW,IAAI;IACnB;;;;OAIG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACjD;;;OAGG;IACH,wBAAwB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/C;;OAEG;IACH,WAAW,IAAI,IAAI,CAAC;IACpB;;OAEG;IACH,UAAU,IAAI,IAAI,CAAC;IACnB;;;OAGG;IACH,aAAa,IAAI,IAAI,CAAC;IACtB;;;;OAIG;IACH,cAAc,IAAI,IAAI,CAAC;IACvB;;;;OAIG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC;;;;;OAKG;IACH,eAAe,IAAI,IAAI,CAAC;IACxB;;;;OAIG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC;IAChE;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC;;OAEG;IACH,cAAc,IAAI,IAAI,CAAC;IACvB;;OAEG;IACH,EAAE,EAAE,UAAU,CAAC;IACf;;;;;;OAMG;IACH,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IAC/C;;OAEG;IACH,cAAc,CAAC,EAAE,EAAE,QAAQ,GAAG,EAAE,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC;IAC3D;;OAEG;IACH,IAAI,CACF,UAAU,EAAE,MAAM,EAClB,aAAa,CAAC,EAAE,MAAM,OAAO,EAC7B,OAAO,CAAC,EAAE;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAC,GAC5B,IAAI,CAAC;IACR;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,aAAa,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/C;;;OAGG;IACH,WAAW,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;IAC7C;;;OAGG;IACH,aAAa,IAAI,IAAI,CAAC;IACtB;;;;;OAKG;IACH,mBAAmB,IAAI,IAAI,CAAC;IAC5B;;;OAGG;IACH,YAAY,IAAI,IAAI,CAAC;IACrB;;;;;;OAMG;IACH,eAAe,IAAI,IAAI,CAAC;IACxB;;;OAGG;IACH,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC;;OAEG;IACH,gBAAgB,IAAI,IAAI,CAAC;IACzB;;;OAGG;IACH,WAAW,IAAI,IAAI,CAAC;IACpB;;;OAGG;IACH,YAAY,IAAI,IAAI,CAAC;IACrB;;;;;OAKG;IACH,oBAAoB,IAAI,IAAI,CAAC;IAC7B;;;;OAIG;IACH,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C;;;;;OAKG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC;;OAEG;IACH,aAAa,IAAI,MAAM,CAAC;IACxB;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1D;;;;;;OAMG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;;;;;OAMG;IACH,KAAK,EAAE,aAAa,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC;;OAEG;IACH,aAAa,IAAI,IAAI,CAAC;IACtB;;OAEG;IACH,aAAa,IAAI,IAAI,CAAC;IACtB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CACtC"} \ No newline at end of file diff --git a/node_modules/@jest/environment/build/index.js b/node_modules/@jest/environment/build/index.js deleted file mode 100644 index eb1f9aa3..00000000 --- a/node_modules/@jest/environment/build/index.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -function _transform() { - const data = require('@jest/transform'); - - _transform = function _transform() { - return data; - }; - - return data; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} diff --git a/node_modules/@jest/environment/package.json b/node_modules/@jest/environment/package.json deleted file mode 100644 index 8f19a9cd..00000000 --- a/node_modules/@jest/environment/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_args": [ - [ - "@jest/environment@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@jest/environment@24.9.0", - "_id": "@jest/environment@24.9.0", - "_inBundle": false, - "_integrity": "sha512-5A1QluTPhvdIPFYnO3sZC3smkNeXPVELz7ikPbhUj0bQjB07EoE9qtLrem14ZUYWdVayYbsjVwIiL4WBIMV4aQ==", - "_location": "/@jest/environment", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@jest/environment@24.9.0", - "name": "@jest/environment", - "escapedName": "@jest%2fenvironment", - "scope": "@jest", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/reporters", - "/jest-circus", - "/jest-environment-jsdom", - "/jest-environment-node", - "/jest-jasmine2", - "/jest-runner", - "/jest-runtime" - ], - "_resolved": "https://registry.npmjs.org/@jest/environment/-/environment-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/fake-timers": "^24.9.0", - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "jest-mock": "^24.9.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "@jest/environment", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-environment" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/@jest/fake-timers/LICENSE b/node_modules/@jest/fake-timers/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/@jest/fake-timers/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/@jest/fake-timers/build/index.d.ts b/node_modules/@jest/fake-timers/build/index.d.ts deleted file mode 100644 index f0f802fc..00000000 --- a/node_modules/@jest/fake-timers/build/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export { default as JestFakeTimers } from './jestFakeTimers'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/fake-timers/build/index.d.ts.map b/node_modules/@jest/fake-timers/build/index.d.ts.map deleted file mode 100644 index 59f4fb69..00000000 --- a/node_modules/@jest/fake-timers/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,kBAAkB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/fake-timers/build/index.js b/node_modules/@jest/fake-timers/build/index.js deleted file mode 100644 index 3db39e92..00000000 --- a/node_modules/@jest/fake-timers/build/index.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -Object.defineProperty(exports, 'JestFakeTimers', { - enumerable: true, - get: function get() { - return _jestFakeTimers.default; - } -}); - -var _jestFakeTimers = _interopRequireDefault(require('./jestFakeTimers')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} diff --git a/node_modules/@jest/fake-timers/build/jestFakeTimers.d.ts b/node_modules/@jest/fake-timers/build/jestFakeTimers.d.ts deleted file mode 100644 index 93f8752a..00000000 --- a/node_modules/@jest/fake-timers/build/jestFakeTimers.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { ModuleMocker } from 'jest-mock'; -import { StackTraceConfig } from 'jest-message-util'; -declare type Callback = (...args: Array) => void; -declare type TimerConfig = { - idToRef: (id: number) => Ref; - refToId: (ref: Ref) => number | void; -}; -export default class FakeTimers { - private _cancelledImmediates; - private _cancelledTicks; - private _config; - private _disposed?; - private _fakeTimerAPIs; - private _global; - private _immediates; - private _maxLoops; - private _moduleMocker; - private _now; - private _ticks; - private _timerAPIs; - private _timers; - private _uuidCounter; - private _timerConfig; - constructor({ global, moduleMocker, timerConfig, config, maxLoops, }: { - global: NodeJS.Global; - moduleMocker: ModuleMocker; - timerConfig: TimerConfig; - config: StackTraceConfig; - maxLoops?: number; - }); - clearAllTimers(): void; - dispose(): void; - reset(): void; - runAllTicks(): void; - runAllImmediates(): void; - private _runImmediate; - runAllTimers(): void; - runOnlyPendingTimers(): void; - advanceTimersToNextTimer(steps?: number): void; - advanceTimersByTime(msToRun: number): void; - runWithRealTimers(cb: Callback): void; - useRealTimers(): void; - useFakeTimers(): void; - getTimerCount(): number; - private _checkFakeTimers; - private _createMocks; - private _fakeClearTimer; - private _fakeClearImmediate; - private _fakeNextTick; - private _fakeSetImmediate; - private _fakeSetInterval; - private _fakeSetTimeout; - private _getNextTimerHandle; - private _runTimerHandle; -} -export {}; -//# sourceMappingURL=jestFakeTimers.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/fake-timers/build/jestFakeTimers.d.ts.map b/node_modules/@jest/fake-timers/build/jestFakeTimers.d.ts.map deleted file mode 100644 index e841e491..00000000 --- a/node_modules/@jest/fake-timers/build/jestFakeTimers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jestFakeTimers.d.ts","sourceRoot":"","sources":["../src/jestFakeTimers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,YAAY,EAAC,MAAM,WAAW,CAAC;AACvC,OAAO,EAAmB,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAErE,aAAK,QAAQ,GAAG,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;AA2BlD,aAAK,WAAW,CAAC,GAAG,IAAI;IACtB,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,GAAG,CAAC;IAC7B,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,GAAG,IAAI,CAAC;CACtC,CAAC;AAcF,MAAM,CAAC,OAAO,OAAO,UAAU,CAAC,QAAQ;IACtC,OAAO,CAAC,oBAAoB,CAA2B;IACvD,OAAO,CAAC,eAAe,CAA2B;IAClD,OAAO,CAAC,OAAO,CAAmB;IAClC,OAAO,CAAC,SAAS,CAAC,CAAU;IAC5B,OAAO,CAAC,cAAc,CAAY;IAClC,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,WAAW,CAAe;IAClC,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,aAAa,CAAe;IACpC,OAAO,CAAC,IAAI,CAAU;IACtB,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,UAAU,CAAW;IAC7B,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,YAAY,CAAwB;gBAEhC,EACV,MAAM,EACN,YAAY,EACZ,WAAW,EACX,MAAM,EACN,QAAQ,GACT,EAAE;QACD,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;QACtB,YAAY,EAAE,YAAY,CAAC;QAC3B,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;QACnC,MAAM,EAAE,gBAAgB,CAAC;QACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;IAuBD,cAAc;IAOd,OAAO;IAKP,KAAK;IASL,WAAW;IA6BX,gBAAgB;IAsBhB,OAAO,CAAC,aAAa;IAQrB,YAAY;IAwCZ,oBAAoB;IAapB,wBAAwB,CAAC,KAAK,SAAI;IAiBlC,mBAAmB,CAAC,OAAO,EAAE,MAAM;IAuCnC,iBAAiB,CAAC,EAAE,EAAE,QAAQ;IAiC9B,aAAa;IAYb,aAAa;IAcb,aAAa;IAMb,OAAO,CAAC,gBAAgB;IAkBxB,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,aAAa;IAsBrB,OAAO,CAAC,iBAAiB;IAwBzB,OAAO,CAAC,gBAAgB;IAyBxB,OAAO,CAAC,eAAe;IAwBvB,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,eAAe;CAuBxB"} \ No newline at end of file diff --git a/node_modules/@jest/fake-timers/build/jestFakeTimers.js b/node_modules/@jest/fake-timers/build/jestFakeTimers.js deleted file mode 100644 index f7db2541..00000000 --- a/node_modules/@jest/fake-timers/build/jestFakeTimers.js +++ /dev/null @@ -1,574 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestMessageUtil() { - const data = require('jest-message-util'); - - _jestMessageUtil = function _jestMessageUtil() { - return data; - }; - - return data; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const MS_IN_A_YEAR = 31536000000; // TODO: Copied from `jest-util` to avoid cyclic dependency. Import from `jest-util` in the next major - -const setGlobal = (globalToMutate, key, value) => { - // @ts-ignore: no index - globalToMutate[key] = value; -}; - -class FakeTimers { - constructor({global, moduleMocker, timerConfig, config, maxLoops}) { - _defineProperty(this, '_cancelledImmediates', void 0); - - _defineProperty(this, '_cancelledTicks', void 0); - - _defineProperty(this, '_config', void 0); - - _defineProperty(this, '_disposed', void 0); - - _defineProperty(this, '_fakeTimerAPIs', void 0); - - _defineProperty(this, '_global', void 0); - - _defineProperty(this, '_immediates', void 0); - - _defineProperty(this, '_maxLoops', void 0); - - _defineProperty(this, '_moduleMocker', void 0); - - _defineProperty(this, '_now', void 0); - - _defineProperty(this, '_ticks', void 0); - - _defineProperty(this, '_timerAPIs', void 0); - - _defineProperty(this, '_timers', void 0); - - _defineProperty(this, '_uuidCounter', void 0); - - _defineProperty(this, '_timerConfig', void 0); - - this._global = global; - this._timerConfig = timerConfig; - this._config = config; - this._maxLoops = maxLoops || 100000; - this._uuidCounter = 1; - this._moduleMocker = moduleMocker; // Store original timer APIs for future reference - - this._timerAPIs = { - clearImmediate: global.clearImmediate, - clearInterval: global.clearInterval, - clearTimeout: global.clearTimeout, - nextTick: global.process && global.process.nextTick, - setImmediate: global.setImmediate, - setInterval: global.setInterval, - setTimeout: global.setTimeout - }; - this.reset(); - - this._createMocks(); - } - - clearAllTimers() { - this._immediates.forEach(immediate => - this._fakeClearImmediate(immediate.uuid) - ); - - this._timers.clear(); - } - - dispose() { - this._disposed = true; - this.clearAllTimers(); - } - - reset() { - this._cancelledTicks = {}; - this._cancelledImmediates = {}; - this._now = 0; - this._ticks = []; - this._immediates = []; - this._timers = new Map(); - } - - runAllTicks() { - this._checkFakeTimers(); // Only run a generous number of ticks and then bail. - // This is just to help avoid recursive loops - - let i; - - for (i = 0; i < this._maxLoops; i++) { - const tick = this._ticks.shift(); - - if (tick === undefined) { - break; - } - - if (!this._cancelledTicks.hasOwnProperty(tick.uuid)) { - // Callback may throw, so update the map prior calling. - this._cancelledTicks[tick.uuid] = true; - tick.callback(); - } - } - - if (i === this._maxLoops) { - throw new Error( - 'Ran ' + - this._maxLoops + - ' ticks, and there are still more! ' + - "Assuming we've hit an infinite recursion and bailing out..." - ); - } - } - - runAllImmediates() { - this._checkFakeTimers(); // Only run a generous number of immediates and then bail. - - let i; - - for (i = 0; i < this._maxLoops; i++) { - const immediate = this._immediates.shift(); - - if (immediate === undefined) { - break; - } - - this._runImmediate(immediate); - } - - if (i === this._maxLoops) { - throw new Error( - 'Ran ' + - this._maxLoops + - ' immediates, and there are still more! Assuming ' + - "we've hit an infinite recursion and bailing out..." - ); - } - } - - _runImmediate(immediate) { - if (!this._cancelledImmediates.hasOwnProperty(immediate.uuid)) { - // Callback may throw, so update the map prior calling. - this._cancelledImmediates[immediate.uuid] = true; - immediate.callback(); - } - } - - runAllTimers() { - this._checkFakeTimers(); - - this.runAllTicks(); - this.runAllImmediates(); // Only run a generous number of timers and then bail. - // This is just to help avoid recursive loops - - let i; - - for (i = 0; i < this._maxLoops; i++) { - const nextTimerHandle = this._getNextTimerHandle(); // If there are no more timer handles, stop! - - if (nextTimerHandle === null) { - break; - } - - this._runTimerHandle(nextTimerHandle); // Some of the immediate calls could be enqueued - // during the previous handling of the timers, we should - // run them as well. - - if (this._immediates.length) { - this.runAllImmediates(); - } - - if (this._ticks.length) { - this.runAllTicks(); - } - } - - if (i === this._maxLoops) { - throw new Error( - 'Ran ' + - this._maxLoops + - ' timers, and there are still more! ' + - "Assuming we've hit an infinite recursion and bailing out..." - ); - } - } - - runOnlyPendingTimers() { - // We need to hold the current shape of `this._timers` because existing - // timers can add new ones to the map and hence would run more than necessary. - // See https://github.com/facebook/jest/pull/4608 for details - const timerEntries = Array.from(this._timers.entries()); - - this._checkFakeTimers(); - - this._immediates.forEach(this._runImmediate, this); - - timerEntries - .sort(([, left], [, right]) => left.expiry - right.expiry) - .forEach(([timerHandle]) => this._runTimerHandle(timerHandle)); - } - - advanceTimersToNextTimer(steps = 1) { - if (steps < 1) { - return; - } - - const nextExpiry = Array.from(this._timers.values()).reduce( - (minExpiry, timer) => { - if (minExpiry === null || timer.expiry < minExpiry) return timer.expiry; - return minExpiry; - }, - null - ); - - if (nextExpiry !== null) { - this.advanceTimersByTime(nextExpiry - this._now); - this.advanceTimersToNextTimer(steps - 1); - } - } - - advanceTimersByTime(msToRun) { - this._checkFakeTimers(); // Only run a generous number of timers and then bail. - // This is just to help avoid recursive loops - - let i; - - for (i = 0; i < this._maxLoops; i++) { - const timerHandle = this._getNextTimerHandle(); // If there are no more timer handles, stop! - - if (timerHandle === null) { - break; - } - - const timerValue = this._timers.get(timerHandle); - - if (timerValue === undefined) { - break; - } - - const nextTimerExpiry = timerValue.expiry; - - if (this._now + msToRun < nextTimerExpiry) { - // There are no timers between now and the target we're running to, so - // adjust our time cursor and quit - this._now += msToRun; - break; - } else { - msToRun -= nextTimerExpiry - this._now; - this._now = nextTimerExpiry; - - this._runTimerHandle(timerHandle); - } - } - - if (i === this._maxLoops) { - throw new Error( - 'Ran ' + - this._maxLoops + - ' timers, and there are still more! ' + - "Assuming we've hit an infinite recursion and bailing out..." - ); - } - } - - runWithRealTimers(cb) { - const prevClearImmediate = this._global.clearImmediate; - const prevClearInterval = this._global.clearInterval; - const prevClearTimeout = this._global.clearTimeout; - const prevNextTick = this._global.process.nextTick; - const prevSetImmediate = this._global.setImmediate; - const prevSetInterval = this._global.setInterval; - const prevSetTimeout = this._global.setTimeout; - this.useRealTimers(); - let cbErr = null; - let errThrown = false; - - try { - cb(); - } catch (e) { - errThrown = true; - cbErr = e; - } - - this._global.clearImmediate = prevClearImmediate; - this._global.clearInterval = prevClearInterval; - this._global.clearTimeout = prevClearTimeout; - this._global.process.nextTick = prevNextTick; - this._global.setImmediate = prevSetImmediate; - this._global.setInterval = prevSetInterval; - this._global.setTimeout = prevSetTimeout; - - if (errThrown) { - throw cbErr; - } - } - - useRealTimers() { - const global = this._global; - setGlobal(global, 'clearImmediate', this._timerAPIs.clearImmediate); - setGlobal(global, 'clearInterval', this._timerAPIs.clearInterval); - setGlobal(global, 'clearTimeout', this._timerAPIs.clearTimeout); - setGlobal(global, 'setImmediate', this._timerAPIs.setImmediate); - setGlobal(global, 'setInterval', this._timerAPIs.setInterval); - setGlobal(global, 'setTimeout', this._timerAPIs.setTimeout); - global.process.nextTick = this._timerAPIs.nextTick; - } - - useFakeTimers() { - this._createMocks(); - - const global = this._global; - setGlobal(global, 'clearImmediate', this._fakeTimerAPIs.clearImmediate); - setGlobal(global, 'clearInterval', this._fakeTimerAPIs.clearInterval); - setGlobal(global, 'clearTimeout', this._fakeTimerAPIs.clearTimeout); - setGlobal(global, 'setImmediate', this._fakeTimerAPIs.setImmediate); - setGlobal(global, 'setInterval', this._fakeTimerAPIs.setInterval); - setGlobal(global, 'setTimeout', this._fakeTimerAPIs.setTimeout); - global.process.nextTick = this._fakeTimerAPIs.nextTick; - } - - getTimerCount() { - this._checkFakeTimers(); - - return this._timers.size + this._immediates.length + this._ticks.length; - } - - _checkFakeTimers() { - if (this._global.setTimeout !== this._fakeTimerAPIs.setTimeout) { - this._global.console.warn( - `A function to advance timers was called but the timers API is not ` + - `mocked with fake timers. Call \`jest.useFakeTimers()\` in this ` + - `test or enable fake timers globally by setting ` + - `\`"timers": "fake"\` in ` + - `the configuration file. This warning is likely a result of a ` + - `default configuration change in Jest 15.\n\n` + - `Release Blog Post: https://jestjs.io/blog/2016/09/01/jest-15.html\n` + - `Stack Trace:\n` + - (0, _jestMessageUtil().formatStackTrace)( - new Error().stack, - this._config, - { - noStackTrace: false - } - ) - ); - } - } - - _createMocks() { - const fn = ( - impl // @ts-ignore TODO: figure out better typings here - ) => this._moduleMocker.fn().mockImplementation(impl); // TODO: add better typings; these are mocks, but typed as regular timers - - this._fakeTimerAPIs = { - clearImmediate: fn(this._fakeClearImmediate.bind(this)), - clearInterval: fn(this._fakeClearTimer.bind(this)), - clearTimeout: fn(this._fakeClearTimer.bind(this)), - nextTick: fn(this._fakeNextTick.bind(this)), - setImmediate: fn(this._fakeSetImmediate.bind(this)), - setInterval: fn(this._fakeSetInterval.bind(this)), - setTimeout: fn(this._fakeSetTimeout.bind(this)) - }; - } - - _fakeClearTimer(timerRef) { - const uuid = this._timerConfig.refToId(timerRef); - - if (uuid) { - this._timers.delete(String(uuid)); - } - } - - _fakeClearImmediate(uuid) { - this._cancelledImmediates[uuid] = true; - } - - _fakeNextTick(callback, ...args) { - if (this._disposed) { - return; - } - - const uuid = String(this._uuidCounter++); - - this._ticks.push({ - callback: (function(_callback) { - function callback() { - return _callback.apply(this, arguments); - } - - callback.toString = function() { - return _callback.toString(); - }; - - return callback; - })(() => callback.apply(null, args)), - uuid - }); - - const cancelledTicks = this._cancelledTicks; - - this._timerAPIs.nextTick(() => { - if (!cancelledTicks.hasOwnProperty(uuid)) { - // Callback may throw, so update the map prior calling. - cancelledTicks[uuid] = true; - callback.apply(null, args); - } - }); - } - - _fakeSetImmediate(callback, ...args) { - if (this._disposed) { - return null; - } - - const uuid = this._uuidCounter++; - - this._immediates.push({ - callback: (function(_callback2) { - function callback() { - return _callback2.apply(this, arguments); - } - - callback.toString = function() { - return _callback2.toString(); - }; - - return callback; - })(() => callback.apply(null, args)), - uuid: String(uuid) - }); - - const cancelledImmediates = this._cancelledImmediates; - - this._timerAPIs.setImmediate(() => { - if (!cancelledImmediates.hasOwnProperty(uuid)) { - // Callback may throw, so update the map prior calling. - cancelledImmediates[String(uuid)] = true; - callback.apply(null, args); - } - }); - - return uuid; - } - - _fakeSetInterval(callback, intervalDelay, ...args) { - if (this._disposed) { - return null; - } - - if (intervalDelay == null) { - intervalDelay = 0; - } - - const uuid = this._uuidCounter++; - - this._timers.set(String(uuid), { - callback: (function(_callback3) { - function callback() { - return _callback3.apply(this, arguments); - } - - callback.toString = function() { - return _callback3.toString(); - }; - - return callback; - })(() => callback.apply(null, args)), - expiry: this._now + intervalDelay, - interval: intervalDelay, - type: 'interval' - }); - - return this._timerConfig.idToRef(uuid); - } - - _fakeSetTimeout(callback, delay, ...args) { - if (this._disposed) { - return null; - } // eslint-disable-next-line no-bitwise - - delay = Number(delay) | 0; - const uuid = this._uuidCounter++; - - this._timers.set(String(uuid), { - callback: (function(_callback4) { - function callback() { - return _callback4.apply(this, arguments); - } - - callback.toString = function() { - return _callback4.toString(); - }; - - return callback; - })(() => callback.apply(null, args)), - expiry: this._now + delay, - interval: undefined, - type: 'timeout' - }); - - return this._timerConfig.idToRef(uuid); - } - - _getNextTimerHandle() { - let nextTimerHandle = null; - let soonestTime = MS_IN_A_YEAR; - - this._timers.forEach((timer, uuid) => { - if (timer.expiry < soonestTime) { - soonestTime = timer.expiry; - nextTimerHandle = uuid; - } - }); - - return nextTimerHandle; - } - - _runTimerHandle(timerHandle) { - const timer = this._timers.get(timerHandle); - - if (!timer) { - return; - } - - switch (timer.type) { - case 'timeout': - const callback = timer.callback; - - this._timers.delete(timerHandle); - - callback(); - break; - - case 'interval': - timer.expiry = this._now + (timer.interval || 0); - timer.callback(); - break; - - default: - throw new Error('Unexpected timer type: ' + timer.type); - } - } -} - -exports.default = FakeTimers; diff --git a/node_modules/@jest/fake-timers/package.json b/node_modules/@jest/fake-timers/package.json deleted file mode 100644 index 12d59503..00000000 --- a/node_modules/@jest/fake-timers/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_args": [ - [ - "@jest/fake-timers@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@jest/fake-timers@24.9.0", - "_id": "@jest/fake-timers@24.9.0", - "_inBundle": false, - "_integrity": "sha512-eWQcNa2YSwzXWIMC5KufBh3oWRIijrQFROsIqt6v/NS9Io/gknw1jsAC9c+ih/RQX4A3O7SeWAhQeN0goKhT9A==", - "_location": "/@jest/fake-timers", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@jest/fake-timers@24.9.0", - "name": "@jest/fake-timers", - "escapedName": "@jest%2ffake-timers", - "scope": "@jest", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/environment", - "/jest-environment-jsdom", - "/jest-environment-node", - "/jest-util" - ], - "_resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/types": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-mock": "^24.9.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "@jest/fake-timers", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-fake-timers" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/@jest/reporters/build/Status.d.ts b/node_modules/@jest/reporters/build/Status.d.ts deleted file mode 100644 index 4e9d3ec4..00000000 --- a/node_modules/@jest/reporters/build/Status.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { AggregatedResult, TestResult } from '@jest/test-result'; -import { ReporterOnStartOptions } from './types'; -/** - * A class that generates the CLI status of currently running tests - * and also provides an ANSI escape sequence to remove status lines - * from the terminal. - */ -export default class Status { - private _cache; - private _callback?; - private _currentTests; - private _done; - private _emitScheduled; - private _estimatedTime; - private _interval?; - private _aggregatedResults?; - private _showStatus; - constructor(); - onChange(callback: () => void): void; - runStarted(aggregatedResults: AggregatedResult, options: ReporterOnStartOptions): void; - runFinished(): void; - testStarted(testPath: Config.Path, config: Config.ProjectConfig): void; - testFinished(_config: Config.ProjectConfig, testResult: TestResult, aggregatedResults: AggregatedResult): void; - get(): { - content: string; - clear: string; - }; - private _emit; - private _debouncedEmit; - private _tick; -} -//# sourceMappingURL=Status.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/Status.d.ts.map b/node_modules/@jest/reporters/build/Status.d.ts.map deleted file mode 100644 index 21b30303..00000000 --- a/node_modules/@jest/reporters/build/Status.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Status.d.ts","sourceRoot":"","sources":["../src/Status.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAgD/C;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,MAAM;IACzB,OAAO,CAAC,MAAM,CAA0C;IACxD,OAAO,CAAC,SAAS,CAAC,CAAa;IAC/B,OAAO,CAAC,aAAa,CAAkB;IACvC,OAAO,CAAC,KAAK,CAAU;IACvB,OAAO,CAAC,cAAc,CAAU;IAChC,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,SAAS,CAAC,CAAiB;IACnC,OAAO,CAAC,kBAAkB,CAAC,CAAmB;IAC9C,OAAO,CAAC,WAAW,CAAU;;IAW7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI;IAI7B,UAAU,CACR,iBAAiB,EAAE,gBAAgB,EACnC,OAAO,EAAE,sBAAsB;IASjC,WAAW;IAMX,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,aAAa;IAS/D,YAAY,CACV,OAAO,EAAE,MAAM,CAAC,aAAa,EAC7B,UAAU,EAAE,UAAU,EACtB,iBAAiB,EAAE,gBAAgB;IAQrC,GAAG;;;;IAmDH,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,KAAK;CAGd"} \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/Status.js b/node_modules/@jest/reporters/build/Status.js deleted file mode 100644 index 46112621..00000000 --- a/node_modules/@jest/reporters/build/Status.js +++ /dev/null @@ -1,248 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _stringLength() { - const data = _interopRequireDefault(require('string-length')); - - _stringLength = function _stringLength() { - return data; - }; - - return data; -} - -var _utils = require('./utils'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const RUNNING_TEXT = ' RUNS '; -const RUNNING = _chalk().default.reset.inverse.yellow.bold(RUNNING_TEXT) + ' '; -/** - * This class is a perf optimization for sorting the list of currently - * running tests. It tries to keep tests in the same positions without - * shifting the whole list. - */ - -class CurrentTestList { - constructor() { - _defineProperty(this, '_array', void 0); - - this._array = []; - } - - add(testPath, config) { - const index = this._array.indexOf(null); - - const record = { - config, - testPath - }; - - if (index !== -1) { - this._array[index] = record; - } else { - this._array.push(record); - } - } - - delete(testPath) { - const record = this._array.find( - record => record !== null && record.testPath === testPath - ); - - this._array[this._array.indexOf(record || null)] = null; - } - - get() { - return this._array; - } -} -/** - * A class that generates the CLI status of currently running tests - * and also provides an ANSI escape sequence to remove status lines - * from the terminal. - */ - -class Status { - constructor() { - _defineProperty(this, '_cache', void 0); - - _defineProperty(this, '_callback', void 0); - - _defineProperty(this, '_currentTests', void 0); - - _defineProperty(this, '_done', void 0); - - _defineProperty(this, '_emitScheduled', void 0); - - _defineProperty(this, '_estimatedTime', void 0); - - _defineProperty(this, '_interval', void 0); - - _defineProperty(this, '_aggregatedResults', void 0); - - _defineProperty(this, '_showStatus', void 0); - - this._cache = null; - this._currentTests = new CurrentTestList(); - this._done = false; - this._emitScheduled = false; - this._estimatedTime = 0; - this._showStatus = false; - } - - onChange(callback) { - this._callback = callback; - } - - runStarted(aggregatedResults, options) { - this._estimatedTime = (options && options.estimatedTime) || 0; - this._showStatus = options && options.showStatus; - this._interval = setInterval(() => this._tick(), 1000); - this._aggregatedResults = aggregatedResults; - - this._debouncedEmit(); - } - - runFinished() { - this._done = true; - if (this._interval) clearInterval(this._interval); - - this._emit(); - } - - testStarted(testPath, config) { - this._currentTests.add(testPath, config); - - if (!this._showStatus) { - this._emit(); - } else { - this._debouncedEmit(); - } - } - - testFinished(_config, testResult, aggregatedResults) { - const testFilePath = testResult.testFilePath; - this._aggregatedResults = aggregatedResults; - - this._currentTests.delete(testFilePath); - - this._debouncedEmit(); - } - - get() { - if (this._cache) { - return this._cache; - } - - if (this._done) { - return { - clear: '', - content: '' - }; - } - - const width = process.stdout.columns; - let content = '\n'; - - this._currentTests.get().forEach(record => { - if (record) { - const config = record.config, - testPath = record.testPath; - const projectDisplayName = config.displayName - ? (0, _utils.printDisplayName)(config) + ' ' - : ''; - const prefix = RUNNING + projectDisplayName; - content += - (0, _utils.wrapAnsiString)( - prefix + - (0, _utils.trimAndFormatPath)( - (0, _stringLength().default)(prefix), - config, - testPath, - width - ), - width - ) + '\n'; - } - }); - - if (this._showStatus && this._aggregatedResults) { - content += - '\n' + - (0, _utils.getSummary)(this._aggregatedResults, { - estimatedTime: this._estimatedTime, - roundTime: true, - width - }); - } - - let height = 0; - - for (let i = 0; i < content.length; i++) { - if (content[i] === '\n') { - height++; - } - } - - const clear = '\r\x1B[K\r\x1B[1A'.repeat(height); - return (this._cache = { - clear, - content - }); - } - - _emit() { - this._cache = null; - if (this._callback) this._callback(); - } - - _debouncedEmit() { - if (!this._emitScheduled) { - // Perf optimization to avoid two separate renders When - // one test finishes and another test starts executing. - this._emitScheduled = true; - setTimeout(() => { - this._emit(); - - this._emitScheduled = false; - }, 100); - } - } - - _tick() { - this._debouncedEmit(); - } -} - -exports.default = Status; diff --git a/node_modules/@jest/reporters/build/base_reporter.d.ts b/node_modules/@jest/reporters/build/base_reporter.d.ts deleted file mode 100644 index aba21f36..00000000 --- a/node_modules/@jest/reporters/build/base_reporter.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { AggregatedResult, TestResult } from '@jest/test-result'; -import { ReporterOnStartOptions, Context, Test, Reporter } from './types'; -export default class BaseReporter implements Reporter { - private _error?; - log(message: string): void; - onRunStart(_results: AggregatedResult, _options: ReporterOnStartOptions): void; - onTestResult(_test: Test, _testResult: TestResult, _results: AggregatedResult): void; - onTestStart(_test: Test): void; - onRunComplete(_contexts: Set, _aggregatedResults: AggregatedResult): Promise | void; - protected _setError(error: Error): void; - getLastError(): Error | undefined; -} -//# sourceMappingURL=base_reporter.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/base_reporter.d.ts.map b/node_modules/@jest/reporters/build/base_reporter.d.ts.map deleted file mode 100644 index c5cd877c..00000000 --- a/node_modules/@jest/reporters/build/base_reporter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"base_reporter.d.ts","sourceRoot":"","sources":["../src/base_reporter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,gBAAgB,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAC,sBAAsB,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAC;AAIxE,MAAM,CAAC,OAAO,OAAO,YAAa,YAAW,QAAQ;IACnD,OAAO,CAAC,MAAM,CAAC,CAAQ;IAEvB,GAAG,CAAC,OAAO,EAAE,MAAM;IAInB,UAAU,CAAC,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,EAAE,sBAAsB;IAIvE,YAAY,CACV,KAAK,EAAE,IAAI,EACX,WAAW,EAAE,UAAU,EACvB,QAAQ,EAAE,gBAAgB;IAG5B,WAAW,CAAC,KAAK,EAAE,IAAI;IAEvB,aAAa,CACX,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,EACvB,kBAAkB,EAAE,gBAAgB,GACnC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAEvB,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK;IAMhC,YAAY;CAGb"} \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/base_reporter.js b/node_modules/@jest/reporters/build/base_reporter.js deleted file mode 100644 index f3dbbddb..00000000 --- a/node_modules/@jest/reporters/build/base_reporter.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const preRunMessageRemove = _jestUtil().preRunMessage.remove; - -class BaseReporter { - constructor() { - _defineProperty(this, '_error', void 0); - } - - log(message) { - process.stderr.write(message + '\n'); - } - - onRunStart(_results, _options) { - preRunMessageRemove(process.stderr); - } - - onTestResult(_test, _testResult, _results) {} - - onTestStart(_test) {} - - onRunComplete(_contexts, _aggregatedResults) {} - - _setError(error) { - this._error = error; - } // Return an error that occurred during reporting. This error will - // define whether the test run was successful or failed. - - getLastError() { - return this._error; - } -} - -exports.default = BaseReporter; diff --git a/node_modules/@jest/reporters/build/coverage_reporter.d.ts b/node_modules/@jest/reporters/build/coverage_reporter.d.ts deleted file mode 100644 index bf77fdf9..00000000 --- a/node_modules/@jest/reporters/build/coverage_reporter.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { AggregatedResult, TestResult } from '@jest/test-result'; -import { CoverageMap } from 'istanbul-lib-coverage'; -import BaseReporter from './base_reporter'; -import { Context, Test, CoverageReporterOptions } from './types'; -export default class CoverageReporter extends BaseReporter { - private _coverageMap; - private _globalConfig; - private _sourceMapStore; - private _options; - constructor(globalConfig: Config.GlobalConfig, options?: CoverageReporterOptions); - onTestResult(_test: Test, testResult: TestResult, _aggregatedResults: AggregatedResult): void; - onRunComplete(contexts: Set, aggregatedResults: AggregatedResult): Promise; - private _addUntestedFiles; - private _checkThreshold; - getCoverageMap(): CoverageMap; -} -//# sourceMappingURL=coverage_reporter.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/coverage_reporter.d.ts.map b/node_modules/@jest/reporters/build/coverage_reporter.d.ts.map deleted file mode 100644 index 5d7ff711..00000000 --- a/node_modules/@jest/reporters/build/coverage_reporter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"coverage_reporter.d.ts","sourceRoot":"","sources":["../src/coverage_reporter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAK/D,OAAyB,EACvB,WAAW,EAIZ,MAAM,uBAAuB,CAAC;AAK/B,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,OAAO,EAAE,IAAI,EAAkB,uBAAuB,EAAC,MAAM,SAAS,CAAC;AAK/E,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,YAAY;IACxD,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,eAAe,CAAW;IAClC,OAAO,CAAC,QAAQ,CAA0B;gBAGxC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,OAAO,CAAC,EAAE,uBAAuB;IASnC,YAAY,CACV,KAAK,EAAE,IAAI,EACX,UAAU,EAAE,UAAU,EACtB,kBAAkB,EAAE,gBAAgB;IA6BhC,aAAa,CACjB,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,EACtB,iBAAiB,EAAE,gBAAgB;YAoCvB,iBAAiB;IAmG/B,OAAO,CAAC,eAAe;IA2LvB,cAAc,IAAI,WAAW;CAG9B"} \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/coverage_reporter.js b/node_modules/@jest/reporters/build/coverage_reporter.js deleted file mode 100644 index 8f4a95e4..00000000 --- a/node_modules/@jest/reporters/build/coverage_reporter.js +++ /dev/null @@ -1,571 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _istanbulLibReport() { - const data = _interopRequireDefault(require('istanbul-lib-report')); - - _istanbulLibReport = function _istanbulLibReport() { - return data; - }; - - return data; -} - -function _istanbulReports() { - const data = _interopRequireDefault(require('istanbul-reports')); - - _istanbulReports = function _istanbulReports() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _istanbulLibCoverage() { - const data = _interopRequireDefault(require('istanbul-lib-coverage')); - - _istanbulLibCoverage = function _istanbulLibCoverage() { - return data; - }; - - return data; -} - -function _istanbulLibSourceMaps() { - const data = _interopRequireDefault(require('istanbul-lib-source-maps')); - - _istanbulLibSourceMaps = function _istanbulLibSourceMaps() { - return data; - }; - - return data; -} - -function _jestWorker() { - const data = _interopRequireDefault(require('jest-worker')); - - _jestWorker = function _jestWorker() { - return data; - }; - - return data; -} - -function _glob() { - const data = _interopRequireDefault(require('glob')); - - _glob = function _glob() { - return data; - }; - - return data; -} - -var _base_reporter = _interopRequireDefault(require('./base_reporter')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const FAIL_COLOR = _chalk().default.bold.red; - -const RUNNING_TEST_COLOR = _chalk().default.bold.dim; - -class CoverageReporter extends _base_reporter.default { - constructor(globalConfig, options) { - super(); - - _defineProperty(this, '_coverageMap', void 0); - - _defineProperty(this, '_globalConfig', void 0); - - _defineProperty(this, '_sourceMapStore', void 0); - - _defineProperty(this, '_options', void 0); - - this._coverageMap = _istanbulLibCoverage().default.createCoverageMap({}); - this._globalConfig = globalConfig; - this._sourceMapStore = _istanbulLibSourceMaps().default.createSourceMapStore(); - this._options = options || {}; - } - - onTestResult(_test, testResult, _aggregatedResults) { - if (testResult.coverage) { - this._coverageMap.merge(testResult.coverage); - } - - const sourceMaps = testResult.sourceMaps; - - if (sourceMaps) { - Object.keys(sourceMaps).forEach(sourcePath => { - let inputSourceMap; - - try { - const coverage = this._coverageMap.fileCoverageFor(sourcePath); - - inputSourceMap = coverage.toJSON().inputSourceMap; - } finally { - if (inputSourceMap) { - this._sourceMapStore.registerMap(sourcePath, inputSourceMap); - } else { - this._sourceMapStore.registerURL( - sourcePath, - sourceMaps[sourcePath] - ); - } - } - }); - } - } - - onRunComplete(contexts, aggregatedResults) { - var _this = this; - - return _asyncToGenerator(function*() { - yield _this._addUntestedFiles(_this._globalConfig, contexts); - - const _this$_sourceMapStore = _this._sourceMapStore.transformCoverage( - _this._coverageMap - ), - map = _this$_sourceMapStore.map, - sourceFinder = _this$_sourceMapStore.sourceFinder; - - try { - const reportContext = _istanbulLibReport().default.createContext({ - dir: _this._globalConfig.coverageDirectory, - sourceFinder - }); - - const coverageReporters = _this._globalConfig.coverageReporters || []; - - if (!_this._globalConfig.useStderr && coverageReporters.length < 1) { - coverageReporters.push('text-summary'); - } - - const tree = _istanbulLibReport().default.summarizers.pkg(map); - - coverageReporters.forEach(reporter => { - tree.visit( - _istanbulReports().default.create(reporter, {}), - reportContext - ); - }); - aggregatedResults.coverageMap = map; - } catch (e) { - console.error( - _chalk().default.red(` - Failed to write coverage reports: - ERROR: ${e.toString()} - STACK: ${e.stack} - `) - ); - } - - _this._checkThreshold(_this._globalConfig, map); - })(); - } - - _addUntestedFiles(globalConfig, contexts) { - var _this2 = this; - - return _asyncToGenerator(function*() { - const files = []; - contexts.forEach(context => { - const config = context.config; - - if ( - globalConfig.collectCoverageFrom && - globalConfig.collectCoverageFrom.length - ) { - context.hasteFS - .matchFilesWithGlob( - globalConfig.collectCoverageFrom, - config.rootDir - ) - .forEach(filePath => - files.push({ - config, - path: filePath - }) - ); - } - }); - - if (!files.length) { - return; - } - - if (_jestUtil().isInteractive) { - process.stderr.write( - RUNNING_TEST_COLOR('Running coverage on untested files...') - ); - } - - let worker; - - if (_this2._globalConfig.maxWorkers <= 1) { - worker = require('./coverage_worker'); - } else { - worker = new (_jestWorker()).default( - require.resolve('./coverage_worker'), - { - exposedMethods: ['worker'], - maxRetries: 2, - numWorkers: _this2._globalConfig.maxWorkers - } - ); - } - - const instrumentation = files.map( - /*#__PURE__*/ - (function() { - var _ref = _asyncToGenerator(function*(fileObj) { - const filename = fileObj.path; - const config = fileObj.config; - - if (!_this2._coverageMap.data[filename] && 'worker' in worker) { - try { - const result = yield worker.worker({ - config, - globalConfig, - options: _objectSpread({}, _this2._options, { - changedFiles: - _this2._options.changedFiles && - Array.from(_this2._options.changedFiles) - }), - path: filename - }); - - if (result) { - _this2._coverageMap.addFileCoverage(result.coverage); - - if (result.sourceMapPath) { - _this2._sourceMapStore.registerURL( - filename, - result.sourceMapPath - ); - } - } - } catch (error) { - console.error( - _chalk().default.red( - [ - `Failed to collect coverage from ${filename}`, - `ERROR: ${error.message}`, - `STACK: ${error.stack}` - ].join('\n') - ) - ); - } - } - }); - - return function(_x) { - return _ref.apply(this, arguments); - }; - })() - ); - - try { - yield Promise.all(instrumentation); - } catch (err) { - // Do nothing; errors were reported earlier to the console. - } - - if (_jestUtil().isInteractive) { - (0, _jestUtil().clearLine)(process.stderr); - } - - if (worker && 'end' in worker && typeof worker.end === 'function') { - worker.end(); - } - })(); - } - - _checkThreshold(globalConfig, map) { - if (globalConfig.coverageThreshold) { - function check(name, thresholds, actuals) { - return ['statements', 'branches', 'lines', 'functions'].reduce( - (errors, key) => { - const actual = actuals[key].pct; - const actualUncovered = actuals[key].total - actuals[key].covered; - const threshold = thresholds[key]; - - if (threshold != null) { - if (threshold < 0) { - if (threshold * -1 < actualUncovered) { - errors.push( - `Jest: Uncovered count for ${key} (${actualUncovered})` + - `exceeds ${name} threshold (${-1 * threshold})` - ); - } - } else if (actual < threshold) { - errors.push( - `Jest: "${name}" coverage threshold for ${key} (${threshold}%) not met: ${actual}%` - ); - } - } - - return errors; - }, - [] - ); - } - - const THRESHOLD_GROUP_TYPES = { - GLOB: 'glob', - GLOBAL: 'global', - PATH: 'path' - }; - const coveredFiles = map.files(); - const thresholdGroups = Object.keys(globalConfig.coverageThreshold); - const groupTypeByThresholdGroup = {}; - const filesByGlob = {}; - const coveredFilesSortedIntoThresholdGroup = coveredFiles.reduce( - (files, file) => { - const pathOrGlobMatches = thresholdGroups.reduce( - (agg, thresholdGroup) => { - const absoluteThresholdGroup = _path().default.resolve( - thresholdGroup - ); // The threshold group might be a path: - - if (file.indexOf(absoluteThresholdGroup) === 0) { - groupTypeByThresholdGroup[thresholdGroup] = - THRESHOLD_GROUP_TYPES.PATH; - return agg.concat([[file, thresholdGroup]]); - } // If the threshold group is not a path it might be a glob: - // Note: glob.sync is slow. By memoizing the files matching each glob - // (rather than recalculating it for each covered file) we save a tonne - // of execution time. - - if (filesByGlob[absoluteThresholdGroup] === undefined) { - filesByGlob[absoluteThresholdGroup] = _glob() - .default.sync(absoluteThresholdGroup) - .map(filePath => _path().default.resolve(filePath)); - } - - if (filesByGlob[absoluteThresholdGroup].indexOf(file) > -1) { - groupTypeByThresholdGroup[thresholdGroup] = - THRESHOLD_GROUP_TYPES.GLOB; - return agg.concat([[file, thresholdGroup]]); - } - - return agg; - }, - [] - ); - - if (pathOrGlobMatches.length > 0) { - return files.concat(pathOrGlobMatches); - } // Neither a glob or a path? Toss it in global if there's a global threshold: - - if (thresholdGroups.indexOf(THRESHOLD_GROUP_TYPES.GLOBAL) > -1) { - groupTypeByThresholdGroup[THRESHOLD_GROUP_TYPES.GLOBAL] = - THRESHOLD_GROUP_TYPES.GLOBAL; - return files.concat([[file, THRESHOLD_GROUP_TYPES.GLOBAL]]); - } // A covered file that doesn't have a threshold: - - return files.concat([[file, undefined]]); - }, - [] - ); - - const getFilesInThresholdGroup = thresholdGroup => - coveredFilesSortedIntoThresholdGroup - .filter(fileAndGroup => fileAndGroup[1] === thresholdGroup) - .map(fileAndGroup => fileAndGroup[0]); - - function combineCoverage(filePaths) { - return filePaths - .map(filePath => map.fileCoverageFor(filePath)) - .reduce((combinedCoverage, nextFileCoverage) => { - if (combinedCoverage === undefined || combinedCoverage === null) { - return nextFileCoverage.toSummary(); - } - - return combinedCoverage.merge(nextFileCoverage.toSummary()); - }, undefined); - } - - let errors = []; - thresholdGroups.forEach(thresholdGroup => { - switch (groupTypeByThresholdGroup[thresholdGroup]) { - case THRESHOLD_GROUP_TYPES.GLOBAL: { - const coverage = combineCoverage( - getFilesInThresholdGroup(THRESHOLD_GROUP_TYPES.GLOBAL) - ); - - if (coverage) { - errors = errors.concat( - check( - thresholdGroup, - globalConfig.coverageThreshold[thresholdGroup], - coverage - ) - ); - } - - break; - } - - case THRESHOLD_GROUP_TYPES.PATH: { - const coverage = combineCoverage( - getFilesInThresholdGroup(thresholdGroup) - ); - - if (coverage) { - errors = errors.concat( - check( - thresholdGroup, - globalConfig.coverageThreshold[thresholdGroup], - coverage - ) - ); - } - - break; - } - - case THRESHOLD_GROUP_TYPES.GLOB: - getFilesInThresholdGroup(thresholdGroup).forEach( - fileMatchingGlob => { - errors = errors.concat( - check( - fileMatchingGlob, - globalConfig.coverageThreshold[thresholdGroup], - map.fileCoverageFor(fileMatchingGlob).toSummary() - ) - ); - } - ); - break; - - default: - // If the file specified by path is not found, error is returned. - if (thresholdGroup !== THRESHOLD_GROUP_TYPES.GLOBAL) { - errors = errors.concat( - `Jest: Coverage data for ${thresholdGroup} was not found.` - ); - } - - // Sometimes all files in the coverage data are matched by - // PATH and GLOB threshold groups in which case, don't error when - // the global threshold group doesn't match any files. - } - }); - errors = errors.filter( - err => err !== undefined && err !== null && err.length > 0 - ); - - if (errors.length > 0) { - this.log(`${FAIL_COLOR(errors.join('\n'))}`); - - this._setError(new Error(errors.join('\n'))); - } - } - } // Only exposed for the internal runner. Should not be used - - getCoverageMap() { - return this._coverageMap; - } -} - -exports.default = CoverageReporter; diff --git a/node_modules/@jest/reporters/build/coverage_worker.d.ts b/node_modules/@jest/reporters/build/coverage_worker.d.ts deleted file mode 100644 index 12218791..00000000 --- a/node_modules/@jest/reporters/build/coverage_worker.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { CoverageReporterSerializedOptions } from './types'; -import { CoverageWorkerResult } from './generateEmptyCoverage'; -export declare type CoverageWorkerData = { - globalConfig: Config.GlobalConfig; - config: Config.ProjectConfig; - path: Config.Path; - options?: CoverageReporterSerializedOptions; -}; -export { CoverageWorkerResult }; -export declare function worker({ config, globalConfig, path, options, }: CoverageWorkerData): CoverageWorkerResult | null; -//# sourceMappingURL=coverage_worker.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/coverage_worker.d.ts.map b/node_modules/@jest/reporters/build/coverage_worker.d.ts.map deleted file mode 100644 index 84be4def..00000000 --- a/node_modules/@jest/reporters/build/coverage_worker.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"coverage_worker.d.ts","sourceRoot":"","sources":["../src/coverage_worker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAC,iCAAiC,EAAC,MAAM,SAAS,CAAC;AAE1D,OAA8B,EAC5B,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAEjC,oBAAY,kBAAkB,GAAG;IAC/B,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC;IAClC,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC;IAClB,OAAO,CAAC,EAAE,iCAAiC,CAAC;CAC7C,CAAC;AAEF,OAAO,EAAC,oBAAoB,EAAC,CAAC;AAQ9B,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,YAAY,EACZ,IAAI,EACJ,OAAO,GACR,EAAE,kBAAkB,GAAG,oBAAoB,GAAG,IAAI,CAQlD"} \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/coverage_worker.js b/node_modules/@jest/reporters/build/coverage_worker.js deleted file mode 100644 index 35fc49e3..00000000 --- a/node_modules/@jest/reporters/build/coverage_worker.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.worker = worker; -Object.defineProperty(exports, 'CoverageWorkerResult', { - enumerable: true, - get: function get() { - return _generateEmptyCoverage.CoverageWorkerResult; - } -}); - -function _fs() { - const data = _interopRequireDefault(require('fs')); - - _fs = function _fs() { - return data; - }; - - return data; -} - -function _exit() { - const data = _interopRequireDefault(require('exit')); - - _exit = function _exit() { - return data; - }; - - return data; -} - -var _generateEmptyCoverage = _interopRequireWildcard( - require('./generateEmptyCoverage') -); - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// Make sure uncaught errors are logged before we exit. -process.on('uncaughtException', err => { - console.error(err.stack); - (0, _exit().default)(1); -}); - -function worker({config, globalConfig, path, options}) { - return (0, _generateEmptyCoverage.default)( - _fs().default.readFileSync(path, 'utf8'), - path, - globalConfig, - config, - options && options.changedFiles && new Set(options.changedFiles) - ); -} diff --git a/node_modules/@jest/reporters/build/default_reporter.d.ts b/node_modules/@jest/reporters/build/default_reporter.d.ts deleted file mode 100644 index e6d0fc6a..00000000 --- a/node_modules/@jest/reporters/build/default_reporter.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { AggregatedResult, TestResult } from '@jest/test-result'; -import { Test, ReporterOnStartOptions } from './types'; -import BaseReporter from './base_reporter'; -export default class DefaultReporter extends BaseReporter { - private _clear; - private _err; - protected _globalConfig: Config.GlobalConfig; - private _out; - private _status; - private _bufferedOutput; - constructor(globalConfig: Config.GlobalConfig); - private _wrapStdio; - forceFlushBufferedOutput(): void; - private _clearStatus; - private _printStatus; - onRunStart(aggregatedResults: AggregatedResult, options: ReporterOnStartOptions): void; - onTestStart(test: Test): void; - onRunComplete(): void; - onTestResult(test: Test, testResult: TestResult, aggregatedResults: AggregatedResult): void; - testFinished(config: Config.ProjectConfig, testResult: TestResult, aggregatedResults: AggregatedResult): void; - printTestFileHeader(_testPath: Config.Path, config: Config.ProjectConfig, result: TestResult): void; - printTestFileFailureMessage(_testPath: Config.Path, _config: Config.ProjectConfig, result: TestResult): void; -} -//# sourceMappingURL=default_reporter.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/default_reporter.d.ts.map b/node_modules/@jest/reporters/build/default_reporter.d.ts.map deleted file mode 100644 index d7a5b421..00000000 --- a/node_modules/@jest/reporters/build/default_reporter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"default_reporter.d.ts","sourceRoot":"","sources":["../src/default_reporter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAG/D,OAAO,EAAC,IAAI,EAAE,sBAAsB,EAAC,MAAM,SAAS,CAAC;AACrD,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAU3C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,YAAY;IACvD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,IAAI,CAAQ;IACpB,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,YAAY,CAAC;IAC7C,OAAO,CAAC,IAAI,CAAQ;IACpB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,eAAe,CAA2B;gBAEtC,YAAY,EAAE,MAAM,CAAC,YAAY;IAgB7C,OAAO,CAAC,UAAU;IA8ClB,wBAAwB;IAMxB,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,YAAY;IAYpB,UAAU,CACR,iBAAiB,EAAE,gBAAgB,EACnC,OAAO,EAAE,sBAAsB;IAKjC,WAAW,CAAC,IAAI,EAAE,IAAI;IAItB,aAAa;IAQb,YAAY,CACV,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,iBAAiB,EAAE,gBAAgB;IAkBrC,YAAY,CACV,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,iBAAiB,EAAE,gBAAgB;IAKrC,mBAAmB,CACjB,SAAS,EAAE,MAAM,CAAC,IAAI,EACtB,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,MAAM,EAAE,UAAU;IAiBpB,2BAA2B,CACzB,SAAS,EAAE,MAAM,CAAC,IAAI,EACtB,OAAO,EAAE,MAAM,CAAC,aAAa,EAC7B,MAAM,EAAE,UAAU;CASrB"} \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/default_reporter.js b/node_modules/@jest/reporters/build/default_reporter.js deleted file mode 100644 index a3cee4ce..00000000 --- a/node_modules/@jest/reporters/build/default_reporter.js +++ /dev/null @@ -1,268 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -var _base_reporter = _interopRequireDefault(require('./base_reporter')); - -var _Status = _interopRequireDefault(require('./Status')); - -var _get_result_header = _interopRequireDefault(require('./get_result_header')); - -var _get_snapshot_status = _interopRequireDefault( - require('./get_snapshot_status') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const TITLE_BULLET = _chalk().default.bold('\u25cf '); - -class DefaultReporter extends _base_reporter.default { - // ANSI clear sequence for the last printed status - constructor(globalConfig) { - super(); - - _defineProperty(this, '_clear', void 0); - - _defineProperty(this, '_err', void 0); - - _defineProperty(this, '_globalConfig', void 0); - - _defineProperty(this, '_out', void 0); - - _defineProperty(this, '_status', void 0); - - _defineProperty(this, '_bufferedOutput', void 0); - - this._globalConfig = globalConfig; - this._clear = ''; - this._out = process.stdout.write.bind(process.stdout); - this._err = process.stderr.write.bind(process.stderr); - this._status = new _Status.default(); - this._bufferedOutput = new Set(); - - this._wrapStdio(process.stdout); - - this._wrapStdio(process.stderr); - - this._status.onChange(() => { - this._clearStatus(); - - this._printStatus(); - }); - } - - _wrapStdio(stream) { - const originalWrite = stream.write; - let buffer = []; - let timeout = null; - - const flushBufferedOutput = () => { - const string = buffer.join(''); - buffer = []; // This is to avoid conflicts between random output and status text - - this._clearStatus(); - - if (string) { - originalWrite.call(stream, string); - } - - this._printStatus(); - - this._bufferedOutput.delete(flushBufferedOutput); - }; - - this._bufferedOutput.add(flushBufferedOutput); - - const debouncedFlush = () => { - // If the process blows up no errors would be printed. - // There should be a smart way to buffer stderr, but for now - // we just won't buffer it. - if (stream === process.stderr) { - flushBufferedOutput(); - } else { - if (!timeout) { - timeout = setTimeout(() => { - flushBufferedOutput(); - timeout = null; - }, 100); - } - } - }; - - stream.write = chunk => { - buffer.push(chunk); - debouncedFlush(); - return true; - }; - } // Don't wait for the debounced call and flush all output immediately. - - forceFlushBufferedOutput() { - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = this._bufferedOutput[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const flushBufferedOutput = _step.value; - flushBufferedOutput(); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - } - - _clearStatus() { - if (_jestUtil().isInteractive) { - if (this._globalConfig.useStderr) { - this._err(this._clear); - } else { - this._out(this._clear); - } - } - } - - _printStatus() { - const _this$_status$get = this._status.get(), - content = _this$_status$get.content, - clear = _this$_status$get.clear; - - this._clear = clear; - - if (_jestUtil().isInteractive) { - if (this._globalConfig.useStderr) { - this._err(content); - } else { - this._out(content); - } - } - } - - onRunStart(aggregatedResults, options) { - this._status.runStarted(aggregatedResults, options); - } - - onTestStart(test) { - this._status.testStarted(test.path, test.context.config); - } - - onRunComplete() { - this.forceFlushBufferedOutput(); - - this._status.runFinished(); - - process.stdout.write = this._out; - process.stderr.write = this._err; - (0, _jestUtil().clearLine)(process.stderr); - } - - onTestResult(test, testResult, aggregatedResults) { - this.testFinished(test.context.config, testResult, aggregatedResults); - - if (!testResult.skipped) { - this.printTestFileHeader( - testResult.testFilePath, - test.context.config, - testResult - ); - this.printTestFileFailureMessage( - testResult.testFilePath, - test.context.config, - testResult - ); - } - - this.forceFlushBufferedOutput(); - } - - testFinished(config, testResult, aggregatedResults) { - this._status.testFinished(config, testResult, aggregatedResults); - } - - printTestFileHeader(_testPath, config, result) { - this.log( - (0, _get_result_header.default)(result, this._globalConfig, config) - ); - - if (result.console) { - this.log( - ' ' + - TITLE_BULLET + - 'Console\n\n' + - (0, _jestUtil().getConsoleOutput)( - config.cwd, - !!this._globalConfig.verbose, - result.console - ) - ); - } - } - - printTestFileFailureMessage(_testPath, _config, result) { - if (result.failureMessage) { - this.log(result.failureMessage); - } - - const didUpdate = this._globalConfig.updateSnapshot === 'all'; - const snapshotStatuses = (0, _get_snapshot_status.default)( - result.snapshot, - didUpdate - ); - snapshotStatuses.forEach(this.log); - } -} - -exports.default = DefaultReporter; diff --git a/node_modules/@jest/reporters/build/generateEmptyCoverage.d.ts b/node_modules/@jest/reporters/build/generateEmptyCoverage.d.ts deleted file mode 100644 index 1104115c..00000000 --- a/node_modules/@jest/reporters/build/generateEmptyCoverage.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export declare type CoverageWorkerResult = { - coverage: any; - sourceMapPath?: string | null; -}; -export default function (source: string, filename: Config.Path, globalConfig: Config.GlobalConfig, config: Config.ProjectConfig, changedFiles?: Set): CoverageWorkerResult | null; -//# sourceMappingURL=generateEmptyCoverage.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/generateEmptyCoverage.d.ts.map b/node_modules/@jest/reporters/build/generateEmptyCoverage.d.ts.map deleted file mode 100644 index 28b7ee35..00000000 --- a/node_modules/@jest/reporters/build/generateEmptyCoverage.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generateEmptyCoverage.d.ts","sourceRoot":"","sources":["../src/generateEmptyCoverage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAKnC,oBAAY,oBAAoB,GAAG;IACjC,QAAQ,EAAE,GAAG,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B,CAAC;AAEF,MAAM,CAAC,OAAO,WACZ,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAC9B,oBAAoB,GAAG,IAAI,CAuB7B"} \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/generateEmptyCoverage.js b/node_modules/@jest/reporters/build/generateEmptyCoverage.js deleted file mode 100644 index e1f978cf..00000000 --- a/node_modules/@jest/reporters/build/generateEmptyCoverage.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = _default; - -function _istanbulLibInstrument() { - const data = require('istanbul-lib-instrument'); - - _istanbulLibInstrument = function _istanbulLibInstrument() { - return data; - }; - - return data; -} - -function _istanbulLibCoverage() { - const data = require('istanbul-lib-coverage'); - - _istanbulLibCoverage = function _istanbulLibCoverage() { - return data; - }; - - return data; -} - -function _transform() { - const data = require('@jest/transform'); - - _transform = function _transform() { - return data; - }; - - return data; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function _default(source, filename, globalConfig, config, changedFiles) { - const coverageOptions = { - changedFiles, - collectCoverage: globalConfig.collectCoverage, - collectCoverageFrom: globalConfig.collectCoverageFrom, - collectCoverageOnlyFrom: globalConfig.collectCoverageOnlyFrom - }; - let coverageWorkerResult = null; - - if ((0, _transform().shouldInstrument)(filename, coverageOptions, config)) { - // Transform file with instrumentation to make sure initial coverage data is well mapped to original code. - const _transformSource = new (_transform()).ScriptTransformer( - config - ).transformSource(filename, source, true), - code = _transformSource.code, - mapCoverage = _transformSource.mapCoverage, - sourceMapPath = _transformSource.sourceMapPath; - - const extracted = (0, _istanbulLibInstrument().readInitialCoverage)(code); // Check extracted initial coverage is not null, this can happen when using /* istanbul ignore file */ - - if (extracted) { - coverageWorkerResult = { - coverage: (0, _istanbulLibCoverage().createFileCoverage)( - extracted.coverageData - ), - sourceMapPath: mapCoverage ? sourceMapPath : null - }; - } - } - - return coverageWorkerResult; -} diff --git a/node_modules/@jest/reporters/build/get_result_header.d.ts b/node_modules/@jest/reporters/build/get_result_header.d.ts deleted file mode 100644 index b0db3206..00000000 --- a/node_modules/@jest/reporters/build/get_result_header.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { TestResult } from '@jest/test-result'; -declare const _default: (result: TestResult, globalConfig: Config.GlobalConfig, projectConfig?: Config.ProjectConfig | undefined) => string; -export default _default; -//# sourceMappingURL=get_result_header.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/get_result_header.d.ts.map b/node_modules/@jest/reporters/build/get_result_header.d.ts.map deleted file mode 100644 index 8513b44a..00000000 --- a/node_modules/@jest/reporters/build/get_result_header.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"get_result_header.d.ts","sourceRoot":"","sources":["../src/get_result_header.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;;AAkB7C,wBAkCE"} \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/get_result_header.js b/node_modules/@jest/reporters/build/get_result_header.js deleted file mode 100644 index 12f2214d..00000000 --- a/node_modules/@jest/reporters/build/get_result_header.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -var _utils = require('./utils'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const LONG_TEST_COLOR = _chalk().default.reset.bold.bgRed; // Explicitly reset for these messages since they can get written out in the -// middle of error logging - -const FAIL_TEXT = 'FAIL'; -const PASS_TEXT = 'PASS'; -const FAIL = _chalk().default.supportsColor - ? _chalk().default.reset.inverse.bold.red(` ${FAIL_TEXT} `) - : FAIL_TEXT; -const PASS = _chalk().default.supportsColor - ? _chalk().default.reset.inverse.bold.green(` ${PASS_TEXT} `) - : PASS_TEXT; - -var _default = (result, globalConfig, projectConfig) => { - const testPath = result.testFilePath; - const status = - result.numFailingTests > 0 || result.testExecError ? FAIL : PASS; - const runTime = result.perfStats - ? (result.perfStats.end - result.perfStats.start) / 1000 - : null; - const testDetail = []; - - if (runTime !== null && runTime > 5) { - testDetail.push(LONG_TEST_COLOR(runTime + 's')); - } - - if (result.memoryUsage) { - const toMB = bytes => Math.floor(bytes / 1024 / 1024); - - testDetail.push(`${toMB(result.memoryUsage)} MB heap size`); - } - - const projectDisplayName = - projectConfig && projectConfig.displayName - ? (0, _utils.printDisplayName)(projectConfig) + ' ' - : ''; - return ( - `${status} ${projectDisplayName}${(0, _utils.formatTestPath)( - projectConfig ? projectConfig : globalConfig, - testPath - )}` + (testDetail.length ? ` (${testDetail.join(', ')})` : '') - ); -}; - -exports.default = _default; diff --git a/node_modules/@jest/reporters/build/get_snapshot_status.d.ts b/node_modules/@jest/reporters/build/get_snapshot_status.d.ts deleted file mode 100644 index c0548073..00000000 --- a/node_modules/@jest/reporters/build/get_snapshot_status.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare const _default: (snapshot: { - added: number; - fileDeleted: boolean; - matched: number; - unchecked: number; - uncheckedKeys: string[]; - unmatched: number; - updated: number; -}, afterUpdate: boolean) => string[]; -export default _default; -//# sourceMappingURL=get_snapshot_status.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/get_snapshot_status.d.ts.map b/node_modules/@jest/reporters/build/get_snapshot_status.d.ts.map deleted file mode 100644 index 1eb5f825..00000000 --- a/node_modules/@jest/reporters/build/get_snapshot_status.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"get_snapshot_status.d.ts","sourceRoot":"","sources":["../src/get_snapshot_status.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;;;;;;;AAaH,wBAuDE"} \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/get_snapshot_status.js b/node_modules/@jest/reporters/build/get_snapshot_status.js deleted file mode 100644 index 7248fa8a..00000000 --- a/node_modules/@jest/reporters/build/get_snapshot_status.js +++ /dev/null @@ -1,113 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const ARROW = ' \u203A '; -const DOT = ' \u2022 '; - -const FAIL_COLOR = _chalk().default.bold.red; - -const SNAPSHOT_ADDED = _chalk().default.bold.green; - -const SNAPSHOT_UPDATED = _chalk().default.bold.green; - -const SNAPSHOT_OUTDATED = _chalk().default.bold.yellow; - -var _default = (snapshot, afterUpdate) => { - const statuses = []; - - if (snapshot.added) { - statuses.push( - SNAPSHOT_ADDED( - ARROW + - (0, _jestUtil().pluralize)('snapshot', snapshot.added) + - ' written.' - ) - ); - } - - if (snapshot.updated) { - statuses.push( - SNAPSHOT_UPDATED( - ARROW + - (0, _jestUtil().pluralize)('snapshot', snapshot.updated) + - ' updated.' - ) - ); - } - - if (snapshot.unmatched) { - statuses.push( - FAIL_COLOR( - ARROW + - (0, _jestUtil().pluralize)('snapshot', snapshot.unmatched) + - ' failed.' - ) - ); - } - - if (snapshot.unchecked) { - if (afterUpdate) { - statuses.push( - SNAPSHOT_UPDATED( - ARROW + - (0, _jestUtil().pluralize)('snapshot', snapshot.unchecked) + - ' removed.' - ) - ); - } else { - statuses.push( - SNAPSHOT_OUTDATED( - ARROW + - (0, _jestUtil().pluralize)('snapshot', snapshot.unchecked) + - ' obsolete' - ) + '.' - ); - } - - snapshot.uncheckedKeys.forEach(key => { - statuses.push(` ${DOT}${key}`); - }); - } - - if (snapshot.fileDeleted) { - statuses.push(SNAPSHOT_UPDATED(ARROW + 'snapshot file removed.')); - } - - return statuses; -}; - -exports.default = _default; diff --git a/node_modules/@jest/reporters/build/get_snapshot_summary.d.ts b/node_modules/@jest/reporters/build/get_snapshot_summary.d.ts deleted file mode 100644 index f2332501..00000000 --- a/node_modules/@jest/reporters/build/get_snapshot_summary.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { SnapshotSummary } from '@jest/test-result'; -declare const _default: (snapshots: SnapshotSummary, globalConfig: Config.GlobalConfig, updateCommand: string) => string[]; -export default _default; -//# sourceMappingURL=get_snapshot_summary.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/get_snapshot_summary.d.ts.map b/node_modules/@jest/reporters/build/get_snapshot_summary.d.ts.map deleted file mode 100644 index 4464e83b..00000000 --- a/node_modules/@jest/reporters/build/get_snapshot_summary.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"get_snapshot_summary.d.ts","sourceRoot":"","sources":["../src/get_snapshot_summary.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;;AAgBlD,wBAkHE"} \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/get_snapshot_summary.js b/node_modules/@jest/reporters/build/get_snapshot_summary.js deleted file mode 100644 index 99596f45..00000000 --- a/node_modules/@jest/reporters/build/get_snapshot_summary.js +++ /dev/null @@ -1,222 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -var _utils = require('./utils'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _toArray(arr) { - return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest(); -} - -function _nonIterableRest() { - throw new TypeError('Invalid attempt to destructure non-iterable instance'); -} - -function _iterableToArray(iter) { - if ( - Symbol.iterator in Object(iter) || - Object.prototype.toString.call(iter) === '[object Arguments]' - ) - return Array.from(iter); -} - -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} - -const ARROW = ' \u203A '; -const DOWN_ARROW = ' \u21B3 '; -const DOT = ' \u2022 '; - -const FAIL_COLOR = _chalk().default.bold.red; - -const OBSOLETE_COLOR = _chalk().default.bold.yellow; - -const SNAPSHOT_ADDED = _chalk().default.bold.green; - -const SNAPSHOT_NOTE = _chalk().default.dim; - -const SNAPSHOT_REMOVED = _chalk().default.bold.green; - -const SNAPSHOT_SUMMARY = _chalk().default.bold; - -const SNAPSHOT_UPDATED = _chalk().default.bold.green; - -var _default = (snapshots, globalConfig, updateCommand) => { - const summary = []; - summary.push(SNAPSHOT_SUMMARY('Snapshot Summary')); - - if (snapshots.added) { - summary.push( - SNAPSHOT_ADDED( - ARROW + - (0, _jestUtil().pluralize)('snapshot', snapshots.added) + - ' written ' - ) + - `from ${(0, _jestUtil().pluralize)( - 'test suite', - snapshots.filesAdded - )}.` - ); - } - - if (snapshots.unmatched) { - summary.push( - FAIL_COLOR( - `${ARROW}${(0, _jestUtil().pluralize)( - 'snapshot', - snapshots.unmatched - )} failed` - ) + - ` from ${(0, _jestUtil().pluralize)( - 'test suite', - snapshots.filesUnmatched - )}. ` + - SNAPSHOT_NOTE( - 'Inspect your code changes or ' + updateCommand + ' to update them.' - ) - ); - } - - if (snapshots.updated) { - summary.push( - SNAPSHOT_UPDATED( - ARROW + - (0, _jestUtil().pluralize)('snapshot', snapshots.updated) + - ' updated ' - ) + - `from ${(0, _jestUtil().pluralize)( - 'test suite', - snapshots.filesUpdated - )}.` - ); - } - - if (snapshots.filesRemoved) { - if (snapshots.didUpdate) { - summary.push( - SNAPSHOT_REMOVED( - `${ARROW}${(0, _jestUtil().pluralize)( - 'snapshot file', - snapshots.filesRemoved - )} removed ` - ) + - `from ${(0, _jestUtil().pluralize)( - 'test suite', - snapshots.filesRemoved - )}.` - ); - } else { - summary.push( - OBSOLETE_COLOR( - `${ARROW}${(0, _jestUtil().pluralize)( - 'snapshot file', - snapshots.filesRemoved - )} obsolete ` - ) + - `from ${(0, _jestUtil().pluralize)( - 'test suite', - snapshots.filesRemoved - )}. ` + - SNAPSHOT_NOTE( - `To remove ${ - snapshots.filesRemoved === 1 ? 'it' : 'them all' - }, ${updateCommand}.` - ) - ); - } - } - - if (snapshots.filesRemovedList && snapshots.filesRemovedList.length) { - const _snapshots$filesRemov = _toArray(snapshots.filesRemovedList), - head = _snapshots$filesRemov[0], - tail = _snapshots$filesRemov.slice(1); - - summary.push( - ` ${DOWN_ARROW} ${DOT}${(0, _utils.formatTestPath)(globalConfig, head)}` - ); - tail.forEach(key => { - summary.push( - ` ${DOT}${(0, _utils.formatTestPath)(globalConfig, key)}` - ); - }); - } - - if (snapshots.unchecked) { - if (snapshots.didUpdate) { - summary.push( - SNAPSHOT_REMOVED( - `${ARROW}${(0, _jestUtil().pluralize)( - 'snapshot', - snapshots.unchecked - )} removed ` - ) + - `from ${(0, _jestUtil().pluralize)( - 'test suite', - snapshots.uncheckedKeysByFile.length - )}.` - ); - } else { - summary.push( - OBSOLETE_COLOR( - `${ARROW}${(0, _jestUtil().pluralize)( - 'snapshot', - snapshots.unchecked - )} obsolete ` - ) + - `from ${(0, _jestUtil().pluralize)( - 'test suite', - snapshots.uncheckedKeysByFile.length - )}. ` + - SNAPSHOT_NOTE( - `To remove ${ - snapshots.unchecked === 1 ? 'it' : 'them all' - }, ${updateCommand}.` - ) - ); - } - - snapshots.uncheckedKeysByFile.forEach(uncheckedFile => { - summary.push( - ` ${DOWN_ARROW}${(0, _utils.formatTestPath)( - globalConfig, - uncheckedFile.filePath - )}` - ); - uncheckedFile.keys.forEach(key => { - summary.push(` ${DOT}${key}`); - }); - }); - } - - return summary; -}; - -exports.default = _default; diff --git a/node_modules/@jest/reporters/build/index.d.ts b/node_modules/@jest/reporters/build/index.d.ts deleted file mode 100644 index 80997b9c..00000000 --- a/node_modules/@jest/reporters/build/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export { default as BaseReporter } from './base_reporter'; -export { default as CoverageReporter } from './coverage_reporter'; -export { default as DefaultReporter } from './default_reporter'; -export { default as NotifyReporter } from './notify_reporter'; -export { default as SummaryReporter } from './summary_reporter'; -export { default as VerboseReporter } from './verbose_reporter'; -export { Reporter, ReporterOnStartOptions } from './types'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/index.d.ts.map b/node_modules/@jest/reporters/build/index.d.ts.map deleted file mode 100644 index ccdaf2a5..00000000 --- a/node_modules/@jest/reporters/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAC,QAAQ,EAAE,sBAAsB,EAAC,MAAM,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/index.js b/node_modules/@jest/reporters/build/index.js deleted file mode 100644 index 1fc014a4..00000000 --- a/node_modules/@jest/reporters/build/index.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -Object.defineProperty(exports, 'BaseReporter', { - enumerable: true, - get: function get() { - return _base_reporter.default; - } -}); -Object.defineProperty(exports, 'CoverageReporter', { - enumerable: true, - get: function get() { - return _coverage_reporter.default; - } -}); -Object.defineProperty(exports, 'DefaultReporter', { - enumerable: true, - get: function get() { - return _default_reporter.default; - } -}); -Object.defineProperty(exports, 'NotifyReporter', { - enumerable: true, - get: function get() { - return _notify_reporter.default; - } -}); -Object.defineProperty(exports, 'SummaryReporter', { - enumerable: true, - get: function get() { - return _summary_reporter.default; - } -}); -Object.defineProperty(exports, 'VerboseReporter', { - enumerable: true, - get: function get() { - return _verbose_reporter.default; - } -}); -Object.defineProperty(exports, 'Reporter', { - enumerable: true, - get: function get() { - return _types.Reporter; - } -}); -Object.defineProperty(exports, 'ReporterOnStartOptions', { - enumerable: true, - get: function get() { - return _types.ReporterOnStartOptions; - } -}); - -var _base_reporter = _interopRequireDefault(require('./base_reporter')); - -var _coverage_reporter = _interopRequireDefault(require('./coverage_reporter')); - -var _default_reporter = _interopRequireDefault(require('./default_reporter')); - -var _notify_reporter = _interopRequireDefault(require('./notify_reporter')); - -var _summary_reporter = _interopRequireDefault(require('./summary_reporter')); - -var _verbose_reporter = _interopRequireDefault(require('./verbose_reporter')); - -var _types = require('./types'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} diff --git a/node_modules/@jest/reporters/build/notify_reporter.d.ts b/node_modules/@jest/reporters/build/notify_reporter.d.ts deleted file mode 100644 index f8fb5fed..00000000 --- a/node_modules/@jest/reporters/build/notify_reporter.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { AggregatedResult } from '@jest/test-result'; -import { TestSchedulerContext, Context } from './types'; -import BaseReporter from './base_reporter'; -export default class NotifyReporter extends BaseReporter { - private _startRun; - private _globalConfig; - private _context; - constructor(globalConfig: Config.GlobalConfig, startRun: (globalConfig: Config.GlobalConfig) => any, context: TestSchedulerContext); - onRunComplete(contexts: Set, result: AggregatedResult): void; -} -//# sourceMappingURL=notify_reporter.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/notify_reporter.d.ts.map b/node_modules/@jest/reporters/build/notify_reporter.d.ts.map deleted file mode 100644 index e9220d76..00000000 --- a/node_modules/@jest/reporters/build/notify_reporter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"notify_reporter.d.ts","sourceRoot":"","sources":["../src/notify_reporter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAC,oBAAoB,EAAE,OAAO,EAAC,MAAM,SAAS,CAAC;AACtD,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAM3C,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,YAAY;IACtD,OAAO,CAAC,SAAS,CAA6C;IAC9D,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,QAAQ,CAAuB;gBAGrC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,YAAY,KAAK,GAAG,EACpD,OAAO,EAAE,oBAAoB;IAQ/B,aAAa,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,gBAAgB,GAAG,IAAI;CA0GtE"} \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/notify_reporter.js b/node_modules/@jest/reporters/build/notify_reporter.js deleted file mode 100644 index d50d05a2..00000000 --- a/node_modules/@jest/reporters/build/notify_reporter.js +++ /dev/null @@ -1,243 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _util() { - const data = _interopRequireDefault(require('util')); - - _util = function _util() { - return data; - }; - - return data; -} - -function _exit() { - const data = _interopRequireDefault(require('exit')); - - _exit = function _exit() { - return data; - }; - - return data; -} - -function _nodeNotifier() { - const data = _interopRequireDefault(require('node-notifier')); - - _nodeNotifier = function _nodeNotifier() { - return data; - }; - - return data; -} - -var _base_reporter = _interopRequireDefault(require('./base_reporter')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest() - ); -} - -function _nonIterableRest() { - throw new TypeError('Invalid attempt to destructure non-iterable instance'); -} - -function _iterableToArrayLimit(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - try { - for ( - var _i = arr[Symbol.iterator](), _s; - !(_n = (_s = _i.next()).done); - _n = true - ) { - _arr.push(_s.value); - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i['return'] != null) _i['return'](); - } finally { - if (_d) throw _e; - } - } - return _arr; -} - -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const isDarwin = process.platform === 'darwin'; - -const icon = _path().default.resolve(__dirname, '../assets/jest_logo.png'); - -class NotifyReporter extends _base_reporter.default { - constructor(globalConfig, startRun, context) { - super(); - - _defineProperty(this, '_startRun', void 0); - - _defineProperty(this, '_globalConfig', void 0); - - _defineProperty(this, '_context', void 0); - - this._globalConfig = globalConfig; - this._startRun = startRun; - this._context = context; - } - - onRunComplete(contexts, result) { - const success = - result.numFailedTests === 0 && result.numRuntimeErrorTestSuites === 0; - const firstContext = contexts.values().next(); - const hasteFS = - firstContext && firstContext.value && firstContext.value.hasteFS; - let packageName; - - if (hasteFS != null) { - // assuming root package.json is the first one - const _hasteFS$matchFiles = hasteFS.matchFiles('package.json'), - _hasteFS$matchFiles2 = _slicedToArray(_hasteFS$matchFiles, 1), - filePath = _hasteFS$matchFiles2[0]; - - packageName = - filePath != null - ? hasteFS.getModuleName(filePath) - : this._globalConfig.rootDir; - } else { - packageName = this._globalConfig.rootDir; - } - - packageName = packageName != null ? `${packageName} - ` : ''; - const notifyMode = this._globalConfig.notifyMode; - const statusChanged = - this._context.previousSuccess !== success || this._context.firstRun; - const testsHaveRun = result.numTotalTests !== 0; - - if ( - testsHaveRun && - success && - (notifyMode === 'always' || - notifyMode === 'success' || - notifyMode === 'success-change' || - (notifyMode === 'change' && statusChanged) || - (notifyMode === 'failure-change' && statusChanged)) - ) { - const title = _util().default.format('%s%d%% Passed', packageName, 100); - - const message = _util().default.format( - (isDarwin ? '\u2705 ' : '') + '%d tests passed', - result.numPassedTests - ); - - _nodeNotifier().default.notify({ - icon, - message, - title - }); - } else if ( - testsHaveRun && - !success && - (notifyMode === 'always' || - notifyMode === 'failure' || - notifyMode === 'failure-change' || - (notifyMode === 'change' && statusChanged) || - (notifyMode === 'success-change' && statusChanged)) - ) { - const failed = result.numFailedTests / result.numTotalTests; - - const title = _util().default.format( - '%s%d%% Failed', - packageName, - Math.ceil(Number.isNaN(failed) ? 0 : failed * 100) - ); - - const message = _util().default.format( - (isDarwin ? '\u26D4\uFE0F ' : '') + '%d of %d tests failed', - result.numFailedTests, - result.numTotalTests - ); - - const watchMode = this._globalConfig.watch || this._globalConfig.watchAll; - const restartAnswer = 'Run again'; - const quitAnswer = 'Exit tests'; - - if (!watchMode) { - _nodeNotifier().default.notify({ - icon, - message, - title - }); - } else { - _nodeNotifier().default.notify( - { - actions: [restartAnswer, quitAnswer], - closeLabel: 'Close', - icon, - message, - timeout: 10, - title - }, - (err, _, metadata) => { - if (err || !metadata) { - return; - } - - if (metadata.activationValue === quitAnswer) { - (0, _exit().default)(0); - return; - } - - if (metadata.activationValue === restartAnswer) { - this._startRun(this._globalConfig); - } - } - ); - } - } - - this._context.previousSuccess = success; - this._context.firstRun = false; - } -} - -exports.default = NotifyReporter; diff --git a/node_modules/@jest/reporters/build/summary_reporter.d.ts b/node_modules/@jest/reporters/build/summary_reporter.d.ts deleted file mode 100644 index 9fead069..00000000 --- a/node_modules/@jest/reporters/build/summary_reporter.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { AggregatedResult } from '@jest/test-result'; -import { Context, ReporterOnStartOptions } from './types'; -import BaseReporter from './base_reporter'; -export default class SummaryReporter extends BaseReporter { - private _estimatedTime; - private _globalConfig; - constructor(globalConfig: Config.GlobalConfig); - private _write; - onRunStart(aggregatedResults: AggregatedResult, options: ReporterOnStartOptions): void; - onRunComplete(contexts: Set, aggregatedResults: AggregatedResult): void; - private _printSnapshotSummary; - private _printSummary; - private _getTestSummary; -} -//# sourceMappingURL=summary_reporter.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/summary_reporter.d.ts.map b/node_modules/@jest/reporters/build/summary_reporter.d.ts.map deleted file mode 100644 index 777047b7..00000000 --- a/node_modules/@jest/reporters/build/summary_reporter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"summary_reporter.d.ts","sourceRoot":"","sources":["../src/summary_reporter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAkB,MAAM,mBAAmB,CAAC;AAGpE,OAAO,EAAC,OAAO,EAAE,sBAAsB,EAAC,MAAM,SAAS,CAAC;AACxD,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAwC3C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,YAAY;IACvD,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,aAAa,CAAsB;gBAE/B,YAAY,EAAE,MAAM,CAAC,YAAY;IAW7C,OAAO,CAAC,MAAM;IAMd,UAAU,CACR,iBAAiB,EAAE,gBAAgB,EACnC,OAAO,EAAE,sBAAsB;IAMjC,aAAa,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,iBAAiB,EAAE,gBAAgB;IAsCzE,OAAO,CAAC,qBAAqB;IA6C7B,OAAO,CAAC,aAAa;IA4BrB,OAAO,CAAC,eAAe;CAgDxB"} \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/summary_reporter.js b/node_modules/@jest/reporters/build/summary_reporter.js deleted file mode 100644 index acabf7d1..00000000 --- a/node_modules/@jest/reporters/build/summary_reporter.js +++ /dev/null @@ -1,275 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -var _base_reporter = _interopRequireDefault(require('./base_reporter')); - -var _utils = require('./utils'); - -var _get_result_header = _interopRequireDefault(require('./get_result_header')); - -var _get_snapshot_summary = _interopRequireDefault( - require('./get_snapshot_summary') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const TEST_SUMMARY_THRESHOLD = 20; -const NPM_EVENTS = new Set([ - 'prepublish', - 'publish', - 'postpublish', - 'preinstall', - 'install', - 'postinstall', - 'preuninstall', - 'uninstall', - 'postuninstall', - 'preversion', - 'version', - 'postversion', - 'pretest', - 'test', - 'posttest', - 'prestop', - 'stop', - 'poststop', - 'prestart', - 'start', - 'poststart', - 'prerestart', - 'restart', - 'postrestart' -]); -const _process$env = process.env, - npm_config_user_agent = _process$env.npm_config_user_agent, - npm_lifecycle_event = _process$env.npm_lifecycle_event, - npm_lifecycle_script = _process$env.npm_lifecycle_script; - -class SummaryReporter extends _base_reporter.default { - constructor(globalConfig) { - super(); - - _defineProperty(this, '_estimatedTime', void 0); - - _defineProperty(this, '_globalConfig', void 0); - - this._globalConfig = globalConfig; - this._estimatedTime = 0; - } // If we write more than one character at a time it is possible that - // Node.js exits in the middle of printing the result. This was first observed - // in Node.js 0.10 and still persists in Node.js 6.7+. - // Let's print the test failure summary character by character which is safer - // when hundreds of tests are failing. - - _write(string) { - for (let i = 0; i < string.length; i++) { - process.stderr.write(string.charAt(i)); - } - } - - onRunStart(aggregatedResults, options) { - super.onRunStart(aggregatedResults, options); - this._estimatedTime = options.estimatedTime; - } - - onRunComplete(contexts, aggregatedResults) { - const numTotalTestSuites = aggregatedResults.numTotalTestSuites, - testResults = aggregatedResults.testResults, - wasInterrupted = aggregatedResults.wasInterrupted; - - if (numTotalTestSuites) { - const lastResult = testResults[testResults.length - 1]; // Print a newline if the last test did not fail to line up newlines - // similar to when an error would have been thrown in the test. - - if ( - !this._globalConfig.verbose && - lastResult && - !lastResult.numFailingTests && - !lastResult.testExecError - ) { - this.log(''); - } - - this._printSummary(aggregatedResults, this._globalConfig); - - this._printSnapshotSummary( - aggregatedResults.snapshot, - this._globalConfig - ); - - if (numTotalTestSuites) { - let message = (0, _utils.getSummary)(aggregatedResults, { - estimatedTime: this._estimatedTime - }); - - if (!this._globalConfig.silent) { - message += - '\n' + - (wasInterrupted - ? _chalk().default.bold.red('Test run was interrupted.') - : this._getTestSummary(contexts, this._globalConfig)); - } - - this.log(message); - } - } - } - - _printSnapshotSummary(snapshots, globalConfig) { - if ( - snapshots.added || - snapshots.filesRemoved || - snapshots.unchecked || - snapshots.unmatched || - snapshots.updated - ) { - let updateCommand; - const event = npm_lifecycle_event || ''; - const prefix = NPM_EVENTS.has(event) ? '' : 'run '; - const isYarn = - typeof npm_config_user_agent === 'string' && - npm_config_user_agent.includes('yarn'); - const client = isYarn ? 'yarn' : 'npm'; - const scriptUsesJest = - typeof npm_lifecycle_script === 'string' && - npm_lifecycle_script.includes('jest'); - - if (globalConfig.watch || globalConfig.watchAll) { - updateCommand = 'press `u`'; - } else if (event && scriptUsesJest) { - updateCommand = `run \`${client + - ' ' + - prefix + - event + - (isYarn ? '' : ' --')} -u\``; - } else { - updateCommand = 're-run jest with `-u`'; - } - - const snapshotSummary = (0, _get_snapshot_summary.default)( - snapshots, - globalConfig, - updateCommand - ); - snapshotSummary.forEach(this.log); - this.log(''); // print empty line - } - } - - _printSummary(aggregatedResults, globalConfig) { - // If there were any failing tests and there was a large number of tests - // executed, re-print the failing results at the end of execution output. - const failedTests = aggregatedResults.numFailedTests; - const runtimeErrors = aggregatedResults.numRuntimeErrorTestSuites; - - if ( - failedTests + runtimeErrors > 0 && - aggregatedResults.numTotalTestSuites > TEST_SUMMARY_THRESHOLD - ) { - this.log(_chalk().default.bold('Summary of all failing tests')); - aggregatedResults.testResults.forEach(testResult => { - const failureMessage = testResult.failureMessage; - - if (failureMessage) { - this._write( - (0, _get_result_header.default)(testResult, globalConfig) + - '\n' + - failureMessage + - '\n' - ); - } - }); - this.log(''); // print empty line - } - } - - _getTestSummary(contexts, globalConfig) { - const getMatchingTestsInfo = () => { - const prefix = globalConfig.findRelatedTests - ? ' related to files matching ' - : ' matching '; - return ( - _chalk().default.dim(prefix) + - (0, _jestUtil().testPathPatternToRegExp)( - globalConfig.testPathPattern - ).toString() - ); - }; - - let testInfo = ''; - - if (globalConfig.runTestsByPath) { - testInfo = _chalk().default.dim(' within paths'); - } else if (globalConfig.onlyChanged) { - testInfo = _chalk().default.dim(' related to changed files'); - } else if (globalConfig.testPathPattern) { - testInfo = getMatchingTestsInfo(); - } - - let nameInfo = ''; - - if (globalConfig.runTestsByPath) { - nameInfo = ' ' + globalConfig.nonFlagArgs.map(p => `"${p}"`).join(', '); - } else if (globalConfig.testNamePattern) { - nameInfo = - _chalk().default.dim(' with tests matching ') + - `"${globalConfig.testNamePattern}"`; - } - - const contextInfo = - contexts.size > 1 - ? _chalk().default.dim(' in ') + - contexts.size + - _chalk().default.dim(' projects') - : ''; - return ( - _chalk().default.dim('Ran all test suites') + - testInfo + - nameInfo + - contextInfo + - _chalk().default.dim('.') - ); - } -} - -exports.default = SummaryReporter; diff --git a/node_modules/@jest/reporters/build/types.d.ts b/node_modules/@jest/reporters/build/types.d.ts deleted file mode 100644 index 3068d1cc..00000000 --- a/node_modules/@jest/reporters/build/types.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { AggregatedResult, SerializableError, TestResult } from '@jest/test-result'; -import { JestEnvironment as Environment } from '@jest/environment'; -import { ModuleMap, FS as HasteFS } from 'jest-haste-map'; -import HasteResolver from 'jest-resolve'; -import Runtime from 'jest-runtime'; -import { worker } from './coverage_worker'; -export declare type ReporterOnStartOptions = { - estimatedTime: number; - showStatus: boolean; -}; -export declare type Context = { - config: Config.ProjectConfig; - hasteFS: HasteFS; - moduleMap: ModuleMap; - resolver: HasteResolver; -}; -export declare type Test = { - context: Context; - duration?: number; - path: Config.Path; -}; -export declare type CoverageWorker = { - worker: typeof worker; -}; -export declare type CoverageReporterOptions = { - changedFiles?: Set; -}; -export declare type CoverageReporterSerializedOptions = { - changedFiles?: Array; -}; -export declare type OnTestStart = (test: Test) => Promise; -export declare type OnTestFailure = (test: Test, error: SerializableError) => Promise; -export declare type OnTestSuccess = (test: Test, result: TestResult) => Promise; -export interface Reporter { - readonly onTestResult: (test: Test, testResult: TestResult, aggregatedResult: AggregatedResult) => Promise | void; - readonly onRunStart: (results: AggregatedResult, options: ReporterOnStartOptions) => Promise | void; - readonly onTestStart: (test: Test) => Promise | void; - readonly onRunComplete: (contexts: Set, results: AggregatedResult) => Promise | void; - readonly getLastError: () => Error | void; -} -export declare type SummaryOptions = { - estimatedTime?: number; - roundTime?: boolean; - width?: number; -}; -export declare type TestFramework = (globalConfig: Config.GlobalConfig, config: Config.ProjectConfig, environment: Environment, runtime: Runtime, testPath: string) => Promise; -export declare type TestRunnerOptions = { - serial: boolean; -}; -export declare type TestRunnerContext = { - changedFiles?: Set; -}; -export declare type TestRunData = Array<{ - context: Context; - matches: { - allTests: number; - tests: Array; - total: number; - }; -}>; -export declare type TestSchedulerContext = { - firstRun: boolean; - previousSuccess: boolean; - changedFiles?: Set; -}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/types.d.ts.map b/node_modules/@jest/reporters/build/types.d.ts.map deleted file mode 100644 index a8d5a5e2..00000000 --- a/node_modules/@jest/reporters/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,eAAe,IAAI,WAAW,EAAC,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAC,SAAS,EAAE,EAAE,IAAI,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,aAAa,MAAM,cAAc,CAAC;AACzC,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAEzC,oBAAY,sBAAsB,GAAG;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,oBAAY,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,aAAa,CAAC;CACzB,CAAC;AAEF,oBAAY,IAAI,GAAG;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC;CACnB,CAAC;AAEF,oBAAY,cAAc,GAAG;IAAC,MAAM,EAAE,OAAO,MAAM,CAAA;CAAC,CAAC;AAErD,oBAAY,uBAAuB,GAAG;IACpC,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CACjC,CAAC;AAEF,oBAAY,iCAAiC,GAAG;IAC9C,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CACnC,CAAC;AAEF,oBAAY,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AACxD,oBAAY,aAAa,GAAG,CAC1B,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,iBAAiB,KACrB,OAAO,CAAC,GAAG,CAAC,CAAC;AAClB,oBAAY,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;AAE7E,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,YAAY,EAAE,CACrB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,gBAAgB,KAC/B,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,CACnB,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,sBAAsB,KAC5B,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC3D,QAAQ,CAAC,aAAa,EAAE,CACtB,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,EACtB,OAAO,EAAE,gBAAgB,KACtB,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC;CAC3C;AAED,oBAAY,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,aAAa,GAAG,CAC1B,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,KACb,OAAO,CAAC,UAAU,CAAC,CAAC;AAEzB,oBAAY,iBAAiB,GAAG;IAC9B,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CACjC,CAAC;AAEF,oBAAY,WAAW,GAAG,KAAK,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC;CAChE,CAAC,CAAC;AAEH,oBAAY,oBAAoB,GAAG;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CACjC,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/types.js b/node_modules/@jest/reporters/build/types.js deleted file mode 100644 index d222427b..00000000 --- a/node_modules/@jest/reporters/build/types.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -var _coverage_worker = require('./coverage_worker'); diff --git a/node_modules/@jest/reporters/build/utils.d.ts b/node_modules/@jest/reporters/build/utils.d.ts deleted file mode 100644 index 1ce20a6c..00000000 --- a/node_modules/@jest/reporters/build/utils.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { AggregatedResult } from '@jest/test-result'; -import { SummaryOptions } from './types'; -export declare const printDisplayName: (config: Config.ProjectConfig) => string; -export declare const trimAndFormatPath: (pad: number, config: Config.GlobalConfig | Config.ProjectConfig, testPath: string, columns: number) => string; -export declare const formatTestPath: (config: Config.GlobalConfig | Config.ProjectConfig, testPath: string) => string; -export declare const relativePath: (config: Config.GlobalConfig | Config.ProjectConfig, testPath: string) => { - basename: string; - dirname: string; -}; -export declare const getSummary: (aggregatedResults: AggregatedResult, options?: SummaryOptions | undefined) => string; -export declare const wrapAnsiString: (string: string, terminalWidth: number) => string; -//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/utils.d.ts.map b/node_modules/@jest/reporters/build/utils.d.ts.map deleted file mode 100644 index 02827a9a..00000000 --- a/node_modules/@jest/reporters/build/utils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAInD,OAAO,EAAC,cAAc,EAAC,MAAM,SAAS,CAAC;AAIvC,eAAO,MAAM,gBAAgB,0CAgB5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,gHAmC7B,CAAC;AAEF,eAAO,MAAM,cAAc,kFAM1B,CAAC;AAEF,eAAO,MAAM,YAAY;;;CAcxB,CAAC;AAEF,eAAO,MAAM,UAAU,uFAqFtB,CAAC;AAiCF,eAAO,MAAM,cAAc,mDA2D1B,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/utils.js b/node_modules/@jest/reporters/build/utils.js deleted file mode 100644 index afeb0710..00000000 --- a/node_modules/@jest/reporters/build/utils.js +++ /dev/null @@ -1,352 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.wrapAnsiString = exports.getSummary = exports.relativePath = exports.formatTestPath = exports.trimAndFormatPath = exports.printDisplayName = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _slash() { - const data = _interopRequireDefault(require('slash')); - - _slash = function _slash() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const PROGRESS_BAR_WIDTH = 40; - -const printDisplayName = config => { - const displayName = config.displayName; - - const white = _chalk().default.reset.inverse.white; - - if (!displayName) { - return ''; - } - - if (typeof displayName === 'string') { - return _chalk().default.supportsColor - ? white(` ${displayName} `) - : displayName; - } - - const name = displayName.name, - color = displayName.color; - const chosenColor = _chalk().default.reset.inverse[color] - ? _chalk().default.reset.inverse[color] - : white; - return _chalk().default.supportsColor ? chosenColor(` ${name} `) : name; -}; - -exports.printDisplayName = printDisplayName; - -const trimAndFormatPath = (pad, config, testPath, columns) => { - const maxLength = columns - pad; - const relative = relativePath(config, testPath); - const basename = relative.basename; - let dirname = relative.dirname; // length is ok - - if ((dirname + _path().default.sep + basename).length <= maxLength) { - return (0, _slash().default)( - _chalk().default.dim(dirname + _path().default.sep) + - _chalk().default.bold(basename) - ); - } // we can fit trimmed dirname and full basename - - const basenameLength = basename.length; - - if (basenameLength + 4 < maxLength) { - const dirnameLength = maxLength - 4 - basenameLength; - dirname = - '...' + dirname.slice(dirname.length - dirnameLength, dirname.length); - return (0, _slash().default)( - _chalk().default.dim(dirname + _path().default.sep) + - _chalk().default.bold(basename) - ); - } - - if (basenameLength + 4 === maxLength) { - return (0, _slash().default)( - _chalk().default.dim('...' + _path().default.sep) + - _chalk().default.bold(basename) - ); - } // can't fit dirname, but can fit trimmed basename - - return (0, _slash().default)( - _chalk().default.bold( - '...' + basename.slice(basename.length - maxLength - 4, basename.length) - ) - ); -}; - -exports.trimAndFormatPath = trimAndFormatPath; - -const formatTestPath = (config, testPath) => { - const _relativePath = relativePath(config, testPath), - dirname = _relativePath.dirname, - basename = _relativePath.basename; - - return (0, _slash().default)( - _chalk().default.dim(dirname + _path().default.sep) + - _chalk().default.bold(basename) - ); -}; - -exports.formatTestPath = formatTestPath; - -const relativePath = (config, testPath) => { - // this function can be called with ProjectConfigs or GlobalConfigs. GlobalConfigs - // do not have config.cwd, only config.rootDir. Try using config.cwd, fallback - // to config.rootDir. (Also, some unit just use config.rootDir, which is ok) - testPath = _path().default.relative(config.cwd || config.rootDir, testPath); - - const dirname = _path().default.dirname(testPath); - - const basename = _path().default.basename(testPath); - - return { - basename, - dirname - }; -}; - -exports.relativePath = relativePath; - -const getSummary = (aggregatedResults, options) => { - let runTime = (Date.now() - aggregatedResults.startTime) / 1000; - - if (options && options.roundTime) { - runTime = Math.floor(runTime); - } - - const estimatedTime = (options && options.estimatedTime) || 0; - const snapshotResults = aggregatedResults.snapshot; - const snapshotsAdded = snapshotResults.added; - const snapshotsFailed = snapshotResults.unmatched; - const snapshotsOutdated = snapshotResults.unchecked; - const snapshotsFilesRemoved = snapshotResults.filesRemoved; - const snapshotsDidUpdate = snapshotResults.didUpdate; - const snapshotsPassed = snapshotResults.matched; - const snapshotsTotal = snapshotResults.total; - const snapshotsUpdated = snapshotResults.updated; - const suitesFailed = aggregatedResults.numFailedTestSuites; - const suitesPassed = aggregatedResults.numPassedTestSuites; - const suitesPending = aggregatedResults.numPendingTestSuites; - const suitesRun = suitesFailed + suitesPassed; - const suitesTotal = aggregatedResults.numTotalTestSuites; - const testsFailed = aggregatedResults.numFailedTests; - const testsPassed = aggregatedResults.numPassedTests; - const testsPending = aggregatedResults.numPendingTests; - const testsTodo = aggregatedResults.numTodoTests; - const testsTotal = aggregatedResults.numTotalTests; - const width = (options && options.width) || 0; - const suites = - _chalk().default.bold('Test Suites: ') + - (suitesFailed - ? _chalk().default.bold.red(`${suitesFailed} failed`) + ', ' - : '') + - (suitesPending - ? _chalk().default.bold.yellow(`${suitesPending} skipped`) + ', ' - : '') + - (suitesPassed - ? _chalk().default.bold.green(`${suitesPassed} passed`) + ', ' - : '') + - (suitesRun !== suitesTotal - ? suitesRun + ' of ' + suitesTotal - : suitesTotal) + - ` total`; - const tests = - _chalk().default.bold('Tests: ') + - (testsFailed - ? _chalk().default.bold.red(`${testsFailed} failed`) + ', ' - : '') + - (testsPending - ? _chalk().default.bold.yellow(`${testsPending} skipped`) + ', ' - : '') + - (testsTodo - ? _chalk().default.bold.magenta(`${testsTodo} todo`) + ', ' - : '') + - (testsPassed - ? _chalk().default.bold.green(`${testsPassed} passed`) + ', ' - : '') + - `${testsTotal} total`; - const snapshots = - _chalk().default.bold('Snapshots: ') + - (snapshotsFailed - ? _chalk().default.bold.red(`${snapshotsFailed} failed`) + ', ' - : '') + - (snapshotsOutdated && !snapshotsDidUpdate - ? _chalk().default.bold.yellow(`${snapshotsOutdated} obsolete`) + ', ' - : '') + - (snapshotsOutdated && snapshotsDidUpdate - ? _chalk().default.bold.green(`${snapshotsOutdated} removed`) + ', ' - : '') + - (snapshotsFilesRemoved && !snapshotsDidUpdate - ? _chalk().default.bold.yellow( - (0, _jestUtil().pluralize)('file', snapshotsFilesRemoved) + - ' obsolete' - ) + ', ' - : '') + - (snapshotsFilesRemoved && snapshotsDidUpdate - ? _chalk().default.bold.green( - (0, _jestUtil().pluralize)('file', snapshotsFilesRemoved) + ' removed' - ) + ', ' - : '') + - (snapshotsUpdated - ? _chalk().default.bold.green(`${snapshotsUpdated} updated`) + ', ' - : '') + - (snapshotsAdded - ? _chalk().default.bold.green(`${snapshotsAdded} written`) + ', ' - : '') + - (snapshotsPassed - ? _chalk().default.bold.green(`${snapshotsPassed} passed`) + ', ' - : '') + - `${snapshotsTotal} total`; - const time = renderTime(runTime, estimatedTime, width); - return [suites, tests, snapshots, time].join('\n'); -}; - -exports.getSummary = getSummary; - -const renderTime = (runTime, estimatedTime, width) => { - // If we are more than one second over the estimated time, highlight it. - const renderedTime = - estimatedTime && runTime >= estimatedTime + 1 - ? _chalk().default.bold.yellow(runTime + 's') - : runTime + 's'; - let time = _chalk().default.bold(`Time:`) + ` ${renderedTime}`; - - if (runTime < estimatedTime) { - time += `, estimated ${estimatedTime}s`; - } // Only show a progress bar if the test run is actually going to take - // some time. - - if (estimatedTime > 2 && runTime < estimatedTime && width) { - const availableWidth = Math.min(PROGRESS_BAR_WIDTH, width); - const length = Math.min( - Math.floor((runTime / estimatedTime) * availableWidth), - availableWidth - ); - - if (availableWidth >= 2) { - time += - '\n' + - _chalk() - .default.green('█') - .repeat(length) + - _chalk() - .default.white('█') - .repeat(availableWidth - length); - } - } - - return time; -}; // word-wrap a string that contains ANSI escape sequences. -// ANSI escape sequences do not add to the string length. - -const wrapAnsiString = (string, terminalWidth) => { - if (terminalWidth === 0) { - // if the terminal width is zero, don't bother word-wrapping - return string; - } - - const ANSI_REGEXP = /[\u001b\u009b]\[\d{1,2}m/g; - const tokens = []; - let lastIndex = 0; - let match; - - while ((match = ANSI_REGEXP.exec(string))) { - const ansi = match[0]; - const index = match['index']; - - if (index != lastIndex) { - tokens.push(['string', string.slice(lastIndex, index)]); - } - - tokens.push(['ansi', ansi]); - lastIndex = index + ansi.length; - } - - if (lastIndex != string.length - 1) { - tokens.push(['string', string.slice(lastIndex, string.length)]); - } - - let lastLineLength = 0; - return tokens - .reduce( - (lines, [kind, token]) => { - if (kind === 'string') { - if (lastLineLength + token.length > terminalWidth) { - while (token.length) { - const chunk = token.slice(0, terminalWidth - lastLineLength); - const remaining = token.slice( - terminalWidth - lastLineLength, - token.length - ); - lines[lines.length - 1] += chunk; - lastLineLength += chunk.length; - token = remaining; - - if (token.length) { - lines.push(''); - lastLineLength = 0; - } - } - } else { - lines[lines.length - 1] += token; - lastLineLength += token.length; - } - } else { - lines[lines.length - 1] += token; - } - - return lines; - }, - [''] - ) - .join('\n'); -}; - -exports.wrapAnsiString = wrapAnsiString; diff --git a/node_modules/@jest/reporters/build/verbose_reporter.d.ts b/node_modules/@jest/reporters/build/verbose_reporter.d.ts deleted file mode 100644 index c08fac50..00000000 --- a/node_modules/@jest/reporters/build/verbose_reporter.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { AggregatedResult, AssertionResult, Suite, TestResult } from '@jest/test-result'; -import { Test } from './types'; -import DefaultReporter from './default_reporter'; -export default class VerboseReporter extends DefaultReporter { - protected _globalConfig: Config.GlobalConfig; - constructor(globalConfig: Config.GlobalConfig); - static filterTestResults(testResults: Array): Array; - static groupTestsBySuites(testResults: Array): Suite; - onTestResult(test: Test, result: TestResult, aggregatedResults: AggregatedResult): void; - private _logTestResults; - private _logSuite; - private _getIcon; - private _logTest; - private _logTests; - private _logTodoOrPendingTest; - private _logLine; -} -//# sourceMappingURL=verbose_reporter.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/verbose_reporter.d.ts.map b/node_modules/@jest/reporters/build/verbose_reporter.d.ts.map deleted file mode 100644 index 89ac50e5..00000000 --- a/node_modules/@jest/reporters/build/verbose_reporter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"verbose_reporter.d.ts","sourceRoot":"","sources":["../src/verbose_reporter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,KAAK,EACL,UAAU,EACX,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAC,IAAI,EAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAIjD,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,eAAe;IAC1D,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,YAAY,CAAC;gBAEjC,YAAY,EAAE,MAAM,CAAC,YAAY;IAK7C,MAAM,CAAC,iBAAiB,CACtB,WAAW,EAAE,KAAK,CAAC,eAAe,CAAC,GAClC,KAAK,CAAC,eAAe,CAAC;IAIzB,MAAM,CAAC,kBAAkB,CAAC,WAAW,EAAE,KAAK,CAAC,eAAe,CAAC;IAqB7D,YAAY,CACV,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,UAAU,EAClB,iBAAiB,EAAE,gBAAgB;IAqBrC,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,SAAS;IAUjB,OAAO,CAAC,QAAQ;IAYhB,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,SAAS;IAgCjB,OAAO,CAAC,qBAAqB;IAU7B,OAAO,CAAC,QAAQ;CAIjB"} \ No newline at end of file diff --git a/node_modules/@jest/reporters/build/verbose_reporter.js b/node_modules/@jest/reporters/build/verbose_reporter.js deleted file mode 100644 index 4d3f7c73..00000000 --- a/node_modules/@jest/reporters/build/verbose_reporter.js +++ /dev/null @@ -1,231 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -var _default_reporter = _interopRequireDefault(require('./default_reporter')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const ICONS = _jestUtil().specialChars.ICONS; - -class VerboseReporter extends _default_reporter.default { - constructor(globalConfig) { - super(globalConfig); - - _defineProperty(this, '_globalConfig', void 0); - - this._globalConfig = globalConfig; - } - - static filterTestResults(testResults) { - return testResults.filter(({status}) => status !== 'pending'); - } - - static groupTestsBySuites(testResults) { - const root = { - suites: [], - tests: [], - title: '' - }; - testResults.forEach(testResult => { - let targetSuite = root; // Find the target suite for this test, - // creating nested suites as necessary. - - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = testResult.ancestorTitles[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const title = _step.value; - let matchingSuite = targetSuite.suites.find(s => s.title === title); - - if (!matchingSuite) { - matchingSuite = { - suites: [], - tests: [], - title - }; - targetSuite.suites.push(matchingSuite); - } - - targetSuite = matchingSuite; - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - targetSuite.tests.push(testResult); - }); - return root; - } - - onTestResult(test, result, aggregatedResults) { - super.testFinished(test.context.config, result, aggregatedResults); - - if (!result.skipped) { - this.printTestFileHeader( - result.testFilePath, - test.context.config, - result - ); - - if (!result.testExecError && !result.skipped) { - this._logTestResults(result.testResults); - } - - this.printTestFileFailureMessage( - result.testFilePath, - test.context.config, - result - ); - } - - super.forceFlushBufferedOutput(); - } - - _logTestResults(testResults) { - this._logSuite(VerboseReporter.groupTestsBySuites(testResults), 0); - - this._logLine(); - } - - _logSuite(suite, indentLevel) { - if (suite.title) { - this._logLine(suite.title, indentLevel); - } - - this._logTests(suite.tests, indentLevel + 1); - - suite.suites.forEach(suite => this._logSuite(suite, indentLevel + 1)); - } - - _getIcon(status) { - if (status === 'failed') { - return _chalk().default.red(ICONS.failed); - } else if (status === 'pending') { - return _chalk().default.yellow(ICONS.pending); - } else if (status === 'todo') { - return _chalk().default.magenta(ICONS.todo); - } else { - return _chalk().default.green(ICONS.success); - } - } - - _logTest(test, indentLevel) { - const status = this._getIcon(test.status); - - const time = test.duration ? ` (${test.duration.toFixed(0)}ms)` : ''; - - this._logLine( - status + ' ' + _chalk().default.dim(test.title + time), - indentLevel - ); - } - - _logTests(tests, indentLevel) { - if (this._globalConfig.expand) { - tests.forEach(test => this._logTest(test, indentLevel)); - } else { - const summedTests = tests.reduce( - (result, test) => { - if (test.status === 'pending') { - result.pending.push(test); - } else if (test.status === 'todo') { - result.todo.push(test); - } else { - this._logTest(test, indentLevel); - } - - return result; - }, - { - pending: [], - todo: [] - } - ); - - if (summedTests.pending.length > 0) { - summedTests.pending.forEach(this._logTodoOrPendingTest(indentLevel)); - } - - if (summedTests.todo.length > 0) { - summedTests.todo.forEach(this._logTodoOrPendingTest(indentLevel)); - } - } - } - - _logTodoOrPendingTest(indentLevel) { - return test => { - const printedTestStatus = - test.status === 'pending' ? 'skipped' : test.status; - - const icon = this._getIcon(test.status); - - const text = _chalk().default.dim(`${printedTestStatus} ${test.title}`); - - this._logLine(`${icon} ${text}`, indentLevel); - }; - } - - _logLine(str, indentLevel) { - const indentation = ' '.repeat(indentLevel || 0); - this.log(indentation + (str || '')); - } -} - -exports.default = VerboseReporter; diff --git a/node_modules/@jest/reporters/node_modules/slash/index.js b/node_modules/@jest/reporters/node_modules/slash/index.js deleted file mode 100644 index 75d72501..00000000 --- a/node_modules/@jest/reporters/node_modules/slash/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -module.exports = input => { - const isExtendedLengthPath = /^\\\\\?\\/.test(input); - const hasNonAscii = /[^\u0000-\u0080]+/.test(input); // eslint-disable-line no-control-regex - - if (isExtendedLengthPath || hasNonAscii) { - return input; - } - - return input.replace(/\\/g, '/'); -}; diff --git a/node_modules/@jest/reporters/node_modules/slash/license b/node_modules/@jest/reporters/node_modules/slash/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/@jest/reporters/node_modules/slash/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@jest/reporters/node_modules/slash/package.json b/node_modules/@jest/reporters/node_modules/slash/package.json deleted file mode 100644 index c6a9a035..00000000 --- a/node_modules/@jest/reporters/node_modules/slash/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "slash@2.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "slash@2.0.0", - "_id": "slash@2.0.0", - "_inBundle": false, - "_integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "_location": "/@jest/reporters/slash", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "slash@2.0.0", - "name": "slash", - "escapedName": "slash", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/@jest/reporters" - ], - "_resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/slash/issues" - }, - "description": "Convert Windows backslash paths to slash paths", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/slash#readme", - "keywords": [ - "path", - "seperator", - "sep", - "slash", - "backslash", - "windows", - "win" - ], - "license": "MIT", - "name": "slash", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/slash.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0" -} diff --git a/node_modules/@jest/reporters/node_modules/slash/readme.md b/node_modules/@jest/reporters/node_modules/slash/readme.md deleted file mode 100644 index 5e2fedbc..00000000 --- a/node_modules/@jest/reporters/node_modules/slash/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# slash [![Build Status](https://travis-ci.org/sindresorhus/slash.svg?branch=master)](https://travis-ci.org/sindresorhus/slash) - -> Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar` - -[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters. - -This was created since the `path` methods in Node outputs `\\` paths on Windows. - - -## Install - -``` -$ npm install slash -``` - - -## Usage - -```js -const path = require('path'); -const slash = require('slash'); - -const str = path.join('foo', 'bar'); -// Unix => foo/bar -// Windows => foo\\bar - -slash(str); -// Unix => foo/bar -// Windows => foo/bar -``` - - -## API - -### slash(path) - -Type: `string` - -Accepts a Windows backslash path and returns a slash path. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/@jest/reporters/package.json b/node_modules/@jest/reporters/package.json deleted file mode 100644 index f79a3a87..00000000 --- a/node_modules/@jest/reporters/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "_args": [ - [ - "@jest/reporters@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@jest/reporters@24.9.0", - "_id": "@jest/reporters@24.9.0", - "_inBundle": false, - "_integrity": "sha512-mu4X0yjaHrffOsWmVLzitKmmmWSQ3GGuefgNscUSWNiUNcEOSEQk9k3pERKEQVBb0Cnn88+UESIsZEMH3o88Gw==", - "_location": "/@jest/reporters", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@jest/reporters@24.9.0", - "name": "@jest/reporters", - "escapedName": "@jest%2freporters", - "scope": "@jest", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core" - ], - "_resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/environment": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "chalk": "^2.0.1", - "exit": "^0.1.2", - "glob": "^7.1.2", - "istanbul-lib-coverage": "^2.0.2", - "istanbul-lib-instrument": "^3.0.1", - "istanbul-lib-report": "^2.0.4", - "istanbul-lib-source-maps": "^3.0.1", - "istanbul-reports": "^2.2.6", - "jest-haste-map": "^24.9.0", - "jest-resolve": "^24.9.0", - "jest-runtime": "^24.9.0", - "jest-util": "^24.9.0", - "jest-worker": "^24.6.0", - "node-notifier": "^5.4.2", - "slash": "^2.0.0", - "source-map": "^0.6.0", - "string-length": "^2.0.0" - }, - "description": "Jest's reporters", - "devDependencies": { - "@types/exit": "^0.1.30", - "@types/glob": "^7.1.1", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-lib-instrument": "^1.7.2", - "@types/istanbul-lib-report": "^1.1.0", - "@types/istanbul-lib-source-maps": "^1.2.1", - "@types/istanbul-reports": "^1.1.0", - "@types/node-notifier": "^5.4.0", - "@types/slash": "^2.0.0", - "@types/string-length": "^2.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://jestjs.io/", - "license": "MIT", - "main": "build/index.js", - "name": "@jest/reporters", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-reporters" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/@jest/source-map/LICENSE b/node_modules/@jest/source-map/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/@jest/source-map/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/@jest/source-map/build/getCallsite.d.ts b/node_modules/@jest/source-map/build/getCallsite.d.ts deleted file mode 100644 index 73a105bd..00000000 --- a/node_modules/@jest/source-map/build/getCallsite.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import callsites from 'callsites'; -declare const _default: (level: number, sourceMaps?: Record | null | undefined) => callsites.CallSite; -export default _default; -//# sourceMappingURL=getCallsite.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/source-map/build/getCallsite.d.ts.map b/node_modules/@jest/source-map/build/getCallsite.d.ts.map deleted file mode 100644 index e66a5133..00000000 --- a/node_modules/@jest/source-map/build/getCallsite.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getCallsite.d.ts","sourceRoot":"","sources":["../src/getCallsite.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,SAAqB,MAAM,WAAW,CAAC;;AAwC9C,wBAgBE"} \ No newline at end of file diff --git a/node_modules/@jest/source-map/build/getCallsite.js b/node_modules/@jest/source-map/build/getCallsite.js deleted file mode 100644 index f9f73381..00000000 --- a/node_modules/@jest/source-map/build/getCallsite.js +++ /dev/null @@ -1,107 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _gracefulFs() { - const data = _interopRequireDefault(require('graceful-fs')); - - _gracefulFs = function _gracefulFs() { - return data; - }; - - return data; -} - -function _callsites() { - const data = _interopRequireDefault(require('callsites')); - - _callsites = function _callsites() { - return data; - }; - - return data; -} - -function _sourceMap() { - const data = require('source-map'); - - _sourceMap = function _sourceMap() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// Copied from https://github.com/rexxars/sourcemap-decorate-callsites/blob/5b9735a156964973a75dc62fd2c7f0c1975458e8/lib/index.js#L113-L158 -const addSourceMapConsumer = (callsite, consumer) => { - const getLineNumber = callsite.getLineNumber; - const getColumnNumber = callsite.getColumnNumber; - let position = null; - - function getPosition() { - if (!position) { - position = consumer.originalPositionFor({ - column: getColumnNumber.call(callsite) || -1, - line: getLineNumber.call(callsite) || -1 - }); - } - - return position; - } - - Object.defineProperties(callsite, { - getColumnNumber: { - value() { - return getPosition().column || getColumnNumber.call(callsite); - }, - - writable: false - }, - getLineNumber: { - value() { - return getPosition().line || getLineNumber.call(callsite); - }, - - writable: false - } - }); -}; - -var _default = (level, sourceMaps) => { - const levelAfterThisCall = level + 1; - const stack = (0, _callsites().default)()[levelAfterThisCall]; - const sourceMapFileName = sourceMaps && sourceMaps[stack.getFileName() || '']; - - if (sourceMapFileName) { - try { - const sourceMap = _gracefulFs().default.readFileSync( - sourceMapFileName, - 'utf8' - ); // @ts-ignore: Not allowed to pass string - - addSourceMapConsumer( - stack, - new (_sourceMap()).SourceMapConsumer(sourceMap) - ); - } catch (e) { - // ignore - } - } - - return stack; -}; - -exports.default = _default; diff --git a/node_modules/@jest/source-map/build/index.d.ts b/node_modules/@jest/source-map/build/index.d.ts deleted file mode 100644 index fb64e9ee..00000000 --- a/node_modules/@jest/source-map/build/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export { default as getCallsite } from './getCallsite'; -export { SourceMapRegistry } from './types'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/source-map/build/index.d.ts.map b/node_modules/@jest/source-map/build/index.d.ts.map deleted file mode 100644 index 7e795387..00000000 --- a/node_modules/@jest/source-map/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/source-map/build/index.js b/node_modules/@jest/source-map/build/index.js deleted file mode 100644 index 5f2d0443..00000000 --- a/node_modules/@jest/source-map/build/index.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -Object.defineProperty(exports, 'getCallsite', { - enumerable: true, - get: function get() { - return _getCallsite.default; - } -}); -Object.defineProperty(exports, 'SourceMapRegistry', { - enumerable: true, - get: function get() { - return _types.SourceMapRegistry; - } -}); - -var _getCallsite = _interopRequireDefault(require('./getCallsite')); - -var _types = require('./types'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} diff --git a/node_modules/@jest/source-map/build/types.d.ts b/node_modules/@jest/source-map/build/types.d.ts deleted file mode 100644 index 76330d75..00000000 --- a/node_modules/@jest/source-map/build/types.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare type SourceMapRegistry = Record; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/source-map/build/types.d.ts.map b/node_modules/@jest/source-map/build/types.d.ts.map deleted file mode 100644 index f5c35e89..00000000 --- a/node_modules/@jest/source-map/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oBAAY,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/source-map/build/types.js b/node_modules/@jest/source-map/build/types.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/@jest/source-map/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/@jest/source-map/node_modules/callsites/index.d.ts b/node_modules/@jest/source-map/node_modules/callsites/index.d.ts deleted file mode 100644 index 61f597cf..00000000 --- a/node_modules/@jest/source-map/node_modules/callsites/index.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -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/@jest/source-map/node_modules/callsites/index.js b/node_modules/@jest/source-map/node_modules/callsites/index.js deleted file mode 100644 index 486c2410..00000000 --- a/node_modules/@jest/source-map/node_modules/callsites/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'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/@jest/source-map/node_modules/callsites/license b/node_modules/@jest/source-map/node_modules/callsites/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/@jest/source-map/node_modules/callsites/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@jest/source-map/node_modules/callsites/package.json b/node_modules/@jest/source-map/node_modules/callsites/package.json deleted file mode 100644 index 8acf83f7..00000000 --- a/node_modules/@jest/source-map/node_modules/callsites/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_args": [ - [ - "callsites@3.1.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "callsites@3.1.0", - "_id": "callsites@3.1.0", - "_inBundle": false, - "_integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "_location": "/@jest/source-map/callsites", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "callsites@3.1.0", - "name": "callsites", - "escapedName": "callsites", - "rawSpec": "3.1.0", - "saveSpec": null, - "fetchSpec": "3.1.0" - }, - "_requiredBy": [ - "/@jest/source-map" - ], - "_resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "_spec": "3.1.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/callsites/issues" - }, - "description": "Get callsites from the V8 stack trace API", - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/sindresorhus/callsites#readme", - "keywords": [ - "stacktrace", - "v8", - "callsite", - "callsites", - "stack", - "trace", - "function", - "file", - "line", - "debug" - ], - "license": "MIT", - "name": "callsites", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/callsites.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "3.1.0" -} diff --git a/node_modules/@jest/source-map/node_modules/callsites/readme.md b/node_modules/@jest/source-map/node_modules/callsites/readme.md deleted file mode 100644 index fc846138..00000000 --- a/node_modules/@jest/source-map/node_modules/callsites/readme.md +++ /dev/null @@ -1,48 +0,0 @@ -# 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/@jest/source-map/package.json b/node_modules/@jest/source-map/package.json deleted file mode 100644 index b2e4ae70..00000000 --- a/node_modules/@jest/source-map/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_args": [ - [ - "@jest/source-map@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@jest/source-map@24.9.0", - "_id": "@jest/source-map@24.9.0", - "_inBundle": false, - "_integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", - "_location": "/@jest/source-map", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@jest/source-map@24.9.0", - "name": "@jest/source-map", - "escapedName": "@jest%2fsource-map", - "scope": "@jest", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/console", - "/jest-runtime", - "/jest-util" - ], - "_resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "callsites": "^3.0.0", - "graceful-fs": "^4.1.15", - "source-map": "^0.6.0" - }, - "devDependencies": { - "@types/graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "@jest/source-map", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-source-map" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/@jest/test-result/LICENSE b/node_modules/@jest/test-result/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/@jest/test-result/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/@jest/test-result/build/formatTestResults.d.ts b/node_modules/@jest/test-result/build/formatTestResults.d.ts deleted file mode 100644 index bf7b4203..00000000 --- a/node_modules/@jest/test-result/build/formatTestResults.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { AggregatedResult, CodeCoverageFormatter, CodeCoverageReporter, FormattedTestResults } from './types'; -export default function formatTestResults(results: AggregatedResult, codeCoverageFormatter?: CodeCoverageFormatter, reporter?: CodeCoverageReporter): FormattedTestResults; -//# sourceMappingURL=formatTestResults.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/test-result/build/formatTestResults.d.ts.map b/node_modules/@jest/test-result/build/formatTestResults.d.ts.map deleted file mode 100644 index 955919ba..00000000 --- a/node_modules/@jest/test-result/build/formatTestResults.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"formatTestResults.d.ts","sourceRoot":"","sources":["../src/formatTestResults.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,gBAAgB,EAEhB,qBAAqB,EACrB,oBAAoB,EAGpB,oBAAoB,EAErB,MAAM,SAAS,CAAC;AAwDjB,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,OAAO,EAAE,gBAAgB,EACzB,qBAAqB,CAAC,EAAE,qBAAqB,EAC7C,QAAQ,CAAC,EAAE,oBAAoB,GAC9B,oBAAoB,CAMtB"} \ No newline at end of file diff --git a/node_modules/@jest/test-result/build/formatTestResults.js b/node_modules/@jest/test-result/build/formatTestResults.js deleted file mode 100644 index 46fb2ba6..00000000 --- a/node_modules/@jest/test-result/build/formatTestResults.js +++ /dev/null @@ -1,104 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = formatTestResults; - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const formatTestResult = (testResult, codeCoverageFormatter, reporter) => { - const assertionResults = testResult.testResults.map(formatTestAssertion); - - if (testResult.testExecError) { - const now = Date.now(); - return { - assertionResults, - coverage: {}, - endTime: now, - message: testResult.failureMessage - ? testResult.failureMessage - : testResult.testExecError.message, - name: testResult.testFilePath, - startTime: now, - status: 'failed', - summary: '' - }; - } else { - const allTestsPassed = testResult.numFailingTests === 0; - return { - assertionResults, - coverage: codeCoverageFormatter - ? codeCoverageFormatter(testResult.coverage, reporter) - : testResult.coverage, - endTime: testResult.perfStats.end, - message: testResult.failureMessage || '', - name: testResult.testFilePath, - startTime: testResult.perfStats.start, - status: allTestsPassed ? 'passed' : 'failed', - summary: '' - }; - } -}; - -function formatTestAssertion(assertion) { - const result = { - ancestorTitles: assertion.ancestorTitles, - failureMessages: null, - fullName: assertion.fullName, - location: assertion.location, - status: assertion.status, - title: assertion.title - }; - - if (assertion.failureMessages) { - result.failureMessages = assertion.failureMessages; - } - - return result; -} - -function formatTestResults(results, codeCoverageFormatter, reporter) { - const testResults = results.testResults.map(testResult => - formatTestResult(testResult, codeCoverageFormatter, reporter) - ); - return _objectSpread({}, results, { - testResults - }); -} diff --git a/node_modules/@jest/test-result/build/helpers.d.ts b/node_modules/@jest/test-result/build/helpers.d.ts deleted file mode 100644 index 4e66e333..00000000 --- a/node_modules/@jest/test-result/build/helpers.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { AggregatedResult, SerializableError, TestResult } from './types'; -export declare const makeEmptyAggregatedTestResult: () => AggregatedResult; -export declare const buildFailureTestResult: (testPath: string, err: SerializableError) => TestResult; -export declare const addResult: (aggregatedResults: AggregatedResult, testResult: TestResult) => void; -//# sourceMappingURL=helpers.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/test-result/build/helpers.d.ts.map b/node_modules/@jest/test-result/build/helpers.d.ts.map deleted file mode 100644 index 824b658c..00000000 --- a/node_modules/@jest/test-result/build/helpers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,gBAAgB,EAAE,iBAAiB,EAAE,UAAU,EAAC,MAAM,SAAS,CAAC;AAExE,eAAO,MAAM,6BAA6B,wBAiCxC,CAAC;AAEH,eAAO,MAAM,sBAAsB,0DA+BjC,CAAC;AAGH,eAAO,MAAM,SAAS,uEAmErB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/test-result/build/helpers.js b/node_modules/@jest/test-result/build/helpers.js deleted file mode 100644 index b17d0a8e..00000000 --- a/node_modules/@jest/test-result/build/helpers.js +++ /dev/null @@ -1,153 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.addResult = exports.buildFailureTestResult = exports.makeEmptyAggregatedTestResult = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const makeEmptyAggregatedTestResult = () => ({ - numFailedTestSuites: 0, - numFailedTests: 0, - numPassedTestSuites: 0, - numPassedTests: 0, - numPendingTestSuites: 0, - numPendingTests: 0, - numRuntimeErrorTestSuites: 0, - numTodoTests: 0, - numTotalTestSuites: 0, - numTotalTests: 0, - openHandles: [], - snapshot: { - added: 0, - didUpdate: false, - // is set only after the full run - failure: false, - filesAdded: 0, - // combines individual test results + removed files after the full run - filesRemoved: 0, - filesRemovedList: [], - filesUnmatched: 0, - filesUpdated: 0, - matched: 0, - total: 0, - unchecked: 0, - uncheckedKeysByFile: [], - unmatched: 0, - updated: 0 - }, - startTime: 0, - success: true, - testResults: [], - wasInterrupted: false -}); - -exports.makeEmptyAggregatedTestResult = makeEmptyAggregatedTestResult; - -const buildFailureTestResult = (testPath, err) => ({ - console: undefined, - displayName: '', - failureMessage: null, - leaks: false, - numFailingTests: 0, - numPassingTests: 0, - numPendingTests: 0, - numTodoTests: 0, - openHandles: [], - perfStats: { - end: 0, - start: 0 - }, - skipped: false, - snapshot: { - added: 0, - fileDeleted: false, - matched: 0, - unchecked: 0, - uncheckedKeys: [], - unmatched: 0, - updated: 0 - }, - sourceMaps: {}, - testExecError: err, - testFilePath: testPath, - testResults: [] -}); // Add individual test result to an aggregated test result - -exports.buildFailureTestResult = buildFailureTestResult; - -const addResult = (aggregatedResults, testResult) => { - // `todos` are new as of Jest 24, and not all runners return it. - // Set it to `0` to avoid `NaN` - if (!testResult.numTodoTests) { - testResult.numTodoTests = 0; - } - - aggregatedResults.testResults.push(testResult); - aggregatedResults.numTotalTests += - testResult.numPassingTests + - testResult.numFailingTests + - testResult.numPendingTests + - testResult.numTodoTests; - aggregatedResults.numFailedTests += testResult.numFailingTests; - aggregatedResults.numPassedTests += testResult.numPassingTests; - aggregatedResults.numPendingTests += testResult.numPendingTests; - aggregatedResults.numTodoTests += testResult.numTodoTests; - - if (testResult.testExecError) { - aggregatedResults.numRuntimeErrorTestSuites++; - } - - if (testResult.skipped) { - aggregatedResults.numPendingTestSuites++; - } else if (testResult.numFailingTests > 0 || testResult.testExecError) { - aggregatedResults.numFailedTestSuites++; - } else { - aggregatedResults.numPassedTestSuites++; - } // Snapshot data - - if (testResult.snapshot.added) { - aggregatedResults.snapshot.filesAdded++; - } - - if (testResult.snapshot.fileDeleted) { - aggregatedResults.snapshot.filesRemoved++; - } - - if (testResult.snapshot.unmatched) { - aggregatedResults.snapshot.filesUnmatched++; - } - - if (testResult.snapshot.updated) { - aggregatedResults.snapshot.filesUpdated++; - } - - aggregatedResults.snapshot.added += testResult.snapshot.added; - aggregatedResults.snapshot.matched += testResult.snapshot.matched; - aggregatedResults.snapshot.unchecked += testResult.snapshot.unchecked; - - if ( - testResult.snapshot.uncheckedKeys && - testResult.snapshot.uncheckedKeys.length > 0 - ) { - aggregatedResults.snapshot.uncheckedKeysByFile.push({ - filePath: testResult.testFilePath, - keys: testResult.snapshot.uncheckedKeys - }); - } - - aggregatedResults.snapshot.unmatched += testResult.snapshot.unmatched; - aggregatedResults.snapshot.updated += testResult.snapshot.updated; - aggregatedResults.snapshot.total += - testResult.snapshot.added + - testResult.snapshot.matched + - testResult.snapshot.unmatched + - testResult.snapshot.updated; -}; - -exports.addResult = addResult; diff --git a/node_modules/@jest/test-result/build/index.d.ts b/node_modules/@jest/test-result/build/index.d.ts deleted file mode 100644 index ae45dee0..00000000 --- a/node_modules/@jest/test-result/build/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export { default as formatTestResults } from './formatTestResults'; -export { addResult, buildFailureTestResult, makeEmptyAggregatedTestResult, } from './helpers'; -export { AggregatedResult, AssertionLocation, AssertionResult, FailedAssertion, Milliseconds, SerializableError, SnapshotSummary, Status, Suite, TestResult, } from './types'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/test-result/build/index.d.ts.map b/node_modules/@jest/test-result/build/index.d.ts.map deleted file mode 100644 index 9fca820e..00000000 --- a/node_modules/@jest/test-result/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACjE,OAAO,EACL,SAAS,EACT,sBAAsB,EACtB,6BAA6B,GAC9B,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,MAAM,EACN,KAAK,EACL,UAAU,GACX,MAAM,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/test-result/build/index.js b/node_modules/@jest/test-result/build/index.js deleted file mode 100644 index 9b8bdbca..00000000 --- a/node_modules/@jest/test-result/build/index.js +++ /dev/null @@ -1,99 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -Object.defineProperty(exports, 'formatTestResults', { - enumerable: true, - get: function get() { - return _formatTestResults.default; - } -}); -Object.defineProperty(exports, 'addResult', { - enumerable: true, - get: function get() { - return _helpers.addResult; - } -}); -Object.defineProperty(exports, 'buildFailureTestResult', { - enumerable: true, - get: function get() { - return _helpers.buildFailureTestResult; - } -}); -Object.defineProperty(exports, 'makeEmptyAggregatedTestResult', { - enumerable: true, - get: function get() { - return _helpers.makeEmptyAggregatedTestResult; - } -}); -Object.defineProperty(exports, 'AggregatedResult', { - enumerable: true, - get: function get() { - return _types.AggregatedResult; - } -}); -Object.defineProperty(exports, 'AssertionLocation', { - enumerable: true, - get: function get() { - return _types.AssertionLocation; - } -}); -Object.defineProperty(exports, 'AssertionResult', { - enumerable: true, - get: function get() { - return _types.AssertionResult; - } -}); -Object.defineProperty(exports, 'FailedAssertion', { - enumerable: true, - get: function get() { - return _types.FailedAssertion; - } -}); -Object.defineProperty(exports, 'Milliseconds', { - enumerable: true, - get: function get() { - return _types.Milliseconds; - } -}); -Object.defineProperty(exports, 'SerializableError', { - enumerable: true, - get: function get() { - return _types.SerializableError; - } -}); -Object.defineProperty(exports, 'SnapshotSummary', { - enumerable: true, - get: function get() { - return _types.SnapshotSummary; - } -}); -Object.defineProperty(exports, 'Status', { - enumerable: true, - get: function get() { - return _types.Status; - } -}); -Object.defineProperty(exports, 'Suite', { - enumerable: true, - get: function get() { - return _types.Suite; - } -}); -Object.defineProperty(exports, 'TestResult', { - enumerable: true, - get: function get() { - return _types.TestResult; - } -}); - -var _formatTestResults = _interopRequireDefault(require('./formatTestResults')); - -var _helpers = require('./helpers'); - -var _types = require('./types'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} diff --git a/node_modules/@jest/test-result/build/types.d.ts b/node_modules/@jest/test-result/build/types.d.ts deleted file mode 100644 index e79fe4ff..00000000 --- a/node_modules/@jest/test-result/build/types.d.ts +++ /dev/null @@ -1,166 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { CoverageMap, CoverageMapData } from 'istanbul-lib-coverage'; -import { ConsoleBuffer } from '@jest/console'; -import { Config } from '@jest/types'; -export declare type SerializableError = { - code?: unknown; - message: string; - stack: string | null | undefined; - type?: string; -}; -export declare type FailedAssertion = { - matcherName?: string; - message?: string; - actual?: any; - pass?: boolean; - passed?: boolean; - expected?: any; - isNot?: boolean; - stack?: string; - error?: any; -}; -export declare type AssertionLocation = { - fullName: string; - path: string; -}; -export declare type Status = 'passed' | 'failed' | 'skipped' | 'pending' | 'todo' | 'disabled'; -export declare type Bytes = number; -export declare type Milliseconds = number; -declare type Callsite = { - column: number; - line: number; -}; -export declare type AssertionResult = { - ancestorTitles: Array; - duration?: Milliseconds | null | undefined; - failureMessages: Array; - fullName: string; - invocations?: number; - location: Callsite | null | undefined; - numPassingAsserts: number; - status: Status; - title: string; -}; -export declare type FormattedAssertionResult = { - ancestorTitles: Array; - failureMessages: Array | null; - fullName: string; - location: Callsite | null | undefined; - status: Status; - title: string; -}; -export declare type AggregatedResultWithoutCoverage = { - numFailedTests: number; - numFailedTestSuites: number; - numPassedTests: number; - numPassedTestSuites: number; - numPendingTests: number; - numTodoTests: number; - numPendingTestSuites: number; - numRuntimeErrorTestSuites: number; - numTotalTests: number; - numTotalTestSuites: number; - openHandles: Array; - snapshot: SnapshotSummary; - startTime: number; - success: boolean; - testResults: Array; - wasInterrupted: boolean; -}; -export declare type AggregatedResult = AggregatedResultWithoutCoverage & { - coverageMap?: CoverageMap | null; -}; -export declare type Suite = { - title: string; - suites: Array; - tests: Array; -}; -export declare type TestResult = { - console?: ConsoleBuffer; - coverage?: CoverageMapData; - displayName?: Config.DisplayName; - failureMessage?: string | null; - leaks: boolean; - memoryUsage?: Bytes; - numFailingTests: number; - numPassingTests: number; - numPendingTests: number; - numTodoTests: number; - openHandles: Array; - perfStats: { - end: Milliseconds; - start: Milliseconds; - }; - skipped: boolean; - snapshot: { - added: number; - fileDeleted: boolean; - matched: number; - unchecked: number; - uncheckedKeys: Array; - unmatched: number; - updated: number; - }; - sourceMaps?: { - [sourcePath: string]: string; - }; - testExecError?: SerializableError; - testFilePath: string; - testResults: Array; -}; -export declare type FormattedTestResult = { - message: string; - name: string; - summary: string; - status: 'failed' | 'passed'; - startTime: number; - endTime: number; - coverage: any; - assertionResults: Array; -}; -export declare type FormattedTestResults = { - coverageMap?: CoverageMap | null | undefined; - numFailedTests: number; - numFailedTestSuites: number; - numPassedTests: number; - numPassedTestSuites: number; - numPendingTests: number; - numPendingTestSuites: number; - numRuntimeErrorTestSuites: number; - numTotalTests: number; - numTotalTestSuites: number; - snapshot: SnapshotSummary; - startTime: number; - success: boolean; - testResults: Array; - wasInterrupted: boolean; -}; -export declare type CodeCoverageReporter = any; -export declare type CodeCoverageFormatter = (coverage: CoverageMapData | null | undefined, reporter: CodeCoverageReporter) => Record | null | undefined; -export declare type UncheckedSnapshot = { - filePath: string; - keys: Array; -}; -export declare type SnapshotSummary = { - added: number; - didUpdate: boolean; - failure: boolean; - filesAdded: number; - filesRemoved: number; - filesRemovedList: Array; - filesUnmatched: number; - filesUpdated: number; - matched: number; - total: number; - unchecked: number; - uncheckedKeysByFile: Array; - unmatched: number; - updated: number; -}; -export {}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/test-result/build/types.d.ts.map b/node_modules/@jest/test-result/build/types.d.ts.map deleted file mode 100644 index ff56ba90..00000000 --- a/node_modules/@jest/test-result/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,WAAW,EAAE,eAAe,EAAC,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,oBAAY,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,GAAG,CAAC;CACb,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,MAAM,GACd,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,MAAM,GACN,UAAU,CAAC;AAEf,oBAAY,KAAK,GAAG,MAAM,CAAC;AAE3B,oBAAY,YAAY,GAAG,MAAM,CAAC;AAClC,aAAK,QAAQ,GAAG;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,wBAAwB,GAAG;IACrC,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,+BAA+B,GAAG;IAC5C,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,yBAAyB,EAAE,MAAM,CAAC;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC/B,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,oBAAY,gBAAgB,GAAG,+BAA+B,GAAG;IAC/D,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,oBAAY,KAAK,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;CAC/B,CAAC;AAEF,oBAAY,UAAU,GAAG;IACvB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1B,SAAS,EAAE;QACT,GAAG,EAAE,YAAY,CAAC;QAClB,KAAK,EAAE,YAAY,CAAC;KACrB,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,OAAO,CAAC;QACrB,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7B,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,UAAU,CAAC,EAAE;QACX,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;KAC9B,CAAC;IACF,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;CACrC,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,GAAG,CAAC;IACd,gBAAgB,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC;CACnD,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7C,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,yBAAyB,EAAE,MAAM,CAAC;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,eAAe,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACxC,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,oBAAY,oBAAoB,GAAG,GAAG,CAAC;AAEvC,oBAAY,qBAAqB,GAAG,CAClC,QAAQ,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,EAC5C,QAAQ,EAAE,oBAAoB,KAC3B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AAE5C,oBAAY,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACrB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/test-result/build/types.js b/node_modules/@jest/test-result/build/types.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/@jest/test-result/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/@jest/test-result/package.json b/node_modules/@jest/test-result/package.json deleted file mode 100644 index b3507190..00000000 --- a/node_modules/@jest/test-result/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_args": [ - [ - "@jest/test-result@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@jest/test-result@24.9.0", - "_id": "@jest/test-result@24.9.0", - "_inBundle": false, - "_integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", - "_location": "/@jest/test-result", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@jest/test-result@24.9.0", - "name": "@jest/test-result", - "escapedName": "@jest%2ftest-result", - "scope": "@jest", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core", - "/@jest/reporters", - "/@jest/test-sequencer", - "/jest-circus", - "/jest-jasmine2", - "/jest-message-util", - "/jest-runner", - "/jest-util", - "/jest-watcher", - "/jest/jest-cli" - ], - "_resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/console": "^24.9.0", - "@jest/types": "^24.9.0", - "@types/istanbul-lib-coverage": "^2.0.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "@jest/test-result", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-test-result" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/@jest/test-sequencer/build/index.d.ts b/node_modules/@jest/test-sequencer/build/index.d.ts deleted file mode 100644 index b921e615..00000000 --- a/node_modules/@jest/test-sequencer/build/index.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { AggregatedResult } from '@jest/test-result'; -import { Context } from 'jest-runtime'; -import { Test } from 'jest-runner'; -declare type Cache = { - [key: string]: [0 | 1, number]; -}; -/** - * The TestSequencer will ultimately decide which tests should run first. - * It is responsible for storing and reading from a local cache - * map that stores context information for a given test, such as how long it - * took to run during the last run and if it has failed or not. - * Such information is used on: - * TestSequencer.sort(tests: Array) - * to sort the order of the provided tests. - * - * After the results are collected, - * TestSequencer.cacheResults(tests: Array, results: AggregatedResult) - * is called to store/update this information on the cache map. - */ -export default class TestSequencer { - private _cache; - _getCachePath(context: Context): string; - _getCache(test: Test): Cache; - /** - * Sorting tests is very important because it has a great impact on the - * user-perceived responsiveness and speed of the test run. - * - * If such information is on cache, tests are sorted based on: - * -> Has it failed during the last run ? - * Since it's important to provide the most expected feedback as quickly - * as possible. - * -> How long it took to run ? - * Because running long tests first is an effort to minimize worker idle - * time at the end of a long test run. - * And if that information is not available they are sorted based on file size - * since big test files usually take longer to complete. - * - * Note that a possible improvement would be to analyse other information - * from the file other than its size. - * - */ - sort(tests: Array): Array; - cacheResults(tests: Array, results: AggregatedResult): void; -} -export {}; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/test-sequencer/build/index.d.ts.map b/node_modules/@jest/test-sequencer/build/index.d.ts.map deleted file mode 100644 index 6799e206..00000000 --- a/node_modules/@jest/test-sequencer/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AAKjC,aAAK,KAAK,GAAG;IACX,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;CAChC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,OAAO,aAAa;IAChC,OAAO,CAAC,MAAM,CAAkC;IAEhD,aAAa,CAAC,OAAO,EAAE,OAAO;IAK9B,SAAS,CAAC,IAAI,EAAE,IAAI;IAuBpB;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;IA6BrC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,gBAAgB;CAkB3D"} \ No newline at end of file diff --git a/node_modules/@jest/test-sequencer/build/index.js b/node_modules/@jest/test-sequencer/build/index.js deleted file mode 100644 index 4291cab1..00000000 --- a/node_modules/@jest/test-sequencer/build/index.js +++ /dev/null @@ -1,178 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _fs() { - const data = _interopRequireDefault(require('fs')); - - _fs = function _fs() { - return data; - }; - - return data; -} - -function _jestHasteMap() { - const data = require('jest-haste-map'); - - _jestHasteMap = function _jestHasteMap() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const FAIL = 0; -const SUCCESS = 1; - -/** - * The TestSequencer will ultimately decide which tests should run first. - * It is responsible for storing and reading from a local cache - * map that stores context information for a given test, such as how long it - * took to run during the last run and if it has failed or not. - * Such information is used on: - * TestSequencer.sort(tests: Array) - * to sort the order of the provided tests. - * - * After the results are collected, - * TestSequencer.cacheResults(tests: Array, results: AggregatedResult) - * is called to store/update this information on the cache map. - */ -class TestSequencer { - constructor() { - _defineProperty(this, '_cache', new Map()); - } - - _getCachePath(context) { - const config = context.config; - return (0, _jestHasteMap().getCacheFilePath)( - config.cacheDirectory, - 'perf-cache-' + config.name - ); - } - - _getCache(test) { - const context = test.context; - - if (!this._cache.has(context) && context.config.cache) { - const cachePath = this._getCachePath(context); - - if (_fs().default.existsSync(cachePath)) { - try { - this._cache.set( - context, - JSON.parse(_fs().default.readFileSync(cachePath, 'utf8')) - ); - } catch (e) {} - } - } - - let cache = this._cache.get(context); - - if (!cache) { - cache = {}; - - this._cache.set(context, cache); - } - - return cache; - } - /** - * Sorting tests is very important because it has a great impact on the - * user-perceived responsiveness and speed of the test run. - * - * If such information is on cache, tests are sorted based on: - * -> Has it failed during the last run ? - * Since it's important to provide the most expected feedback as quickly - * as possible. - * -> How long it took to run ? - * Because running long tests first is an effort to minimize worker idle - * time at the end of a long test run. - * And if that information is not available they are sorted based on file size - * since big test files usually take longer to complete. - * - * Note that a possible improvement would be to analyse other information - * from the file other than its size. - * - */ - - sort(tests) { - const stats = {}; - - const fileSize = ({path, context: {hasteFS}}) => - stats[path] || (stats[path] = hasteFS.getSize(path) || 0); - - const hasFailed = (cache, test) => - cache[test.path] && cache[test.path][0] === FAIL; - - const time = (cache, test) => cache[test.path] && cache[test.path][1]; - - tests.forEach(test => (test.duration = time(this._getCache(test), test))); - return tests.sort((testA, testB) => { - const cacheA = this._getCache(testA); - - const cacheB = this._getCache(testB); - - const failedA = hasFailed(cacheA, testA); - const failedB = hasFailed(cacheB, testB); - const hasTimeA = testA.duration != null; - - if (failedA !== failedB) { - return failedA ? -1 : 1; - } else if (hasTimeA != (testB.duration != null)) { - // If only one of two tests has timing information, run it last - return hasTimeA ? 1 : -1; - } else if (testA.duration != null && testB.duration != null) { - return testA.duration < testB.duration ? 1 : -1; - } else { - return fileSize(testA) < fileSize(testB) ? 1 : -1; - } - }); - } - - cacheResults(tests, results) { - const map = Object.create(null); - tests.forEach(test => (map[test.path] = test)); - results.testResults.forEach(testResult => { - if (testResult && map[testResult.testFilePath] && !testResult.skipped) { - const cache = this._getCache(map[testResult.testFilePath]); - - const perf = testResult.perfStats; - cache[testResult.testFilePath] = [ - testResult.numFailingTests ? FAIL : SUCCESS, - perf.end - perf.start || 0 - ]; - } - }); - - this._cache.forEach((cache, context) => - _fs().default.writeFileSync( - this._getCachePath(context), - JSON.stringify(cache) - ) - ); - } -} - -exports.default = TestSequencer; diff --git a/node_modules/@jest/test-sequencer/package.json b/node_modules/@jest/test-sequencer/package.json deleted file mode 100644 index b68e2860..00000000 --- a/node_modules/@jest/test-sequencer/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_args": [ - [ - "@jest/test-sequencer@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@jest/test-sequencer@24.9.0", - "_id": "@jest/test-sequencer@24.9.0", - "_inBundle": false, - "_integrity": "sha512-6qqsU4o0kW1dvA95qfNog8v8gkRN9ph6Lz7r96IvZpHdNipP2cBcb07J1Z45mz/VIS01OHJ3pY8T5fUY38tg4A==", - "_location": "/@jest/test-sequencer", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@jest/test-sequencer@24.9.0", - "name": "@jest/test-sequencer", - "escapedName": "@jest%2ftest-sequencer", - "scope": "@jest", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/jest-config" - ], - "_resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/test-result": "^24.9.0", - "jest-haste-map": "^24.9.0", - "jest-runner": "^24.9.0", - "jest-runtime": "^24.9.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "@jest/test-sequencer", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-test-sequencer" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/@jest/transform/build/ScriptTransformer.d.ts b/node_modules/@jest/transform/build/ScriptTransformer.d.ts deleted file mode 100644 index 22018348..00000000 --- a/node_modules/@jest/transform/build/ScriptTransformer.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { Options, TransformResult } from './types'; -export default class ScriptTransformer { - static EVAL_RESULT_VARIABLE: 'Object.'; - private _cache; - private _config; - private _transformCache; - private _transformConfigCache; - constructor(config: Config.ProjectConfig); - private _getCacheKey; - private _getFileCachePath; - private _getTransformPath; - private _getTransformer; - private _instrumentFile; - private _getRealPath; - preloadTransformer(filepath: Config.Path): void; - transformSource(filepath: Config.Path, content: string, instrument: boolean): { - code: string; - mapCoverage: boolean; - sourceMapPath: string | null; - }; - private _transformAndBuildScript; - transform(filename: Config.Path, options: Options, fileSource?: string): TransformResult; - transformJson(filename: Config.Path, options: Options, fileSource: string): string; - requireAndTranspileModule(moduleName: string, callback?: (module: ModuleType) => void): ModuleType; - requireAndTranspileModule(moduleName: string, callback?: (module: ModuleType) => Promise): Promise; - /** - * @deprecated use `this.shouldTransform` instead - */ - private _shouldTransform; - shouldTransform(filename: Config.Path): boolean; -} -//# sourceMappingURL=ScriptTransformer.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/transform/build/ScriptTransformer.d.ts.map b/node_modules/@jest/transform/build/ScriptTransformer.d.ts.map deleted file mode 100644 index d74a82fe..00000000 --- a/node_modules/@jest/transform/build/ScriptTransformer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ScriptTransformer.d.ts","sourceRoot":"","sources":["../src/ScriptTransformer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAanC,OAAO,EACL,OAAO,EAGP,eAAe,EAChB,MAAM,SAAS,CAAC;AAoCjB,MAAM,CAAC,OAAO,OAAO,iBAAiB;IACpC,MAAM,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAClD,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,eAAe,CAAgC;IACvD,OAAO,CAAC,qBAAqB,CAA4B;gBAE7C,MAAM,EAAE,MAAM,CAAC,aAAa;IAqBxC,OAAO,CAAC,YAAY;IAgCpB,OAAO,CAAC,iBAAiB;IAyBzB,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,eAAe;IA4BvB,OAAO,CAAC,eAAe;IAmCvB,OAAO,CAAC,YAAY;IAUpB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI;IAI/C,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO;;;;;IAwF3E,OAAO,CAAC,wBAAwB;IA+DhC,SAAS,CACP,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,OAAO,EAAE,OAAO,EAChB,UAAU,CAAC,EAAE,MAAM,GAClB,eAAe;IA2BlB,aAAa,CACX,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,GACjB,MAAM;IAkBT,yBAAyB,CAAC,UAAU,GAAG,OAAO,EAC5C,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,GACtC,UAAU;IACb,yBAAyB,CAAC,UAAU,GAAG,OAAO,EAC5C,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,GAC/C,OAAO,CAAC,UAAU,CAAC;IAsDtB;;OAEG;IAEH,OAAO,CAAC,gBAAgB;IAIxB,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO;CAQhD"} \ No newline at end of file diff --git a/node_modules/@jest/transform/build/ScriptTransformer.js b/node_modules/@jest/transform/build/ScriptTransformer.js deleted file mode 100644 index 0dbc1d7b..00000000 --- a/node_modules/@jest/transform/build/ScriptTransformer.js +++ /dev/null @@ -1,863 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _crypto() { - const data = _interopRequireDefault(require('crypto')); - - _crypto = function _crypto() { - return data; - }; - - return data; -} - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _vm() { - const data = _interopRequireDefault(require('vm')); - - _vm = function _vm() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _gracefulFs() { - const data = _interopRequireDefault(require('graceful-fs')); - - _gracefulFs = function _gracefulFs() { - return data; - }; - - return data; -} - -function _core() { - const data = require('@babel/core'); - - _core = function _core() { - return data; - }; - - return data; -} - -function _babelPluginIstanbul() { - const data = _interopRequireDefault(require('babel-plugin-istanbul')); - - _babelPluginIstanbul = function _babelPluginIstanbul() { - return data; - }; - - return data; -} - -function _convertSourceMap() { - const data = _interopRequireDefault(require('convert-source-map')); - - _convertSourceMap = function _convertSourceMap() { - return data; - }; - - return data; -} - -function _jestHasteMap() { - const data = _interopRequireDefault(require('jest-haste-map')); - - _jestHasteMap = function _jestHasteMap() { - return data; - }; - - return data; -} - -function _fastJsonStableStringify() { - const data = _interopRequireDefault(require('fast-json-stable-stringify')); - - _fastJsonStableStringify = function _fastJsonStableStringify() { - return data; - }; - - return data; -} - -function _slash() { - const data = _interopRequireDefault(require('slash')); - - _slash = function _slash() { - return data; - }; - - return data; -} - -function _writeFileAtomic() { - const data = _interopRequireDefault(require('write-file-atomic')); - - _writeFileAtomic = function _writeFileAtomic() { - return data; - }; - - return data; -} - -function _realpathNative() { - const data = require('realpath-native'); - - _realpathNative = function _realpathNative() { - return data; - }; - - return data; -} - -function _pirates() { - const data = require('pirates'); - - _pirates = function _pirates() { - return data; - }; - - return data; -} - -var _shouldInstrument = _interopRequireDefault(require('./shouldInstrument')); - -var _enhanceUnexpectedTokenMessage = _interopRequireDefault( - require('./enhanceUnexpectedTokenMessage') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -// Use `require` to avoid TS rootDir -const _require = require('../package.json'), - VERSION = _require.version; // This data structure is used to avoid recalculating some data every time that -// we need to transform a file. Since ScriptTransformer is instantiated for each -// file we need to keep this object in the local scope of this module. - -const projectCaches = new WeakMap(); // To reset the cache for specific changesets (rather than package version). - -const CACHE_VERSION = '1'; - -function waitForPromiseWithCleanup(_x, _x2) { - return _waitForPromiseWithCleanup.apply(this, arguments); -} - -function _waitForPromiseWithCleanup() { - _waitForPromiseWithCleanup = _asyncToGenerator(function*(promise, cleanup) { - try { - yield promise; - } finally { - cleanup(); - } - }); - return _waitForPromiseWithCleanup.apply(this, arguments); -} - -class ScriptTransformer { - constructor(config) { - _defineProperty(this, '_cache', void 0); - - _defineProperty(this, '_config', void 0); - - _defineProperty(this, '_transformCache', void 0); - - _defineProperty(this, '_transformConfigCache', void 0); - - this._config = config; - this._transformCache = new Map(); - this._transformConfigCache = new Map(); - let projectCache = projectCaches.get(config); - - if (!projectCache) { - projectCache = { - configString: (0, _fastJsonStableStringify().default)(this._config), - ignorePatternsRegExp: calcIgnorePatternRegExp(this._config), - transformRegExp: calcTransformRegExp(this._config), - transformedFiles: new Map() - }; - projectCaches.set(config, projectCache); - } - - this._cache = projectCache; - } - - _getCacheKey(fileData, filename, instrument) { - const configString = this._cache.configString; - - const transformer = this._getTransformer(filename); - - if (transformer && typeof transformer.getCacheKey === 'function') { - return _crypto() - .default.createHash('md5') - .update( - transformer.getCacheKey(fileData, filename, configString, { - config: this._config, - instrument, - rootDir: this._config.rootDir - }) - ) - .update(CACHE_VERSION) - .digest('hex'); - } else { - return _crypto() - .default.createHash('md5') - .update(fileData) - .update(configString) - .update(instrument ? 'instrument' : '') - .update(filename) - .update(CACHE_VERSION) - .digest('hex'); - } - } - - _getFileCachePath(filename, content, instrument) { - const baseCacheDir = _jestHasteMap().default.getCacheFilePath( - this._config.cacheDirectory, - 'jest-transform-cache-' + this._config.name, - VERSION - ); - - const cacheKey = this._getCacheKey(content, filename, instrument); // Create sub folders based on the cacheKey to avoid creating one - // directory with many files. - - const cacheDir = _path().default.join( - baseCacheDir, - cacheKey[0] + cacheKey[1] - ); - - const cacheFilenamePrefix = _path() - .default.basename(filename, _path().default.extname(filename)) - .replace(/\W/g, ''); - - const cachePath = (0, _slash().default)( - _path().default.join(cacheDir, cacheFilenamePrefix + '_' + cacheKey) - ); - (0, _jestUtil().createDirectory)(cacheDir); - return cachePath; - } - - _getTransformPath(filename) { - const transformRegExp = this._cache.transformRegExp; - - if (!transformRegExp) { - return undefined; - } - - for (let i = 0; i < transformRegExp.length; i++) { - if (transformRegExp[i][0].test(filename)) { - const transformPath = transformRegExp[i][1]; - - this._transformConfigCache.set(transformPath, transformRegExp[i][2]); - - return transformPath; - } - } - - return undefined; - } - - _getTransformer(filename) { - let transform = null; - - if (!this._config.transform || !this._config.transform.length) { - return null; - } - - const transformPath = this._getTransformPath(filename); - - if (transformPath) { - const transformer = this._transformCache.get(transformPath); - - if (transformer != null) { - return transformer; - } - - transform = require(transformPath); - - const transformerConfig = this._transformConfigCache.get(transformPath); - - if (typeof transform.createTransformer === 'function') { - transform = transform.createTransformer(transformerConfig); - } - - if (typeof transform.process !== 'function') { - throw new TypeError( - 'Jest: a transform must export a `process` function.' - ); - } - - this._transformCache.set(transformPath, transform); - } - - return transform; - } - - _instrumentFile(filename, content) { - const result = (0, _core().transformSync)(content, { - auxiliaryCommentBefore: ' istanbul ignore next ', - babelrc: false, - caller: { - name: '@jest/transform', - supportsStaticESM: false - }, - configFile: false, - filename, - plugins: [ - [ - _babelPluginIstanbul().default, - { - compact: false, - // files outside `cwd` will not be instrumented - cwd: this._config.rootDir, - exclude: [], - useInlineSourceMaps: false - } - ] - ] - }); - - if (result) { - const code = result.code; - - if (code) { - return code; - } - } - - return content; - } - - _getRealPath(filepath) { - try { - return (0, _realpathNative().sync)(filepath) || filepath; - } catch (err) { - return filepath; - } - } // We don't want to expose transformers to the outside - this function is just - // to warm up `this._transformCache` - - preloadTransformer(filepath) { - this._getTransformer(filepath); - } - - transformSource(filepath, content, instrument) { - const filename = this._getRealPath(filepath); - - const transform = this._getTransformer(filename); - - const cacheFilePath = this._getFileCachePath(filename, content, instrument); - - let sourceMapPath = cacheFilePath + '.map'; // Ignore cache if `config.cache` is set (--no-cache) - - let code = this._config.cache ? readCodeCacheFile(cacheFilePath) : null; - const shouldCallTransform = transform && this.shouldTransform(filename); // That means that the transform has a custom instrumentation - // logic and will handle it based on `config.collectCoverage` option - - const transformWillInstrument = - shouldCallTransform && transform && transform.canInstrument; // If we handle the coverage instrumentation, we should try to map code - // coverage against original source with any provided source map - - const mapCoverage = instrument && !transformWillInstrument; - - if (code) { - // This is broken: we return the code, and a path for the source map - // directly from the cache. But, nothing ensures the source map actually - // matches that source code. They could have gotten out-of-sync in case - // two separate processes write concurrently to the same cache files. - return { - code, - mapCoverage, - sourceMapPath - }; - } - - let transformed = { - code: content, - map: null - }; - - if (transform && shouldCallTransform) { - const processed = transform.process(content, filename, this._config, { - instrument - }); - - if (typeof processed === 'string') { - transformed.code = processed; - } else if (processed != null && typeof processed.code === 'string') { - transformed = processed; - } else { - throw new TypeError( - "Jest: a transform's `process` function must return a string, " + - 'or an object with `code` key containing this string.' - ); - } - } - - if (!transformed.map) { - //Could be a potential freeze here. - //See: https://github.com/facebook/jest/pull/5177#discussion_r158883570 - const inlineSourceMap = _convertSourceMap().default.fromSource( - transformed.code - ); - - if (inlineSourceMap) { - transformed.map = inlineSourceMap.toJSON(); - } - } - - if (!transformWillInstrument && instrument) { - code = this._instrumentFile(filename, transformed.code); - } else { - code = transformed.code; - } - - if (transformed.map) { - const sourceMapContent = - typeof transformed.map === 'string' - ? transformed.map - : JSON.stringify(transformed.map); - writeCacheFile(sourceMapPath, sourceMapContent); - } else { - sourceMapPath = null; - } - - writeCodeCacheFile(cacheFilePath, code); - return { - code, - mapCoverage, - sourceMapPath - }; - } - - _transformAndBuildScript(filename, options, instrument, fileSource) { - const isInternalModule = !!(options && options.isInternalModule); - const isCoreModule = !!(options && options.isCoreModule); - const content = stripShebang( - fileSource || _gracefulFs().default.readFileSync(filename, 'utf8') - ); - let wrappedCode; - let sourceMapPath = null; - let mapCoverage = false; - const willTransform = - !isInternalModule && - !isCoreModule && - (this.shouldTransform(filename) || instrument); - - try { - const extraGlobals = (options && options.extraGlobals) || []; - - if (willTransform) { - const transformedSource = this.transformSource( - filename, - content, - instrument - ); - wrappedCode = wrap(transformedSource.code, ...extraGlobals); - sourceMapPath = transformedSource.sourceMapPath; - mapCoverage = transformedSource.mapCoverage; - } else { - wrappedCode = wrap(content, ...extraGlobals); - } - - return { - mapCoverage, - script: new (_vm()).default.Script(wrappedCode, { - displayErrors: true, - filename: isCoreModule ? 'jest-nodejs-core-' + filename : filename - }), - sourceMapPath - }; - } catch (e) { - if (e.codeFrame) { - e.stack = e.message + '\n' + e.codeFrame; - } - - if ( - e instanceof SyntaxError && - e.message.includes('Unexpected token') && - !e.message.includes(' expected') - ) { - throw (0, _enhanceUnexpectedTokenMessage.default)(e); - } - - throw e; - } - } - - transform(filename, options, fileSource) { - let scriptCacheKey = undefined; - let instrument = false; - - if (!options.isCoreModule) { - instrument = (0, _shouldInstrument.default)( - filename, - options, - this._config - ); - scriptCacheKey = getScriptCacheKey(filename, instrument); - - const result = this._cache.transformedFiles.get(scriptCacheKey); - - if (result) { - return result; - } - } - - const result = this._transformAndBuildScript( - filename, - options, - instrument, - fileSource - ); - - if (scriptCacheKey) { - this._cache.transformedFiles.set(scriptCacheKey, result); - } - - return result; - } - - transformJson(filename, options, fileSource) { - const isInternalModule = options.isInternalModule; - const isCoreModule = options.isCoreModule; - const willTransform = - !isInternalModule && !isCoreModule && this.shouldTransform(filename); - - if (willTransform) { - const _this$transformSource = this.transformSource( - filename, - fileSource, - false - ), - transformedJsonSource = _this$transformSource.code; - - return transformedJsonSource; - } - - return fileSource; - } - - requireAndTranspileModule(moduleName, callback) { - // Load the transformer to avoid a cycle where we need to load a - // transformer in order to transform it in the require hooks - this.preloadTransformer(moduleName); - let transforming = false; - const revertHook = (0, _pirates().addHook)( - (code, filename) => { - try { - transforming = true; - return this.transformSource(filename, code, false).code || code; - } finally { - transforming = false; - } - }, - { - exts: [_path().default.extname(moduleName)], - ignoreNodeModules: false, - matcher: filename => { - if (transforming) { - // Don't transform any dependency required by the transformer itself - return false; - } - - return this.shouldTransform(filename); - } - } - ); - - const module = require(moduleName); - - if (!callback) { - revertHook(); - return module; - } - - try { - const cbResult = callback(module); - - if ((0, _jestUtil().isPromise)(cbResult)) { - return waitForPromiseWithCleanup(cbResult, revertHook).then( - () => module - ); - } - } finally { - revertHook(); - } - - return module; - } - /** - * @deprecated use `this.shouldTransform` instead - */ - // @ts-ignore: Unused and private - remove in Jest 25 - - _shouldTransform(filename) { - return this.shouldTransform(filename); - } - - shouldTransform(filename) { - const ignoreRegexp = this._cache.ignorePatternsRegExp; - const isIgnored = ignoreRegexp ? ignoreRegexp.test(filename) : false; - return ( - !!this._config.transform && !!this._config.transform.length && !isIgnored - ); - } -} - -exports.default = ScriptTransformer; - -_defineProperty(ScriptTransformer, 'EVAL_RESULT_VARIABLE', void 0); - -const removeFile = path => { - try { - _gracefulFs().default.unlinkSync(path); - } catch (e) {} -}; - -const stripShebang = content => { - // If the file data starts with a shebang remove it. Leaves the empty line - // to keep stack trace line numbers correct. - if (content.startsWith('#!')) { - return content.replace(/^#!.*/, ''); - } else { - return content; - } -}; -/** - * This is like `writeCacheFile` but with an additional sanity checksum. We - * cannot use the same technique for source maps because we expose source map - * cache file paths directly to callsites, with the expectation they can read - * it right away. This is not a great system, because source map cache file - * could get corrupted, out-of-sync, etc. - */ - -function writeCodeCacheFile(cachePath, code) { - const checksum = _crypto() - .default.createHash('md5') - .update(code) - .digest('hex'); - - writeCacheFile(cachePath, checksum + '\n' + code); -} -/** - * Read counterpart of `writeCodeCacheFile`. We verify that the content of the - * file matches the checksum, in case some kind of corruption happened. This - * could happen if an older version of `jest-runtime` writes non-atomically to - * the same cache, for example. - */ - -function readCodeCacheFile(cachePath) { - const content = readCacheFile(cachePath); - - if (content == null) { - return null; - } - - const code = content.substr(33); - - const checksum = _crypto() - .default.createHash('md5') - .update(code) - .digest('hex'); - - if (checksum === content.substr(0, 32)) { - return code; - } - - return null; -} -/** - * Writing to the cache atomically relies on 'rename' being atomic on most - * file systems. Doing atomic write reduces the risk of corruption by avoiding - * two processes to write to the same file at the same time. It also reduces - * the risk of reading a file that's being overwritten at the same time. - */ - -const writeCacheFile = (cachePath, fileData) => { - try { - _writeFileAtomic().default.sync(cachePath, fileData, { - encoding: 'utf8' - }); - } catch (e) { - if (cacheWriteErrorSafeToIgnore(e, cachePath)) { - return; - } - - e.message = - 'jest: failed to cache transform results in: ' + - cachePath + - '\nFailure message: ' + - e.message; - removeFile(cachePath); - throw e; - } -}; -/** - * On Windows, renames are not atomic, leading to EPERM exceptions when two - * processes attempt to rename to the same target file at the same time. - * If the target file exists we can be reasonably sure another process has - * legitimately won a cache write race and ignore the error. - */ - -const cacheWriteErrorSafeToIgnore = (e, cachePath) => - process.platform === 'win32' && - e.code === 'EPERM' && - _gracefulFs().default.existsSync(cachePath); - -const readCacheFile = cachePath => { - if (!_gracefulFs().default.existsSync(cachePath)) { - return null; - } - - let fileData; - - try { - fileData = _gracefulFs().default.readFileSync(cachePath, 'utf8'); - } catch (e) { - e.message = - 'jest: failed to read cache file: ' + - cachePath + - '\nFailure message: ' + - e.message; - removeFile(cachePath); - throw e; - } - - if (fileData == null) { - // We must have somehow created the file but failed to write to it, - // let's delete it and retry. - removeFile(cachePath); - } - - return fileData; -}; - -const getScriptCacheKey = (filename, instrument) => { - const mtime = _gracefulFs().default.statSync(filename).mtime; - - return filename + '_' + mtime.getTime() + (instrument ? '_instrumented' : ''); -}; - -const calcIgnorePatternRegExp = config => { - if ( - !config.transformIgnorePatterns || - config.transformIgnorePatterns.length === 0 - ) { - return undefined; - } - - return new RegExp(config.transformIgnorePatterns.join('|')); -}; - -const calcTransformRegExp = config => { - if (!config.transform.length) { - return undefined; - } - - const transformRegexp = []; - - for (let i = 0; i < config.transform.length; i++) { - transformRegexp.push([ - new RegExp(config.transform[i][0]), - config.transform[i][1], - config.transform[i][2] - ]); - } - - return transformRegexp; -}; - -const wrap = (content, ...extras) => { - const globals = new Set([ - 'module', - 'exports', - 'require', - '__dirname', - '__filename', - 'global', - 'jest', - ...extras - ]); - return ( - '({"' + - ScriptTransformer.EVAL_RESULT_VARIABLE + - `":function(${Array.from(globals).join(',')}){` + - content + - '\n}});' - ); -}; // TODO: Can this be added to the static property? - -ScriptTransformer.EVAL_RESULT_VARIABLE = 'Object.'; diff --git a/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts b/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts deleted file mode 100644 index 0a5157ca..00000000 --- a/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default function enhanceUnexpectedTokenMessage(e: Error): Error; -//# sourceMappingURL=enhanceUnexpectedTokenMessage.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts.map b/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts.map deleted file mode 100644 index 28bd6de1..00000000 --- a/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"enhanceUnexpectedTokenMessage.d.ts","sourceRoot":"","sources":["../src/enhanceUnexpectedTokenMessage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,CAAC,OAAO,UAAU,6BAA6B,CAAC,CAAC,EAAE,KAAK,SA2B7D"} \ No newline at end of file diff --git a/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js b/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js deleted file mode 100644 index a05b93a1..00000000 --- a/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = enhanceUnexpectedTokenMessage; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const DOT = ' \u2022 '; - -function enhanceUnexpectedTokenMessage(e) { - e.stack = - `${_chalk().default.bold.red('Jest encountered an unexpected token')} - -This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript. - -By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules". - -Here's what you can do: -${DOT}To have some of your "node_modules" files transformed, you can specify a custom ${_chalk().default.bold( - '"transformIgnorePatterns"' - )} in your config. -${DOT}If you need a custom transformation specify a ${_chalk().default.bold( - '"transform"' - )} option in your config. -${DOT}If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the ${_chalk().default.bold( - '"moduleNameMapper"' - )} config option. - -You'll find more details and examples of these config options in the docs: -${_chalk().default.cyan('https://jestjs.io/docs/en/configuration.html')} - -${_chalk().default.bold.red('Details:')} - -` + e.stack; - return e; -} diff --git a/node_modules/@jest/transform/build/index.d.ts b/node_modules/@jest/transform/build/index.d.ts deleted file mode 100644 index 901c979c..00000000 --- a/node_modules/@jest/transform/build/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export { default as ScriptTransformer } from './ScriptTransformer'; -export { default as shouldInstrument } from './shouldInstrument'; -export { Transformer, ShouldInstrumentOptions, Options as TransformationOptions, } from './types'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/transform/build/index.d.ts.map b/node_modules/@jest/transform/build/index.d.ts.map deleted file mode 100644 index 55a52aec..00000000 --- a/node_modules/@jest/transform/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,OAAO,IAAI,qBAAqB,GACjC,MAAM,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/transform/build/index.js b/node_modules/@jest/transform/build/index.js deleted file mode 100644 index 481fab49..00000000 --- a/node_modules/@jest/transform/build/index.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -Object.defineProperty(exports, 'ScriptTransformer', { - enumerable: true, - get: function get() { - return _ScriptTransformer.default; - } -}); -Object.defineProperty(exports, 'shouldInstrument', { - enumerable: true, - get: function get() { - return _shouldInstrument.default; - } -}); -Object.defineProperty(exports, 'Transformer', { - enumerable: true, - get: function get() { - return _types.Transformer; - } -}); -Object.defineProperty(exports, 'ShouldInstrumentOptions', { - enumerable: true, - get: function get() { - return _types.ShouldInstrumentOptions; - } -}); -Object.defineProperty(exports, 'TransformationOptions', { - enumerable: true, - get: function get() { - return _types.Options; - } -}); - -var _ScriptTransformer = _interopRequireDefault(require('./ScriptTransformer')); - -var _shouldInstrument = _interopRequireDefault(require('./shouldInstrument')); - -var _types = require('./types'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} diff --git a/node_modules/@jest/transform/build/shouldInstrument.d.ts b/node_modules/@jest/transform/build/shouldInstrument.d.ts deleted file mode 100644 index 4790f5b7..00000000 --- a/node_modules/@jest/transform/build/shouldInstrument.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { ShouldInstrumentOptions } from './types'; -export default function shouldInstrument(filename: Config.Path, options: ShouldInstrumentOptions, config: Config.ProjectConfig): boolean; -//# sourceMappingURL=shouldInstrument.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/transform/build/shouldInstrument.d.ts.map b/node_modules/@jest/transform/build/shouldInstrument.d.ts.map deleted file mode 100644 index 4a45f930..00000000 --- a/node_modules/@jest/transform/build/shouldInstrument.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"shouldInstrument.d.ts","sourceRoot":"","sources":["../src/shouldInstrument.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAInC,OAAO,EAAC,uBAAuB,EAAC,MAAM,SAAS,CAAC;AAMhD,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,OAAO,EAAE,uBAAuB,EAChC,MAAM,EAAE,MAAM,CAAC,aAAa,GAC3B,OAAO,CA4ET"} \ No newline at end of file diff --git a/node_modules/@jest/transform/build/shouldInstrument.js b/node_modules/@jest/transform/build/shouldInstrument.js deleted file mode 100644 index f6fa147f..00000000 --- a/node_modules/@jest/transform/build/shouldInstrument.js +++ /dev/null @@ -1,147 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = shouldInstrument; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _jestRegexUtil() { - const data = require('jest-regex-util'); - - _jestRegexUtil = function _jestRegexUtil() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _micromatch() { - const data = _interopRequireDefault(require('micromatch')); - - _micromatch = function _micromatch() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const MOCKS_PATTERN = new RegExp( - (0, _jestRegexUtil().escapePathForRegex)( - _path().default.sep + '__mocks__' + _path().default.sep - ) -); - -function shouldInstrument(filename, options, config) { - if (!options.collectCoverage) { - return false; - } - - if ( - config.forceCoverageMatch.length && - _micromatch().default.any(filename, config.forceCoverageMatch) - ) { - return true; - } - - if ( - !config.testPathIgnorePatterns.some(pattern => !!filename.match(pattern)) - ) { - if (config.testRegex.some(regex => new RegExp(regex).test(filename))) { - return false; - } - - if ( - _micromatch().default.some( - (0, _jestUtil().replacePathSepForGlob)(filename), - config.testMatch - ) - ) { - return false; - } - } - - if ( - // This configuration field contains an object in the form of: - // {'path/to/file.js': true} - options.collectCoverageOnlyFrom && - !options.collectCoverageOnlyFrom[filename] - ) { - return false; - } - - if ( - // still cover if `only` is specified - !options.collectCoverageOnlyFrom && - options.collectCoverageFrom && - !_micromatch().default.some( - (0, _jestUtil().replacePathSepForGlob)( - _path().default.relative(config.rootDir, filename) - ), - options.collectCoverageFrom - ) - ) { - return false; - } - - if ( - config.coveragePathIgnorePatterns.some(pattern => !!filename.match(pattern)) - ) { - return false; - } - - if (config.globalSetup === filename) { - return false; - } - - if (config.globalTeardown === filename) { - return false; - } - - if (config.setupFiles.includes(filename)) { - return false; - } - - if (config.setupFilesAfterEnv.includes(filename)) { - return false; - } - - if (MOCKS_PATTERN.test(filename)) { - return false; - } - - if (options.changedFiles && !options.changedFiles.has(filename)) { - return false; - } - - return true; -} diff --git a/node_modules/@jest/transform/build/types.d.ts b/node_modules/@jest/transform/build/types.d.ts deleted file mode 100644 index 2fb6bddb..00000000 --- a/node_modules/@jest/transform/build/types.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Script } from 'vm'; -import { RawSourceMap } from 'source-map'; -import { Config } from '@jest/types'; -export declare type ShouldInstrumentOptions = Pick & { - changedFiles: Set | undefined; -}; -export declare type Options = ShouldInstrumentOptions & Pick & { - isCoreModule?: boolean; - isInternalModule?: boolean; -}; -declare type Omit = Pick>; -interface FixedRawSourceMap extends Omit { - version: number; -} -export declare type TransformedSource = { - code: string; - map?: FixedRawSourceMap | string | null; -}; -export declare type TransformResult = { - script: Script; - mapCoverage: boolean; - sourceMapPath: string | null; -}; -export declare type TransformOptions = { - instrument: boolean; -}; -export declare type CacheKeyOptions = { - config: Config.ProjectConfig; - instrument: boolean; - rootDir: string; -}; -export interface Transformer { - canInstrument?: boolean; - createTransformer?: (options?: any) => Transformer; - getCacheKey: (fileData: string, filePath: Config.Path, configStr: string, options: CacheKeyOptions) => string; - process: (sourceText: string, sourcePath: Config.Path, config: Config.ProjectConfig, options?: TransformOptions) => string | TransformedSource; -} -export {}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/transform/build/types.d.ts.map b/node_modules/@jest/transform/build/types.d.ts.map deleted file mode 100644 index 62ec12b2..00000000 --- a/node_modules/@jest/transform/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AACxC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,oBAAY,uBAAuB,GAAG,IAAI,CACxC,MAAM,CAAC,YAAY,EACnB,iBAAiB,GAAG,qBAAqB,GAAG,yBAAyB,CACtE,GAAG;IACF,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;CAC5C,CAAC;AAEF,oBAAY,OAAO,GAAG,uBAAuB,GAC3C,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,cAAc,CAAC,GAAG;IAC1C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAGJ,aAAK,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAI/D,UAAU,iBAAkB,SAAQ,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC;IAC/D,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,oBAAY,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAAC;CACzC,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,KAAK,WAAW,CAAC;IAEnD,WAAW,EAAE,CACX,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,eAAe,KACrB,MAAM,CAAC;IAEZ,OAAO,EAAE,CACP,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,CAAC,IAAI,EACvB,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,OAAO,CAAC,EAAE,gBAAgB,KACvB,MAAM,GAAG,iBAAiB,CAAC;CACjC"} \ No newline at end of file diff --git a/node_modules/@jest/transform/build/types.js b/node_modules/@jest/transform/build/types.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/@jest/transform/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/@jest/transform/node_modules/slash/index.js b/node_modules/@jest/transform/node_modules/slash/index.js deleted file mode 100644 index 75d72501..00000000 --- a/node_modules/@jest/transform/node_modules/slash/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -module.exports = input => { - const isExtendedLengthPath = /^\\\\\?\\/.test(input); - const hasNonAscii = /[^\u0000-\u0080]+/.test(input); // eslint-disable-line no-control-regex - - if (isExtendedLengthPath || hasNonAscii) { - return input; - } - - return input.replace(/\\/g, '/'); -}; diff --git a/node_modules/@jest/transform/node_modules/slash/license b/node_modules/@jest/transform/node_modules/slash/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/@jest/transform/node_modules/slash/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@jest/transform/node_modules/slash/package.json b/node_modules/@jest/transform/node_modules/slash/package.json deleted file mode 100644 index 99e4a131..00000000 --- a/node_modules/@jest/transform/node_modules/slash/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "slash@2.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "slash@2.0.0", - "_id": "slash@2.0.0", - "_inBundle": false, - "_integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "_location": "/@jest/transform/slash", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "slash@2.0.0", - "name": "slash", - "escapedName": "slash", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/@jest/transform" - ], - "_resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/slash/issues" - }, - "description": "Convert Windows backslash paths to slash paths", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/slash#readme", - "keywords": [ - "path", - "seperator", - "sep", - "slash", - "backslash", - "windows", - "win" - ], - "license": "MIT", - "name": "slash", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/slash.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0" -} diff --git a/node_modules/@jest/transform/node_modules/slash/readme.md b/node_modules/@jest/transform/node_modules/slash/readme.md deleted file mode 100644 index 5e2fedbc..00000000 --- a/node_modules/@jest/transform/node_modules/slash/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# slash [![Build Status](https://travis-ci.org/sindresorhus/slash.svg?branch=master)](https://travis-ci.org/sindresorhus/slash) - -> Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar` - -[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters. - -This was created since the `path` methods in Node outputs `\\` paths on Windows. - - -## Install - -``` -$ npm install slash -``` - - -## Usage - -```js -const path = require('path'); -const slash = require('slash'); - -const str = path.join('foo', 'bar'); -// Unix => foo/bar -// Windows => foo\\bar - -slash(str); -// Unix => foo/bar -// Windows => foo/bar -``` - - -## API - -### slash(path) - -Type: `string` - -Accepts a Windows backslash path and returns a slash path. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/@jest/transform/package.json b/node_modules/@jest/transform/package.json deleted file mode 100644 index 94416a55..00000000 --- a/node_modules/@jest/transform/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_args": [ - [ - "@jest/transform@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@jest/transform@24.9.0", - "_id": "@jest/transform@24.9.0", - "_inBundle": false, - "_integrity": "sha512-TcQUmyNRxV94S0QpMOnZl0++6RMiqpbH/ZMccFB/amku6Uwvyb1cjYX7xkp5nGNkbX4QPH/FcB6q1HBTHynLmQ==", - "_location": "/@jest/transform", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@jest/transform@24.9.0", - "name": "@jest/transform", - "escapedName": "@jest%2ftransform", - "scope": "@jest", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core", - "/@jest/environment", - "/@jest/reporters", - "/babel-jest", - "/jest-runtime" - ], - "_resolved": "https://registry.npmjs.org/@jest/transform/-/transform-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@babel/core": "^7.1.0", - "@jest/types": "^24.9.0", - "babel-plugin-istanbul": "^5.1.0", - "chalk": "^2.0.1", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.1.15", - "jest-haste-map": "^24.9.0", - "jest-regex-util": "^24.9.0", - "jest-util": "^24.9.0", - "micromatch": "^3.1.10", - "pirates": "^4.0.1", - "realpath-native": "^1.1.0", - "slash": "^2.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "2.4.1" - }, - "devDependencies": { - "@types/babel__core": "^7.1.0", - "@types/convert-source-map": "^1.5.1", - "@types/fast-json-stable-stringify": "^2.0.0", - "@types/graceful-fs": "^4.1.2", - "@types/micromatch": "^3.1.0", - "@types/write-file-atomic": "^2.1.1" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "@jest/transform", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-transform" - }, - "version": "24.9.0" -} diff --git a/node_modules/@jest/types/LICENSE b/node_modules/@jest/types/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/@jest/types/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/@jest/types/build/Circus.d.ts b/node_modules/@jest/types/build/Circus.d.ts deleted file mode 100644 index 5a809609..00000000 --- a/node_modules/@jest/types/build/Circus.d.ts +++ /dev/null @@ -1,172 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import * as Global from './Global'; -declare type Process = NodeJS.Process; -export declare type DoneFn = Global.DoneFn; -export declare type BlockFn = Global.BlockFn; -export declare type BlockName = Global.BlockName; -export declare type BlockMode = void | 'skip' | 'only' | 'todo'; -export declare type TestMode = BlockMode; -export declare type TestName = Global.TestName; -export declare type TestFn = Global.TestFn; -export declare type HookFn = (done?: DoneFn) => Promise | null | undefined; -export declare type AsyncFn = TestFn | HookFn; -export declare type SharedHookType = 'afterAll' | 'beforeAll'; -export declare type HookType = SharedHookType | 'afterEach' | 'beforeEach'; -export declare type TestContext = Record; -export declare type Exception = any; -export declare type FormattedError = string; -export declare type Hook = { - asyncError: Error; - fn: HookFn; - type: HookType; - parent: DescribeBlock; - timeout: number | undefined | null; -}; -export declare type EventHandler = (event: Event, state: State) => void; -export declare type Event = { - name: 'include_test_location_in_result'; -} | { - asyncError: Error; - mode: BlockMode; - name: 'start_describe_definition'; - blockName: BlockName; -} | { - mode: BlockMode; - name: 'finish_describe_definition'; - blockName: BlockName; -} | { - asyncError: Error; - name: 'add_hook'; - hookType: HookType; - fn: HookFn; - timeout: number | undefined; -} | { - asyncError: Error; - name: 'add_test'; - testName: TestName; - fn?: TestFn; - mode?: TestMode; - timeout: number | undefined; -} | { - name: 'hook_start'; - hook: Hook; -} | { - name: 'hook_success'; - describeBlock?: DescribeBlock; - test?: TestEntry; - hook: Hook; -} | { - name: 'hook_failure'; - error: string | Exception; - describeBlock?: DescribeBlock; - test?: TestEntry; - hook: Hook; -} | { - name: 'test_fn_start'; - test: TestEntry; -} | { - name: 'test_fn_success'; - test: TestEntry; -} | { - name: 'test_fn_failure'; - error: Exception; - test: TestEntry; -} | { - name: 'test_retry'; - test: TestEntry; -} | { - name: 'test_start'; - test: TestEntry; -} | { - name: 'test_skip'; - test: TestEntry; -} | { - name: 'test_todo'; - test: TestEntry; -} | { - name: 'test_done'; - test: TestEntry; -} | { - name: 'run_describe_start'; - describeBlock: DescribeBlock; -} | { - name: 'run_describe_finish'; - describeBlock: DescribeBlock; -} | { - name: 'run_start'; -} | { - name: 'run_finish'; -} | { - name: 'error'; - error: Exception; -} | { - name: 'setup'; - testNamePattern?: string; - parentProcess: Process; -} | { - name: 'teardown'; -}; -export declare type TestStatus = 'skip' | 'done' | 'todo'; -export declare type TestResult = { - duration?: number | null; - errors: Array; - invocations: number; - status: TestStatus; - location?: { - column: number; - line: number; - } | null; - testPath: Array; -}; -export declare type RunResult = { - unhandledErrors: Array; - testResults: TestResults; -}; -export declare type TestResults = Array; -export declare type GlobalErrorHandlers = { - uncaughtException: Array<(exception: Exception) => void>; - unhandledRejection: Array<(exception: Exception, promise: Promise) => void>; -}; -export declare type State = { - currentDescribeBlock: DescribeBlock; - currentlyRunningTest?: TestEntry | null; - expand?: boolean; - hasFocusedTests: boolean; - originalGlobalErrorHandlers?: GlobalErrorHandlers; - parentProcess: Process | null; - rootDescribeBlock: DescribeBlock; - testNamePattern?: RegExp | null; - testTimeout: number; - unhandledErrors: Array; - includeTestLocationInResult: boolean; -}; -export declare type DescribeBlock = { - children: Array; - hooks: Array; - mode: BlockMode; - name: BlockName; - parent?: DescribeBlock; - tests: Array; -}; -export declare type TestError = Exception | Array<[Exception | undefined, Exception]>; -export declare type TestEntry = { - asyncError: Exception; - errors: TestError; - fn?: TestFn; - invocations: number; - mode: TestMode; - name: TestName; - parent: DescribeBlock; - startedAt?: number | null; - duration?: number | null; - status?: TestStatus | null; - timeout?: number; -}; -export {}; -//# sourceMappingURL=Circus.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/types/build/Circus.d.ts.map b/node_modules/@jest/types/build/Circus.d.ts.map deleted file mode 100644 index cf27dac9..00000000 --- a/node_modules/@jest/types/build/Circus.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Circus.d.ts","sourceRoot":"","sources":["../src/Circus.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,aAAK,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AAE9B,oBAAY,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACnC,oBAAY,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACrC,oBAAY,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AACzC,oBAAY,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AACxD,oBAAY,QAAQ,GAAG,SAAS,CAAC;AACjC,oBAAY,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACvC,oBAAY,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACnC,oBAAY,MAAM,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AACxE,oBAAY,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AACtC,oBAAY,cAAc,GAAG,UAAU,GAAG,WAAW,CAAC;AACtD,oBAAY,QAAQ,GAAG,cAAc,GAAG,WAAW,GAAG,YAAY,CAAC;AACnE,oBAAY,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC9C,oBAAY,SAAS,GAAG,GAAG,CAAC;AAC5B,oBAAY,cAAc,GAAG,MAAM,CAAC;AACpC,oBAAY,IAAI,GAAG;IACjB,UAAU,EAAE,KAAK,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;CACpC,CAAC;AAEF,oBAAY,YAAY,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAEhE,oBAAY,KAAK,GACb;IACE,IAAI,EAAE,iCAAiC,CAAC;CACzC,GACD;IACE,UAAU,EAAE,KAAK,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,2BAA2B,CAAC;IAClC,SAAS,EAAE,SAAS,CAAC;CACtB,GACD;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,4BAA4B,CAAC;IACnC,SAAS,EAAE,SAAS,CAAC;CACtB,GACD;IACE,UAAU,EAAE,KAAK,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,GACD;IACE,UAAU,EAAE,KAAK,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,GACD;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;CACZ,GACD;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;CACZ,GACD;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;CACZ,GACD;IACE,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IAGE,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IAKE,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,oBAAoB,CAAC;IAC3B,aAAa,EAAE,aAAa,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,qBAAqB,CAAC;IAC5B,aAAa,EAAE,aAAa,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,WAAW,CAAC;CACnB,GACD;IACE,IAAI,EAAE,YAAY,CAAC;CACpB,GACD;IAGE,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;CAClB,GACD;IAEE,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;CACxB,GACD;IAGE,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEN,oBAAY,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAClD,oBAAY,UAAU,GAAG;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,GAAG,IAAI,CAAC;IACjD,QAAQ,EAAE,KAAK,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,eAAe,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IACvC,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF,oBAAY,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC;AAE5C,oBAAY,mBAAmB,GAAG;IAChC,iBAAiB,EAAE,KAAK,CAAC,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC,CAAC;IACzD,kBAAkB,EAAE,KAAK,CACvB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,CACtD,CAAC;CACH,CAAC;AAEF,oBAAY,KAAK,GAAG;IAClB,oBAAoB,EAAE,aAAa,CAAC;IACpC,oBAAoB,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IAIzB,2BAA2B,CAAC,EAAE,mBAAmB,CAAC;IAClD,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,iBAAiB,EAAE,aAAa,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAClC,2BAA2B,EAAE,OAAO,CAAC;CACtC,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAC/B,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;CACzB,CAAC;AAEF,oBAAY,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC,CAAC,SAAS,GAAG,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAE9E,oBAAY,SAAS,GAAG;IACtB,UAAU,EAAE,SAAS,CAAC;IACtB,MAAM,EAAE,SAAS,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/types/build/Circus.js b/node_modules/@jest/types/build/Circus.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/@jest/types/build/Circus.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/@jest/types/build/Config.d.ts b/node_modules/@jest/types/build/Config.d.ts deleted file mode 100644 index 35ac4652..00000000 --- a/node_modules/@jest/types/build/Config.d.ts +++ /dev/null @@ -1,439 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Arguments } from 'yargs'; -import { ReportOptions } from 'istanbul-reports'; -export declare type Path = string; -export declare type Glob = string; -export declare type HasteConfig = { - computeSha1?: boolean; - defaultPlatform?: string | null | undefined; - hasteImplModulePath?: string; - platforms?: Array; - providesModuleNodeModules: Array; - throwOnModuleCollision?: boolean; -}; -export declare type ReporterConfig = [string, Record]; -export declare type TransformerConfig = [string, Record]; -export declare type ConfigGlobals = Record; -export declare type DefaultOptions = { - automock: boolean; - bail: number; - browser: boolean; - cache: boolean; - cacheDirectory: Path; - changedFilesWithAncestor: boolean; - clearMocks: boolean; - collectCoverage: boolean; - collectCoverageFrom: Array | null | undefined; - coverageDirectory: string | null | undefined; - coveragePathIgnorePatterns: Array; - coverageReporters: Array; - coverageThreshold: { - global: { - [key: string]: number; - }; - } | null | undefined; - dependencyExtractor: string | null | undefined; - errorOnDeprecated: boolean; - expand: boolean; - filter: Path | null | undefined; - forceCoverageMatch: Array; - globals: ConfigGlobals; - globalSetup: string | null | undefined; - globalTeardown: string | null | undefined; - haste: HasteConfig; - maxWorkers: number | string; - maxConcurrency: number; - moduleDirectories: Array; - moduleFileExtensions: Array; - moduleNameMapper: { - [key: string]: string; - }; - modulePathIgnorePatterns: Array; - noStackTrace: boolean; - notify: boolean; - notifyMode: string; - preset: string | null | undefined; - prettierPath: string | null | undefined; - projects: Array | null | undefined; - resetMocks: boolean; - resetModules: boolean; - resolver: Path | null | undefined; - restoreMocks: boolean; - rootDir: Path | null | undefined; - roots: Array | null | undefined; - runner: string; - runTestsByPath: boolean; - setupFiles: Array; - setupFilesAfterEnv: Array; - skipFilter: boolean; - snapshotSerializers: Array; - testEnvironment: string; - testEnvironmentOptions: Record; - testFailureExitCode: string | number; - testLocationInResults: boolean; - testMatch: Array; - testPathIgnorePatterns: Array; - testRegex: Array; - testResultsProcessor: string | null | undefined; - testRunner: string | null | undefined; - testSequencer: string; - testURL: string; - timers: 'real' | 'fake'; - transform: { - [regex: string]: Path | TransformerConfig; - } | null | undefined; - transformIgnorePatterns: Array; - watchPathIgnorePatterns: Array; - useStderr: boolean; - verbose: boolean | null | undefined; - watch: boolean; - watchman: boolean; -}; -export declare type DisplayName = string | { - name: string; - color: DisplayNameColor; -}; -export declare type InitialOptions = { - automock?: boolean; - bail?: boolean | number; - browser?: boolean; - cache?: boolean; - cacheDirectory?: Path; - clearMocks?: boolean; - changedFilesWithAncestor?: boolean; - changedSince?: string; - collectCoverage?: boolean; - collectCoverageFrom?: Array; - collectCoverageOnlyFrom?: { - [key: string]: boolean; - }; - coverageDirectory?: string; - coveragePathIgnorePatterns?: Array; - coverageReporters?: Array; - coverageThreshold?: { - global: { - [key: string]: number; - }; - }; - dependencyExtractor?: string; - detectLeaks?: boolean; - detectOpenHandles?: boolean; - displayName?: DisplayName; - expand?: boolean; - extraGlobals?: Array; - filter?: Path; - findRelatedTests?: boolean; - forceCoverageMatch?: Array; - forceExit?: boolean; - json?: boolean; - globals?: ConfigGlobals; - globalSetup?: string | null | undefined; - globalTeardown?: string | null | undefined; - haste?: HasteConfig; - reporters?: Array; - logHeapUsage?: boolean; - lastCommit?: boolean; - listTests?: boolean; - mapCoverage?: boolean; - maxConcurrency?: number; - maxWorkers: number | string; - moduleDirectories?: Array; - moduleFileExtensions?: Array; - moduleLoader?: Path; - moduleNameMapper?: { - [key: string]: string; - }; - modulePathIgnorePatterns?: Array; - modulePaths?: Array; - name?: string; - noStackTrace?: boolean; - notify?: boolean; - notifyMode?: string; - onlyChanged?: boolean; - outputFile?: Path; - passWithNoTests?: boolean; - preprocessorIgnorePatterns?: Array; - preset?: string | null | undefined; - prettierPath?: string | null | undefined; - projects?: Array; - replname?: string | null | undefined; - resetMocks?: boolean; - resetModules?: boolean; - resolver?: Path | null | undefined; - restoreMocks?: boolean; - rootDir: Path; - roots?: Array; - runner?: string; - runTestsByPath?: boolean; - scriptPreprocessor?: string; - setupFiles?: Array; - setupTestFrameworkScriptFile?: Path; - setupFilesAfterEnv?: Array; - silent?: boolean; - skipFilter?: boolean; - skipNodeResolution?: boolean; - snapshotResolver?: Path; - snapshotSerializers?: Array; - errorOnDeprecated?: boolean; - testEnvironment?: string; - testEnvironmentOptions?: Record; - testFailureExitCode?: string | number; - testLocationInResults?: boolean; - testMatch?: Array; - testNamePattern?: string; - testPathDirs?: Array; - testPathIgnorePatterns?: Array; - testRegex?: string | Array; - testResultsProcessor?: string | null | undefined; - testRunner?: string; - testSequencer?: string; - testURL?: string; - testTimeout?: number; - timers?: 'real' | 'fake'; - transform?: { - [regex: string]: Path | TransformerConfig; - }; - transformIgnorePatterns?: Array; - watchPathIgnorePatterns?: Array; - unmockedModulePathPatterns?: Array; - updateSnapshot?: boolean; - useStderr?: boolean; - verbose?: boolean | null | undefined; - watch?: boolean; - watchAll?: boolean; - watchman?: boolean; - watchPlugins?: Array]>; -}; -export declare type SnapshotUpdateState = 'all' | 'new' | 'none'; -declare type NotifyMode = 'always' | 'failure' | 'success' | 'change' | 'success-change' | 'failure-change'; -/** - * Hard coding this until - * https://github.com/chalk/chalk/pull/336 - * gets merged - */ -declare type DisplayNameColor = 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray' | 'grey' | 'blackBright' | 'redBright' | 'greenBright' | 'yellowBright' | 'blueBright' | 'magentaBright' | 'cyanBright' | 'whiteBright' | 'bgBlack' | 'bgRed' | 'bgGreen' | 'bgYellow' | 'bgBlue' | 'bgMagenta' | 'bgCyan' | 'bgWhite' | 'bgBlackBright' | 'bgRedBright' | 'bgGreenBright' | 'bgYellowBright' | 'bgBlueBright' | 'bgMagentaBright' | 'bgCyanBright' | 'bgWhiteBright'; -declare type CoverageThreshold = { - [path: string]: { - [key: string]: number; - }; - global: { - [key: string]: number; - }; -}; -export declare type GlobalConfig = { - bail: number; - changedSince: string; - changedFilesWithAncestor: boolean; - collectCoverage: boolean; - collectCoverageFrom: Array; - collectCoverageOnlyFrom: { - [key: string]: boolean; - } | null | undefined; - coverageDirectory: string; - coveragePathIgnorePatterns?: Array; - coverageReporters: Array; - coverageThreshold: CoverageThreshold; - detectLeaks: boolean; - detectOpenHandles: boolean; - enabledTestsMap: { - [key: string]: { - [key: string]: boolean; - }; - } | null | undefined; - expand: boolean; - extraGlobals: Array; - filter: Path | null | undefined; - findRelatedTests: boolean; - forceExit: boolean; - json: boolean; - globalSetup: string | null | undefined; - globalTeardown: string | null | undefined; - lastCommit: boolean; - logHeapUsage: boolean; - listTests: boolean; - maxConcurrency: number; - maxWorkers: number; - noStackTrace: boolean; - nonFlagArgs: Array; - noSCM: boolean | null | undefined; - notify: boolean; - notifyMode: NotifyMode; - outputFile: Path | null | undefined; - onlyChanged: boolean; - onlyFailures: boolean; - passWithNoTests: boolean; - projects: Array; - replname: string | null | undefined; - reporters: Array; - runTestsByPath: boolean; - rootDir: Path; - silent: boolean; - skipFilter: boolean; - errorOnDeprecated: boolean; - testFailureExitCode: number; - testNamePattern: string; - testPathPattern: string; - testResultsProcessor: string | null | undefined; - testSequencer: string; - testTimeout: number; - updateSnapshot: SnapshotUpdateState; - useStderr: boolean; - verbose: boolean | null | undefined; - watch: boolean; - watchAll: boolean; - watchman: boolean; - watchPlugins: Array<{ - path: string; - config: Record; - }> | null | undefined; -}; -export declare type ProjectConfig = { - automock: boolean; - browser: boolean; - cache: boolean; - cacheDirectory: Path; - clearMocks: boolean; - coveragePathIgnorePatterns: Array; - cwd: Path; - dependencyExtractor?: string; - detectLeaks: boolean; - detectOpenHandles: boolean; - displayName?: DisplayName; - errorOnDeprecated: boolean; - extraGlobals: Array; - filter: Path | null | undefined; - forceCoverageMatch: Array; - globalSetup: string | null | undefined; - globalTeardown: string | null | undefined; - globals: ConfigGlobals; - haste: HasteConfig; - moduleDirectories: Array; - moduleFileExtensions: Array; - moduleLoader: Path; - moduleNameMapper: Array<[string, string]>; - modulePathIgnorePatterns: Array; - modulePaths: Array; - name: string; - prettierPath: string; - resetMocks: boolean; - resetModules: boolean; - resolver: Path | null | undefined; - restoreMocks: boolean; - rootDir: Path; - roots: Array; - runner: string; - setupFiles: Array; - setupFilesAfterEnv: Array; - skipFilter: boolean; - skipNodeResolution: boolean; - snapshotResolver: Path | null | undefined; - snapshotSerializers: Array; - testEnvironment: string; - testEnvironmentOptions: Record; - testMatch: Array; - testLocationInResults: boolean; - testPathIgnorePatterns: Array; - testRegex: Array; - testRunner: string; - testURL: string; - timers: 'real' | 'fake'; - transform: Array<[string, Path, Record]>; - transformIgnorePatterns: Array; - watchPathIgnorePatterns: Array; - unmockedModulePathPatterns: Array | null | undefined; -}; -export declare type Argv = Arguments; - color: boolean; - colors: boolean; - config: string; - coverage: boolean; - coverageDirectory: string; - coveragePathIgnorePatterns: Array; - coverageReporters: Array; - coverageThreshold: string; - debug: boolean; - env: string; - expand: boolean; - findRelatedTests: boolean; - forceExit: boolean; - globals: string; - globalSetup: string | null | undefined; - globalTeardown: string | null | undefined; - haste: string; - init: boolean; - json: boolean; - lastCommit: boolean; - logHeapUsage: boolean; - maxWorkers: number | string; - moduleDirectories: Array; - moduleFileExtensions: Array; - moduleNameMapper: string; - modulePathIgnorePatterns: Array; - modulePaths: Array; - noStackTrace: boolean; - notify: boolean; - notifyMode: string; - onlyChanged: boolean; - outputFile: string; - preset: string | null | undefined; - projects: Array; - prettierPath: string | null | undefined; - resetMocks: boolean; - resetModules: boolean; - resolver: string | null | undefined; - restoreMocks: boolean; - rootDir: string; - roots: Array; - runInBand: boolean; - setupFiles: Array; - setupFilesAfterEnv: Array; - showConfig: boolean; - silent: boolean; - snapshotSerializers: Array; - testEnvironment: string; - testFailureExitCode: string | null | undefined; - testMatch: Array; - testNamePattern: string; - testPathIgnorePatterns: Array; - testPathPattern: Array; - testRegex: string | Array; - testResultsProcessor: string | null | undefined; - testRunner: string; - testSequencer: string; - testURL: string; - testTimeout: number | null | undefined; - timers: string; - transform: string; - transformIgnorePatterns: Array; - unmockedModulePathPatterns: Array | null | undefined; - updateSnapshot: boolean; - useStderr: boolean; - verbose: boolean | null | undefined; - version: boolean; - watch: boolean; - watchAll: boolean; - watchman: boolean; - watchPathIgnorePatterns: Array; -}>>; -export {}; -//# sourceMappingURL=Config.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/types/build/Config.d.ts.map b/node_modules/@jest/types/build/Config.d.ts.map deleted file mode 100644 index 6b8a1aa4..00000000 --- a/node_modules/@jest/types/build/Config.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../src/Config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAChC,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE/C,oBAAY,IAAI,GAAG,MAAM,CAAC;AAE1B,oBAAY,IAAI,GAAG,MAAM,CAAC;AAE1B,oBAAY,WAAW,GAAG;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC5C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,yBAAyB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC;AAEF,oBAAY,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAC/D,oBAAY,iBAAiB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAElE,oBAAY,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEhD,oBAAY,cAAc,GAAG;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,IAAI,CAAC;IACrB,wBAAwB,EAAE,OAAO,CAAC;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IACtD,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7C,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1C,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,iBAAiB,EACb;QACE,MAAM,EAAE;YACN,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;SACvB,CAAC;KACH,GACD,IAAI,GACJ,SAAS,CAAC;IACd,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,iBAAiB,EAAE,OAAO,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,OAAO,EAAE,aAAa,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,KAAK,EAAE,WAAW,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,oBAAoB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,gBAAgB,EAAE;QAChB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;IACF,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,QAAQ,EAAE,KAAK,CAAC,MAAM,GAAG,aAAa,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3D,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACxB,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,mBAAmB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5C,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAAC;IACrC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACvB,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,oBAAoB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,EACL;QACE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,iBAAiB,CAAC;KAC3C,GACD,IAAI,GACJ,SAAS,CAAC;IACd,uBAAuB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACrC,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,oBAAY,WAAW,GACnB,MAAM,GACN;IACE,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,gBAAgB,CAAC;CACzB,CAAC;AAEN,oBAAY,cAAc,GAAG;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,cAAc,CAAC,EAAE,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mBAAmB,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,uBAAuB,CAAC,EAAE;QACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0BAA0B,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3C,iBAAiB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,iBAAiB,CAAC,EAAE;QAClB,MAAM,EAAE;YACN,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;SACvB,CAAC;KACH,CAAC;IACF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,cAAc,CAAC,CAAC;IAC3C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrC,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,gBAAgB,CAAC,EAAE;QACjB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;IACF,wBAAwB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzC,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,0BAA0B,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACzB,4BAA4B,CAAC,EAAE,IAAI,CAAC;IACpC,kBAAkB,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gBAAgB,CAAC,EAAE,IAAI,CAAC;IACxB,mBAAmB,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7C,mBAAmB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3B,sBAAsB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE;QACV,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,iBAAiB,CAAC;KAC3C,CAAC;IACF,uBAAuB,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACtC,uBAAuB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,0BAA0B,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;CAC9D,CAAC;AAEF,oBAAY,mBAAmB,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;AAEzD,aAAK,UAAU,GACX,QAAQ,GACR,SAAS,GACT,SAAS,GACT,QAAQ,GACR,gBAAgB,GAChB,gBAAgB,CAAC;AAErB;;;;GAIG;AACH,aAAK,gBAAgB,GACjB,OAAO,GACP,KAAK,GACL,OAAO,GACP,QAAQ,GACR,MAAM,GACN,SAAS,GACT,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,aAAa,GACb,WAAW,GACX,aAAa,GACb,cAAc,GACd,YAAY,GACZ,eAAe,GACf,YAAY,GACZ,aAAa,GACb,SAAS,GACT,OAAO,GACP,SAAS,GACT,UAAU,GACV,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,SAAS,GACT,eAAe,GACf,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,cAAc,GACd,iBAAiB,GACjB,cAAc,GACd,eAAe,CAAC;AAEpB,aAAK,iBAAiB,GAAG;IACvB,CAAC,IAAI,EAAE,MAAM,GAAG;QACd,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;IACF,MAAM,EAAE;QACN,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;CACH,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,wBAAwB,EAAE,OAAO,CAAC;IAClC,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,uBAAuB,EACnB;QACE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,GACD,IAAI,GACJ,SAAS,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0BAA0B,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3C,iBAAiB,EAAE,KAAK,CAAC,MAAM,aAAa,CAAC,CAAC;IAC9C,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EACX;QACE,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;SACxB,CAAC;KACH,GACD,IAAI,GACJ,SAAS,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,MAAM,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,KAAK,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,SAAS,EAAE,KAAK,CAAC,MAAM,GAAG,cAAc,CAAC,CAAC;IAC1C,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,IAAI,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,mBAAmB,CAAC;IACpC,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EACR,KAAK,CAAC;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC7B,CAAC,GACF,IAAI,GACJ,SAAS,CAAC;CACf,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1C,GAAG,EAAE,IAAI,CAAC;IACV,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,YAAY,EAAE,KAAK,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC;IACzC,MAAM,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,OAAO,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,WAAW,CAAC;IACnB,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,oBAAoB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,YAAY,EAAE,IAAI,CAAC;IACnB,gBAAgB,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1C,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACxB,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,mBAAmB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5C,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACvB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC1D,uBAAuB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACrC,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;CAC9D,CAAC;AAEF,oBAAY,IAAI,GAAG,SAAS,CAC1B,OAAO,CAAC;IACN,GAAG,EAAE,OAAO,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,wBAAwB,EAAE,OAAO,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,EAAE,EAAE,OAAO,CAAC;IACZ,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1C,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,oBAAoB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,mBAAmB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtC,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/B,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,oBAAoB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7D,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxC,CAAC,CACH,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/types/build/Config.js b/node_modules/@jest/types/build/Config.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/@jest/types/build/Config.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/@jest/types/build/Global.d.ts b/node_modules/@jest/types/build/Global.d.ts deleted file mode 100644 index a9954e81..00000000 --- a/node_modules/@jest/types/build/Global.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { CoverageMapData } from 'istanbul-lib-coverage'; -export declare type DoneFn = (reason?: string | Error) => void; -export declare type TestName = string; -export declare type TestFn = (done?: DoneFn) => Promise | void | undefined; -export declare type BlockFn = () => void; -export declare type BlockName = string; -export declare type Col = unknown; -export declare type Row = Array; -export declare type Table = Array; -export declare type ArrayTable = Table | Row; -export declare type TemplateTable = TemplateStringsArray; -export declare type TemplateData = Array; -export declare type EachTable = ArrayTable | TemplateTable; -export declare type EachTestFn = (...args: Array) => Promise | void | undefined; -declare type Jasmine = { - _DEFAULT_TIMEOUT_INTERVAL?: number; - addMatchers: Function; -}; -declare type Each = (table: EachTable, ...taggedTemplateData: Array) => (title: string, test: EachTestFn, timeout?: number) => void; -export interface ItBase { - (testName: TestName, fn: TestFn, timeout?: number): void; - each: Each; -} -export interface It extends ItBase { - only: ItBase; - skip: ItBase; - todo: (testName: TestName, ...rest: Array) => void; -} -export interface ItConcurrentBase { - (testName: string, testFn: () => Promise, timeout?: number): void; -} -export interface ItConcurrentExtended extends ItConcurrentBase { - only: ItConcurrentBase; - skip: ItConcurrentBase; -} -export interface ItConcurrent extends It { - concurrent: ItConcurrentExtended; -} -export interface DescribeBase { - (blockName: BlockName, blockFn: BlockFn): void; - each: Each; -} -export interface Describe extends DescribeBase { - only: DescribeBase; - skip: DescribeBase; -} -export interface Global extends NodeJS.Global { - it: ItConcurrent; - test: ItConcurrent; - fit: ItBase & { - concurrent?: ItConcurrentBase; - }; - xit: ItBase; - xtest: ItBase; - describe: Describe; - xdescribe: DescribeBase; - fdescribe: DescribeBase; - __coverage__: CoverageMapData; - jasmine: Jasmine; - fail: () => void; - pending: () => void; - spyOn: () => void; - spyOnProperty: () => void; - [extras: string]: any; -} -export {}; -//# sourceMappingURL=Global.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/types/build/Global.d.ts.map b/node_modules/@jest/types/build/Global.d.ts.map deleted file mode 100644 index f190be72..00000000 --- a/node_modules/@jest/types/build/Global.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Global.d.ts","sourceRoot":"","sources":["../src/Global.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAEtD,oBAAY,MAAM,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,KAAK,IAAI,CAAC;AACvD,oBAAY,QAAQ,GAAG,MAAM,CAAC;AAC9B,oBAAY,MAAM,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AACxE,oBAAY,OAAO,GAAG,MAAM,IAAI,CAAC;AACjC,oBAAY,SAAS,GAAG,MAAM,CAAC;AAE/B,oBAAY,GAAG,GAAG,OAAO,CAAC;AAC1B,oBAAY,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7B,oBAAY,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAC/B,oBAAY,UAAU,GAAG,KAAK,GAAG,GAAG,CAAC;AACrC,oBAAY,aAAa,GAAG,oBAAoB,CAAC;AACjD,oBAAY,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;AAC1C,oBAAY,SAAS,GAAG,UAAU,GAAG,aAAa,CAAC;AACnD,oBAAY,UAAU,GAAG,CACvB,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAChB,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AAGrC,aAAK,OAAO,GAAG;IAAC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,QAAQ,CAAA;CAAC,CAAC;AAE3E,aAAK,IAAI,GAAG,CACV,KAAK,EAAE,SAAS,EAChB,GAAG,kBAAkB,EAAE,KAAK,CAAC,OAAO,CAAC,KAClC,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AAEjE,MAAM,WAAW,MAAM;IACrB,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzD,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,EAAG,SAAQ,MAAM;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;CACzD;AAED,MAAM,WAAW,gBAAgB;IAC/B,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxE;AAED,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,MAAM,WAAW,YAAa,SAAQ,EAAE;IACtC,UAAU,EAAE,oBAAoB,CAAC;CAClC;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/C,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,QAAS,SAAQ,YAAY;IAC5C,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;CACpB;AAGD,MAAM,WAAW,MAAO,SAAQ,MAAM,CAAC,MAAM;IAC3C,EAAE,EAAE,YAAY,CAAC;IACjB,IAAI,EAAE,YAAY,CAAC;IACnB,GAAG,EAAE,MAAM,GAAG;QAAC,UAAU,CAAC,EAAE,gBAAgB,CAAA;KAAC,CAAC;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,YAAY,CAAC;IACxB,SAAS,EAAE,YAAY,CAAC;IACxB,YAAY,EAAE,eAAe,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC;CACvB"} \ No newline at end of file diff --git a/node_modules/@jest/types/build/Global.js b/node_modules/@jest/types/build/Global.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/@jest/types/build/Global.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/@jest/types/build/index.d.ts b/node_modules/@jest/types/build/index.d.ts deleted file mode 100644 index 4d07f844..00000000 --- a/node_modules/@jest/types/build/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import * as Circus from './Circus'; -import * as Config from './Config'; -import * as Global from './Global'; -export { Circus, Config, Global }; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@jest/types/build/index.d.ts.map b/node_modules/@jest/types/build/index.d.ts.map deleted file mode 100644 index 3b69eaf5..00000000 --- a/node_modules/@jest/types/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/@jest/types/build/index.js b/node_modules/@jest/types/build/index.js deleted file mode 100644 index c638c290..00000000 --- a/node_modules/@jest/types/build/index.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.Global = exports.Config = exports.Circus = void 0; - -var Circus = _interopRequireWildcard(require('./Circus')); - -exports.Circus = Circus; - -var Config = _interopRequireWildcard(require('./Config')); - -exports.Config = Config; - -var Global = _interopRequireWildcard(require('./Global')); - -exports.Global = Global; - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} diff --git a/node_modules/@jest/types/package.json b/node_modules/@jest/types/package.json deleted file mode 100644 index b901c617..00000000 --- a/node_modules/@jest/types/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_args": [ - [ - "@jest/types@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@jest/types@24.9.0", - "_id": "@jest/types@24.9.0", - "_inBundle": false, - "_integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "_location": "/@jest/types", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@jest/types@24.9.0", - "name": "@jest/types", - "escapedName": "@jest%2ftypes", - "scope": "@jest", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core", - "/@jest/environment", - "/@jest/fake-timers", - "/@jest/reporters", - "/@jest/test-result", - "/@jest/transform", - "/babel-jest", - "/expect", - "/jest-changed-files", - "/jest-circus", - "/jest-config", - "/jest-each", - "/jest-environment-jsdom", - "/jest-environment-node", - "/jest-haste-map", - "/jest-jasmine2", - "/jest-message-util", - "/jest-mock", - "/jest-resolve", - "/jest-resolve-dependencies", - "/jest-runner", - "/jest-runtime", - "/jest-snapshot", - "/jest-util", - "/jest-validate", - "/jest-watcher", - "/jest/jest-cli", - "/pretty-format" - ], - "_resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "@jest/types", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-types" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/@types/babel__core/LICENSE b/node_modules/@types/babel__core/LICENSE deleted file mode 100644 index 21071075..00000000 --- a/node_modules/@types/babel__core/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - 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/@types/babel__core/README.md b/node_modules/@types/babel__core/README.md deleted file mode 100644 index 6b14573b..00000000 --- a/node_modules/@types/babel__core/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/babel__core` - -# Summary -This package contains type definitions for @babel/core (https://github.com/babel/babel/tree/master/packages/babel-core). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__core - -Additional Details - * Last updated: Wed, 04 Sep 2019 17:40:11 GMT - * Dependencies: @types/babel__generator, @types/babel__traverse, @types/babel__template, @types/babel__types, @types/babel__parser - * Global values: babel - -# Credits -These definitions were written by Troy Gerwien , Marvin Hagemeister , Melvin Groenhoff , and Jessica Franco . diff --git a/node_modules/@types/babel__core/index.d.ts b/node_modules/@types/babel__core/index.d.ts deleted file mode 100644 index ef0b25d3..00000000 --- a/node_modules/@types/babel__core/index.d.ts +++ /dev/null @@ -1,687 +0,0 @@ -// Type definitions for @babel/core 7.1 -// Project: https://github.com/babel/babel/tree/master/packages/babel-core, https://babeljs.io -// Definitions by: Troy Gerwien -// Marvin Hagemeister -// Melvin Groenhoff -// Jessica Franco -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.9 - -import { GeneratorOptions } from "@babel/generator"; -import traverse, { Visitor, NodePath } from "@babel/traverse"; -import template from "@babel/template"; -import * as t from "@babel/types"; -import { ParserOptions } from "@babel/parser"; - -export { - ParserOptions, - GeneratorOptions, - t as types, - template, - traverse, - NodePath, - Visitor -}; - -export type Node = t.Node; -export type ParseResult = t.File | t.Program; -export const version: string; -export const DEFAULT_EXTENSIONS: ['.js', '.jsx', '.es6', '.es', '.mjs']; - -export interface TransformOptions { - /** - * Include the AST in the returned object - * - * Default: `false` - */ - ast?: boolean | null; - - /** - * Attach a comment after all non-user injected code - * - * Default: `null` - */ - auxiliaryCommentAfter?: string | null; - - /** - * Attach a comment before all non-user injected code - * - * Default: `null` - */ - auxiliaryCommentBefore?: string | null; - - /** - * Specify the "root" folder that defines the location to search for "babel.config.js", and the default folder to allow `.babelrc` files inside of. - * - * Default: `"."` - */ - root?: string | null; - - /** - * This option, combined with the "root" value, defines how Babel chooses its project root. - * The different modes define different ways that Babel can process the "root" value to get - * the final project root. - * - * @see https://babeljs.io/docs/en/next/options#rootmode - */ - rootMode?: 'root' | 'upward' | 'upward-optional'; - - /** - * The config file to load Babel's config from. Defaults to searching for "babel.config.js" inside the "root" folder. `false` will disable searching for config files. - * - * Default: `undefined` - */ - configFile?: string | false | null; - - /** - * Specify whether or not to use .babelrc and - * .babelignore files. - * - * Default: `true` - */ - babelrc?: boolean | null; - - /** - * Specify which packages should be search for .babelrc files when they are being compiled. `true` to always search, or a path string or an array of paths to packages to search - * inside of. Defaults to only searching the "root" package. - * - * Default: `(root)` - */ - babelrcRoots?: true | string | string[] | null; - - /** - * Defaults to environment variable `BABEL_ENV` if set, or else `NODE_ENV` if set, or else it defaults to `"development"` - * - * Default: env vars - */ - envName?: string; - - /** - * Enable code generation - * - * Default: `true` - */ - code?: boolean | null; - - /** - * Output comments in generated output - * - * Default: `true` - */ - comments?: boolean | null; - - /** - * Do not include superfluous whitespace characters and line terminators. When set to `"auto"` compact is set to `true` on input sizes of >500KB - * - * Default: `"auto"` - */ - compact?: boolean | "auto" | null; - - /** - * The working directory that Babel's programmatic options are loaded relative to. - * - * Default: `"."` - */ - cwd?: string | null; - - /** - * Utilities may pass a caller object to identify themselves to Babel and - * pass capability-related flags for use by configs, presets and plugins. - * - * @see https://babeljs.io/docs/en/next/options#caller - */ - caller?: TransformCaller; - - /** - * This is an object of keys that represent different environments. For example, you may have: `{ env: { production: { \/* specific options *\/ } } }` - * which will use those options when the `envName` is `production` - * - * Default: `{}` - */ - env?: { [index: string]: TransformOptions | null | undefined; } | null; - - /** - * A path to a `.babelrc` file to extend - * - * Default: `null` - */ - extends?: string | null; - - /** - * Filename for use in errors etc - * - * Default: `"unknown"` - */ - filename?: string | null; - - /** - * Filename relative to `sourceRoot` - * - * Default: `(filename)` - */ - filenameRelative?: string | null; - - /** - * An object containing the options to be passed down to the babel code generator, @babel/generator - * - * Default: `{}` - */ - generatorOpts?: GeneratorOptions | null; - - /** - * Specify a custom callback to generate a module id with. Called as `getModuleId(moduleName)`. If falsy value is returned then the generated module id is used - * - * Default: `null` - */ - getModuleId?: ((moduleName: string) => string | null | undefined) | null; - - /** - * ANSI highlight syntax error code frames - * - * Default: `true` - */ - highlightCode?: boolean | null; - - /** - * Opposite to the `only` option. `ignore` is disregarded if `only` is specified - * - * Default: `null` - */ - ignore?: string[] | null; - - /** - * A source map object that the output source map will be based on - * - * Default: `null` - */ - inputSourceMap?: object | null; - - /** - * Should the output be minified (not printing last semicolons in blocks, printing literal string values instead of escaped ones, stripping `()` from `new` when safe) - * - * Default: `false` - */ - minified?: boolean | null; - - /** - * Specify a custom name for module ids - * - * Default: `null` - */ - moduleId?: string | null; - - /** - * If truthy, insert an explicit id for modules. By default, all modules are anonymous. (Not available for `common` modules) - * - * Default: `false` - */ - moduleIds?: boolean | null; - - /** - * Optional prefix for the AMD module formatter that will be prepend to the filename on module definitions - * - * Default: `(sourceRoot)` - */ - moduleRoot?: string | null; - - /** - * A glob, regex, or mixed array of both, matching paths to **only** compile. Can also be an array of arrays containing paths to explicitly match. When attempting to compile - * a non-matching file it's returned verbatim - * - * Default: `null` - */ - only?: string | RegExp | Array | null; - - /** - * An object containing the options to be passed down to the babel parser, @babel/parser - * - * Default: `{}` - */ - parserOpts?: ParserOptions | null; - - /** - * List of plugins to load and use - * - * Default: `[]` - */ - plugins?: PluginItem[] | null; - - /** - * List of presets (a set of plugins) to load and use - * - * Default: `[]` - */ - presets?: PluginItem[] | null; - - /** - * Retain line numbers. This will lead to wacky code but is handy for scenarios where you can't use source maps. (**NOTE**: This will not retain the columns) - * - * Default: `false` - */ - retainLines?: boolean | null; - - /** - * An optional callback that controls whether a comment should be output or not. Called as `shouldPrintComment(commentContents)`. **NOTE**: This overrides the `comment` option when used - * - * Default: `null` - */ - shouldPrintComment?: ((commentContents: string) => boolean) | null; - - /** - * Set `sources[0]` on returned source map - * - * Default: `(filenameRelative)` - */ - sourceFileName?: string | null; - - /** - * If truthy, adds a `map` property to returned output. If set to `"inline"`, a comment with a sourceMappingURL directive is added to the bottom of the returned code. If set to `"both"` - * then a `map` property is returned as well as a source map comment appended. **This does not emit sourcemap files by itself!** - * - * Default: `false` - */ - sourceMaps?: boolean | "inline" | "both" | null; - - /** - * The root from which all sources are relative - * - * Default: `(moduleRoot)` - */ - sourceRoot?: string | null; - - /** - * Indicate the mode the code should be parsed in. Can be one of "script", "module", or "unambiguous". `"unambiguous"` will make Babel attempt to guess, based on the presence of ES6 - * `import` or `export` statements. Files with ES6 `import`s and `export`s are considered `"module"` and are otherwise `"script"`. - * - * Default: `("module")` - */ - sourceType?: "script" | "module" | "unambiguous" | null; - - /** - * An optional callback that can be used to wrap visitor methods. **NOTE**: This is useful for things like introspection, and not really needed for implementing anything. Called as - * `wrapPluginVisitorMethod(pluginAlias, visitorType, callback)`. - */ - wrapPluginVisitorMethod?: ((pluginAlias: string, visitorType: "enter" | "exit", callback: (path: NodePath, state: any) => void) => (path: NodePath, state: any) => void) | null; -} - -export interface TransformCaller { - // the only required property - name: string; - // e.g. set to true by `babel-loader` and false by `babel-jest` - supportsStaticESM?: boolean; - // augment this with a "declare module '@babel/core' { ... }" if you need more keys -} - -export type FileResultCallback = (err: Error | null, result: BabelFileResult | null) => any; - -/** - * Transforms the passed in code. Calling a callback with an object with the generated code, source map, and AST. - */ -export function transform(code: string, callback: FileResultCallback): void; - -/** - * Transforms the passed in code. Calling a callback with an object with the generated code, source map, and AST. - */ -export function transform(code: string, opts: TransformOptions | undefined, callback: FileResultCallback): void; - -/** - * Here for backward-compatibility. Ideally use `transformSync` if you want a synchronous API. - */ -export function transform(code: string, opts?: TransformOptions): BabelFileResult | null; - -/** - * Transforms the passed in code. Returning an object with the generated code, source map, and AST. - */ -export function transformSync(code: string, opts?: TransformOptions): BabelFileResult | null; - -/** - * Transforms the passed in code. Calling a callback with an object with the generated code, source map, and AST. - */ -export function transformAsync(code: string, opts?: TransformOptions): Promise; - -/** - * Asynchronously transforms the entire contents of a file. - */ -export function transformFile(filename: string, callback: FileResultCallback): void; - -/** - * Asynchronously transforms the entire contents of a file. - */ -export function transformFile(filename: string, opts: TransformOptions | undefined, callback: FileResultCallback): void; - -/** - * Synchronous version of `babel.transformFile`. Returns the transformed contents of the `filename`. - */ -export function transformFileSync(filename: string, opts?: TransformOptions): BabelFileResult | null; - -/** - * Asynchronously transforms the entire contents of a file. - */ -export function transformFileAsync(filename: string, opts?: TransformOptions): Promise; - -/** - * Given an AST, transform it. - */ -export function transformFromAst(ast: Node, code: string | undefined, callback: FileResultCallback): void; - -/** - * Given an AST, transform it. - */ -export function transformFromAst(ast: Node, code: string | undefined, opts: TransformOptions | undefined, callback: FileResultCallback): void; - -/** - * Here for backward-compatibility. Ideally use ".transformSync" if you want a synchronous API. - */ -export function transformFromAstSync(ast: Node, code?: string, opts?: TransformOptions): BabelFileResult | null; - -/** - * Given an AST, transform it. - */ -export function transformFromAstAsync(ast: Node, code?: string, opts?: TransformOptions): Promise; - -// A babel plugin is a simple function which must return an object matching -// the following interface. Babel will throw if it finds unknown properties. -// The list of allowed plugin keys is here: -// https://github.com/babel/babel/blob/4e50b2d9d9c376cee7a2cbf56553fe5b982ea53c/packages/babel-core/src/config/option-manager.js#L71 -export interface PluginObj { - name?: string; - manipulateOptions?(opts: any, parserOpts: any): void; - pre?(this: S, state: any): void; - visitor: Visitor; - post?(this: S, state: any): void; - inherits?: any; -} - -export interface BabelFileResult { - ast?: t.File | null; - code?: string | null; - ignored?: boolean; - map?: { - version: number; - sources: string[]; - names: string[]; - sourceRoot?: string; - sourcesContent?: string[]; - mappings: string; - file: string; - } | null; - metadata?: BabelFileMetadata; -} - -export interface BabelFileMetadata { - usedHelpers: string[]; - marked: Array<{ - type: string; - message: string; - loc: object; - }>; - modules: BabelFileModulesMetadata; -} - -export interface BabelFileModulesMetadata { - imports: object[]; - exports: { - exported: object[]; - specifiers: object[]; - }; -} - -export type FileParseCallback = (err: Error | null, result: ParseResult | null) => any; - -/** - * Given some code, parse it using Babel's standard behavior. - * Referenced presets and plugins will be loaded such that optional syntax plugins are automatically enabled. - */ -export function parse(code: string, callback: FileParseCallback): void; - -/** - * Given some code, parse it using Babel's standard behavior. - * Referenced presets and plugins will be loaded such that optional syntax plugins are automatically enabled. - */ -export function parse(code: string, options: TransformOptions | undefined, callback: FileParseCallback): void; - -/** - * Given some code, parse it using Babel's standard behavior. - * Referenced presets and plugins will be loaded such that optional syntax plugins are automatically enabled. - */ -export function parse(code: string, options?: TransformOptions): ParseResult | null; - -/** - * Given some code, parse it using Babel's standard behavior. - * Referenced presets and plugins will be loaded such that optional syntax plugins are automatically enabled. - */ -export function parseSync(code: string, options?: TransformOptions): ParseResult | null; - -/** - * Given some code, parse it using Babel's standard behavior. - * Referenced presets and plugins will be loaded such that optional syntax plugins are automatically enabled. - */ -export function parseAsync(code: string, options?: TransformOptions): Promise; - -/** - * Resolve Babel's options fully, resulting in an options object where: - * - * * opts.plugins is a full list of Plugin instances. - * * opts.presets is empty and all presets are flattened into opts. - * * It can be safely passed back to Babel. Fields like babelrc have been set to false so that later calls to Babel - * will not make a second attempt to load config files. - * - * Plugin instances aren't meant to be manipulated directly, but often callers will serialize this opts to JSON to - * use it as a cache key representing the options Babel has received. Caching on this isn't 100% guaranteed to - * invalidate properly, but it is the best we have at the moment. - */ -export function loadOptions(options?: TransformOptions): object | null; - -/** - * To allow systems to easily manipulate and validate a user's config, this function resolves the plugins and - * presets and proceeds no further. The expectation is that callers will take the config's .options, manipulate it - * as then see fit and pass it back to Babel again. - * - * * `babelrc: string | void` - The path of the `.babelrc` file, if there was one. - * * `babelignore: string | void` - The path of the `.babelignore` file, if there was one. - * * `options: ValidatedOptions` - The partially resolved options, which can be manipulated and passed back - * to Babel again. - * * `plugins: Array` - See below. - * * `presets: Array` - See below. - * * It can be safely passed back to Babel. Fields like `babelrc` have been set to false so that later calls to - * Babel will not make a second attempt to load config files. - * - * `ConfigItem` instances expose properties to introspect the values, but each item should be treated as - * immutable. If changes are desired, the item should be removed from the list and replaced with either a normal - * Babel config value, or with a replacement item created by `babel.createConfigItem`. See that function for - * information about `ConfigItem` fields. - */ -export function loadPartialConfig(options?: TransformOptions): Readonly | null; - -export interface PartialConfig { - options: TransformOptions; - babelrc?: string; - babelignore?: string; - config?: string; -} - -export interface ConfigItem { - /** - * The name that the user gave the plugin instance, e.g. `plugins: [ ['env', {}, 'my-env'] ]` - */ - name?: string; - - /** - * The resolved value of the plugin. - */ - value: object | ((...args: any[]) => any); - - /** - * The options object passed to the plugin. - */ - options?: object | false; - - /** - * The path that the options are relative to. - */ - dirname: string; - - /** - * Information about the plugin's file, if Babel knows it. - * * - */ - file?: { - /** - * The file that the user requested, e.g. `"@babel/env"` - */ - request: string; - - /** - * The full path of the resolved file, e.g. `"/tmp/node_modules/@babel/preset-env/lib/index.js"` - */ - resolved: string; - } | null; -} - -export type PluginOptions = object | undefined | false; - -export type PluginTarget = string | object | ((...args: any[]) => any); - -export type PluginItem = ConfigItem | PluginObj | PluginTarget | [PluginTarget, PluginOptions] | [PluginTarget, PluginOptions, string | undefined]; - -export function resolvePlugin(name: string, dirname: string): string | null; -export function resolvePreset(name: string, dirname: string): string | null; - -export interface CreateConfigItemOptions { - dirname?: string; - type?: "preset" | "plugin"; -} - -/** - * Allows build tooling to create and cache config items up front. If this function is called multiple times for a - * given plugin, Babel will call the plugin's function itself multiple times. If you have a clear set of expected - * plugins and presets to inject, pre-constructing the config items would be recommended. - */ -export function createConfigItem(value: PluginTarget | [PluginTarget, PluginOptions] | [PluginTarget, PluginOptions, string | undefined], options?: CreateConfigItemOptions): ConfigItem; - -// NOTE: the documentation says the ConfigAPI also exposes @babel/core's exports, but it actually doesn't -/** - * @see https://babeljs.io/docs/en/next/config-files#config-function-api - */ -export interface ConfigAPI { - /** - * The version string for the Babel version that is loading the config file. - * - * @see https://babeljs.io/docs/en/next/config-files#apiversion - */ - version: string; - /** - * @see https://babeljs.io/docs/en/next/config-files#apicache - */ - cache: SimpleCacheConfigurator; - /** - * @see https://babeljs.io/docs/en/next/config-files#apienv - */ - env: EnvFunction; - // undocumented; currently hardcoded to return 'false' - // async(): boolean - /** - * This API is used as a way to access the `caller` data that has been passed to Babel. - * Since many instances of Babel may be running in the same process with different `caller` values, - * this API is designed to automatically configure `api.cache`, the same way `api.env()` does. - * - * The `caller` value is available as the first parameter of the callback function. - * It is best used with something like this to toggle configuration behavior - * based on a specific environment: - * - * @example - * function isBabelRegister(caller?: { name: string }) { - * return !!(caller && caller.name === "@babel/register") - * } - * api.caller(isBabelRegister) - * - * @see https://babeljs.io/docs/en/next/config-files#apicallercb - */ - caller(callerCallback: (caller: TransformOptions['caller']) => T): T; - /** - * While `api.version` can be useful in general, it's sometimes nice to just declare your version. - * This API exposes a simple way to do that with: - * - * @example - * api.assertVersion(7) // major version only - * api.assertVersion("^7.2") - * - * @see https://babeljs.io/docs/en/next/config-files#apiassertversionrange - */ - assertVersion(versionRange: number | string): boolean; - // NOTE: this is an undocumented reexport from "@babel/parser" but it's missing from its types - // tokTypes: typeof tokTypes -} - -/** - * JS configs are great because they can compute a config on the fly, - * but the downside there is that it makes caching harder. - * Babel wants to avoid re-executing the config function every time a file is compiled, - * because then it would also need to re-execute any plugin and preset functions - * referenced in that config. - * - * To avoid this, Babel expects users of config functions to tell it how to manage caching - * within a config file. - * - * @see https://babeljs.io/docs/en/next/config-files#apicache - */ -export interface SimpleCacheConfigurator { - // there is an undocumented call signature that is a shorthand for forever()/never()/using(). - // (ever: boolean): void - // (callback: CacheCallback): T - /** - * Permacache the computed config and never call the function again. - */ - forever(): void; - /** - * Do not cache this config, and re-execute the function every time. - */ - never(): void; - /** - * Any time the using callback returns a value other than the one that was expected, - * the overall config function will be called again and a new entry will be added to the cache. - * - * @example - * api.cache.using(() => process.env.NODE_ENV) - */ - using(callback: SimpleCacheCallback): T; - /** - * Any time the using callback returns a value other than the one that was expected, - * the overall config function will be called again and all entries in the cache will - * be replaced with the result. - * - * @example - * api.cache.invalidate(() => process.env.NODE_ENV) - */ - invalidate(callback: SimpleCacheCallback): T; -} - -// https://github.com/babel/babel/blob/v7.3.3/packages/babel-core/src/config/caching.js#L231 -export type SimpleCacheKey = string | boolean | number | null | undefined; -export type SimpleCacheCallback = () => T; - -/** - * Since `NODE_ENV` is a fairly common way to toggle behavior, Babel also includes an API function - * meant specifically for that. This API is used as a quick way to check the `"envName"` that Babel - * was loaded with, which takes `NODE_ENV` into account if no other overriding environment is set. - * - * @see https://babeljs.io/docs/en/next/config-files#apienv - */ -export interface EnvFunction { - /** - * @returns the current `envName` string - */ - (): string; - /** - * @returns `true` if the `envName` is `===` any of the given strings - */ - (envName: string | ReadonlyArray): boolean; - // the official documentation is misleading for this one... - // this just passes the callback to `cache.using` but with an additional argument. - // it returns its result instead of necessarily returning a boolean. - (envCallback: (envName: NonNullable) => T): T; -} - -export type ConfigFunction = (api: ConfigAPI) => TransformOptions; - -export as namespace babel; diff --git a/node_modules/@types/babel__core/package.json b/node_modules/@types/babel__core/package.json deleted file mode 100644 index 5df20d0a..00000000 --- a/node_modules/@types/babel__core/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_args": [ - [ - "@types/babel__core@7.1.3", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@types/babel__core@7.1.3", - "_id": "@types/babel__core@7.1.3", - "_inBundle": false, - "_integrity": "sha512-8fBo0UR2CcwWxeX7WIIgJ7lXjasFxoYgRnFHUj+hRvKkpiBJbxhdAPTCY6/ZKM0uxANFVzt4yObSLuTiTnazDA==", - "_location": "/@types/babel__core", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/babel__core@7.1.3", - "name": "@types/babel__core", - "escapedName": "@types%2fbabel__core", - "scope": "@types", - "rawSpec": "7.1.3", - "saveSpec": null, - "fetchSpec": "7.1.3" - }, - "_requiredBy": [ - "/babel-jest" - ], - "_resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.3.tgz", - "_spec": "7.1.3", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "Troy Gerwien", - "url": "https://github.com/yortus" - }, - { - "name": "Marvin Hagemeister", - "url": "https://github.com/marvinhagemeister" - }, - { - "name": "Melvin Groenhoff", - "url": "https://github.com/mgroenhoff" - }, - { - "name": "Jessica Franco", - "url": "https://github.com/Jessidhia" - } - ], - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - }, - "description": "TypeScript definitions for @babel/core", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/babel__core", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/babel__core" - }, - "scripts": {}, - "typeScriptVersion": "2.9", - "types": "index", - "typesPublisherContentHash": "478fc636b3b91d2d8148bbc98176f96231386926f4af91893dbe95d3812775a5", - "version": "7.1.3" -} diff --git a/node_modules/@types/babel__generator/LICENSE b/node_modules/@types/babel__generator/LICENSE deleted file mode 100644 index 21071075..00000000 --- a/node_modules/@types/babel__generator/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - 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/@types/babel__generator/README.md b/node_modules/@types/babel__generator/README.md deleted file mode 100644 index 607aeb65..00000000 --- a/node_modules/@types/babel__generator/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/babel__generator` - -# Summary -This package contains type definitions for @babel/generator ( https://github.com/babel/babel/tree/master/packages/babel-generator ). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__generator - -Additional Details - * Last updated: Wed, 13 Feb 2019 21:04:23 GMT - * Dependencies: @types/babel__types - * Global values: none - -# Credits -These definitions were written by Troy Gerwien , Johnny Estilles , Melvin Groenhoff . diff --git a/node_modules/@types/babel__generator/index.d.ts b/node_modules/@types/babel__generator/index.d.ts deleted file mode 100644 index d229c985..00000000 --- a/node_modules/@types/babel__generator/index.d.ts +++ /dev/null @@ -1,117 +0,0 @@ -// Type definitions for @babel/generator 7.0 -// Project: https://github.com/babel/babel/tree/master/packages/babel-generator, https://babeljs.io -// Definitions by: Troy Gerwien -// Johnny Estilles -// Melvin Groenhoff -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.9 - -import * as t from "@babel/types"; - -export interface GeneratorOptions { - /** - * Optional string to add as a block comment at the start of the output file. - */ - auxiliaryCommentBefore?: string; - - /** - * Optional string to add as a block comment at the end of the output file. - */ - auxiliaryCommentAfter?: string; - - /** - * Function that takes a comment (as a string) and returns true if the comment should be included in the output. - * By default, comments are included if `opts.comments` is `true` or if `opts.minifed` is `false` and the comment - * contains `@preserve` or `@license`. - */ - shouldPrintComment?(comment: string): boolean; - - /** - * Attempt to use the same line numbers in the output code as in the source code (helps preserve stack traces). - * Defaults to `false`. - */ - retainLines?: boolean; - - /** - * Should comments be included in output? Defaults to `true`. - */ - comments?: boolean; - - /** - * Set to true to avoid adding whitespace for formatting. Defaults to the value of `opts.minified`. - */ - compact?: boolean | "auto"; - - /** - * Should the output be minified. Defaults to `false`. - */ - minified?: boolean; - - /** - * Set to true to reduce whitespace (but not as much as opts.compact). Defaults to `false`. - */ - concise?: boolean; - - /** - * The type of quote to use in the output. If omitted, autodetects based on `ast.tokens`. - */ - quotes?: "single" | "double"; - - /** - * Used in warning messages - */ - filename?: string; - - /** - * Enable generating source maps. Defaults to `false`. - */ - sourceMaps?: boolean; - - /** - * The filename of the generated code that the source map will be associated with. - */ - sourceMapTarget?: string; - - /** - * A root for all relative URLs in the source map. - */ - sourceRoot?: string; - - /** - * The filename for the source code (i.e. the code in the `code` argument). - * This will only be used if `code` is a string. - */ - sourceFileName?: string; - - /** - * Set to true to run jsesc with "json": true to print "\u00A9" vs. "©"; - */ - jsonCompatibleStrings?: boolean; -} - -export class CodeGenerator { - constructor(ast: t.Node, opts?: GeneratorOptions, code?: string); - generate(): GeneratorResult; -} - -/** - * Turns an AST into code, maintaining sourcemaps, user preferences, and valid output. - * @param ast - the abstract syntax tree from which to generate output code. - * @param opts - used for specifying options for code generation. - * @param code - the original source code, used for source maps. - * @returns - an object containing the output code and source map. - */ -export default function generate(ast: t.Node, opts?: GeneratorOptions, code?: string | { [filename: string]: string; }): GeneratorResult; - -export interface GeneratorResult { - code: string; - map: { - version: number; - sources: string[]; - names: string[]; - sourceRoot?: string; - sourcesContent?: string[]; - mappings: string; - file: string; - } | null; -} diff --git a/node_modules/@types/babel__generator/package.json b/node_modules/@types/babel__generator/package.json deleted file mode 100644 index 0eb03f3f..00000000 --- a/node_modules/@types/babel__generator/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_args": [ - [ - "@types/babel__generator@7.0.2", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@types/babel__generator@7.0.2", - "_id": "@types/babel__generator@7.0.2", - "_inBundle": false, - "_integrity": "sha512-NHcOfab3Zw4q5sEE2COkpfXjoE7o+PmqD9DQW4koUT3roNxwziUdXGnRndMat/LJNUtePwn1TlP4do3uoe3KZQ==", - "_location": "/@types/babel__generator", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/babel__generator@7.0.2", - "name": "@types/babel__generator", - "escapedName": "@types%2fbabel__generator", - "scope": "@types", - "rawSpec": "7.0.2", - "saveSpec": null, - "fetchSpec": "7.0.2" - }, - "_requiredBy": [ - "/@types/babel__core" - ], - "_resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.0.2.tgz", - "_spec": "7.0.2", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "Troy Gerwien", - "url": "https://github.com/yortus" - }, - { - "name": "Johnny Estilles", - "url": "https://github.com/johnnyestilles" - }, - { - "name": "Melvin Groenhoff", - "url": "https://github.com/mgroenhoff" - } - ], - "dependencies": { - "@babel/types": "^7.0.0" - }, - "description": "TypeScript definitions for @babel/generator", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/babel__generator", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "typeScriptVersion": "2.9", - "types": "index", - "typesPublisherContentHash": "12b47650c77333060b8da231a33c95326cb124929b12d19cd41d9c2dae936d80", - "version": "7.0.2" -} diff --git a/node_modules/@types/babel__template/LICENSE b/node_modules/@types/babel__template/LICENSE deleted file mode 100644 index 21071075..00000000 --- a/node_modules/@types/babel__template/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - 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/@types/babel__template/README.md b/node_modules/@types/babel__template/README.md deleted file mode 100644 index 99f75cd7..00000000 --- a/node_modules/@types/babel__template/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/babel__template` - -# Summary -This package contains type definitions for @babel/template ( https://github.com/babel/babel/tree/master/packages/babel-template ). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__template - -Additional Details - * Last updated: Wed, 13 Feb 2019 21:04:23 GMT - * Dependencies: @types/babel__parser, @types/babel__types - * Global values: none - -# Credits -These definitions were written by Troy Gerwien , Marvin Hagemeister , Melvin Groenhoff . diff --git a/node_modules/@types/babel__template/index.d.ts b/node_modules/@types/babel__template/index.d.ts deleted file mode 100644 index 05084359..00000000 --- a/node_modules/@types/babel__template/index.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -// Type definitions for @babel/template 7.0 -// Project: https://github.com/babel/babel/tree/master/packages/babel-template, https://babeljs.io -// Definitions by: Troy Gerwien -// Marvin Hagemeister -// Melvin Groenhoff -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.9 - -import { ParserOptions } from "@babel/parser"; -import { Expression, File, Program, Statement } from "@babel/types"; - -export interface TemplateBuilderOptions extends ParserOptions { - /** - * A set of placeholder names to automatically accept. Items in this list do not need to match the given placeholder pattern. - */ - placeholderWhitelist?: Set; - - /** - * A pattern to search for when looking for Identifier and StringLiteral nodes that should be considered placeholders. `false` will - * disable placeholder searching entirely, leaving only the `placeholderWhitelist` value to find placeholders. - */ - placeholderPattern?: RegExp | false; - - /** - * Set this to `true` to preserve any comments from the `code` parameter. - */ - preserveComments?: boolean; -} - -export interface TemplateBuilder { - /** - * Build a new builder, merging the given options with the previous ones. - */ - (opts: TemplateBuilderOptions): TemplateBuilder; - - /** - * Building from a string produces an AST builder function by default. - */ - (code: string, opts?: TemplateBuilderOptions): (arg?: PublicReplacements) => T; - - /** - * Building from a template literal produces an AST builder function by default. - */ - (tpl: TemplateStringsArray, ...args: any[]): (arg?: PublicReplacements) => T; - - // Allow users to explicitly create templates that produce ASTs, skipping the need for an intermediate function. - ast: { - (tpl: string, opts?: TemplateBuilderOptions): T; - (tpl: TemplateStringsArray, ...args: any[]): T; - }; -} - -export type PublicReplacements = { [index: string]: any; } | any[]; - -export const smart: TemplateBuilder; -export const statement: TemplateBuilder; -export const statements: TemplateBuilder; -export const expression: TemplateBuilder; -export const program: TemplateBuilder; - -type DefaultTemplateBuilder = typeof smart & { - smart: typeof smart; - statement: typeof statement; - statements: typeof statements; - expression: typeof expression; - program: typeof program; - ast: typeof smart.ast; -}; - -declare const templateBuilder: DefaultTemplateBuilder; - -export default templateBuilder; diff --git a/node_modules/@types/babel__template/package.json b/node_modules/@types/babel__template/package.json deleted file mode 100644 index db01b218..00000000 --- a/node_modules/@types/babel__template/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_args": [ - [ - "@types/babel__template@7.0.2", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@types/babel__template@7.0.2", - "_id": "@types/babel__template@7.0.2", - "_inBundle": false, - "_integrity": "sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg==", - "_location": "/@types/babel__template", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/babel__template@7.0.2", - "name": "@types/babel__template", - "escapedName": "@types%2fbabel__template", - "scope": "@types", - "rawSpec": "7.0.2", - "saveSpec": null, - "fetchSpec": "7.0.2" - }, - "_requiredBy": [ - "/@types/babel__core" - ], - "_resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.0.2.tgz", - "_spec": "7.0.2", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "Troy Gerwien", - "url": "https://github.com/yortus" - }, - { - "name": "Marvin Hagemeister", - "url": "https://github.com/marvinhagemeister" - }, - { - "name": "Melvin Groenhoff", - "url": "https://github.com/mgroenhoff" - } - ], - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - }, - "description": "TypeScript definitions for @babel/template", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/babel__template", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "typeScriptVersion": "2.9", - "types": "index", - "typesPublisherContentHash": "fd665ffdd94e184259796e85ff1a8e8626a23fb0eeefd6cfb9f77a316eda2624", - "version": "7.0.2" -} diff --git a/node_modules/@types/babel__traverse/LICENSE b/node_modules/@types/babel__traverse/LICENSE deleted file mode 100644 index 21071075..00000000 --- a/node_modules/@types/babel__traverse/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - 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/@types/babel__traverse/README.md b/node_modules/@types/babel__traverse/README.md deleted file mode 100644 index 6d780595..00000000 --- a/node_modules/@types/babel__traverse/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/babel__traverse` - -# Summary -This package contains type definitions for @babel/traverse ( https://github.com/babel/babel/tree/master/packages/babel-traverse ). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__traverse - -Additional Details - * Last updated: Tue, 11 Jun 2019 02:00:21 GMT - * Dependencies: @types/babel__types - * Global values: none - -# Credits -These definitions were written by Troy Gerwien , Marvin Hagemeister , Ryan Petrich , Melvin Groenhoff . diff --git a/node_modules/@types/babel__traverse/index.d.ts b/node_modules/@types/babel__traverse/index.d.ts deleted file mode 100644 index 0e9ff767..00000000 --- a/node_modules/@types/babel__traverse/index.d.ts +++ /dev/null @@ -1,829 +0,0 @@ -// Type definitions for @babel/traverse 7.0 -// Project: https://github.com/babel/babel/tree/master/packages/babel-traverse, https://babeljs.io -// Definitions by: Troy Gerwien -// Marvin Hagemeister -// Ryan Petrich -// Melvin Groenhoff -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.9 - -import * as t from "@babel/types"; - -export type Node = t.Node; - -export default function traverse( - parent: Node | Node[], - opts: TraverseOptions, - scope: Scope | undefined, - state: S, - parentPath?: NodePath, -): void; -export default function traverse( - parent: Node | Node[], - opts: TraverseOptions, - scope?: Scope, - state?: any, - parentPath?: NodePath, -): void; - -export interface TraverseOptions extends Visitor { - scope?: Scope; - noScope?: boolean; -} - -export class Scope { - constructor(path: NodePath, parentScope?: Scope); - path: NodePath; - block: Node; - parentBlock: Node; - parent: Scope; - hub: Hub; - bindings: { [name: string]: Binding; }; - - /** Traverse node with current scope and path. */ - traverse(node: Node | Node[], opts: TraverseOptions, state: S): void; - traverse(node: Node | Node[], opts?: TraverseOptions, state?: any): void; - - /** Generate a unique identifier and add it to the current scope. */ - generateDeclaredUidIdentifier(name?: string): t.Identifier; - - /** Generate a unique identifier. */ - generateUidIdentifier(name?: string): t.Identifier; - - /** Generate a unique `_id1` binding. */ - generateUid(name?: string): string; - - /** Generate a unique identifier based on a node. */ - generateUidIdentifierBasedOnNode(parent: Node, defaultName?: string): t.Identifier; - - /** - * Determine whether evaluating the specific input `node` is a consequenceless reference. ie. - * evaluating it wont result in potentially arbitrary code from being ran. The following are - * whitelisted and determined not to cause side effects: - * - * - `this` expressions - * - `super` expressions - * - Bound identifiers - */ - isStatic(node: Node): boolean; - - /** Possibly generate a memoised identifier if it is not static and has consequences. */ - maybeGenerateMemoised(node: Node, dontPush?: boolean): t.Identifier; - - checkBlockScopedCollisions(local: Node, kind: string, name: string, id: object): void; - - rename(oldName: string, newName?: string, block?: Node): void; - - dump(): void; - - toArray(node: Node, i?: number): Node; - - registerDeclaration(path: NodePath): void; - - buildUndefinedNode(): Node; - - registerConstantViolation(path: NodePath): void; - - registerBinding(kind: string, path: NodePath, bindingPath?: NodePath): void; - - addGlobal(node: Node): void; - - hasUid(name: string): boolean; - - hasGlobal(name: string): boolean; - - hasReference(name: string): boolean; - - isPure(node: Node, constantsOnly?: boolean): boolean; - - setData(key: string, val: any): any; - - getData(key: string): any; - - removeData(key: string): void; - - push(opts: { - id: t.LVal, - init?: t.Expression, - unique?: boolean, - kind?: "var" | "let" | "const", - }): void; - - getProgramParent(): Scope; - - getFunctionParent(): Scope | null; - - getBlockParent(): Scope; - - /** Walks the scope tree and gathers **all** bindings. */ - getAllBindings(...kinds: string[]): object; - - bindingIdentifierEquals(name: string, node: Node): boolean; - - getBinding(name: string): Binding | undefined; - - getOwnBinding(name: string): Binding | undefined; - - getBindingIdentifier(name: string): t.Identifier; - - getOwnBindingIdentifier(name: string): t.Identifier; - - hasOwnBinding(name: string): boolean; - - hasBinding(name: string, noGlobals?: boolean): boolean; - - parentHasBinding(name: string, noGlobals?: boolean): boolean; - - /** Move a binding of `name` to another `scope`. */ - moveBindingTo(name: string, scope: Scope): void; - - removeOwnBinding(name: string): void; - - removeBinding(name: string): void; -} - -export class Binding { - constructor(opts: { existing: Binding; identifier: t.Identifier; scope: Scope; path: NodePath; kind: "var" | "let" | "const"; }); - identifier: t.Identifier; - scope: Scope; - path: NodePath; - kind: "var" | "let" | "const" | "module"; - referenced: boolean; - references: number; - referencePaths: NodePath[]; - constant: boolean; - constantViolations: NodePath[]; -} - -export type Visitor = VisitNodeObject & { - [Type in Node["type"]]?: VisitNode>; -} & { - [K in keyof t.Aliases]?: VisitNode -}; - -export type VisitNode = VisitNodeFunction | VisitNodeObject; - -export type VisitNodeFunction = (this: S, path: NodePath

, state: S) => void; - -export interface VisitNodeObject { - enter?: VisitNodeFunction; - exit?: VisitNodeFunction; -} - -export class NodePath { - constructor(hub: Hub, parent: Node); - parent: Node; - hub: Hub; - contexts: TraversalContext[]; - data: object; - shouldSkip: boolean; - shouldStop: boolean; - removed: boolean; - state: any; - opts: object; - skipKeys: object; - parentPath: NodePath; - context: TraversalContext; - container: object | object[]; - listKey: string; - inList: boolean; - parentKey: string; - key: string | number; - node: T; - scope: Scope; - type: T extends undefined | null ? string | null : string; - typeAnnotation: object; - - getScope(scope: Scope): Scope; - - setData(key: string, val: any): any; - - getData(key: string, def?: any): any; - - buildCodeFrameError(msg: string, Error?: new (msg: string) => TError): TError; - - traverse(visitor: Visitor, state: T): void; - traverse(visitor: Visitor): void; - - set(key: string, node: Node): void; - - getPathLocation(): string; - - // Example: https://github.com/babel/babel/blob/63204ae51e020d84a5b246312f5eeb4d981ab952/packages/babel-traverse/src/path/modification.js#L83 - debug(buildMessage: () => string): void; - - // ------------------------- ancestry ------------------------- - /** - * Call the provided `callback` with the `NodePath`s of all the parents. - * When the `callback` returns a truthy value, we return that node path. - */ - findParent(callback: (path: NodePath) => boolean): NodePath; - - find(callback: (path: NodePath) => boolean): NodePath; - - /** Get the parent function of the current path. */ - getFunctionParent(): NodePath; - - /** Walk up the tree until we hit a parent node path in a list. */ - getStatementParent(): NodePath; - - /** - * Get the deepest common ancestor and then from it, get the earliest relationship path - * to that ancestor. - * - * Earliest is defined as being "before" all the other nodes in terms of list container - * position and visiting key. - */ - getEarliestCommonAncestorFrom(paths: NodePath[]): NodePath[]; - - /** Get the earliest path in the tree where the provided `paths` intersect. */ - getDeepestCommonAncestorFrom( - paths: NodePath[], - filter?: (deepest: Node, i: number, ancestries: NodePath[]) => NodePath - ): NodePath; - - /** - * Build an array of node paths containing the entire ancestry of the current node path. - * - * NOTE: The current node path is included in this. - */ - getAncestry(): NodePath[]; - - inType(...candidateTypes: string[]): boolean; - - // ------------------------- inference ------------------------- - /** Infer the type of the current `NodePath`. */ - getTypeAnnotation(): t.FlowType; - - isBaseType(baseName: string, soft?: boolean): boolean; - - couldBeBaseType(name: string): boolean; - - baseTypeStrictlyMatches(right: NodePath): boolean; - - isGenericType(genericName: string): boolean; - - // ------------------------- replacement ------------------------- - /** - * Replace a node with an array of multiple. This method performs the following steps: - * - * - Inherit the comments of first provided node with that of the current node. - * - Insert the provided nodes after the current node. - * - Remove the current node. - */ - replaceWithMultiple(nodes: Node[]): void; - - /** - * Parse a string as an expression and replace the current node with the result. - * - * NOTE: This is typically not a good idea to use. Building source strings when - * transforming ASTs is an antipattern and SHOULD NOT be encouraged. Even if it's - * easier to use, your transforms will be extremely brittle. - */ - replaceWithSourceString(replacement: any): void; - - /** Replace the current node with another. */ - replaceWith(replacement: Node | NodePath): void; - - /** - * This method takes an array of statements nodes and then explodes it - * into expressions. This method retains completion records which is - * extremely important to retain original semantics. - */ - replaceExpressionWithStatements(nodes: Node[]): Node; - - replaceInline(nodes: Node | Node[]): void; - - // ------------------------- evaluation ------------------------- - /** - * Walk the input `node` and statically evaluate if it's truthy. - * - * Returning `true` when we're sure that the expression will evaluate to a - * truthy value, `false` if we're sure that it will evaluate to a falsy - * value and `undefined` if we aren't sure. Because of this please do not - * rely on coercion when using this method and check with === if it's false. - */ - evaluateTruthy(): boolean; - - /** - * Walk the input `node` and statically evaluate it. - * - * Returns an object in the form `{ confident, value }`. `confident` indicates - * whether or not we had to drop out of evaluating the expression because of - * hitting an unknown node that we couldn't confidently find the value of. - * - * Example: - * - * t.evaluate(parse("5 + 5")) // { confident: true, value: 10 } - * t.evaluate(parse("!true")) // { confident: true, value: false } - * t.evaluate(parse("foo + foo")) // { confident: false, value: undefined } - */ - evaluate(): { confident: boolean; value: any }; - - // ------------------------- introspection ------------------------- - /** - * Match the current node if it matches the provided `pattern`. - * - * For example, given the match `React.createClass` it would match the - * parsed nodes of `React.createClass` and `React["createClass"]`. - */ - matchesPattern(pattern: string, allowPartial?: boolean): boolean; - - /** - * Check whether we have the input `key`. If the `key` references an array then we check - * if the array has any items, otherwise we just check if it's falsy. - */ - has(key: string): boolean; - - isStatic(): boolean; - - /** Alias of `has`. */ - is(key: string): boolean; - - /** Opposite of `has`. */ - isnt(key: string): boolean; - - /** Check whether the path node `key` strict equals `value`. */ - equals(key: string, value: any): boolean; - - /** - * Check the type against our stored internal type of the node. This is handy when a node has - * been removed yet we still internally know the type and need it to calculate node replacement. - */ - isNodeType(type: string): boolean; - - /** - * This checks whether or not we're in one of the following positions: - * - * for (KEY in right); - * for (KEY;;); - * - * This is because these spots allow VariableDeclarations AND normal expressions so we need - * to tell the path replacement that it's ok to replace this with an expression. - */ - canHaveVariableDeclarationOrExpression(): boolean; - - /** - * This checks whether we are swapping an arrow function's body between an - * expression and a block statement (or vice versa). - * - * This is because arrow functions may implicitly return an expression, which - * is the same as containing a block statement. - */ - canSwapBetweenExpressionAndStatement(replacement: Node): boolean; - - /** Check whether the current path references a completion record */ - isCompletionRecord(allowInsideFunction?: boolean): boolean; - - /** - * Check whether or not the current `key` allows either a single statement or block statement - * so we can explode it if necessary. - */ - isStatementOrBlock(): boolean; - - /** Check if the currently assigned path references the `importName` of `moduleSource`. */ - referencesImport(moduleSource: string, importName: string): boolean; - - /** Get the source code associated with this node. */ - getSource(): string; - - /** Check if the current path will maybe execute before another path */ - willIMaybeExecuteBefore(path: NodePath): boolean; - - // ------------------------- context ------------------------- - call(key: string): boolean; - - isBlacklisted(): boolean; - - visit(): boolean; - - skip(): void; - - skipKey(key: string): void; - - stop(): void; - - setScope(): void; - - setContext(context: TraversalContext): NodePath; - - popContext(): void; - - pushContext(context: TraversalContext): void; - - // ------------------------- removal ------------------------- - remove(): void; - - // ------------------------- modification ------------------------- - /** Insert the provided nodes before the current one. */ - insertBefore(nodes: Node | Node[]): any; - - /** - * Insert the provided nodes after the current one. When inserting nodes after an - * expression, ensure that the completion record is correct by pushing the current node. - */ - insertAfter(nodes: Node | Node[]): any; - - /** Update all sibling node paths after `fromIndex` by `incrementBy`. */ - updateSiblingKeys(fromIndex: number, incrementBy: number): void; - - /** Hoist the current node to the highest scope possible and return a UID referencing it. */ - hoist(scope: Scope): void; - - // ------------------------- family ------------------------- - getOpposite(): NodePath; - - getCompletionRecords(): NodePath[]; - - getSibling(key: string | number): NodePath; - getAllPrevSiblings(): NodePath[]; - getAllNextSiblings(): NodePath[]; - - get(key: K, context?: boolean | TraversalContext): - T[K] extends Array ? Array> : - T[K] extends Node | null | undefined ? NodePath : - never; - get(key: string, context?: boolean | TraversalContext): NodePath | NodePath[]; - - getBindingIdentifiers(duplicates?: boolean): Node[]; - - getOuterBindingIdentifiers(duplicates?: boolean): Node[]; - - // ------------------------- comments ------------------------- - /** Share comments amongst siblings. */ - shareCommentsWithSiblings(): void; - - addComment(type: string, content: string, line?: boolean): void; - - /** Give node `comments` of the specified `type`. */ - addComments(type: string, comments: any[]): void; - - // ------------------------- isXXX ------------------------- - isArrayExpression(opts?: object): this is NodePath; - isAssignmentExpression(opts?: object): this is NodePath; - isBinaryExpression(opts?: object): this is NodePath; - isDirective(opts?: object): this is NodePath; - isDirectiveLiteral(opts?: object): this is NodePath; - isBlockStatement(opts?: object): this is NodePath; - isBreakStatement(opts?: object): this is NodePath; - isCallExpression(opts?: object): this is NodePath; - isCatchClause(opts?: object): this is NodePath; - isConditionalExpression(opts?: object): this is NodePath; - isContinueStatement(opts?: object): this is NodePath; - isDebuggerStatement(opts?: object): this is NodePath; - isDoWhileStatement(opts?: object): this is NodePath; - isEmptyStatement(opts?: object): this is NodePath; - isExpressionStatement(opts?: object): this is NodePath; - isFile(opts?: object): this is NodePath; - isForInStatement(opts?: object): this is NodePath; - isForStatement(opts?: object): this is NodePath; - isFunctionDeclaration(opts?: object): this is NodePath; - isFunctionExpression(opts?: object): this is NodePath; - isIdentifier(opts?: object): this is NodePath; - isIfStatement(opts?: object): this is NodePath; - isLabeledStatement(opts?: object): this is NodePath; - isStringLiteral(opts?: object): this is NodePath; - isNumericLiteral(opts?: object): this is NodePath; - isNullLiteral(opts?: object): this is NodePath; - isBooleanLiteral(opts?: object): this is NodePath; - isRegExpLiteral(opts?: object): this is NodePath; - isLogicalExpression(opts?: object): this is NodePath; - isMemberExpression(opts?: object): this is NodePath; - isNewExpression(opts?: object): this is NodePath; - isProgram(opts?: object): this is NodePath; - isObjectExpression(opts?: object): this is NodePath; - isObjectMethod(opts?: object): this is NodePath; - isObjectProperty(opts?: object): this is NodePath; - isRestElement(opts?: object): this is NodePath; - isReturnStatement(opts?: object): this is NodePath; - isSequenceExpression(opts?: object): this is NodePath; - isSwitchCase(opts?: object): this is NodePath; - isSwitchStatement(opts?: object): this is NodePath; - isThisExpression(opts?: object): this is NodePath; - isThrowStatement(opts?: object): this is NodePath; - isTryStatement(opts?: object): this is NodePath; - isUnaryExpression(opts?: object): this is NodePath; - isUpdateExpression(opts?: object): this is NodePath; - isVariableDeclaration(opts?: object): this is NodePath; - isVariableDeclarator(opts?: object): this is NodePath; - isWhileStatement(opts?: object): this is NodePath; - isWithStatement(opts?: object): this is NodePath; - isAssignmentPattern(opts?: object): this is NodePath; - isArrayPattern(opts?: object): this is NodePath; - isArrowFunctionExpression(opts?: object): this is NodePath; - isClassBody(opts?: object): this is NodePath; - isClassDeclaration(opts?: object): this is NodePath; - isClassExpression(opts?: object): this is NodePath; - isExportAllDeclaration(opts?: object): this is NodePath; - isExportDefaultDeclaration(opts?: object): this is NodePath; - isExportNamedDeclaration(opts?: object): this is NodePath; - isExportSpecifier(opts?: object): this is NodePath; - isForOfStatement(opts?: object): this is NodePath; - isImportDeclaration(opts?: object): this is NodePath; - isImportDefaultSpecifier(opts?: object): this is NodePath; - isImportNamespaceSpecifier(opts?: object): this is NodePath; - isImportSpecifier(opts?: object): this is NodePath; - isMetaProperty(opts?: object): this is NodePath; - isClassMethod(opts?: object): this is NodePath; - isObjectPattern(opts?: object): this is NodePath; - isSpreadElement(opts?: object): this is NodePath; - isSuper(opts?: object): this is NodePath; - isTaggedTemplateExpression(opts?: object): this is NodePath; - isTemplateElement(opts?: object): this is NodePath; - isTemplateLiteral(opts?: object): this is NodePath; - isYieldExpression(opts?: object): this is NodePath; - isAnyTypeAnnotation(opts?: object): this is NodePath; - isArrayTypeAnnotation(opts?: object): this is NodePath; - isBooleanTypeAnnotation(opts?: object): this is NodePath; - isBooleanLiteralTypeAnnotation(opts?: object): this is NodePath; - isNullLiteralTypeAnnotation(opts?: object): this is NodePath; - isClassImplements(opts?: object): this is NodePath; - isClassProperty(opts?: object): this is NodePath; - isDeclareClass(opts?: object): this is NodePath; - isDeclareFunction(opts?: object): this is NodePath; - isDeclareInterface(opts?: object): this is NodePath; - isDeclareModule(opts?: object): this is NodePath; - isDeclareTypeAlias(opts?: object): this is NodePath; - isDeclareVariable(opts?: object): this is NodePath; - isFunctionTypeAnnotation(opts?: object): this is NodePath; - isFunctionTypeParam(opts?: object): this is NodePath; - isGenericTypeAnnotation(opts?: object): this is NodePath; - isInterfaceExtends(opts?: object): this is NodePath; - isInterfaceDeclaration(opts?: object): this is NodePath; - isIntersectionTypeAnnotation(opts?: object): this is NodePath; - isMixedTypeAnnotation(opts?: object): this is NodePath; - isNullableTypeAnnotation(opts?: object): this is NodePath; - isNumberTypeAnnotation(opts?: object): this is NodePath; - isStringLiteralTypeAnnotation(opts?: object): this is NodePath; - isStringTypeAnnotation(opts?: object): this is NodePath; - isThisTypeAnnotation(opts?: object): this is NodePath; - isTupleTypeAnnotation(opts?: object): this is NodePath; - isTypeofTypeAnnotation(opts?: object): this is NodePath; - isTypeAlias(opts?: object): this is NodePath; - isTypeAnnotation(opts?: object): this is NodePath; - isTypeCastExpression(opts?: object): this is NodePath; - isTypeParameterDeclaration(opts?: object): this is NodePath; - isTypeParameterInstantiation(opts?: object): this is NodePath; - isObjectTypeAnnotation(opts?: object): this is NodePath; - isObjectTypeCallProperty(opts?: object): this is NodePath; - isObjectTypeIndexer(opts?: object): this is NodePath; - isObjectTypeProperty(opts?: object): this is NodePath; - isQualifiedTypeIdentifier(opts?: object): this is NodePath; - isUnionTypeAnnotation(opts?: object): this is NodePath; - isVoidTypeAnnotation(opts?: object): this is NodePath; - isJSXAttribute(opts?: object): this is NodePath; - isJSXClosingElement(opts?: object): this is NodePath; - isJSXElement(opts?: object): this is NodePath; - isJSXEmptyExpression(opts?: object): this is NodePath; - isJSXExpressionContainer(opts?: object): this is NodePath; - isJSXIdentifier(opts?: object): this is NodePath; - isJSXMemberExpression(opts?: object): this is NodePath; - isJSXNamespacedName(opts?: object): this is NodePath; - isJSXOpeningElement(opts?: object): this is NodePath; - isJSXSpreadAttribute(opts?: object): this is NodePath; - isJSXText(opts?: object): this is NodePath; - isNoop(opts?: object): this is NodePath; - isParenthesizedExpression(opts?: object): this is NodePath; - isAwaitExpression(opts?: object): this is NodePath; - isBindExpression(opts?: object): this is NodePath; - isDecorator(opts?: object): this is NodePath; - isDoExpression(opts?: object): this is NodePath; - isExportDefaultSpecifier(opts?: object): this is NodePath; - isExportNamespaceSpecifier(opts?: object): this is NodePath; - isRestProperty(opts?: object): this is NodePath; - isSpreadProperty(opts?: object): this is NodePath; - isExpression(opts?: object): this is NodePath; - isBinary(opts?: object): this is NodePath; - isScopable(opts?: object): this is NodePath; - isBlockParent(opts?: object): this is NodePath; - isBlock(opts?: object): this is NodePath; - isStatement(opts?: object): this is NodePath; - isTerminatorless(opts?: object): this is NodePath; - isCompletionStatement(opts?: object): this is NodePath; - isConditional(opts?: object): this is NodePath; - isLoop(opts?: object): this is NodePath; - isWhile(opts?: object): this is NodePath; - isExpressionWrapper(opts?: object): this is NodePath; - isFor(opts?: object): this is NodePath; - isForXStatement(opts?: object): this is NodePath; - isFunction(opts?: object): this is NodePath; - isFunctionParent(opts?: object): this is NodePath; - isPureish(opts?: object): this is NodePath; - isDeclaration(opts?: object): this is NodePath; - isLVal(opts?: object): this is NodePath; - isLiteral(opts?: object): this is NodePath; - isImmutable(opts?: object): this is NodePath; - isUserWhitespacable(opts?: object): this is NodePath; - isMethod(opts?: object): this is NodePath; - isObjectMember(opts?: object): this is NodePath; - isProperty(opts?: object): this is NodePath; - isUnaryLike(opts?: object): this is NodePath; - isPattern(opts?: object): this is NodePath; - isClass(opts?: object): this is NodePath; - isModuleDeclaration(opts?: object): this is NodePath; - isExportDeclaration(opts?: object): this is NodePath; - isModuleSpecifier(opts?: object): this is NodePath; - isFlow(opts?: object): this is NodePath; - isFlowBaseAnnotation(opts?: object): this is NodePath; - isFlowDeclaration(opts?: object): this is NodePath; - isJSX(opts?: object): this is NodePath; - isNumberLiteral(opts?: object): this is NodePath; - isRegexLiteral(opts?: object): this is NodePath; - isReferencedIdentifier(opts?: object): this is NodePath; - isReferencedMemberExpression(opts?: object): this is NodePath; - isBindingIdentifier(opts?: object): this is NodePath; - isScope(opts?: object): this is NodePath; - isReferenced(opts?: object): boolean; - isBlockScoped(opts?: object): this is NodePath; - isVar(opts?: object): this is NodePath; - isUser(opts?: object): boolean; - isGenerated(opts?: object): boolean; - isPure(opts?: object): boolean; - - // ------------------------- assertXXX ------------------------- - assertArrayExpression(opts?: object): void; - assertAssignmentExpression(opts?: object): void; - assertBinaryExpression(opts?: object): void; - assertDirective(opts?: object): void; - assertDirectiveLiteral(opts?: object): void; - assertBlockStatement(opts?: object): void; - assertBreakStatement(opts?: object): void; - assertCallExpression(opts?: object): void; - assertCatchClause(opts?: object): void; - assertConditionalExpression(opts?: object): void; - assertContinueStatement(opts?: object): void; - assertDebuggerStatement(opts?: object): void; - assertDoWhileStatement(opts?: object): void; - assertEmptyStatement(opts?: object): void; - assertExpressionStatement(opts?: object): void; - assertFile(opts?: object): void; - assertForInStatement(opts?: object): void; - assertForStatement(opts?: object): void; - assertFunctionDeclaration(opts?: object): void; - assertFunctionExpression(opts?: object): void; - assertIdentifier(opts?: object): void; - assertIfStatement(opts?: object): void; - assertLabeledStatement(opts?: object): void; - assertStringLiteral(opts?: object): void; - assertNumericLiteral(opts?: object): void; - assertNullLiteral(opts?: object): void; - assertBooleanLiteral(opts?: object): void; - assertRegExpLiteral(opts?: object): void; - assertLogicalExpression(opts?: object): void; - assertMemberExpression(opts?: object): void; - assertNewExpression(opts?: object): void; - assertProgram(opts?: object): void; - assertObjectExpression(opts?: object): void; - assertObjectMethod(opts?: object): void; - assertObjectProperty(opts?: object): void; - assertRestElement(opts?: object): void; - assertReturnStatement(opts?: object): void; - assertSequenceExpression(opts?: object): void; - assertSwitchCase(opts?: object): void; - assertSwitchStatement(opts?: object): void; - assertThisExpression(opts?: object): void; - assertThrowStatement(opts?: object): void; - assertTryStatement(opts?: object): void; - assertUnaryExpression(opts?: object): void; - assertUpdateExpression(opts?: object): void; - assertVariableDeclaration(opts?: object): void; - assertVariableDeclarator(opts?: object): void; - assertWhileStatement(opts?: object): void; - assertWithStatement(opts?: object): void; - assertAssignmentPattern(opts?: object): void; - assertArrayPattern(opts?: object): void; - assertArrowFunctionExpression(opts?: object): void; - assertClassBody(opts?: object): void; - assertClassDeclaration(opts?: object): void; - assertClassExpression(opts?: object): void; - assertExportAllDeclaration(opts?: object): void; - assertExportDefaultDeclaration(opts?: object): void; - assertExportNamedDeclaration(opts?: object): void; - assertExportSpecifier(opts?: object): void; - assertForOfStatement(opts?: object): void; - assertImportDeclaration(opts?: object): void; - assertImportDefaultSpecifier(opts?: object): void; - assertImportNamespaceSpecifier(opts?: object): void; - assertImportSpecifier(opts?: object): void; - assertMetaProperty(opts?: object): void; - assertClassMethod(opts?: object): void; - assertObjectPattern(opts?: object): void; - assertSpreadElement(opts?: object): void; - assertSuper(opts?: object): void; - assertTaggedTemplateExpression(opts?: object): void; - assertTemplateElement(opts?: object): void; - assertTemplateLiteral(opts?: object): void; - assertYieldExpression(opts?: object): void; - assertAnyTypeAnnotation(opts?: object): void; - assertArrayTypeAnnotation(opts?: object): void; - assertBooleanTypeAnnotation(opts?: object): void; - assertBooleanLiteralTypeAnnotation(opts?: object): void; - assertNullLiteralTypeAnnotation(opts?: object): void; - assertClassImplements(opts?: object): void; - assertClassProperty(opts?: object): void; - assertDeclareClass(opts?: object): void; - assertDeclareFunction(opts?: object): void; - assertDeclareInterface(opts?: object): void; - assertDeclareModule(opts?: object): void; - assertDeclareTypeAlias(opts?: object): void; - assertDeclareVariable(opts?: object): void; - assertExistentialTypeParam(opts?: object): void; - assertFunctionTypeAnnotation(opts?: object): void; - assertFunctionTypeParam(opts?: object): void; - assertGenericTypeAnnotation(opts?: object): void; - assertInterfaceExtends(opts?: object): void; - assertInterfaceDeclaration(opts?: object): void; - assertIntersectionTypeAnnotation(opts?: object): void; - assertMixedTypeAnnotation(opts?: object): void; - assertNullableTypeAnnotation(opts?: object): void; - assertNumericLiteralTypeAnnotation(opts?: object): void; - assertNumberTypeAnnotation(opts?: object): void; - assertStringLiteralTypeAnnotation(opts?: object): void; - assertStringTypeAnnotation(opts?: object): void; - assertThisTypeAnnotation(opts?: object): void; - assertTupleTypeAnnotation(opts?: object): void; - assertTypeofTypeAnnotation(opts?: object): void; - assertTypeAlias(opts?: object): void; - assertTypeAnnotation(opts?: object): void; - assertTypeCastExpression(opts?: object): void; - assertTypeParameterDeclaration(opts?: object): void; - assertTypeParameterInstantiation(opts?: object): void; - assertObjectTypeAnnotation(opts?: object): void; - assertObjectTypeCallProperty(opts?: object): void; - assertObjectTypeIndexer(opts?: object): void; - assertObjectTypeProperty(opts?: object): void; - assertQualifiedTypeIdentifier(opts?: object): void; - assertUnionTypeAnnotation(opts?: object): void; - assertVoidTypeAnnotation(opts?: object): void; - assertJSXAttribute(opts?: object): void; - assertJSXClosingElement(opts?: object): void; - assertJSXElement(opts?: object): void; - assertJSXEmptyExpression(opts?: object): void; - assertJSXExpressionContainer(opts?: object): void; - assertJSXIdentifier(opts?: object): void; - assertJSXMemberExpression(opts?: object): void; - assertJSXNamespacedName(opts?: object): void; - assertJSXOpeningElement(opts?: object): void; - assertJSXSpreadAttribute(opts?: object): void; - assertJSXText(opts?: object): void; - assertNoop(opts?: object): void; - assertParenthesizedExpression(opts?: object): void; - assertAwaitExpression(opts?: object): void; - assertBindExpression(opts?: object): void; - assertDecorator(opts?: object): void; - assertDoExpression(opts?: object): void; - assertExportDefaultSpecifier(opts?: object): void; - assertExportNamespaceSpecifier(opts?: object): void; - assertRestProperty(opts?: object): void; - assertSpreadProperty(opts?: object): void; - assertExpression(opts?: object): void; - assertBinary(opts?: object): void; - assertScopable(opts?: object): void; - assertBlockParent(opts?: object): void; - assertBlock(opts?: object): void; - assertStatement(opts?: object): void; - assertTerminatorless(opts?: object): void; - assertCompletionStatement(opts?: object): void; - assertConditional(opts?: object): void; - assertLoop(opts?: object): void; - assertWhile(opts?: object): void; - assertExpressionWrapper(opts?: object): void; - assertFor(opts?: object): void; - assertForXStatement(opts?: object): void; - assertFunction(opts?: object): void; - assertFunctionParent(opts?: object): void; - assertPureish(opts?: object): void; - assertDeclaration(opts?: object): void; - assertLVal(opts?: object): void; - assertLiteral(opts?: object): void; - assertImmutable(opts?: object): void; - assertUserWhitespacable(opts?: object): void; - assertMethod(opts?: object): void; - assertObjectMember(opts?: object): void; - assertProperty(opts?: object): void; - assertUnaryLike(opts?: object): void; - assertPattern(opts?: object): void; - assertClass(opts?: object): void; - assertModuleDeclaration(opts?: object): void; - assertExportDeclaration(opts?: object): void; - assertModuleSpecifier(opts?: object): void; - assertFlow(opts?: object): void; - assertFlowBaseAnnotation(opts?: object): void; - assertFlowDeclaration(opts?: object): void; - assertJSX(opts?: object): void; - assertNumberLiteral(opts?: object): void; - assertRegexLiteral(opts?: object): void; -} - -export class Hub { - constructor(file: any, options: any); - file: any; - options: any; -} - -export interface TraversalContext { - parentPath: NodePath; - scope: Scope; - state: any; - opts: any; -} diff --git a/node_modules/@types/babel__traverse/package.json b/node_modules/@types/babel__traverse/package.json deleted file mode 100644 index 4ba94764..00000000 --- a/node_modules/@types/babel__traverse/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "_args": [ - [ - "@types/babel__traverse@7.0.7", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@types/babel__traverse@7.0.7", - "_id": "@types/babel__traverse@7.0.7", - "_inBundle": false, - "_integrity": "sha512-CeBpmX1J8kWLcDEnI3Cl2Eo6RfbGvzUctA+CjZUhOKDFbLfcr7fc4usEqLNWetrlJd7RhAkyYe2czXop4fICpw==", - "_location": "/@types/babel__traverse", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/babel__traverse@7.0.7", - "name": "@types/babel__traverse", - "escapedName": "@types%2fbabel__traverse", - "scope": "@types", - "rawSpec": "7.0.7", - "saveSpec": null, - "fetchSpec": "7.0.7" - }, - "_requiredBy": [ - "/@types/babel__core", - "/babel-plugin-jest-hoist" - ], - "_resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.7.tgz", - "_spec": "7.0.7", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "Troy Gerwien", - "url": "https://github.com/yortus" - }, - { - "name": "Marvin Hagemeister", - "url": "https://github.com/marvinhagemeister" - }, - { - "name": "Ryan Petrich", - "url": "https://github.com/rpetrich" - }, - { - "name": "Melvin Groenhoff", - "url": "https://github.com/mgroenhoff" - } - ], - "dependencies": { - "@babel/types": "^7.3.0" - }, - "description": "TypeScript definitions for @babel/traverse", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/babel__traverse", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/babel__traverse" - }, - "scripts": {}, - "typeScriptVersion": "2.9", - "types": "index", - "typesPublisherContentHash": "37e6c080b57f5b07ab86b0af01352617892a3cd9fc9db8bd3c69fa0610672457", - "version": "7.0.7" -} diff --git a/node_modules/@types/istanbul-lib-coverage/LICENSE b/node_modules/@types/istanbul-lib-coverage/LICENSE deleted file mode 100644 index 21071075..00000000 --- a/node_modules/@types/istanbul-lib-coverage/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - 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/@types/istanbul-lib-coverage/README.md b/node_modules/@types/istanbul-lib-coverage/README.md deleted file mode 100644 index dc9fbbc7..00000000 --- a/node_modules/@types/istanbul-lib-coverage/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/istanbul-lib-coverage` - -# Summary -This package contains type definitions for istanbul-lib-coverage ( https://istanbul.js.org ). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-lib-coverage - -Additional Details - * Last updated: Thu, 25 Apr 2019 23:07:43 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by Jason Cheatham , Lorenzo Rapetti . diff --git a/node_modules/@types/istanbul-lib-coverage/index.d.ts b/node_modules/@types/istanbul-lib-coverage/index.d.ts deleted file mode 100644 index fc8a8ded..00000000 --- a/node_modules/@types/istanbul-lib-coverage/index.d.ts +++ /dev/null @@ -1,118 +0,0 @@ -// Type definitions for istanbul-lib-coverage 2.0 -// Project: https://istanbul.js.org, https://github.com/istanbuljs/istanbuljs -// Definitions by: Jason Cheatham -// Lorenzo Rapetti -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 - -export interface CoverageSummaryData { - lines: Totals; - statements: Totals; - branches: Totals; - functions: Totals; -} - -export class CoverageSummary { - constructor(data: CoverageSummary | CoverageSummaryData); - merge(obj: CoverageSummary): CoverageSummary; - toJSON(): CoverageSummaryData; - isEmpty(): boolean; - data: CoverageSummaryData; - lines: Totals; - statements: Totals; - branches: Totals; - functions: Totals; -} - -export interface CoverageMapData { - [key: string]: FileCoverage; -} - -export class CoverageMap { - constructor(data: CoverageMapData | CoverageMap); - addFileCoverage(pathOrObject: string | FileCoverage | FileCoverageData): void; - files(): string[]; - fileCoverageFor(filename: string): FileCoverage; - filter(callback: (key: string) => boolean): void; - getCoverageSummary(): CoverageSummary; - merge(data: CoverageMapData | CoverageMap): void; - toJSON(): CoverageMapData; - data: CoverageMapData; -} - -export interface Location { - line: number; - column: number; -} - -export interface Range { - start: Location; - end: Location; -} - -export interface BranchMapping { - loc: Range; - type: string; - locations: Range[]; - line: number; -} - -export interface FunctionMapping { - name: string; - decl: Range; - loc: Range; - line: number; -} - -export interface FileCoverageData { - path: string; - statementMap: { [key: string]: Range }; - fnMap: { [key: string]: FunctionMapping }; - branchMap: { [key: string]: BranchMapping }; - s: { [key: string]: number }; - f: { [key: string]: number }; - b: { [key: string]: number[] }; -} - -export interface Totals { - total: number; - covered: number; - skipped: number; - pct: number; -} - -export interface Coverage { - covered: number; - total: number; - coverage: number; -} - -export class FileCoverage implements FileCoverageData { - constructor(data: string | FileCoverage | FileCoverageData); - merge(other: FileCoverageData): void; - getBranchCoverageByLine(): { [line: number]: Coverage }; - getLineCoverage(): { [line: number]: number }; - getUncoveredLines(): number[]; - resetHits(): void; - computeBranchTotals(): Totals; - computeSimpleTotals(): Totals; - toSummary(): CoverageSummary; - toJSON(): object; - - data: FileCoverageData; - path: string; - statementMap: { [key: string]: Range }; - fnMap: { [key: string]: FunctionMapping }; - branchMap: { [key: string]: BranchMapping }; - s: { [key: string]: number }; - f: { [key: string]: number }; - b: { [key: string]: number[] }; -} - -export const classes: { - FileCoverage: FileCoverage; -}; - -export function createCoverageMap(data?: CoverageMap | CoverageMapData): CoverageMap; -export function createCoverageSummary(obj?: CoverageSummary | CoverageSummaryData): CoverageSummary; -export function createFileCoverage(pathOrObject: string | FileCoverage | FileCoverageData): FileCoverage; diff --git a/node_modules/@types/istanbul-lib-coverage/package.json b/node_modules/@types/istanbul-lib-coverage/package.json deleted file mode 100644 index 832f9a76..00000000 --- a/node_modules/@types/istanbul-lib-coverage/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_args": [ - [ - "@types/istanbul-lib-coverage@2.0.1", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@types/istanbul-lib-coverage@2.0.1", - "_id": "@types/istanbul-lib-coverage@2.0.1", - "_inBundle": false, - "_integrity": "sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg==", - "_location": "/@types/istanbul-lib-coverage", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/istanbul-lib-coverage@2.0.1", - "name": "@types/istanbul-lib-coverage", - "escapedName": "@types%2fistanbul-lib-coverage", - "scope": "@types", - "rawSpec": "2.0.1", - "saveSpec": null, - "fetchSpec": "2.0.1" - }, - "_requiredBy": [ - "/@jest/test-result", - "/@jest/types", - "/@types/istanbul-lib-report", - "/@types/istanbul-reports" - ], - "_resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", - "_spec": "2.0.1", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "Jason Cheatham", - "url": "https://github.com/jason0x43" - }, - { - "name": "Lorenzo Rapetti", - "url": "https://github.com/loryman" - } - ], - "dependencies": {}, - "description": "TypeScript definitions for istanbul-lib-coverage", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/istanbul-lib-coverage", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/istanbul-lib-coverage" - }, - "scripts": {}, - "typeScriptVersion": "2.4", - "types": "index", - "typesPublisherContentHash": "fb2cf9603945473dc60dede8472e884daa070938a01b09aa816ca0cc979213ba", - "version": "2.0.1" -} diff --git a/node_modules/@types/istanbul-lib-report/LICENSE b/node_modules/@types/istanbul-lib-report/LICENSE deleted file mode 100644 index 21071075..00000000 --- a/node_modules/@types/istanbul-lib-report/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - 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/@types/istanbul-lib-report/README.md b/node_modules/@types/istanbul-lib-report/README.md deleted file mode 100644 index 77556639..00000000 --- a/node_modules/@types/istanbul-lib-report/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/istanbul-lib-report` - -# Summary -This package contains type definitions for istanbul-lib-report ( https://istanbul.js.org ). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-lib-report - -Additional Details - * Last updated: Thu, 25 Apr 2019 23:07:44 GMT - * Dependencies: @types/istanbul-lib-coverage - * Global values: none - -# Credits -These definitions were written by Jason Cheatham . diff --git a/node_modules/@types/istanbul-lib-report/index.d.ts b/node_modules/@types/istanbul-lib-report/index.d.ts deleted file mode 100644 index 9dcb5bff..00000000 --- a/node_modules/@types/istanbul-lib-report/index.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -// Type definitions for istanbul-lib-report 1.1 -// Project: https://istanbul.js.org, https://github.com/istanbuljs/istanbuljs -// Definitions by: Jason Cheatham -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 - -import { CoverageMap, FileCoverage, CoverageSummary } from 'istanbul-lib-coverage'; - -export function createContext(options?: Partial): Context; -export function getDefaultWatermarks(): Watermarks; - -export const summarizers: { - flat(coverageMap: CoverageMap): Tree; - nested(coverageMap: CoverageMap): Tree; - pkg(coverageMap: CoverageMap): Tree; -}; - -export interface ContextOptions { - dir: string; - watermarks: Watermarks; - sourceFinder(filepath: string): string; -} - -export interface Context extends ContextOptions { - data: any; - writer: FileWriter; -} - -export interface ContentWriter { - write(str: string): void; - colorize(str: string, cls?: string): string; - println(str: string): void; - close(): void; -} - -export interface FileWriter { - writeForDir(subdir: string): FileWriter; - copyFile(source: string, dest: string): void; - writeFile(file: string | null): ContentWriter; -} - -export interface Watermarks { - statements: number[]; - functions: number[]; - branches: number[]; - lines: number[]; -} - -export interface Node { - getQualifiedName(): string; - getRelativeName(): string; - isRoot(): boolean; - getParent(): Node; - getChildren(): Node[]; - isSummary(): boolean; - getCoverageSummary(filesOnly: boolean): CoverageSummary; - getFileCoverage(): FileCoverage; - visit(visitor: Visitor, state: any): void; -} - -export interface ReportNode extends Node { - path: string; - parent: ReportNode | null; - fileCoverage: FileCoverage; - children: ReportNode[]; - addChild(child: ReportNode): void; - asRelative(p: string): string; - visit(visitor: Visitor, state: any): void; -} - -export interface Visitor { - onStart(root: N, state: any): void; - onSummary(root: N, state: any): void; - onDetail(root: N, state: any): void; - onSummaryEnd(root: N, state: any): void; - onEnd(root: N, state: any): void; -} - -export interface Tree { - getRoot(): N; - visit(visitor: Partial>, state: any): void; -} diff --git a/node_modules/@types/istanbul-lib-report/package.json b/node_modules/@types/istanbul-lib-report/package.json deleted file mode 100644 index 64d441d0..00000000 --- a/node_modules/@types/istanbul-lib-report/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_args": [ - [ - "@types/istanbul-lib-report@1.1.1", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@types/istanbul-lib-report@1.1.1", - "_id": "@types/istanbul-lib-report@1.1.1", - "_inBundle": false, - "_integrity": "sha512-3BUTyMzbZa2DtDI2BkERNC6jJw2Mr2Y0oGI7mRxYNBPxppbtEK1F66u3bKwU2g+wxwWI7PAoRpJnOY1grJqzHg==", - "_location": "/@types/istanbul-lib-report", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/istanbul-lib-report@1.1.1", - "name": "@types/istanbul-lib-report", - "escapedName": "@types%2fistanbul-lib-report", - "scope": "@types", - "rawSpec": "1.1.1", - "saveSpec": null, - "fetchSpec": "1.1.1" - }, - "_requiredBy": [ - "/@types/istanbul-reports" - ], - "_resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz", - "_spec": "1.1.1", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "Jason Cheatham", - "url": "https://github.com/jason0x43" - } - ], - "dependencies": { - "@types/istanbul-lib-coverage": "*" - }, - "description": "TypeScript definitions for istanbul-lib-report", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/istanbul-lib-report", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/istanbul-lib-report" - }, - "scripts": {}, - "typeScriptVersion": "2.4", - "types": "index", - "typesPublisherContentHash": "64af305d196bdbb3cc44bc664daf0546df5c55bce234d53c29f97d0883da2f32", - "version": "1.1.1" -} diff --git a/node_modules/@types/istanbul-reports/LICENSE b/node_modules/@types/istanbul-reports/LICENSE deleted file mode 100644 index 21071075..00000000 --- a/node_modules/@types/istanbul-reports/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - 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/@types/istanbul-reports/README.md b/node_modules/@types/istanbul-reports/README.md deleted file mode 100644 index fddc1e35..00000000 --- a/node_modules/@types/istanbul-reports/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/istanbul-reports` - -# Summary -This package contains type definitions for istanbul-reports ( https://github.com/istanbuljs/istanbuljs ). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-reports - -Additional Details - * Last updated: Wed, 17 Apr 2019 17:14:08 GMT - * Dependencies: @types/istanbul-lib-report, @types/istanbul-lib-coverage - * Global values: none - -# Credits -These definitions were written by Jason Cheatham . diff --git a/node_modules/@types/istanbul-reports/index.d.ts b/node_modules/@types/istanbul-reports/index.d.ts deleted file mode 100644 index 85067ba4..00000000 --- a/node_modules/@types/istanbul-reports/index.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -// Type definitions for istanbul-reports 1.1 -// Project: https://github.com/istanbuljs/istanbuljs, https://istanbul.js.org -// Definitions by: Jason Cheatham -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.4 - -import { Context, Node, FileWriter, Visitor } from 'istanbul-lib-report'; -import { CoverageSummary } from 'istanbul-lib-coverage'; - -export function create( - name: T, - options?: Partial -): Visitor; - -export interface ReportOptions { - clover: RootedOptions; - cobertura: RootedOptions; - html: HtmlOptions; - json: Options; - 'json-summary': Options; - lcov: never; - lcovonly: Options; - none: RootedOptions; - teamcity: Options & { blockName: string }; - text: Options & { maxCols: number }; - 'text-lcov': Options; - 'text-summary': Options; -} - -export type ReportType = keyof ReportOptions; - -export interface Options { - file: string; -} - -export interface RootedOptions extends Options { - projectRoot: string; -} - -export interface HtmlOptions { - verbose: boolean; - linkMapper: LinkMapper; - subdir: string; -} - -export interface LinkMapper { - getPath(node: string | Node): string; - relativePath(source: string | Node, target: string | Node): string; - assetPath(node: Node, name: string): string; -} diff --git a/node_modules/@types/istanbul-reports/package.json b/node_modules/@types/istanbul-reports/package.json deleted file mode 100644 index b0e353a8..00000000 --- a/node_modules/@types/istanbul-reports/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "_args": [ - [ - "@types/istanbul-reports@1.1.1", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@types/istanbul-reports@1.1.1", - "_id": "@types/istanbul-reports@1.1.1", - "_inBundle": false, - "_integrity": "sha512-UpYjBi8xefVChsCoBpKShdxTllC9pwISirfoZsUa2AAdQg/Jd2KQGtSbw+ya7GPo7x/wAPlH6JBhKhAsXUEZNA==", - "_location": "/@types/istanbul-reports", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/istanbul-reports@1.1.1", - "name": "@types/istanbul-reports", - "escapedName": "@types%2fistanbul-reports", - "scope": "@types", - "rawSpec": "1.1.1", - "saveSpec": null, - "fetchSpec": "1.1.1" - }, - "_requiredBy": [ - "/@jest/types" - ], - "_resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-1.1.1.tgz", - "_spec": "1.1.1", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "Jason Cheatham", - "url": "https://github.com/jason0x43" - } - ], - "dependencies": { - "@types/istanbul-lib-coverage": "*", - "@types/istanbul-lib-report": "*" - }, - "description": "TypeScript definitions for istanbul-reports", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/istanbul-reports", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/istanbul-reports" - }, - "scripts": {}, - "typeScriptVersion": "2.4", - "types": "index", - "typesPublisherContentHash": "48ffb8b28b9f445ebd12c748ea4cf877e1b802bee7fa18c4392b793e84bfce5a", - "version": "1.1.1" -} diff --git a/node_modules/@types/jest-diff/LICENSE b/node_modules/@types/jest-diff/LICENSE deleted file mode 100644 index 21071075..00000000 --- a/node_modules/@types/jest-diff/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - 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/@types/jest-diff/README.md b/node_modules/@types/jest-diff/README.md deleted file mode 100644 index 3a05c7de..00000000 --- a/node_modules/@types/jest-diff/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/jest-diff` - -# Summary -This package contains type definitions for jest-diff ( https://github.com/facebook/jest/tree/master/packages/jest-diff ). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest-diff - -Additional Details - * Last updated: Wed, 13 Feb 2019 18:42:15 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by Alex Coles . diff --git a/node_modules/@types/jest-diff/index.d.ts b/node_modules/@types/jest-diff/index.d.ts deleted file mode 100644 index 022626ab..00000000 --- a/node_modules/@types/jest-diff/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -// Type definitions for jest-diff 20.0 -// Project: https://github.com/facebook/jest/tree/master/packages/jest-diff, https://github.com/facebook/jest -// Definitions by: Alex Coles -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 - -declare namespace diff { - interface DiffOptions { - aAnnotation?: string; - bAnnotation?: string; - expand?: boolean; - contextLines?: number; - } -} - -declare function diff(a: any, b: any, options?: diff.DiffOptions): string; - -export = diff; diff --git a/node_modules/@types/jest-diff/package.json b/node_modules/@types/jest-diff/package.json deleted file mode 100644 index 73a0813b..00000000 --- a/node_modules/@types/jest-diff/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "_args": [ - [ - "@types/jest-diff@20.0.1", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@types/jest-diff@20.0.1", - "_id": "@types/jest-diff@20.0.1", - "_inBundle": false, - "_integrity": "sha512-yALhelO3i0hqZwhjtcr6dYyaLoCHbAMshwtj6cGxTvHZAKXHsYGdff6E8EPw3xLKY0ELUTQ69Q1rQiJENnccMA==", - "_location": "/@types/jest-diff", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/jest-diff@20.0.1", - "name": "@types/jest-diff", - "escapedName": "@types%2fjest-diff", - "scope": "@types", - "rawSpec": "20.0.1", - "saveSpec": null, - "fetchSpec": "20.0.1" - }, - "_requiredBy": [ - "/@types/jest" - ], - "_resolved": "https://registry.npmjs.org/@types/jest-diff/-/jest-diff-20.0.1.tgz", - "_spec": "20.0.1", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "Alex Coles", - "url": "https://github.com/myabc" - } - ], - "dependencies": {}, - "description": "TypeScript definitions for jest-diff", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/jest-diff", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "typeScriptVersion": "2.2", - "types": "index", - "typesPublisherContentHash": "c870fcddd40540a283942f82f668244cf72de020fb0110ae019708cb06b19ce2", - "version": "20.0.1" -} diff --git a/node_modules/@types/jest/LICENSE b/node_modules/@types/jest/LICENSE deleted file mode 100644 index 21071075..00000000 --- a/node_modules/@types/jest/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - 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/@types/jest/README.md b/node_modules/@types/jest/README.md deleted file mode 100644 index 8764708c..00000000 --- a/node_modules/@types/jest/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Installation -> `npm install --save @types/jest` - -# Summary -This package contains type definitions for Jest (https://jestjs.io/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest - -Additional Details - * Last updated: Mon, 19 Aug 2019 17:36:40 GMT - * Dependencies: @types/jest-diff - * Global values: afterAll, afterEach, beforeAll, beforeEach, describe, expect, fail, fdescribe, fit, it, jasmine, jest, pending, spyOn, test, xdescribe, xit, xtest - -# Credits -These definitions were written by Asana (https://asana.com) -// Ivo Stratev , jwbay , Alexey Svetliakov , Alex Jover Morales , Allan Lukwago , Ika , Waseem Dahman , Jamie Mason , Douglas Duteil , Ahn , Josh Goldberg , Jeff Lau , Andrew Makarov , Martin Hochel , Sebastian Sebald , Andy , Antoine Brault , Jeroen Claassens , Gregor Stamać , ExE Boss , Alex Bolenok , and Mario Beltrán Alarcón . diff --git a/node_modules/@types/jest/index.d.ts b/node_modules/@types/jest/index.d.ts deleted file mode 100644 index db078995..00000000 --- a/node_modules/@types/jest/index.d.ts +++ /dev/null @@ -1,1848 +0,0 @@ -// Type definitions for Jest 24.0 -// Project: https://jestjs.io/ -// Definitions by: Asana (https://asana.com) -// Ivo Stratev -// jwbay -// Alexey Svetliakov -// Alex Jover Morales -// Allan Lukwago -// Ika -// Waseem Dahman -// Jamie Mason -// Douglas Duteil -// Ahn -// Josh Goldberg -// Jeff Lau -// Andrew Makarov -// Martin Hochel -// Sebastian Sebald -// Andy -// Antoine Brault -// Jeroen Claassens -// Gregor Stamać -// ExE Boss -// Alex Bolenok -// Mario Beltrán Alarcón -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 - -/// - -declare var beforeAll: jest.Lifecycle; -declare var beforeEach: jest.Lifecycle; -declare var afterAll: jest.Lifecycle; -declare var afterEach: jest.Lifecycle; -declare var describe: jest.Describe; -declare var fdescribe: jest.Describe; -declare var xdescribe: jest.Describe; -declare var it: jest.It; -declare var fit: jest.It; -declare var xit: jest.It; -declare var test: jest.It; -declare var xtest: jest.It; - -declare const expect: jest.Expect; - -interface NodeRequire { - /** - * Returns the actual module instead of a mock, bypassing all checks on - * whether the module should receive a mock implementation or not. - * - * @deprecated Use `jest.requireActual` instead. - */ - requireActual(moduleName: string): any; - /** - * Returns a mock module instead of the actual module, bypassing all checks - * on whether the module should be required normally or not. - * - * @deprecated Use `jest.requireMock`instead. - */ - requireMock(moduleName: string): any; -} - -declare namespace jest { - /** - * Provides a way to add Jasmine-compatible matchers into your Jest context. - */ - function addMatchers(matchers: jasmine.CustomMatcherFactories): typeof jest; - /** - * Disables automatic mocking in the module loader. - */ - function autoMockOff(): typeof jest; - /** - * Enables automatic mocking in the module loader. - */ - function autoMockOn(): typeof jest; - /** - * Clears the mock.calls and mock.instances properties of all mocks. - * Equivalent to calling .mockClear() on every mocked function. - */ - function clearAllMocks(): typeof jest; - /** - * Resets the state of all mocks. - * Equivalent to calling .mockReset() on every mocked function. - */ - function resetAllMocks(): typeof jest; - /** - * available since Jest 21.1.0 - * Restores all mocks back to their original value. - * Equivalent to calling .mockRestore on every mocked function. - * Beware that jest.restoreAllMocks() only works when mock was created with - * jest.spyOn; other mocks will require you to manually restore them. - */ - function restoreAllMocks(): typeof jest; - /** - * Removes any pending timers from the timer system. If any timers have - * been scheduled, they will be cleared and will never have the opportunity - * to execute in the future. - */ - function clearAllTimers(): typeof jest; - /** - * Returns the number of fake timers still left to run. - */ - function getTimerCount(): number; - /** - * Indicates that the module system should never return a mocked version - * of the specified module, including all of the specificied module's dependencies. - */ - function deepUnmock(moduleName: string): typeof jest; - /** - * Disables automatic mocking in the module loader. - */ - function disableAutomock(): typeof jest; - /** - * Mocks a module with an auto-mocked version when it is being required. - */ - function doMock(moduleName: string, factory?: () => unknown, options?: MockOptions): typeof jest; - /** - * Indicates that the module system should never return a mocked version - * of the specified module from require() (e.g. that it should always return the real module). - */ - function dontMock(moduleName: string): typeof jest; - /** - * Enables automatic mocking in the module loader. - */ - function enableAutomock(): typeof jest; - /** - * Creates a mock function. Optionally takes a mock implementation. - */ - function fn(): Mock; - /** - * Creates a mock function. Optionally takes a mock implementation. - */ - function fn(implementation?: (...args: Y) => T): Mock; - /** - * Use the automatic mocking system to generate a mocked version of the given module. - */ - function genMockFromModule(moduleName: string): T; - /** - * Returns whether the given function is a mock function. - */ - function isMockFunction(fn: any): fn is Mock; - /** - * Mocks a module with an auto-mocked version when it is being required. - */ - function mock(moduleName: string, factory?: () => unknown, options?: MockOptions): typeof jest; - /** - * Returns the actual module instead of a mock, bypassing all checks on - * whether the module should receive a mock implementation or not. - */ - function requireActual(moduleName: string): any; - /** - * Returns a mock module instead of the actual module, bypassing all checks - * on whether the module should be required normally or not. - */ - function requireMock(moduleName: string): any; - /** - * Resets the module registry - the cache of all required modules. This is - * useful to isolate modules where local state might conflict between tests. - */ - function resetModuleRegistry(): typeof jest; - /** - * Resets the module registry - the cache of all required modules. This is - * useful to isolate modules where local state might conflict between tests. - */ - function resetModules(): typeof jest; - /** - * Creates a sandbox registry for the modules that are loaded inside the callback function.. - * This is useful to isolate specific modules for every test so that local module state doesn't conflict between tests. - */ - function isolateModules(fn: () => void): typeof jest; - /** - * Runs failed tests n-times until they pass or until the max number of retries is exhausted. - * This only works with jest-circus! - */ - function retryTimes(numRetries: number): typeof jest; - /** - * Exhausts tasks queued by setImmediate(). - */ - function runAllImmediates(): typeof jest; - /** - * Exhausts the micro-task queue (usually interfaced in node via process.nextTick). - */ - function runAllTicks(): typeof jest; - /** - * Exhausts the macro-task queue (i.e., all tasks queued by setTimeout() and setInterval()). - */ - function runAllTimers(): typeof jest; - /** - * Executes only the macro-tasks that are currently pending (i.e., only the - * tasks that have been queued by setTimeout() or setInterval() up to this point). - * If any of the currently pending macro-tasks schedule new macro-tasks, - * those new tasks will not be executed by this call. - */ - function runOnlyPendingTimers(): typeof jest; - /** - * (renamed to `advanceTimersByTime` in Jest 21.3.0+) Executes only the macro - * task queue (i.e. all tasks queued by setTimeout() or setInterval() and setImmediate()). - */ - function runTimersToTime(msToRun: number): typeof jest; - /** - * Advances all timers by msToRun milliseconds. All pending "macro-tasks" that have been - * queued via setTimeout() or setInterval(), and would be executed within this timeframe - * will be executed. - */ - function advanceTimersByTime(msToRun: number): typeof jest; - /** - * Advances all timers by the needed milliseconds so that only the next - * timeouts/intervals will run. Optionally, you can provide steps, so it - * will run steps amount of next timeouts/intervals. - */ - function advanceTimersToNextTimer(step?: number): void; - /** - * Explicitly supplies the mock object that the module system should return - * for the specified module. - */ - function setMock(moduleName: string, moduleExports: T): typeof jest; - /** - * Set the default timeout interval for tests and before/after hooks in milliseconds. - * Note: The default timeout interval is 5 seconds if this method is not called. - */ - function setTimeout(timeout: number): typeof jest; - /** - * Creates a mock function similar to jest.fn but also tracks calls to `object[methodName]` - * - * Note: By default, jest.spyOn also calls the spied method. This is different behavior from most - * other test libraries. - * - * @example - * - * const video = require('./video'); - * - * test('plays video', () => { - * const spy = jest.spyOn(video, 'play'); - * const isPlaying = video.play(); - * - * expect(spy).toHaveBeenCalled(); - * expect(isPlaying).toBe(true); - * - * spy.mockReset(); - * spy.mockRestore(); - * }); - */ - function spyOn>>( - object: T, - method: M, - accessType: 'get' - ): SpyInstance[M], []>; - function spyOn>>( - object: T, - method: M, - accessType: 'set' - ): SpyInstance[M]]>; - function spyOn>>( - object: T, - method: M - ): Required[M] extends (...args: any[]) => any - ? SpyInstance[M]>, ArgsType[M]>> - : never; - /** - * Indicates that the module system should never return a mocked version of - * the specified module from require() (e.g. that it should always return the real module). - */ - function unmock(moduleName: string): typeof jest; - /** - * Instructs Jest to use fake versions of the standard timer functions. - */ - function useFakeTimers(): typeof jest; - /** - * Instructs Jest to use the real versions of the standard timer functions. - */ - function useRealTimers(): typeof jest; - - interface MockOptions { - virtual?: boolean; - } - - type EmptyFunction = () => void; - type ArgsType = T extends (...args: infer A) => any ? A : never; - type RejectedValue = T extends PromiseLike ? any : never; - type ResolvedValue = T extends PromiseLike ? U | T : never; - // see https://github.com/Microsoft/TypeScript/issues/25215 - type NonFunctionPropertyNames = { [K in keyof T]: T[K] extends (...args: any[]) => any ? never : K }[keyof T] & - string; - type FunctionPropertyNames = { [K in keyof T]: T[K] extends (...args: any[]) => any ? K : never }[keyof T] & - string; - - interface DoneCallback { - (...args: any[]): any; - fail(error?: string | { message: string }): any; - } - - type ProvidesCallback = (cb: DoneCallback) => any; - - type Lifecycle = (fn: ProvidesCallback, timeout?: number) => any; - - interface FunctionLike { - readonly name: string; - } - - interface Each { - // Exclusively arrays. - (cases: ReadonlyArray): (name: string, fn: (...args: T) => any, timeout?: number) => void; - // Not arrays. - (cases: ReadonlyArray): (name: string, fn: (...args: T[]) => any, timeout?: number) => void; - (cases: ReadonlyArray>): ( - name: string, - fn: (...args: any[]) => any, - timeout?: number - ) => void; - (strings: TemplateStringsArray, ...placeholders: any[]): ( - name: string, - fn: (arg: any) => any, - timeout?: number - ) => void; - } - - /** - * Creates a test closure - */ - interface It { - /** - * Creates a test closure. - * - * @param name The name of your test - * @param fn The function for your test - * @param timeout The timeout for an async function test - */ - (name: string, fn?: ProvidesCallback, timeout?: number): void; - /** - * Only runs this test in the current file. - */ - only: It; - /** - * Skips running this test in the current file. - */ - skip: It; - /** - * Sketch out which tests to write in the future. - */ - todo: It; - /** - * Experimental and should be avoided. - */ - concurrent: It; - /** - * Use if you keep duplicating the same test with different data. `.each` allows you to write the - * test once and pass data in. - * - * `.each` is available with two APIs: - * - * #### 1 `test.each(table)(name, fn)` - * - * - `table`: Array of Arrays with the arguments that are passed into the test fn for each row. - * - `name`: String the title of the test block. - * - `fn`: Function the test to be ran, this is the function that will receive the parameters in each row as function arguments. - * - * - * #### 2 `test.each table(name, fn)` - * - * - `table`: Tagged Template Literal - * - `name`: String the title of the test, use `$variable` to inject test data into the test title from the tagged template expressions. - * - `fn`: Function the test to be ran, this is the function that will receive the test data object.. - * - * @example - * - * // API 1 - * test.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])( - * '.add(%i, %i)', - * (a, b, expected) => { - * expect(a + b).toBe(expected); - * }, - * ); - * - * // API 2 - * test.each` - * a | b | expected - * ${1} | ${1} | ${2} - * ${1} | ${2} | ${3} - * ${2} | ${1} | ${3} - * `('returns $expected when $a is added $b', ({a, b, expected}) => { - * expect(a + b).toBe(expected); - * }); - * - */ - each: Each; - } - - interface Describe { - // tslint:disable-next-line ban-types - (name: number | string | Function | FunctionLike, fn: EmptyFunction): void; - /** Only runs the tests inside this `describe` for the current file */ - only: Describe; - /** Skips running the tests inside this `describe` for the current file */ - skip: Describe; - each: Each; - } - - interface MatcherUtils { - readonly expand: boolean; - readonly isNot: boolean; - utils: { - readonly EXPECTED_COLOR: (text: string) => string; - readonly RECEIVED_COLOR: (text: string) => string; - diff: typeof import('jest-diff'); - ensureActualIsNumber(actual: any, matcherName?: string): void; - ensureExpectedIsNumber(actual: any, matcherName?: string): void; - ensureNoExpected(actual: any, matcherName?: string): void; - ensureNumbers(actual: any, expected: any, matcherName?: string): void; - /** - * get the type of a value with handling of edge cases like `typeof []` and `typeof null` - */ - getType(value: any): string; - matcherHint( - matcherName: string, - received?: string, - expected?: string, - options?: { secondArgument?: string; isDirectExpectCall?: boolean } - ): string; - pluralize(word: string, count: number): string; - printExpected(value: any): string; - printReceived(value: any): string; - printWithType(name: string, received: any, print: (value: any) => string): string; - stringify(object: {}, maxDepth?: number): string; - }; - /** - * This is a deep-equality function that will return true if two objects have the same values (recursively). - */ - equals(a: any, b: any): boolean; - } - - interface ExpectExtendMap { - [key: string]: CustomMatcher; - } - - type CustomMatcher = ( - this: MatcherUtils, - received: any, - ...actual: any[] - ) => CustomMatcherResult | Promise; - - interface CustomMatcherResult { - pass: boolean; - message: string | (() => string); - } - - interface SnapshotSerializerOptions { - callToJSON?: boolean; - edgeSpacing?: string; - spacing?: string; - escapeRegex?: boolean; - highlight?: boolean; - indent?: number; - maxDepth?: number; - min?: boolean; - plugins?: SnapshotSerializerPlugin[]; - printFunctionName?: boolean; - theme?: SnapshotSerializerOptionsTheme; - - // see https://github.com/facebook/jest/blob/e56103cf142d2e87542ddfb6bd892bcee262c0e6/types/PrettyFormat.js - } - interface SnapshotSerializerOptionsTheme { - comment?: string; - content?: string; - prop?: string; - tag?: string; - value?: string; - } - interface SnapshotSerializerColor { - close: string; - open: string; - } - interface SnapshotSerializerColors { - comment: SnapshotSerializerColor; - content: SnapshotSerializerColor; - prop: SnapshotSerializerColor; - tag: SnapshotSerializerColor; - value: SnapshotSerializerColor; - } - interface SnapshotSerializerPlugin { - print( - val: any, - serialize: (val: any) => string, - indent: (str: string) => string, - opts: SnapshotSerializerOptions, - colors: SnapshotSerializerColors - ): string; - test(val: any): boolean; - } - - interface InverseAsymmetricMatchers { - /** - * `expect.not.arrayContaining(array)` matches a received array which - * does not contain all of the elements in the expected array. That is, - * the expected array is not a subset of the received array. It is the - * inverse of `expect.arrayContaining`. - */ - arrayContaining(arr: any[]): any; - /** - * `expect.not.objectContaining(object)` matches any received object - * that does not recursively match the expected properties. That is, the - * expected object is not a subset of the received object. Therefore, - * it matches a received object which contains properties that are not - * in the expected object. It is the inverse of `expect.objectContaining`. - */ - objectContaining(obj: {}): any; - /** - * `expect.not.stringMatching(string | regexp)` matches the received - * string that does not match the expected regexp. It is the inverse of - * `expect.stringMatching`. - */ - stringMatching(str: string | RegExp): any; - /** - * `expect.not.stringContaining(string)` matches the received string - * that does not contain the exact expected string. It is the inverse of - * `expect.stringContaining`. - */ - stringContaining(str: string): any; - } - - /** - * The `expect` function is used every time you want to test a value. - * You will rarely call `expect` by itself. - */ - interface Expect { - /** - * The `expect` function is used every time you want to test a value. - * You will rarely call `expect` by itself. - * - * @param actual The value to apply matchers against. - */ - (actual: T): Matchers; - /** - * Matches anything but null or undefined. You can use it inside `toEqual` or `toBeCalledWith` instead - * of a literal value. For example, if you want to check that a mock function is called with a - * non-null argument: - * - * @example - * - * test('map calls its argument with a non-null argument', () => { - * const mock = jest.fn(); - * [1].map(x => mock(x)); - * expect(mock).toBeCalledWith(expect.anything()); - * }); - * - */ - anything(): any; - /** - * Matches anything that was created with the given constructor. - * You can use it inside `toEqual` or `toBeCalledWith` instead of a literal value. - * - * @example - * - * function randocall(fn) { - * return fn(Math.floor(Math.random() * 6 + 1)); - * } - * - * test('randocall calls its callback with a number', () => { - * const mock = jest.fn(); - * randocall(mock); - * expect(mock).toBeCalledWith(expect.any(Number)); - * }); - */ - any(classType: any): any; - /** - * Matches any array made up entirely of elements in the provided array. - * You can use it inside `toEqual` or `toBeCalledWith` instead of a literal value. - */ - arrayContaining(arr: any[]): any; - /** - * Verifies that a certain number of assertions are called during a test. - * This is often useful when testing asynchronous code, in order to - * make sure that assertions in a callback actually got called. - */ - assertions(num: number): void; - /** - * Verifies that at least one assertion is called during a test. - * This is often useful when testing asynchronous code, in order to - * make sure that assertions in a callback actually got called. - */ - hasAssertions(): void; - /** - * You can use `expect.extend` to add your own matchers to Jest. - */ - extend(obj: ExpectExtendMap): void; - /** - * Adds a module to format application-specific data structures for serialization. - */ - addSnapshotSerializer(serializer: SnapshotSerializerPlugin): void; - /** - * Matches any object that recursively matches the provided keys. - * This is often handy in conjunction with other asymmetric matchers. - */ - objectContaining(obj: {}): any; - /** - * Matches any string that contains the exact provided string - */ - stringMatching(str: string | RegExp): any; - /** - * Matches any received string that contains the exact expected string - */ - stringContaining(str: string): any; - - not: InverseAsymmetricMatchers; - } - - interface Matchers { - /** - * Ensures the last call to a mock function was provided specific args. - */ - lastCalledWith(...args: any[]): R; - /** - * Ensure that the last call to a mock function has returned a specified value. - */ - lastReturnedWith(value: any): R; - /** - * If you know how to test something, `.not` lets you test its opposite. - */ - not: Matchers; - /** - * Ensure that a mock function is called with specific arguments on an Nth call. - */ - nthCalledWith(nthCall: number, ...params: any[]): R; - /** - * Ensure that the nth call to a mock function has returned a specified value. - */ - nthReturnedWith(n: number, value: any): R; - /** - * Use resolves to unwrap the value of a fulfilled promise so any other - * matcher can be chained. If the promise is rejected the assertion fails. - */ - resolves: Matchers>; - /** - * Unwraps the reason of a rejected promise so any other matcher can be chained. - * If the promise is fulfilled the assertion fails. - */ - rejects: Matchers>; - /** - * Checks that a value is what you expect. It uses `===` to check strict equality. - * Don't use `toBe` with floating-point numbers. - */ - toBe(expected: any): R; - /** - * Ensures that a mock function is called. - */ - toBeCalled(): R; - /** - * Ensures that a mock function is called an exact number of times. - */ - toBeCalledTimes(expected: number): R; - /** - * Ensure that a mock function is called with specific arguments. - */ - toBeCalledWith(...args: any[]): R; - /** - * Using exact equality with floating point numbers is a bad idea. - * Rounding means that intuitive things fail. - * The default for numDigits is 2. - */ - toBeCloseTo(expected: number, numDigits?: number): R; - /** - * Ensure that a variable is not undefined. - */ - toBeDefined(): R; - /** - * When you don't care what a value is, you just want to - * ensure a value is false in a boolean context. - */ - toBeFalsy(): R; - /** - * For comparing floating point numbers. - */ - toBeGreaterThan(expected: number): R; - /** - * For comparing floating point numbers. - */ - toBeGreaterThanOrEqual(expected: number): R; - /** - * Ensure that an object is an instance of a class. - * This matcher uses `instanceof` underneath. - */ - toBeInstanceOf(expected: any): R; - /** - * For comparing floating point numbers. - */ - toBeLessThan(expected: number): R; - /** - * For comparing floating point numbers. - */ - toBeLessThanOrEqual(expected: number): R; - /** - * This is the same as `.toBe(null)` but the error messages are a bit nicer. - * So use `.toBeNull()` when you want to check that something is null. - */ - toBeNull(): R; - /** - * Use when you don't care what a value is, you just want to ensure a value - * is true in a boolean context. In JavaScript, there are six falsy values: - * `false`, `0`, `''`, `null`, `undefined`, and `NaN`. Everything else is truthy. - */ - toBeTruthy(): R; - /** - * Used to check that a variable is undefined. - */ - toBeUndefined(): R; - /** - * Used to check that a variable is NaN. - */ - toBeNaN(): R; - /** - * Used when you want to check that an item is in a list. - * For testing the items in the list, this uses `===`, a strict equality check. - */ - toContain(expected: any): R; - /** - * Used when you want to check that an item is in a list. - * For testing the items in the list, this matcher recursively checks the - * equality of all fields, rather than checking for object identity. - */ - toContainEqual(expected: any): R; - /** - * Used when you want to check that two objects have the same value. - * This matcher recursively checks the equality of all fields, rather than checking for object identity. - */ - toEqual(expected: any): R; - /** - * Ensures that a mock function is called. - */ - toHaveBeenCalled(): R; - /** - * Ensures that a mock function is called an exact number of times. - */ - toHaveBeenCalledTimes(expected: number): R; - /** - * Ensure that a mock function is called with specific arguments. - */ - toHaveBeenCalledWith(...params: any[]): R; - /** - * Ensure that a mock function is called with specific arguments on an Nth call. - */ - toHaveBeenNthCalledWith(nthCall: number, ...params: any[]): R; - /** - * If you have a mock function, you can use `.toHaveBeenLastCalledWith` - * to test what arguments it was last called with. - */ - toHaveBeenLastCalledWith(...params: any[]): R; - /** - * Use to test the specific value that a mock function last returned. - * If the last call to the mock function threw an error, then this matcher will fail - * no matter what value you provided as the expected return value. - */ - toHaveLastReturnedWith(expected: any): R; - /** - * Used to check that an object has a `.length` property - * and it is set to a certain numeric value. - */ - toHaveLength(expected: number): R; - /** - * Use to test the specific value that a mock function returned for the nth call. - * If the nth call to the mock function threw an error, then this matcher will fail - * no matter what value you provided as the expected return value. - */ - toHaveNthReturnedWith(nthCall: number, expected: any): R; - /** - * Use to check if property at provided reference keyPath exists for an object. - * For checking deeply nested properties in an object you may use dot notation or an array containing - * the keyPath for deep references. - * - * Optionally, you can provide a value to check if it's equal to the value present at keyPath - * on the target object. This matcher uses 'deep equality' (like `toEqual()`) and recursively checks - * the equality of all fields. - * - * @example - * - * expect(houseForSale).toHaveProperty('kitchen.area', 20); - */ - toHaveProperty(propertyPath: string | any[], value?: any): R; - /** - * Use to test that the mock function successfully returned (i.e., did not throw an error) at least one time - */ - toHaveReturned(): R; - /** - * Use to ensure that a mock function returned successfully (i.e., did not throw an error) an exact number of times. - * Any calls to the mock function that throw an error are not counted toward the number of times the function returned. - */ - toHaveReturnedTimes(expected: number): R; - /** - * Use to ensure that a mock function returned a specific value. - */ - toHaveReturnedWith(expected: any): R; - /** - * Check that a string matches a regular expression. - */ - toMatch(expected: string | RegExp): R; - /** - * Used to check that a JavaScript object matches a subset of the properties of an object - * - * Optionally, you can provide an object to use as Generic type for the expected value. - * This ensures that the matching object matches the structure of the provided object-like type. - * - * @example - * - * type House = { - * bath: boolean; - * bedrooms: number; - * kitchen: { - * amenities: string[]; - * area: number; - * wallColor: string; - * } - * }; - * - * expect(desiredHouse).toMatchObject(...standardHouse, kitchen: {area: 20}) // wherein standardHouse is some base object of type House - */ - toMatchObject(expected: E): R; - /** - * This ensures that a value matches the most recent snapshot with property matchers. - * Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information. - */ - toMatchSnapshot(propertyMatchers: Partial, snapshotName?: string): R; - /** - * This ensures that a value matches the most recent snapshot. - * Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information. - */ - toMatchSnapshot(snapshotName?: string): R; - /** - * This ensures that a value matches the most recent snapshot with property matchers. - * Instead of writing the snapshot value to a .snap file, it will be written into the source code automatically. - * Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information. - */ - toMatchInlineSnapshot(propertyMatchers: Partial, snapshot?: string): R; - /** - * This ensures that a value matches the most recent snapshot with property matchers. - * Instead of writing the snapshot value to a .snap file, it will be written into the source code automatically. - * Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information. - */ - toMatchInlineSnapshot(snapshot?: string): R; - /** - * Ensure that a mock function has returned (as opposed to thrown) at least once. - */ - toReturn(): R; - /** - * Ensure that a mock function has returned (as opposed to thrown) a specified number of times. - */ - toReturnTimes(count: number): R; - /** - * Ensure that a mock function has returned a specified value at least once. - */ - toReturnWith(value: any): R; - /** - * Use to test that objects have the same types as well as structure. - */ - toStrictEqual(expected: {}): R; - /** - * Used to test that a function throws when it is called. - */ - toThrow(error?: string | Constructable | RegExp | Error): R; - /** - * If you want to test that a specific error is thrown inside a function. - */ - toThrowError(error?: string | Constructable | RegExp | Error): R; - /** - * Used to test that a function throws a error matching the most recent snapshot when it is called. - */ - toThrowErrorMatchingSnapshot(): R; - /** - * Used to test that a function throws a error matching the most recent snapshot when it is called. - * Instead of writing the snapshot value to a .snap file, it will be written into the source code automatically. - */ - toThrowErrorMatchingInlineSnapshot(snapshot?: string): R; - } - - interface Constructable { - new (...args: any[]): any; - } - - interface Mock extends Function, MockInstance { - new (...args: Y): T; - (...args: Y): T; - } - - interface SpyInstance extends MockInstance {} - - /** - * Wrap a function with mock definitions - * - * @example - * - * import { myFunction } from "./library"; - * jest.mock("./library"); - * - * const mockMyFunction = myFunction as jest.MockedFunction; - * expect(mockMyFunction.mock.calls[0][0]).toBe(42); - */ - type MockedFunction any> = MockInstance, ArgsType> & T; - - /** - * Wrap a class with mock definitions - * - * @example - * - * import { MyClass } from "./libary"; - * jest.mock("./library"); - * - * const mockedMyClass = MyClass as jest.MockedClass; - * - * expect(mockedMyClass.mock.calls[0][0]).toBe(42); // Constructor calls - * expect(mockedMyClass.prototype.myMethod.mock.calls[0][0]).toBe(42); // Method calls - */ - - type MockedClass = MockInstance< - InstanceType, - T extends new (...args: infer P) => any ? P : never - > & { - prototype: T extends { prototype: any } ? Mocked : never; - } & T; - - /** - * Wrap an object or a module with mock definitions - * - * @example - * - * jest.mock("../api"); - * import * as api from "../api"; - * - * const mockApi = api as jest.Mocked; - * api.MyApi.prototype.myApiMethod.mockImplementation(() => "test"); - */ - type Mocked = { - [P in keyof T]: T[P] extends (...args: any[]) => any - ? MockInstance, ArgsType> - : T[P] extends Constructable - ? MockedClass - : T[P] - } & - T; - - interface MockInstance { - /** Returns the mock name string set by calling `mockFn.mockName(value)`. */ - getMockName(): string; - /** Provides access to the mock's metadata */ - mock: MockContext; - /** - * Resets all information stored in the mockFn.mock.calls and mockFn.mock.instances arrays. - * - * Often this is useful when you want to clean up a mock's usage data between two assertions. - * - * Beware that `mockClear` will replace `mockFn.mock`, not just `mockFn.mock.calls` and `mockFn.mock.instances`. - * You should therefore avoid assigning mockFn.mock to other variables, temporary or not, to make sure you - * don't access stale data. - */ - mockClear(): void; - /** - * Resets all information stored in the mock, including any initial implementation and mock name given. - * - * This is useful when you want to completely restore a mock back to its initial state. - * - * Beware that `mockReset` will replace `mockFn.mock`, not just `mockFn.mock.calls` and `mockFn.mock.instances`. - * You should therefore avoid assigning mockFn.mock to other variables, temporary or not, to make sure you - * don't access stale data. - */ - mockReset(): void; - /** - * Does everything that `mockFn.mockReset()` does, and also restores the original (non-mocked) implementation. - * - * This is useful when you want to mock functions in certain test cases and restore the original implementation in others. - * - * Beware that `mockFn.mockRestore` only works when mock was created with `jest.spyOn`. Thus you have to take care of restoration - * yourself when manually assigning `jest.fn()`. - * - * The [`restoreMocks`](https://jestjs.io/docs/en/configuration.html#restoremocks-boolean) configuration option is available - * to restore mocks automatically between tests. - */ - mockRestore(): void; - /** - * Accepts a function that should be used as the implementation of the mock. The mock itself will still record - * all calls that go into and instances that come from itself – the only difference is that the implementation - * will also be executed when the mock is called. - * - * Note: `jest.fn(implementation)` is a shorthand for `jest.fn().mockImplementation(implementation)`. - */ - mockImplementation(fn?: (...args: Y) => T): this; - /** - * Accepts a function that will be used as an implementation of the mock for one call to the mocked function. - * Can be chained so that multiple function calls produce different results. - * - * @example - * - * const myMockFn = jest - * .fn() - * .mockImplementationOnce(cb => cb(null, true)) - * .mockImplementationOnce(cb => cb(null, false)); - * - * myMockFn((err, val) => console.log(val)); // true - * - * myMockFn((err, val) => console.log(val)); // false - */ - mockImplementationOnce(fn: (...args: Y) => T): this; - /** Sets the name of the mock`. */ - mockName(name: string): this; - /** - * Just a simple sugar function for: - * - * @example - * - * jest.fn(function() { - * return this; - * }); - */ - mockReturnThis(): this; - /** - * Accepts a value that will be returned whenever the mock function is called. - * - * @example - * - * const mock = jest.fn(); - * mock.mockReturnValue(42); - * mock(); // 42 - * mock.mockReturnValue(43); - * mock(); // 43 - */ - mockReturnValue(value: T): this; - /** - * Accepts a value that will be returned for one call to the mock function. Can be chained so that - * successive calls to the mock function return different values. When there are no more - * `mockReturnValueOnce` values to use, calls will return a value specified by `mockReturnValue`. - * - * @example - * - * const myMockFn = jest.fn() - * .mockReturnValue('default') - * .mockReturnValueOnce('first call') - * .mockReturnValueOnce('second call'); - * - * // 'first call', 'second call', 'default', 'default' - * console.log(myMockFn(), myMockFn(), myMockFn(), myMockFn()); - * - */ - mockReturnValueOnce(value: T): this; - /** - * Simple sugar function for: `jest.fn().mockImplementation(() => Promise.resolve(value));` - */ - mockResolvedValue(value: ResolvedValue): this; - /** - * Simple sugar function for: `jest.fn().mockImplementationOnce(() => Promise.resolve(value));` - * - * @example - * - * test('async test', async () => { - * const asyncMock = jest - * .fn() - * .mockResolvedValue('default') - * .mockResolvedValueOnce('first call') - * .mockResolvedValueOnce('second call'); - * - * await asyncMock(); // first call - * await asyncMock(); // second call - * await asyncMock(); // default - * await asyncMock(); // default - * }); - * - */ - mockResolvedValueOnce(value: ResolvedValue): this; - /** - * Simple sugar function for: `jest.fn().mockImplementation(() => Promise.reject(value));` - * - * @example - * - * test('async test', async () => { - * const asyncMock = jest.fn().mockRejectedValue(new Error('Async error')); - * - * await asyncMock(); // throws "Async error" - * }); - */ - mockRejectedValue(value: RejectedValue): this; - - /** - * Simple sugar function for: `jest.fn().mockImplementationOnce(() => Promise.reject(value));` - * - * @example - * - * test('async test', async () => { - * const asyncMock = jest - * .fn() - * .mockResolvedValueOnce('first call') - * .mockRejectedValueOnce(new Error('Async error')); - * - * await asyncMock(); // first call - * await asyncMock(); // throws "Async error" - * }); - * - */ - mockRejectedValueOnce(value: RejectedValue): this; - } - - /** - * Represents the result of a single call to a mock function with a return value. - */ - interface MockResultReturn { - type: 'return'; - value: T; - } - /** - * Represents the result of a single incomplete call to a mock function. - */ - interface MockResultIncomplete { - type: 'incomplete'; - value: undefined; - } - /** - * Represents the result of a single call to a mock function with a thrown error. - */ - interface MockResultThrow { - type: 'throw'; - value: any; - } - - type MockResult = MockResultReturn | MockResultThrow | MockResultIncomplete; - - interface MockContext { - calls: Y[]; - instances: T[]; - invocationCallOrder: number[]; - /** - * List of results of calls to the mock function. - */ - results: Array>; - } -} - -// Jest ships with a copy of Jasmine. They monkey-patch its APIs and divergence/deprecation are expected. -// Relevant parts of Jasmine's API are below so they can be changed and removed over time. -// This file can't reference jasmine.d.ts since the globals aren't compatible. - -declare function spyOn(object: T, method: keyof T): jasmine.Spy; -/** - * If you call the function pending anywhere in the spec body, - * no matter the expectations, the spec will be marked pending. - */ -declare function pending(reason?: string): void; -/** - * Fails a test when called within one. - */ -declare function fail(error?: any): never; -declare namespace jasmine { - let DEFAULT_TIMEOUT_INTERVAL: number; - function clock(): Clock; - function any(aclass: any): Any; - function anything(): Any; - function arrayContaining(sample: any[]): ArrayContaining; - function objectContaining(sample: any): ObjectContaining; - function createSpy(name?: string, originalFn?: (...args: any[]) => any): Spy; - function createSpyObj(baseName: string, methodNames: any[]): any; - function createSpyObj(baseName: string, methodNames: any[]): T; - function pp(value: any): string; - function addCustomEqualityTester(equalityTester: CustomEqualityTester): void; - function addMatchers(matchers: CustomMatcherFactories): void; - function stringMatching(value: string | RegExp): Any; - - interface Clock { - install(): void; - uninstall(): void; - /** - * Calls to any registered callback are triggered when the clock isticked forward - * via the jasmine.clock().tick function, which takes a number of milliseconds. - */ - tick(ms: number): void; - mockDate(date?: Date): void; - } - - interface Any { - new (expectedClass: any): any; - jasmineMatches(other: any): boolean; - jasmineToString(): string; - } - - interface ArrayContaining { - new (sample: any[]): any; - asymmetricMatch(other: any): boolean; - jasmineToString(): string; - } - - interface ObjectContaining { - new (sample: any): any; - jasmineMatches(other: any, mismatchKeys: any[], mismatchValues: any[]): boolean; - jasmineToString(): string; - } - - interface Spy { - (...params: any[]): any; - identity: string; - and: SpyAnd; - calls: Calls; - mostRecentCall: { args: any[] }; - argsForCall: any[]; - wasCalled: boolean; - } - - interface SpyAnd { - /** - * By chaining the spy with and.callThrough, the spy will still track all - * calls to it but in addition it will delegate to the actual implementation. - */ - callThrough(): Spy; - /** - * By chaining the spy with and.returnValue, all calls to the function - * will return a specific value. - */ - returnValue(val: any): Spy; - /** - * By chaining the spy with and.returnValues, all calls to the function - * will return specific values in order until it reaches the end of the return values list. - */ - returnValues(...values: any[]): Spy; - /** - * By chaining the spy with and.callFake, all calls to the spy - * will delegate to the supplied function. - */ - callFake(fn: (...args: any[]) => any): Spy; - /** - * By chaining the spy with and.throwError, all calls to the spy - * will throw the specified value. - */ - throwError(msg: string): Spy; - /** - * When a calling strategy is used for a spy, the original stubbing - * behavior can be returned at any time with and.stub. - */ - stub(): Spy; - } - - interface Calls { - /** - * By chaining the spy with calls.any(), - * will return false if the spy has not been called at all, - * and then true once at least one call happens. - */ - any(): boolean; - /** - * By chaining the spy with calls.count(), - * will return the number of times the spy was called - */ - count(): number; - /** - * By chaining the spy with calls.argsFor(), - * will return the arguments passed to call number index - */ - argsFor(index: number): any[]; - /** - * By chaining the spy with calls.allArgs(), - * will return the arguments to all calls - */ - allArgs(): any[]; - /** - * By chaining the spy with calls.all(), will return the - * context (the this) and arguments passed all calls - */ - all(): CallInfo[]; - /** - * By chaining the spy with calls.mostRecent(), will return the - * context (the this) and arguments for the most recent call - */ - mostRecent(): CallInfo; - /** - * By chaining the spy with calls.first(), will return the - * context (the this) and arguments for the first call - */ - first(): CallInfo; - /** - * By chaining the spy with calls.reset(), will clears all tracking for a spy - */ - reset(): void; - } - - interface CallInfo { - /** - * The context (the this) for the call - */ - object: any; - /** - * All arguments passed to the call - */ - args: any[]; - /** - * The return value of the call - */ - returnValue: any; - } - - interface CustomMatcherFactories { - [index: string]: CustomMatcherFactory; - } - - type CustomMatcherFactory = (util: MatchersUtil, customEqualityTesters: CustomEqualityTester[]) => CustomMatcher; - - interface MatchersUtil { - equals(a: any, b: any, customTesters?: CustomEqualityTester[]): boolean; - contains(haystack: ArrayLike | string, needle: any, customTesters?: CustomEqualityTester[]): boolean; - buildFailureMessage(matcherName: string, isNot: boolean, actual: any, ...expected: any[]): string; - } - - type CustomEqualityTester = (first: any, second: any) => boolean; - - interface CustomMatcher { - compare(actual: T, expected: T, ...args: any[]): CustomMatcherResult; - compare(actual: any, ...expected: any[]): CustomMatcherResult; - } - - interface CustomMatcherResult { - pass: boolean; - message: string | (() => string); - } - - interface ArrayLike { - length: number; - [n: number]: T; - } -} - -declare namespace jest { - // types for implementing custom interfaces, from https://github.com/facebook/jest/tree/dd6c5c4/types - - // https://facebook.github.io/jest/docs/en/configuration.html#transform-object-string-string - // const transformer: Transformer; - - // https://facebook.github.io/jest/docs/en/configuration.html#reporters-array-modulename-modulename-options - // const reporter: Reporter; - - // https://facebook.github.io/jest/docs/en/configuration.html#testrunner-string - // const testRunner: TestFramework; - - // https://facebook.github.io/jest/docs/en/configuration.html#testresultsprocessor-string - // const testResultsProcessor: TestResultsProcessor; - - // leave above declarations for referening type-dependencies - // .vscode/settings.json: "typescript.referencesCodeLens.enabled": true - - // custom - - // flow's Maybe type https://flow.org/en/docs/types/primitives/#toc-maybe-types - type Maybe = void | null | undefined | T; // tslint:disable-line:void-return - - type TestResultsProcessor = (testResult: AggregatedResult) => AggregatedResult; - - type HasteResolver = any; // import HasteResolver from 'jest-resolve'; - type ModuleMocker = any; // import { ModuleMocker } from 'jest-mock'; - type ModuleMap = any; // import {ModuleMap} from 'jest-haste-map'; - type HasteFS = any; // import {FS as HasteFS} from 'jest-haste-map'; - type Runtime = any; // import Runtime from 'jest-runtime'; - type Script = any; // import {Script} from 'vm'; - - // Config - - type Path = string; - type Glob = string; - - interface HasteConfig { - defaultPlatform?: Maybe; - hasteImplModulePath?: string; - platforms?: string[]; - providesModuleNodeModules: string[]; - } - - type ReporterConfig = [string, object]; - - type ConfigGlobals = object; - - type SnapshotUpdateState = 'all' | 'new' | 'none'; - - interface DefaultOptions { - automock: boolean; - bail: boolean; - browser: boolean; - cache: boolean; - cacheDirectory: Path; - changedFilesWithAncestor: boolean; - clearMocks: boolean; - collectCoverage: boolean; - collectCoverageFrom: Maybe; - coverageDirectory: Maybe; - coveragePathIgnorePatterns: string[]; - coverageReporters: string[]; - coverageThreshold: Maybe<{ global: { [key: string]: number } }>; - errorOnDeprecated: boolean; - expand: boolean; - filter: Maybe; - forceCoverageMatch: Glob[]; - globals: ConfigGlobals; - globalSetup: Maybe; - globalTeardown: Maybe; - haste: HasteConfig; - detectLeaks: boolean; - detectOpenHandles: boolean; - moduleDirectories: string[]; - moduleFileExtensions: string[]; - moduleNameMapper: { [key: string]: string }; - modulePathIgnorePatterns: string[]; - noStackTrace: boolean; - notify: boolean; - notifyMode: string; - preset: Maybe; - projects: Maybe>; - resetMocks: boolean; - resetModules: boolean; - resolver: Maybe; - restoreMocks: boolean; - rootDir: Maybe; - roots: Maybe; - runner: string; - runTestsByPath: boolean; - setupFiles: Path[]; - setupTestFrameworkScriptFile: Maybe; - skipFilter: boolean; - snapshotSerializers: Path[]; - testEnvironment: string; - testEnvironmentOptions: object; - testFailureExitCode: string | number; - testLocationInResults: boolean; - testMatch: Glob[]; - testPathIgnorePatterns: string[]; - testRegex: string; - testResultsProcessor: Maybe; - testRunner: Maybe; - testURL: string; - timers: 'real' | 'fake'; - transform: Maybe<{ [key: string]: string }>; - transformIgnorePatterns: Glob[]; - watchPathIgnorePatterns: string[]; - useStderr: boolean; - verbose: Maybe; - watch: boolean; - watchman: boolean; - } - - interface InitialOptions { - automock?: boolean; - bail?: boolean; - browser?: boolean; - cache?: boolean; - cacheDirectory?: Path; - clearMocks?: boolean; - changedFilesWithAncestor?: boolean; - changedSince?: string; - collectCoverage?: boolean; - collectCoverageFrom?: Glob[]; - collectCoverageOnlyFrom?: { [key: string]: boolean }; - coverageDirectory?: string; - coveragePathIgnorePatterns?: string[]; - coverageReporters?: string[]; - coverageThreshold?: { global: { [key: string]: number } }; - detectLeaks?: boolean; - detectOpenHandles?: boolean; - displayName?: string; - expand?: boolean; - filter?: Path; - findRelatedTests?: boolean; - forceCoverageMatch?: Glob[]; - forceExit?: boolean; - json?: boolean; - globals?: ConfigGlobals; - globalSetup?: Maybe; - globalTeardown?: Maybe; - haste?: HasteConfig; - reporters?: Array; - logHeapUsage?: boolean; - lastCommit?: boolean; - listTests?: boolean; - mapCoverage?: boolean; - moduleDirectories?: string[]; - moduleFileExtensions?: string[]; - moduleLoader?: Path; - moduleNameMapper?: { [key: string]: string }; - modulePathIgnorePatterns?: string[]; - modulePaths?: string[]; - name?: string; - noStackTrace?: boolean; - notify?: boolean; - notifyMode?: string; - onlyChanged?: boolean; - outputFile?: Path; - passWithNoTests?: boolean; - preprocessorIgnorePatterns?: Glob[]; - preset?: Maybe; - projects?: Glob[]; - replname?: Maybe; - resetMocks?: boolean; - resetModules?: boolean; - resolver?: Maybe; - restoreMocks?: boolean; - rootDir?: Path; - roots?: Path[]; - runner?: string; - runTestsByPath?: boolean; - scriptPreprocessor?: string; - setupFiles?: Path[]; - setupFilesAfterEnv?: Path[]; - setupTestFrameworkScriptFile?: Path; - silent?: boolean; - skipFilter?: boolean; - skipNodeResolution?: boolean; - snapshotSerializers?: Path[]; - errorOnDeprecated?: boolean; - testEnvironment?: string; - testEnvironmentOptions?: object; - testFailureExitCode?: string | number; - testLocationInResults?: boolean; - testMatch?: Glob[]; - testNamePattern?: string; - testPathDirs?: Path[]; - testPathIgnorePatterns?: string[]; - testRegex?: string; - testResultsProcessor?: Maybe; - testRunner?: string; - testURL?: string; - timers?: 'real' | 'fake'; - transform?: { [key: string]: string }; - transformIgnorePatterns?: Glob[]; - watchPathIgnorePatterns?: string[]; - unmockedModulePathPatterns?: string[]; - updateSnapshot?: boolean; - useStderr?: boolean; - verbose?: Maybe; - watch?: boolean; - watchAll?: boolean; - watchman?: boolean; - watchPlugins?: string[]; - } - - interface GlobalConfig { - bail: boolean; - collectCoverage: boolean; - collectCoverageFrom: Glob[]; - collectCoverageOnlyFrom: Maybe<{ [key: string]: boolean }>; - coverageDirectory: string; - coverageReporters: string[]; - coverageThreshold: { global: { [key: string]: number } }; - expand: boolean; - forceExit: boolean; - logHeapUsage: boolean; - mapCoverage: boolean; - noStackTrace: boolean; - notify: boolean; - projects: Glob[]; - replname: Maybe; - reporters: ReporterConfig[]; - rootDir: Path; - silent: boolean; - testNamePattern: string; - testPathPattern: string; - testResultsProcessor: Maybe; - updateSnapshot: SnapshotUpdateState; - useStderr: boolean; - verbose: Maybe; - watch: boolean; - watchman: boolean; - } - - interface ProjectConfig { - automock: boolean; - browser: boolean; - cache: boolean; - cacheDirectory: Path; - clearMocks: boolean; - coveragePathIgnorePatterns: string[]; - cwd: Path; - detectLeaks: boolean; - displayName: Maybe; - forceCoverageMatch: Glob[]; - globals: ConfigGlobals; - haste: HasteConfig; - moduleDirectories: string[]; - moduleFileExtensions: string[]; - moduleLoader: Path; - moduleNameMapper: Array<[string, string]>; - modulePathIgnorePatterns: string[]; - modulePaths: string[]; - name: string; - resetMocks: boolean; - resetModules: boolean; - resolver: Maybe; - rootDir: Path; - roots: Path[]; - runner: string; - setupFiles: Path[]; - setupTestFrameworkScriptFile: Path; - skipNodeResolution: boolean; - snapshotSerializers: Path[]; - testEnvironment: string; - testEnvironmentOptions: object; - testLocationInResults: boolean; - testMatch: Glob[]; - testPathIgnorePatterns: string[]; - testRegex: string; - testRunner: string; - testURL: string; - timers: 'real' | 'fake'; - transform: Array<[string, Path]>; - transformIgnorePatterns: Glob[]; - unmockedModulePathPatterns: Maybe; - watchPathIgnorePatterns: string[]; - } - - // Console - - type LogMessage = string; - interface LogEntry { - message: LogMessage; - origin: string; - type: LogType; - } - type LogType = 'log' | 'info' | 'warn' | 'error'; - type ConsoleBuffer = LogEntry[]; - - // Context - - interface Context { - config: ProjectConfig; - hasteFS: HasteFS; - moduleMap: ModuleMap; - resolver: HasteResolver; - } - - // Environment - - interface FakeTimers { - clearAllTimers(): void; - getTimerCount(): number; - runAllImmediates(): void; - runAllTicks(): void; - runAllTimers(): void; - runTimersToTime(msToRun: number): void; - advanceTimersByTime(msToRun: number): void; - advanceTimersToNextTimer(steps?: number): void; - runOnlyPendingTimers(): void; - runWithRealTimers(callback: any): void; - useFakeTimers(): void; - useRealTimers(): void; - } - - interface $JestEnvironment { - global: Global; - fakeTimers: FakeTimers; - testFilePath: string; - moduleMocker: ModuleMocker; - - dispose(): void; - runScript(script: Script): any; - } - - type Environment = $JestEnvironment; - - // Global - - type Global = object; - - // Reporter - - interface ReporterOnStartOptions { - estimatedTime: number; - showStatus: boolean; - } - - // TestResult - - interface RawFileCoverage { - path: string; - s: { [statementId: number]: number }; - b: { [branchId: number]: number }; - f: { [functionId: number]: number }; - l: { [lineId: number]: number }; - fnMap: { [functionId: number]: any }; - statementMap: { [statementId: number]: any }; - branchMap: { [branchId: number]: any }; - inputSourceMap?: object; - } - - interface RawCoverage { - [filePath: string]: RawFileCoverage; - } - - interface FileCoverageTotal { - total: number; - covered: number; - skipped: number; - pct?: number; - } - - interface CoverageSummary { - lines: FileCoverageTotal; - statements: FileCoverageTotal; - branches: FileCoverageTotal; - functions: FileCoverageTotal; - } - - interface FileCoverage { - getLineCoverage(): object; - getUncoveredLines(): number[]; - getBranchCoverageByLine(): object; - toJSON(): object; - merge(other: object): void; - computeSimpleTotals(property: string): FileCoverageTotal; - computeBranchTotals(): FileCoverageTotal; - resetHits(): void; - toSummary(): CoverageSummary; - } - - interface CoverageMap { - merge(data: object): void; - getCoverageSummary(): FileCoverage; - data: RawCoverage; - addFileCoverage(fileCoverage: RawFileCoverage): void; - files(): string[]; - fileCoverageFor(file: string): FileCoverage; - } - - interface SerializableError { - code?: any; - message: string; - stack: Maybe; - type?: string; - } - - type Status = 'passed' | 'failed' | 'skipped' | 'pending'; - - type Bytes = number; - type Milliseconds = number; - - interface AssertionResult { - ancestorTitles: string[]; - duration?: Maybe; - failureMessages: string[]; - fullName: string; - numPassingAsserts: number; - status: Status; - title: string; - } - - interface AggregatedResult { - coverageMap?: Maybe; - numFailedTests: number; - numFailedTestSuites: number; - numPassedTests: number; - numPassedTestSuites: number; - numPendingTests: number; - numPendingTestSuites: number; - numRuntimeErrorTestSuites: number; - numTodoTests: number; - numTotalTests: number; - numTotalTestSuites: number; - snapshot: SnapshotSummary; - startTime: number; - success: boolean; - testResults: TestResult[]; - wasInterrupted: boolean; - } - - interface TestResult { - console: Maybe; - coverage?: RawCoverage; - memoryUsage?: Bytes; - failureMessage: Maybe; - numFailingTests: number; - numPassingTests: number; - numPendingTests: number; - perfStats: { - end: Milliseconds; - start: Milliseconds; - }; - skipped: boolean; - snapshot: { - added: number; - fileDeleted: boolean; - matched: number; - unchecked: number; - unmatched: number; - updated: number; - }; - sourceMaps: { [sourcePath: string]: string }; - testExecError?: SerializableError; - testFilePath: string; - testResults: AssertionResult[]; - } - - interface SnapshotSummary { - added: number; - didUpdate: boolean; - failure: boolean; - filesAdded: number; - filesRemoved: number; - filesUnmatched: number; - filesUpdated: number; - matched: number; - total: number; - unchecked: number; - unmatched: number; - updated: number; - } - - // TestRunner - - interface Test { - context: Context; - duration?: number; - path: Path; - } - - // tslint:disable-next-line:no-empty-interface - interface Set {} // To allow non-ES6 users the Set below - interface Reporter { - onTestResult?(test: Test, testResult: TestResult, aggregatedResult: AggregatedResult): void; - onRunStart?(results: AggregatedResult, options: ReporterOnStartOptions): void; - onTestStart?(test: Test): void; - onRunComplete?(contexts: Set, results: AggregatedResult): Maybe>; - getLastError?(): Maybe; - } - - type TestFramework = ( - globalConfig: GlobalConfig, - config: ProjectConfig, - environment: Environment, - runtime: Runtime, - testPath: string - ) => Promise; - - // Transform - - interface TransformedSource { - code: string; - map: Maybe; - } - - interface TransformOptions { - instrument: boolean; - } - - interface Transformer { - canInstrument?: boolean; - createTransformer?(options: any): Transformer; - - getCacheKey?(fileData: string, filePath: Path, configStr: string, options: TransformOptions): string; - - process( - sourceText: string, - sourcePath: Path, - config: ProjectConfig, - options?: TransformOptions - ): string | TransformedSource; - } -} diff --git a/node_modules/@types/jest/package.json b/node_modules/@types/jest/package.json deleted file mode 100644 index 943ad95e..00000000 --- a/node_modules/@types/jest/package.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "_args": [ - [ - "@types/jest@24.0.18", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@types/jest@24.0.18", - "_id": "@types/jest@24.0.18", - "_inBundle": false, - "_integrity": "sha512-jcDDXdjTcrQzdN06+TSVsPPqxvsZA/5QkYfIZlq1JMw7FdP5AZylbOc+6B/cuDurctRe+MziUMtQ3xQdrbjqyQ==", - "_location": "/@types/jest", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/jest@24.0.18", - "name": "@types/jest", - "escapedName": "@types%2fjest", - "scope": "@types", - "rawSpec": "24.0.18", - "saveSpec": null, - "fetchSpec": "24.0.18" - }, - "_requiredBy": [ - "#DEV:/" - ], - "_resolved": "https://registry.npmjs.org/@types/jest/-/jest-24.0.18.tgz", - "_spec": "24.0.18", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "Asana", - "url": "https://asana.com" - }, - { - "name": "jwbay", - "url": "https://github.com/jwbay" - }, - { - "name": "Alexey Svetliakov", - "url": "https://github.com/asvetliakov" - }, - { - "name": "Alex Jover Morales", - "url": "https://github.com/alexjoverm" - }, - { - "name": "Allan Lukwago", - "url": "https://github.com/epicallan" - }, - { - "name": "Ika", - "url": "https://github.com/ikatyang" - }, - { - "name": "Waseem Dahman", - "url": "https://github.com/wsmd" - }, - { - "name": "Jamie Mason", - "url": "https://github.com/JamieMason" - }, - { - "name": "Douglas Duteil", - "url": "https://github.com/douglasduteil" - }, - { - "name": "Ahn", - "url": "https://github.com/ahnpnl" - }, - { - "name": "Josh Goldberg", - "url": "https://github.com/joshuakgoldberg" - }, - { - "name": "Jeff Lau", - "url": "https://github.com/UselessPickles" - }, - { - "name": "Andrew Makarov", - "url": "https://github.com/r3nya" - }, - { - "name": "Martin Hochel", - "url": "https://github.com/hotell" - }, - { - "name": "Sebastian Sebald", - "url": "https://github.com/sebald" - }, - { - "name": "Andy", - "url": "https://github.com/andys8" - }, - { - "name": "Antoine Brault", - "url": "https://github.com/antoinebrault" - }, - { - "name": "Jeroen Claassens", - "url": "https://github.com/favna" - }, - { - "name": "Gregor Stamać", - "url": "https://github.com/gstamac" - }, - { - "name": "ExE Boss", - "url": "https://github.com/ExE-Boss" - }, - { - "name": "Alex Bolenok", - "url": "https://github.com/quassnoi" - }, - { - "name": "Mario Beltrán Alarcón", - "url": "https://github.com/Belco90" - } - ], - "dependencies": { - "@types/jest-diff": "*" - }, - "description": "TypeScript definitions for Jest", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/jest", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/jest" - }, - "scripts": {}, - "typeScriptVersion": "3.0", - "types": "index", - "typesPublisherContentHash": "46ad84268cfe231584af91e3ffc7818b96ae90f008437707d57e3e71e9d439e3", - "version": "24.0.18" -} diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE deleted file mode 100644 index 21071075..00000000 --- a/node_modules/@types/node/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - 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/@types/node/README.md b/node_modules/@types/node/README.md deleted file mode 100644 index ddc8f09d..00000000 --- a/node_modules/@types/node/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/node` - -# Summary -This package contains type definitions for Node.js (http://nodejs.org/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node - -Additional Details - * Last updated: Tue, 03 Sep 2019 18:47:08 GMT - * Dependencies: none - * Global values: Buffer, NodeJS, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, queueMicrotask, require, setImmediate, setInterval, setTimeout - -# Credits -These definitions were written by Microsoft TypeScript , DefinitelyTyped , Alberto Schiabel , Alexander T. , Alvis HT Tang , Andrew Makarov , Benjamin Toueg , Bruno Scheufler , Chigozirim C. , Christian Vaagland Tellnes , David Junger , Deividas Bakanas , Eugene Y. Q. Shen , Flarna , Hannes Magnusson , Hoàng Văn Khải , Huw , Kelvin Jin , Klaus Meinhardt , Lishude , Mariusz Wiktorczyk , Matthieu Sieben , Mohsen Azimi , Nicolas Even , Nicolas Voigt , Parambir Singh , Sebastian Silbermann , Simon Schick , Thomas den Hollander , Wilco Bakker , wwwy3y3 , Zane Hannan AU , Samuel Ainsworth , Kyle Uehlein , Jordi Oliveras Rovira , Thanik Bhongbhibhat , and Marcin Kopacz . diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts deleted file mode 100644 index 319e5b4d..00000000 --- a/node_modules/@types/node/assert.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -declare module "assert" { - function internal(value: any, message?: string | Error): void; - namespace internal { - class AssertionError implements Error { - name: string; - message: string; - actual: any; - expected: any; - operator: string; - generatedMessage: boolean; - code: 'ERR_ASSERTION'; - - constructor(options?: { - message?: string; actual?: any; expected?: any; - operator?: string; stackStartFn?: Function - }); - } - - function fail(message?: string | Error): never; - /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */ - function fail(actual: any, expected: any, message?: string | Error, operator?: string, stackStartFn?: Function): never; - function ok(value: any, message?: string | Error): void; - /** @deprecated since v9.9.0 - use strictEqual() instead. */ - function equal(actual: any, expected: any, message?: string | Error): void; - /** @deprecated since v9.9.0 - use notStrictEqual() instead. */ - function notEqual(actual: any, expected: any, message?: string | Error): void; - /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */ - function deepEqual(actual: any, expected: any, message?: string | Error): void; - /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */ - function notDeepEqual(actual: any, expected: any, message?: string | Error): void; - function strictEqual(actual: any, expected: any, message?: string | Error): void; - function notStrictEqual(actual: any, expected: any, message?: string | Error): void; - function deepStrictEqual(actual: any, expected: any, message?: string | Error): void; - function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void; - - function throws(block: () => any, message?: string | Error): void; - function throws(block: () => any, error: RegExp | Function | Object | Error, message?: string | Error): void; - function doesNotThrow(block: () => any, message?: string | Error): void; - function doesNotThrow(block: () => any, error: RegExp | Function, message?: string | Error): void; - - function ifError(value: any): void; - - function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; - function rejects(block: (() => Promise) | Promise, error: RegExp | Function | Object | Error, message?: string | Error): Promise; - function doesNotReject(block: (() => Promise) | Promise, message?: string | Error): Promise; - function doesNotReject(block: (() => Promise) | Promise, error: RegExp | Function, message?: string | Error): Promise; - - const strict: typeof internal; - } - - export = internal; -} diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts deleted file mode 100644 index cca992ec..00000000 --- a/node_modules/@types/node/async_hooks.d.ts +++ /dev/null @@ -1,132 +0,0 @@ -/** - * Async Hooks module: https://nodejs.org/api/async_hooks.html - */ -declare module "async_hooks" { - /** - * Returns the asyncId of the current execution context. - */ - function executionAsyncId(): number; - - /** - * Returns the ID of the resource responsible for calling the callback that is currently being executed. - */ - function triggerAsyncId(): number; - - interface HookCallbacks { - /** - * Called when a class is constructed that has the possibility to emit an asynchronous event. - * @param asyncId a unique ID for the async resource - * @param type the type of the async resource - * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created - * @param resource reference to the resource representing the async operation, needs to be released during destroy - */ - init?(asyncId: number, type: string, triggerAsyncId: number, resource: Object): void; - - /** - * When an asynchronous operation is initiated or completes a callback is called to notify the user. - * The before callback is called just before said callback is executed. - * @param asyncId the unique identifier assigned to the resource about to execute the callback. - */ - before?(asyncId: number): void; - - /** - * Called immediately after the callback specified in before is completed. - * @param asyncId the unique identifier assigned to the resource which has executed the callback. - */ - after?(asyncId: number): void; - - /** - * Called when a promise has resolve() called. This may not be in the same execution id - * as the promise itself. - * @param asyncId the unique id for the promise that was resolve()d. - */ - promiseResolve?(asyncId: number): void; - - /** - * Called after the resource corresponding to asyncId is destroyed - * @param asyncId a unique ID for the async resource - */ - destroy?(asyncId: number): void; - } - - interface AsyncHook { - /** - * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop. - */ - enable(): this; - - /** - * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled. - */ - disable(): this; - } - - /** - * Registers functions to be called for different lifetime events of each async operation. - * @param options the callbacks to register - * @return an AsyncHooks instance used for disabling and enabling hooks - */ - function createHook(options: HookCallbacks): AsyncHook; - - interface AsyncResourceOptions { - /** - * The ID of the execution context that created this async event. - * Default: `executionAsyncId()` - */ - triggerAsyncId?: number; - - /** - * Disables automatic `emitDestroy` when the object is garbage collected. - * This usually does not need to be set (even if `emitDestroy` is called - * manually), unless the resource's `asyncId` is retrieved and the - * sensitive API's `emitDestroy` is called with it. - * Default: `false` - */ - requireManualDestroy?: boolean; - } - - /** - * The class AsyncResource was designed to be extended by the embedder's async resources. - * Using this users can easily trigger the lifetime events of their own resources. - */ - class AsyncResource { - /** - * AsyncResource() is meant to be extended. Instantiating a - * new AsyncResource() also triggers init. If triggerAsyncId is omitted then - * async_hook.executionAsyncId() is used. - * @param type The type of async event. - * @param triggerAsyncId The ID of the execution context that created - * this async event (default: `executionAsyncId()`), or an - * AsyncResourceOptions object (since 9.3) - */ - constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions); - - /** - * Call the provided function with the provided arguments in the - * execution context of the async resource. This will establish the - * context, trigger the AsyncHooks before callbacks, call the function, - * trigger the AsyncHooks after callbacks, and then restore the original - * execution context. - * @param fn The function to call in the execution context of this - * async resource. - * @param thisArg The receiver to be used for the function call. - * @param args Optional arguments to pass to the function. - */ - runInAsyncScope(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result; - - /** - * Call AsyncHooks destroy callbacks. - */ - emitDestroy(): void; - - /** - * @return the unique ID assigned to this AsyncResource instance. - */ - asyncId(): number; - - /** - * @return the trigger ID for this AsyncResource instance. - */ - triggerAsyncId(): number; - } -} diff --git a/node_modules/@types/node/base.d.ts b/node_modules/@types/node/base.d.ts deleted file mode 100644 index 70983d95..00000000 --- a/node_modules/@types/node/base.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -// base definnitions for all NodeJS modules that are not specific to any version of TypeScript -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts deleted file mode 100644 index 7eb1061b..00000000 --- a/node_modules/@types/node/buffer.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -declare module "buffer" { - export const INSPECT_MAX_BYTES: number; - export const kMaxLength: number; - export const kStringMaxLength: number; - export const constants: { - MAX_LENGTH: number; - MAX_STRING_LENGTH: number; - }; - const BuffType: typeof Buffer; - - export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary"; - - export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer; - - export const SlowBuffer: { - /** @deprecated since v6.0.0, use Buffer.allocUnsafeSlow() */ - new(size: number): Buffer; - prototype: Buffer; - }; - - export { BuffType as Buffer }; -} diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts deleted file mode 100644 index cff058d1..00000000 --- a/node_modules/@types/node/child_process.d.ts +++ /dev/null @@ -1,478 +0,0 @@ -declare module "child_process" { - import * as events from "events"; - import * as net from "net"; - import { Writable, Readable, Stream, Pipe } from "stream"; - - interface ChildProcess extends events.EventEmitter { - stdin: Writable | null; - stdout: Readable | null; - stderr: Readable | null; - readonly channel?: Pipe | null; - readonly stdio: [ - Writable | null, // stdin - Readable | null, // stdout - Readable | null, // stderr - Readable | Writable | null | undefined, // extra - Readable | Writable | null | undefined // extra - ]; - readonly killed: boolean; - readonly pid: number; - readonly connected: boolean; - kill(signal?: string): void; - send(message: any, callback?: (error: Error | null) => void): boolean; - send(message: any, sendHandle?: net.Socket | net.Server, callback?: (error: Error | null) => void): boolean; - send(message: any, sendHandle?: net.Socket | net.Server, options?: MessageOptions, callback?: (error: Error | null) => void): boolean; - disconnect(): void; - unref(): void; - ref(): void; - - /** - * events.EventEmitter - * 1. close - * 2. disconnect - * 3. error - * 4. exit - * 5. message - */ - - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: (code: number, signal: string) => void): this; - addListener(event: "disconnect", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this; - addListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close", code: number, signal: string): boolean; - emit(event: "disconnect"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "exit", code: number | null, signal: string | null): boolean; - emit(event: "message", message: any, sendHandle: net.Socket | net.Server): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: (code: number, signal: string) => void): this; - on(event: "disconnect", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "exit", listener: (code: number | null, signal: string | null) => void): this; - on(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: (code: number, signal: string) => void): this; - once(event: "disconnect", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "exit", listener: (code: number | null, signal: string | null) => void): this; - once(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: (code: number, signal: string) => void): this; - prependListener(event: "disconnect", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this; - prependListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: (code: number, signal: string) => void): this; - prependOnceListener(event: "disconnect", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this; - prependOnceListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; - } - - // return this object when stdio option is undefined or not specified - interface ChildProcessWithoutNullStreams extends ChildProcess { - stdin: Writable; - stdout: Readable; - stderr: Readable; - readonly stdio: [ - Writable, // stdin - Readable, // stdout - Readable, // stderr - Readable | Writable | null | undefined, // extra, no modification - Readable | Writable | null | undefined // extra, no modification - ]; - } - - // return this object when stdio option is a tuple of 3 - interface ChildProcessByStdio< - I extends null | Writable, - O extends null | Readable, - E extends null | Readable, - > extends ChildProcess { - stdin: I; - stdout: O; - stderr: E; - readonly stdio: [ - I, - O, - E, - Readable | Writable | null | undefined, // extra, no modification - Readable | Writable | null | undefined // extra, no modification - ]; - } - - interface MessageOptions { - keepOpen?: boolean; - } - - type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>; - - interface ProcessEnvOptions { - uid?: number; - gid?: number; - cwd?: string; - env?: NodeJS.ProcessEnv; - } - - interface CommonOptions extends ProcessEnvOptions { - /** - * @default true - */ - windowsHide?: boolean; - /** - * @default 0 - */ - timeout?: number; - } - - interface SpawnOptions extends CommonOptions { - argv0?: string; - stdio?: StdioOptions; - detached?: boolean; - shell?: boolean | string; - windowsVerbatimArguments?: boolean; - } - - interface SpawnOptionsWithoutStdio extends SpawnOptions { - stdio?: 'pipe' | Array; - } - - type StdioNull = 'inherit' | 'ignore' | Stream; - type StdioPipe = undefined | null | 'pipe'; - - interface SpawnOptionsWithStdioTuple< - Stdin extends StdioNull | StdioPipe, - Stdout extends StdioNull | StdioPipe, - Stderr extends StdioNull | StdioPipe, - > extends SpawnOptions { - stdio: [Stdin, Stdout, Stderr]; - } - - // overloads of spawn without 'args' - function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; - - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - - function spawn(command: string, options: SpawnOptions): ChildProcess; - - // overloads of spawn with 'args' - function spawn(command: string, args?: ReadonlyArray, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; - - function spawn( - command: string, - args: ReadonlyArray, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: ReadonlyArray, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: ReadonlyArray, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: ReadonlyArray, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: ReadonlyArray, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: ReadonlyArray, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: ReadonlyArray, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: ReadonlyArray, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - - function spawn(command: string, args: ReadonlyArray, options: SpawnOptions): ChildProcess; - - interface ExecOptions extends CommonOptions { - shell?: string; - maxBuffer?: number; - killSignal?: string; - } - - interface ExecOptionsWithStringEncoding extends ExecOptions { - encoding: BufferEncoding; - } - - interface ExecOptionsWithBufferEncoding extends ExecOptions { - encoding: string | null; // specify `null`. - } - - interface ExecException extends Error { - cmd?: string; - killed?: boolean; - code?: number; - signal?: string; - } - - // no `options` definitely means stdout/stderr are `string`. - function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; - - // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. - function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; - - // `options` with well known `encoding` means stdout/stderr are definitely `string`. - function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; - - // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. - // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. - function exec(command: string, options: { encoding: string } & ExecOptions, callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess; - - // `options` without an `encoding` means stdout/stderr are definitely `string`. - function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess; - - // fallback if nothing else matches. Worst case is always `string | Buffer`. - function exec( - command: string, - options: ({ encoding?: string | null } & ExecOptions) | undefined | null, - callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void, - ): ChildProcess; - - interface PromiseWithChild extends Promise { - child: ChildProcess; - } - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace exec { - function __promisify__(command: string): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>; - function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(command: string, options: ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(command: string, options?: ({ encoding?: string | null } & ExecOptions) | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; - } - - interface ExecFileOptions extends CommonOptions { - maxBuffer?: number; - killSignal?: string; - windowsVerbatimArguments?: boolean; - shell?: boolean | string; - } - interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { - encoding: BufferEncoding; - } - interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { - encoding: 'buffer' | null; - } - interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions { - encoding: string; - } - - function execFile(file: string): ChildProcess; - function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess; - function execFile(file: string, args?: ReadonlyArray | null): ChildProcess; - function execFile(file: string, args: ReadonlyArray | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess; - - // no `options` definitely means stdout/stderr are `string`. - function execFile(file: string, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; - function execFile(file: string, args: ReadonlyArray | undefined | null, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; - - // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. - function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess; - function execFile( - file: string, - args: ReadonlyArray | undefined | null, - options: ExecFileOptionsWithBufferEncoding, - callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void, - ): ChildProcess; - - // `options` with well known `encoding` means stdout/stderr are definitely `string`. - function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; - function execFile( - file: string, - args: ReadonlyArray | undefined | null, - options: ExecFileOptionsWithStringEncoding, - callback: (error: Error | null, stdout: string, stderr: string) => void, - ): ChildProcess; - - // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`. - // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`. - function execFile( - file: string, - options: ExecFileOptionsWithOtherEncoding, - callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void, - ): ChildProcess; - function execFile( - file: string, - args: ReadonlyArray | undefined | null, - options: ExecFileOptionsWithOtherEncoding, - callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void, - ): ChildProcess; - - // `options` without an `encoding` means stdout/stderr are definitely `string`. - function execFile(file: string, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; - function execFile(file: string, args: ReadonlyArray | undefined | null, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess; - - // fallback if nothing else matches. Worst case is always `string | Buffer`. - function execFile( - file: string, - options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, - callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null, - ): ChildProcess; - function execFile( - file: string, - args: ReadonlyArray | undefined | null, - options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, - callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null, - ): ChildProcess; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace execFile { - function __promisify__(file: string): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(file: string, args: string[] | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>; - function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>; - function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; - function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; - function __promisify__(file: string, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>; - function __promisify__(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; - function __promisify__( - file: string, - args: string[] | undefined | null, - options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, - ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>; - } - - interface ForkOptions extends ProcessEnvOptions { - execPath?: string; - execArgv?: string[]; - silent?: boolean; - stdio?: StdioOptions; - detached?: boolean; - windowsVerbatimArguments?: boolean; - } - function fork(modulePath: string, args?: ReadonlyArray, options?: ForkOptions): ChildProcess; - - interface SpawnSyncOptions extends CommonOptions { - argv0?: string; // Not specified in the docs - input?: string | NodeJS.TypedArray | DataView; - stdio?: StdioOptions; - killSignal?: string | number; - maxBuffer?: number; - encoding?: string; - shell?: boolean | string; - windowsVerbatimArguments?: boolean; - } - interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { - encoding: BufferEncoding; - } - interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { - encoding: string; // specify `null`. - } - interface SpawnSyncReturns { - pid: number; - output: string[]; - stdout: T; - stderr: T; - status: number | null; - signal: string | null; - error?: Error; - } - function spawnSync(command: string): SpawnSyncReturns; - function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; - function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; - function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; - function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; - function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; - function spawnSync(command: string, args?: ReadonlyArray, options?: SpawnSyncOptions): SpawnSyncReturns; - - interface ExecSyncOptions extends CommonOptions { - input?: string | Uint8Array; - stdio?: StdioOptions; - shell?: string; - killSignal?: string | number; - maxBuffer?: number; - encoding?: string; - } - interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { - encoding: BufferEncoding; - } - interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { - encoding: string; // specify `null`. - } - function execSync(command: string): Buffer; - function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string; - function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer; - function execSync(command: string, options?: ExecSyncOptions): Buffer; - - interface ExecFileSyncOptions extends CommonOptions { - input?: string | NodeJS.TypedArray | DataView; - stdio?: StdioOptions; - killSignal?: string | number; - maxBuffer?: number; - encoding?: string; - shell?: boolean | string; - } - interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { - encoding: BufferEncoding; - } - interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { - encoding: string; // specify `null`. - } - function execFileSync(command: string): Buffer; - function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string; - function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; - function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer; - function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptionsWithStringEncoding): string; - function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; - function execFileSync(command: string, args?: ReadonlyArray, options?: ExecFileSyncOptions): Buffer; -} diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts deleted file mode 100644 index 43340ff8..00000000 --- a/node_modules/@types/node/cluster.d.ts +++ /dev/null @@ -1,260 +0,0 @@ -declare module "cluster" { - import * as child from "child_process"; - import * as events from "events"; - import * as net from "net"; - - // interfaces - interface ClusterSettings { - execArgv?: string[]; // default: process.execArgv - exec?: string; - args?: string[]; - silent?: boolean; - stdio?: any[]; - uid?: number; - gid?: number; - inspectPort?: number | (() => number); - } - - interface Address { - address: string; - port: number; - addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6" - } - - class Worker extends events.EventEmitter { - id: number; - process: child.ChildProcess; - send(message: any, sendHandle?: any, callback?: (error: Error | null) => void): boolean; - kill(signal?: string): void; - destroy(signal?: string): void; - disconnect(): void; - isConnected(): boolean; - isDead(): boolean; - exitedAfterDisconnect: boolean; - - /** - * events.EventEmitter - * 1. disconnect - * 2. error - * 3. exit - * 4. listening - * 5. message - * 6. online - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "disconnect", listener: () => void): this; - addListener(event: "error", listener: (error: Error) => void): this; - addListener(event: "exit", listener: (code: number, signal: string) => void): this; - addListener(event: "listening", listener: (address: Address) => void): this; - addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - addListener(event: "online", listener: () => void): this; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "disconnect"): boolean; - emit(event: "error", error: Error): boolean; - emit(event: "exit", code: number, signal: string): boolean; - emit(event: "listening", address: Address): boolean; - emit(event: "message", message: any, handle: net.Socket | net.Server): boolean; - emit(event: "online"): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "disconnect", listener: () => void): this; - on(event: "error", listener: (error: Error) => void): this; - on(event: "exit", listener: (code: number, signal: string) => void): this; - on(event: "listening", listener: (address: Address) => void): this; - on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - on(event: "online", listener: () => void): this; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "disconnect", listener: () => void): this; - once(event: "error", listener: (error: Error) => void): this; - once(event: "exit", listener: (code: number, signal: string) => void): this; - once(event: "listening", listener: (address: Address) => void): this; - once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - once(event: "online", listener: () => void): this; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "disconnect", listener: () => void): this; - prependListener(event: "error", listener: (error: Error) => void): this; - prependListener(event: "exit", listener: (code: number, signal: string) => void): this; - prependListener(event: "listening", listener: (address: Address) => void): this; - prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependListener(event: "online", listener: () => void): this; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "disconnect", listener: () => void): this; - prependOnceListener(event: "error", listener: (error: Error) => void): this; - prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this; - prependOnceListener(event: "listening", listener: (address: Address) => void): this; - prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependOnceListener(event: "online", listener: () => void): this; - } - - interface Cluster extends events.EventEmitter { - Worker: Worker; - disconnect(callback?: () => void): void; - fork(env?: any): Worker; - isMaster: boolean; - isWorker: boolean; - // TODO: cluster.schedulingPolicy - settings: ClusterSettings; - setupMaster(settings?: ClusterSettings): void; - worker?: Worker; - workers?: { - [index: string]: Worker | undefined - }; - - /** - * events.EventEmitter - * 1. disconnect - * 2. exit - * 3. fork - * 4. listening - * 5. message - * 6. online - * 7. setup - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "disconnect", listener: (worker: Worker) => void): this; - addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - addListener(event: "fork", listener: (worker: Worker) => void): this; - addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - addListener(event: "online", listener: (worker: Worker) => void): this; - addListener(event: "setup", listener: (settings: ClusterSettings) => void): this; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "disconnect", worker: Worker): boolean; - emit(event: "exit", worker: Worker, code: number, signal: string): boolean; - emit(event: "fork", worker: Worker): boolean; - emit(event: "listening", worker: Worker, address: Address): boolean; - emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean; - emit(event: "online", worker: Worker): boolean; - emit(event: "setup", settings: ClusterSettings): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "disconnect", listener: (worker: Worker) => void): this; - on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - on(event: "fork", listener: (worker: Worker) => void): this; - on(event: "listening", listener: (worker: Worker, address: Address) => void): this; - on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - on(event: "online", listener: (worker: Worker) => void): this; - on(event: "setup", listener: (settings: ClusterSettings) => void): this; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "disconnect", listener: (worker: Worker) => void): this; - once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - once(event: "fork", listener: (worker: Worker) => void): this; - once(event: "listening", listener: (worker: Worker, address: Address) => void): this; - once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - once(event: "online", listener: (worker: Worker) => void): this; - once(event: "setup", listener: (settings: ClusterSettings) => void): this; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "disconnect", listener: (worker: Worker) => void): this; - prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - prependListener(event: "fork", listener: (worker: Worker) => void): this; - prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependListener(event: "online", listener: (worker: Worker) => void): this; - prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this; - prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - prependOnceListener(event: "fork", listener: (worker: Worker) => void): this; - prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - // the handle is a net.Socket or net.Server object, or undefined. - prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; - prependOnceListener(event: "online", listener: (worker: Worker) => void): this; - prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): this; - } - - function disconnect(callback?: () => void): void; - function fork(env?: any): Worker; - const isMaster: boolean; - const isWorker: boolean; - // TODO: cluster.schedulingPolicy - const settings: ClusterSettings; - function setupMaster(settings?: ClusterSettings): void; - const worker: Worker; - const workers: { - [index: string]: Worker | undefined - }; - - /** - * events.EventEmitter - * 1. disconnect - * 2. exit - * 3. fork - * 4. listening - * 5. message - * 6. online - * 7. setup - */ - function addListener(event: string, listener: (...args: any[]) => void): Cluster; - function addListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; - function addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - function addListener(event: "fork", listener: (worker: Worker) => void): Cluster; - function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - // the handle is a net.Socket or net.Server object, or undefined. - function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; - function addListener(event: "online", listener: (worker: Worker) => void): Cluster; - function addListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; - - function emit(event: string | symbol, ...args: any[]): boolean; - function emit(event: "disconnect", worker: Worker): boolean; - function emit(event: "exit", worker: Worker, code: number, signal: string): boolean; - function emit(event: "fork", worker: Worker): boolean; - function emit(event: "listening", worker: Worker, address: Address): boolean; - function emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean; - function emit(event: "online", worker: Worker): boolean; - function emit(event: "setup", settings: ClusterSettings): boolean; - - function on(event: string, listener: (...args: any[]) => void): Cluster; - function on(event: "disconnect", listener: (worker: Worker) => void): Cluster; - function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - function on(event: "fork", listener: (worker: Worker) => void): Cluster; - function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - function on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - function on(event: "online", listener: (worker: Worker) => void): Cluster; - function on(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; - - function once(event: string, listener: (...args: any[]) => void): Cluster; - function once(event: "disconnect", listener: (worker: Worker) => void): Cluster; - function once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - function once(event: "fork", listener: (worker: Worker) => void): Cluster; - function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - function once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - function once(event: "online", listener: (worker: Worker) => void): Cluster; - function once(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; - - function removeListener(event: string, listener: (...args: any[]) => void): Cluster; - function removeAllListeners(event?: string): Cluster; - function setMaxListeners(n: number): Cluster; - function getMaxListeners(): number; - function listeners(event: string): Function[]; - function listenerCount(type: string): number; - - function prependListener(event: string, listener: (...args: any[]) => void): Cluster; - function prependListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; - function prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - function prependListener(event: "fork", listener: (worker: Worker) => void): Cluster; - function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - // the handle is a net.Socket or net.Server object, or undefined. - function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; - function prependListener(event: "online", listener: (worker: Worker) => void): Cluster; - function prependListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; - - function prependOnceListener(event: string, listener: (...args: any[]) => void): Cluster; - function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; - function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster; - function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - // the handle is a net.Socket or net.Server object, or undefined. - function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; - function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster; - function prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster; - - function eventNames(): string[]; -} diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts deleted file mode 100644 index d30d13f8..00000000 --- a/node_modules/@types/node/console.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module "console" { - export = console; -} diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts deleted file mode 100644 index 577860f3..00000000 --- a/node_modules/@types/node/constants.d.ts +++ /dev/null @@ -1,278 +0,0 @@ -declare module "constants" { - const E2BIG: number; - const EACCES: number; - const EADDRINUSE: number; - const EADDRNOTAVAIL: number; - const EAFNOSUPPORT: number; - const EAGAIN: number; - const EALREADY: number; - const EBADF: number; - const EBADMSG: number; - const EBUSY: number; - const ECANCELED: number; - const ECHILD: number; - const ECONNABORTED: number; - const ECONNREFUSED: number; - const ECONNRESET: number; - const EDEADLK: number; - const EDESTADDRREQ: number; - const EDOM: number; - const EEXIST: number; - const EFAULT: number; - const EFBIG: number; - const EHOSTUNREACH: number; - const EIDRM: number; - const EILSEQ: number; - const EINPROGRESS: number; - const EINTR: number; - const EINVAL: number; - const EIO: number; - const EISCONN: number; - const EISDIR: number; - const ELOOP: number; - const EMFILE: number; - const EMLINK: number; - const EMSGSIZE: number; - const ENAMETOOLONG: number; - const ENETDOWN: number; - const ENETRESET: number; - const ENETUNREACH: number; - const ENFILE: number; - const ENOBUFS: number; - const ENODATA: number; - const ENODEV: number; - const ENOENT: number; - const ENOEXEC: number; - const ENOLCK: number; - const ENOLINK: number; - const ENOMEM: number; - const ENOMSG: number; - const ENOPROTOOPT: number; - const ENOSPC: number; - const ENOSR: number; - const ENOSTR: number; - const ENOSYS: number; - const ENOTCONN: number; - const ENOTDIR: number; - const ENOTEMPTY: number; - const ENOTSOCK: number; - const ENOTSUP: number; - const ENOTTY: number; - const ENXIO: number; - const EOPNOTSUPP: number; - const EOVERFLOW: number; - const EPERM: number; - const EPIPE: number; - const EPROTO: number; - const EPROTONOSUPPORT: number; - const EPROTOTYPE: number; - const ERANGE: number; - const EROFS: number; - const ESPIPE: number; - const ESRCH: number; - const ETIME: number; - const ETIMEDOUT: number; - const ETXTBSY: number; - const EWOULDBLOCK: number; - const EXDEV: number; - const WSAEINTR: number; - const WSAEBADF: number; - const WSAEACCES: number; - const WSAEFAULT: number; - const WSAEINVAL: number; - const WSAEMFILE: number; - const WSAEWOULDBLOCK: number; - const WSAEINPROGRESS: number; - const WSAEALREADY: number; - const WSAENOTSOCK: number; - const WSAEDESTADDRREQ: number; - const WSAEMSGSIZE: number; - const WSAEPROTOTYPE: number; - const WSAENOPROTOOPT: number; - const WSAEPROTONOSUPPORT: number; - const WSAESOCKTNOSUPPORT: number; - const WSAEOPNOTSUPP: number; - const WSAEPFNOSUPPORT: number; - const WSAEAFNOSUPPORT: number; - const WSAEADDRINUSE: number; - const WSAEADDRNOTAVAIL: number; - const WSAENETDOWN: number; - const WSAENETUNREACH: number; - const WSAENETRESET: number; - const WSAECONNABORTED: number; - const WSAECONNRESET: number; - const WSAENOBUFS: number; - const WSAEISCONN: number; - const WSAENOTCONN: number; - const WSAESHUTDOWN: number; - const WSAETOOMANYREFS: number; - const WSAETIMEDOUT: number; - const WSAECONNREFUSED: number; - const WSAELOOP: number; - const WSAENAMETOOLONG: number; - const WSAEHOSTDOWN: number; - const WSAEHOSTUNREACH: number; - const WSAENOTEMPTY: number; - const WSAEPROCLIM: number; - const WSAEUSERS: number; - const WSAEDQUOT: number; - const WSAESTALE: number; - const WSAEREMOTE: number; - const WSASYSNOTREADY: number; - const WSAVERNOTSUPPORTED: number; - const WSANOTINITIALISED: number; - const WSAEDISCON: number; - const WSAENOMORE: number; - const WSAECANCELLED: number; - const WSAEINVALIDPROCTABLE: number; - const WSAEINVALIDPROVIDER: number; - const WSAEPROVIDERFAILEDINIT: number; - const WSASYSCALLFAILURE: number; - const WSASERVICE_NOT_FOUND: number; - const WSATYPE_NOT_FOUND: number; - const WSA_E_NO_MORE: number; - const WSA_E_CANCELLED: number; - const WSAEREFUSED: number; - const SIGHUP: number; - const SIGINT: number; - const SIGILL: number; - const SIGABRT: number; - const SIGFPE: number; - const SIGKILL: number; - const SIGSEGV: number; - const SIGTERM: number; - const SIGBREAK: number; - const SIGWINCH: number; - const SSL_OP_ALL: number; - const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; - const SSL_OP_CIPHER_SERVER_PREFERENCE: number; - const SSL_OP_CISCO_ANYCONNECT: number; - const SSL_OP_COOKIE_EXCHANGE: number; - const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; - const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; - const SSL_OP_EPHEMERAL_RSA: number; - const SSL_OP_LEGACY_SERVER_CONNECT: number; - const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number; - const SSL_OP_MICROSOFT_SESS_ID_BUG: number; - const SSL_OP_MSIE_SSLV2_RSA_PADDING: number; - const SSL_OP_NETSCAPE_CA_DN_BUG: number; - const SSL_OP_NETSCAPE_CHALLENGE_BUG: number; - const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number; - const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number; - const SSL_OP_NO_COMPRESSION: number; - const SSL_OP_NO_QUERY_MTU: number; - const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; - const SSL_OP_NO_SSLv2: number; - const SSL_OP_NO_SSLv3: number; - const SSL_OP_NO_TICKET: number; - const SSL_OP_NO_TLSv1: number; - const SSL_OP_NO_TLSv1_1: number; - const SSL_OP_NO_TLSv1_2: number; - const SSL_OP_PKCS1_CHECK_1: number; - const SSL_OP_PKCS1_CHECK_2: number; - const SSL_OP_SINGLE_DH_USE: number; - const SSL_OP_SINGLE_ECDH_USE: number; - const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number; - const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number; - const SSL_OP_TLS_BLOCK_PADDING_BUG: number; - const SSL_OP_TLS_D5_BUG: number; - const SSL_OP_TLS_ROLLBACK_BUG: number; - const ENGINE_METHOD_DSA: number; - const ENGINE_METHOD_DH: number; - const ENGINE_METHOD_RAND: number; - const ENGINE_METHOD_ECDH: number; - const ENGINE_METHOD_ECDSA: number; - const ENGINE_METHOD_CIPHERS: number; - const ENGINE_METHOD_DIGESTS: number; - const ENGINE_METHOD_STORE: number; - const ENGINE_METHOD_PKEY_METHS: number; - const ENGINE_METHOD_PKEY_ASN1_METHS: number; - const ENGINE_METHOD_ALL: number; - const ENGINE_METHOD_NONE: number; - const DH_CHECK_P_NOT_SAFE_PRIME: number; - const DH_CHECK_P_NOT_PRIME: number; - const DH_UNABLE_TO_CHECK_GENERATOR: number; - const DH_NOT_SUITABLE_GENERATOR: number; - const RSA_PKCS1_PADDING: number; - const RSA_SSLV23_PADDING: number; - const RSA_NO_PADDING: number; - const RSA_PKCS1_OAEP_PADDING: number; - const RSA_X931_PADDING: number; - const RSA_PKCS1_PSS_PADDING: number; - const POINT_CONVERSION_COMPRESSED: number; - const POINT_CONVERSION_UNCOMPRESSED: number; - const POINT_CONVERSION_HYBRID: number; - const O_RDONLY: number; - const O_WRONLY: number; - const O_RDWR: number; - const S_IFMT: number; - const S_IFREG: number; - const S_IFDIR: number; - const S_IFCHR: number; - const S_IFBLK: number; - const S_IFIFO: number; - const S_IFSOCK: number; - const S_IRWXU: number; - const S_IRUSR: number; - const S_IWUSR: number; - const S_IXUSR: number; - const S_IRWXG: number; - const S_IRGRP: number; - const S_IWGRP: number; - const S_IXGRP: number; - const S_IRWXO: number; - const S_IROTH: number; - const S_IWOTH: number; - const S_IXOTH: number; - const S_IFLNK: number; - const O_CREAT: number; - const O_EXCL: number; - const O_NOCTTY: number; - const O_DIRECTORY: number; - const O_NOATIME: number; - const O_NOFOLLOW: number; - const O_SYNC: number; - const O_DSYNC: number; - const O_SYMLINK: number; - const O_DIRECT: number; - const O_NONBLOCK: number; - const O_TRUNC: number; - const O_APPEND: number; - const F_OK: number; - const R_OK: number; - const W_OK: number; - const X_OK: number; - const COPYFILE_EXCL: number; - const COPYFILE_FICLONE: number; - const COPYFILE_FICLONE_FORCE: number; - const UV_UDP_REUSEADDR: number; - const SIGQUIT: number; - const SIGTRAP: number; - const SIGIOT: number; - const SIGBUS: number; - const SIGUSR1: number; - const SIGUSR2: number; - const SIGPIPE: number; - const SIGALRM: number; - const SIGCHLD: number; - const SIGSTKFLT: number; - const SIGCONT: number; - const SIGSTOP: number; - const SIGTSTP: number; - const SIGTTIN: number; - const SIGTTOU: number; - const SIGURG: number; - const SIGXCPU: number; - const SIGXFSZ: number; - const SIGVTALRM: number; - const SIGPROF: number; - const SIGIO: number; - const SIGPOLL: number; - const SIGPWR: number; - const SIGSYS: number; - const SIGUNUSED: number; - const defaultCoreCipherList: string; - const defaultCipherList: string; - const ENGINE_METHOD_RSA: number; - const ALPN_ENABLED: number; -} diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts deleted file mode 100644 index 5c2dc091..00000000 --- a/node_modules/@types/node/crypto.d.ts +++ /dev/null @@ -1,602 +0,0 @@ -declare module "crypto" { - import * as stream from "stream"; - - interface Certificate { - exportChallenge(spkac: BinaryLike): Buffer; - exportPublicKey(spkac: BinaryLike): Buffer; - verifySpkac(spkac: Binary): boolean; - } - const Certificate: { - new(): Certificate; - (): Certificate; - }; - - namespace constants { // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants - const OPENSSL_VERSION_NUMBER: number; - - /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */ - const SSL_OP_ALL: number; - /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ - const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; - /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ - const SSL_OP_CIPHER_SERVER_PREFERENCE: number; - /** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */ - const SSL_OP_CISCO_ANYCONNECT: number; - /** Instructs OpenSSL to turn on cookie exchange. */ - const SSL_OP_COOKIE_EXCHANGE: number; - /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */ - const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; - /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */ - const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; - /** Instructs OpenSSL to always use the tmp_rsa key when performing RSA operations. */ - const SSL_OP_EPHEMERAL_RSA: number; - /** Allows initial connection to servers that do not support RI. */ - const SSL_OP_LEGACY_SERVER_CONNECT: number; - const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number; - const SSL_OP_MICROSOFT_SESS_ID_BUG: number; - /** Instructs OpenSSL to disable the workaround for a man-in-the-middle protocol-version vulnerability in the SSL 2.0 server implementation. */ - const SSL_OP_MSIE_SSLV2_RSA_PADDING: number; - const SSL_OP_NETSCAPE_CA_DN_BUG: number; - const SSL_OP_NETSCAPE_CHALLENGE_BUG: number; - const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number; - const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number; - /** Instructs OpenSSL to disable support for SSL/TLS compression. */ - const SSL_OP_NO_COMPRESSION: number; - const SSL_OP_NO_QUERY_MTU: number; - /** Instructs OpenSSL to always start a new session when performing renegotiation. */ - const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; - const SSL_OP_NO_SSLv2: number; - const SSL_OP_NO_SSLv3: number; - const SSL_OP_NO_TICKET: number; - const SSL_OP_NO_TLSv1: number; - const SSL_OP_NO_TLSv1_1: number; - const SSL_OP_NO_TLSv1_2: number; - const SSL_OP_PKCS1_CHECK_1: number; - const SSL_OP_PKCS1_CHECK_2: number; - /** Instructs OpenSSL to always create a new key when using temporary/ephemeral DH parameters. */ - const SSL_OP_SINGLE_DH_USE: number; - /** Instructs OpenSSL to always create a new key when using temporary/ephemeral ECDH parameters. */ - const SSL_OP_SINGLE_ECDH_USE: number; - const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number; - const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number; - const SSL_OP_TLS_BLOCK_PADDING_BUG: number; - const SSL_OP_TLS_D5_BUG: number; - /** Instructs OpenSSL to disable version rollback attack detection. */ - const SSL_OP_TLS_ROLLBACK_BUG: number; - - const ENGINE_METHOD_RSA: number; - const ENGINE_METHOD_DSA: number; - const ENGINE_METHOD_DH: number; - const ENGINE_METHOD_RAND: number; - const ENGINE_METHOD_EC: number; - const ENGINE_METHOD_CIPHERS: number; - const ENGINE_METHOD_DIGESTS: number; - const ENGINE_METHOD_PKEY_METHS: number; - const ENGINE_METHOD_PKEY_ASN1_METHS: number; - const ENGINE_METHOD_ALL: number; - const ENGINE_METHOD_NONE: number; - - const DH_CHECK_P_NOT_SAFE_PRIME: number; - const DH_CHECK_P_NOT_PRIME: number; - const DH_UNABLE_TO_CHECK_GENERATOR: number; - const DH_NOT_SUITABLE_GENERATOR: number; - - const ALPN_ENABLED: number; - - const RSA_PKCS1_PADDING: number; - const RSA_SSLV23_PADDING: number; - const RSA_NO_PADDING: number; - const RSA_PKCS1_OAEP_PADDING: number; - const RSA_X931_PADDING: number; - const RSA_PKCS1_PSS_PADDING: number; - /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */ - const RSA_PSS_SALTLEN_DIGEST: number; - /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */ - const RSA_PSS_SALTLEN_MAX_SIGN: number; - /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */ - const RSA_PSS_SALTLEN_AUTO: number; - - const POINT_CONVERSION_COMPRESSED: number; - const POINT_CONVERSION_UNCOMPRESSED: number; - const POINT_CONVERSION_HYBRID: number; - - /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */ - const defaultCoreCipherList: string; - /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */ - const defaultCipherList: string; - } - - /** @deprecated since v10.0.0 */ - const fips: boolean; - - function createHash(algorithm: string, options?: stream.TransformOptions): Hash; - function createHmac(algorithm: string, key: BinaryLike, options?: stream.TransformOptions): Hmac; - - type Utf8AsciiLatin1Encoding = "utf8" | "ascii" | "latin1"; - type HexBase64Latin1Encoding = "latin1" | "hex" | "base64"; - type Utf8AsciiBinaryEncoding = "utf8" | "ascii" | "binary"; - type HexBase64BinaryEncoding = "binary" | "base64" | "hex"; - type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; - - class Hash extends stream.Transform { - private constructor(); - update(data: BinaryLike): Hash; - update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hash; - digest(): Buffer; - digest(encoding: HexBase64Latin1Encoding): string; - } - class Hmac extends stream.Transform { - private constructor(); - update(data: BinaryLike): Hmac; - update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hmac; - digest(): Buffer; - digest(encoding: HexBase64Latin1Encoding): string; - } - - export type KeyObjectType = 'secret' | 'public' | 'private'; - - interface KeyExportOptions { - type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1'; - format: T; - cipher?: string; - passphrase?: string | Buffer; - } - - class KeyObject { - private constructor(); - asymmetricKeyType?: KeyType; - /** - * For asymmetric keys, this property represents the size of the embedded key in - * bytes. This property is `undefined` for symmetric keys. - */ - asymmetricKeySize?: number; - export(options: KeyExportOptions<'pem'>): string | Buffer; - export(options?: KeyExportOptions<'der'>): Buffer; - symmetricSize?: number; - type: KeyObjectType; - } - - type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm'; - type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm'; - - type Binary = NodeJS.TypedArray | DataView; - type BinaryLike = string | Binary; - - type CipherKey = BinaryLike | KeyObject; - - interface CipherCCMOptions extends stream.TransformOptions { - authTagLength: number; - } - interface CipherGCMOptions extends stream.TransformOptions { - authTagLength?: number; - } - /** @deprecated since v10.0.0 use createCipheriv() */ - function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM; - /** @deprecated since v10.0.0 use createCipheriv() */ - function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM; - /** @deprecated since v10.0.0 use createCipheriv() */ - function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher; - - function createCipheriv( - algorithm: CipherCCMTypes, - key: CipherKey, - iv: BinaryLike | null, - options: CipherCCMOptions - ): CipherCCM; - function createCipheriv( - algorithm: CipherGCMTypes, - key: CipherKey, - iv: BinaryLike | null, - options?: CipherGCMOptions - ): CipherGCM; - function createCipheriv( - algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions - ): Cipher; - - class Cipher extends stream.Transform { - private constructor(); - update(data: BinaryLike): Buffer; - update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer; - update(data: Binary, input_encoding: undefined, output_encoding: HexBase64BinaryEncoding): string; - update(data: string, input_encoding: Utf8AsciiBinaryEncoding | undefined, output_encoding: HexBase64BinaryEncoding): string; - final(): Buffer; - final(output_encoding: string): string; - setAutoPadding(auto_padding?: boolean): this; - // getAuthTag(): Buffer; - // setAAD(buffer: Buffer): this; // docs only say buffer - } - interface CipherCCM extends Cipher { - setAAD(buffer: Buffer, options: { plaintextLength: number }): this; - getAuthTag(): Buffer; - } - interface CipherGCM extends Cipher { - setAAD(buffer: Buffer, options?: { plaintextLength: number }): this; - getAuthTag(): Buffer; - } - /** @deprecated since v10.0.0 use createCipheriv() */ - function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM; - /** @deprecated since v10.0.0 use createCipheriv() */ - function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM; - /** @deprecated since v10.0.0 use createCipheriv() */ - function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher; - - function createDecipheriv( - algorithm: CipherCCMTypes, - key: BinaryLike, - iv: BinaryLike | null, - options: CipherCCMOptions, - ): DecipherCCM; - function createDecipheriv( - algorithm: CipherGCMTypes, - key: BinaryLike, - iv: BinaryLike | null, - options?: CipherGCMOptions, - ): DecipherGCM; - function createDecipheriv(algorithm: string, key: BinaryLike, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher; - - class Decipher extends stream.Transform { - private constructor(); - update(data: Binary): Buffer; - update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer; - update(data: Binary, input_encoding: undefined, output_encoding: Utf8AsciiBinaryEncoding): string; - update(data: string, input_encoding: HexBase64BinaryEncoding | undefined, output_encoding: Utf8AsciiBinaryEncoding): string; - final(): Buffer; - final(output_encoding: string): string; - setAutoPadding(auto_padding?: boolean): this; - // setAuthTag(tag: Binary): this; - // setAAD(buffer: Binary): this; - } - interface DecipherCCM extends Decipher { - setAuthTag(buffer: Binary): this; - setAAD(buffer: Binary, options: { plaintextLength: number }): this; - } - interface DecipherGCM extends Decipher { - setAuthTag(buffer: Binary): this; - setAAD(buffer: Binary, options?: { plaintextLength: number }): this; - } - - interface PrivateKeyInput { - key: string | Buffer; - format?: KeyFormat; - type?: 'pkcs1' | 'pkcs8' | 'sec1'; - passphrase?: string | Buffer; - } - - interface PublicKeyInput { - key: string | Buffer; - format?: KeyFormat; - type?: 'pkcs1' | 'spki'; - } - - function createPrivateKey(key: PrivateKeyInput | string | Buffer): KeyObject; - function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject): KeyObject; - function createSecretKey(key: Buffer): KeyObject; - - function createSign(algorithm: string, options?: stream.WritableOptions): Signer; - - interface SigningOptions { - /** - * @See crypto.constants.RSA_PKCS1_PADDING - */ - padding?: number; - saltLength?: number; - } - - interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions { - } - - type KeyLike = string | Buffer | KeyObject; - - class Signer extends stream.Writable { - private constructor(); - - update(data: BinaryLike): Signer; - update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer; - sign(private_key: SignPrivateKeyInput | KeyLike): Buffer; - sign(private_key: SignPrivateKeyInput | KeyLike, output_format: HexBase64Latin1Encoding): string; - } - - function createVerify(algorithm: string, options?: stream.WritableOptions): Verify; - class Verify extends stream.Writable { - private constructor(); - - update(data: BinaryLike): Verify; - update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Verify; - verify(object: Object | KeyLike, signature: Binary): boolean; - verify(object: Object | KeyLike, signature: string, signature_format?: HexBase64Latin1Encoding): boolean; - // https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format - // The signature field accepts a TypedArray type, but it is only available starting ES2017 - } - function createDiffieHellman(prime_length: number, generator?: number | Binary): DiffieHellman; - function createDiffieHellman(prime: Binary): DiffieHellman; - function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman; - function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | Binary): DiffieHellman; - function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman; - class DiffieHellman { - private constructor(); - generateKeys(): Buffer; - generateKeys(encoding: HexBase64Latin1Encoding): string; - computeSecret(other_public_key: Binary): Buffer; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; - computeSecret(other_public_key: Binary, output_encoding: HexBase64Latin1Encoding): string; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; - getPrime(): Buffer; - getPrime(encoding: HexBase64Latin1Encoding): string; - getGenerator(): Buffer; - getGenerator(encoding: HexBase64Latin1Encoding): string; - getPublicKey(): Buffer; - getPublicKey(encoding: HexBase64Latin1Encoding): string; - getPrivateKey(): Buffer; - getPrivateKey(encoding: HexBase64Latin1Encoding): string; - setPublicKey(public_key: Binary): void; - setPublicKey(public_key: string, encoding: string): void; - setPrivateKey(private_key: Binary): void; - setPrivateKey(private_key: string, encoding: string): void; - verifyError: number; - } - function getDiffieHellman(group_name: string): DiffieHellman; - function pbkdf2( - password: BinaryLike, - salt: BinaryLike, - iterations: number, - keylen: number, - digest: string, - callback: (err: Error | null, derivedKey: Buffer) => any, - ): void; - function pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer; - - function randomBytes(size: number): Buffer; - function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; - function pseudoRandomBytes(size: number): Buffer; - function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void; - - function randomFillSync(buffer: T, offset?: number, size?: number): T; - function randomFill(buffer: T, callback: (err: Error | null, buf: T) => void): void; - function randomFill(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void; - function randomFill(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void; - - interface ScryptOptions { - N?: number; - r?: number; - p?: number; - maxmem?: number; - } - function scrypt( - password: BinaryLike, - salt: BinaryLike, - keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void, - ): void; - function scrypt( - password: BinaryLike, - salt: BinaryLike, - keylen: number, - options: ScryptOptions, - callback: (err: Error | null, derivedKey: Buffer) => void, - ): void; - function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer; - - interface RsaPublicKey { - key: KeyLike; - padding?: number; - } - interface RsaPrivateKey { - key: KeyLike; - passphrase?: string; - padding?: number; - } - function publicEncrypt(public_key: RsaPublicKey | KeyLike, buffer: Binary): Buffer; - function privateDecrypt(private_key: RsaPrivateKey | KeyLike, buffer: Binary): Buffer; - function privateEncrypt(private_key: RsaPrivateKey | KeyLike, buffer: Binary): Buffer; - function publicDecrypt(public_key: RsaPublicKey | KeyLike, buffer: Binary): Buffer; - function getCiphers(): string[]; - function getCurves(): string[]; - function getHashes(): string[]; - class ECDH { - private constructor(); - static convertKey( - key: BinaryLike, - curve: string, - inputEncoding?: HexBase64Latin1Encoding, - outputEncoding?: "latin1" | "hex" | "base64", - format?: "uncompressed" | "compressed" | "hybrid", - ): Buffer | string; - generateKeys(): Buffer; - generateKeys(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string; - computeSecret(other_public_key: Binary): Buffer; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; - computeSecret(other_public_key: Binary, output_encoding: HexBase64Latin1Encoding): string; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; - getPrivateKey(): Buffer; - getPrivateKey(encoding: HexBase64Latin1Encoding): string; - getPublicKey(): Buffer; - getPublicKey(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string; - setPrivateKey(private_key: Binary): void; - setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void; - } - function createECDH(curve_name: string): ECDH; - function timingSafeEqual(a: Binary, b: Binary): boolean; - /** @deprecated since v10.0.0 */ - const DEFAULT_ENCODING: string; - - export type KeyType = 'rsa' | 'dsa' | 'ec'; - export type KeyFormat = 'pem' | 'der'; - - interface BasePrivateKeyEncodingOptions { - format: T; - cipher?: string; - passphrase?: string; - } - - interface KeyPairKeyObjectResult { - publicKey: KeyObject; - privateKey: KeyObject; - } - - interface ECKeyPairKeyObjectOptions { - /** - * Name of the curve to use. - */ - namedCurve: string; - } - - interface RSAKeyPairKeyObjectOptions { - /** - * Key size in bits - */ - modulusLength: number; - - /** - * @default 0x10001 - */ - publicExponent?: number; - } - - interface DSAKeyPairKeyObjectOptions { - /** - * Key size in bits - */ - modulusLength: number; - - /** - * Size of q in bits - */ - divisorLength: number; - } - - interface RSAKeyPairOptions { - /** - * Key size in bits - */ - modulusLength: number; - /** - * @default 0x10001 - */ - publicExponent?: number; - - publicKeyEncoding: { - type: 'pkcs1' | 'spki'; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: 'pkcs1' | 'pkcs8'; - }; - } - - interface DSAKeyPairOptions { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Size of q in bits - */ - divisorLength: number; - - publicKeyEncoding: { - type: 'spki'; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: 'pkcs8'; - }; - } - - interface ECKeyPairOptions { - /** - * Name of the curve to use. - */ - namedCurve: string; - - publicKeyEncoding: { - type: 'pkcs1' | 'spki'; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: 'sec1' | 'pkcs8'; - }; - } - - interface KeyPairSyncResult { - publicKey: T1; - privateKey: T2; - } - - function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; - function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; - function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; - function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult; - function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; - - function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; - function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; - function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; - function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult; - function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; - - function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult; - function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult; - function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult; - function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult; - function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult; - - function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; - function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; - function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; - function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; - function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; - - function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; - function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; - function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; - function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; - function generateKeyPair(type: 'dsa', options: DSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; - - function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void; - function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void; - function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void; - function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void; - function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void; - - namespace generateKeyPair { - function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>; - function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>; - function __promisify__(type: "rsa", options: RSAKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>; - function __promisify__(type: "rsa", options: RSAKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>; - function __promisify__(type: "rsa", options: RSAKeyPairKeyObjectOptions): Promise; - - function __promisify__(type: "dsa", options: DSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>; - function __promisify__(type: "dsa", options: DSAKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>; - function __promisify__(type: "dsa", options: DSAKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>; - function __promisify__(type: "dsa", options: DSAKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>; - function __promisify__(type: "dsa", options: DSAKeyPairKeyObjectOptions): Promise; - - function __promisify__(type: "ec", options: ECKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>; - function __promisify__(type: "ec", options: ECKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>; - function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>; - function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>; - function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise; - } - - /** - * Calculates and returns the signature for `data` using the given private key and - * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is - * dependent upon the key type (especially Ed25519 and Ed448). - * - * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been - * passed to [`crypto.createPrivateKey()`][]. - */ - function sign(algorithm: string | null | undefined, data: Binary, key: KeyLike | SignPrivateKeyInput): Buffer; - - interface VerifyKeyWithOptions extends KeyObject, SigningOptions { - } - - /** - * Calculates and returns the signature for `data` using the given private key and - * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is - * dependent upon the key type (especially Ed25519 and Ed448). - * - * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been - * passed to [`crypto.createPublicKey()`][]. - */ - function verify(algorithm: string | null | undefined, data: Binary, key: KeyLike | VerifyKeyWithOptions, signature: Binary): Buffer; -} diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts deleted file mode 100644 index c42acdfa..00000000 --- a/node_modules/@types/node/dgram.d.ts +++ /dev/null @@ -1,102 +0,0 @@ -declare module "dgram" { - import { AddressInfo } from "net"; - import * as dns from "dns"; - import * as events from "events"; - - interface RemoteInfo { - address: string; - family: 'IPv4' | 'IPv6'; - port: number; - size: number; - } - - interface BindOptions { - port: number; - address?: string; - exclusive?: boolean; - } - - type SocketType = "udp4" | "udp6"; - - interface SocketOptions { - type: SocketType; - reuseAddr?: boolean; - /** - * @default false - */ - ipv6Only?: boolean; - recvBufferSize?: number; - sendBufferSize?: number; - lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void; - } - - function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; - function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; - - class Socket extends events.EventEmitter { - send(msg: string | Uint8Array | any[], port: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void; - send(msg: string | Uint8Array, offset: number, length: number, port: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void; - bind(port?: number, address?: string, callback?: () => void): void; - bind(port?: number, callback?: () => void): void; - bind(callback?: () => void): void; - bind(options: BindOptions, callback?: () => void): void; - close(callback?: () => void): void; - address(): AddressInfo | string; - setBroadcast(flag: boolean): void; - setTTL(ttl: number): void; - setMulticastTTL(ttl: number): void; - setMulticastInterface(multicastInterface: string): void; - setMulticastLoopback(flag: boolean): void; - addMembership(multicastAddress: string, multicastInterface?: string): void; - dropMembership(multicastAddress: string, multicastInterface?: string): void; - ref(): this; - unref(): this; - setRecvBufferSize(size: number): void; - setSendBufferSize(size: number): void; - getRecvBufferSize(): number; - getSendBufferSize(): number; - - /** - * events.EventEmitter - * 1. close - * 2. error - * 3. listening - * 4. message - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - addListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - emit(event: "message", msg: Buffer, rinfo: RemoteInfo): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - on(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - once(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - prependListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; - prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this; - } -} diff --git a/node_modules/@types/node/dns.d.ts b/node_modules/@types/node/dns.d.ts deleted file mode 100644 index d2b05056..00000000 --- a/node_modules/@types/node/dns.d.ts +++ /dev/null @@ -1,366 +0,0 @@ -declare module "dns" { - // Supported getaddrinfo flags. - const ADDRCONFIG: number; - const V4MAPPED: number; - - interface LookupOptions { - family?: number; - hints?: number; - all?: boolean; - verbatim?: boolean; - } - - interface LookupOneOptions extends LookupOptions { - all?: false; - } - - interface LookupAllOptions extends LookupOptions { - all: true; - } - - interface LookupAddress { - address: string; - family: number; - } - - function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; - function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; - function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void; - function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void; - function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace lookup { - function __promisify__(hostname: string, options: LookupAllOptions): Promise; - function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise; - function __promisify__(hostname: string, options: LookupOptions): Promise; - } - - function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void; - - namespace lookupService { - function __promisify__(address: string, port: number): Promise<{ hostname: string, service: string }>; - } - - interface ResolveOptions { - ttl: boolean; - } - - interface ResolveWithTtlOptions extends ResolveOptions { - ttl: true; - } - - interface RecordWithTtl { - address: string; - ttl: number; - } - - /** @deprecated Use AnyARecord or AnyAaaaRecord instead. */ - type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord; - - interface AnyARecord extends RecordWithTtl { - type: "A"; - } - - interface AnyAaaaRecord extends RecordWithTtl { - type: "AAAA"; - } - - interface MxRecord { - priority: number; - exchange: string; - } - - interface AnyMxRecord extends MxRecord { - type: "MX"; - } - - interface NaptrRecord { - flags: string; - service: string; - regexp: string; - replacement: string; - order: number; - preference: number; - } - - interface AnyNaptrRecord extends NaptrRecord { - type: "NAPTR"; - } - - interface SoaRecord { - nsname: string; - hostmaster: string; - serial: number; - refresh: number; - retry: number; - expire: number; - minttl: number; - } - - interface AnySoaRecord extends SoaRecord { - type: "SOA"; - } - - interface SrvRecord { - priority: number; - weight: number; - port: number; - name: string; - } - - interface AnySrvRecord extends SrvRecord { - type: "SRV"; - } - - interface AnyTxtRecord { - type: "TXT"; - entries: string[]; - } - - interface AnyNsRecord { - type: "NS"; - value: string; - } - - interface AnyPtrRecord { - type: "PTR"; - value: string; - } - - interface AnyCnameRecord { - type: "CNAME"; - value: string; - } - - type AnyRecord = AnyARecord | - AnyAaaaRecord | - AnyCnameRecord | - AnyMxRecord | - AnyNaptrRecord | - AnyNsRecord | - AnyPtrRecord | - AnySoaRecord | - AnySrvRecord | - AnyTxtRecord; - - function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void; - function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void; - function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void; - function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void; - function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void; - function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void; - function resolve( - hostname: string, - rrtype: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void, - ): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace resolve { - function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; - function __promisify__(hostname: string, rrtype: "ANY"): Promise; - function __promisify__(hostname: string, rrtype: "MX"): Promise; - function __promisify__(hostname: string, rrtype: "NAPTR"): Promise; - function __promisify__(hostname: string, rrtype: "SOA"): Promise; - function __promisify__(hostname: string, rrtype: "SRV"): Promise; - function __promisify__(hostname: string, rrtype: "TXT"): Promise; - function __promisify__(hostname: string, rrtype: string): Promise; - } - - function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void; - function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace resolve4 { - function __promisify__(hostname: string): Promise; - function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; - function __promisify__(hostname: string, options?: ResolveOptions): Promise; - } - - function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void; - function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace resolve6 { - function __promisify__(hostname: string): Promise; - function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; - function __promisify__(hostname: string, options?: ResolveOptions): Promise; - } - - function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - namespace resolveCname { - function __promisify__(hostname: string): Promise; - } - - function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void; - namespace resolveMx { - function __promisify__(hostname: string): Promise; - } - - function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void; - namespace resolveNaptr { - function __promisify__(hostname: string): Promise; - } - - function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - namespace resolveNs { - function __promisify__(hostname: string): Promise; - } - - function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void; - namespace resolvePtr { - function __promisify__(hostname: string): Promise; - } - - function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void; - namespace resolveSoa { - function __promisify__(hostname: string): Promise; - } - - function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void; - namespace resolveSrv { - function __promisify__(hostname: string): Promise; - } - - function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void; - namespace resolveTxt { - function __promisify__(hostname: string): Promise; - } - - function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void; - namespace resolveAny { - function __promisify__(hostname: string): Promise; - } - - function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void; - function setServers(servers: ReadonlyArray): void; - function getServers(): string[]; - - // Error codes - const NODATA: string; - const FORMERR: string; - const SERVFAIL: string; - const NOTFOUND: string; - const NOTIMP: string; - const REFUSED: string; - const BADQUERY: string; - const BADNAME: string; - const BADFAMILY: string; - const BADRESP: string; - const CONNREFUSED: string; - const TIMEOUT: string; - const EOF: string; - const FILE: string; - const NOMEM: string; - const DESTRUCTION: string; - const BADSTR: string; - const BADFLAGS: string; - const NONAME: string; - const BADHINTS: string; - const NOTINITIALIZED: string; - const LOADIPHLPAPI: string; - const ADDRGETNETWORKPARAMS: string; - const CANCELLED: string; - - class Resolver { - getServers: typeof getServers; - setServers: typeof setServers; - resolve: typeof resolve; - resolve4: typeof resolve4; - resolve6: typeof resolve6; - resolveAny: typeof resolveAny; - resolveCname: typeof resolveCname; - resolveMx: typeof resolveMx; - resolveNaptr: typeof resolveNaptr; - resolveNs: typeof resolveNs; - resolvePtr: typeof resolvePtr; - resolveSoa: typeof resolveSoa; - resolveSrv: typeof resolveSrv; - resolveTxt: typeof resolveTxt; - reverse: typeof reverse; - cancel(): void; - } - - namespace promises { - function getServers(): string[]; - - function lookup(hostname: string, family: number): Promise; - function lookup(hostname: string, options: LookupOneOptions): Promise; - function lookup(hostname: string, options: LookupAllOptions): Promise; - function lookup(hostname: string, options: LookupOptions): Promise; - function lookup(hostname: string): Promise; - - function lookupService(address: string, port: number): Promise<{ hostname: string, service: string }>; - - function resolve(hostname: string): Promise; - function resolve(hostname: string, rrtype: "A"): Promise; - function resolve(hostname: string, rrtype: "AAAA"): Promise; - function resolve(hostname: string, rrtype: "ANY"): Promise; - function resolve(hostname: string, rrtype: "CNAME"): Promise; - function resolve(hostname: string, rrtype: "MX"): Promise; - function resolve(hostname: string, rrtype: "NAPTR"): Promise; - function resolve(hostname: string, rrtype: "NS"): Promise; - function resolve(hostname: string, rrtype: "PTR"): Promise; - function resolve(hostname: string, rrtype: "SOA"): Promise; - function resolve(hostname: string, rrtype: "SRV"): Promise; - function resolve(hostname: string, rrtype: "TXT"): Promise; - function resolve(hostname: string, rrtype: string): Promise; - - function resolve4(hostname: string): Promise; - function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise; - function resolve4(hostname: string, options: ResolveOptions): Promise; - - function resolve6(hostname: string): Promise; - function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise; - function resolve6(hostname: string, options: ResolveOptions): Promise; - - function resolveAny(hostname: string): Promise; - - function resolveCname(hostname: string): Promise; - - function resolveMx(hostname: string): Promise; - - function resolveNaptr(hostname: string): Promise; - - function resolveNs(hostname: string): Promise; - - function resolvePtr(hostname: string): Promise; - - function resolveSoa(hostname: string): Promise; - - function resolveSrv(hostname: string): Promise; - - function resolveTxt(hostname: string): Promise; - - function reverse(ip: string): Promise; - - function setServers(servers: ReadonlyArray): void; - - class Resolver { - getServers: typeof getServers; - resolve: typeof resolve; - resolve4: typeof resolve4; - resolve6: typeof resolve6; - resolveAny: typeof resolveAny; - resolveCname: typeof resolveCname; - resolveMx: typeof resolveMx; - resolveNaptr: typeof resolveNaptr; - resolveNs: typeof resolveNs; - resolvePtr: typeof resolvePtr; - resolveSoa: typeof resolveSoa; - resolveSrv: typeof resolveSrv; - resolveTxt: typeof resolveTxt; - reverse: typeof reverse; - setServers: typeof setServers; - } - } -} diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts deleted file mode 100644 index 45e388c4..00000000 --- a/node_modules/@types/node/domain.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -declare module "domain" { - import * as events from "events"; - - class Domain extends events.EventEmitter implements NodeJS.Domain { - run(fn: (...args: any[]) => T, ...args: any[]): T; - add(emitter: events.EventEmitter | NodeJS.Timer): void; - remove(emitter: events.EventEmitter | NodeJS.Timer): void; - bind(cb: T): T; - intercept(cb: T): T; - members: Array; - enter(): void; - exit(): void; - } - - function create(): Domain; -} diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts deleted file mode 100644 index f8610210..00000000 --- a/node_modules/@types/node/events.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -declare module "events" { - class internal extends NodeJS.EventEmitter { } - - namespace internal { - function once(emitter: EventEmitter, event: string | symbol): Promise; - class EventEmitter extends internal { - /** @deprecated since v4.0.0 */ - static listenerCount(emitter: EventEmitter, event: string | symbol): number; - static defaultMaxListeners: number; - - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - removeListener(event: string | symbol, listener: (...args: any[]) => void): this; - off(event: string | symbol, listener: (...args: any[]) => void): this; - removeAllListeners(event?: string | symbol): this; - setMaxListeners(n: number): this; - getMaxListeners(): number; - listeners(event: string | symbol): Function[]; - rawListeners(event: string | symbol): Function[]; - emit(event: string | symbol, ...args: any[]): boolean; - eventNames(): Array; - listenerCount(type: string | symbol): number; - } - } - - export = internal; -} diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts deleted file mode 100644 index bc015cec..00000000 --- a/node_modules/@types/node/fs.d.ts +++ /dev/null @@ -1,2297 +0,0 @@ -declare module "fs" { - import * as stream from "stream"; - import * as events from "events"; - import { URL } from "url"; - - /** - * Valid types for path values in "fs". - */ - type PathLike = string | Buffer | URL; - - type BinaryData = DataView | NodeJS.TypedArray; - class Stats { - isFile(): boolean; - isDirectory(): boolean; - isBlockDevice(): boolean; - isCharacterDevice(): boolean; - isSymbolicLink(): boolean; - isFIFO(): boolean; - isSocket(): boolean; - dev: number; - ino: number; - mode: number; - nlink: number; - uid: number; - gid: number; - rdev: number; - size: number; - blksize: number; - blocks: number; - atimeMs: number; - mtimeMs: number; - ctimeMs: number; - birthtimeMs: number; - atime: Date; - mtime: Date; - ctime: Date; - birthtime: Date; - } - - class Dirent { - isFile(): boolean; - isDirectory(): boolean; - isBlockDevice(): boolean; - isCharacterDevice(): boolean; - isSymbolicLink(): boolean; - isFIFO(): boolean; - isSocket(): boolean; - name: string; - } - - interface FSWatcher extends events.EventEmitter { - close(): void; - - /** - * events.EventEmitter - * 1. change - * 2. error - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - addListener(event: "error", listener: (error: Error) => void): this; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - on(event: "error", listener: (error: Error) => void): this; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - once(event: "error", listener: (error: Error) => void): this; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - prependListener(event: "error", listener: (error: Error) => void): this; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - prependOnceListener(event: "error", listener: (error: Error) => void): this; - } - - class ReadStream extends stream.Readable { - close(): void; - bytesRead: number; - path: string | Buffer; - - /** - * events.EventEmitter - * 1. open - * 2. close - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "open", listener: (fd: number) => void): this; - addListener(event: "close", listener: () => void): this; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "open", listener: (fd: number) => void): this; - on(event: "close", listener: () => void): this; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "open", listener: (fd: number) => void): this; - once(event: "close", listener: () => void): this; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "open", listener: (fd: number) => void): this; - prependListener(event: "close", listener: () => void): this; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "open", listener: (fd: number) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - } - - class WriteStream extends stream.Writable { - close(): void; - bytesWritten: number; - path: string | Buffer; - - /** - * events.EventEmitter - * 1. open - * 2. close - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "open", listener: (fd: number) => void): this; - addListener(event: "close", listener: () => void): this; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "open", listener: (fd: number) => void): this; - on(event: "close", listener: () => void): this; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "open", listener: (fd: number) => void): this; - once(event: "close", listener: () => void): this; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "open", listener: (fd: number) => void): this; - prependListener(event: "close", listener: () => void): this; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "open", listener: (fd: number) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - } - - /** - * Asynchronous rename(2) - Change the name or location of a file or directory. - * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace rename { - /** - * Asynchronous rename(2) - Change the name or location of a file or directory. - * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function __promisify__(oldPath: PathLike, newPath: PathLike): Promise; - } - - /** - * Synchronous rename(2) - Change the name or location of a file or directory. - * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function renameSync(oldPath: PathLike, newPath: PathLike): void; - - /** - * Asynchronous truncate(2) - Truncate a file to a specified length. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param len If not specified, defaults to `0`. - */ - function truncate(path: PathLike, len: number | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void; - - /** - * Asynchronous truncate(2) - Truncate a file to a specified length. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace truncate { - /** - * Asynchronous truncate(2) - Truncate a file to a specified length. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param len If not specified, defaults to `0`. - */ - function __promisify__(path: PathLike, len?: number | null): Promise; - } - - /** - * Synchronous truncate(2) - Truncate a file to a specified length. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param len If not specified, defaults to `0`. - */ - function truncateSync(path: PathLike, len?: number | null): void; - - /** - * Asynchronous ftruncate(2) - Truncate a file to a specified length. - * @param fd A file descriptor. - * @param len If not specified, defaults to `0`. - */ - function ftruncate(fd: number, len: number | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void; - - /** - * Asynchronous ftruncate(2) - Truncate a file to a specified length. - * @param fd A file descriptor. - */ - function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace ftruncate { - /** - * Asynchronous ftruncate(2) - Truncate a file to a specified length. - * @param fd A file descriptor. - * @param len If not specified, defaults to `0`. - */ - function __promisify__(fd: number, len?: number | null): Promise; - } - - /** - * Synchronous ftruncate(2) - Truncate a file to a specified length. - * @param fd A file descriptor. - * @param len If not specified, defaults to `0`. - */ - function ftruncateSync(fd: number, len?: number | null): void; - - /** - * Asynchronous chown(2) - Change ownership of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace chown { - /** - * Asynchronous chown(2) - Change ownership of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike, uid: number, gid: number): Promise; - } - - /** - * Synchronous chown(2) - Change ownership of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function chownSync(path: PathLike, uid: number, gid: number): void; - - /** - * Asynchronous fchown(2) - Change ownership of a file. - * @param fd A file descriptor. - */ - function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace fchown { - /** - * Asynchronous fchown(2) - Change ownership of a file. - * @param fd A file descriptor. - */ - function __promisify__(fd: number, uid: number, gid: number): Promise; - } - - /** - * Synchronous fchown(2) - Change ownership of a file. - * @param fd A file descriptor. - */ - function fchownSync(fd: number, uid: number, gid: number): void; - - /** - * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace lchown { - /** - * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike, uid: number, gid: number): Promise; - } - - /** - * Synchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function lchownSync(path: PathLike, uid: number, gid: number): void; - - /** - * Asynchronous chmod(2) - Change permissions of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function chmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace chmod { - /** - * Asynchronous chmod(2) - Change permissions of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function __promisify__(path: PathLike, mode: string | number): Promise; - } - - /** - * Synchronous chmod(2) - Change permissions of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function chmodSync(path: PathLike, mode: string | number): void; - - /** - * Asynchronous fchmod(2) - Change permissions of a file. - * @param fd A file descriptor. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace fchmod { - /** - * Asynchronous fchmod(2) - Change permissions of a file. - * @param fd A file descriptor. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function __promisify__(fd: number, mode: string | number): Promise; - } - - /** - * Synchronous fchmod(2) - Change permissions of a file. - * @param fd A file descriptor. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function fchmodSync(fd: number, mode: string | number): void; - - /** - * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function lchmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace lchmod { - /** - * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function __promisify__(path: PathLike, mode: string | number): Promise; - } - - /** - * Synchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function lchmodSync(path: PathLike, mode: string | number): void; - - /** - * Asynchronous stat(2) - Get file status. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace stat { - /** - * Asynchronous stat(2) - Get file status. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike): Promise; - } - - /** - * Synchronous stat(2) - Get file status. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function statSync(path: PathLike): Stats; - - /** - * Asynchronous fstat(2) - Get file status. - * @param fd A file descriptor. - */ - function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace fstat { - /** - * Asynchronous fstat(2) - Get file status. - * @param fd A file descriptor. - */ - function __promisify__(fd: number): Promise; - } - - /** - * Synchronous fstat(2) - Get file status. - * @param fd A file descriptor. - */ - function fstatSync(fd: number): Stats; - - /** - * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace lstat { - /** - * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike): Promise; - } - - /** - * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function lstatSync(path: PathLike): Stats; - - /** - * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. - * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace link { - /** - * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. - * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function link(existingPath: PathLike, newPath: PathLike): Promise; - } - - /** - * Synchronous link(2) - Create a new link (also known as a hard link) to an existing file. - * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function linkSync(existingPath: PathLike, newPath: PathLike): void; - - /** - * Asynchronous symlink(2) - Create a new symbolic link to an existing file. - * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. - * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. - * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). - * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. - */ - function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void; - - /** - * Asynchronous symlink(2) - Create a new symbolic link to an existing file. - * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. - * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. - */ - function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace symlink { - /** - * Asynchronous symlink(2) - Create a new symbolic link to an existing file. - * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. - * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. - * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). - * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. - */ - function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; - - type Type = "dir" | "file" | "junction"; - } - - /** - * Synchronous symlink(2) - Create a new symbolic link to an existing file. - * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. - * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. - * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). - * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. - */ - function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; - - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink( - path: PathLike, - options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, - callback: (err: NodeJS.ErrnoException | null, linkString: string) => void - ): void; - - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void): void; - - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void; - - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace readlink { - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; - - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; - - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; - } - - /** - * Synchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlinkSync(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; - - /** - * Synchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlinkSync(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer; - - /** - * Synchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlinkSync(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer; - - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath( - path: PathLike, - options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void - ): void; - - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void; - - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void; - - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace realpath { - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; - - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; - - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; - - function native( - path: PathLike, - options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void - ): void; - function native(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void; - function native(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void; - function native(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void; - } - - /** - * Synchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpathSync(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; - - /** - * Synchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpathSync(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer; - - /** - * Synchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpathSync(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer; - - namespace realpathSync { - function native(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; - function native(path: PathLike, options: { encoding: "buffer" } | "buffer"): Buffer; - function native(path: PathLike, options?: { encoding?: string | null } | string | null): string | Buffer; - } - - /** - * Asynchronous unlink(2) - delete a name and possibly the file it refers to. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace unlink { - /** - * Asynchronous unlink(2) - delete a name and possibly the file it refers to. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike): Promise; - } - - /** - * Synchronous unlink(2) - delete a name and possibly the file it refers to. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function unlinkSync(path: PathLike): void; - - /** - * Asynchronous rmdir(2) - delete a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace rmdir { - /** - * Asynchronous rmdir(2) - delete a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike): Promise; - } - - /** - * Synchronous rmdir(2) - delete a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function rmdirSync(path: PathLike): void; - - export interface MakeDirectoryOptions { - /** - * Indicates whether parent folders should be created. - * @default false - */ - recursive?: boolean; - /** - * A file mode. If a string is passed, it is parsed as an octal integer. If not specified - * @default 0o777. - */ - mode?: number; - } - - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdir(path: PathLike, options: number | string | MakeDirectoryOptions | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void; - - /** - * Asynchronous mkdir(2) - create a directory with a mode of `0o777`. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace mkdir { - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function __promisify__(path: PathLike, options?: number | string | MakeDirectoryOptions | null): Promise; - } - - /** - * Synchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdirSync(path: PathLike, options?: number | string | MakeDirectoryOptions | null): void; - - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp(prefix: string, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void; - - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void): void; - - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp(prefix: string, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void; - - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - */ - function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace mkdtemp { - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; - - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(prefix: string, options: { encoding: "buffer" } | "buffer"): Promise; - - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(prefix: string, options?: { encoding?: string | null } | string | null): Promise; - } - - /** - * Synchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtempSync(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): string; - - /** - * Synchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtempSync(prefix: string, options: { encoding: "buffer" } | "buffer"): Buffer; - - /** - * Synchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtempSync(prefix: string, options?: { encoding?: string | null } | string | null): string | Buffer; - - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir( - path: PathLike, - options: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | undefined | null, - callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, - ): void; - - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer", callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void): void; - - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir( - path: PathLike, - options: { encoding?: string | null; withFileTypes?: false } | string | undefined | null, - callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void, - ): void; - - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void; - - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. - */ - function readdir(path: PathLike, options: { encoding?: string | null; withFileTypes: true }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace readdir { - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): Promise; - - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options: "buffer" | { encoding: "buffer"; withFileTypes?: false }): Promise; - - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): Promise; - - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent - */ - function __promisify__(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Promise; - } - - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdirSync(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): string[]; - - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdirSync(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Buffer[]; - - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdirSync(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): string[] | Buffer[]; - - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. - */ - function readdirSync(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Dirent[]; - - /** - * Asynchronous close(2) - close a file descriptor. - * @param fd A file descriptor. - */ - function close(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace close { - /** - * Asynchronous close(2) - close a file descriptor. - * @param fd A file descriptor. - */ - function __promisify__(fd: number): Promise; - } - - /** - * Synchronous close(2) - close a file descriptor. - * @param fd A file descriptor. - */ - function closeSync(fd: number): void; - - /** - * Asynchronous open(2) - open and possibly create a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. - */ - function open(path: PathLike, flags: string | number, mode: string | number | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; - - /** - * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function open(path: PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace open { - /** - * Asynchronous open(2) - open and possibly create a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. - */ - function __promisify__(path: PathLike, flags: string | number, mode?: string | number | null): Promise; - } - - /** - * Synchronous open(2) - open and possibly create a file, returning a file descriptor.. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. - */ - function openSync(path: PathLike, flags: string | number, mode?: string | number | null): number; - - /** - * Asynchronously change file timestamps of the file referenced by the supplied path. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace utimes { - /** - * Asynchronously change file timestamps of the file referenced by the supplied path. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function __promisify__(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise; - } - - /** - * Synchronously change file timestamps of the file referenced by the supplied path. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function utimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void; - - /** - * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace futimes { - /** - * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function __promisify__(fd: number, atime: string | number | Date, mtime: string | number | Date): Promise; - } - - /** - * Synchronously change file timestamps of the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function futimesSync(fd: number, atime: string | number | Date, mtime: string | number | Date): void; - - /** - * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. - * @param fd A file descriptor. - */ - function fsync(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace fsync { - /** - * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. - * @param fd A file descriptor. - */ - function __promisify__(fd: number): Promise; - } - - /** - * Synchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. - * @param fd A file descriptor. - */ - function fsyncSync(fd: number): void; - - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - function write( - fd: number, - buffer: TBuffer, - offset: number | undefined | null, - length: number | undefined | null, - position: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - */ - function write( - fd: number, - buffer: TBuffer, - offset: number | undefined | null, - length: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - */ - function write( - fd: number, - buffer: TBuffer, - offset: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void - ): void; - - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - */ - function write(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void; - - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. If something other than a string is supplied it will be coerced to a string. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. - */ - function write( - fd: number, - string: any, - position: number | undefined | null, - encoding: string | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, - ): void; - - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. If something other than a string is supplied it will be coerced to a string. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - function write(fd: number, string: any, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void; - - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. If something other than a string is supplied it will be coerced to a string. - */ - function write(fd: number, string: any, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace write { - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - function __promisify__( - fd: number, - buffer?: TBuffer, - offset?: number, - length?: number, - position?: number | null, - ): Promise<{ bytesWritten: number, buffer: TBuffer }>; - - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. If something other than a string is supplied it will be coerced to a string. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. - */ - function __promisify__(fd: number, string: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>; - } - - /** - * Synchronously writes `buffer` to the file referenced by the supplied file descriptor, returning the number of bytes written. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - function writeSync(fd: number, buffer: BinaryData, offset?: number | null, length?: number | null, position?: number | null): number; - - /** - * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written. - * @param fd A file descriptor. - * @param string A string to write. If something other than a string is supplied it will be coerced to a string. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. - */ - function writeSync(fd: number, string: any, position?: number | null, encoding?: string | null): number; - - /** - * Asynchronously reads data from the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param buffer The buffer that the data will be written to. - * @param offset The offset in the buffer at which to start writing. - * @param length The number of bytes to read. - * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. - */ - function read( - fd: number, - buffer: TBuffer, - offset: number, - length: number, - position: number | null, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, - ): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace read { - /** - * @param fd A file descriptor. - * @param buffer The buffer that the data will be written to. - * @param offset The offset in the buffer at which to start writing. - * @param length The number of bytes to read. - * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. - */ - function __promisify__(fd: number, buffer: TBuffer, offset: number, length: number, position: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>; - } - - /** - * Synchronously reads data from the file referenced by the supplied file descriptor, returning the number of bytes read. - * @param fd A file descriptor. - * @param buffer The buffer that the data will be written to. - * @param offset The offset in the buffer at which to start writing. - * @param length The number of bytes to read. - * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. - */ - function readSync(fd: number, buffer: BinaryData, offset: number, length: number, position: number | null): number; - - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void; - - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile(path: PathLike | number, options: { encoding: string; flag?: string; } | string, callback: (err: NodeJS.ErrnoException | null, data: string) => void): void; - - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile( - path: PathLike | number, - options: { encoding?: string | null; flag?: string; } | string | undefined | null, - callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void, - ): void; - - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - */ - function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace readFile { - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function __promisify__(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Promise; - - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function __promisify__(path: PathLike | number, options: { encoding: string; flag?: string; } | string): Promise; - - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function __promisify__(path: PathLike | number, options?: { encoding?: string | null; flag?: string; } | string | null): Promise; - } - - /** - * Synchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. If a flag is not provided, it defaults to `'r'`. - */ - function readFileSync(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Buffer; - - /** - * Synchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFileSync(path: PathLike | number, options: { encoding: string; flag?: string; } | string): string; - - /** - * Synchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFileSync(path: PathLike | number, options?: { encoding?: string | null; flag?: string; } | string | null): string | Buffer; - - type WriteFileOptions = { encoding?: string | null; mode?: number | string; flag?: string; } | string | null; - - /** - * Asynchronously writes data to a file, replacing the file if it already exists. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'w'` is used. - */ - function writeFile(path: PathLike | number, data: any, options: WriteFileOptions, callback: (err: NodeJS.ErrnoException | null) => void): void; - - /** - * Asynchronously writes data to a file, replacing the file if it already exists. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - */ - function writeFile(path: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace writeFile { - /** - * Asynchronously writes data to a file, replacing the file if it already exists. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'w'` is used. - */ - function __promisify__(path: PathLike | number, data: any, options?: WriteFileOptions): Promise; - } - - /** - * Synchronously writes data to a file, replacing the file if it already exists. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'w'` is used. - */ - function writeFileSync(path: PathLike | number, data: any, options?: WriteFileOptions): void; - - /** - * Asynchronously append data to a file, creating the file if it does not exist. - * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'a'` is used. - */ - function appendFile(file: PathLike | number, data: any, options: WriteFileOptions, callback: (err: NodeJS.ErrnoException | null) => void): void; - - /** - * Asynchronously append data to a file, creating the file if it does not exist. - * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - */ - function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace appendFile { - /** - * Asynchronously append data to a file, creating the file if it does not exist. - * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'a'` is used. - */ - function __promisify__(file: PathLike | number, data: any, options?: WriteFileOptions): Promise; - } - - /** - * Synchronously append data to a file, creating the file if it does not exist. - * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'a'` is used. - */ - function appendFileSync(file: PathLike | number, data: any, options?: WriteFileOptions): void; - - /** - * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. - */ - function watchFile(filename: PathLike, options: { persistent?: boolean; interval?: number; } | undefined, listener: (curr: Stats, prev: Stats) => void): void; - - /** - * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function watchFile(filename: PathLike, listener: (curr: Stats, prev: Stats) => void): void; - - /** - * Stop watching for changes on `filename`. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function unwatchFile(filename: PathLike, listener?: (curr: Stats, prev: Stats) => void): void; - - /** - * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `persistent` is not supplied, the default of `true` is used. - * If `recursive` is not supplied, the default of `false` is used. - */ - function watch( - filename: PathLike, - options: { encoding?: BufferEncoding | null, persistent?: boolean, recursive?: boolean } | BufferEncoding | undefined | null, - listener?: (event: string, filename: string) => void, - ): FSWatcher; - - /** - * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `persistent` is not supplied, the default of `true` is used. - * If `recursive` is not supplied, the default of `false` is used. - */ - function watch(filename: PathLike, options: { encoding: "buffer", persistent?: boolean, recursive?: boolean } | "buffer", listener?: (event: string, filename: Buffer) => void): FSWatcher; - - /** - * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `persistent` is not supplied, the default of `true` is used. - * If `recursive` is not supplied, the default of `false` is used. - */ - function watch( - filename: PathLike, - options: { encoding?: string | null, persistent?: boolean, recursive?: boolean } | string | null, - listener?: (event: string, filename: string | Buffer) => void, - ): FSWatcher; - - /** - * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function watch(filename: PathLike, listener?: (event: string, filename: string) => any): FSWatcher; - - /** - * Asynchronously tests whether or not the given path exists by checking with the file system. - * @deprecated - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function exists(path: PathLike, callback: (exists: boolean) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace exists { - /** - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function __promisify__(path: PathLike): Promise; - } - - /** - * Synchronously tests whether or not the given path exists by checking with the file system. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function existsSync(path: PathLike): boolean; - - namespace constants { - // File Access Constants - - /** Constant for fs.access(). File is visible to the calling process. */ - const F_OK: number; - - /** Constant for fs.access(). File can be read by the calling process. */ - const R_OK: number; - - /** Constant for fs.access(). File can be written by the calling process. */ - const W_OK: number; - - /** Constant for fs.access(). File can be executed by the calling process. */ - const X_OK: number; - - // File Copy Constants - - /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */ - const COPYFILE_EXCL: number; - - /** - * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink. - * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used. - */ - const COPYFILE_FICLONE: number; - - /** - * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink. - * If the underlying platform does not support copy-on-write, then the operation will fail with an error. - */ - const COPYFILE_FICLONE_FORCE: number; - - // File Open Constants - - /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ - const O_RDONLY: number; - - /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ - const O_WRONLY: number; - - /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ - const O_RDWR: number; - - /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ - const O_CREAT: number; - - /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ - const O_EXCL: number; - - /** - * Constant for fs.open(). Flag indicating that if path identifies a terminal device, - * opening the path shall not cause that terminal to become the controlling terminal for the process - * (if the process does not already have one). - */ - const O_NOCTTY: number; - - /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ - const O_TRUNC: number; - - /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ - const O_APPEND: number; - - /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ - const O_DIRECTORY: number; - - /** - * constant for fs.open(). - * Flag indicating reading accesses to the file system will no longer result in - * an update to the atime information associated with the file. - * This flag is available on Linux operating systems only. - */ - const O_NOATIME: number; - - /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ - const O_NOFOLLOW: number; - - /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ - const O_SYNC: number; - - /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */ - const O_DSYNC: number; - - /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ - const O_SYMLINK: number; - - /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ - const O_DIRECT: number; - - /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ - const O_NONBLOCK: number; - - // File Type Constants - - /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ - const S_IFMT: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ - const S_IFREG: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ - const S_IFDIR: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ - const S_IFCHR: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ - const S_IFBLK: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ - const S_IFIFO: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ - const S_IFLNK: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ - const S_IFSOCK: number; - - // File Mode Constants - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ - const S_IRWXU: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ - const S_IRUSR: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ - const S_IWUSR: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ - const S_IXUSR: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ - const S_IRWXG: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ - const S_IRGRP: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ - const S_IWGRP: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ - const S_IXGRP: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ - const S_IRWXO: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ - const S_IROTH: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ - const S_IWOTH: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ - const S_IXOTH: number; - } - - /** - * Asynchronously tests a user's permissions for the file specified by path. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function access(path: PathLike, mode: number | undefined, callback: (err: NodeJS.ErrnoException | null) => void): void; - - /** - * Asynchronously tests a user's permissions for the file specified by path. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function access(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace access { - /** - * Asynchronously tests a user's permissions for the file specified by path. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function __promisify__(path: PathLike, mode?: number): Promise; - } - - /** - * Synchronously tests a user's permissions for the file specified by path. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function accessSync(path: PathLike, mode?: number): void; - - /** - * Returns a new `ReadStream` object. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function createReadStream(path: PathLike, options?: string | { - flags?: string; - encoding?: string; - fd?: number; - mode?: number; - autoClose?: boolean; - start?: number; - end?: number; - highWaterMark?: number; - }): ReadStream; - - /** - * Returns a new `WriteStream` object. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function createWriteStream(path: PathLike, options?: string | { - flags?: string; - encoding?: string; - fd?: number; - mode?: number; - autoClose?: boolean; - start?: number; - highWaterMark?: number; - }): WriteStream; - - /** - * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. - * @param fd A file descriptor. - */ - function fdatasync(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace fdatasync { - /** - * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. - * @param fd A file descriptor. - */ - function __promisify__(fd: number): Promise; - } - - /** - * Synchronous fdatasync(2) - synchronize a file's in-core state with storage device. - * @param fd A file descriptor. - */ - function fdatasyncSync(fd: number): void; - - /** - * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. - * No arguments other than a possible exception are given to the callback function. - * Node.js makes no guarantees about the atomicity of the copy operation. - * If an error occurs after the destination file has been opened for writing, Node.js will attempt - * to remove the destination. - * @param src A path to the source file. - * @param dest A path to the destination file. - */ - function copyFile(src: PathLike, dest: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void; - /** - * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. - * No arguments other than a possible exception are given to the callback function. - * Node.js makes no guarantees about the atomicity of the copy operation. - * If an error occurs after the destination file has been opened for writing, Node.js will attempt - * to remove the destination. - * @param src A path to the source file. - * @param dest A path to the destination file. - * @param flags An integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists. - */ - function copyFile(src: PathLike, dest: PathLike, flags: number, callback: (err: NodeJS.ErrnoException | null) => void): void; - - // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. - namespace copyFile { - /** - * Asynchronously copies src to dest. By default, dest is overwritten if it already exists. - * No arguments other than a possible exception are given to the callback function. - * Node.js makes no guarantees about the atomicity of the copy operation. - * If an error occurs after the destination file has been opened for writing, Node.js will attempt - * to remove the destination. - * @param src A path to the source file. - * @param dest A path to the destination file. - * @param flags An optional integer that specifies the behavior of the copy operation. - * The only supported flag is fs.constants.COPYFILE_EXCL, - * which causes the copy operation to fail if dest already exists. - */ - function __promisify__(src: PathLike, dst: PathLike, flags?: number): Promise; - } - - /** - * Synchronously copies src to dest. By default, dest is overwritten if it already exists. - * Node.js makes no guarantees about the atomicity of the copy operation. - * If an error occurs after the destination file has been opened for writing, Node.js will attempt - * to remove the destination. - * @param src A path to the source file. - * @param dest A path to the destination file. - * @param flags An optional integer that specifies the behavior of the copy operation. - * The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists. - */ - function copyFileSync(src: PathLike, dest: PathLike, flags?: number): void; - - namespace promises { - interface FileHandle { - /** - * Gets the file descriptor for this file handle. - */ - readonly fd: number; - - /** - * Asynchronously append data to a file, creating the file if it does not exist. The underlying file will _not_ be closed automatically. - * The `FileHandle` must have been opened for appending. - * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'a'` is used. - */ - appendFile(data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise; - - /** - * Asynchronous fchown(2) - Change ownership of a file. - */ - chown(uid: number, gid: number): Promise; - - /** - * Asynchronous fchmod(2) - Change permissions of a file. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - chmod(mode: string | number): Promise; - - /** - * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. - */ - datasync(): Promise; - - /** - * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. - */ - sync(): Promise; - - /** - * Asynchronously reads data from the file. - * The `FileHandle` must have been opened for reading. - * @param buffer The buffer that the data will be written to. - * @param offset The offset in the buffer at which to start writing. - * @param length The number of bytes to read. - * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. - */ - read(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>; - - /** - * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. - * The `FileHandle` must have been opened for reading. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - readFile(options?: { encoding?: null, flag?: string | number } | null): Promise; - - /** - * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. - * The `FileHandle` must have been opened for reading. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - readFile(options: { encoding: BufferEncoding, flag?: string | number } | BufferEncoding): Promise; - - /** - * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. - * The `FileHandle` must have been opened for reading. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - readFile(options?: { encoding?: string | null, flag?: string | number } | string | null): Promise; - - /** - * Asynchronous fstat(2) - Get file status. - */ - stat(): Promise; - - /** - * Asynchronous ftruncate(2) - Truncate a file to a specified length. - * @param len If not specified, defaults to `0`. - */ - truncate(len?: number): Promise; - - /** - * Asynchronously change file timestamps of the file. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - utimes(atime: string | number | Date, mtime: string | number | Date): Promise; - - /** - * Asynchronously writes `buffer` to the file. - * The `FileHandle` must have been opened for writing. - * @param buffer The buffer that the data will be written to. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - write(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>; - - /** - * Asynchronously writes `string` to the file. - * The `FileHandle` must have been opened for writing. - * It is unsafe to call `write()` multiple times on the same file without waiting for the `Promise` - * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended. - * @param string A string to write. If something other than a string is supplied it will be coerced to a string. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. - */ - write(data: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>; - - /** - * Asynchronously writes data to a file, replacing the file if it already exists. The underlying file will _not_ be closed automatically. - * The `FileHandle` must have been opened for writing. - * It is unsafe to call `writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected). - * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'w'` is used. - */ - writeFile(data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise; - - /** - * Asynchronous close(2) - close a `FileHandle`. - */ - close(): Promise; - } - - /** - * Asynchronously tests a user's permissions for the file specified by path. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function access(path: PathLike, mode?: number): Promise; - - /** - * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it already exists. - * Node.js makes no guarantees about the atomicity of the copy operation. - * If an error occurs after the destination file has been opened for writing, Node.js will attempt - * to remove the destination. - * @param src A path to the source file. - * @param dest A path to the destination file. - * @param flags An optional integer that specifies the behavior of the copy operation. The only - * supported flag is `fs.constants.COPYFILE_EXCL`, which causes the copy operation to fail if - * `dest` already exists. - */ - function copyFile(src: PathLike, dest: PathLike, flags?: number): Promise; - - /** - * Asynchronous open(2) - open and possibly create a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not - * supplied, defaults to `0o666`. - */ - function open(path: PathLike, flags: string | number, mode?: string | number): Promise; - - /** - * Asynchronously reads data from the file referenced by the supplied `FileHandle`. - * @param handle A `FileHandle`. - * @param buffer The buffer that the data will be written to. - * @param offset The offset in the buffer at which to start writing. - * @param length The number of bytes to read. - * @param position The offset from the beginning of the file from which data should be read. If - * `null`, data will be read from the current position. - */ - function read( - handle: FileHandle, - buffer: TBuffer, - offset?: number | null, - length?: number | null, - position?: number | null, - ): Promise<{ bytesRead: number, buffer: TBuffer }>; - - /** - * Asynchronously writes `buffer` to the file referenced by the supplied `FileHandle`. - * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise` - * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended. - * @param handle A `FileHandle`. - * @param buffer The buffer that the data will be written to. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - function write( - handle: FileHandle, - buffer: TBuffer, - offset?: number | null, - length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>; - - /** - * Asynchronously writes `string` to the file referenced by the supplied `FileHandle`. - * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise` - * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended. - * @param handle A `FileHandle`. - * @param string A string to write. If something other than a string is supplied it will be coerced to a string. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. - */ - function write(handle: FileHandle, string: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>; - - /** - * Asynchronous rename(2) - Change the name or location of a file or directory. - * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function rename(oldPath: PathLike, newPath: PathLike): Promise; - - /** - * Asynchronous truncate(2) - Truncate a file to a specified length. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param len If not specified, defaults to `0`. - */ - function truncate(path: PathLike, len?: number): Promise; - - /** - * Asynchronous ftruncate(2) - Truncate a file to a specified length. - * @param handle A `FileHandle`. - * @param len If not specified, defaults to `0`. - */ - function ftruncate(handle: FileHandle, len?: number): Promise; - - /** - * Asynchronous rmdir(2) - delete a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function rmdir(path: PathLike): Promise; - - /** - * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. - * @param handle A `FileHandle`. - */ - function fdatasync(handle: FileHandle): Promise; - - /** - * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. - * @param handle A `FileHandle`. - */ - function fsync(handle: FileHandle): Promise; - - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdir(path: PathLike, options?: number | string | MakeDirectoryOptions | null): Promise; - - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir(path: PathLike, options?: { encoding?: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): Promise; - - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Promise; - - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): Promise; - - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. - */ - function readdir(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Promise; - - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; - - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; - - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; - - /** - * Asynchronous symlink(2) - Create a new symbolic link to an existing file. - * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. - * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. - * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). - * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. - */ - function symlink(target: PathLike, path: PathLike, type?: string | null): Promise; - - /** - * Asynchronous fstat(2) - Get file status. - * @param handle A `FileHandle`. - */ - function fstat(handle: FileHandle): Promise; - - /** - * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function lstat(path: PathLike): Promise; - - /** - * Asynchronous stat(2) - Get file status. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function stat(path: PathLike): Promise; - - /** - * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. - * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function link(existingPath: PathLike, newPath: PathLike): Promise; - - /** - * Asynchronous unlink(2) - delete a name and possibly the file it refers to. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function unlink(path: PathLike): Promise; - - /** - * Asynchronous fchmod(2) - Change permissions of a file. - * @param handle A `FileHandle`. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function fchmod(handle: FileHandle, mode: string | number): Promise; - - /** - * Asynchronous chmod(2) - Change permissions of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function chmod(path: PathLike, mode: string | number): Promise; - - /** - * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function lchmod(path: PathLike, mode: string | number): Promise; - - /** - * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function lchown(path: PathLike, uid: number, gid: number): Promise; - - /** - * Asynchronous fchown(2) - Change ownership of a file. - * @param handle A `FileHandle`. - */ - function fchown(handle: FileHandle, uid: number, gid: number): Promise; - - /** - * Asynchronous chown(2) - Change ownership of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function chown(path: PathLike, uid: number, gid: number): Promise; - - /** - * Asynchronously change file timestamps of the file referenced by the supplied path. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise; - - /** - * Asynchronously change file timestamps of the file referenced by the supplied `FileHandle`. - * @param handle A `FileHandle`. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function futimes(handle: FileHandle, atime: string | number | Date, mtime: string | number | Date): Promise; - - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; - - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise; - - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; - - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; - - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp(prefix: string, options: { encoding: "buffer" } | "buffer"): Promise; - - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp(prefix: string, options?: { encoding?: string | null } | string | null): Promise; - - /** - * Asynchronously writes data to a file, replacing the file if it already exists. - * It is unsafe to call `fsPromises.writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected). - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'w'` is used. - */ - function writeFile(path: PathLike | FileHandle, data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise; - - /** - * Asynchronously append data to a file, creating the file if it does not exist. - * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'a'` is used. - */ - function appendFile(path: PathLike | FileHandle, data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise; - - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile(path: PathLike | FileHandle, options?: { encoding?: null, flag?: string | number } | null): Promise; - - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile(path: PathLike | FileHandle, options: { encoding: BufferEncoding, flag?: string | number } | BufferEncoding): Promise; - - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile(path: PathLike | FileHandle, options?: { encoding?: string | null, flag?: string | number } | string | null): Promise; - } -} diff --git a/node_modules/@types/node/globals.d.ts b/node_modules/@types/node/globals.d.ts deleted file mode 100644 index 5de9e98f..00000000 --- a/node_modules/@types/node/globals.d.ts +++ /dev/null @@ -1,1180 +0,0 @@ -// This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build -interface Console { - Console: NodeJS.ConsoleConstructor; - /** - * A simple assertion test that verifies whether `value` is truthy. - * If it is not, an `AssertionError` is thrown. - * If provided, the error `message` is formatted using `util.format()` and used as the error message. - */ - assert(value: any, message?: string, ...optionalParams: any[]): void; - /** - * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the TTY. - * When `stdout` is not a TTY, this method does nothing. - */ - clear(): void; - /** - * Maintains an internal counter specific to `label` and outputs to `stdout` the number of times `console.count()` has been called with the given `label`. - */ - count(label?: string): void; - /** - * Resets the internal counter specific to `label`. - */ - countReset(label?: string): void; - /** - * The `console.debug()` function is an alias for {@link console.log()}. - */ - debug(message?: any, ...optionalParams: any[]): void; - /** - * Uses {@link util.inspect()} on `obj` and prints the resulting string to `stdout`. - * This function bypasses any custom `inspect()` function defined on `obj`. - */ - dir(obj: any, options?: NodeJS.InspectOptions): void; - /** - * This method calls {@link console.log()} passing it the arguments received. Please note that this method does not produce any XML formatting - */ - dirxml(...data: any[]): void; - /** - * Prints to `stderr` with newline. - */ - error(message?: any, ...optionalParams: any[]): void; - /** - * Increases indentation of subsequent lines by two spaces. - * If one or more `label`s are provided, those are printed first without the additional indentation. - */ - group(...label: any[]): void; - /** - * The `console.groupCollapsed()` function is an alias for {@link console.group()}. - */ - groupCollapsed(...label: any[]): void; - /** - * Decreases indentation of subsequent lines by two spaces. - */ - groupEnd(): void; - /** - * The {@link console.info()} function is an alias for {@link console.log()}. - */ - info(message?: any, ...optionalParams: any[]): void; - /** - * Prints to `stdout` with newline. - */ - log(message?: any, ...optionalParams: any[]): void; - /** - * This method does not display anything unless used in the inspector. - * Prints to `stdout` the array `array` formatted as a table. - */ - table(tabularData: any, properties?: string[]): void; - /** - * Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`. - */ - time(label?: string): void; - /** - * Stops a timer that was previously started by calling {@link console.time()} and prints the result to `stdout`. - */ - timeEnd(label?: string): void; - /** - * For a timer that was previously started by calling {@link console.time()}, prints the elapsed time and other `data` arguments to `stdout`. - */ - timeLog(label?: string, ...data: any[]): void; - /** - * Prints to `stderr` the string 'Trace :', followed by the {@link util.format()} formatted message and stack trace to the current position in the code. - */ - trace(message?: any, ...optionalParams: any[]): void; - /** - * The {@link console.warn()} function is an alias for {@link console.error()}. - */ - warn(message?: any, ...optionalParams: any[]): void; - - // --- Inspector mode only --- - /** - * This method does not display anything unless used in the inspector. - * The console.markTimeline() method is the deprecated form of console.timeStamp(). - * - * @deprecated Use console.timeStamp() instead. - */ - markTimeline(label?: string): void; - /** - * This method does not display anything unless used in the inspector. - * Starts a JavaScript CPU profile with an optional label. - */ - profile(label?: string): void; - /** - * This method does not display anything unless used in the inspector. - * Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector. - */ - profileEnd(label?: string): void; - /** - * This method does not display anything unless used in the inspector. - * Adds an event with the label `label` to the Timeline panel of the inspector. - */ - timeStamp(label?: string): void; - /** - * This method does not display anything unless used in the inspector. - * The console.timeline() method is the deprecated form of console.time(). - * - * @deprecated Use console.time() instead. - */ - timeline(label?: string): void; - /** - * This method does not display anything unless used in the inspector. - * The console.timelineEnd() method is the deprecated form of console.timeEnd(). - * - * @deprecated Use console.timeEnd() instead. - */ - timelineEnd(label?: string): void; -} - -interface Error { - stack?: string; -} - -// Declare "static" methods in Error -interface ErrorConstructor { - /** Create .stack property on a target object */ - captureStackTrace(targetObject: Object, constructorOpt?: Function): void; - - /** - * Optional override for formatting stack traces - * - * @see https://github.com/v8/v8/wiki/Stack%20Trace%20API#customizing-stack-traces - */ - prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any; - - stackTraceLimit: number; -} - -interface SymbolConstructor { - readonly observable: symbol; -} - -// Node.js ESNEXT support -interface String { - /** Removes whitespace from the left end of a string. */ - trimLeft(): string; - /** Removes whitespace from the right end of a string. */ - trimRight(): string; -} - -interface ImportMeta { - url: string; -} - -/*-----------------------------------------------* - * * - * GLOBAL * - * * - ------------------------------------------------*/ -declare var process: NodeJS.Process; -declare var global: NodeJS.Global; -declare var console: Console; - -declare var __filename: string; -declare var __dirname: string; - -declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; -declare namespace setTimeout { - function __promisify__(ms: number): Promise; - function __promisify__(ms: number, value: T): Promise; -} -declare function clearTimeout(timeoutId: NodeJS.Timeout): void; -declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; -declare function clearInterval(intervalId: NodeJS.Timeout): void; -declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate; -declare namespace setImmediate { - function __promisify__(): Promise; - function __promisify__(value: T): Promise; -} -declare function clearImmediate(immediateId: NodeJS.Immediate): void; - -/** - * @experimental - */ -declare function queueMicrotask(callback: () => void): void; - -// TODO: change to `type NodeRequireFunction = (id: string) => any;` in next mayor version. -interface NodeRequireFunction { - /* tslint:disable-next-line:callable-types */ - (id: string): any; -} - -interface NodeRequire extends NodeRequireFunction { - resolve: RequireResolve; - cache: any; - /** - * @deprecated - */ - extensions: NodeExtensions; - main: NodeModule | undefined; -} - -interface RequireResolve { - (id: string, options?: { paths?: string[]; }): string; - paths(request: string): string[] | null; -} - -interface NodeExtensions { - '.js': (m: NodeModule, filename: string) => any; - '.json': (m: NodeModule, filename: string) => any; - '.node': (m: NodeModule, filename: string) => any; - [ext: string]: (m: NodeModule, filename: string) => any; -} - -declare var require: NodeRequire; - -interface NodeModule { - exports: any; - require: NodeRequireFunction; - id: string; - filename: string; - loaded: boolean; - parent: NodeModule | null; - children: NodeModule[]; - paths: string[]; -} - -declare var module: NodeModule; - -// Same as module.exports -declare var exports: any; - -// Buffer class -type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex"; - -interface Buffer { - constructor: typeof Buffer; -} - -/** - * Raw data is stored in instances of the Buffer class. - * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. - * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - */ -declare class Buffer extends Uint8Array { - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. - */ - constructor(str: string, encoding?: BufferEncoding); - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). - */ - constructor(size: number); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. - */ - constructor(array: Uint8Array); - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}/{SharedArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. - */ - constructor(arrayBuffer: ArrayBuffer | SharedArrayBuffer); - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. - */ - constructor(array: any[]); - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead. - */ - constructor(buffer: Buffer); - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of any TypedArray or a new ArrayBuffer() - */ - static from(arrayBuffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Creates a new Buffer using the passed {data} - * @param data data to create a new Buffer - */ - static from(data: number[]): Buffer; - static from(data: Uint8Array): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - */ - static from(str: string, encoding?: BufferEncoding): Buffer; - /** - * Creates a new Buffer using the passed {data} - * @param values to create a new Buffer - */ - static of(...items: number[]): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - static isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - static isEncoding(encoding: string): encoding is BufferEncoding; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - static byteLength( - string: string | NodeJS.TypedArray | DataView | ArrayBuffer | SharedArrayBuffer, - encoding?: BufferEncoding - ): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - static concat(list: Uint8Array[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - static compare(buf1: Uint8Array, buf2: Uint8Array): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - static alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - static allocUnsafeSlow(size: number): Buffer; - /** - * This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling. This value may be modified. - */ - static poolSize: number; - - write(string: string, encoding?: BufferEncoding): number; - write(string: string, offset: number, encoding?: BufferEncoding): number; - write(string: string, offset: number, length: number, encoding?: BufferEncoding): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer'; data: number[] }; - equals(otherBuffer: Uint8Array): boolean; - compare( - otherBuffer: Uint8Array, - targetStart?: number, - targetEnd?: number, - sourceStart?: number, - sourceEnd?: number - ): number; - copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - /** - * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices. - * - * This method is incompatible with `Uint8Array#slice()`, which returns a copy of the original memory. - * - * @param begin Where the new `Buffer` will start. Default: `0`. - * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`. - */ - slice(begin?: number, end?: number): Buffer; - /** - * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices. - * - * This method is compatible with `Uint8Array#subarray()`. - * - * @param begin Where the new `Buffer` will start. Default: `0`. - * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`. - */ - subarray(begin?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number): number; - writeUIntBE(value: number, offset: number, byteLength: number): number; - writeIntLE(value: number, offset: number, byteLength: number): number; - writeIntBE(value: number, offset: number, byteLength: number): number; - readUIntLE(offset: number, byteLength: number): number; - readUIntBE(offset: number, byteLength: number): number; - readIntLE(offset: number, byteLength: number): number; - readIntBE(offset: number, byteLength: number): number; - readUInt8(offset: number): number; - readUInt16LE(offset: number): number; - readUInt16BE(offset: number): number; - readUInt32LE(offset: number): number; - readUInt32BE(offset: number): number; - readInt8(offset: number): number; - readInt16LE(offset: number): number; - readInt16BE(offset: number): number; - readInt32LE(offset: number): number; - readInt32BE(offset: number): number; - readFloatLE(offset: number): number; - readFloatBE(offset: number): number; - readDoubleLE(offset: number): number; - readDoubleBE(offset: number): number; - reverse(): this; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number): number; - writeUInt16LE(value: number, offset: number): number; - writeUInt16BE(value: number, offset: number): number; - writeUInt32LE(value: number, offset: number): number; - writeUInt32BE(value: number, offset: number): number; - writeInt8(value: number, offset: number): number; - writeInt16LE(value: number, offset: number): number; - writeInt16BE(value: number, offset: number): number; - writeInt32LE(value: number, offset: number): number; - writeInt32BE(value: number, offset: number): number; - writeFloatLE(value: number, offset: number): number; - writeFloatBE(value: number, offset: number): number; - writeDoubleLE(value: number, offset: number): number; - writeDoubleBE(value: number, offset: number): number; - - fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this; - - indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; - lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; - entries(): IterableIterator<[number, number]>; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean; - keys(): IterableIterator; - values(): IterableIterator; -} - -/*----------------------------------------------* -* * -* GLOBAL INTERFACES * -* * -*-----------------------------------------------*/ -declare namespace NodeJS { - interface InspectOptions { - /** - * If set to `true`, getters are going to be - * inspected as well. If set to `'get'` only getters without setter are going - * to be inspected. If set to `'set'` only getters having a corresponding - * setter are going to be inspected. This might cause side effects depending on - * the getter function. - * @default `false` - */ - getters?: 'get' | 'set' | boolean; - showHidden?: boolean; - /** - * @default 2 - */ - depth?: number | null; - colors?: boolean; - customInspect?: boolean; - showProxy?: boolean; - maxArrayLength?: number | null; - breakLength?: number; - /** - * Setting this to `false` causes each object key - * to be displayed on a new line. It will also add new lines to text that is - * longer than `breakLength`. If set to a number, the most `n` inner elements - * are united on a single line as long as all properties fit into - * `breakLength`. Short array elements are also grouped together. Note that no - * text will be reduced below 16 characters, no matter the `breakLength` size. - * For more information, see the example below. - * @default `true` - */ - compact?: boolean | number; - sorted?: boolean | ((a: string, b: string) => number); - } - - interface ConsoleConstructorOptions { - stdout: WritableStream; - stderr?: WritableStream; - ignoreErrors?: boolean; - colorMode?: boolean | 'auto'; - inspectOptions?: InspectOptions; - } - - interface ConsoleConstructor { - prototype: Console; - new(stdout: WritableStream, stderr?: WritableStream, ignoreErrors?: boolean): Console; - new(options: ConsoleConstructorOptions): Console; - } - - interface CallSite { - /** - * Value of "this" - */ - getThis(): any; - - /** - * 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; - - /** - * Current function - */ - getFunction(): Function | undefined; - - /** - * 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; - - /** - * Name of the property [of "this" or one of its prototypes] that holds - * the current function - */ - getMethodName(): string | null; - - /** - * Name of the script [if this function was defined in a script] - */ - getFileName(): string | null; - - /** - * Current line number [if this function was defined in a script] - */ - getLineNumber(): number | null; - - /** - * Current column number [if this function was defined in a script] - */ - getColumnNumber(): number | null; - - /** - * A call site object representing the location where eval was called - * [if this function was created using a call to eval] - */ - getEvalOrigin(): string | undefined; - - /** - * Is this a toplevel invocation, that is, is "this" the global object? - */ - isToplevel(): boolean; - - /** - * Does this call take place in code defined by a call to eval? - */ - isEval(): boolean; - - /** - * Is this call in native V8 code? - */ - isNative(): boolean; - - /** - * Is this a constructor call? - */ - isConstructor(): boolean; - } - - interface ErrnoException extends Error { - errno?: number; - code?: string; - path?: string; - syscall?: string; - stack?: string; - } - - class EventEmitter { - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - removeListener(event: string | symbol, listener: (...args: any[]) => void): this; - off(event: string | symbol, listener: (...args: any[]) => void): this; - removeAllListeners(event?: string | symbol): this; - setMaxListeners(n: number): this; - getMaxListeners(): number; - listeners(event: string | symbol): Function[]; - rawListeners(event: string | symbol): Function[]; - emit(event: string | symbol, ...args: any[]): boolean; - listenerCount(type: string | symbol): number; - // Added in Node 6... - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - eventNames(): Array; - } - - interface ReadableStream extends EventEmitter { - readable: boolean; - read(size?: number): string | Buffer; - setEncoding(encoding: string): this; - pause(): this; - resume(): this; - isPaused(): boolean; - pipe(destination: T, options?: { end?: boolean; }): T; - unpipe(destination?: WritableStream): this; - unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void; - wrap(oldStream: ReadableStream): this; - [Symbol.asyncIterator](): AsyncIterableIterator; - } - - interface WritableStream extends EventEmitter { - writable: boolean; - write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; - write(str: string, encoding?: string, cb?: (err?: Error | null) => void): boolean; - end(cb?: () => void): void; - end(data: string | Uint8Array, cb?: () => void): void; - end(str: string, encoding?: string, cb?: () => void): void; - } - - interface ReadWriteStream extends ReadableStream, WritableStream { } - - interface Events extends EventEmitter { } - - interface Domain extends Events { - run(fn: (...args: any[]) => T, ...args: any[]): T; - add(emitter: EventEmitter | Timer): void; - remove(emitter: EventEmitter | Timer): void; - bind(cb: T): T; - intercept(cb: T): T; - - addListener(event: string, listener: (...args: any[]) => void): this; - on(event: string, listener: (...args: any[]) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - removeListener(event: string, listener: (...args: any[]) => void): this; - removeAllListeners(event?: string): this; - } - - interface MemoryUsage { - rss: number; - heapTotal: number; - heapUsed: number; - external: number; - } - - interface CpuUsage { - user: number; - system: number; - } - - interface ProcessRelease { - name: string; - sourceUrl?: string; - headersUrl?: string; - libUrl?: string; - lts?: string; - } - - interface ProcessVersions { - http_parser: string; - node: string; - v8: string; - ares: string; - uv: string; - zlib: string; - modules: string; - openssl: string; - } - - type Platform = 'aix' - | 'android' - | 'darwin' - | 'freebsd' - | 'linux' - | 'openbsd' - | 'sunos' - | 'win32' - | 'cygwin'; - - type Signals = - "SIGABRT" | "SIGALRM" | "SIGBUS" | "SIGCHLD" | "SIGCONT" | "SIGFPE" | "SIGHUP" | "SIGILL" | "SIGINT" | "SIGIO" | - "SIGIOT" | "SIGKILL" | "SIGPIPE" | "SIGPOLL" | "SIGPROF" | "SIGPWR" | "SIGQUIT" | "SIGSEGV" | "SIGSTKFLT" | - "SIGSTOP" | "SIGSYS" | "SIGTERM" | "SIGTRAP" | "SIGTSTP" | "SIGTTIN" | "SIGTTOU" | "SIGUNUSED" | "SIGURG" | - "SIGUSR1" | "SIGUSR2" | "SIGVTALRM" | "SIGWINCH" | "SIGXCPU" | "SIGXFSZ" | "SIGBREAK" | "SIGLOST" | "SIGINFO"; - - type MultipleResolveType = 'resolve' | 'reject'; - - type BeforeExitListener = (code: number) => void; - type DisconnectListener = () => void; - type ExitListener = (code: number) => void; - type RejectionHandledListener = (promise: Promise) => void; - type UncaughtExceptionListener = (error: Error) => void; - type UnhandledRejectionListener = (reason: {} | null | undefined, promise: Promise) => void; - type WarningListener = (warning: Error) => void; - type MessageListener = (message: any, sendHandle: any) => void; - type SignalsListener = (signal: Signals) => void; - type NewListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void; - type RemoveListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void; - type MultipleResolveListener = (type: MultipleResolveType, promise: Promise, value: any) => void; - - interface Socket extends ReadWriteStream { - isTTY?: true; - } - - interface ProcessEnv { - [key: string]: string | undefined; - } - - interface WriteStream extends Socket { - readonly writableFinished: boolean; - readonly writableHighWaterMark: number; - readonly writableLength: number; - columns?: number; - rows?: number; - _write(chunk: any, encoding: string, callback: (err?: null | Error) => void): void; - _destroy(err: Error | null, callback: (err?: null | Error) => void): void; - _final(callback: (err?: null | Error) => void): void; - setDefaultEncoding(encoding: string): this; - cork(): void; - uncork(): void; - destroy(error?: Error): void; - } - interface ReadStream extends Socket { - readonly readableHighWaterMark: number; - readonly readableLength: number; - isRaw?: boolean; - setRawMode?(mode: boolean): void; - _read(size: number): void; - _destroy(err: Error | null, callback: (err?: null | Error) => void): void; - push(chunk: any, encoding?: string): boolean; - destroy(error?: Error): void; - } - - interface HRTime { - (time?: [number, number]): [number, number]; - } - - interface ProcessReport { - /** - * Directory where the report is written. - * working directory of the Node.js process. - * @default '' indicating that reports are written to the current - */ - directory: string; - - /** - * Filename where the report is written. - * The default value is the empty string. - * @default '' the output filename will be comprised of a timestamp, - * PID, and sequence number. - */ - filename: string; - - /** - * Returns a JSON-formatted diagnostic report for the running process. - * The report's JavaScript stack trace is taken from err, if present. - */ - getReport(err?: Error): string; - - /** - * If true, a diagnostic report is generated on fatal errors, - * such as out of memory errors or failed C++ assertions. - * @default false - */ - reportOnFatalError: boolean; - - /** - * If true, a diagnostic report is generated when the process - * receives the signal specified by process.report.signal. - * @defaul false - */ - reportOnSignal: boolean; - - /** - * If true, a diagnostic report is generated on uncaught exception. - * @default false - */ - reportOnUncaughtException: boolean; - - /** - * The signal used to trigger the creation of a diagnostic report. - * @default 'SIGUSR2' - */ - signal: Signals; - - /** - * Writes a diagnostic report to a file. If filename is not provided, the default filename - * includes the date, time, PID, and a sequence number. - * The report's JavaScript stack trace is taken from err, if present. - * - * @param fileName Name of the file where the report is written. - * This should be a relative path, that will be appended to the directory specified in - * `process.report.directory`, or the current working directory of the Node.js process, - * if unspecified. - * @param error A custom error used for reporting the JavaScript stack. - * @return Filename of the generated report. - */ - writeReport(fileName?: string): string; - writeReport(error?: Error): string; - writeReport(fileName?: string, err?: Error): string; - } - - interface ResourceUsage { - fsRead: number; - fsWrite: number; - involuntaryContextSwitches: number; - ipcReceived: number; - ipcSent: number; - majorPageFault: number; - maxRSS: number; - minorPageFault: number; - sharedMemorySize: number; - signalsCount: number; - swappedOut: number; - systemCPUTime: number; - unsharedDataSize: number; - unsharedStackSize: number; - userCPUTime: number; - voluntaryContextSwitches: number; - } - - interface Process extends EventEmitter { - /** - * Can also be a tty.WriteStream, not typed due to limitation.s - */ - stdout: WriteStream; - /** - * Can also be a tty.WriteStream, not typed due to limitation.s - */ - stderr: WriteStream; - stdin: ReadStream; - openStdin(): Socket; - argv: string[]; - argv0: string; - execArgv: string[]; - execPath: string; - abort(): void; - chdir(directory: string): void; - cwd(): string; - debugPort: number; - emitWarning(warning: string | Error, name?: string, ctor?: Function): void; - env: ProcessEnv; - exit(code?: number): never; - exitCode?: number; - getgid(): number; - setgid(id: number | string): void; - getuid(): number; - setuid(id: number | string): void; - geteuid(): number; - seteuid(id: number | string): void; - getegid(): number; - setegid(id: number | string): void; - getgroups(): number[]; - setgroups(groups: Array): void; - setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void; - hasUncaughtExceptionCaptureCallback(): boolean; - version: string; - versions: ProcessVersions; - config: { - target_defaults: { - cflags: any[]; - default_configuration: string; - defines: string[]; - include_dirs: string[]; - libraries: string[]; - }; - variables: { - clang: number; - host_arch: string; - node_install_npm: boolean; - node_install_waf: boolean; - node_prefix: string; - node_shared_openssl: boolean; - node_shared_v8: boolean; - node_shared_zlib: boolean; - node_use_dtrace: boolean; - node_use_etw: boolean; - node_use_openssl: boolean; - target_arch: string; - v8_no_strict_aliasing: number; - v8_use_snapshot: boolean; - visibility: string; - }; - }; - kill(pid: number, signal?: string | number): void; - pid: number; - ppid: number; - title: string; - arch: string; - platform: Platform; - mainModule?: NodeModule; - memoryUsage(): MemoryUsage; - cpuUsage(previousValue?: CpuUsage): CpuUsage; - nextTick(callback: Function, ...args: any[]): void; - release: ProcessRelease; - features: { - inspector: boolean; - debug: boolean; - uv: boolean; - ipv6: boolean; - tls_alpn: boolean; - tls_sni: boolean; - tls_ocsp: boolean; - tls: boolean; - }; - /** - * Can only be set if not in worker thread. - */ - umask(mask?: number): number; - uptime(): number; - hrtime: HRTime; - domain: Domain; - - // Worker - send?(message: any, sendHandle?: any, options?: { swallowErrors?: boolean}, callback?: (error: Error | null) => void): boolean; - disconnect(): void; - connected: boolean; - - /** - * The `process.allowedNodeEnvironmentFlags` property is a special, - * read-only `Set` of flags allowable within the [`NODE_OPTIONS`][] - * environment variable. - */ - allowedNodeEnvironmentFlags: ReadonlySet; - - /** - * Only available with `--experimental-report` - */ - report?: ProcessReport; - - resourceUsage(): ResourceUsage; - - /** - * EventEmitter - * 1. beforeExit - * 2. disconnect - * 3. exit - * 4. message - * 5. rejectionHandled - * 6. uncaughtException - * 7. unhandledRejection - * 8. warning - * 9. message - * 10. - * 11. newListener/removeListener inherited from EventEmitter - */ - addListener(event: "beforeExit", listener: BeforeExitListener): this; - addListener(event: "disconnect", listener: DisconnectListener): this; - addListener(event: "exit", listener: ExitListener): this; - addListener(event: "rejectionHandled", listener: RejectionHandledListener): this; - addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; - addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - addListener(event: "warning", listener: WarningListener): this; - addListener(event: "message", listener: MessageListener): this; - addListener(event: Signals, listener: SignalsListener): this; - addListener(event: "newListener", listener: NewListenerListener): this; - addListener(event: "removeListener", listener: RemoveListenerListener): this; - addListener(event: "multipleResolves", listener: MultipleResolveListener): this; - - emit(event: "beforeExit", code: number): boolean; - emit(event: "disconnect"): boolean; - emit(event: "exit", code: number): boolean; - emit(event: "rejectionHandled", promise: Promise): boolean; - emit(event: "uncaughtException", error: Error): boolean; - emit(event: "unhandledRejection", reason: any, promise: Promise): boolean; - emit(event: "warning", warning: Error): boolean; - emit(event: "message", message: any, sendHandle: any): this; - emit(event: Signals, signal: Signals): boolean; - emit(event: "newListener", eventName: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "removeListener", eventName: string, listener: (...args: any[]) => void): this; - emit(event: "multipleResolves", listener: MultipleResolveListener): this; - - on(event: "beforeExit", listener: BeforeExitListener): this; - on(event: "disconnect", listener: DisconnectListener): this; - on(event: "exit", listener: ExitListener): this; - on(event: "rejectionHandled", listener: RejectionHandledListener): this; - on(event: "uncaughtException", listener: UncaughtExceptionListener): this; - on(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - on(event: "warning", listener: WarningListener): this; - on(event: "message", listener: MessageListener): this; - on(event: Signals, listener: SignalsListener): this; - on(event: "newListener", listener: NewListenerListener): this; - on(event: "removeListener", listener: RemoveListenerListener): this; - on(event: "multipleResolves", listener: MultipleResolveListener): this; - - once(event: "beforeExit", listener: BeforeExitListener): this; - once(event: "disconnect", listener: DisconnectListener): this; - once(event: "exit", listener: ExitListener): this; - once(event: "rejectionHandled", listener: RejectionHandledListener): this; - once(event: "uncaughtException", listener: UncaughtExceptionListener): this; - once(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - once(event: "warning", listener: WarningListener): this; - once(event: "message", listener: MessageListener): this; - once(event: Signals, listener: SignalsListener): this; - once(event: "newListener", listener: NewListenerListener): this; - once(event: "removeListener", listener: RemoveListenerListener): this; - once(event: "multipleResolves", listener: MultipleResolveListener): this; - - prependListener(event: "beforeExit", listener: BeforeExitListener): this; - prependListener(event: "disconnect", listener: DisconnectListener): this; - prependListener(event: "exit", listener: ExitListener): this; - prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this; - prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; - prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - prependListener(event: "warning", listener: WarningListener): this; - prependListener(event: "message", listener: MessageListener): this; - prependListener(event: Signals, listener: SignalsListener): this; - prependListener(event: "newListener", listener: NewListenerListener): this; - prependListener(event: "removeListener", listener: RemoveListenerListener): this; - prependListener(event: "multipleResolves", listener: MultipleResolveListener): this; - - prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this; - prependOnceListener(event: "disconnect", listener: DisconnectListener): this; - prependOnceListener(event: "exit", listener: ExitListener): this; - prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this; - prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; - prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - prependOnceListener(event: "warning", listener: WarningListener): this; - prependOnceListener(event: "message", listener: MessageListener): this; - prependOnceListener(event: Signals, listener: SignalsListener): this; - prependOnceListener(event: "newListener", listener: NewListenerListener): this; - prependOnceListener(event: "removeListener", listener: RemoveListenerListener): this; - prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this; - - listeners(event: "beforeExit"): BeforeExitListener[]; - listeners(event: "disconnect"): DisconnectListener[]; - listeners(event: "exit"): ExitListener[]; - listeners(event: "rejectionHandled"): RejectionHandledListener[]; - listeners(event: "uncaughtException"): UncaughtExceptionListener[]; - listeners(event: "unhandledRejection"): UnhandledRejectionListener[]; - listeners(event: "warning"): WarningListener[]; - listeners(event: "message"): MessageListener[]; - listeners(event: Signals): SignalsListener[]; - listeners(event: "newListener"): NewListenerListener[]; - listeners(event: "removeListener"): RemoveListenerListener[]; - listeners(event: "multipleResolves"): MultipleResolveListener[]; - } - - interface Global { - Array: typeof Array; - ArrayBuffer: typeof ArrayBuffer; - Boolean: typeof Boolean; - Buffer: typeof Buffer; - DataView: typeof DataView; - Date: typeof Date; - Error: typeof Error; - EvalError: typeof EvalError; - Float32Array: typeof Float32Array; - Float64Array: typeof Float64Array; - Function: typeof Function; - GLOBAL: Global; - Infinity: typeof Infinity; - Int16Array: typeof Int16Array; - Int32Array: typeof Int32Array; - Int8Array: typeof Int8Array; - Intl: typeof Intl; - JSON: typeof JSON; - Map: MapConstructor; - Math: typeof Math; - NaN: typeof NaN; - Number: typeof Number; - Object: typeof Object; - Promise: Function; - RangeError: typeof RangeError; - ReferenceError: typeof ReferenceError; - RegExp: typeof RegExp; - Set: SetConstructor; - String: typeof String; - Symbol: Function; - SyntaxError: typeof SyntaxError; - TypeError: typeof TypeError; - URIError: typeof URIError; - Uint16Array: typeof Uint16Array; - Uint32Array: typeof Uint32Array; - Uint8Array: typeof Uint8Array; - Uint8ClampedArray: Function; - WeakMap: WeakMapConstructor; - WeakSet: WeakSetConstructor; - clearImmediate: (immediateId: Immediate) => void; - clearInterval: (intervalId: Timeout) => void; - clearTimeout: (timeoutId: Timeout) => void; - console: typeof console; - decodeURI: typeof decodeURI; - decodeURIComponent: typeof decodeURIComponent; - encodeURI: typeof encodeURI; - encodeURIComponent: typeof encodeURIComponent; - escape: (str: string) => string; - eval: typeof eval; - global: Global; - isFinite: typeof isFinite; - isNaN: typeof isNaN; - parseFloat: typeof parseFloat; - parseInt: typeof parseInt; - process: Process; - root: Global; - setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => Immediate; - setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout; - setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout; - queueMicrotask: typeof queueMicrotask; - undefined: typeof undefined; - unescape: (str: string) => string; - gc: () => void; - v8debug?: any; - } - - // compatibility with older typings - interface Timer { - hasRef(): boolean; - ref(): this; - refresh(): this; - unref(): this; - } - - class Immediate { - hasRef(): boolean; - ref(): this; - unref(): this; - _onImmediate: Function; // to distinguish it from the Timeout class - } - - class Timeout implements Timer { - hasRef(): boolean; - ref(): this; - refresh(): this; - unref(): this; - } - - class Module { - static runMain(): void; - static wrap(code: string): string; - static createRequireFromPath(path: string): (path: string) => any; - static builtinModules: string[]; - - static Module: typeof Module; - - exports: any; - require: NodeRequireFunction; - id: string; - filename: string; - loaded: boolean; - parent: Module | null; - children: Module[]; - paths: string[]; - - constructor(id: string, parent?: Module); - } - - type TypedArray = Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array; -} diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts deleted file mode 100644 index 49ef45b1..00000000 --- a/node_modules/@types/node/http.d.ts +++ /dev/null @@ -1,370 +0,0 @@ -declare module "http" { - import * as events from "events"; - import * as stream from "stream"; - import { URL } from "url"; - import { Socket, Server as NetServer } from "net"; - - // incoming headers will never contain number - interface IncomingHttpHeaders { - 'accept'?: string; - 'accept-language'?: string; - 'accept-patch'?: string; - 'accept-ranges'?: string; - 'access-control-allow-credentials'?: string; - 'access-control-allow-headers'?: string; - 'access-control-allow-methods'?: string; - 'access-control-allow-origin'?: string; - 'access-control-expose-headers'?: string; - 'access-control-max-age'?: string; - 'age'?: string; - 'allow'?: string; - 'alt-svc'?: string; - 'authorization'?: string; - 'cache-control'?: string; - 'connection'?: string; - 'content-disposition'?: string; - 'content-encoding'?: string; - 'content-language'?: string; - 'content-length'?: string; - 'content-location'?: string; - 'content-range'?: string; - 'content-type'?: string; - 'cookie'?: string; - 'date'?: string; - 'expect'?: string; - 'expires'?: string; - 'forwarded'?: string; - 'from'?: string; - 'host'?: string; - 'if-match'?: string; - 'if-modified-since'?: string; - 'if-none-match'?: string; - 'if-unmodified-since'?: string; - 'last-modified'?: string; - 'location'?: string; - 'pragma'?: string; - 'proxy-authenticate'?: string; - 'proxy-authorization'?: string; - 'public-key-pins'?: string; - 'range'?: string; - 'referer'?: string; - 'retry-after'?: string; - 'set-cookie'?: string[]; - 'strict-transport-security'?: string; - 'tk'?: string; - 'trailer'?: string; - 'transfer-encoding'?: string; - 'upgrade'?: string; - 'user-agent'?: string; - 'vary'?: string; - 'via'?: string; - 'warning'?: string; - 'www-authenticate'?: string; - [header: string]: string | string[] | undefined; - } - - // outgoing headers allows numbers (as they are converted internally to strings) - interface OutgoingHttpHeaders { - [header: string]: number | string | string[] | undefined; - } - - interface ClientRequestArgs { - protocol?: string; - host?: string; - hostname?: string; - family?: number; - port?: number | string; - defaultPort?: number | string; - localAddress?: string; - socketPath?: string; - method?: string; - path?: string; - headers?: OutgoingHttpHeaders; - auth?: string; - agent?: Agent | boolean; - _defaultAgent?: Agent; - timeout?: number; - setHost?: boolean; - // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278 - createConnection?: (options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket; - } - - interface ServerOptions { - IncomingMessage?: typeof IncomingMessage; - ServerResponse?: typeof ServerResponse; - } - - type RequestListener = (req: IncomingMessage, res: ServerResponse) => void; - - class Server extends NetServer { - constructor(requestListener?: RequestListener); - constructor(options: ServerOptions, requestListener?: RequestListener); - - setTimeout(msecs?: number, callback?: () => void): this; - setTimeout(callback: () => void): this; - /** - * Limits maximum incoming headers count. If set to 0, no limit will be applied. - * @default 2000 - * {@link https://nodejs.org/api/http.html#http_server_maxheaderscount} - */ - maxHeadersCount: number | null; - timeout: number; - /** - * Limit the amount of time the parser will wait to receive the complete HTTP headers. - * @default 40000 - * {@link https://nodejs.org/api/http.html#http_server_headerstimeout} - */ - headersTimeout: number; - keepAliveTimeout: number; - } - - // https://github.com/nodejs/node/blob/master/lib/_http_outgoing.js - class OutgoingMessage extends stream.Writable { - upgrading: boolean; - chunkedEncoding: boolean; - shouldKeepAlive: boolean; - useChunkedEncodingByDefault: boolean; - sendDate: boolean; - finished: boolean; - headersSent: boolean; - connection: Socket; - - constructor(); - - setTimeout(msecs: number, callback?: () => void): this; - setHeader(name: string, value: number | string | string[]): void; - getHeader(name: string): number | string | string[] | undefined; - getHeaders(): OutgoingHttpHeaders; - getHeaderNames(): string[]; - hasHeader(name: string): boolean; - removeHeader(name: string): void; - addTrailers(headers: OutgoingHttpHeaders | Array<[string, string]>): void; - flushHeaders(): void; - } - - // https://github.com/nodejs/node/blob/master/lib/_http_server.js#L108-L256 - class ServerResponse extends OutgoingMessage { - statusCode: number; - statusMessage: string; - writableFinished: boolean; - - constructor(req: IncomingMessage); - - assignSocket(socket: Socket): void; - detachSocket(socket: Socket): void; - // https://github.com/nodejs/node/blob/master/test/parallel/test-http-write-callbacks.js#L53 - // no args in writeContinue callback - writeContinue(callback?: () => void): void; - writeHead(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders): this; - writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this; - } - - interface InformationEvent { - statusCode: number; - statusMessage: string; - httpVersion: string; - httpVersionMajor: number; - httpVersionMinor: number; - headers: IncomingHttpHeaders; - rawHeaders: string[]; - } - - // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77 - class ClientRequest extends OutgoingMessage { - connection: Socket; - socket: Socket; - aborted: number; - - constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); - - readonly path: string; - abort(): void; - onSocket(socket: Socket): void; - setTimeout(timeout: number, callback?: () => void): this; - setNoDelay(noDelay?: boolean): void; - setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; - - addListener(event: 'abort', listener: () => void): this; - addListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; - addListener(event: 'continue', listener: () => void): this; - addListener(event: 'information', listener: (info: InformationEvent) => void): this; - addListener(event: 'response', listener: (response: IncomingMessage) => void): this; - addListener(event: 'socket', listener: (socket: Socket) => void): this; - addListener(event: 'timeout', listener: () => void): this; - addListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; - addListener(event: 'close', listener: () => void): this; - addListener(event: 'drain', listener: () => void): this; - addListener(event: 'error', listener: (err: Error) => void): this; - addListener(event: 'finish', listener: () => void): this; - addListener(event: 'pipe', listener: (src: stream.Readable) => void): this; - addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - on(event: 'abort', listener: () => void): this; - on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; - on(event: 'continue', listener: () => void): this; - on(event: 'information', listener: (info: InformationEvent) => void): this; - on(event: 'response', listener: (response: IncomingMessage) => void): this; - on(event: 'socket', listener: (socket: Socket) => void): this; - on(event: 'timeout', listener: () => void): this; - on(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; - on(event: 'close', listener: () => void): this; - on(event: 'drain', listener: () => void): this; - on(event: 'error', listener: (err: Error) => void): this; - on(event: 'finish', listener: () => void): this; - on(event: 'pipe', listener: (src: stream.Readable) => void): this; - on(event: 'unpipe', listener: (src: stream.Readable) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: 'abort', listener: () => void): this; - once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; - once(event: 'continue', listener: () => void): this; - once(event: 'information', listener: (info: InformationEvent) => void): this; - once(event: 'response', listener: (response: IncomingMessage) => void): this; - once(event: 'socket', listener: (socket: Socket) => void): this; - once(event: 'timeout', listener: () => void): this; - once(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; - once(event: 'close', listener: () => void): this; - once(event: 'drain', listener: () => void): this; - once(event: 'error', listener: (err: Error) => void): this; - once(event: 'finish', listener: () => void): this; - once(event: 'pipe', listener: (src: stream.Readable) => void): this; - once(event: 'unpipe', listener: (src: stream.Readable) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: 'abort', listener: () => void): this; - prependListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; - prependListener(event: 'continue', listener: () => void): this; - prependListener(event: 'information', listener: (info: InformationEvent) => void): this; - prependListener(event: 'response', listener: (response: IncomingMessage) => void): this; - prependListener(event: 'socket', listener: (socket: Socket) => void): this; - prependListener(event: 'timeout', listener: () => void): this; - prependListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; - prependListener(event: 'close', listener: () => void): this; - prependListener(event: 'drain', listener: () => void): this; - prependListener(event: 'error', listener: (err: Error) => void): this; - prependListener(event: 'finish', listener: () => void): this; - prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this; - prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: 'abort', listener: () => void): this; - prependOnceListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; - prependOnceListener(event: 'continue', listener: () => void): this; - prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this; - prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this; - prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this; - prependOnceListener(event: 'timeout', listener: () => void): this; - prependOnceListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this; - prependOnceListener(event: 'close', listener: () => void): this; - prependOnceListener(event: 'drain', listener: () => void): this; - prependOnceListener(event: 'error', listener: (err: Error) => void): this; - prependOnceListener(event: 'finish', listener: () => void): this; - prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this; - prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - - class IncomingMessage extends stream.Readable { - constructor(socket: Socket); - - httpVersion: string; - httpVersionMajor: number; - httpVersionMinor: number; - complete: boolean; - connection: Socket; - headers: IncomingHttpHeaders; - rawHeaders: string[]; - trailers: { [key: string]: string | undefined }; - rawTrailers: string[]; - setTimeout(msecs: number, callback: () => void): this; - /** - * Only valid for request obtained from http.Server. - */ - method?: string; - /** - * Only valid for request obtained from http.Server. - */ - url?: string; - /** - * Only valid for response obtained from http.ClientRequest. - */ - statusCode?: number; - /** - * Only valid for response obtained from http.ClientRequest. - */ - statusMessage?: string; - socket: Socket; - destroy(error?: Error): void; - } - - interface AgentOptions { - /** - * Keep sockets around in a pool to be used by other requests in the future. Default = false - */ - keepAlive?: boolean; - /** - * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. - * Only relevant if keepAlive is set to true. - */ - keepAliveMsecs?: number; - /** - * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity - */ - maxSockets?: number; - /** - * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. - */ - maxFreeSockets?: number; - /** - * Socket timeout in milliseconds. This will set the timeout after the socket is connected. - */ - timeout?: number; - } - - class Agent { - maxFreeSockets: number; - maxSockets: number; - readonly sockets: { - readonly [key: string]: Socket[]; - }; - readonly requests: { - readonly [key: string]: IncomingMessage[]; - }; - - constructor(opts?: AgentOptions); - - /** - * Destroy any sockets that are currently in use by the agent. - * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, - * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, - * sockets may hang open for quite a long time before the server terminates them. - */ - destroy(): void; - } - - const METHODS: string[]; - - const STATUS_CODES: { - [errorCode: number]: string | undefined; - [errorCode: string]: string | undefined; - }; - - function createServer(requestListener?: RequestListener): Server; - function createServer(options: ServerOptions, requestListener?: RequestListener): Server; - - // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly, - // create interface RequestOptions would make the naming more clear to developers - interface RequestOptions extends ClientRequestArgs { } - function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; - function request(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; - function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; - function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; - let globalAgent: Agent; - - /** - * Read-only property specifying the maximum allowed size of HTTP headers in bytes. - * Defaults to 8KB. Configurable using the [`--max-http-header-size`][] CLI option. - */ - const maxHeaderSize: number; -} diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts deleted file mode 100644 index 184e10f3..00000000 --- a/node_modules/@types/node/http2.d.ts +++ /dev/null @@ -1,960 +0,0 @@ -declare module "http2" { - import * as events from "events"; - import * as fs from "fs"; - import * as net from "net"; - import * as stream from "stream"; - import * as tls from "tls"; - import * as url from "url"; - - import { IncomingHttpHeaders as Http1IncomingHttpHeaders, OutgoingHttpHeaders, IncomingMessage, ServerResponse } from "http"; - export { OutgoingHttpHeaders } from "http"; - - export interface IncomingHttpStatusHeader { - ":status"?: number; - } - - export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders { - ":path"?: string; - ":method"?: string; - ":authority"?: string; - ":scheme"?: string; - } - - // Http2Stream - - export interface StreamPriorityOptions { - exclusive?: boolean; - parent?: number; - weight?: number; - silent?: boolean; - } - - export interface StreamState { - localWindowSize?: number; - state?: number; - localClose?: number; - remoteClose?: number; - sumDependencyWeight?: number; - weight?: number; - } - - export interface ServerStreamResponseOptions { - endStream?: boolean; - waitForTrailers?: boolean; - } - - export interface StatOptions { - offset: number; - length: number; - } - - export interface ServerStreamFileResponseOptions { - statCheck?: (stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void | boolean; - waitForTrailers?: boolean; - offset?: number; - length?: number; - } - - export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions { - onError?: (err: NodeJS.ErrnoException) => void; - } - - export class Http2Stream extends stream.Duplex { - protected constructor(); - - readonly aborted: boolean; - readonly bufferSize: number; - readonly closed: boolean; - readonly destroyed: boolean; - /** - * Set the true if the END_STREAM flag was set in the request or response HEADERS frame received, - * indicating that no additional data should be received and the readable side of the Http2Stream will be closed. - */ - readonly endAfterHeaders: boolean; - readonly id?: number; - readonly pending: boolean; - readonly rstCode: number; - readonly sentHeaders: OutgoingHttpHeaders; - readonly sentInfoHeaders?: OutgoingHttpHeaders[]; - readonly sentTrailers?: OutgoingHttpHeaders; - readonly session: Http2Session; - readonly state: StreamState; - - close(code?: number, callback?: () => void): void; - priority(options: StreamPriorityOptions): void; - setTimeout(msecs: number, callback?: () => void): void; - sendTrailers(headers: OutgoingHttpHeaders): void; - - addListener(event: "aborted", listener: () => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: Buffer | string) => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - addListener(event: "pipe", listener: (src: stream.Readable) => void): this; - addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - addListener(event: "streamClosed", listener: (code: number) => void): this; - addListener(event: "timeout", listener: () => void): this; - addListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - addListener(event: "wantTrailers", listener: () => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "aborted"): boolean; - emit(event: "close"): boolean; - emit(event: "data", chunk: Buffer | string): boolean; - emit(event: "drain"): boolean; - emit(event: "end"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "finish"): boolean; - emit(event: "frameError", frameType: number, errorCode: number): boolean; - emit(event: "pipe", src: stream.Readable): boolean; - emit(event: "unpipe", src: stream.Readable): boolean; - emit(event: "streamClosed", code: number): boolean; - emit(event: "timeout"): boolean; - emit(event: "trailers", trailers: IncomingHttpHeaders, flags: number): boolean; - emit(event: "wantTrailers"): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "aborted", listener: () => void): this; - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: Buffer | string) => void): this; - on(event: "drain", listener: () => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - on(event: "pipe", listener: (src: stream.Readable) => void): this; - on(event: "unpipe", listener: (src: stream.Readable) => void): this; - on(event: "streamClosed", listener: (code: number) => void): this; - on(event: "timeout", listener: () => void): this; - on(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - on(event: "wantTrailers", listener: () => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "aborted", listener: () => void): this; - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: Buffer | string) => void): this; - once(event: "drain", listener: () => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - once(event: "pipe", listener: (src: stream.Readable) => void): this; - once(event: "unpipe", listener: (src: stream.Readable) => void): this; - once(event: "streamClosed", listener: (code: number) => void): this; - once(event: "timeout", listener: () => void): this; - once(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - once(event: "wantTrailers", listener: () => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "aborted", listener: () => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependListener(event: "streamClosed", listener: (code: number) => void): this; - prependListener(event: "timeout", listener: () => void): this; - prependListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - prependListener(event: "wantTrailers", listener: () => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "aborted", listener: () => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: "streamClosed", listener: (code: number) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - prependOnceListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - prependOnceListener(event: "wantTrailers", listener: () => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - - export class ClientHttp2Stream extends Http2Stream { - private constructor(); - - addListener(event: "continue", listener: () => {}): this; - addListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - addListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "continue"): boolean; - emit(event: "headers", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; - emit(event: "push", headers: IncomingHttpHeaders, flags: number): boolean; - emit(event: "response", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "continue", listener: () => {}): this; - on(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - on(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "continue", listener: () => {}): this; - once(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - once(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "continue", listener: () => {}): this; - prependListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - prependListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - prependListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "continue", listener: () => {}): this; - prependOnceListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - prependOnceListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - prependOnceListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - - export class ServerHttp2Stream extends Http2Stream { - private constructor(); - - additionalHeaders(headers: OutgoingHttpHeaders): void; - readonly headersSent: boolean; - readonly pushAllowed: boolean; - pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void; - pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void; - respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void; - respondWithFD(fd: number, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void; - respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void; - } - - // Http2Session - - export interface Settings { - headerTableSize?: number; - enablePush?: boolean; - initialWindowSize?: number; - maxFrameSize?: number; - maxConcurrentStreams?: number; - maxHeaderListSize?: number; - enableConnectProtocol?: boolean; - } - - export interface ClientSessionRequestOptions { - endStream?: boolean; - exclusive?: boolean; - parent?: number; - weight?: number; - waitForTrailers?: boolean; - } - - export interface SessionState { - effectiveLocalWindowSize?: number; - effectiveRecvDataLength?: number; - nextStreamID?: number; - localWindowSize?: number; - lastProcStreamID?: number; - remoteWindowSize?: number; - outboundQueueSize?: number; - deflateDynamicTableSize?: number; - inflateDynamicTableSize?: number; - } - - export class Http2Session extends events.EventEmitter { - protected constructor(); - - readonly alpnProtocol?: string; - close(callback?: () => void): void; - readonly closed: boolean; - readonly connecting: boolean; - destroy(error?: Error, code?: number): void; - readonly destroyed: boolean; - readonly encrypted?: boolean; - goaway(code?: number, lastStreamID?: number, opaqueData?: Buffer | DataView | NodeJS.TypedArray): void; - readonly localSettings: Settings; - readonly originSet?: string[]; - readonly pendingSettingsAck: boolean; - ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean; - ping(payload: Buffer | DataView | NodeJS.TypedArray , callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean; - ref(): void; - readonly remoteSettings: Settings; - setTimeout(msecs: number, callback?: () => void): void; - readonly socket: net.Socket | tls.TLSSocket; - readonly state: SessionState; - settings(settings: Settings): void; - readonly type: number; - unref(): void; - - addListener(event: "close", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; - addListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; - addListener(event: "localSettings", listener: (settings: Settings) => void): this; - addListener(event: "ping", listener: () => void): this; - addListener(event: "remoteSettings", listener: (settings: Settings) => void): this; - addListener(event: "timeout", listener: () => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "close"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "frameError", frameType: number, errorCode: number, streamID: number): boolean; - emit(event: "goaway", errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean; - emit(event: "localSettings", settings: Settings): boolean; - emit(event: "ping"): boolean; - emit(event: "remoteSettings", settings: Settings): boolean; - emit(event: "timeout"): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "close", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; - on(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; - on(event: "localSettings", listener: (settings: Settings) => void): this; - on(event: "ping", listener: () => void): this; - on(event: "remoteSettings", listener: (settings: Settings) => void): this; - on(event: "timeout", listener: () => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "close", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; - once(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; - once(event: "localSettings", listener: (settings: Settings) => void): this; - once(event: "ping", listener: () => void): this; - once(event: "remoteSettings", listener: (settings: Settings) => void): this; - once(event: "timeout", listener: () => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "close", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; - prependListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; - prependListener(event: "localSettings", listener: (settings: Settings) => void): this; - prependListener(event: "ping", listener: () => void): this; - prependListener(event: "remoteSettings", listener: (settings: Settings) => void): this; - prependListener(event: "timeout", listener: () => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; - prependOnceListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this; - prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this; - prependOnceListener(event: "ping", listener: () => void): this; - prependOnceListener(event: "remoteSettings", listener: (settings: Settings) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - - export class ClientHttp2Session extends Http2Session { - private constructor(); - - request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream; - - addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - addListener(event: "origin", listener: (origins: string[]) => void): this; - addListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - addListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "altsvc", alt: string, origin: string, stream: number): boolean; - emit(event: "origin", origins: string[]): boolean; - emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; - emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - on(event: "origin", listener: (origins: string[]) => void): this; - on(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - on(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - once(event: "origin", listener: (origins: string[]) => void): this; - once(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - once(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - prependListener(event: "origin", listener: (origins: string[]) => void): this; - prependListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - prependListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - prependOnceListener(event: "origin", listener: (origins: string[]) => void): this; - prependOnceListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - prependOnceListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - - export interface AlternativeServiceOptions { - origin: number | string | url.URL; - } - - export class ServerHttp2Session extends Http2Session { - private constructor(); - - altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void; - origin(...args: Array): void; - readonly server: Http2Server | Http2SecureServer; - - addListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "connect", session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; - emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - - // Http2Server - - export interface SessionOptions { - maxDeflateDynamicTableSize?: number; - maxSessionMemory?: number; - maxHeaderListPairs?: number; - maxOutstandingPings?: number; - maxSendHeaderBlockLength?: number; - paddingStrategy?: number; - peerMaxConcurrentStreams?: number; - selectPadding?: (frameLen: number, maxFrameLen: number) => number; - settings?: Settings; - createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex; - } - - export interface ClientSessionOptions extends SessionOptions { - maxReservedRemoteStreams?: number; - createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex; - } - - export interface ServerSessionOptions extends SessionOptions { - Http1IncomingMessage?: typeof IncomingMessage; - Http1ServerResponse?: typeof ServerResponse; - Http2ServerRequest?: typeof Http2ServerRequest; - Http2ServerResponse?: typeof Http2ServerResponse; - } - - export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { } - export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions { } - - export interface ServerOptions extends ServerSessionOptions { } - - export interface SecureServerOptions extends SecureServerSessionOptions { - allowHTTP1?: boolean; - origins?: string[]; - } - - export class Http2Server extends net.Server { - private constructor(); - - addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - addListener(event: "session", listener: (session: ServerHttp2Session) => void): this; - addListener(event: "sessionError", listener: (err: Error) => void): this; - addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - addListener(event: "timeout", listener: () => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; - emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; - emit(event: "session", session: ServerHttp2Session): boolean; - emit(event: "sessionError", err: Error): boolean; - emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; - emit(event: "timeout"): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - on(event: "session", listener: (session: ServerHttp2Session) => void): this; - on(event: "sessionError", listener: (err: Error) => void): this; - on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - on(event: "timeout", listener: () => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - once(event: "session", listener: (session: ServerHttp2Session) => void): this; - once(event: "sessionError", listener: (err: Error) => void): this; - once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - once(event: "timeout", listener: () => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this; - prependListener(event: "sessionError", listener: (err: Error) => void): this; - prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - prependListener(event: "timeout", listener: () => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this; - prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; - prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - - setTimeout(msec?: number, callback?: () => void): this; - } - - export class Http2SecureServer extends tls.Server { - private constructor(); - - addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - addListener(event: "session", listener: (session: ServerHttp2Session) => void): this; - addListener(event: "sessionError", listener: (err: Error) => void): this; - addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - addListener(event: "timeout", listener: () => void): this; - addListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean; - emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean; - emit(event: "session", session: ServerHttp2Session): boolean; - emit(event: "sessionError", err: Error): boolean; - emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; - emit(event: "timeout"): boolean; - emit(event: "unknownProtocol", socket: tls.TLSSocket): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - on(event: "session", listener: (session: ServerHttp2Session) => void): this; - on(event: "sessionError", listener: (err: Error) => void): this; - on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - on(event: "timeout", listener: () => void): this; - on(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - once(event: "session", listener: (session: ServerHttp2Session) => void): this; - once(event: "sessionError", listener: (err: Error) => void): this; - once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - once(event: "timeout", listener: () => void): this; - once(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this; - prependListener(event: "sessionError", listener: (err: Error) => void): this; - prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - prependListener(event: "timeout", listener: () => void): this; - prependListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this; - prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this; - prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; - prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - - setTimeout(msec?: number, callback?: () => void): this; - } - - export class Http2ServerRequest extends stream.Readable { - constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: string[]); - - readonly aborted: boolean; - readonly authority: string; - readonly headers: IncomingHttpHeaders; - readonly httpVersion: string; - readonly method: string; - readonly rawHeaders: string[]; - readonly rawTrailers: string[]; - readonly scheme: string; - setTimeout(msecs: number, callback?: () => void): void; - readonly socket: net.Socket | tls.TLSSocket; - readonly stream: ServerHttp2Stream; - readonly trailers: IncomingHttpHeaders; - readonly url: string; - - read(size?: number): Buffer | string | null; - - addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: Buffer | string) => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "readable", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "aborted", hadError: boolean, code: number): boolean; - emit(event: "close"): boolean; - emit(event: "data", chunk: Buffer | string): boolean; - emit(event: "end"): boolean; - emit(event: "readable"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: Buffer | string) => void): this; - on(event: "end", listener: () => void): this; - on(event: "readable", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: Buffer | string) => void): this; - once(event: "end", listener: () => void): this; - once(event: "readable", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "readable", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "readable", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - - export class Http2ServerResponse extends stream.Stream { - constructor(stream: ServerHttp2Stream); - - addTrailers(trailers: OutgoingHttpHeaders): void; - readonly connection: net.Socket | tls.TLSSocket; - end(callback?: () => void): void; - end(data: string | Uint8Array, callback?: () => void): void; - end(data: string | Uint8Array, encoding: string, callback?: () => void): void; - readonly finished: boolean; - getHeader(name: string): string; - getHeaderNames(): string[]; - getHeaders(): OutgoingHttpHeaders; - hasHeader(name: string): boolean; - readonly headersSent: boolean; - removeHeader(name: string): void; - sendDate: boolean; - setHeader(name: string, value: number | string | string[]): void; - setTimeout(msecs: number, callback?: () => void): void; - readonly socket: net.Socket | tls.TLSSocket; - statusCode: number; - statusMessage: ''; - readonly stream: ServerHttp2Stream; - write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean; - write(chunk: string | Uint8Array, encoding: string, callback?: (err: Error) => void): boolean; - writeContinue(): void; - writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this; - writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this; - createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void; - - addListener(event: "close", listener: () => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "error", listener: (error: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "pipe", listener: (src: stream.Readable) => void): this; - addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "close"): boolean; - emit(event: "drain"): boolean; - emit(event: "error", error: Error): boolean; - emit(event: "finish"): boolean; - emit(event: "pipe", src: stream.Readable): boolean; - emit(event: "unpipe", src: stream.Readable): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "close", listener: () => void): this; - on(event: "drain", listener: () => void): this; - on(event: "error", listener: (error: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "pipe", listener: (src: stream.Readable) => void): this; - on(event: "unpipe", listener: (src: stream.Readable) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "close", listener: () => void): this; - once(event: "drain", listener: () => void): this; - once(event: "error", listener: (error: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "pipe", listener: (src: stream.Readable) => void): this; - once(event: "unpipe", listener: (src: stream.Readable) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "close", listener: () => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "error", listener: (error: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "error", listener: (error: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - - // Public API - - export namespace constants { - const NGHTTP2_SESSION_SERVER: number; - const NGHTTP2_SESSION_CLIENT: number; - const NGHTTP2_STREAM_STATE_IDLE: number; - const NGHTTP2_STREAM_STATE_OPEN: number; - const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number; - const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number; - const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number; - const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number; - const NGHTTP2_STREAM_STATE_CLOSED: number; - const NGHTTP2_NO_ERROR: number; - const NGHTTP2_PROTOCOL_ERROR: number; - const NGHTTP2_INTERNAL_ERROR: number; - const NGHTTP2_FLOW_CONTROL_ERROR: number; - const NGHTTP2_SETTINGS_TIMEOUT: number; - const NGHTTP2_STREAM_CLOSED: number; - const NGHTTP2_FRAME_SIZE_ERROR: number; - const NGHTTP2_REFUSED_STREAM: number; - const NGHTTP2_CANCEL: number; - const NGHTTP2_COMPRESSION_ERROR: number; - const NGHTTP2_CONNECT_ERROR: number; - const NGHTTP2_ENHANCE_YOUR_CALM: number; - const NGHTTP2_INADEQUATE_SECURITY: number; - const NGHTTP2_HTTP_1_1_REQUIRED: number; - const NGHTTP2_ERR_FRAME_SIZE_ERROR: number; - const NGHTTP2_FLAG_NONE: number; - const NGHTTP2_FLAG_END_STREAM: number; - const NGHTTP2_FLAG_END_HEADERS: number; - const NGHTTP2_FLAG_ACK: number; - const NGHTTP2_FLAG_PADDED: number; - const NGHTTP2_FLAG_PRIORITY: number; - const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number; - const DEFAULT_SETTINGS_ENABLE_PUSH: number; - const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number; - const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number; - const MAX_MAX_FRAME_SIZE: number; - const MIN_MAX_FRAME_SIZE: number; - const MAX_INITIAL_WINDOW_SIZE: number; - const NGHTTP2_DEFAULT_WEIGHT: number; - const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number; - const NGHTTP2_SETTINGS_ENABLE_PUSH: number; - const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number; - const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number; - const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number; - const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number; - const PADDING_STRATEGY_NONE: number; - const PADDING_STRATEGY_MAX: number; - const PADDING_STRATEGY_CALLBACK: number; - const HTTP2_HEADER_STATUS: string; - const HTTP2_HEADER_METHOD: string; - const HTTP2_HEADER_AUTHORITY: string; - const HTTP2_HEADER_SCHEME: string; - const HTTP2_HEADER_PATH: string; - const HTTP2_HEADER_ACCEPT_CHARSET: string; - const HTTP2_HEADER_ACCEPT_ENCODING: string; - const HTTP2_HEADER_ACCEPT_LANGUAGE: string; - const HTTP2_HEADER_ACCEPT_RANGES: string; - const HTTP2_HEADER_ACCEPT: string; - const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string; - const HTTP2_HEADER_AGE: string; - const HTTP2_HEADER_ALLOW: string; - const HTTP2_HEADER_AUTHORIZATION: string; - const HTTP2_HEADER_CACHE_CONTROL: string; - const HTTP2_HEADER_CONNECTION: string; - const HTTP2_HEADER_CONTENT_DISPOSITION: string; - const HTTP2_HEADER_CONTENT_ENCODING: string; - const HTTP2_HEADER_CONTENT_LANGUAGE: string; - const HTTP2_HEADER_CONTENT_LENGTH: string; - const HTTP2_HEADER_CONTENT_LOCATION: string; - const HTTP2_HEADER_CONTENT_MD5: string; - const HTTP2_HEADER_CONTENT_RANGE: string; - const HTTP2_HEADER_CONTENT_TYPE: string; - const HTTP2_HEADER_COOKIE: string; - const HTTP2_HEADER_DATE: string; - const HTTP2_HEADER_ETAG: string; - const HTTP2_HEADER_EXPECT: string; - const HTTP2_HEADER_EXPIRES: string; - const HTTP2_HEADER_FROM: string; - const HTTP2_HEADER_HOST: string; - const HTTP2_HEADER_IF_MATCH: string; - const HTTP2_HEADER_IF_MODIFIED_SINCE: string; - const HTTP2_HEADER_IF_NONE_MATCH: string; - const HTTP2_HEADER_IF_RANGE: string; - const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string; - const HTTP2_HEADER_LAST_MODIFIED: string; - const HTTP2_HEADER_LINK: string; - const HTTP2_HEADER_LOCATION: string; - const HTTP2_HEADER_MAX_FORWARDS: string; - const HTTP2_HEADER_PREFER: string; - const HTTP2_HEADER_PROXY_AUTHENTICATE: string; - const HTTP2_HEADER_PROXY_AUTHORIZATION: string; - const HTTP2_HEADER_RANGE: string; - const HTTP2_HEADER_REFERER: string; - const HTTP2_HEADER_REFRESH: string; - const HTTP2_HEADER_RETRY_AFTER: string; - const HTTP2_HEADER_SERVER: string; - const HTTP2_HEADER_SET_COOKIE: string; - const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string; - const HTTP2_HEADER_TRANSFER_ENCODING: string; - const HTTP2_HEADER_TE: string; - const HTTP2_HEADER_UPGRADE: string; - const HTTP2_HEADER_USER_AGENT: string; - const HTTP2_HEADER_VARY: string; - const HTTP2_HEADER_VIA: string; - const HTTP2_HEADER_WWW_AUTHENTICATE: string; - const HTTP2_HEADER_HTTP2_SETTINGS: string; - const HTTP2_HEADER_KEEP_ALIVE: string; - const HTTP2_HEADER_PROXY_CONNECTION: string; - const HTTP2_METHOD_ACL: string; - const HTTP2_METHOD_BASELINE_CONTROL: string; - const HTTP2_METHOD_BIND: string; - const HTTP2_METHOD_CHECKIN: string; - const HTTP2_METHOD_CHECKOUT: string; - const HTTP2_METHOD_CONNECT: string; - const HTTP2_METHOD_COPY: string; - const HTTP2_METHOD_DELETE: string; - const HTTP2_METHOD_GET: string; - const HTTP2_METHOD_HEAD: string; - const HTTP2_METHOD_LABEL: string; - const HTTP2_METHOD_LINK: string; - const HTTP2_METHOD_LOCK: string; - const HTTP2_METHOD_MERGE: string; - const HTTP2_METHOD_MKACTIVITY: string; - const HTTP2_METHOD_MKCALENDAR: string; - const HTTP2_METHOD_MKCOL: string; - const HTTP2_METHOD_MKREDIRECTREF: string; - const HTTP2_METHOD_MKWORKSPACE: string; - const HTTP2_METHOD_MOVE: string; - const HTTP2_METHOD_OPTIONS: string; - const HTTP2_METHOD_ORDERPATCH: string; - const HTTP2_METHOD_PATCH: string; - const HTTP2_METHOD_POST: string; - const HTTP2_METHOD_PRI: string; - const HTTP2_METHOD_PROPFIND: string; - const HTTP2_METHOD_PROPPATCH: string; - const HTTP2_METHOD_PUT: string; - const HTTP2_METHOD_REBIND: string; - const HTTP2_METHOD_REPORT: string; - const HTTP2_METHOD_SEARCH: string; - const HTTP2_METHOD_TRACE: string; - const HTTP2_METHOD_UNBIND: string; - const HTTP2_METHOD_UNCHECKOUT: string; - const HTTP2_METHOD_UNLINK: string; - const HTTP2_METHOD_UNLOCK: string; - const HTTP2_METHOD_UPDATE: string; - const HTTP2_METHOD_UPDATEREDIRECTREF: string; - const HTTP2_METHOD_VERSION_CONTROL: string; - const HTTP_STATUS_CONTINUE: number; - const HTTP_STATUS_SWITCHING_PROTOCOLS: number; - const HTTP_STATUS_PROCESSING: number; - const HTTP_STATUS_OK: number; - const HTTP_STATUS_CREATED: number; - const HTTP_STATUS_ACCEPTED: number; - const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number; - const HTTP_STATUS_NO_CONTENT: number; - const HTTP_STATUS_RESET_CONTENT: number; - const HTTP_STATUS_PARTIAL_CONTENT: number; - const HTTP_STATUS_MULTI_STATUS: number; - const HTTP_STATUS_ALREADY_REPORTED: number; - const HTTP_STATUS_IM_USED: number; - const HTTP_STATUS_MULTIPLE_CHOICES: number; - const HTTP_STATUS_MOVED_PERMANENTLY: number; - const HTTP_STATUS_FOUND: number; - const HTTP_STATUS_SEE_OTHER: number; - const HTTP_STATUS_NOT_MODIFIED: number; - const HTTP_STATUS_USE_PROXY: number; - const HTTP_STATUS_TEMPORARY_REDIRECT: number; - const HTTP_STATUS_PERMANENT_REDIRECT: number; - const HTTP_STATUS_BAD_REQUEST: number; - const HTTP_STATUS_UNAUTHORIZED: number; - const HTTP_STATUS_PAYMENT_REQUIRED: number; - const HTTP_STATUS_FORBIDDEN: number; - const HTTP_STATUS_NOT_FOUND: number; - const HTTP_STATUS_METHOD_NOT_ALLOWED: number; - const HTTP_STATUS_NOT_ACCEPTABLE: number; - const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number; - const HTTP_STATUS_REQUEST_TIMEOUT: number; - const HTTP_STATUS_CONFLICT: number; - const HTTP_STATUS_GONE: number; - const HTTP_STATUS_LENGTH_REQUIRED: number; - const HTTP_STATUS_PRECONDITION_FAILED: number; - const HTTP_STATUS_PAYLOAD_TOO_LARGE: number; - const HTTP_STATUS_URI_TOO_LONG: number; - const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number; - const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number; - const HTTP_STATUS_EXPECTATION_FAILED: number; - const HTTP_STATUS_TEAPOT: number; - const HTTP_STATUS_MISDIRECTED_REQUEST: number; - const HTTP_STATUS_UNPROCESSABLE_ENTITY: number; - const HTTP_STATUS_LOCKED: number; - const HTTP_STATUS_FAILED_DEPENDENCY: number; - const HTTP_STATUS_UNORDERED_COLLECTION: number; - const HTTP_STATUS_UPGRADE_REQUIRED: number; - const HTTP_STATUS_PRECONDITION_REQUIRED: number; - const HTTP_STATUS_TOO_MANY_REQUESTS: number; - const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number; - const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number; - const HTTP_STATUS_INTERNAL_SERVER_ERROR: number; - const HTTP_STATUS_NOT_IMPLEMENTED: number; - const HTTP_STATUS_BAD_GATEWAY: number; - const HTTP_STATUS_SERVICE_UNAVAILABLE: number; - const HTTP_STATUS_GATEWAY_TIMEOUT: number; - const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number; - const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number; - const HTTP_STATUS_INSUFFICIENT_STORAGE: number; - const HTTP_STATUS_LOOP_DETECTED: number; - const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number; - const HTTP_STATUS_NOT_EXTENDED: number; - const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number; - } - - export function getDefaultSettings(): Settings; - export function getPackedSettings(settings: Settings): Buffer; - export function getUnpackedSettings(buf: Uint8Array): Settings; - - export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server; - export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server; - - export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer; - export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer; - - export function connect(authority: string | url.URL, listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session; - export function connect( - authority: string | url.URL, - options?: ClientSessionOptions | SecureClientSessionOptions, - listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, - ): ClientHttp2Session; -} diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts deleted file mode 100644 index 6f33dbd0..00000000 --- a/node_modules/@types/node/https.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -declare module "https" { - import * as tls from "tls"; - import * as events from "events"; - import * as http from "http"; - import { URL } from "url"; - - type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions; - - type RequestOptions = http.RequestOptions & tls.SecureContextOptions & { - rejectUnauthorized?: boolean; // Defaults to true - servername?: string; // SNI TLS Extension - }; - - interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { - rejectUnauthorized?: boolean; - maxCachedSessions?: number; - } - - class Agent extends http.Agent { - constructor(options?: AgentOptions); - options: AgentOptions; - } - - class Server extends tls.Server { - constructor(requestListener?: http.RequestListener); - constructor(options: ServerOptions, requestListener?: http.RequestListener); - - setTimeout(callback: () => void): this; - setTimeout(msecs?: number, callback?: () => void): this; - /** - * Limits maximum incoming headers count. If set to 0, no limit will be applied. - * @default 2000 - * {@link https://nodejs.org/api/http.html#http_server_maxheaderscount} - */ - maxHeadersCount: number | null; - timeout: number; - /** - * Limit the amount of time the parser will wait to receive the complete HTTP headers. - * @default 40000 - * {@link https://nodejs.org/api/http.html#http_server_headerstimeout} - */ - headersTimeout: number; - keepAliveTimeout: number; - } - - function createServer(requestListener?: http.RequestListener): Server; - function createServer(options: ServerOptions, requestListener?: http.RequestListener): Server; - function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; - function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; - function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; - function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest; - let globalAgent: Agent; -} diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts deleted file mode 100644 index 90f672d0..00000000 --- a/node_modules/@types/node/index.d.ts +++ /dev/null @@ -1,100 +0,0 @@ -// Type definitions for non-npm package Node.js 12.7 -// Project: http://nodejs.org/ -// Definitions by: Microsoft TypeScript -// DefinitelyTyped -// Alberto Schiabel -// Alexander T. -// Alvis HT Tang -// Andrew Makarov -// Benjamin Toueg -// Bruno Scheufler -// Chigozirim C. -// Christian Vaagland Tellnes -// David Junger -// Deividas Bakanas -// Eugene Y. Q. Shen -// Flarna -// Hannes Magnusson -// Hoàng Văn Khải -// Huw -// Kelvin Jin -// Klaus Meinhardt -// Lishude -// Mariusz Wiktorczyk -// Matthieu Sieben -// Mohsen Azimi -// Nicolas Even -// Nicolas Voigt -// Parambir Singh -// Sebastian Silbermann -// Simon Schick -// Thomas den Hollander -// Wilco Bakker -// wwwy3y3 -// Zane Hannan AU -// Samuel Ainsworth -// Kyle Uehlein -// Jordi Oliveras Rovira -// Thanik Bhongbhibhat -// Marcin Kopacz -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// NOTE: These definitions support NodeJS and TypeScript 3.2. - -// NOTE: TypeScript version-specific augmentations can be found in the following paths: -// - ~/base.d.ts - Shared definitions common to all TypeScript versions -// - ~/index.d.ts - Definitions specific to TypeScript 2.1 -// - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2 - -// NOTE: Augmentations for TypeScript 3.2 and later should use individual files for overrides -// within the respective ~/ts3.2 (or later) folder. However, this is disallowed for versions -// prior to TypeScript 3.2, so the older definitions will be found here. - -// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: -/// - -// TypeScript 2.1-specific augmentations: - -// Forward-declarations for needed types from es2015 and later (in case users are using `--lib es5`) -// Empty interfaces are used here which merge fine with the real declarations in the lib XXX files -// just to ensure the names are known and node typings can be sued without importing these libs. -// if someone really needs these types the libs need to be added via --lib or in tsconfig.json -interface MapConstructor { } -interface WeakMapConstructor { } -interface SetConstructor { } -interface WeakSetConstructor { } -interface Set {} -interface Map {} -interface ReadonlySet {} -interface IteratorResult { } -interface Iterable { } -interface AsyncIterable { } -interface Iterator { - next(value?: any): IteratorResult; -} -interface IterableIterator { } -interface AsyncIterableIterator {} -interface SymbolConstructor { - readonly iterator: symbol; - readonly asyncIterator: symbol; -} -declare var Symbol: SymbolConstructor; -// even this is just a forward declaration some properties are added otherwise -// it would be allowed to pass anything to e.g. Buffer.from() -interface SharedArrayBuffer { - readonly byteLength: number; - slice(begin?: number, end?: number): SharedArrayBuffer; -} - -declare module "util" { - namespace inspect { - const custom: symbol; - } - namespace promisify { - const custom: symbol; - } - namespace types { - function isBigInt64Array(value: any): boolean; - function isBigUint64Array(value: any): boolean; - } -} diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts deleted file mode 100644 index b14aed2b..00000000 --- a/node_modules/@types/node/inspector.d.ts +++ /dev/null @@ -1,3034 +0,0 @@ -// tslint:disable-next-line:dt-header -// Type definitions for inspector - -// These definitions are auto-generated. -// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330 -// for more information. - -// tslint:disable:max-line-length - -/** - * The inspector module provides an API for interacting with the V8 inspector. - */ -declare module "inspector" { - import { EventEmitter } from 'events'; - - interface InspectorNotification { - method: string; - params: T; - } - - namespace Schema { - /** - * Description of the protocol domain. - */ - interface Domain { - /** - * Domain name. - */ - name: string; - /** - * Domain version. - */ - version: string; - } - - interface GetDomainsReturnType { - /** - * List of supported domains. - */ - domains: Domain[]; - } - } - - namespace Runtime { - /** - * Unique script identifier. - */ - type ScriptId = string; - - /** - * Unique object identifier. - */ - type RemoteObjectId = string; - - /** - * Primitive value which cannot be JSON-stringified. - */ - type UnserializableValue = string; - - /** - * Mirror object referencing original JavaScript object. - */ - interface RemoteObject { - /** - * Object type. - */ - type: string; - /** - * Object subtype hint. Specified for object type values only. - */ - subtype?: string; - /** - * Object class (constructor) name. Specified for object type values only. - */ - className?: string; - /** - * Remote object value in case of primitive values or JSON values (if it was requested). - */ - value?: any; - /** - * Primitive value which can not be JSON-stringified does not have value, but gets this property. - */ - unserializableValue?: UnserializableValue; - /** - * String representation of the object. - */ - description?: string; - /** - * Unique object identifier (for non-primitive values). - */ - objectId?: RemoteObjectId; - /** - * Preview containing abbreviated property values. Specified for object type values only. - * @experimental - */ - preview?: ObjectPreview; - /** - * @experimental - */ - customPreview?: CustomPreview; - } - - /** - * @experimental - */ - interface CustomPreview { - header: string; - hasBody: boolean; - formatterObjectId: RemoteObjectId; - bindRemoteObjectFunctionId: RemoteObjectId; - configObjectId?: RemoteObjectId; - } - - /** - * Object containing abbreviated remote object value. - * @experimental - */ - interface ObjectPreview { - /** - * Object type. - */ - type: string; - /** - * Object subtype hint. Specified for object type values only. - */ - subtype?: string; - /** - * String representation of the object. - */ - description?: string; - /** - * True iff some of the properties or entries of the original object did not fit. - */ - overflow: boolean; - /** - * List of the properties. - */ - properties: PropertyPreview[]; - /** - * List of the entries. Specified for map and set subtype values only. - */ - entries?: EntryPreview[]; - } - - /** - * @experimental - */ - interface PropertyPreview { - /** - * Property name. - */ - name: string; - /** - * Object type. Accessor means that the property itself is an accessor property. - */ - type: string; - /** - * User-friendly property value string. - */ - value?: string; - /** - * Nested value preview. - */ - valuePreview?: ObjectPreview; - /** - * Object subtype hint. Specified for object type values only. - */ - subtype?: string; - } - - /** - * @experimental - */ - interface EntryPreview { - /** - * Preview of the key. Specified for map-like collection entries. - */ - key?: ObjectPreview; - /** - * Preview of the value. - */ - value: ObjectPreview; - } - - /** - * Object property descriptor. - */ - interface PropertyDescriptor { - /** - * Property name or symbol description. - */ - name: string; - /** - * The value associated with the property. - */ - value?: RemoteObject; - /** - * True if the value associated with the property may be changed (data descriptors only). - */ - writable?: boolean; - /** - * A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only). - */ - get?: RemoteObject; - /** - * A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). - */ - set?: RemoteObject; - /** - * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. - */ - configurable: boolean; - /** - * True if this property shows up during enumeration of the properties on the corresponding object. - */ - enumerable: boolean; - /** - * True if the result was thrown during the evaluation. - */ - wasThrown?: boolean; - /** - * True if the property is owned for the object. - */ - isOwn?: boolean; - /** - * Property symbol object, if the property is of the symbol type. - */ - symbol?: RemoteObject; - } - - /** - * Object internal property descriptor. This property isn't normally visible in JavaScript code. - */ - interface InternalPropertyDescriptor { - /** - * Conventional property name. - */ - name: string; - /** - * The value associated with the property. - */ - value?: RemoteObject; - } - - /** - * Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified. - */ - interface CallArgument { - /** - * Primitive value or serializable javascript object. - */ - value?: any; - /** - * Primitive value which can not be JSON-stringified. - */ - unserializableValue?: UnserializableValue; - /** - * Remote object handle. - */ - objectId?: RemoteObjectId; - } - - /** - * Id of an execution context. - */ - type ExecutionContextId = number; - - /** - * Description of an isolated world. - */ - interface ExecutionContextDescription { - /** - * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. - */ - id: ExecutionContextId; - /** - * Execution context origin. - */ - origin: string; - /** - * Human readable name describing given context. - */ - name: string; - /** - * Embedder-specific auxiliary data. - */ - auxData?: {}; - } - - /** - * Detailed information about exception (or error) that was thrown during script compilation or execution. - */ - interface ExceptionDetails { - /** - * Exception id. - */ - exceptionId: number; - /** - * Exception text, which should be used together with exception object when available. - */ - text: string; - /** - * Line number of the exception location (0-based). - */ - lineNumber: number; - /** - * Column number of the exception location (0-based). - */ - columnNumber: number; - /** - * Script ID of the exception location. - */ - scriptId?: ScriptId; - /** - * URL of the exception location, to be used when the script was not reported. - */ - url?: string; - /** - * JavaScript stack trace if available. - */ - stackTrace?: StackTrace; - /** - * Exception object if available. - */ - exception?: RemoteObject; - /** - * Identifier of the context where exception happened. - */ - executionContextId?: ExecutionContextId; - } - - /** - * Number of milliseconds since epoch. - */ - type Timestamp = number; - - /** - * Stack entry for runtime errors and assertions. - */ - interface CallFrame { - /** - * JavaScript function name. - */ - functionName: string; - /** - * JavaScript script id. - */ - scriptId: ScriptId; - /** - * JavaScript script name or url. - */ - url: string; - /** - * JavaScript script line number (0-based). - */ - lineNumber: number; - /** - * JavaScript script column number (0-based). - */ - columnNumber: number; - } - - /** - * Call frames for assertions or error messages. - */ - interface StackTrace { - /** - * String label of this stack trace. For async traces this may be a name of the function that initiated the async call. - */ - description?: string; - /** - * JavaScript function name. - */ - callFrames: CallFrame[]; - /** - * Asynchronous JavaScript stack trace that preceded this stack, if available. - */ - parent?: StackTrace; - /** - * Asynchronous JavaScript stack trace that preceded this stack, if available. - * @experimental - */ - parentId?: StackTraceId; - } - - /** - * Unique identifier of current debugger. - * @experimental - */ - type UniqueDebuggerId = string; - - /** - * If debuggerId is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See Runtime.StackTrace and Debugger.paused for usages. - * @experimental - */ - interface StackTraceId { - id: string; - debuggerId?: UniqueDebuggerId; - } - - interface EvaluateParameterType { - /** - * Expression to evaluate. - */ - expression: string; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string; - /** - * Determines whether Command Line API should be available during the evaluation. - */ - includeCommandLineAPI?: boolean; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean; - /** - * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. - */ - contextId?: ExecutionContextId; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean; - /** - * Whether preview should be generated for the result. - * @experimental - */ - generatePreview?: boolean; - /** - * Whether execution should be treated as initiated by user in the UI. - */ - userGesture?: boolean; - /** - * Whether execution should await for resulting value and return once awaited promise is resolved. - */ - awaitPromise?: boolean; - } - - interface AwaitPromiseParameterType { - /** - * Identifier of the promise. - */ - promiseObjectId: RemoteObjectId; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean; - /** - * Whether preview should be generated for the result. - */ - generatePreview?: boolean; - } - - interface CallFunctionOnParameterType { - /** - * Declaration of the function to call. - */ - functionDeclaration: string; - /** - * Identifier of the object to call function on. Either objectId or executionContextId should be specified. - */ - objectId?: RemoteObjectId; - /** - * Call arguments. All call arguments must belong to the same JavaScript world as the target object. - */ - arguments?: CallArgument[]; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean; - /** - * Whether the result is expected to be a JSON object which should be sent by value. - */ - returnByValue?: boolean; - /** - * Whether preview should be generated for the result. - * @experimental - */ - generatePreview?: boolean; - /** - * Whether execution should be treated as initiated by user in the UI. - */ - userGesture?: boolean; - /** - * Whether execution should await for resulting value and return once awaited promise is resolved. - */ - awaitPromise?: boolean; - /** - * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified. - */ - executionContextId?: ExecutionContextId; - /** - * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object. - */ - objectGroup?: string; - } - - interface GetPropertiesParameterType { - /** - * Identifier of the object to return properties for. - */ - objectId: RemoteObjectId; - /** - * If true, returns properties belonging only to the element itself, not to its prototype chain. - */ - ownProperties?: boolean; - /** - * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. - * @experimental - */ - accessorPropertiesOnly?: boolean; - /** - * Whether preview should be generated for the results. - * @experimental - */ - generatePreview?: boolean; - } - - interface ReleaseObjectParameterType { - /** - * Identifier of the object to release. - */ - objectId: RemoteObjectId; - } - - interface ReleaseObjectGroupParameterType { - /** - * Symbolic object group name. - */ - objectGroup: string; - } - - interface SetCustomObjectFormatterEnabledParameterType { - enabled: boolean; - } - - interface CompileScriptParameterType { - /** - * Expression to compile. - */ - expression: string; - /** - * Source url to be set for the script. - */ - sourceURL: string; - /** - * Specifies whether the compiled script should be persisted. - */ - persistScript: boolean; - /** - * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. - */ - executionContextId?: ExecutionContextId; - } - - interface RunScriptParameterType { - /** - * Id of the script to run. - */ - scriptId: ScriptId; - /** - * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. - */ - executionContextId?: ExecutionContextId; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean; - /** - * Determines whether Command Line API should be available during the evaluation. - */ - includeCommandLineAPI?: boolean; - /** - * Whether the result is expected to be a JSON object which should be sent by value. - */ - returnByValue?: boolean; - /** - * Whether preview should be generated for the result. - */ - generatePreview?: boolean; - /** - * Whether execution should await for resulting value and return once awaited promise is resolved. - */ - awaitPromise?: boolean; - } - - interface QueryObjectsParameterType { - /** - * Identifier of the prototype to return objects for. - */ - prototypeObjectId: RemoteObjectId; - } - - interface GlobalLexicalScopeNamesParameterType { - /** - * Specifies in which execution context to lookup global scope variables. - */ - executionContextId?: ExecutionContextId; - } - - interface EvaluateReturnType { - /** - * Evaluation result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails; - } - - interface AwaitPromiseReturnType { - /** - * Promise result. Will contain rejected value if promise was rejected. - */ - result: RemoteObject; - /** - * Exception details if stack strace is available. - */ - exceptionDetails?: ExceptionDetails; - } - - interface CallFunctionOnReturnType { - /** - * Call result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails; - } - - interface GetPropertiesReturnType { - /** - * Object properties. - */ - result: PropertyDescriptor[]; - /** - * Internal object properties (only of the element itself). - */ - internalProperties?: InternalPropertyDescriptor[]; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails; - } - - interface CompileScriptReturnType { - /** - * Id of the script. - */ - scriptId?: ScriptId; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails; - } - - interface RunScriptReturnType { - /** - * Run result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails; - } - - interface QueryObjectsReturnType { - /** - * Array with objects. - */ - objects: RemoteObject; - } - - interface GlobalLexicalScopeNamesReturnType { - names: string[]; - } - - interface ExecutionContextCreatedEventDataType { - /** - * A newly created execution context. - */ - context: ExecutionContextDescription; - } - - interface ExecutionContextDestroyedEventDataType { - /** - * Id of the destroyed context - */ - executionContextId: ExecutionContextId; - } - - interface ExceptionThrownEventDataType { - /** - * Timestamp of the exception. - */ - timestamp: Timestamp; - exceptionDetails: ExceptionDetails; - } - - interface ExceptionRevokedEventDataType { - /** - * Reason describing why exception was revoked. - */ - reason: string; - /** - * The id of revoked exception, as reported in exceptionThrown. - */ - exceptionId: number; - } - - interface ConsoleAPICalledEventDataType { - /** - * Type of the call. - */ - type: string; - /** - * Call arguments. - */ - args: RemoteObject[]; - /** - * Identifier of the context where the call was made. - */ - executionContextId: ExecutionContextId; - /** - * Call timestamp. - */ - timestamp: Timestamp; - /** - * Stack trace captured when the call was made. - */ - stackTrace?: StackTrace; - /** - * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context. - * @experimental - */ - context?: string; - } - - interface InspectRequestedEventDataType { - object: RemoteObject; - hints: {}; - } - } - - namespace Debugger { - /** - * Breakpoint identifier. - */ - type BreakpointId = string; - - /** - * Call frame identifier. - */ - type CallFrameId = string; - - /** - * Location in the source code. - */ - interface Location { - /** - * Script identifier as reported in the Debugger.scriptParsed. - */ - scriptId: Runtime.ScriptId; - /** - * Line number in the script (0-based). - */ - lineNumber: number; - /** - * Column number in the script (0-based). - */ - columnNumber?: number; - } - - /** - * Location in the source code. - * @experimental - */ - interface ScriptPosition { - lineNumber: number; - columnNumber: number; - } - - /** - * JavaScript call frame. Array of call frames form the call stack. - */ - interface CallFrame { - /** - * Call frame identifier. This identifier is only valid while the virtual machine is paused. - */ - callFrameId: CallFrameId; - /** - * Name of the JavaScript function called on this call frame. - */ - functionName: string; - /** - * Location in the source code. - */ - functionLocation?: Location; - /** - * Location in the source code. - */ - location: Location; - /** - * JavaScript script name or url. - */ - url: string; - /** - * Scope chain for this call frame. - */ - scopeChain: Scope[]; - /** - * this object for this call frame. - */ - this: Runtime.RemoteObject; - /** - * The value being returned, if the function is at return point. - */ - returnValue?: Runtime.RemoteObject; - } - - /** - * Scope description. - */ - interface Scope { - /** - * Scope type. - */ - type: string; - /** - * Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. - */ - object: Runtime.RemoteObject; - name?: string; - /** - * Location in the source code where scope starts - */ - startLocation?: Location; - /** - * Location in the source code where scope ends - */ - endLocation?: Location; - } - - /** - * Search match for resource. - */ - interface SearchMatch { - /** - * Line number in resource content. - */ - lineNumber: number; - /** - * Line with match content. - */ - lineContent: string; - } - - interface BreakLocation { - /** - * Script identifier as reported in the Debugger.scriptParsed. - */ - scriptId: Runtime.ScriptId; - /** - * Line number in the script (0-based). - */ - lineNumber: number; - /** - * Column number in the script (0-based). - */ - columnNumber?: number; - type?: string; - } - - interface SetBreakpointsActiveParameterType { - /** - * New value for breakpoints active state. - */ - active: boolean; - } - - interface SetSkipAllPausesParameterType { - /** - * New value for skip pauses state. - */ - skip: boolean; - } - - interface SetBreakpointByUrlParameterType { - /** - * Line number to set breakpoint at. - */ - lineNumber: number; - /** - * URL of the resources to set breakpoint on. - */ - url?: string; - /** - * Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified. - */ - urlRegex?: string; - /** - * Script hash of the resources to set breakpoint on. - */ - scriptHash?: string; - /** - * Offset in the line to set breakpoint at. - */ - columnNumber?: number; - /** - * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. - */ - condition?: string; - } - - interface SetBreakpointParameterType { - /** - * Location to set breakpoint in. - */ - location: Location; - /** - * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. - */ - condition?: string; - } - - interface RemoveBreakpointParameterType { - breakpointId: BreakpointId; - } - - interface GetPossibleBreakpointsParameterType { - /** - * Start of range to search possible breakpoint locations in. - */ - start: Location; - /** - * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. - */ - end?: Location; - /** - * Only consider locations which are in the same (non-nested) function as start. - */ - restrictToFunction?: boolean; - } - - interface ContinueToLocationParameterType { - /** - * Location to continue to. - */ - location: Location; - targetCallFrames?: string; - } - - interface PauseOnAsyncCallParameterType { - /** - * Debugger will pause when async call with given stack trace is started. - */ - parentStackTraceId: Runtime.StackTraceId; - } - - interface StepIntoParameterType { - /** - * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause. - * @experimental - */ - breakOnAsyncCall?: boolean; - } - - interface GetStackTraceParameterType { - stackTraceId: Runtime.StackTraceId; - } - - interface SearchInContentParameterType { - /** - * Id of the script to search in. - */ - scriptId: Runtime.ScriptId; - /** - * String to search for. - */ - query: string; - /** - * If true, search is case sensitive. - */ - caseSensitive?: boolean; - /** - * If true, treats string parameter as regex. - */ - isRegex?: boolean; - } - - interface SetScriptSourceParameterType { - /** - * Id of the script to edit. - */ - scriptId: Runtime.ScriptId; - /** - * New content of the script. - */ - scriptSource: string; - /** - * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. - */ - dryRun?: boolean; - } - - interface RestartFrameParameterType { - /** - * Call frame identifier to evaluate on. - */ - callFrameId: CallFrameId; - } - - interface GetScriptSourceParameterType { - /** - * Id of the script to get source for. - */ - scriptId: Runtime.ScriptId; - } - - interface SetPauseOnExceptionsParameterType { - /** - * Pause on exceptions mode. - */ - state: string; - } - - interface EvaluateOnCallFrameParameterType { - /** - * Call frame identifier to evaluate on. - */ - callFrameId: CallFrameId; - /** - * Expression to evaluate. - */ - expression: string; - /** - * String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup). - */ - objectGroup?: string; - /** - * Specifies whether command line API should be available to the evaluated expression, defaults to false. - */ - includeCommandLineAPI?: boolean; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean; - /** - * Whether preview should be generated for the result. - * @experimental - */ - generatePreview?: boolean; - /** - * Whether to throw an exception if side effect cannot be ruled out during evaluation. - */ - throwOnSideEffect?: boolean; - } - - interface SetVariableValueParameterType { - /** - * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. - */ - scopeNumber: number; - /** - * Variable name. - */ - variableName: string; - /** - * New variable value. - */ - newValue: Runtime.CallArgument; - /** - * Id of callframe that holds variable. - */ - callFrameId: CallFrameId; - } - - interface SetReturnValueParameterType { - /** - * New return value. - */ - newValue: Runtime.CallArgument; - } - - interface SetAsyncCallStackDepthParameterType { - /** - * Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default). - */ - maxDepth: number; - } - - interface SetBlackboxPatternsParameterType { - /** - * Array of regexps that will be used to check script url for blackbox state. - */ - patterns: string[]; - } - - interface SetBlackboxedRangesParameterType { - /** - * Id of the script. - */ - scriptId: Runtime.ScriptId; - positions: ScriptPosition[]; - } - - interface EnableReturnType { - /** - * Unique identifier of the debugger. - * @experimental - */ - debuggerId: Runtime.UniqueDebuggerId; - } - - interface SetBreakpointByUrlReturnType { - /** - * Id of the created breakpoint for further reference. - */ - breakpointId: BreakpointId; - /** - * List of the locations this breakpoint resolved into upon addition. - */ - locations: Location[]; - } - - interface SetBreakpointReturnType { - /** - * Id of the created breakpoint for further reference. - */ - breakpointId: BreakpointId; - /** - * Location this breakpoint resolved into. - */ - actualLocation: Location; - } - - interface GetPossibleBreakpointsReturnType { - /** - * List of the possible breakpoint locations. - */ - locations: BreakLocation[]; - } - - interface GetStackTraceReturnType { - stackTrace: Runtime.StackTrace; - } - - interface SearchInContentReturnType { - /** - * List of search matches. - */ - result: SearchMatch[]; - } - - interface SetScriptSourceReturnType { - /** - * New stack trace in case editing has happened while VM was stopped. - */ - callFrames?: CallFrame[]; - /** - * Whether current call stack was modified after applying the changes. - */ - stackChanged?: boolean; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace; - /** - * Async stack trace, if any. - * @experimental - */ - asyncStackTraceId?: Runtime.StackTraceId; - /** - * Exception details if any. - */ - exceptionDetails?: Runtime.ExceptionDetails; - } - - interface RestartFrameReturnType { - /** - * New stack trace. - */ - callFrames: CallFrame[]; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace; - /** - * Async stack trace, if any. - * @experimental - */ - asyncStackTraceId?: Runtime.StackTraceId; - } - - interface GetScriptSourceReturnType { - /** - * Script source. - */ - scriptSource: string; - } - - interface EvaluateOnCallFrameReturnType { - /** - * Object wrapper for the evaluation result. - */ - result: Runtime.RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: Runtime.ExceptionDetails; - } - - interface ScriptParsedEventDataType { - /** - * Identifier of the script parsed. - */ - scriptId: Runtime.ScriptId; - /** - * URL or name of the script parsed (if any). - */ - url: string; - /** - * Line offset of the script within the resource with given URL (for script tags). - */ - startLine: number; - /** - * Column offset of the script within the resource with given URL. - */ - startColumn: number; - /** - * Last line of the script. - */ - endLine: number; - /** - * Length of the last line of the script. - */ - endColumn: number; - /** - * Specifies script creation context. - */ - executionContextId: Runtime.ExecutionContextId; - /** - * Content hash of the script. - */ - hash: string; - /** - * Embedder-specific auxiliary data. - */ - executionContextAuxData?: {}; - /** - * True, if this script is generated as a result of the live edit operation. - * @experimental - */ - isLiveEdit?: boolean; - /** - * URL of source map associated with script (if any). - */ - sourceMapURL?: string; - /** - * True, if this script has sourceURL. - */ - hasSourceURL?: boolean; - /** - * True, if this script is ES6 module. - */ - isModule?: boolean; - /** - * This script length. - */ - length?: number; - /** - * JavaScript top stack frame of where the script parsed event was triggered if available. - * @experimental - */ - stackTrace?: Runtime.StackTrace; - } - - interface ScriptFailedToParseEventDataType { - /** - * Identifier of the script parsed. - */ - scriptId: Runtime.ScriptId; - /** - * URL or name of the script parsed (if any). - */ - url: string; - /** - * Line offset of the script within the resource with given URL (for script tags). - */ - startLine: number; - /** - * Column offset of the script within the resource with given URL. - */ - startColumn: number; - /** - * Last line of the script. - */ - endLine: number; - /** - * Length of the last line of the script. - */ - endColumn: number; - /** - * Specifies script creation context. - */ - executionContextId: Runtime.ExecutionContextId; - /** - * Content hash of the script. - */ - hash: string; - /** - * Embedder-specific auxiliary data. - */ - executionContextAuxData?: {}; - /** - * URL of source map associated with script (if any). - */ - sourceMapURL?: string; - /** - * True, if this script has sourceURL. - */ - hasSourceURL?: boolean; - /** - * True, if this script is ES6 module. - */ - isModule?: boolean; - /** - * This script length. - */ - length?: number; - /** - * JavaScript top stack frame of where the script parsed event was triggered if available. - * @experimental - */ - stackTrace?: Runtime.StackTrace; - } - - interface BreakpointResolvedEventDataType { - /** - * Breakpoint unique identifier. - */ - breakpointId: BreakpointId; - /** - * Actual breakpoint location. - */ - location: Location; - } - - interface PausedEventDataType { - /** - * Call stack the virtual machine stopped on. - */ - callFrames: CallFrame[]; - /** - * Pause reason. - */ - reason: string; - /** - * Object containing break-specific auxiliary properties. - */ - data?: {}; - /** - * Hit breakpoints IDs - */ - hitBreakpoints?: string[]; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace; - /** - * Async stack trace, if any. - * @experimental - */ - asyncStackTraceId?: Runtime.StackTraceId; - /** - * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after Debugger.stepInto call with breakOnAsynCall flag. - * @experimental - */ - asyncCallStackTraceId?: Runtime.StackTraceId; - } - } - - namespace Console { - /** - * Console message. - */ - interface ConsoleMessage { - /** - * Message source. - */ - source: string; - /** - * Message severity. - */ - level: string; - /** - * Message text. - */ - text: string; - /** - * URL of the message origin. - */ - url?: string; - /** - * Line number in the resource that generated this message (1-based). - */ - line?: number; - /** - * Column number in the resource that generated this message (1-based). - */ - column?: number; - } - - interface MessageAddedEventDataType { - /** - * Console message that has been added. - */ - message: ConsoleMessage; - } - } - - namespace Profiler { - /** - * Profile node. Holds callsite information, execution statistics and child nodes. - */ - interface ProfileNode { - /** - * Unique id of the node. - */ - id: number; - /** - * Function location. - */ - callFrame: Runtime.CallFrame; - /** - * Number of samples where this node was on top of the call stack. - */ - hitCount?: number; - /** - * Child node ids. - */ - children?: number[]; - /** - * The reason of being not optimized. The function may be deoptimized or marked as don't optimize. - */ - deoptReason?: string; - /** - * An array of source position ticks. - */ - positionTicks?: PositionTickInfo[]; - } - - /** - * Profile. - */ - interface Profile { - /** - * The list of profile nodes. First item is the root node. - */ - nodes: ProfileNode[]; - /** - * Profiling start timestamp in microseconds. - */ - startTime: number; - /** - * Profiling end timestamp in microseconds. - */ - endTime: number; - /** - * Ids of samples top nodes. - */ - samples?: number[]; - /** - * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. - */ - timeDeltas?: number[]; - } - - /** - * Specifies a number of samples attributed to a certain source position. - */ - interface PositionTickInfo { - /** - * Source line number (1-based). - */ - line: number; - /** - * Number of samples attributed to the source line. - */ - ticks: number; - } - - /** - * Coverage data for a source range. - */ - interface CoverageRange { - /** - * JavaScript script source offset for the range start. - */ - startOffset: number; - /** - * JavaScript script source offset for the range end. - */ - endOffset: number; - /** - * Collected execution count of the source range. - */ - count: number; - } - - /** - * Coverage data for a JavaScript function. - */ - interface FunctionCoverage { - /** - * JavaScript function name. - */ - functionName: string; - /** - * Source ranges inside the function with coverage data. - */ - ranges: CoverageRange[]; - /** - * Whether coverage data for this function has block granularity. - */ - isBlockCoverage: boolean; - } - - /** - * Coverage data for a JavaScript script. - */ - interface ScriptCoverage { - /** - * JavaScript script id. - */ - scriptId: Runtime.ScriptId; - /** - * JavaScript script name or url. - */ - url: string; - /** - * Functions contained in the script that has coverage data. - */ - functions: FunctionCoverage[]; - } - - /** - * Describes a type collected during runtime. - * @experimental - */ - interface TypeObject { - /** - * Name of a type collected with type profiling. - */ - name: string; - } - - /** - * Source offset and types for a parameter or return value. - * @experimental - */ - interface TypeProfileEntry { - /** - * Source offset of the parameter or end of function for return values. - */ - offset: number; - /** - * The types for this parameter or return value. - */ - types: TypeObject[]; - } - - /** - * Type profile data collected during runtime for a JavaScript script. - * @experimental - */ - interface ScriptTypeProfile { - /** - * JavaScript script id. - */ - scriptId: Runtime.ScriptId; - /** - * JavaScript script name or url. - */ - url: string; - /** - * Type profile entries for parameters and return values of the functions in the script. - */ - entries: TypeProfileEntry[]; - } - - interface SetSamplingIntervalParameterType { - /** - * New sampling interval in microseconds. - */ - interval: number; - } - - interface StartPreciseCoverageParameterType { - /** - * Collect accurate call counts beyond simple 'covered' or 'not covered'. - */ - callCount?: boolean; - /** - * Collect block-based coverage. - */ - detailed?: boolean; - } - - interface StopReturnType { - /** - * Recorded profile. - */ - profile: Profile; - } - - interface TakePreciseCoverageReturnType { - /** - * Coverage data for the current isolate. - */ - result: ScriptCoverage[]; - } - - interface GetBestEffortCoverageReturnType { - /** - * Coverage data for the current isolate. - */ - result: ScriptCoverage[]; - } - - interface TakeTypeProfileReturnType { - /** - * Type profile for all scripts since startTypeProfile() was turned on. - */ - result: ScriptTypeProfile[]; - } - - interface ConsoleProfileStartedEventDataType { - id: string; - /** - * Location of console.profile(). - */ - location: Debugger.Location; - /** - * Profile title passed as an argument to console.profile(). - */ - title?: string; - } - - interface ConsoleProfileFinishedEventDataType { - id: string; - /** - * Location of console.profileEnd(). - */ - location: Debugger.Location; - profile: Profile; - /** - * Profile title passed as an argument to console.profile(). - */ - title?: string; - } - } - - namespace HeapProfiler { - /** - * Heap snapshot object id. - */ - type HeapSnapshotObjectId = string; - - /** - * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. - */ - interface SamplingHeapProfileNode { - /** - * Function location. - */ - callFrame: Runtime.CallFrame; - /** - * Allocations size in bytes for the node excluding children. - */ - selfSize: number; - /** - * Child nodes. - */ - children: SamplingHeapProfileNode[]; - } - - /** - * Profile. - */ - interface SamplingHeapProfile { - head: SamplingHeapProfileNode; - } - - interface StartTrackingHeapObjectsParameterType { - trackAllocations?: boolean; - } - - interface StopTrackingHeapObjectsParameterType { - /** - * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. - */ - reportProgress?: boolean; - } - - interface TakeHeapSnapshotParameterType { - /** - * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. - */ - reportProgress?: boolean; - } - - interface GetObjectByHeapObjectIdParameterType { - objectId: HeapSnapshotObjectId; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string; - } - - interface AddInspectedHeapObjectParameterType { - /** - * Heap snapshot object id to be accessible by means of $x command line API. - */ - heapObjectId: HeapSnapshotObjectId; - } - - interface GetHeapObjectIdParameterType { - /** - * Identifier of the object to get heap object id for. - */ - objectId: Runtime.RemoteObjectId; - } - - interface StartSamplingParameterType { - /** - * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. - */ - samplingInterval?: number; - } - - interface GetObjectByHeapObjectIdReturnType { - /** - * Evaluation result. - */ - result: Runtime.RemoteObject; - } - - interface GetHeapObjectIdReturnType { - /** - * Id of the heap snapshot object corresponding to the passed remote object id. - */ - heapSnapshotObjectId: HeapSnapshotObjectId; - } - - interface StopSamplingReturnType { - /** - * Recorded sampling heap profile. - */ - profile: SamplingHeapProfile; - } - - interface GetSamplingProfileReturnType { - /** - * Return the sampling profile being collected. - */ - profile: SamplingHeapProfile; - } - - interface AddHeapSnapshotChunkEventDataType { - chunk: string; - } - - interface ReportHeapSnapshotProgressEventDataType { - done: number; - total: number; - finished?: boolean; - } - - interface LastSeenObjectIdEventDataType { - lastSeenObjectId: number; - timestamp: number; - } - - interface HeapStatsUpdateEventDataType { - /** - * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment. - */ - statsUpdate: number[]; - } - } - - namespace NodeTracing { - interface TraceConfig { - /** - * Controls how the trace buffer stores data. - */ - recordMode?: string; - /** - * Included category filters. - */ - includedCategories: string[]; - } - - interface StartParameterType { - traceConfig: TraceConfig; - } - - interface GetCategoriesReturnType { - /** - * A list of supported tracing categories. - */ - categories: string[]; - } - - interface DataCollectedEventDataType { - value: Array<{}>; - } - } - - namespace NodeWorker { - type WorkerID = string; - - /** - * Unique identifier of attached debugging session. - */ - type SessionID = string; - - interface WorkerInfo { - workerId: WorkerID; - type: string; - title: string; - url: string; - } - - interface SendMessageToWorkerParameterType { - message: string; - /** - * Identifier of the session. - */ - sessionId: SessionID; - } - - interface EnableParameterType { - /** - * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger` - * message to run them. - */ - waitForDebuggerOnStart: boolean; - } - - interface DetachParameterType { - sessionId: SessionID; - } - - interface AttachedToWorkerEventDataType { - /** - * Identifier assigned to the session used to send/receive messages. - */ - sessionId: SessionID; - workerInfo: WorkerInfo; - waitingForDebugger: boolean; - } - - interface DetachedFromWorkerEventDataType { - /** - * Detached session identifier. - */ - sessionId: SessionID; - } - - interface ReceivedMessageFromWorkerEventDataType { - /** - * Identifier of a session which sends a message. - */ - sessionId: SessionID; - message: string; - } - } - - namespace NodeRuntime { - interface NotifyWhenWaitingForDisconnectParameterType { - enabled: boolean; - } - } - - /** - * The inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications. - */ - class Session extends EventEmitter { - /** - * Create a new instance of the inspector.Session class. - * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend. - */ - constructor(); - - /** - * Connects a session to the inspector back-end. - * An exception will be thrown if there is already a connected session established either - * through the API or by a front-end connected to the Inspector WebSocket port. - */ - connect(): void; - - /** - * Immediately close the session. All pending message callbacks will be called with an error. - * session.connect() will need to be called to be able to send messages again. - * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. - */ - disconnect(): void; - - /** - * Posts a message to the inspector back-end. callback will be notified when a response is received. - * callback is a function that accepts two optional arguments - error and message-specific result. - */ - post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void; - post(method: string, callback?: (err: Error | null, params?: {}) => void): void; - - /** - * Returns supported domains. - */ - post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; - - /** - * Evaluates expression on global object. - */ - post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; - post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; - - /** - * Add handler to promise with given promise object id. - */ - post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; - post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; - - /** - * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. - */ - post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; - post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; - - /** - * Returns properties of a given object. Object group of the result is inherited from the target object. - */ - post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; - post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; - - /** - * Releases remote object with given id. - */ - post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; - post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void; - - /** - * Releases all remote objects that belong to a given group. - */ - post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; - post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void; - - /** - * Tells inspected instance to run if it was waiting for debugger to attach. - */ - post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void; - - /** - * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. - */ - post(method: "Runtime.enable", callback?: (err: Error | null) => void): void; - - /** - * Disables reporting of execution contexts creation. - */ - post(method: "Runtime.disable", callback?: (err: Error | null) => void): void; - - /** - * Discards collected exceptions and console API calls. - */ - post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void; - - /** - * @experimental - */ - post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; - post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void; - - /** - * Compiles expression. - */ - post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; - post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; - - /** - * Runs script with given id in a given context. - */ - post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; - post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; - - post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; - post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; - - /** - * Returns all let, const and class variables from global scope. - */ - post( - method: "Runtime.globalLexicalScopeNames", - params?: Runtime.GlobalLexicalScopeNamesParameterType, - callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void - ): void; - post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void; - - /** - * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. - */ - post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void; - - /** - * Disables debugger for given page. - */ - post(method: "Debugger.disable", callback?: (err: Error | null) => void): void; - - /** - * Activates / deactivates all breakpoints on the page. - */ - post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void; - - /** - * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). - */ - post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void; - - /** - * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. - */ - post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; - post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; - - /** - * Sets JavaScript breakpoint at a given location. - */ - post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; - post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; - - /** - * Removes JavaScript breakpoint. - */ - post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void; - - /** - * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. - */ - post( - method: "Debugger.getPossibleBreakpoints", - params?: Debugger.GetPossibleBreakpointsParameterType, - callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void - ): void; - post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; - - /** - * Continues execution until specific location is reached. - */ - post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void; - - /** - * @experimental - */ - post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void; - - /** - * Steps over the statement. - */ - post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void; - - /** - * Steps into the function call. - */ - post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void; - - /** - * Steps out of the function call. - */ - post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void; - - /** - * Stops on the next JavaScript statement. - */ - post(method: "Debugger.pause", callback?: (err: Error | null) => void): void; - - /** - * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. - * @experimental - */ - post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void; - - /** - * Resumes JavaScript execution. - */ - post(method: "Debugger.resume", callback?: (err: Error | null) => void): void; - - /** - * Returns stack trace with given stackTraceId. - * @experimental - */ - post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; - post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; - - /** - * Searches for given string in script content. - */ - post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; - post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; - - /** - * Edits JavaScript source live. - */ - post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; - post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; - - /** - * Restarts particular call frame from the beginning. - */ - post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; - post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; - - /** - * Returns source for the script with given id. - */ - post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; - post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; - - /** - * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. - */ - post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void; - - /** - * Evaluates expression on a given call frame. - */ - post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; - post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; - - /** - * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. - */ - post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void; - - /** - * Changes return value in top frame. Available only at return break position. - * @experimental - */ - post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void; - - /** - * Enables or disables async call stacks tracking. - */ - post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void; - - /** - * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. - * @experimental - */ - post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void; - - /** - * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. - * @experimental - */ - post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; - post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void; - - /** - * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. - */ - post(method: "Console.enable", callback?: (err: Error | null) => void): void; - - /** - * Disables console domain, prevents further console messages from being reported to the client. - */ - post(method: "Console.disable", callback?: (err: Error | null) => void): void; - - /** - * Does nothing. - */ - post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void; - - post(method: "Profiler.enable", callback?: (err: Error | null) => void): void; - - post(method: "Profiler.disable", callback?: (err: Error | null) => void): void; - - /** - * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. - */ - post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; - post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void; - - post(method: "Profiler.start", callback?: (err: Error | null) => void): void; - - post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; - - /** - * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. - */ - post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; - post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void; - - /** - * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. - */ - post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void; - - /** - * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. - */ - post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; - - /** - * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. - */ - post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; - - /** - * Enable type profile. - * @experimental - */ - post(method: "Profiler.startTypeProfile", callback?: (err: Error | null) => void): void; - - /** - * Disable type profile. Disabling releases type profile data collected so far. - * @experimental - */ - post(method: "Profiler.stopTypeProfile", callback?: (err: Error | null) => void): void; - - /** - * Collect type profile. - * @experimental - */ - post(method: "Profiler.takeTypeProfile", callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void; - - post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void; - - post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void; - - post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void; - - post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void; - - post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void; - - post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void; - - post( - method: "HeapProfiler.getObjectByHeapObjectId", - params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, - callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void - ): void; - post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; - - /** - * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). - */ - post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void; - - post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; - post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; - - post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; - post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void; - - post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; - - post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void; - - /** - * Gets supported tracing categories. - */ - post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void; - - /** - * Start trace events collection. - */ - post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void; - - /** - * Stop trace events collection. Remaining collected events will be sent as a sequence of - * dataCollected events followed by tracingComplete event. - */ - post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void; - - /** - * Sends protocol message over session with given id. - */ - post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void; - - /** - * Instructs the inspector to attach to running workers. Will also attach to new workers - * as they start - */ - post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void; - - /** - * Detaches from all running workers and disables attaching to new workers as they are started. - */ - post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void; - - /** - * Detached from the worker with given sessionId. - */ - post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeWorker.detach", callback?: (err: Error | null) => void): void; - - /** - * Enable the `NodeRuntime.waitingForDisconnect`. - */ - post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void; - post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", callback?: (err: Error | null) => void): void; - - // Events - - addListener(event: string, listener: (...args: any[]) => void): this; - - /** - * Emitted when any notification from the V8 Inspector is received. - */ - addListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; - - /** - * Issued when new execution context is created. - */ - addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when execution context is destroyed. - */ - addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when all executionContexts were cleared in browser - */ - addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - - /** - * Issued when exception was thrown and unhandled. - */ - addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when unhandled exception was revoked. - */ - addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when console API was called. - */ - addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when virtual machine fails to parse the script. - */ - addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when the virtual machine resumed execution. - */ - addListener(event: "Debugger.resumed", listener: () => void): this; - - /** - * Issued when new console message is added. - */ - addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - - /** - * Sent when new profile recording is started using console.profile() call. - */ - addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - - addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - - /** - * Contains an bucket of collected trace events. - */ - addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - addListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - - /** - * Issued when attached to a worker. - */ - addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when detached from the worker. - */ - addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean; - emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; - emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; - emit(event: "Runtime.executionContextsCleared"): boolean; - emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; - emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; - emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; - emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; - emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; - emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; - emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; - emit(event: "Debugger.paused", message: InspectorNotification): boolean; - emit(event: "Debugger.resumed"): boolean; - emit(event: "Console.messageAdded", message: InspectorNotification): boolean; - emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; - emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.resetProfiles"): boolean; - emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; - emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; - emit(event: "NodeTracing.dataCollected", message: InspectorNotification): boolean; - emit(event: "NodeTracing.tracingComplete"): boolean; - emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification): boolean; - emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification): boolean; - emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification): boolean; - emit(event: "NodeRuntime.waitingForDisconnect"): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - - /** - * Emitted when any notification from the V8 Inspector is received. - */ - on(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; - - /** - * Issued when new execution context is created. - */ - on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when execution context is destroyed. - */ - on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when all executionContexts were cleared in browser - */ - on(event: "Runtime.executionContextsCleared", listener: () => void): this; - - /** - * Issued when exception was thrown and unhandled. - */ - on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when unhandled exception was revoked. - */ - on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when console API was called. - */ - on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when virtual machine fails to parse the script. - */ - on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when the virtual machine resumed execution. - */ - on(event: "Debugger.resumed", listener: () => void): this; - - /** - * Issued when new console message is added. - */ - on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - - /** - * Sent when new profile recording is started using console.profile() call. - */ - on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - - on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - on(event: "HeapProfiler.resetProfiles", listener: () => void): this; - on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - - /** - * Contains an bucket of collected trace events. - */ - on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - on(event: "NodeTracing.tracingComplete", listener: () => void): this; - - /** - * Issued when attached to a worker. - */ - on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when detached from the worker. - */ - on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - - once(event: string, listener: (...args: any[]) => void): this; - - /** - * Emitted when any notification from the V8 Inspector is received. - */ - once(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; - - /** - * Issued when new execution context is created. - */ - once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when execution context is destroyed. - */ - once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when all executionContexts were cleared in browser - */ - once(event: "Runtime.executionContextsCleared", listener: () => void): this; - - /** - * Issued when exception was thrown and unhandled. - */ - once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when unhandled exception was revoked. - */ - once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when console API was called. - */ - once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when virtual machine fails to parse the script. - */ - once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when the virtual machine resumed execution. - */ - once(event: "Debugger.resumed", listener: () => void): this; - - /** - * Issued when new console message is added. - */ - once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - - /** - * Sent when new profile recording is started using console.profile() call. - */ - once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - - once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - once(event: "HeapProfiler.resetProfiles", listener: () => void): this; - once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - - /** - * Contains an bucket of collected trace events. - */ - once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - once(event: "NodeTracing.tracingComplete", listener: () => void): this; - - /** - * Issued when attached to a worker. - */ - once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when detached from the worker. - */ - once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - - prependListener(event: string, listener: (...args: any[]) => void): this; - - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; - - /** - * Issued when new execution context is created. - */ - prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when execution context is destroyed. - */ - prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when all executionContexts were cleared in browser - */ - prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - - /** - * Issued when exception was thrown and unhandled. - */ - prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when unhandled exception was revoked. - */ - prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when console API was called. - */ - prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when virtual machine fails to parse the script. - */ - prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when the virtual machine resumed execution. - */ - prependListener(event: "Debugger.resumed", listener: () => void): this; - - /** - * Issued when new console message is added. - */ - prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - - prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - - /** - * Contains an bucket of collected trace events. - */ - prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - - /** - * Issued when attached to a worker. - */ - prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when detached from the worker. - */ - prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; - - /** - * Issued when new execution context is created. - */ - prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when execution context is destroyed. - */ - prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when all executionContexts were cleared in browser - */ - prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; - - /** - * Issued when exception was thrown and unhandled. - */ - prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when unhandled exception was revoked. - */ - prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when console API was called. - */ - prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when virtual machine fails to parse the script. - */ - prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; - - /** - * Fired when the virtual machine resumed execution. - */ - prependOnceListener(event: "Debugger.resumed", listener: () => void): this; - - /** - * Issued when new console message is added. - */ - prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; - - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; - - prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; - prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; - - /** - * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. - */ - prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; - - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; - - /** - * Contains an bucket of collected trace events. - */ - prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification) => void): this; - - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this; - - /** - * Issued when attached to a worker. - */ - prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification) => void): this; - - /** - * Issued when detached from the worker. - */ - prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification) => void): this; - - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification) => void): this; - - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this; - } - - // Top Level API - - /** - * Activate inspector on host and port. Equivalent to node --inspect=[[host:]port], but can be done programatically after node has started. - * If wait is true, will block until a client has connected to the inspect port and flow control has been passed to the debugger client. - * @param port Port to listen on for inspector connections. Optional, defaults to what was specified on the CLI. - * @param host Host to listen on for inspector connections. Optional, defaults to what was specified on the CLI. - * @param wait Block until a client has connected. Optional, defaults to false. - */ - function open(port?: number, host?: string, wait?: boolean): void; - - /** - * Deactivate the inspector. Blocks until there are no active connections. - */ - function close(): void; - - /** - * Return the URL of the active inspector, or `undefined` if there is none. - */ - function url(): string | undefined; -} diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts deleted file mode 100644 index f512be7e..00000000 --- a/node_modules/@types/node/module.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module "module" { - export = NodeJS.Module; -} diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts deleted file mode 100644 index c8bccb7b..00000000 --- a/node_modules/@types/node/net.d.ts +++ /dev/null @@ -1,249 +0,0 @@ -declare module "net" { - import * as stream from "stream"; - import * as events from "events"; - import * as dns from "dns"; - - type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void; - - interface AddressInfo { - address: string; - family: string; - port: number; - } - - interface SocketConstructorOpts { - fd?: number; - allowHalfOpen?: boolean; - readable?: boolean; - writable?: boolean; - } - - interface TcpSocketConnectOpts { - port: number; - host?: string; - localAddress?: string; - localPort?: number; - hints?: number; - family?: number; - lookup?: LookupFunction; - } - - interface IpcSocketConnectOpts { - path: string; - } - - type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; - - class Socket extends stream.Duplex { - constructor(options?: SocketConstructorOpts); - - // Extended base methods - write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean; - write(str: Uint8Array | string, encoding?: string, cb?: (err?: Error) => void): boolean; - - connect(options: SocketConnectOpts, connectionListener?: () => void): this; - connect(port: number, host: string, connectionListener?: () => void): this; - connect(port: number, connectionListener?: () => void): this; - connect(path: string, connectionListener?: () => void): this; - - setEncoding(encoding?: string): this; - pause(): this; - resume(): this; - setTimeout(timeout: number, callback?: () => void): this; - setNoDelay(noDelay?: boolean): this; - setKeepAlive(enable?: boolean, initialDelay?: number): this; - address(): AddressInfo | string; - unref(): void; - ref(): void; - - readonly bufferSize: number; - readonly bytesRead: number; - readonly bytesWritten: number; - readonly connecting: boolean; - readonly destroyed: boolean; - readonly localAddress: string; - readonly localPort: number; - readonly remoteAddress?: string; - readonly remoteFamily?: string; - readonly remotePort?: number; - - // Extended base methods - end(cb?: () => void): void; - end(buffer: Uint8Array | string, cb?: () => void): void; - end(str: Uint8Array | string, encoding?: string, cb?: () => void): void; - - /** - * events.EventEmitter - * 1. close - * 2. connect - * 3. data - * 4. drain - * 5. end - * 6. error - * 7. lookup - * 8. timeout - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: (had_error: boolean) => void): this; - addListener(event: "connect", listener: () => void): this; - addListener(event: "data", listener: (data: Buffer) => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - addListener(event: "timeout", listener: () => void): this; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close", had_error: boolean): boolean; - emit(event: "connect"): boolean; - emit(event: "data", data: Buffer): boolean; - emit(event: "drain"): boolean; - emit(event: "end"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean; - emit(event: "timeout"): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: (had_error: boolean) => void): this; - on(event: "connect", listener: () => void): this; - on(event: "data", listener: (data: Buffer) => void): this; - on(event: "drain", listener: () => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - on(event: "timeout", listener: () => void): this; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: (had_error: boolean) => void): this; - once(event: "connect", listener: () => void): this; - once(event: "data", listener: (data: Buffer) => void): this; - once(event: "drain", listener: () => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - once(event: "timeout", listener: () => void): this; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: (had_error: boolean) => void): this; - prependListener(event: "connect", listener: () => void): this; - prependListener(event: "data", listener: (data: Buffer) => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - prependListener(event: "timeout", listener: () => void): this; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: (had_error: boolean) => void): this; - prependOnceListener(event: "connect", listener: () => void): this; - prependOnceListener(event: "data", listener: (data: Buffer) => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - } - - interface ListenOptions { - port?: number; - host?: string; - backlog?: number; - path?: string; - exclusive?: boolean; - readableAll?: boolean; - writableAll?: boolean; - /** - * @default false - */ - ipv6Only?: boolean; - } - - // https://github.com/nodejs/node/blob/master/lib/net.js - class Server extends events.EventEmitter { - constructor(connectionListener?: (socket: Socket) => void); - constructor(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void); - - listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this; - listen(port?: number, hostname?: string, listeningListener?: () => void): this; - listen(port?: number, backlog?: number, listeningListener?: () => void): this; - listen(port?: number, listeningListener?: () => void): this; - listen(path: string, backlog?: number, listeningListener?: () => void): this; - listen(path: string, listeningListener?: () => void): this; - listen(options: ListenOptions, listeningListener?: () => void): this; - listen(handle: any, backlog?: number, listeningListener?: () => void): this; - listen(handle: any, listeningListener?: () => void): this; - close(callback?: (err?: Error) => void): this; - address(): AddressInfo | string | null; - getConnections(cb: (error: Error | null, count: number) => void): void; - ref(): this; - unref(): this; - maxConnections: number; - connections: number; - listening: boolean; - - /** - * events.EventEmitter - * 1. close - * 2. connection - * 3. error - * 4. listening - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "connection", listener: (socket: Socket) => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "connection", socket: Socket): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "connection", listener: (socket: Socket) => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "connection", listener: (socket: Socket) => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "connection", listener: (socket: Socket) => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "connection", listener: (socket: Socket) => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; - } - - interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { - timeout?: number; - } - - interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts { - timeout?: number; - } - - type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts; - - function createServer(connectionListener?: (socket: Socket) => void): Server; - function createServer(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void): Server; - function connect(options: NetConnectOpts, connectionListener?: () => void): Socket; - function connect(port: number, host?: string, connectionListener?: () => void): Socket; - function connect(path: string, connectionListener?: () => void): Socket; - function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket; - function createConnection(port: number, host?: string, connectionListener?: () => void): Socket; - function createConnection(path: string, connectionListener?: () => void): Socket; - function isIP(input: string): number; - function isIPv4(input: string): boolean; - function isIPv6(input: string): boolean; -} diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts deleted file mode 100644 index 4182e507..00000000 --- a/node_modules/@types/node/os.d.ts +++ /dev/null @@ -1,201 +0,0 @@ -declare module "os" { - interface CpuInfo { - model: string; - speed: number; - times: { - user: number; - nice: number; - sys: number; - idle: number; - irq: number; - }; - } - - interface NetworkInterfaceBase { - address: string; - netmask: string; - mac: string; - internal: boolean; - cidr: string | null; - } - - interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase { - family: "IPv4"; - } - - interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase { - family: "IPv6"; - scopeid: number; - } - - interface UserInfo { - username: T; - uid: number; - gid: number; - shell: T; - homedir: T; - } - - type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6; - - function hostname(): string; - function loadavg(): number[]; - function uptime(): number; - function freemem(): number; - function totalmem(): number; - function cpus(): CpuInfo[]; - function type(): string; - function release(): string; - function networkInterfaces(): { [index: string]: NetworkInterfaceInfo[] }; - function homedir(): string; - function userInfo(options: { encoding: 'buffer' }): UserInfo; - function userInfo(options?: { encoding: string }): UserInfo; - const constants: { - UV_UDP_REUSEADDR: number; - signals: { - SIGHUP: number; - SIGINT: number; - SIGQUIT: number; - SIGILL: number; - SIGTRAP: number; - SIGABRT: number; - SIGIOT: number; - SIGBUS: number; - SIGFPE: number; - SIGKILL: number; - SIGUSR1: number; - SIGSEGV: number; - SIGUSR2: number; - SIGPIPE: number; - SIGALRM: number; - SIGTERM: number; - SIGCHLD: number; - SIGSTKFLT: number; - SIGCONT: number; - SIGSTOP: number; - SIGTSTP: number; - SIGTTIN: number; - SIGTTOU: number; - SIGURG: number; - SIGXCPU: number; - SIGXFSZ: number; - SIGVTALRM: number; - SIGPROF: number; - SIGWINCH: number; - SIGIO: number; - SIGPOLL: number; - SIGPWR: number; - SIGSYS: number; - SIGUNUSED: number; - }; - errno: { - E2BIG: number; - EACCES: number; - EADDRINUSE: number; - EADDRNOTAVAIL: number; - EAFNOSUPPORT: number; - EAGAIN: number; - EALREADY: number; - EBADF: number; - EBADMSG: number; - EBUSY: number; - ECANCELED: number; - ECHILD: number; - ECONNABORTED: number; - ECONNREFUSED: number; - ECONNRESET: number; - EDEADLK: number; - EDESTADDRREQ: number; - EDOM: number; - EDQUOT: number; - EEXIST: number; - EFAULT: number; - EFBIG: number; - EHOSTUNREACH: number; - EIDRM: number; - EILSEQ: number; - EINPROGRESS: number; - EINTR: number; - EINVAL: number; - EIO: number; - EISCONN: number; - EISDIR: number; - ELOOP: number; - EMFILE: number; - EMLINK: number; - EMSGSIZE: number; - EMULTIHOP: number; - ENAMETOOLONG: number; - ENETDOWN: number; - ENETRESET: number; - ENETUNREACH: number; - ENFILE: number; - ENOBUFS: number; - ENODATA: number; - ENODEV: number; - ENOENT: number; - ENOEXEC: number; - ENOLCK: number; - ENOLINK: number; - ENOMEM: number; - ENOMSG: number; - ENOPROTOOPT: number; - ENOSPC: number; - ENOSR: number; - ENOSTR: number; - ENOSYS: number; - ENOTCONN: number; - ENOTDIR: number; - ENOTEMPTY: number; - ENOTSOCK: number; - ENOTSUP: number; - ENOTTY: number; - ENXIO: number; - EOPNOTSUPP: number; - EOVERFLOW: number; - EPERM: number; - EPIPE: number; - EPROTO: number; - EPROTONOSUPPORT: number; - EPROTOTYPE: number; - ERANGE: number; - EROFS: number; - ESPIPE: number; - ESRCH: number; - ESTALE: number; - ETIME: number; - ETIMEDOUT: number; - ETXTBSY: number; - EWOULDBLOCK: number; - EXDEV: number; - }; - priority: { - PRIORITY_LOW: number; - PRIORITY_BELOW_NORMAL: number; - PRIORITY_NORMAL: number; - PRIORITY_ABOVE_NORMAL: number; - PRIORITY_HIGH: number; - PRIORITY_HIGHEST: number; - } - }; - function arch(): string; - function platform(): NodeJS.Platform; - function tmpdir(): string; - const EOL: string; - function endianness(): "BE" | "LE"; - /** - * Gets the priority of a process. - * Defaults to current process. - */ - function getPriority(pid?: number): number; - /** - * Sets the priority of the current process. - * @param priority Must be in range of -20 to 19 - */ - function setPriority(priority: number): void; - /** - * Sets the priority of the process specified process. - * @param priority Must be in range of -20 to 19 - */ - function setPriority(pid: number, priority: number): void; -} diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json deleted file mode 100644 index 05f5ec23..00000000 --- a/node_modules/@types/node/package.json +++ /dev/null @@ -1,208 +0,0 @@ -{ - "_args": [ - [ - "@types/node@12.7.4", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@types/node@12.7.4", - "_id": "@types/node@12.7.4", - "_inBundle": false, - "_integrity": "sha512-W0+n1Y+gK/8G2P/piTkBBN38Qc5Q1ZSO6B5H3QmPCUewaiXOo2GCAWZ4ElZCcNhjJuBSUSLGFUJnmlCn5+nxOQ==", - "_location": "/@types/node", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/node@12.7.4", - "name": "@types/node", - "escapedName": "@types%2fnode", - "scope": "@types", - "rawSpec": "12.7.4", - "saveSpec": null, - "fetchSpec": "12.7.4" - }, - "_requiredBy": [ - "#DEV:/" - ], - "_resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.4.tgz", - "_spec": "12.7.4", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "Microsoft TypeScript", - "url": "https://github.com/Microsoft" - }, - { - "name": "DefinitelyTyped", - "url": "https://github.com/DefinitelyTyped" - }, - { - "name": "Alberto Schiabel", - "url": "https://github.com/jkomyno" - }, - { - "name": "Alexander T.", - "url": "https://github.com/a-tarasyuk" - }, - { - "name": "Alvis HT Tang", - "url": "https://github.com/alvis" - }, - { - "name": "Andrew Makarov", - "url": "https://github.com/r3nya" - }, - { - "name": "Benjamin Toueg", - "url": "https://github.com/btoueg" - }, - { - "name": "Bruno Scheufler", - "url": "https://github.com/brunoscheufler" - }, - { - "name": "Chigozirim C.", - "url": "https://github.com/smac89" - }, - { - "name": "Christian Vaagland Tellnes", - "url": "https://github.com/tellnes" - }, - { - "name": "David Junger", - "url": "https://github.com/touffy" - }, - { - "name": "Deividas Bakanas", - "url": "https://github.com/DeividasBakanas" - }, - { - "name": "Eugene Y. Q. Shen", - "url": "https://github.com/eyqs" - }, - { - "name": "Flarna", - "url": "https://github.com/Flarna" - }, - { - "name": "Hannes Magnusson", - "url": "https://github.com/Hannes-Magnusson-CK" - }, - { - "name": "Hoàng Văn Khải", - "url": "https://github.com/KSXGitHub" - }, - { - "name": "Huw", - "url": "https://github.com/hoo29" - }, - { - "name": "Kelvin Jin", - "url": "https://github.com/kjin" - }, - { - "name": "Klaus Meinhardt", - "url": "https://github.com/ajafff" - }, - { - "name": "Lishude", - "url": "https://github.com/islishude" - }, - { - "name": "Mariusz Wiktorczyk", - "url": "https://github.com/mwiktorczyk" - }, - { - "name": "Matthieu Sieben", - "url": "https://github.com/matthieusieben" - }, - { - "name": "Mohsen Azimi", - "url": "https://github.com/mohsen1" - }, - { - "name": "Nicolas Even", - "url": "https://github.com/n-e" - }, - { - "name": "Nicolas Voigt", - "url": "https://github.com/octo-sniffle" - }, - { - "name": "Parambir Singh", - "url": "https://github.com/parambirs" - }, - { - "name": "Sebastian Silbermann", - "url": "https://github.com/eps1lon" - }, - { - "name": "Simon Schick", - "url": "https://github.com/SimonSchick" - }, - { - "name": "Thomas den Hollander", - "url": "https://github.com/ThomasdenH" - }, - { - "name": "Wilco Bakker", - "url": "https://github.com/WilcoBakker" - }, - { - "name": "wwwy3y3", - "url": "https://github.com/wwwy3y3" - }, - { - "name": "Zane Hannan AU", - "url": "https://github.com/ZaneHannanAU" - }, - { - "name": "Samuel Ainsworth", - "url": "https://github.com/samuela" - }, - { - "name": "Kyle Uehlein", - "url": "https://github.com/kuehlein" - }, - { - "name": "Jordi Oliveras Rovira", - "url": "https://github.com/j-oliveras" - }, - { - "name": "Thanik Bhongbhibhat", - "url": "https://github.com/bhongy" - }, - { - "name": "Marcin Kopacz", - "url": "https://github.com/chyzwar" - } - ], - "dependencies": {}, - "description": "TypeScript definitions for Node.js", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/node", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/node" - }, - "scripts": {}, - "typeScriptVersion": "2.0", - "types": "index", - "typesPublisherContentHash": "4a4995fbb23f76056c0076d4f3f947572a882c78d6502633cdb5a02bf4005f58", - "typesVersions": { - ">=3.2.0-0": { - "*": [ - "ts3.2/*" - ] - } - }, - "version": "12.7.4" -} diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts deleted file mode 100644 index 2f4a5491..00000000 --- a/node_modules/@types/node/path.d.ts +++ /dev/null @@ -1,159 +0,0 @@ -declare module "path" { - /** - * A parsed path object generated by path.parse() or consumed by path.format(). - */ - interface ParsedPath { - /** - * The root of the path such as '/' or 'c:\' - */ - root: string; - /** - * The full directory path such as '/home/user/dir' or 'c:\path\dir' - */ - dir: string; - /** - * The file name including extension (if any) such as 'index.html' - */ - base: string; - /** - * The file extension (if any) such as '.html' - */ - ext: string; - /** - * The file name without extension (if any) such as 'index' - */ - name: string; - } - interface FormatInputPathObject { - /** - * The root of the path such as '/' or 'c:\' - */ - root?: string; - /** - * The full directory path such as '/home/user/dir' or 'c:\path\dir' - */ - dir?: string; - /** - * The file name including extension (if any) such as 'index.html' - */ - base?: string; - /** - * The file extension (if any) such as '.html' - */ - ext?: string; - /** - * The file name without extension (if any) such as 'index' - */ - name?: string; - } - - /** - * Normalize a string path, reducing '..' and '.' parts. - * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. - * - * @param p string path to normalize. - */ - function normalize(p: string): string; - /** - * Join all arguments together and normalize the resulting path. - * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown. - * - * @param paths paths to join. - */ - function join(...paths: string[]): string; - /** - * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. - * - * Starting from leftmost {from} parameter, resolves {to} to an absolute path. - * - * If {to} isn't already absolute, {from} arguments are prepended in right to left order, - * until an absolute path is found. If after using all {from} paths still no absolute path is found, - * the current working directory is used as well. The resulting path is normalized, - * and trailing slashes are removed unless the path gets resolved to the root directory. - * - * @param pathSegments string paths to join. Non-string arguments are ignored. - */ - function resolve(...pathSegments: string[]): string; - /** - * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. - * - * @param path path to test. - */ - function isAbsolute(path: string): boolean; - /** - * Solve the relative path from {from} to {to}. - * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. - */ - function relative(from: string, to: string): string; - /** - * Return the directory name of a path. Similar to the Unix dirname command. - * - * @param p the path to evaluate. - */ - function dirname(p: string): string; - /** - * Return the last portion of a path. Similar to the Unix basename command. - * Often used to extract the file name from a fully qualified path. - * - * @param p the path to evaluate. - * @param ext optionally, an extension to remove from the result. - */ - function basename(p: string, ext?: string): string; - /** - * Return the extension of the path, from the last '.' to end of string in the last portion of the path. - * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string - * - * @param p the path to evaluate. - */ - function extname(p: string): string; - /** - * The platform-specific file separator. '\\' or '/'. - */ - const sep: '\\' | '/'; - /** - * The platform-specific file delimiter. ';' or ':'. - */ - const delimiter: ';' | ':'; - /** - * Returns an object from a path string - the opposite of format(). - * - * @param pathString path to evaluate. - */ - function parse(pathString: string): ParsedPath; - /** - * Returns a path string from an object - the opposite of parse(). - * - * @param pathString path to evaluate. - */ - function format(pathObject: FormatInputPathObject): string; - - namespace posix { - function normalize(p: string): string; - function join(...paths: string[]): string; - function resolve(...pathSegments: string[]): string; - function isAbsolute(p: string): boolean; - function relative(from: string, to: string): string; - function dirname(p: string): string; - function basename(p: string, ext?: string): string; - function extname(p: string): string; - const sep: string; - const delimiter: string; - function parse(p: string): ParsedPath; - function format(pP: FormatInputPathObject): string; - } - - namespace win32 { - function normalize(p: string): string; - function join(...paths: string[]): string; - function resolve(...pathSegments: string[]): string; - function isAbsolute(p: string): boolean; - function relative(from: string, to: string): string; - function dirname(p: string): string; - function basename(p: string, ext?: string): string; - function extname(p: string): string; - const sep: string; - const delimiter: string; - function parse(p: string): ParsedPath; - function format(pP: FormatInputPathObject): string; - } -} diff --git a/node_modules/@types/node/perf_hooks.d.ts b/node_modules/@types/node/perf_hooks.d.ts deleted file mode 100644 index bf44d446..00000000 --- a/node_modules/@types/node/perf_hooks.d.ts +++ /dev/null @@ -1,304 +0,0 @@ -declare module "perf_hooks" { - import { AsyncResource } from "async_hooks"; - - interface PerformanceEntry { - /** - * The total number of milliseconds elapsed for this entry. - * This value will not be meaningful for all Performance Entry types. - */ - readonly duration: number; - - /** - * The name of the performance entry. - */ - readonly name: string; - - /** - * The high resolution millisecond timestamp marking the starting time of the Performance Entry. - */ - readonly startTime: number; - - /** - * The type of the performance entry. - * Currently it may be one of: 'node', 'mark', 'measure', 'gc', or 'function'. - */ - readonly entryType: string; - - /** - * When performanceEntry.entryType is equal to 'gc', the performance.kind property identifies - * the type of garbage collection operation that occurred. - * The value may be one of perf_hooks.constants. - */ - readonly kind?: number; - } - - interface PerformanceNodeTiming extends PerformanceEntry { - /** - * The high resolution millisecond timestamp at which the Node.js process completed bootstrap. - */ - readonly bootstrapComplete: number; - - /** - * The high resolution millisecond timestamp at which cluster processing ended. - */ - readonly clusterSetupEnd: number; - - /** - * The high resolution millisecond timestamp at which cluster processing started. - */ - readonly clusterSetupStart: number; - - /** - * The high resolution millisecond timestamp at which the Node.js event loop exited. - */ - readonly loopExit: number; - - /** - * The high resolution millisecond timestamp at which the Node.js event loop started. - */ - readonly loopStart: number; - - /** - * The high resolution millisecond timestamp at which main module load ended. - */ - readonly moduleLoadEnd: number; - - /** - * The high resolution millisecond timestamp at which main module load started. - */ - readonly moduleLoadStart: number; - - /** - * The high resolution millisecond timestamp at which the Node.js process was initialized. - */ - readonly nodeStart: number; - - /** - * The high resolution millisecond timestamp at which preload module load ended. - */ - readonly preloadModuleLoadEnd: number; - - /** - * The high resolution millisecond timestamp at which preload module load started. - */ - readonly preloadModuleLoadStart: number; - - /** - * The high resolution millisecond timestamp at which third_party_main processing ended. - */ - readonly thirdPartyMainEnd: number; - - /** - * The high resolution millisecond timestamp at which third_party_main processing started. - */ - readonly thirdPartyMainStart: number; - - /** - * The high resolution millisecond timestamp at which the V8 platform was initialized. - */ - readonly v8Start: number; - } - - interface Performance { - /** - * If name is not provided, removes all PerformanceFunction objects from the Performance Timeline. - * If name is provided, removes entries with name. - * @param name - */ - clearFunctions(name?: string): void; - - /** - * If name is not provided, removes all PerformanceMark objects from the Performance Timeline. - * If name is provided, removes only the named mark. - * @param name - */ - clearMarks(name?: string): void; - - /** - * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline. - * If name is provided, removes only objects whose performanceEntry.name matches name. - */ - clearMeasures(name?: string): void; - - /** - * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime. - * @return list of all PerformanceEntry objects - */ - getEntries(): PerformanceEntry[]; - - /** - * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime - * whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type. - * @param name - * @param type - * @return list of all PerformanceEntry objects - */ - getEntriesByName(name: string, type?: string): PerformanceEntry[]; - - /** - * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime - * whose performanceEntry.entryType is equal to type. - * @param type - * @return list of all PerformanceEntry objects - */ - getEntriesByType(type: string): PerformanceEntry[]; - - /** - * Creates a new PerformanceMark entry in the Performance Timeline. - * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark', - * and whose performanceEntry.duration is always 0. - * Performance marks are used to mark specific significant moments in the Performance Timeline. - * @param name - */ - mark(name?: string): void; - - /** - * Creates a new PerformanceMeasure entry in the Performance Timeline. - * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure', - * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark. - * - * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify - * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist, - * then startMark is set to timeOrigin by default. - * - * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp - * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown. - * @param name - * @param startMark - * @param endMark - */ - measure(name: string, startMark: string, endMark: string): void; - - /** - * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones. - */ - readonly nodeTiming: PerformanceNodeTiming; - - /** - * @return the current high resolution millisecond timestamp - */ - now(): number; - - /** - * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured. - */ - readonly timeOrigin: number; - - /** - * Wraps a function within a new function that measures the running time of the wrapped function. - * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed. - * @param fn - */ - timerify any>(fn: T): T; - } - - interface PerformanceObserverEntryList { - /** - * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime. - */ - getEntries(): PerformanceEntry[]; - - /** - * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime - * whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type. - */ - getEntriesByName(name: string, type?: string): PerformanceEntry[]; - - /** - * @return Returns a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime - * whose performanceEntry.entryType is equal to type. - */ - getEntriesByType(type: string): PerformanceEntry[]; - } - - type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void; - - class PerformanceObserver extends AsyncResource { - constructor(callback: PerformanceObserverCallback); - - /** - * Disconnects the PerformanceObserver instance from all notifications. - */ - disconnect(): void; - - /** - * Subscribes the PerformanceObserver instance to notifications of new PerformanceEntry instances identified by options.entryTypes. - * When options.buffered is false, the callback will be invoked once for every PerformanceEntry instance. - * Property buffered defaults to false. - * @param options - */ - observe(options: { entryTypes: string[], buffered?: boolean }): void; - } - - namespace constants { - const NODE_PERFORMANCE_GC_MAJOR: number; - const NODE_PERFORMANCE_GC_MINOR: number; - const NODE_PERFORMANCE_GC_INCREMENTAL: number; - const NODE_PERFORMANCE_GC_WEAKCB: number; - } - - const performance: Performance; - - interface EventLoopMonitorOptions { - /** - * The sampling rate in milliseconds. - * Must be greater than zero. - * @default 10 - */ - resolution?: number; - } - - interface EventLoopDelayMonitor { - /** - * Enables the event loop delay sample timer. Returns `true` if the timer was started, `false` if it was already started. - */ - enable(): boolean; - /** - * Disables the event loop delay sample timer. Returns `true` if the timer was stopped, `false` if it was already stopped. - */ - disable(): boolean; - - /** - * Resets the collected histogram data. - */ - reset(): void; - - /** - * Returns the value at the given percentile. - * @param percentile A percentile value between 1 and 100. - */ - percentile(percentile: number): number; - - /** - * A `Map` object detailing the accumulated percentile distribution. - */ - readonly percentiles: Map; - - /** - * The number of times the event loop delay exceeded the maximum 1 hour eventloop delay threshold. - */ - readonly exceeds: number; - - /** - * The minimum recorded event loop delay. - */ - readonly min: number; - - /** - * The maximum recorded event loop delay. - */ - readonly max: number; - - /** - * The mean of the recorded event loop delays. - */ - readonly mean: number; - - /** - * The standard deviation of the recorded event loop delays. - */ - readonly stddev: number; - } - - function monitorEventLoopDelay(options?: EventLoopMonitorOptions): EventLoopDelayMonitor; -} diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts deleted file mode 100644 index ccd5c9c1..00000000 --- a/node_modules/@types/node/process.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module "process" { - export = process; -} diff --git a/node_modules/@types/node/punycode.d.ts b/node_modules/@types/node/punycode.d.ts deleted file mode 100644 index 75d2811d..00000000 --- a/node_modules/@types/node/punycode.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -declare module "punycode" { - function decode(string: string): string; - function encode(string: string): string; - function toUnicode(domain: string): string; - function toASCII(domain: string): string; - const ucs2: ucs2; - interface ucs2 { - decode(string: string): number[]; - encode(codePoints: number[]): string; - } - const version: string; -} diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts deleted file mode 100644 index 23359d9d..00000000 --- a/node_modules/@types/node/querystring.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -declare module "querystring" { - interface StringifyOptions { - encodeURIComponent?: (str: string) => string; - } - - interface ParseOptions { - maxKeys?: number; - decodeURIComponent?: (str: string) => string; - } - - interface ParsedUrlQuery { [key: string]: string | string[]; } - - interface ParsedUrlQueryInput { - [key: string]: - // The value type here is a "poor man's `unknown`". When these types support TypeScript - // 3.0+, we can replace this with `unknown`. - {} | null | undefined; - } - - function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string; - function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; - /** - * The querystring.encode() function is an alias for querystring.stringify(). - */ - const encode: typeof stringify; - /** - * The querystring.decode() function is an alias for querystring.parse(). - */ - const decode: typeof parse; - function escape(str: string): string; - function unescape(str: string): string; -} diff --git a/node_modules/@types/node/readline.d.ts b/node_modules/@types/node/readline.d.ts deleted file mode 100644 index ed47fefe..00000000 --- a/node_modules/@types/node/readline.d.ts +++ /dev/null @@ -1,150 +0,0 @@ -declare module "readline" { - import * as events from "events"; - import * as stream from "stream"; - - interface Key { - sequence?: string; - name?: string; - ctrl?: boolean; - meta?: boolean; - shift?: boolean; - } - - class Interface extends events.EventEmitter { - readonly terminal: boolean; - - /** - * NOTE: According to the documentation: - * - * > Instances of the `readline.Interface` class are constructed using the - * > `readline.createInterface()` method. - * - * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface - */ - protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean); - /** - * NOTE: According to the documentation: - * - * > Instances of the `readline.Interface` class are constructed using the - * > `readline.createInterface()` method. - * - * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface - */ - protected constructor(options: ReadLineOptions); - - setPrompt(prompt: string): void; - prompt(preserveCursor?: boolean): void; - question(query: string, callback: (answer: string) => void): void; - pause(): this; - resume(): this; - close(): void; - write(data: string | Buffer, key?: Key): void; - - /** - * events.EventEmitter - * 1. close - * 2. line - * 3. pause - * 4. resume - * 5. SIGCONT - * 6. SIGINT - * 7. SIGTSTP - */ - - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "line", listener: (input: string) => void): this; - addListener(event: "pause", listener: () => void): this; - addListener(event: "resume", listener: () => void): this; - addListener(event: "SIGCONT", listener: () => void): this; - addListener(event: "SIGINT", listener: () => void): this; - addListener(event: "SIGTSTP", listener: () => void): this; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "line", input: string): boolean; - emit(event: "pause"): boolean; - emit(event: "resume"): boolean; - emit(event: "SIGCONT"): boolean; - emit(event: "SIGINT"): boolean; - emit(event: "SIGTSTP"): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "line", listener: (input: string) => void): this; - on(event: "pause", listener: () => void): this; - on(event: "resume", listener: () => void): this; - on(event: "SIGCONT", listener: () => void): this; - on(event: "SIGINT", listener: () => void): this; - on(event: "SIGTSTP", listener: () => void): this; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "line", listener: (input: string) => void): this; - once(event: "pause", listener: () => void): this; - once(event: "resume", listener: () => void): this; - once(event: "SIGCONT", listener: () => void): this; - once(event: "SIGINT", listener: () => void): this; - once(event: "SIGTSTP", listener: () => void): this; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "line", listener: (input: string) => void): this; - prependListener(event: "pause", listener: () => void): this; - prependListener(event: "resume", listener: () => void): this; - prependListener(event: "SIGCONT", listener: () => void): this; - prependListener(event: "SIGINT", listener: () => void): this; - prependListener(event: "SIGTSTP", listener: () => void): this; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "line", listener: (input: string) => void): this; - prependOnceListener(event: "pause", listener: () => void): this; - prependOnceListener(event: "resume", listener: () => void): this; - prependOnceListener(event: "SIGCONT", listener: () => void): this; - prependOnceListener(event: "SIGINT", listener: () => void): this; - prependOnceListener(event: "SIGTSTP", listener: () => void): this; - [Symbol.asyncIterator](): AsyncIterableIterator; - } - - type ReadLine = Interface; // type forwarded for backwards compatiblity - - type Completer = (line: string) => CompleterResult; - type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => any; - - type CompleterResult = [string[], string]; - - interface ReadLineOptions { - input: NodeJS.ReadableStream; - output?: NodeJS.WritableStream; - completer?: Completer | AsyncCompleter; - terminal?: boolean; - historySize?: number; - prompt?: string; - crlfDelay?: number; - removeHistoryDuplicates?: boolean; - } - - function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface; - function createInterface(options: ReadLineOptions): Interface; - function emitKeypressEvents(stream: NodeJS.ReadableStream, interface?: Interface): void; - - type Direction = -1 | 0 | 1; - - /** - * Clears the current line of this WriteStream in a direction identified by `dir`. - */ - function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean; - /** - * Clears this `WriteStream` from the current cursor down. - */ - function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean; - /** - * Moves this WriteStream's cursor to the specified position. - */ - function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean; - /** - * Moves this WriteStream's cursor relative to its current position. - */ - function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean; -} diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts deleted file mode 100644 index 71f49044..00000000 --- a/node_modules/@types/node/repl.d.ts +++ /dev/null @@ -1,382 +0,0 @@ -declare module "repl" { - import { Interface, Completer, AsyncCompleter } from "readline"; - import { Context } from "vm"; - import { InspectOptions } from "util"; - - interface ReplOptions { - /** - * The input prompt to display. - * Default: `"> "` - */ - prompt?: string; - /** - * The `Readable` stream from which REPL input will be read. - * Default: `process.stdin` - */ - input?: NodeJS.ReadableStream; - /** - * The `Writable` stream to which REPL output will be written. - * Default: `process.stdout` - */ - output?: NodeJS.WritableStream; - /** - * If `true`, specifies that the output should be treated as a TTY terminal, and have - * ANSI/VT100 escape codes written to it. - * Default: checking the value of the `isTTY` property on the output stream upon - * instantiation. - */ - terminal?: boolean; - /** - * The function to be used when evaluating each given line of input. - * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can - * error with `repl.Recoverable` to indicate the input was incomplete and prompt for - * additional lines. - * - * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_default_evaluation - * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_custom_evaluation_functions - */ - eval?: REPLEval; - /** - * If `true`, specifies that the default `writer` function should include ANSI color - * styling to REPL output. If a custom `writer` function is provided then this has no - * effect. - * Default: the REPL instance's `terminal` value. - */ - useColors?: boolean; - /** - * If `true`, specifies that the default evaluation function will use the JavaScript - * `global` as the context as opposed to creating a new separate context for the REPL - * instance. The node CLI REPL sets this value to `true`. - * Default: `false`. - */ - useGlobal?: boolean; - /** - * If `true`, specifies that the default writer will not output the return value of a - * command if it evaluates to `undefined`. - * Default: `false`. - */ - ignoreUndefined?: boolean; - /** - * The function to invoke to format the output of each command before writing to `output`. - * Default: a wrapper for `util.inspect`. - * - * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_customizing_repl_output - */ - writer?: REPLWriter; - /** - * An optional function used for custom Tab auto completion. - * - * @see https://nodejs.org/dist/latest-v11.x/docs/api/readline.html#readline_use_of_the_completer_function - */ - completer?: Completer | AsyncCompleter; - /** - * A flag that specifies whether the default evaluator executes all JavaScript commands in - * strict mode or default (sloppy) mode. - * Accepted values are: - * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. - * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to - * prefacing every repl statement with `'use strict'`. - */ - replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; - /** - * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is - * pressed. This cannot be used together with a custom `eval` function. - * Default: `false`. - */ - breakEvalOnSigint?: boolean; - } - - type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void; - type REPLWriter = (this: REPLServer, obj: any) => string; - - /** - * This is the default "writer" value, if none is passed in the REPL options, - * and it can be overridden by custom print functions. - */ - const writer: REPLWriter & { options: InspectOptions }; - - type REPLCommandAction = (this: REPLServer, text: string) => void; - - interface REPLCommand { - /** - * Help text to be displayed when `.help` is entered. - */ - help?: string; - /** - * The function to execute, optionally accepting a single string argument. - */ - action: REPLCommandAction; - } - - /** - * Provides a customizable Read-Eval-Print-Loop (REPL). - * - * Instances of `repl.REPLServer` will accept individual lines of user input, evaluate those - * according to a user-defined evaluation function, then output the result. Input and output - * may be from `stdin` and `stdout`, respectively, or may be connected to any Node.js `stream`. - * - * Instances of `repl.REPLServer` support automatic completion of inputs, simplistic Emacs-style - * line editing, multi-line inputs, ANSI-styled output, saving and restoring current REPL session - * state, error recovery, and customizable evaluation functions. - * - * Instances of `repl.REPLServer` are created using the `repl.start()` method and _should not_ - * be created directly using the JavaScript `new` keyword. - * - * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_repl - */ - class REPLServer extends Interface { - /** - * The `vm.Context` provided to the `eval` function to be used for JavaScript - * evaluation. - */ - readonly context: Context; - /** - * The `Readable` stream from which REPL input will be read. - */ - readonly inputStream: NodeJS.ReadableStream; - /** - * The `Writable` stream to which REPL output will be written. - */ - readonly outputStream: NodeJS.WritableStream; - /** - * The commands registered via `replServer.defineCommand()`. - */ - readonly commands: { readonly [name: string]: REPLCommand | undefined }; - /** - * A value indicating whether the REPL is currently in "editor mode". - * - * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_commands_and_special_keys - */ - readonly editorMode: boolean; - /** - * A value indicating whether the `_` variable has been assigned. - * - * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly underscoreAssigned: boolean; - /** - * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL). - * - * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly last: any; - /** - * A value indicating whether the `_error` variable has been assigned. - * - * @since v9.8.0 - * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly underscoreErrAssigned: boolean; - /** - * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL). - * - * @since v9.8.0 - * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly lastError: any; - /** - * Specified in the REPL options, this is the function to be used when evaluating each - * given line of input. If not specified in the REPL options, this is an async wrapper - * for the JavaScript `eval()` function. - */ - readonly eval: REPLEval; - /** - * Specified in the REPL options, this is a value indicating whether the default - * `writer` function should include ANSI color styling to REPL output. - */ - readonly useColors: boolean; - /** - * Specified in the REPL options, this is a value indicating whether the default `eval` - * function will use the JavaScript `global` as the context as opposed to creating a new - * separate context for the REPL instance. - */ - readonly useGlobal: boolean; - /** - * Specified in the REPL options, this is a value indicating whether the default `writer` - * function should output the result of a command if it evaluates to `undefined`. - */ - readonly ignoreUndefined: boolean; - /** - * Specified in the REPL options, this is the function to invoke to format the output of - * each command before writing to `outputStream`. If not specified in the REPL options, - * this will be a wrapper for `util.inspect`. - */ - readonly writer: REPLWriter; - /** - * Specified in the REPL options, this is the function to use for custom Tab auto-completion. - */ - readonly completer: Completer | AsyncCompleter; - /** - * Specified in the REPL options, this is a flag that specifies whether the default `eval` - * function should execute all JavaScript commands in strict mode or default (sloppy) mode. - * Possible values are: - * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. - * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to - * prefacing every repl statement with `'use strict'`. - */ - readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; - - /** - * NOTE: According to the documentation: - * - * > Instances of `repl.REPLServer` are created using the `repl.start()` method and - * > _should not_ be created directly using the JavaScript `new` keyword. - * - * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS. - * - * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_class_replserver - */ - private constructor(); - - /** - * Used to add new `.`-prefixed commands to the REPL instance. Such commands are invoked - * by typing a `.` followed by the `keyword`. - * - * @param keyword The command keyword (_without_ a leading `.` character). - * @param cmd The function to invoke when the command is processed. - * - * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_replserver_definecommand_keyword_cmd - */ - defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void; - /** - * Readies the REPL instance for input from the user, printing the configured `prompt` to a - * new line in the `output` and resuming the `input` to accept new input. - * - * When multi-line input is being entered, an ellipsis is printed rather than the 'prompt'. - * - * This method is primarily intended to be called from within the action function for - * commands registered using the `replServer.defineCommand()` method. - * - * @param preserveCursor When `true`, the cursor placement will not be reset to `0`. - */ - displayPrompt(preserveCursor?: boolean): void; - /** - * Clears any command that has been buffered but not yet executed. - * - * This method is primarily intended to be called from within the action function for - * commands registered using the `replServer.defineCommand()` method. - * - * @since v9.0.0 - */ - clearBufferedCommand(): void; - - /** - * Initializes a history log file for the REPL instance. When executing the - * Node.js binary and using the command line REPL, a history file is initialized - * by default. However, this is not the case when creating a REPL - * programmatically. Use this method to initialize a history log file when working - * with REPL instances programmatically. - * @param path The path to the history file - */ - setupHistory(path: string, cb: (err: Error | null, repl: this) => void): void; - - /** - * events.EventEmitter - * 1. close - inherited from `readline.Interface` - * 2. line - inherited from `readline.Interface` - * 3. pause - inherited from `readline.Interface` - * 4. resume - inherited from `readline.Interface` - * 5. SIGCONT - inherited from `readline.Interface` - * 6. SIGINT - inherited from `readline.Interface` - * 7. SIGTSTP - inherited from `readline.Interface` - * 8. exit - * 9. reset - */ - - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "line", listener: (input: string) => void): this; - addListener(event: "pause", listener: () => void): this; - addListener(event: "resume", listener: () => void): this; - addListener(event: "SIGCONT", listener: () => void): this; - addListener(event: "SIGINT", listener: () => void): this; - addListener(event: "SIGTSTP", listener: () => void): this; - addListener(event: "exit", listener: () => void): this; - addListener(event: "reset", listener: (context: Context) => void): this; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "line", input: string): boolean; - emit(event: "pause"): boolean; - emit(event: "resume"): boolean; - emit(event: "SIGCONT"): boolean; - emit(event: "SIGINT"): boolean; - emit(event: "SIGTSTP"): boolean; - emit(event: "exit"): boolean; - emit(event: "reset", context: Context): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "line", listener: (input: string) => void): this; - on(event: "pause", listener: () => void): this; - on(event: "resume", listener: () => void): this; - on(event: "SIGCONT", listener: () => void): this; - on(event: "SIGINT", listener: () => void): this; - on(event: "SIGTSTP", listener: () => void): this; - on(event: "exit", listener: () => void): this; - on(event: "reset", listener: (context: Context) => void): this; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "line", listener: (input: string) => void): this; - once(event: "pause", listener: () => void): this; - once(event: "resume", listener: () => void): this; - once(event: "SIGCONT", listener: () => void): this; - once(event: "SIGINT", listener: () => void): this; - once(event: "SIGTSTP", listener: () => void): this; - once(event: "exit", listener: () => void): this; - once(event: "reset", listener: (context: Context) => void): this; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "line", listener: (input: string) => void): this; - prependListener(event: "pause", listener: () => void): this; - prependListener(event: "resume", listener: () => void): this; - prependListener(event: "SIGCONT", listener: () => void): this; - prependListener(event: "SIGINT", listener: () => void): this; - prependListener(event: "SIGTSTP", listener: () => void): this; - prependListener(event: "exit", listener: () => void): this; - prependListener(event: "reset", listener: (context: Context) => void): this; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "line", listener: (input: string) => void): this; - prependOnceListener(event: "pause", listener: () => void): this; - prependOnceListener(event: "resume", listener: () => void): this; - prependOnceListener(event: "SIGCONT", listener: () => void): this; - prependOnceListener(event: "SIGINT", listener: () => void): this; - prependOnceListener(event: "SIGTSTP", listener: () => void): this; - prependOnceListener(event: "exit", listener: () => void): this; - prependOnceListener(event: "reset", listener: (context: Context) => void): this; - } - - /** - * A flag passed in the REPL options. Evaluates expressions in sloppy mode. - */ - export const REPL_MODE_SLOPPY: symbol; // TODO: unique symbol - - /** - * A flag passed in the REPL options. Evaluates expressions in strict mode. - * This is equivalent to prefacing every repl statement with `'use strict'`. - */ - export const REPL_MODE_STRICT: symbol; // TODO: unique symbol - - /** - * Creates and starts a `repl.REPLServer` instance. - * - * @param options The options for the `REPLServer`. If `options` is a string, then it specifies - * the input prompt. - */ - function start(options?: string | ReplOptions): REPLServer; - - /** - * Indicates a recoverable error that a `REPLServer` can use to support multi-line input. - * - * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_recoverable_errors - */ - class Recoverable extends SyntaxError { - err: Error; - - constructor(err: Error); - } -} diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts deleted file mode 100644 index f4424f8c..00000000 --- a/node_modules/@types/node/stream.d.ts +++ /dev/null @@ -1,307 +0,0 @@ -declare module "stream" { - import * as events from "events"; - - class internal extends events.EventEmitter { - pipe(destination: T, options?: { end?: boolean; }): T; - } - - namespace internal { - class Stream extends internal { } - - interface ReadableOptions { - highWaterMark?: number; - encoding?: string; - objectMode?: boolean; - read?(this: Readable, size: number): void; - destroy?(this: Readable, error: Error | null, callback: (error: Error | null) => void): void; - autoDestroy?: boolean; - } - - class Readable extends Stream implements NodeJS.ReadableStream { - /** - * A utility method for creating Readable Streams out of iterators. - */ - static from(iterable: Iterable | AsyncIterable, options?: ReadableOptions): Readable; - - readable: boolean; - readonly readableHighWaterMark: number; - readonly readableLength: number; - constructor(opts?: ReadableOptions); - _read(size: number): void; - read(size?: number): any; - setEncoding(encoding: string): this; - pause(): this; - resume(): this; - isPaused(): boolean; - unpipe(destination?: NodeJS.WritableStream): this; - unshift(chunk: any, encoding?: BufferEncoding): void; - wrap(oldStream: NodeJS.ReadableStream): this; - push(chunk: any, encoding?: string): boolean; - _destroy(error: Error | null, callback: (error?: Error | null) => void): void; - destroy(error?: Error): void; - - /** - * Event emitter - * The defined events on documents including: - * 1. close - * 2. data - * 3. end - * 4. readable - * 5. error - */ - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: any) => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "readable", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "close"): boolean; - emit(event: "data", chunk: any): boolean; - emit(event: "end"): boolean; - emit(event: "readable"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: any) => void): this; - on(event: "end", listener: () => void): this; - on(event: "readable", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: any) => void): this; - once(event: "end", listener: () => void): this; - once(event: "readable", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: any) => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "readable", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: any) => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "readable", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - - removeListener(event: "close", listener: () => void): this; - removeListener(event: "data", listener: (chunk: any) => void): this; - removeListener(event: "end", listener: () => void): this; - removeListener(event: "readable", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - removeListener(event: string | symbol, listener: (...args: any[]) => void): this; - - [Symbol.asyncIterator](): AsyncIterableIterator; - } - - interface WritableOptions { - highWaterMark?: number; - decodeStrings?: boolean; - defaultEncoding?: string; - objectMode?: boolean; - emitClose?: boolean; - write?(this: Writable, chunk: any, encoding: string, callback: (error?: Error | null) => void): void; - writev?(this: Writable, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; - destroy?(this: Writable, error: Error | null, callback: (error: Error | null) => void): void; - final?(this: Writable, callback: (error?: Error | null) => void): void; - autoDestroy?: boolean; - } - - class Writable extends Stream implements NodeJS.WritableStream { - readonly writable: boolean; - readonly writableFinished: boolean; - readonly writableHighWaterMark: number; - readonly writableLength: number; - constructor(opts?: WritableOptions); - _write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void; - _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; - _destroy(error: Error | null, callback: (error?: Error | null) => void): void; - _final(callback: (error?: Error | null) => void): void; - write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean; - write(chunk: any, encoding: string, cb?: (error: Error | null | undefined) => void): boolean; - setDefaultEncoding(encoding: string): this; - end(cb?: () => void): void; - end(chunk: any, cb?: () => void): void; - end(chunk: any, encoding: string, cb?: () => void): void; - cork(): void; - uncork(): void; - destroy(error?: Error): void; - - /** - * Event emitter - * The defined events on documents including: - * 1. close - * 2. drain - * 3. error - * 4. finish - * 5. pipe - * 6. unpipe - */ - addListener(event: "close", listener: () => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "pipe", listener: (src: Readable) => void): this; - addListener(event: "unpipe", listener: (src: Readable) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "close"): boolean; - emit(event: "drain"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "finish"): boolean; - emit(event: "pipe", src: Readable): boolean; - emit(event: "unpipe", src: Readable): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "close", listener: () => void): this; - on(event: "drain", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "pipe", listener: (src: Readable) => void): this; - on(event: "unpipe", listener: (src: Readable) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "close", listener: () => void): this; - once(event: "drain", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "pipe", listener: (src: Readable) => void): this; - once(event: "unpipe", listener: (src: Readable) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "close", listener: () => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "pipe", listener: (src: Readable) => void): this; - prependListener(event: "unpipe", listener: (src: Readable) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - - removeListener(event: "close", listener: () => void): this; - removeListener(event: "drain", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - removeListener(event: "finish", listener: () => void): this; - removeListener(event: "pipe", listener: (src: Readable) => void): this; - removeListener(event: "unpipe", listener: (src: Readable) => void): this; - removeListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - - interface DuplexOptions extends ReadableOptions, WritableOptions { - allowHalfOpen?: boolean; - readableObjectMode?: boolean; - writableObjectMode?: boolean; - read?(this: Duplex, size: number): void; - write?(this: Duplex, chunk: any, encoding: string, callback: (error?: Error | null) => void): void; - writev?(this: Duplex, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; - final?(this: Duplex, callback: (error?: Error | null) => void): void; - destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void; - } - - // Note: Duplex extends both Readable and Writable. - class Duplex extends Readable implements Writable { - readonly writable: boolean; - readonly writableFinished: boolean; - readonly writableHighWaterMark: number; - readonly writableLength: number; - constructor(opts?: DuplexOptions); - _write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void; - _writev?(chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; - _destroy(error: Error | null, callback: (error: Error | null) => void): void; - _final(callback: (error?: Error | null) => void): void; - write(chunk: any, encoding?: string, cb?: (error: Error | null | undefined) => void): boolean; - write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean; - setDefaultEncoding(encoding: string): this; - end(cb?: () => void): void; - end(chunk: any, cb?: () => void): void; - end(chunk: any, encoding?: string, cb?: () => void): void; - cork(): void; - uncork(): void; - } - - type TransformCallback = (error?: Error | null, data?: any) => void; - - interface TransformOptions extends DuplexOptions { - read?(this: Transform, size: number): void; - write?(this: Transform, chunk: any, encoding: string, callback: (error?: Error | null) => void): void; - writev?(this: Transform, chunks: Array<{ chunk: any, encoding: string }>, callback: (error?: Error | null) => void): void; - final?(this: Transform, callback: (error?: Error | null) => void): void; - destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void; - transform?(this: Transform, chunk: any, encoding: string, callback: TransformCallback): void; - flush?(this: Transform, callback: TransformCallback): void; - } - - class Transform extends Duplex { - constructor(opts?: TransformOptions); - _transform(chunk: any, encoding: string, callback: TransformCallback): void; - _flush(callback: TransformCallback): void; - } - - class PassThrough extends Transform { } - - function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void; - namespace finished { - function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream): Promise; - } - - function pipeline(stream1: NodeJS.ReadableStream, stream2: T, callback?: (err: NodeJS.ErrnoException | null) => void): T; - function pipeline(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: T, callback?: (err: NodeJS.ErrnoException | null) => void): T; - function pipeline( - stream1: NodeJS.ReadableStream, - stream2: NodeJS.ReadWriteStream, - stream3: NodeJS.ReadWriteStream, - stream4: T, - callback?: (err: NodeJS.ErrnoException | null) => void, - ): T; - function pipeline( - stream1: NodeJS.ReadableStream, - stream2: NodeJS.ReadWriteStream, - stream3: NodeJS.ReadWriteStream, - stream4: NodeJS.ReadWriteStream, - stream5: T, - callback?: (err: NodeJS.ErrnoException | null) => void, - ): T; - function pipeline(streams: Array, callback?: (err: NodeJS.ErrnoException | null) => void): NodeJS.WritableStream; - function pipeline( - stream1: NodeJS.ReadableStream, - stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, - ...streams: Array void)>, - ): NodeJS.WritableStream; - namespace pipeline { - function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.WritableStream): Promise; - function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.WritableStream): Promise; - function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.ReadWriteStream, stream4: NodeJS.WritableStream): Promise; - function __promisify__( - stream1: NodeJS.ReadableStream, - stream2: NodeJS.ReadWriteStream, - stream3: NodeJS.ReadWriteStream, - stream4: NodeJS.ReadWriteStream, - stream5: NodeJS.WritableStream, - ): Promise; - function __promisify__(streams: Array): Promise; - function __promisify__( - stream1: NodeJS.ReadableStream, - stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, - ...streams: Array, - ): Promise; - } - - interface Pipe { } - } - - export = internal; -} diff --git a/node_modules/@types/node/string_decoder.d.ts b/node_modules/@types/node/string_decoder.d.ts deleted file mode 100644 index fe0e0b4d..00000000 --- a/node_modules/@types/node/string_decoder.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare module "string_decoder" { - class StringDecoder { - constructor(encoding?: string); - write(buffer: Buffer): string; - end(buffer?: Buffer): string; - } -} diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts deleted file mode 100644 index e64a6735..00000000 --- a/node_modules/@types/node/timers.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -declare module "timers" { - function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; - namespace setTimeout { - function __promisify__(ms: number): Promise; - function __promisify__(ms: number, value: T): Promise; - } - function clearTimeout(timeoutId: NodeJS.Timeout): void; - function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; - function clearInterval(intervalId: NodeJS.Timeout): void; - function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate; - namespace setImmediate { - function __promisify__(): Promise; - function __promisify__(value: T): Promise; - } - function clearImmediate(immediateId: NodeJS.Immediate): void; -} diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts deleted file mode 100644 index 3446c097..00000000 --- a/node_modules/@types/node/tls.d.ts +++ /dev/null @@ -1,418 +0,0 @@ -declare module "tls" { - import * as crypto from "crypto"; - import * as dns from "dns"; - import * as net from "net"; - import * as stream from "stream"; - - const CLIENT_RENEG_LIMIT: number; - const CLIENT_RENEG_WINDOW: number; - - interface Certificate { - /** - * Country code. - */ - C: string; - /** - * Street. - */ - ST: string; - /** - * Locality. - */ - L: string; - /** - * Organization. - */ - O: string; - /** - * Organizational unit. - */ - OU: string; - /** - * Common name. - */ - CN: string; - } - - interface PeerCertificate { - subject: Certificate; - issuer: Certificate; - subjectaltname: string; - infoAccess: { [index: string]: string[] | undefined }; - modulus: string; - exponent: string; - valid_from: string; - valid_to: string; - fingerprint: string; - ext_key_usage: string[]; - serialNumber: string; - raw: Buffer; - } - - interface DetailedPeerCertificate extends PeerCertificate { - issuerCertificate: DetailedPeerCertificate; - } - - interface CipherNameAndProtocol { - /** - * The cipher name. - */ - name: string; - /** - * SSL/TLS protocol version. - */ - version: string; - } - - export interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions { - /** - * If true the TLS socket will be instantiated in server-mode. - * Defaults to false. - */ - isServer?: boolean; - /** - * An optional net.Server instance. - */ - server?: net.Server; - - /** - * An optional Buffer instance containing a TLS session. - */ - session?: Buffer; - /** - * If true, specifies that the OCSP status request extension will be - * added to the client hello and an 'OCSPResponse' event will be - * emitted on the socket before establishing a secure communication - */ - requestOCSP?: boolean; - } - - class TLSSocket extends net.Socket { - /** - * Construct a new tls.TLSSocket object from an existing TCP socket. - */ - constructor(socket: net.Socket, options?: TLSSocketOptions); - - /** - * A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false. - */ - authorized: boolean; - /** - * The reason why the peer's certificate has not been verified. - * This property becomes available only when tlsSocket.authorized === false. - */ - authorizationError: Error; - /** - * Static boolean value, always true. - * May be used to distinguish TLS sockets from regular ones. - */ - encrypted: boolean; - - /** - * String containing the selected ALPN protocol. - * When ALPN has no selected protocol, tlsSocket.alpnProtocol equals false. - */ - alpnProtocol?: string; - - /** - * Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection. - * @returns Returns an object representing the cipher name - * and the SSL/TLS protocol version of the current connection. - */ - getCipher(): CipherNameAndProtocol; - /** - * Returns an object representing the peer's certificate. - * The returned object has some properties corresponding to the field of the certificate. - * If detailed argument is true the full chain with issuer property will be returned, - * if false only the top certificate without issuer property. - * If the peer does not provide a certificate, it returns null or an empty object. - * @param detailed - If true; the full chain with issuer property will be returned. - * @returns An object representing the peer's certificate. - */ - getPeerCertificate(detailed: true): DetailedPeerCertificate; - getPeerCertificate(detailed?: false): PeerCertificate; - getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; - /** - * Returns a string containing the negotiated SSL/TLS protocol version of the current connection. - * The value `'unknown'` will be returned for connected sockets that have not completed the handshaking process. - * The value `null` will be returned for server sockets or disconnected client sockets. - * See https://www.openssl.org/docs/man1.0.2/ssl/SSL_get_version.html for more information. - * @returns negotiated SSL/TLS protocol version of the current connection - */ - getProtocol(): string | null; - /** - * Could be used to speed up handshake establishment when reconnecting to the server. - * @returns ASN.1 encoded TLS session or undefined if none was negotiated. - */ - getSession(): Buffer | undefined; - /** - * NOTE: Works only with client TLS sockets. - * Useful only for debugging, for session reuse provide session option to tls.connect(). - * @returns TLS session ticket or undefined if none was negotiated. - */ - getTLSTicket(): Buffer | undefined; - /** - * Initiate TLS renegotiation process. - * - * NOTE: Can be used to request peer's certificate after the secure connection has been established. - * ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout. - * @param options - The options may contain the following fields: rejectUnauthorized, - * requestCert (See tls.createServer() for details). - * @param callback - callback(err) will be executed with null as err, once the renegotiation - * is successfully completed. - * @return `undefined` when socket is destroy, `false` if negotiaion can't be initiated. - */ - renegotiate(options: { rejectUnauthorized?: boolean, requestCert?: boolean }, callback: (err: Error | null) => void): undefined | boolean; - /** - * Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512). - * Smaller fragment size decreases buffering latency on the client: large fragments are buffered by - * the TLS layer until the entire fragment is received and its integrity is verified; - * large fragments can span multiple roundtrips, and their processing can be delayed due to packet - * loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead, - * which may decrease overall server throughput. - * @param size - TLS fragment size (default and maximum value is: 16384, minimum is: 512). - * @returns Returns true on success, false otherwise. - */ - setMaxSendFragment(size: number): boolean; - - /** - * When enabled, TLS packet trace information is written to `stderr`. This can be - * used to debug TLS connection problems. - * - * Note: The format of the output is identical to the output of `openssl s_client - * -trace` or `openssl s_server -trace`. While it is produced by OpenSSL's - * `SSL_trace()` function, the format is undocumented, can change without notice, - * and should not be relied on. - */ - enableTrace(): void; - - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - addListener(event: "secureConnect", listener: () => void): this; - addListener(event: "session", listener: (session: Buffer) => void): this; - addListener(event: "keylog", listener: (line: Buffer) => void): this; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "OCSPResponse", response: Buffer): boolean; - emit(event: "secureConnect"): boolean; - emit(event: "session", session: Buffer): boolean; - emit(event: "keylog", line: Buffer): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "OCSPResponse", listener: (response: Buffer) => void): this; - on(event: "secureConnect", listener: () => void): this; - on(event: "session", listener: (session: Buffer) => void): this; - on(event: "keylog", listener: (line: Buffer) => void): this; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "OCSPResponse", listener: (response: Buffer) => void): this; - once(event: "secureConnect", listener: () => void): this; - once(event: "session", listener: (session: Buffer) => void): this; - once(event: "keylog", listener: (line: Buffer) => void): this; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - prependListener(event: "secureConnect", listener: () => void): this; - prependListener(event: "session", listener: (session: Buffer) => void): this; - prependListener(event: "keylog", listener: (line: Buffer) => void): this; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - prependOnceListener(event: "secureConnect", listener: () => void): this; - prependOnceListener(event: "session", listener: (session: Buffer) => void): this; - prependOnceListener(event: "keylog", listener: (line: Buffer) => void): this; - } - - interface CommonConnectionOptions { - /** - * An optional TLS context object from tls.createSecureContext() - */ - secureContext?: SecureContext; - - /** - * When enabled, TLS packet trace information is written to `stderr`. This can be - * used to debug TLS connection problems. - * @default false - */ - enableTrace?: boolean; - /** - * If true the server will request a certificate from clients that - * connect and attempt to verify that certificate. Defaults to - * false. - */ - requestCert?: boolean; - /** - * An array of strings or a Buffer naming possible ALPN protocols. - * (Protocols should be ordered by their priority.) - */ - ALPNProtocols?: string[] | Uint8Array[] | Uint8Array; - /** - * SNICallback(servername, cb) A function that will be - * called if the client supports SNI TLS extension. Two arguments - * will be passed when called: servername and cb. SNICallback should - * invoke cb(null, ctx), where ctx is a SecureContext instance. - * (tls.createSecureContext(...) can be used to get a proper - * SecureContext.) If SNICallback wasn't provided the default callback - * with high-level API will be used (see below). - */ - SNICallback?: (servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void; - /** - * If true the server will reject any connection which is not - * authorized with the list of supplied CAs. This option only has an - * effect if requestCert is true. - * @default true - */ - rejectUnauthorized?: boolean; - } - - interface TlsOptions extends SecureContextOptions, CommonConnectionOptions { - handshakeTimeout?: number; - sessionTimeout?: number; - ticketKeys?: Buffer; - } - - interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions { - host?: string; - port?: number; - path?: string; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored. - socket?: net.Socket; // Establish secure connection on a given socket rather than creating a new socket - checkServerIdentity?: typeof checkServerIdentity; - servername?: string; // SNI TLS Extension - session?: Buffer; - minDHSize?: number; - lookup?: net.LookupFunction; - timeout?: number; - } - - class Server extends net.Server { - addContext(hostName: string, credentials: SecureContextOptions): void; - - /** - * events.EventEmitter - * 1. tlsClientError - * 2. newSession - * 3. OCSPRequest - * 4. resumeSession - * 5. secureConnection - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - addListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; - addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; - addListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; - addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - addListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean; - emit(event: "newSession", sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean; - emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean; - emit(event: "resumeSession", sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean; - emit(event: "secureConnection", tlsSocket: TLSSocket): boolean; - emit(event: "keylog", line: Buffer, tlsSocket: TLSSocket): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - on(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; - on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; - on(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; - on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - on(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - once(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; - once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; - once(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; - once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - once(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - prependListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; - prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; - prependListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; - prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - prependOnceListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this; - prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this; - prependOnceListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this; - prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this; - } - - interface SecurePair { - encrypted: TLSSocket; - cleartext: TLSSocket; - } - - type SecureVersion = 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1'; - - interface SecureContextOptions { - pfx?: string | Buffer | Array; - key?: string | Buffer | Array; - passphrase?: string; - cert?: string | Buffer | Array; - ca?: string | Buffer | Array; - ciphers?: string; - honorCipherOrder?: boolean; - ecdhCurve?: string; - clientCertEngine?: string; - crl?: string | Buffer | Array; - dhparam?: string | Buffer; - secureOptions?: number; // Value is a numeric bitmask of the `SSL_OP_*` options - secureProtocol?: string; // SSL Method, e.g. SSLv23_method - sessionIdContext?: string; - /** - * Optionally set the maximum TLS version to allow. One - * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the - * `secureProtocol` option, use one or the other. - * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using - * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to - * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used. - */ - maxVersion?: SecureVersion; - /** - * Optionally set the minimum TLS version to allow. One - * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the - * `secureProtocol` option, use one or the other. It is not recommended to use - * less than TLSv1.2, but it may be required for interoperability. - * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using - * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to - * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to - * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used. - */ - minVersion?: SecureVersion; - } - - interface SecureContext { - context: any; - } - - /* - * Verifies the certificate `cert` is issued to host `host`. - * @host The hostname to verify the certificate against - * @cert PeerCertificate representing the peer's certificate - * - * Returns Error object, populating it with the reason, host and cert on failure. On success, returns undefined. - */ - function checkServerIdentity(host: string, cert: PeerCertificate): Error | undefined; - function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server; - function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; - function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; - function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; - function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; - /** - * @deprecated - */ - function createSecurePair(credentials?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; - function createSecureContext(details: SecureContextOptions): SecureContext; - function getCiphers(): string[]; - - const DEFAULT_ECDH_CURVE: string; - - const rootCertificates: ReadonlyArray; -} diff --git a/node_modules/@types/node/trace_events.d.ts b/node_modules/@types/node/trace_events.d.ts deleted file mode 100644 index 9d1a59bd..00000000 --- a/node_modules/@types/node/trace_events.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -declare module "trace_events" { - /** - * The `Tracing` object is used to enable or disable tracing for sets of - * categories. Instances are created using the - * `trace_events.createTracing()` method. - * - * When created, the `Tracing` object is disabled. Calling the - * `tracing.enable()` method adds the categories to the set of enabled trace - * event categories. Calling `tracing.disable()` will remove the categories - * from the set of enabled trace event categories. - */ - export interface Tracing { - /** - * A comma-separated list of the trace event categories covered by this - * `Tracing` object. - */ - readonly categories: string; - - /** - * Disables this `Tracing` object. - * - * Only trace event categories _not_ covered by other enabled `Tracing` - * objects and _not_ specified by the `--trace-event-categories` flag - * will be disabled. - */ - disable(): void; - - /** - * Enables this `Tracing` object for the set of categories covered by - * the `Tracing` object. - */ - enable(): void; - - /** - * `true` only if the `Tracing` object has been enabled. - */ - readonly enabled: boolean; - } - - interface CreateTracingOptions { - /** - * An array of trace category names. Values included in the array are - * coerced to a string when possible. An error will be thrown if the - * value cannot be coerced. - */ - categories: string[]; - } - - /** - * Creates and returns a Tracing object for the given set of categories. - */ - export function createTracing(options: CreateTracingOptions): Tracing; - - /** - * Returns a comma-separated list of all currently-enabled trace event - * categories. The current set of enabled trace event categories is - * determined by the union of all currently-enabled `Tracing` objects and - * any categories enabled using the `--trace-event-categories` flag. - */ - export function getEnabledCategories(): string; -} diff --git a/node_modules/@types/node/ts3.2/globals.d.ts b/node_modules/@types/node/ts3.2/globals.d.ts deleted file mode 100644 index 70892bca..00000000 --- a/node_modules/@types/node/ts3.2/globals.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -// tslint:disable-next-line:no-bad-reference -/// - -declare namespace NodeJS { - interface HRTime { - bigint(): bigint; - } -} - -interface Buffer extends Uint8Array { - readBigUInt64BE(offset?: number): bigint; - readBigUInt64LE(offset?: number): bigint; - readBigInt64BE(offset?: number): bigint; - readBigInt64LE(offset?: number): bigint; - writeBigInt64BE(value: bigint, offset?: number): number; - writeBigInt64LE(value: bigint, offset?: number): number; - writeBigUInt64BE(value: bigint, offset?: number): number; - writeBigUInt64LE(value: bigint, offset?: number): number; -} diff --git a/node_modules/@types/node/ts3.2/index.d.ts b/node_modules/@types/node/ts3.2/index.d.ts deleted file mode 100644 index ce7709bc..00000000 --- a/node_modules/@types/node/ts3.2/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -// NOTE: These definitions support NodeJS and TypeScript 3.2. - -// NOTE: TypeScript version-specific augmentations can be found in the following paths: -// - ~/base.d.ts - Shared definitions common to all TypeScript versions -// - ~/index.d.ts - Definitions specific to TypeScript 2.1 -// - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2 - -// Reference required types from the default lib: -/// -/// -/// -/// - -// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: -// tslint:disable-next-line:no-bad-reference -/// - -// TypeScript 3.2-specific augmentations: -/// -/// diff --git a/node_modules/@types/node/ts3.2/util.d.ts b/node_modules/@types/node/ts3.2/util.d.ts deleted file mode 100644 index a8b2487e..00000000 --- a/node_modules/@types/node/ts3.2/util.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// tslint:disable-next-line:no-bad-reference -/// - -declare module "util" { - namespace inspect { - const custom: unique symbol; - } - namespace promisify { - const custom: unique symbol; - } - namespace types { - function isBigInt64Array(value: any): value is BigInt64Array; - function isBigUint64Array(value: any): value is BigUint64Array; - } -} diff --git a/node_modules/@types/node/tty.d.ts b/node_modules/@types/node/tty.d.ts deleted file mode 100644 index 8c1b00ce..00000000 --- a/node_modules/@types/node/tty.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -declare module "tty" { - import * as net from "net"; - - function isatty(fd: number): boolean; - class ReadStream extends net.Socket { - constructor(fd: number, options?: net.SocketConstructorOpts); - isRaw: boolean; - setRawMode(mode: boolean): void; - isTTY: boolean; - } - /** - * -1 - to the left from cursor - * 0 - the entire line - * 1 - to the right from cursor - */ - type Direction = -1 | 0 | 1; - class WriteStream extends net.Socket { - constructor(fd: number); - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "resize", listener: () => void): this; - - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "resize"): boolean; - - on(event: string, listener: (...args: any[]) => void): this; - on(event: "resize", listener: () => void): this; - - once(event: string, listener: (...args: any[]) => void): this; - once(event: "resize", listener: () => void): this; - - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "resize", listener: () => void): this; - - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "resize", listener: () => void): this; - - /** - * Clears the current line of this WriteStream in a direction identified by `dir`. - */ - clearLine(dir: Direction, callback?: () => void): boolean; - /** - * Clears this `WriteStream` from the current cursor down. - */ - clearScreenDown(callback?: () => void): boolean; - /** - * Moves this WriteStream's cursor to the specified position. - */ - cursorTo(x: number, y: number, callback?: () => void): boolean; - /** - * Moves this WriteStream's cursor relative to its current position. - */ - moveCursor(dx: number, dy: number, callback?: () => void): boolean; - /** - * @default `process.env` - */ - getColorDepth(env?: {}): number; - hasColors(depth?: number): boolean; - hasColors(env?: {}): boolean; - hasColors(depth: number, env?: {}): boolean; - getWindowSize(): [number, number]; - columns: number; - rows: number; - isTTY: boolean; - } -} diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts deleted file mode 100644 index 51dcd69a..00000000 --- a/node_modules/@types/node/url.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -declare module "url" { - import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring'; - - interface UrlObjectCommon { - auth?: string; - hash?: string; - host?: string; - hostname?: string; - href?: string; - path?: string; - pathname?: string; - protocol?: string; - search?: string; - slashes?: boolean; - } - - // Input to `url.format` - interface UrlObject extends UrlObjectCommon { - port?: string | number; - query?: string | null | ParsedUrlQueryInput; - } - - // Output of `url.parse` - interface Url extends UrlObjectCommon { - port?: string; - query?: string | null | ParsedUrlQuery; - } - - interface UrlWithParsedQuery extends Url { - query: ParsedUrlQuery; - } - - interface UrlWithStringQuery extends Url { - query: string | null; - } - - function parse(urlStr: string): UrlWithStringQuery; - function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery; - function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; - function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; - - function format(URL: URL, options?: URLFormatOptions): string; - function format(urlObject: UrlObject | string): string; - function resolve(from: string, to: string): string; - - function domainToASCII(domain: string): string; - function domainToUnicode(domain: string): string; - - /** - * This function ensures the correct decodings of percent-encoded characters as - * well as ensuring a cross-platform valid absolute path string. - * @param url The file URL string or URL object to convert to a path. - */ - function fileURLToPath(url: string | URL): string; - - /** - * This function ensures that path is resolved absolutely, and that the URL - * control characters are correctly encoded when converting into a File URL. - * @param url The path to convert to a File URL. - */ - function pathToFileURL(url: string): URL; - - interface URLFormatOptions { - auth?: boolean; - fragment?: boolean; - search?: boolean; - unicode?: boolean; - } - - class URL { - constructor(input: string, base?: string | URL); - hash: string; - host: string; - hostname: string; - href: string; - readonly origin: string; - password: string; - pathname: string; - port: string; - protocol: string; - search: string; - readonly searchParams: URLSearchParams; - username: string; - toString(): string; - toJSON(): string; - } - - class URLSearchParams implements Iterable<[string, string]> { - constructor(init?: URLSearchParams | string | { [key: string]: string | string[] | undefined } | Iterable<[string, string]> | Array<[string, string]>); - append(name: string, value: string): void; - delete(name: string): void; - entries(): IterableIterator<[string, string]>; - forEach(callback: (value: string, name: string, searchParams: this) => void): void; - get(name: string): string | null; - getAll(name: string): string[]; - has(name: string): boolean; - keys(): IterableIterator; - set(name: string, value: string): void; - sort(): void; - toString(): string; - values(): IterableIterator; - [Symbol.iterator](): IterableIterator<[string, string]>; - } -} diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts deleted file mode 100644 index 0e7a1c6e..00000000 --- a/node_modules/@types/node/util.d.ts +++ /dev/null @@ -1,165 +0,0 @@ -declare module "util" { - interface InspectOptions extends NodeJS.InspectOptions { } - function format(format: any, ...param: any[]): string; - function formatWithOptions(inspectOptions: InspectOptions, format: string, ...param: any[]): string; - /** @deprecated since v0.11.3 - use a third party module instead. */ - function log(string: string): void; - function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string; - function inspect(object: any, options: InspectOptions): string; - namespace inspect { - let colors: { - [color: string]: [number, number] | undefined - }; - let styles: { - [style: string]: string | undefined - }; - let defaultOptions: InspectOptions; - /** - * Allows changing inspect settings from the repl. - */ - let replDefaults: InspectOptions; - } - /** @deprecated since v4.0.0 - use `Array.isArray()` instead. */ - function isArray(object: any): object is any[]; - /** @deprecated since v4.0.0 - use `util.types.isRegExp()` instead. */ - function isRegExp(object: any): object is RegExp; - /** @deprecated since v4.0.0 - use `util.types.isDate()` instead. */ - function isDate(object: any): object is Date; - /** @deprecated since v4.0.0 - use `util.types.isNativeError()` instead. */ - function isError(object: any): object is Error; - function inherits(constructor: any, superConstructor: any): void; - function debuglog(key: string): (msg: string, ...param: any[]) => void; - /** @deprecated since v4.0.0 - use `typeof value === 'boolean'` instead. */ - function isBoolean(object: any): object is boolean; - /** @deprecated since v4.0.0 - use `Buffer.isBuffer()` instead. */ - function isBuffer(object: any): object is Buffer; - /** @deprecated since v4.0.0 - use `typeof value === 'function'` instead. */ - function isFunction(object: any): boolean; - /** @deprecated since v4.0.0 - use `value === null` instead. */ - function isNull(object: any): object is null; - /** @deprecated since v4.0.0 - use `value === null || value === undefined` instead. */ - function isNullOrUndefined(object: any): object is null | undefined; - /** @deprecated since v4.0.0 - use `typeof value === 'number'` instead. */ - function isNumber(object: any): object is number; - /** @deprecated since v4.0.0 - use `value !== null && typeof value === 'object'` instead. */ - function isObject(object: any): boolean; - /** @deprecated since v4.0.0 - use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. */ - function isPrimitive(object: any): boolean; - /** @deprecated since v4.0.0 - use `typeof value === 'string'` instead. */ - function isString(object: any): object is string; - /** @deprecated since v4.0.0 - use `typeof value === 'symbol'` instead. */ - function isSymbol(object: any): object is symbol; - /** @deprecated since v4.0.0 - use `value === undefined` instead. */ - function isUndefined(object: any): object is undefined; - function deprecate(fn: T, message: string): T; - function isDeepStrictEqual(val1: any, val2: any): boolean; - - interface CustomPromisify extends Function { - __promisify__: TCustom; - } - - function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException) => void) => void; - function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; - function callbackify(fn: (arg1: T1) => Promise): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void; - function callbackify(fn: (arg1: T1) => Promise): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; - function callbackify(fn: (arg1: T1, arg2: T2) => Promise): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void; - function callbackify(fn: (arg1: T1, arg2: T2) => Promise): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; - function callbackify(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void; - function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3) => Promise): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; - function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void; - function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; - function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void; - function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; - function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void; - function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; - - function promisify(fn: CustomPromisify): TCustom; - function promisify(fn: (callback: (err: Error | null, result: TResult) => void) => void): () => Promise; - function promisify(fn: (callback: (err?: Error | null) => void) => void): () => Promise; - function promisify(fn: (arg1: T1, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1) => Promise; - function promisify(fn: (arg1: T1, callback: (err?: Error | null) => void) => void): (arg1: T1) => Promise; - function promisify(fn: (arg1: T1, arg2: T2, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise; - function promisify(fn: (arg1: T1, arg2: T2, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2) => Promise; - function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; - function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise; - function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error | null, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; - function promisify(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; - function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error | null, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; - function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: Error | null) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; - function promisify(fn: Function): Function; - - namespace types { - function isAnyArrayBuffer(object: any): boolean; - function isArgumentsObject(object: any): object is IArguments; - function isArrayBuffer(object: any): object is ArrayBuffer; - function isAsyncFunction(object: any): boolean; - function isBooleanObject(object: any): object is Boolean; - function isBoxedPrimitive(object: any): object is (Number | Boolean | String | Symbol /* | Object(BigInt) | Object(Symbol) */); - function isDataView(object: any): object is DataView; - function isDate(object: any): object is Date; - function isExternal(object: any): boolean; - function isFloat32Array(object: any): object is Float32Array; - function isFloat64Array(object: any): object is Float64Array; - function isGeneratorFunction(object: any): boolean; - function isGeneratorObject(object: any): boolean; - function isInt8Array(object: any): object is Int8Array; - function isInt16Array(object: any): object is Int16Array; - function isInt32Array(object: any): object is Int32Array; - function isMap(object: any): boolean; - function isMapIterator(object: any): boolean; - function isModuleNamespaceObject(value: any): boolean; - function isNativeError(object: any): object is Error; - function isNumberObject(object: any): object is Number; - function isPromise(object: any): boolean; - function isProxy(object: any): boolean; - function isRegExp(object: any): object is RegExp; - function isSet(object: any): boolean; - function isSetIterator(object: any): boolean; - function isSharedArrayBuffer(object: any): boolean; - function isStringObject(object: any): boolean; - function isSymbolObject(object: any): boolean; - function isTypedArray(object: any): object is NodeJS.TypedArray; - function isUint8Array(object: any): object is Uint8Array; - function isUint8ClampedArray(object: any): object is Uint8ClampedArray; - function isUint16Array(object: any): object is Uint16Array; - function isUint32Array(object: any): object is Uint32Array; - function isWeakMap(object: any): boolean; - function isWeakSet(object: any): boolean; - function isWebAssemblyCompiledModule(object: any): boolean; - } - - class TextDecoder { - readonly encoding: string; - readonly fatal: boolean; - readonly ignoreBOM: boolean; - constructor( - encoding?: string, - options?: { fatal?: boolean; ignoreBOM?: boolean } - ); - decode( - input?: NodeJS.TypedArray | DataView | ArrayBuffer | null, - options?: { stream?: boolean } - ): string; - } - - class TextEncoder { - readonly encoding: string; - encode(input?: string): Uint8Array; - } -} diff --git a/node_modules/@types/node/v8.d.ts b/node_modules/@types/node/v8.d.ts deleted file mode 100644 index fdecdb62..00000000 --- a/node_modules/@types/node/v8.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -declare module "v8" { - import { Readable } from "stream"; - - interface HeapSpaceInfo { - space_name: string; - space_size: number; - space_used_size: number; - space_available_size: number; - physical_space_size: number; - } - - // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */ - type DoesZapCodeSpaceFlag = 0 | 1; - - interface HeapInfo { - total_heap_size: number; - total_heap_size_executable: number; - total_physical_size: number; - total_available_size: number; - used_heap_size: number; - heap_size_limit: number; - malloced_memory: number; - peak_malloced_memory: number; - does_zap_garbage: DoesZapCodeSpaceFlag; - number_of_native_contexts: number; - number_of_detached_contexts: number; - } - - function getHeapStatistics(): HeapInfo; - function getHeapSpaceStatistics(): HeapSpaceInfo[]; - function setFlagsFromString(flags: string): void; - /** - * Generates a snapshot of the current V8 heap and returns a Readable - * Stream that may be used to read the JSON serialized representation. - * This conversation was marked as resolved by joyeecheung - * This JSON stream format is intended to be used with tools such as - * Chrome DevTools. The JSON schema is undocumented and specific to the - * V8 engine, and may change from one version of V8 to the next. - */ - function getHeapSnapshot(): Readable; - - /** - * - * @param fileName The file path where the V8 heap snapshot is to be - * saved. If not specified, a file name with the pattern - * `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be - * generated, where `{pid}` will be the PID of the Node.js process, - * `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from - * the main Node.js thread or the id of a worker thread. - */ - function writeHeapSnapshot(fileName?: string): string; -} diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts deleted file mode 100644 index 0eefafd2..00000000 --- a/node_modules/@types/node/vm.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -declare module "vm" { - interface Context { - [key: string]: any; - } - interface BaseOptions { - /** - * Specifies the filename used in stack traces produced by this script. - * Default: `''`. - */ - filename?: string; - /** - * Specifies the line number offset that is displayed in stack traces produced by this script. - * Default: `0`. - */ - lineOffset?: number; - /** - * Specifies the column number offset that is displayed in stack traces produced by this script. - * Default: `0` - */ - columnOffset?: number; - } - interface ScriptOptions extends BaseOptions { - displayErrors?: boolean; - timeout?: number; - cachedData?: Buffer; - produceCachedData?: boolean; - } - interface RunningScriptOptions extends BaseOptions { - displayErrors?: boolean; - timeout?: number; - } - interface CompileFunctionOptions extends BaseOptions { - /** - * Provides an optional data with V8's code cache data for the supplied source. - */ - cachedData?: Buffer; - /** - * Specifies whether to produce new cache data. - * Default: `false`, - */ - produceCachedData?: boolean; - /** - * The sandbox/context in which the said function should be compiled in. - */ - parsingContext?: Context; - - /** - * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling - */ - contextExtensions?: Object[]; - } - - interface CreateContextOptions { - /** - * Human-readable name of the newly created context. - * @default 'VM Context i' Where i is an ascending numerical index of the created context. - */ - name?: string; - /** - * Corresponds to the newly created context for display purposes. - * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary), - * like the value of the `url.origin` property of a URL object. - * Most notably, this string should omit the trailing slash, as that denotes a path. - * @default '' - */ - origin?: string; - codeGeneration?: { - /** - * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc) - * will throw an EvalError. - * @default true - */ - strings?: boolean; - /** - * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError. - * @default true - */ - wasm?: boolean; - }; - } - - class Script { - constructor(code: string, options?: ScriptOptions); - runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any; - runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any; - runInThisContext(options?: RunningScriptOptions): any; - createCachedData(): Buffer; - } - function createContext(sandbox?: Context, options?: CreateContextOptions): Context; - function isContext(sandbox: Context): boolean; - function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any; - function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any; - function runInThisContext(code: string, options?: RunningScriptOptions | string): any; - function compileFunction(code: string, params: string[], options: CompileFunctionOptions): Function; -} diff --git a/node_modules/@types/node/worker_threads.d.ts b/node_modules/@types/node/worker_threads.d.ts deleted file mode 100644 index 45ea85e0..00000000 --- a/node_modules/@types/node/worker_threads.d.ts +++ /dev/null @@ -1,153 +0,0 @@ -declare module "worker_threads" { - import { Context } from "vm"; - import { EventEmitter } from "events"; - import { Readable, Writable } from "stream"; - - const isMainThread: boolean; - const parentPort: null | MessagePort; - const threadId: number; - const workerData: any; - - class MessageChannel { - readonly port1: MessagePort; - readonly port2: MessagePort; - } - - class MessagePort extends EventEmitter { - close(): void; - postMessage(value: any, transferList?: Array): void; - ref(): void; - unref(): void; - start(): void; - - addListener(event: "close", listener: () => void): this; - addListener(event: "message", listener: (value: any) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "close"): boolean; - emit(event: "message", value: any): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "close", listener: () => void): this; - on(event: "message", listener: (value: any) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "close", listener: () => void): this; - once(event: "message", listener: (value: any) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "close", listener: () => void): this; - prependListener(event: "message", listener: (value: any) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "message", listener: (value: any) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - - removeListener(event: "close", listener: () => void): this; - removeListener(event: "message", listener: (value: any) => void): this; - removeListener(event: string | symbol, listener: (...args: any[]) => void): this; - - off(event: "close", listener: () => void): this; - off(event: "message", listener: (value: any) => void): this; - off(event: string | symbol, listener: (...args: any[]) => void): this; - } - - interface WorkerOptions { - eval?: boolean; - workerData?: any; - stdin?: boolean; - stdout?: boolean; - stderr?: boolean; - execArgv?: string[]; - } - - class Worker extends EventEmitter { - readonly stdin: Writable | null; - readonly stdout: Readable; - readonly stderr: Readable; - readonly threadId: number; - - constructor(filename: string, options?: WorkerOptions); - - postMessage(value: any, transferList?: Array): void; - ref(): void; - unref(): void; - /** - * Stop all JavaScript execution in the worker thread as soon as possible. - * Returns a Promise for the exit code that is fulfilled when the `exit` event is emitted. - */ - terminate(): Promise; - /** - * Transfer a `MessagePort` to a different `vm` Context. The original `port` - * object will be rendered unusable, and the returned `MessagePort` instance will - * take its place. - * - * The returned `MessagePort` will be an object in the target context, and will - * inherit from its global `Object` class. Objects passed to the - * `port.onmessage()` listener will also be created in the target context - * and inherit from its global `Object` class. - * - * However, the created `MessagePort` will no longer inherit from - * `EventEmitter`, and only `port.onmessage()` can be used to receive - * events using it. - */ - moveMessagePortToContext(port: MessagePort, context: Context): MessagePort; - - /** - * Receive a single message from a given `MessagePort`. If no message is available, - * `undefined` is returned, otherwise an object with a single `message` property - * that contains the message payload, corresponding to the oldest message in the - * `MessagePort`’s queue. - */ - receiveMessageOnPort(port: MessagePort): {} | undefined; - - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "exit", listener: (exitCode: number) => void): this; - addListener(event: "message", listener: (value: any) => void): this; - addListener(event: "online", listener: () => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - - emit(event: "error", err: Error): boolean; - emit(event: "exit", exitCode: number): boolean; - emit(event: "message", value: any): boolean; - emit(event: "online"): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - - on(event: "error", listener: (err: Error) => void): this; - on(event: "exit", listener: (exitCode: number) => void): this; - on(event: "message", listener: (value: any) => void): this; - on(event: "online", listener: () => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - - once(event: "error", listener: (err: Error) => void): this; - once(event: "exit", listener: (exitCode: number) => void): this; - once(event: "message", listener: (value: any) => void): this; - once(event: "online", listener: () => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "exit", listener: (exitCode: number) => void): this; - prependListener(event: "message", listener: (value: any) => void): this; - prependListener(event: "online", listener: () => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "exit", listener: (exitCode: number) => void): this; - prependOnceListener(event: "message", listener: (value: any) => void): this; - prependOnceListener(event: "online", listener: () => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - - removeListener(event: "error", listener: (err: Error) => void): this; - removeListener(event: "exit", listener: (exitCode: number) => void): this; - removeListener(event: "message", listener: (value: any) => void): this; - removeListener(event: "online", listener: () => void): this; - removeListener(event: string | symbol, listener: (...args: any[]) => void): this; - - off(event: "error", listener: (err: Error) => void): this; - off(event: "exit", listener: (exitCode: number) => void): this; - off(event: "message", listener: (value: any) => void): this; - off(event: "online", listener: () => void): this; - off(event: string | symbol, listener: (...args: any[]) => void): this; - } -} diff --git a/node_modules/@types/node/zlib.d.ts b/node_modules/@types/node/zlib.d.ts deleted file mode 100644 index b45721a1..00000000 --- a/node_modules/@types/node/zlib.d.ts +++ /dev/null @@ -1,352 +0,0 @@ -declare module "zlib" { - import * as stream from "stream"; - - interface ZlibOptions { - /** - * @default constants.Z_NO_FLUSH - */ - flush?: number; - /** - * @default constants.Z_FINISH - */ - finishFlush?: number; - /** - * @default 16*1024 - */ - chunkSize?: number; - windowBits?: number; - level?: number; // compression only - memLevel?: number; // compression only - strategy?: number; // compression only - dictionary?: NodeJS.TypedArray | DataView | ArrayBuffer; // deflate/inflate only, empty dictionary by default - } - - interface BrotliOptions { - /** - * @default constants.BROTLI_OPERATION_PROCESS - */ - flush?: number; - /** - * @default constants.BROTLI_OPERATION_FINISH - */ - finishFlush?: number; - /** - * @default 16*1024 - */ - chunkSize?: number; - params?: { - /** - * Each key is a `constants.BROTLI_*` constant. - */ - [key: number]: boolean | number; - }; - } - - interface Zlib { - /** @deprecated Use bytesWritten instead. */ - readonly bytesRead: number; - readonly bytesWritten: number; - shell?: boolean | string; - close(callback?: () => void): void; - flush(kind?: number | (() => void), callback?: () => void): void; - } - - interface ZlibParams { - params(level: number, strategy: number, callback: () => void): void; - } - - interface ZlibReset { - reset(): void; - } - - interface BrotliCompress extends stream.Transform, Zlib { } - interface BrotliDecompress extends stream.Transform, Zlib { } - interface Gzip extends stream.Transform, Zlib { } - interface Gunzip extends stream.Transform, Zlib { } - interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams { } - interface Inflate extends stream.Transform, Zlib, ZlibReset { } - interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams { } - interface InflateRaw extends stream.Transform, Zlib, ZlibReset { } - interface Unzip extends stream.Transform, Zlib { } - - function createBrotliCompress(options?: BrotliOptions): BrotliCompress; - function createBrotliDecompress(options?: BrotliOptions): BrotliDecompress; - function createGzip(options?: ZlibOptions): Gzip; - function createGunzip(options?: ZlibOptions): Gunzip; - function createDeflate(options?: ZlibOptions): Deflate; - function createInflate(options?: ZlibOptions): Inflate; - function createDeflateRaw(options?: ZlibOptions): DeflateRaw; - function createInflateRaw(options?: ZlibOptions): InflateRaw; - function createUnzip(options?: ZlibOptions): Unzip; - - type InputType = string | DataView | ArrayBuffer | NodeJS.TypedArray; - - type CompressCallback = (error: Error | null, result: Buffer) => void; - - function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void; - function brotliCompress(buf: InputType, callback: CompressCallback): void; - function brotliCompressSync(buf: InputType, options?: BrotliOptions): Buffer; - function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void; - function brotliDecompress(buf: InputType, callback: CompressCallback): void; - function brotliDecompressSync(buf: InputType, options?: BrotliOptions): Buffer; - function deflate(buf: InputType, callback: CompressCallback): void; - function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; - function deflateSync(buf: InputType, options?: ZlibOptions): Buffer; - function deflateRaw(buf: InputType, callback: CompressCallback): void; - function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; - function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer; - function gzip(buf: InputType, callback: CompressCallback): void; - function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; - function gzipSync(buf: InputType, options?: ZlibOptions): Buffer; - function gunzip(buf: InputType, callback: CompressCallback): void; - function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; - function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer; - function inflate(buf: InputType, callback: CompressCallback): void; - function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; - function inflateSync(buf: InputType, options?: ZlibOptions): Buffer; - function inflateRaw(buf: InputType, callback: CompressCallback): void; - function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; - function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer; - function unzip(buf: InputType, callback: CompressCallback): void; - function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void; - function unzipSync(buf: InputType, options?: ZlibOptions): Buffer; - - namespace constants { - const BROTLI_DECODE: number; - const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number; - const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: number; - const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: number; - const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: number; - const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: number; - const BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: number; - const BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: number; - const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: number; - const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: number; - const BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: number; - const BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: number; - const BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: number; - const BROTLI_DECODER_ERROR_FORMAT_DISTANCE: number; - const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: number; - const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: number; - const BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: number; - const BROTLI_DECODER_ERROR_FORMAT_PADDING_1: number; - const BROTLI_DECODER_ERROR_FORMAT_PADDING_2: number; - const BROTLI_DECODER_ERROR_FORMAT_RESERVED: number; - const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: number; - const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: number; - const BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: number; - const BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: number; - const BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: number; - const BROTLI_DECODER_ERROR_UNREACHABLE: number; - const BROTLI_DECODER_NEEDS_MORE_INPUT: number; - const BROTLI_DECODER_NEEDS_MORE_OUTPUT: number; - const BROTLI_DECODER_NO_ERROR: number; - const BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: number; - const BROTLI_DECODER_PARAM_LARGE_WINDOW: number; - const BROTLI_DECODER_RESULT_ERROR: number; - const BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: number; - const BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: number; - const BROTLI_DECODER_RESULT_SUCCESS: number; - const BROTLI_DECODER_SUCCESS: number; - - const BROTLI_DEFAULT_MODE: number; - const BROTLI_DEFAULT_QUALITY: number; - const BROTLI_DEFAULT_WINDOW: number; - const BROTLI_ENCODE: number; - const BROTLI_LARGE_MAX_WINDOW_BITS: number; - const BROTLI_MAX_INPUT_BLOCK_BITS: number; - const BROTLI_MAX_QUALITY: number; - const BROTLI_MAX_WINDOW_BITS: number; - const BROTLI_MIN_INPUT_BLOCK_BITS: number; - const BROTLI_MIN_QUALITY: number; - const BROTLI_MIN_WINDOW_BITS: number; - - const BROTLI_MODE_FONT: number; - const BROTLI_MODE_GENERIC: number; - const BROTLI_MODE_TEXT: number; - - const BROTLI_OPERATION_EMIT_METADATA: number; - const BROTLI_OPERATION_FINISH: number; - const BROTLI_OPERATION_FLUSH: number; - const BROTLI_OPERATION_PROCESS: number; - - const BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: number; - const BROTLI_PARAM_LARGE_WINDOW: number; - const BROTLI_PARAM_LGBLOCK: number; - const BROTLI_PARAM_LGWIN: number; - const BROTLI_PARAM_MODE: number; - const BROTLI_PARAM_NDIRECT: number; - const BROTLI_PARAM_NPOSTFIX: number; - const BROTLI_PARAM_QUALITY: number; - const BROTLI_PARAM_SIZE_HINT: number; - - const DEFLATE: number; - const DEFLATERAW: number; - const GUNZIP: number; - const GZIP: number; - const INFLATE: number; - const INFLATERAW: number; - const UNZIP: number; - - const Z_BEST_COMPRESSION: number; - const Z_BEST_SPEED: number; - const Z_BLOCK: number; - const Z_BUF_ERROR: number; - const Z_DATA_ERROR: number; - - const Z_DEFAULT_CHUNK: number; - const Z_DEFAULT_COMPRESSION: number; - const Z_DEFAULT_LEVEL: number; - const Z_DEFAULT_MEMLEVEL: number; - const Z_DEFAULT_STRATEGY: number; - const Z_DEFAULT_WINDOWBITS: number; - - const Z_ERRNO: number; - const Z_FILTERED: number; - const Z_FINISH: number; - const Z_FIXED: number; - const Z_FULL_FLUSH: number; - const Z_HUFFMAN_ONLY: number; - const Z_MAX_CHUNK: number; - const Z_MAX_LEVEL: number; - const Z_MAX_MEMLEVEL: number; - const Z_MAX_WINDOWBITS: number; - const Z_MEM_ERROR: number; - const Z_MIN_CHUNK: number; - const Z_MIN_LEVEL: number; - const Z_MIN_MEMLEVEL: number; - const Z_MIN_WINDOWBITS: number; - const Z_NEED_DICT: number; - const Z_NO_COMPRESSION: number; - const Z_NO_FLUSH: number; - const Z_OK: number; - const Z_PARTIAL_FLUSH: number; - const Z_RLE: number; - const Z_STREAM_END: number; - const Z_STREAM_ERROR: number; - const Z_SYNC_FLUSH: number; - const Z_VERSION_ERROR: number; - const ZLIB_VERNUM: number; - } - - /** - * @deprecated - */ - const Z_NO_FLUSH: number; - /** - * @deprecated - */ - const Z_PARTIAL_FLUSH: number; - /** - * @deprecated - */ - const Z_SYNC_FLUSH: number; - /** - * @deprecated - */ - const Z_FULL_FLUSH: number; - /** - * @deprecated - */ - const Z_FINISH: number; - /** - * @deprecated - */ - const Z_BLOCK: number; - /** - * @deprecated - */ - const Z_TREES: number; - /** - * @deprecated - */ - const Z_OK: number; - /** - * @deprecated - */ - const Z_STREAM_END: number; - /** - * @deprecated - */ - const Z_NEED_DICT: number; - /** - * @deprecated - */ - const Z_ERRNO: number; - /** - * @deprecated - */ - const Z_STREAM_ERROR: number; - /** - * @deprecated - */ - const Z_DATA_ERROR: number; - /** - * @deprecated - */ - const Z_MEM_ERROR: number; - /** - * @deprecated - */ - const Z_BUF_ERROR: number; - /** - * @deprecated - */ - const Z_VERSION_ERROR: number; - /** - * @deprecated - */ - const Z_NO_COMPRESSION: number; - /** - * @deprecated - */ - const Z_BEST_SPEED: number; - /** - * @deprecated - */ - const Z_BEST_COMPRESSION: number; - /** - * @deprecated - */ - const Z_DEFAULT_COMPRESSION: number; - /** - * @deprecated - */ - const Z_FILTERED: number; - /** - * @deprecated - */ - const Z_HUFFMAN_ONLY: number; - /** - * @deprecated - */ - const Z_RLE: number; - /** - * @deprecated - */ - const Z_FIXED: number; - /** - * @deprecated - */ - const Z_DEFAULT_STRATEGY: number; - /** - * @deprecated - */ - const Z_BINARY: number; - /** - * @deprecated - */ - const Z_TEXT: number; - /** - * @deprecated - */ - const Z_ASCII: number; - /** - * @deprecated - */ - const Z_UNKNOWN: number; - /** - * @deprecated - */ - const Z_DEFLATED: number; -} diff --git a/node_modules/@types/normalize-package-data/LICENSE b/node_modules/@types/normalize-package-data/LICENSE deleted file mode 100644 index 21071075..00000000 --- a/node_modules/@types/normalize-package-data/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - 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/@types/normalize-package-data/README.md b/node_modules/@types/normalize-package-data/README.md deleted file mode 100644 index 781a75dc..00000000 --- a/node_modules/@types/normalize-package-data/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/normalize-package-data` - -# Summary -This package contains type definitions for normalize-package-data (https://github.com/npm/normalize-package-data#readme). - -# Details -Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/normalize-package-data - -Additional Details - * Last updated: Sun, 07 Jan 2018 07:34:38 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by Jeff Dickey . diff --git a/node_modules/@types/normalize-package-data/index.d.ts b/node_modules/@types/normalize-package-data/index.d.ts deleted file mode 100644 index fa8186b0..00000000 --- a/node_modules/@types/normalize-package-data/index.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -// Type definitions for normalize-package-data 2.4 -// Project: https://github.com/npm/normalize-package-data#readme -// Definitions by: Jeff Dickey -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export = normalize; - -declare function normalize(data: normalize.Input, warn?: normalize.WarnFn, strict?: boolean): void; -declare function normalize(data: normalize.Input, strict?: boolean): void; - -declare namespace normalize { - type WarnFn = (msg: string) => void; - interface Input {[k: string]: any; } - - interface Person { - name?: string; - email?: string; - url?: string; - } - - interface Package { - [k: string]: any; - name: string; - version: string; - files?: string[]; - bin?: {[k: string]: string }; - man?: string[]; - keywords?: string[]; - author?: Person; - maintainers?: Person[]; - contributors?: Person[]; - bundleDependencies?: {[name: string]: string; }; - dependencies?: {[name: string]: string; }; - devDependencies?: {[name: string]: string; }; - optionalDependencies?: {[name: string]: string; }; - description?: string; - engines?: {[type: string]: string }; - license?: string; - repository?: { type: string, url: string }; - bugs?: { url: string, email?: string } | { url?: string, email: string }; - homepage?: string; - scripts?: {[k: string]: string}; - readme: string; - _id: string; - } -} diff --git a/node_modules/@types/normalize-package-data/package.json b/node_modules/@types/normalize-package-data/package.json deleted file mode 100644 index f9f8ebc4..00000000 --- a/node_modules/@types/normalize-package-data/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "_args": [ - [ - "@types/normalize-package-data@2.4.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@types/normalize-package-data@2.4.0", - "_id": "@types/normalize-package-data@2.4.0", - "_inBundle": false, - "_integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", - "_location": "/@types/normalize-package-data", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/normalize-package-data@2.4.0", - "name": "@types/normalize-package-data", - "escapedName": "@types%2fnormalize-package-data", - "scope": "@types", - "rawSpec": "2.4.0", - "saveSpec": null, - "fetchSpec": "2.4.0" - }, - "_requiredBy": [ - "/read-pkg" - ], - "_resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "_spec": "2.4.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "Jeff Dickey", - "url": "https://github.com/jdxcode" - } - ], - "dependencies": {}, - "description": "TypeScript definitions for normalize-package-data", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/normalize-package-data", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "typeScriptVersion": "2.0", - "typesPublisherContentHash": "5d2101e9e55c73e1d649a6c311e0d40bdfaa25bb06bb75ea6f3bb0d149c1303b", - "version": "2.4.0" -} diff --git a/node_modules/@types/stack-utils/LICENSE b/node_modules/@types/stack-utils/LICENSE deleted file mode 100644 index 21071075..00000000 --- a/node_modules/@types/stack-utils/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - 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/@types/stack-utils/README.md b/node_modules/@types/stack-utils/README.md deleted file mode 100644 index b6905468..00000000 --- a/node_modules/@types/stack-utils/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/stack-utils` - -# Summary -This package contains type definitions for stack-utils (https://github.com/tapjs/stack-utils#readme). - -# Details -Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stack-utils - -Additional Details - * Last updated: Tue, 07 Nov 2017 17:49:01 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by BendingBender . diff --git a/node_modules/@types/stack-utils/index.d.ts b/node_modules/@types/stack-utils/index.d.ts deleted file mode 100644 index f29a4229..00000000 --- a/node_modules/@types/stack-utils/index.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -// Type definitions for stack-utils 1.0 -// Project: https://github.com/tapjs/stack-utils#readme -// Definitions by: BendingBender -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 - -export = StackUtils; - -declare class StackUtils { - static nodeInternals(): RegExp[]; - constructor(options?: StackUtils.Options); - clean(stack: string | string[]): string; - capture(limit?: number, startStackFunction?: Function): StackUtils.CallSite[]; - capture(startStackFunction: Function): StackUtils.CallSite[]; - captureString(limit?: number, startStackFunction?: Function): string; - captureString(startStackFunction: Function): string; - at(startStackFunction?: Function): StackUtils.CallSiteLike; - parseLine(line: string): StackUtils.StackLineData | null; -} - -declare namespace StackUtils { - interface Options { - internals?: RegExp[]; - cwd?: string; - wrapCallSite?(callSite: CallSite): CallSite; - } - - interface CallSite { - getThis(): object | undefined; - getTypeName(): string; - getFunction(): Function | undefined; - getFunctionName(): string; - getMethodName(): string | null; - getFileName(): string | undefined; - getLineNumber(): number; - getColumnNumber(): number; - getEvalOrigin(): CallSite | string; - isToplevel(): boolean; - isEval(): boolean; - isNative(): boolean; - isConstructor(): boolean; - } - - interface CallSiteLike extends StackData { - type?: string; - } - - interface StackLineData extends StackData { - evalLine?: number; - evalColumn?: number; - evalFile?: string; - } - - interface StackData { - line?: number; - column?: number; - file?: string; - constructor?: boolean; - evalOrigin?: string; - native?: boolean; - function?: string; - method?: string; - } -} diff --git a/node_modules/@types/stack-utils/package.json b/node_modules/@types/stack-utils/package.json deleted file mode 100644 index 16a3b42f..00000000 --- a/node_modules/@types/stack-utils/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "_args": [ - [ - "@types/stack-utils@1.0.1", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@types/stack-utils@1.0.1", - "_id": "@types/stack-utils@1.0.1", - "_inBundle": false, - "_integrity": "sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==", - "_location": "/@types/stack-utils", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/stack-utils@1.0.1", - "name": "@types/stack-utils", - "escapedName": "@types%2fstack-utils", - "scope": "@types", - "rawSpec": "1.0.1", - "saveSpec": null, - "fetchSpec": "1.0.1" - }, - "_requiredBy": [ - "/jest-message-util" - ], - "_resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz", - "_spec": "1.0.1", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "BendingBender", - "url": "https://github.com/BendingBender" - } - ], - "dependencies": {}, - "description": "TypeScript definitions for stack-utils", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/stack-utils", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "typeScriptVersion": "2.2", - "typesPublisherContentHash": "c3d5963386c8535320c11b5edfb22c4bf60fb3e4bcbca34f094f7026b9749d86", - "version": "1.0.1" -} diff --git a/node_modules/@types/yargs-parser/LICENSE b/node_modules/@types/yargs-parser/LICENSE deleted file mode 100644 index 21071075..00000000 --- a/node_modules/@types/yargs-parser/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - 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/@types/yargs-parser/README.md b/node_modules/@types/yargs-parser/README.md deleted file mode 100644 index 1e6fa3cf..00000000 --- a/node_modules/@types/yargs-parser/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/yargs-parser` - -# Summary -This package contains type definitions for yargs-parser ( https://github.com/yargs/yargs-parser#readme ). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs-parser - -Additional Details - * Last updated: Mon, 08 Apr 2019 01:51:31 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by Miles Johnson . diff --git a/node_modules/@types/yargs-parser/index.d.ts b/node_modules/@types/yargs-parser/index.d.ts deleted file mode 100644 index 3e0e732b..00000000 --- a/node_modules/@types/yargs-parser/index.d.ts +++ /dev/null @@ -1,100 +0,0 @@ -// Type definitions for yargs-parser 13.0 -// Project: https://github.com/yargs/yargs-parser#readme -// Definitions by: Miles Johnson -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 - -declare namespace yargsParser { - interface Arguments { - /** Non-option arguments */ - _: string[]; - /** The script name or node command */ - $0: string; - /** All remaining options */ - [argName: string]: any; - } - - interface DetailedArguments { - /** An object representing the parsed value of `args` */ - argv: Arguments; - /** Populated with an error object if an exception occurred during parsing. */ - error: Error | null; - /** The inferred list of aliases built by combining lists in opts.alias. */ - aliases: { [alias: string]: string[] }; - /** Any new aliases added via camel-case expansion. */ - newAliases: { [alias: string]: boolean }; - /** The configuration loaded from the yargs stanza in package.json. */ - configuration: Configuration; - } - - interface Configuration { - /** Should variables prefixed with --no be treated as negations? Default is `true` */ - 'boolean-negation': boolean; - /** Should hyphenated arguments be expanded into camel-case aliases? Default is `true` */ - 'camel-case-expansion': boolean; - /** Should arrays be combined when provided by both command line arguments and a configuration file. Default is `false` */ - 'combine-arrays': boolean; - /** Should keys that contain . be treated as objects? Default is `true` */ - 'dot-notation': boolean; - /** Should arguments be coerced into an array when duplicated. Default is `true` */ - 'duplicate-arguments-array': boolean; - /** Should array arguments be coerced into a single array when duplicated. Default is `true` */ - 'flatten-duplicate-arrays': boolean; - /** Should parsing stop at the first text argument? This is similar to how e.g. ssh parses its command line. Default is `false` */ - 'halt-at-non-option': boolean; - /** The prefix to use for negated boolean variables. Default is `'no-'` */ - 'negation-prefix': string; - /** Should keys that look like numbers be treated as such? Default is `true` */ - 'parse-numbers': boolean; - /** Should unparsed flags be stored in -- or _. Default is `false` */ - 'populate--': boolean; - /** Should a placeholder be added for keys not set via the corresponding CLI argument? Default is `false` */ - 'set-placeholder-key': boolean; - /** Should a group of short-options be treated as boolean flags? Default is `true` */ - 'short-option-groups': boolean; - } - - interface Options { - /** An object representing the set of aliases for a key: `{ alias: { foo: ['f']} }`. */ - alias?: { [key: string]: string | string[] }; - /** - * Indicate that keys should be parsed as an array: `{ array: ['foo', 'bar'] }`. - * Indicate that keys should be parsed as an array and coerced to booleans / numbers: - * { array: [ { key: 'foo', boolean: true }, {key: 'bar', number: true} ] }`. - */ - array?: string[] | Array<{ key: string; boolean?: boolean, number?: boolean }>; - /** Arguments should be parsed as booleans: `{ boolean: ['x', 'y'] }`. */ - boolean?: string[]; - /** Indicate a key that represents a path to a configuration file (this file will be loaded and parsed). */ - config?: string | string[] | { [key: string]: boolean }; - /** Provide configuration options to the yargs-parser. */ - configuration?: Partial; - /** - * Provide a custom synchronous function that returns a coerced value from the argument provided (or throws an error), e.g. - * `{ coerce: { foo: function (arg) { return modifiedArg } } }`. - */ - coerce?: { [key: string]: (arg: any) => any }; - /** Indicate a key that should be used as a counter, e.g., `-vvv = {v: 3}`. */ - count?: string[]; - /** Provide default values for keys: `{ default: { x: 33, y: 'hello world!' } }`. */ - default?: { [key: string]: any }; - /** Environment variables (`process.env`) with the prefix provided should be parsed. */ - envPrefix?: string; - /** Specify that a key requires n arguments: `{ narg: {x: 2} }`. */ - narg?: { [key: string]: number }; - /** `path.normalize()` will be applied to values set to this key. */ - normalize?: string[]; - /** Keys should be treated as strings (even if they resemble a number `-x 33`). */ - string?: string[]; - /** Keys should be treated as numbers. */ - number?: string[]; - } - - interface Parser { - (argv: string | string[], opts?: Options): Arguments; - detailed(argv: string | string[], opts?: Options): DetailedArguments; - } -} - -declare var yargsParser: yargsParser.Parser; -export = yargsParser; diff --git a/node_modules/@types/yargs-parser/package.json b/node_modules/@types/yargs-parser/package.json deleted file mode 100644 index 5c73add8..00000000 --- a/node_modules/@types/yargs-parser/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "_args": [ - [ - "@types/yargs-parser@13.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@types/yargs-parser@13.0.0", - "_id": "@types/yargs-parser@13.0.0", - "_inBundle": false, - "_integrity": "sha512-wBlsw+8n21e6eTd4yVv8YD/E3xq0O6nNnJIquutAsFGE7EyMKz7W6RNT6BRu1SmdgmlCZ9tb0X+j+D6HGr8pZw==", - "_location": "/@types/yargs-parser", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/yargs-parser@13.0.0", - "name": "@types/yargs-parser", - "escapedName": "@types%2fyargs-parser", - "scope": "@types", - "rawSpec": "13.0.0", - "saveSpec": null, - "fetchSpec": "13.0.0" - }, - "_requiredBy": [ - "/@types/yargs" - ], - "_resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-13.0.0.tgz", - "_spec": "13.0.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "Miles Johnson", - "url": "https://github.com/milesj" - } - ], - "dependencies": {}, - "description": "TypeScript definitions for yargs-parser", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/yargs-parser", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/yargs-parser" - }, - "scripts": {}, - "typeScriptVersion": "2.2", - "types": "index", - "typesPublisherContentHash": "583a6e7f0bfbeca09d249f4b21de121d66fd94ad2073a26ee92fb257b960794e", - "version": "13.0.0" -} diff --git a/node_modules/@types/yargs/LICENSE b/node_modules/@types/yargs/LICENSE deleted file mode 100644 index 21071075..00000000 --- a/node_modules/@types/yargs/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - 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/@types/yargs/README.md b/node_modules/@types/yargs/README.md deleted file mode 100644 index ce96fe58..00000000 --- a/node_modules/@types/yargs/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/yargs` - -# Summary -This package contains type definitions for yargs (https://github.com/chevex/yargs). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs - -Additional Details - * Last updated: Wed, 31 Jul 2019 17:12:04 GMT - * Dependencies: @types/yargs-parser - * Global values: none - -# Credits -These definitions were written by Martin Poelstra , Mizunashi Mana , Jeffery Grajkowski , Jeff Kenney , Jimi (Dimitris) Charalampidis , Steffen Viken Valvåg , and Emily Marigold Klassen . diff --git a/node_modules/@types/yargs/index.d.ts b/node_modules/@types/yargs/index.d.ts deleted file mode 100644 index 8a696951..00000000 --- a/node_modules/@types/yargs/index.d.ts +++ /dev/null @@ -1,761 +0,0 @@ -// Type definitions for yargs 13.0 -// Project: https://github.com/chevex/yargs, https://yargs.js.org -// Definitions by: Martin Poelstra -// Mizunashi Mana -// Jeffery Grajkowski -// Jeff Kenney -// Jimi (Dimitris) Charalampidis -// Steffen Viken Valvåg -// Emily Marigold Klassen -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 - -// The following TSLint rules have been disabled: -// unified-signatures: Because there is useful information in the argument names of the overloaded signatures - -// Convention: -// Use 'union types' when: -// - parameter types have similar signature type (i.e. 'string | ReadonlyArray') -// - parameter names have the same semantic meaning (i.e. ['command', 'commands'] , ['key', 'keys']) -// An example for not using 'union types' is the declaration of 'env' where `prefix` and `enable` parameters -// have different semantics. On the other hand, in the declaration of 'usage', a `command: string` parameter -// has the same semantic meaning with declaring an overload method by using `commands: ReadonlyArray`, -// thus it's preferred to use `command: string | ReadonlyArray` -// Use parameterless declaration instead of declaring all parameters optional, -// when all parameters are optional and more than one - -import { DetailedArguments, Configuration } from 'yargs-parser'; - -declare namespace yargs { - // The type parameter T is the expected shape of the parsed options. - // Arguments is those options plus _ and $0, and an indexer falling - // back to unknown for unknown options. - // - // For the return type / argv property, we create a mapped type over - // Arguments to simplify the inferred type signature in client code. - interface Argv { - (): { [key in keyof Arguments]: Arguments[key] }; - (args: ReadonlyArray, cwd?: string): Argv; - - /** - * Set key names as equivalent such that updates to a key will propagate to aliases and vice-versa. - * - * Optionally `.alias()` can take an object that maps keys to aliases. - * Each key of this object should be the canonical version of the option, and each value should be a string or an array of strings. - */ - // Aliases for previously declared options can inherit the types of those options. - alias(shortName: K1, longName: K2 | ReadonlyArray): Argv; - alias(shortName: K2, longName: K1 | ReadonlyArray): Argv; - alias(shortName: string | ReadonlyArray, longName: string | ReadonlyArray): Argv; - alias(aliases: { [shortName: string]: string | ReadonlyArray }): Argv; - - /** - * Get the arguments as a plain old object. - * - * Arguments without a corresponding flag show up in the `argv._` array. - * - * The script name or node command is available at `argv.$0` similarly to how `$0` works in bash or perl. - * - * If `yargs` is executed in an environment that embeds node and there's no script name (e.g. Electron or nw.js), - * it will ignore the first parameter since it expects it to be the script name. In order to override - * this behavior, use `.parse(process.argv.slice(1))` instead of .argv and the first parameter won't be ignored. - */ - argv: { [key in keyof Arguments]: Arguments[key] }; - - /** - * Tell the parser to interpret `key` as an array. - * If `.array('foo')` is set, `--foo foo bar` will be parsed as `['foo', 'bar']` rather than as `'foo'`. - * Also, if you use the option multiple times all the values will be flattened in one array so `--foo foo --foo bar` will be parsed as `['foo', 'bar']` - * - * When the option is used with a positional, use `--` to tell `yargs` to stop adding values to the array. - */ - array(key: K | ReadonlyArray): Argv & { [key in K]: ToArray }>; - array(key: K | ReadonlyArray): Argv | undefined }>; - - /** - * Interpret `key` as a boolean. If a non-flag option follows `key` in `process.argv`, that string won't get set as the value of `key`. - * - * `key` will default to `false`, unless a `default(key, undefined)` is explicitly set. - * - * If `key` is an array, interpret all the elements as booleans. - */ - boolean(key: K | ReadonlyArray): Argv & { [key in K]: boolean | undefined }>; - boolean(key: K | ReadonlyArray): Argv; - - /** - * Check that certain conditions are met in the provided arguments. - * @param func Called with two arguments, the parsed `argv` hash and an array of options and their aliases. - * If `func` throws or returns a non-truthy value, show the thrown error, usage information, and exit. - * @param global Indicates whether `check()` should be enabled both at the top-level and for each sub-command. - */ - check(func: (argv: Arguments, aliases: { [alias: string]: string }) => any, global?: boolean): Argv; - - /** - * Limit valid values for key to a predefined set of choices, given as an array or as an individual value. - * If this method is called multiple times, all enumerated values will be merged together. - * Choices are generally strings or numbers, and value matching is case-sensitive. - * - * Optionally `.choices()` can take an object that maps multiple keys to their choices. - * - * Choices can also be specified as choices in the object given to `option()`. - */ - choices>(key: K, values: C): Argv & { [key in K]: C[number] | undefined }>; - choices>(key: K, values: C): Argv; - choices }>(choices: C): Argv & { [key in keyof C]: C[key][number] | undefined }>; - - /** - * Provide a synchronous function to coerce or transform the value(s) given on the command line for `key`. - * - * The coercion function should accept one argument, representing the parsed value from the command line, and should return a new value or throw an error. - * The returned value will be used as the value for `key` (or one of its aliases) in `argv`. - * - * If the function throws, the error will be treated as a validation failure, delegating to either a custom `.fail()` handler or printing the error message in the console. - * - * Coercion will be applied to a value after all other modifications, such as `.normalize()`. - * - * Optionally `.coerce()` can take an object that maps several keys to their respective coercion function. - * - * You can also map the same function to several keys at one time. Just pass an array of keys as the first argument to `.coerce()`. - * - * If you are using dot-notion or arrays, .e.g., `user.email` and `user.password`, coercion will be applied to the final object that has been parsed - */ - coerce(key: K | ReadonlyArray, func: (arg: any) => V): Argv & { [key in K]: V | undefined }>; - coerce(key: K | ReadonlyArray, func: (arg: any) => V): Argv; - coerce any }>(opts: O): Argv & { [key in keyof O]: ReturnType | undefined }>; - - /** - * Define the commands exposed by your application. - * @param command Should be a string representing the command or an array of strings representing the command and its aliases. - * @param description Use to provide a description for each command your application accepts (the values stored in `argv._`). - * Set `description` to false to create a hidden command. Hidden commands don't show up in the help output and aren't available for completion. - * @param [builder] Object to give hints about the options that your command accepts. - * Can also be a function. This function is executed with a yargs instance, and can be used to provide advanced command specific help. - * @param [handler] Function, which will be executed with the parsed `argv` object. - */ - command(command: string | ReadonlyArray, description: string, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; - command(command: string | ReadonlyArray, description: string, builder?: O, handler?: (args: Arguments>) => void): Argv; - command(command: string | ReadonlyArray, description: string, module: CommandModule): Argv; - command(command: string | ReadonlyArray, showInHelp: false, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; - command(command: string | ReadonlyArray, showInHelp: false, builder?: O, handler?: (args: Arguments>) => void): Argv; - command(command: string | ReadonlyArray, showInHelp: false, module: CommandModule): Argv; - command(module: CommandModule): Argv; - - // Advanced API - /** Apply command modules from a directory relative to the module calling this method. */ - commandDir(dir: string, opts?: RequireDirectoryOptions): Argv; - - /** - * Enable bash/zsh-completion shortcuts for commands and options. - * - * If invoked without parameters, `.completion()` will make completion the command to output the completion script. - * - * @param [cmd] When present in `argv._`, will result in the `.bashrc` or `.zshrc` completion script being outputted. - * To enable bash/zsh completions, concat the generated script to your `.bashrc` or `.bash_profile` (or `.zshrc` for zsh). - * @param [description] Provide a description in your usage instructions for the command that generates the completion scripts. - * @param [func] Rather than relying on yargs' default completion functionality, which shiver me timbers is pretty awesome, you can provide your own completion method. - */ - completion(): Argv; - completion(cmd: string, func?: AsyncCompletionFunction): Argv; - completion(cmd: string, func?: SyncCompletionFunction): Argv; - completion(cmd: string, func?: PromiseCompletionFunction): Argv; - completion(cmd: string, description?: string | false, func?: AsyncCompletionFunction): Argv; - completion(cmd: string, description?: string | false, func?: SyncCompletionFunction): Argv; - completion(cmd: string, description?: string | false, func?: PromiseCompletionFunction): Argv; - - /** - * Tells the parser that if the option specified by `key` is passed in, it should be interpreted as a path to a JSON config file. - * The file is loaded and parsed, and its properties are set as arguments. - * Because the file is loaded using Node's require(), the filename MUST end in `.json` to be interpreted correctly. - * - * If invoked without parameters, `.config()` will make --config the option to pass the JSON config file. - * - * @param [description] Provided to customize the config (`key`) option in the usage string. - * @param [explicitConfigurationObject] An explicit configuration `object` - */ - config(): Argv; - config(key: string | ReadonlyArray, description?: string, parseFn?: (configPath: string) => object): Argv; - config(key: string | ReadonlyArray, parseFn: (configPath: string) => object): Argv; - config(explicitConfigurationObject: object): Argv; - - /** - * Given the key `x` is set, the key `y` must not be set. `y` can either be a single string or an array of argument names that `x` conflicts with. - * - * Optionally `.conflicts()` can accept an object specifying multiple conflicting keys. - */ - conflicts(key: string, value: string | ReadonlyArray): Argv; - conflicts(conflicts: { [key: string]: string | ReadonlyArray }): Argv; - - /** - * Interpret `key` as a boolean flag, but set its parsed value to the number of flag occurrences rather than `true` or `false`. Default value is thus `0`. - */ - count(key: K | ReadonlyArray): Argv & { [key in K]: number }>; - count(key: K | ReadonlyArray): Argv; - - /** - * Set `argv[key]` to `value` if no option was specified in `process.argv`. - * - * Optionally `.default()` can take an object that maps keys to default values. - * - * The default value can be a `function` which returns a value. The name of the function will be used in the usage string. - * - * Optionally, `description` can also be provided and will take precedence over displaying the value in the usage instructions. - */ - default(key: K, value: V, description?: string): Argv & { [key in K]: V }>; - default(key: K, value: V, description?: string): Argv; - default(defaults: D, description?: string): Argv & D>; - - /** - * @deprecated since version 6.6.0 - * Use '.demandCommand()' or '.demandOption()' instead - */ - demand(key: K | ReadonlyArray, msg?: string | true): Argv>; - demand(key: K | ReadonlyArray, msg?: string | true): Argv; - demand(key: string | ReadonlyArray, required?: boolean): Argv; - demand(positionals: number, msg: string): Argv; - demand(positionals: number, required?: boolean): Argv; - demand(positionals: number, max: number, msg?: string): Argv; - - /** - * @param key If is a string, show the usage information and exit if key wasn't specified in `process.argv`. - * If is an array, demand each element. - * @param msg If string is given, it will be printed when the argument is missing, instead of the standard error message. - * @param demand Controls whether the option is demanded; this is useful when using .options() to specify command line parameters. - */ - demandOption(key: K | ReadonlyArray, msg?: string | true): Argv>; - demandOption(key: K | ReadonlyArray, msg?: string | true): Argv; - demandOption(key: string | ReadonlyArray, demand?: boolean): Argv; - - /** - * Demand in context of commands. - * You can demand a minimum and a maximum number a user can have within your program, as well as provide corresponding error messages if either of the demands is not met. - */ - demandCommand(): Argv; - demandCommand(min: number, minMsg?: string): Argv; - demandCommand(min: number, max?: number, minMsg?: string, maxMsg?: string): Argv; - - /** - * Describe a `key` for the generated usage information. - * - * Optionally `.describe()` can take an object that maps keys to descriptions. - */ - describe(key: string | ReadonlyArray, description: string): Argv; - describe(descriptions: { [key: string]: string }): Argv; - - /** Should yargs attempt to detect the os' locale? Defaults to `true`. */ - detectLocale(detect: boolean): Argv; - - /** - * Tell yargs to parse environment variables matching the given prefix and apply them to argv as though they were command line arguments. - * - * Use the "__" separator in the environment variable to indicate nested options. (e.g. prefix_nested__foo => nested.foo) - * - * If this method is called with no argument or with an empty string or with true, then all env vars will be applied to argv. - * - * Program arguments are defined in this order of precedence: - * 1. Command line args - * 2. Env vars - * 3. Config file/objects - * 4. Configured defaults - * - * Env var parsing is disabled by default, but you can also explicitly disable it by calling `.env(false)`, e.g. if you need to undo previous configuration. - */ - env(): Argv; - env(prefix: string): Argv; - env(enable: boolean): Argv; - - /** A message to print at the end of the usage instructions */ - epilog(msg: string): Argv; - /** A message to print at the end of the usage instructions */ - epilogue(msg: string): Argv; - - /** - * Give some example invocations of your program. - * Inside `cmd`, the string `$0` will get interpolated to the current script name or node command for the present script similar to how `$0` works in bash or perl. - * Examples will be printed out as part of the help message. - */ - example(command: string, description: string): Argv; - - /** Manually indicate that the program should exit, and provide context about why we wanted to exit. Follows the behavior set by `.exitProcess().` */ - exit(code: number, err: Error): void; - - /** - * By default, yargs exits the process when the user passes a help flag, the user uses the `.version` functionality, validation fails, or the command handler fails. - * Calling `.exitProcess(false)` disables this behavior, enabling further actions after yargs have been validated. - */ - exitProcess(enabled: boolean): Argv; - - /** - * Method to execute when a failure occurs, rather than printing the failure message. - * @param func Is called with the failure message that would have been printed, the Error instance originally thrown and yargs state when the failure occurred. - */ - fail(func: (msg: string, err: Error) => any): Argv; - - /** - * Allows to programmatically get completion choices for any line. - * @param args An array of the words in the command line to complete. - * @param done The callback to be called with the resulting completions. - */ - getCompletion(args: ReadonlyArray, done: (completions: ReadonlyArray) => void): Argv; - - /** - * Indicate that an option (or group of options) should not be reset when a command is executed - * - * Options default to being global. - */ - global(key: string | ReadonlyArray): Argv; - - /** Given a key, or an array of keys, places options under an alternative heading when displaying usage instructions */ - group(key: string | ReadonlyArray, groupName: string): Argv; - - /** Hides a key from the generated usage information. Unless a `--show-hidden` option is also passed with `--help` (see `showHidden()`). */ - hide(key: string): Argv; - - /** - * Configure an (e.g. `--help`) and implicit command that displays the usage string and exits the process. - * By default yargs enables help on the `--help` option. - * - * Note that any multi-char aliases (e.g. `help`) used for the help option will also be used for the implicit command. - * If there are no multi-char aliases (e.g. `h`), then all single-char aliases will be used for the command. - * - * If invoked without parameters, `.help()` will use `--help` as the option and help as the implicit command to trigger help output. - * - * @param [description] Customizes the description of the help option in the usage string. - * @param [enableExplicit] If `false` is provided, it will disable --help. - */ - help(): Argv; - help(enableExplicit: boolean): Argv; - help(option: string, enableExplicit: boolean): Argv; - help(option: string, description?: string, enableExplicit?: boolean): Argv; - - /** - * Given the key `x` is set, it is required that the key `y` is set. - * y` can either be the name of an argument to imply, a number indicating the position of an argument or an array of multiple implications to associate with `x`. - * - * Optionally `.implies()` can accept an object specifying multiple implications. - */ - implies(key: string, value: string | ReadonlyArray): Argv; - implies(implies: { [key: string]: string | ReadonlyArray }): Argv; - - /** - * Return the locale that yargs is currently using. - * - * By default, yargs will auto-detect the operating system's locale so that yargs-generated help content will display in the user's language. - */ - locale(): string; - /** - * Override the auto-detected locale from the user's operating system with a static locale. - * Note that the OS locale can be modified by setting/exporting the `LC_ALL` environment variable. - */ - locale(loc: string): Argv; - - /** - * Define global middleware functions to be called first, in list order, for all cli command. - * @param callbacks Can be a function or a list of functions. Each callback gets passed a reference to argv. - * @param [applyBeforeValidation] Set to `true` to apply middleware before validation. This will execute the middleware prior to validation checks, but after parsing. - */ - middleware(callbacks: MiddlewareFunction | ReadonlyArray>, applyBeforeValidation?: boolean): Argv; - - /** - * The number of arguments that should be consumed after a key. This can be a useful hint to prevent parsing ambiguity. - * - * Optionally `.nargs()` can take an object of `key`/`narg` pairs. - */ - nargs(key: string, count: number): Argv; - nargs(nargs: { [key: string]: number }): Argv; - - /** The key provided represents a path and should have `path.normalize()` applied. */ - normalize(key: K | ReadonlyArray): Argv & { [key in K]: ToString }>; - normalize(key: K | ReadonlyArray): Argv; - - /** - * Tell the parser to always interpret key as a number. - * - * If `key` is an array, all elements will be parsed as numbers. - * - * If the option is given on the command line without a value, `argv` will be populated with `undefined`. - * - * If the value given on the command line cannot be parsed as a number, `argv` will be populated with `NaN`. - * - * Note that decimals, hexadecimals, and scientific notation are all accepted. - */ - number(key: K | ReadonlyArray): Argv & { [key in K]: ToNumber }>; - number(key: K | ReadonlyArray): Argv; - - /** - * This method can be used to make yargs aware of options that could exist. - * You can also pass an opt object which can hold further customization, like `.alias()`, `.demandOption()` etc. for that option. - */ - option(key: K, options: O): Argv & { [key in K]: InferredOptionType }>; - option(key: K, options: O): Argv }>; - option(options: O): Argv & InferredOptionTypes>; - - /** - * This method can be used to make yargs aware of options that could exist. - * You can also pass an opt object which can hold further customization, like `.alias()`, `.demandOption()` etc. for that option. - */ - options(key: K, options: O): Argv & { [key in K]: InferredOptionType }>; - options(key: K, options: O): Argv }>; - options(options: O): Argv & InferredOptionTypes>; - - /** - * Parse `args` instead of `process.argv`. Returns the `argv` object. `args` may either be a pre-processed argv array, or a raw argument string. - * - * Note: Providing a callback to parse() disables the `exitProcess` setting until after the callback is invoked. - * @param [context] Provides a useful mechanism for passing state information to commands - */ - parse(): { [key in keyof Arguments]: Arguments[key] }; - parse(arg: string | ReadonlyArray, context?: object, parseCallback?: ParseCallback): { [key in keyof Arguments]: Arguments[key] }; - - /** - * If the arguments have not been parsed, this property is `false`. - * - * If the arguments have been parsed, this contain detailed parsed arguments. - */ - parsed: DetailedArguments | false; - - /** Allows to configure advanced yargs features. */ - parserConfiguration(configuration: Partial): Argv; - - /** - * Similar to `config()`, indicates that yargs should interpret the object from the specified key in package.json as a configuration object. - * @param [cwd] If provided, the package.json will be read from this location - */ - pkgConf(key: string | ReadonlyArray, cwd?: string): Argv; - - /** - * Allows you to configure a command's positional arguments with an API similar to `.option()`. - * `.positional()` should be called in a command's builder function, and is not available on the top-level yargs instance. If so, it will throw an error. - */ - positional(key: K, opt: O): Argv & { [key in K]: InferredOptionType }>; - positional(key: K, opt: O): Argv }>; - - /** Should yargs provide suggestions regarding similar commands if no matching command is found? */ - recommendCommands(): Argv; - - /** - * @deprecated since version 6.6.0 - * Use '.demandCommand()' or '.demandOption()' instead - */ - require(key: K | ReadonlyArray, msg?: string | true): Argv>; - require(key: string, msg: string): Argv; - require(key: string, required: boolean): Argv; - require(keys: ReadonlyArray, msg: string): Argv; - require(keys: ReadonlyArray, required: boolean): Argv; - require(positionals: number, required: boolean): Argv; - require(positionals: number, msg: string): Argv; - - /** - * @deprecated since version 6.6.0 - * Use '.demandCommand()' or '.demandOption()' instead - */ - required(key: K | ReadonlyArray, msg?: string | true): Argv>; - required(key: string, msg: string): Argv; - required(key: string, required: boolean): Argv; - required(keys: ReadonlyArray, msg: string): Argv; - required(keys: ReadonlyArray, required: boolean): Argv; - required(positionals: number, required: boolean): Argv; - required(positionals: number, msg: string): Argv; - - requiresArg(key: string | ReadonlyArray): Argv; - - /** - * @deprecated since version 6.6.0 - * Use '.global()' instead - */ - reset(): Argv; - - /** Set the name of your script ($0). Default is the base filename executed by node (`process.argv[1]`) */ - scriptName($0: string): Argv; - - /** - * Generate a bash completion script. - * Users of your application can install this script in their `.bashrc`, and yargs will provide completion shortcuts for commands and options. - */ - showCompletionScript(): Argv; - - /** - * Configure the `--show-hidden` option that displays the hidden keys (see `hide()`). - * @param option If `boolean`, it enables/disables this option altogether. i.e. hidden keys will be permanently hidden if first argument is `false`. - * If `string` it changes the key name ("--show-hidden"). - * @param description Changes the default description ("Show hidden options") - */ - showHidden(option?: string | boolean): Argv; - showHidden(option: string, description?: string): Argv; - - /** - * Print the usage data using the console function consoleLevel for printing. - * @param [consoleLevel='error'] - */ - showHelp(consoleLevel?: string): Argv; - - /** - * By default, yargs outputs a usage string if any error is detected. - * Use the `.showHelpOnFail()` method to customize this behavior. - * @param enable If `false`, the usage string is not output. - * @param [message] Message that is output after the error message. - */ - showHelpOnFail(enable: boolean, message?: string): Argv; - - /** Specifies either a single option key (string), or an array of options. If any of the options is present, yargs validation is skipped. */ - skipValidation(key: string | ReadonlyArray): Argv; - - /** - * Any command-line argument given that is not demanded, or does not have a corresponding description, will be reported as an error. - * - * Unrecognized commands will also be reported as errors. - */ - strict(): Argv; - strict(enabled: boolean): Argv; - - /** - * Tell the parser logic not to interpret `key` as a number or boolean. This can be useful if you need to preserve leading zeros in an input. - * - * If `key` is an array, interpret all the elements as strings. - * - * `.string('_')` will result in non-hyphenated arguments being interpreted as strings, regardless of whether they resemble numbers. - */ - string(key: K | ReadonlyArray): Argv & { [key in K]: ToString }>; - string(key: K | ReadonlyArray): Argv; - - // Intended to be used with '.wrap()' - terminalWidth(): number; - - updateLocale(obj: { [key: string]: string }): Argv; - - /** - * Override the default strings used by yargs with the key/value pairs provided in obj - * - * If you explicitly specify a locale(), you should do so before calling `updateStrings()`. - */ - updateStrings(obj: { [key: string]: string }): Argv; - - /** - * Set a usage message to show which commands to use. - * Inside `message`, the string `$0` will get interpolated to the current script name or node command for the present script similar to how `$0` works in bash or perl. - * - * If the optional `description`/`builder`/`handler` are provided, `.usage()` acts an an alias for `.command()`. - * This allows you to use `.usage()` to configure the default command that will be run as an entry-point to your application - * and allows you to provide configuration for the positional arguments accepted by your program: - */ - usage(message: string): Argv; - usage(command: string | ReadonlyArray, description: string, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; - usage(command: string | ReadonlyArray, showInHelp: boolean, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; - usage(command: string | ReadonlyArray, description: string, builder?: O, handler?: (args: Arguments>) => void): Argv; - usage(command: string | ReadonlyArray, showInHelp: boolean, builder?: O, handler?: (args: Arguments>) => void): Argv; - - /** - * Add an option (e.g. `--version`) that displays the version number (given by the version parameter) and exits the process. - * By default yargs enables version for the `--version` option. - * - * If no arguments are passed to version (`.version()`), yargs will parse the package.json of your module and use its version value. - * - * If the boolean argument `false` is provided, it will disable `--version`. - */ - version(): Argv; - version(version: string): Argv; - version(enable: boolean): Argv; - version(optionKey: string, version: string): Argv; - version(optionKey: string, description: string, version: string): Argv; - - /** - * Format usage output to wrap at columns many columns. - * - * By default wrap will be set to `Math.min(80, windowWidth)`. Use `.wrap(null)` to specify no column limit (no right-align). - * Use `.wrap(yargs.terminalWidth())` to maximize the width of yargs' usage instructions. - */ - wrap(columns: number | null): Argv; - } - - type Arguments = T & { - /** Non-option arguments */ - _: string[]; - /** The script name or node command */ - $0: string; - /** All remaining options */ - [argName: string]: unknown; - }; - - interface RequireDirectoryOptions { - /** Look for command modules in all subdirectories and apply them as a flattened (non-hierarchical) list. */ - recurse?: boolean; - /** The types of files to look for when requiring command modules. */ - extensions?: ReadonlyArray; - /** - * A synchronous function called for each command module encountered. - * Accepts `commandObject`, `pathToFile`, and `filename` as arguments. - * Returns `commandObject` to include the command; any falsy value to exclude/skip it. - */ - visit?: (commandObject: any, pathToFile?: string, filename?: string) => any; - /** Whitelist certain modules */ - include?: RegExp | ((pathToFile: string) => boolean); - /** Blacklist certain modules. */ - exclude?: RegExp | ((pathToFile: string) => boolean); - } - - interface Options { - /** string or array of strings, alias(es) for the canonical option key, see `alias()` */ - alias?: string | ReadonlyArray; - /** boolean, interpret option as an array, see `array()` */ - array?: boolean; - /** boolean, interpret option as a boolean flag, see `boolean()` */ - boolean?: boolean; - /** value or array of values, limit valid option arguments to a predefined set, see `choices()` */ - choices?: Choices; - /** function, coerce or transform parsed command line values into another value, see `coerce()` */ - coerce?: (arg: any) => any; - /** boolean, interpret option as a path to a JSON config file, see `config()` */ - config?: boolean; - /** function, provide a custom config parsing function, see `config()` */ - configParser?: (configPath: string) => object; - /** string or object, require certain keys not to be set, see `conflicts()` */ - conflicts?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; - /** boolean, interpret option as a count of boolean flags, see `count()` */ - count?: boolean; - /** value, set a default value for the option, see `default()` */ - default?: any; - /** string, use this description for the default value in help content, see `default()` */ - defaultDescription?: string; - /** - * @deprecated since version 6.6.0 - * Use 'demandOption' instead - */ - demand?: boolean | string; - /** boolean or string, demand the option be given, with optional error message, see `demandOption()` */ - demandOption?: boolean | string; - /** string, the option description for help content, see `describe()` */ - desc?: string; - /** string, the option description for help content, see `describe()` */ - describe?: string; - /** string, the option description for help content, see `describe()` */ - description?: string; - /** boolean, indicate that this key should not be reset when a command is invoked, see `global()` */ - global?: boolean; - /** string, when displaying usage instructions place the option under an alternative group heading, see `group()` */ - group?: string; - /** don't display option in help output. */ - hidden?: boolean; - /** string or object, require certain keys to be set, see `implies()` */ - implies?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; - /** number, specify how many arguments should be consumed for the option, see `nargs()` */ - nargs?: number; - /** boolean, apply path.normalize() to the option, see `normalize()` */ - normalize?: boolean; - /** boolean, interpret option as a number, `number()` */ - number?: boolean; - /** - * @deprecated since version 6.6.0 - * Use 'demandOption' instead - */ - require?: boolean | string; - /** - * @deprecated since version 6.6.0 - * Use 'demandOption' instead - */ - required?: boolean | string; - /** boolean, require the option be specified with a value, see `requiresArg()` */ - requiresArg?: boolean; - /** boolean, skips validation if the option is present, see `skipValidation()` */ - skipValidation?: boolean; - /** boolean, interpret option as a string, see `string()` */ - string?: boolean; - type?: "array" | "count" | PositionalOptionsType; - } - - interface PositionalOptions { - /** string or array of strings, see `alias()` */ - alias?: string | ReadonlyArray; - /** value or array of values, limit valid option arguments to a predefined set, see `choices()` */ - choices?: Choices; - /** function, coerce or transform parsed command line values into another value, see `coerce()` */ - coerce?: (arg: any) => any; - /** string or object, require certain keys not to be set, see `conflicts()` */ - conflicts?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; - /** value, set a default value for the option, see `default()` */ - default?: any; - /** string, the option description for help content, see `describe()` */ - desc?: string; - /** string, the option description for help content, see `describe()` */ - describe?: string; - /** string, the option description for help content, see `describe()` */ - description?: string; - /** string or object, require certain keys to be set, see `implies()` */ - implies?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; - /** boolean, apply path.normalize() to the option, see normalize() */ - normalize?: boolean; - type?: PositionalOptionsType; - } - - /** Remove keys K in T */ - type Omit = { [key in Exclude]: T[key] }; - - /** Remove undefined as a possible value for keys K in T */ - type Defined = Omit & { [key in K]: Exclude }; - - /** Convert T to T[] and T | undefined to T[] | undefined */ - type ToArray = Array> | Extract; - - /** Gives string[] if T is an array type, otherwise string. Preserves | undefined. */ - type ToString = (Exclude extends any[] ? string[] : string) | Extract; - - /** Gives number[] if T is an array type, otherwise number. Preserves | undefined. */ - type ToNumber = (Exclude extends any[] ? number[] : number) | Extract; - - type InferredOptionType = - O extends { default: infer D } ? D : - O extends { type: "count" } ? number : - O extends { count: true } ? number : - O extends { required: string | true } ? RequiredOptionType : - O extends { require: string | true } ? RequiredOptionType : - O extends { demand: string | true } ? RequiredOptionType : - O extends { demandOption: string | true } ? RequiredOptionType : - RequiredOptionType | undefined; - - type RequiredOptionType = - O extends { type: "array", string: true } ? string[] : - O extends { type: "array", number: true } ? number[] : - O extends { type: "array", normalize: true } ? string[] : - O extends { type: "string", array: true } ? string[] : - O extends { type: "number", array: true } ? number[] : - O extends { string: true, array: true } ? string[] : - O extends { number: true, array: true } ? number[] : - O extends { normalize: true, array: true } ? string[] : - O extends { type: "array" } ? Array : - O extends { type: "boolean" } ? boolean : - O extends { type: "number" } ? number : - O extends { type: "string" } ? string : - O extends { array: true } ? Array : - O extends { boolean: true } ? boolean : - O extends { number: true } ? number : - O extends { string: true } ? string : - O extends { normalize: true } ? string : - O extends { choices: ReadonlyArray } ? C : - O extends { coerce: (arg: any) => infer T } ? T : - unknown; - - type InferredOptionTypes = { [key in keyof O]: InferredOptionType }; - - interface CommandModule { - /** array of strings (or a single string) representing aliases of `exports.command`, positional args defined in an alias are ignored */ - aliases?: ReadonlyArray | string; - /** object declaring the options the command accepts, or a function accepting and returning a yargs instance */ - builder?: CommandBuilder; - /** string (or array of strings) that executes this command when given on the command line, first string may contain positional args */ - command?: ReadonlyArray | string; - /** string used as the description for the command in help text, use `false` for a hidden command */ - describe?: string | false; - /** a function which will be passed the parsed argv. */ - handler: (args: Arguments) => void; - } - - type ParseCallback = (err: Error | undefined, argv: Arguments, output: string) => void; - type CommandBuilder = { [key: string]: Options } | ((args: Argv) => Argv); - type SyncCompletionFunction = (current: string, argv: any) => string[]; - type AsyncCompletionFunction = (current: string, argv: any, done: (completion: ReadonlyArray) => void) => void; - type PromiseCompletionFunction = (current: string, argv: any) => Promise; - type MiddlewareFunction = (args: Arguments) => void; - type Choices = ReadonlyArray; - type PositionalOptionsType = "boolean" | "number" | "string"; -} - -declare var yargs: yargs.Argv; -export = yargs; diff --git a/node_modules/@types/yargs/package.json b/node_modules/@types/yargs/package.json deleted file mode 100644 index dcf302a6..00000000 --- a/node_modules/@types/yargs/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_args": [ - [ - "@types/yargs@13.0.2", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "@types/yargs@13.0.2", - "_id": "@types/yargs@13.0.2", - "_inBundle": false, - "_integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "_location": "/@types/yargs", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@types/yargs@13.0.2", - "name": "@types/yargs", - "escapedName": "@types%2fyargs", - "scope": "@types", - "rawSpec": "13.0.2", - "saveSpec": null, - "fetchSpec": "13.0.2" - }, - "_requiredBy": [ - "/@jest/types", - "/jest-runtime", - "/jest-watcher" - ], - "_resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "_spec": "13.0.2", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "contributors": [ - { - "name": "Martin Poelstra", - "url": "https://github.com/poelstra" - }, - { - "name": "Mizunashi Mana", - "url": "https://github.com/mizunashi-mana" - }, - { - "name": "Jeffery Grajkowski", - "url": "https://github.com/pushplay" - }, - { - "name": "Jeff Kenney", - "url": "https://github.com/jeffkenney" - }, - { - "name": "Jimi", - "url": "Dimitris" - }, - { - "name": "Steffen Viken Valvåg", - "url": "https://github.com/steffenvv" - }, - { - "name": "Emily Marigold Klassen", - "url": "https://github.com/forivall" - } - ], - "dependencies": { - "@types/yargs-parser": "*" - }, - "description": "TypeScript definitions for yargs", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/yargs", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/yargs" - }, - "scripts": {}, - "typeScriptVersion": "3.0", - "types": "index", - "typesPublisherContentHash": "5a8204a9fcea5ff2f6fd239ea4db72637ab00c6e3c82ff1855070c7ecc25394e", - "version": "13.0.2" -} diff --git a/node_modules/@types/yargs/yargs.d.ts b/node_modules/@types/yargs/yargs.d.ts deleted file mode 100644 index f022ae4b..00000000 --- a/node_modules/@types/yargs/yargs.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Argv } from '.'; - -export = Yargs; - -declare function Yargs( - processArgs?: ReadonlyArray, - cwd?: string, - parentRequire?: NodeRequireFunction, -): Argv; diff --git a/node_modules/abab/CHANGELOG.md b/node_modules/abab/CHANGELOG.md deleted file mode 100644 index bbfddb96..00000000 --- a/node_modules/abab/CHANGELOG.md +++ /dev/null @@ -1,28 +0,0 @@ -## 2.0.1 - -- Add TypeScript type definitions, thanks to @LinusU - -## 2.0.0 - -Modernization updates thanks to @TimothyGu: - -- Use jsdom's eslint config, remove jscs -- Move syntax to ES6 -- Remove Babel -- Via: https://github.com/jsdom/abab/pull/26 - -## 1.0.4 - -- Added license file - -## 1.0.3 - -- Replaced `let` with `var` in `lib/btoa.js` - - Follow up from `1.0.2` - - Resolves https://github.com/jsdom/abab/issues/18 - -## 1.0.2 - -- Replaced `const` with `var` in `index.js` - - Allows use of `abab` in the browser without a transpilation step - - Resolves https://github.com/jsdom/abab/issues/15 diff --git a/node_modules/abab/LICENSE.md b/node_modules/abab/LICENSE.md deleted file mode 100644 index 5b830feb..00000000 --- a/node_modules/abab/LICENSE.md +++ /dev/null @@ -1,13 +0,0 @@ -Copyright © 2019 W3C and Jeff Carpenter \ - -Both the original source code and new contributions in this repository are released under the [W3C 3-clause BSD license](https://github.com/w3c/web-platform-tests/blob/master/LICENSE.md#w3c-3-clause-bsd-license). - -# W3C 3-clause BSD License - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -* Redistributions of works must retain the original copyright notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the original 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 W3C nor the names of its contributors may be used to endorse or promote products derived from this work without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/abab/README.md b/node_modules/abab/README.md deleted file mode 100644 index 1bd8c457..00000000 --- a/node_modules/abab/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# abab [![npm version](https://badge.fury.io/js/abab.svg)](https://www.npmjs.com/package/abab) [![Build Status](https://travis-ci.org/jsdom/abab.svg?branch=master)](https://travis-ci.org/jsdom/abab) - -A JavaScript module that implements `window.atob` and `window.btoa` according the forgiving-base64 algorithm in the [Infra Standard](https://infra.spec.whatwg.org/#forgiving-base64). The original code was forked from [w3c/web-platform-tests](https://github.com/w3c/web-platform-tests/blob/master/html/webappapis/atob/base64.html). - -Compatibility: Node.js version 3+ and all major browsers. - -Install with `npm`: - -```sh -npm install abab -``` - -## API - -### `btoa` (base64 encode) - -```js -const { btoa } = require('abab'); -btoa('Hello, world!'); // 'SGVsbG8sIHdvcmxkIQ==' -``` - -### `atob` (base64 decode) - -```js -const { atob } = require('abab'); -atob('SGVsbG8sIHdvcmxkIQ=='); // 'Hello, world!' -``` - -#### Valid characters - -[Per the spec](https://html.spec.whatwg.org/multipage/webappapis.html#atob:dom-windowbase64-btoa-3), `btoa` will accept strings "containing only characters in the range `U+0000` to `U+00FF`." If passed a string with characters above `U+00FF`, `btoa` will return `null`. If `atob` is passed a string that is not base64-valid, it will also return `null`. In both cases when `null` is returned, the spec calls for throwing a `DOMException` of type `InvalidCharacterError`. - -## Browsers - -If you want to include just one of the methods to save bytes in your client-side code, you can `require` the desired module directly. - -```js -const atob = require('abab/lib/atob'); -const btoa = require('abab/lib/btoa'); -``` - ------ - -### Checklists - -If you're **submitting a PR** or **deploying to npm**, please use the [checklists in CONTRIBUTING.md](https://github.com/jsdom/abab/blob/master/CONTRIBUTING.md#checklists) - -### Remembering `atob` vs. `btoa` - -Here's a mnemonic that might be useful: if you have a plain string and want to base64 encode it, then decode it, `btoa` is what you run before (**b**efore - **b**toa), and `atob` is what you run after (**a**fter - **a**tob). diff --git a/node_modules/abab/index.d.ts b/node_modules/abab/index.d.ts deleted file mode 100644 index 665a6ade..00000000 --- a/node_modules/abab/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function atob(encodedData: string): string | null -export function btoa(stringToEncode: string): string | null diff --git a/node_modules/abab/index.js b/node_modules/abab/index.js deleted file mode 100644 index 49d5ae98..00000000 --- a/node_modules/abab/index.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -const atob = require("./lib/atob"); -const btoa = require("./lib/btoa"); - -module.exports = { - atob, - btoa -}; diff --git a/node_modules/abab/lib/atob.js b/node_modules/abab/lib/atob.js deleted file mode 100644 index 34918987..00000000 --- a/node_modules/abab/lib/atob.js +++ /dev/null @@ -1,107 +0,0 @@ -"use strict"; - -/** - * Implementation of atob() according to the HTML and Infra specs, except that - * instead of throwing INVALID_CHARACTER_ERR we return null. - */ -function atob(data) { - // Web IDL requires DOMStrings to just be converted using ECMAScript - // ToString, which in our case amounts to using a template literal. - data = `${data}`; - // "Remove all ASCII whitespace from data." - data = data.replace(/[ \t\n\f\r]/g, ""); - // "If data's length divides by 4 leaving no remainder, then: if data ends - // with one or two U+003D (=) code points, then remove them from data." - if (data.length % 4 === 0) { - data = data.replace(/==?$/, ""); - } - // "If data's length divides by 4 leaving a remainder of 1, then return - // failure." - // - // "If data contains a code point that is not one of - // - // U+002B (+) - // U+002F (/) - // ASCII alphanumeric - // - // then return failure." - if (data.length % 4 === 1 || /[^+/0-9A-Za-z]/.test(data)) { - return null; - } - // "Let output be an empty byte sequence." - let output = ""; - // "Let buffer be an empty buffer that can have bits appended to it." - // - // We append bits via left-shift and or. accumulatedBits is used to track - // when we've gotten to 24 bits. - let buffer = 0; - let accumulatedBits = 0; - // "Let position be a position variable for data, initially pointing at the - // start of data." - // - // "While position does not point past the end of data:" - for (let i = 0; i < data.length; i++) { - // "Find the code point pointed to by position in the second column of - // Table 1: The Base 64 Alphabet of RFC 4648. Let n be the number given in - // the first cell of the same row. - // - // "Append to buffer the six bits corresponding to n, most significant bit - // first." - // - // atobLookup() implements the table from RFC 4648. - buffer <<= 6; - buffer |= atobLookup(data[i]); - accumulatedBits += 6; - // "If buffer has accumulated 24 bits, interpret them as three 8-bit - // big-endian numbers. Append three bytes with values equal to those - // numbers to output, in the same order, and then empty buffer." - if (accumulatedBits === 24) { - output += String.fromCharCode((buffer & 0xff0000) >> 16); - output += String.fromCharCode((buffer & 0xff00) >> 8); - output += String.fromCharCode(buffer & 0xff); - buffer = accumulatedBits = 0; - } - // "Advance position by 1." - } - // "If buffer is not empty, it contains either 12 or 18 bits. If it contains - // 12 bits, then discard the last four and interpret the remaining eight as - // an 8-bit big-endian number. If it contains 18 bits, then discard the last - // two and interpret the remaining 16 as two 8-bit big-endian numbers. Append - // the one or two bytes with values equal to those one or two numbers to - // output, in the same order." - if (accumulatedBits === 12) { - buffer >>= 4; - output += String.fromCharCode(buffer); - } else if (accumulatedBits === 18) { - buffer >>= 2; - output += String.fromCharCode((buffer & 0xff00) >> 8); - output += String.fromCharCode(buffer & 0xff); - } - // "Return output." - return output; -} -/** - * A lookup table for atob(), which converts an ASCII character to the - * corresponding six-bit number. - */ -function atobLookup(chr) { - if (/[A-Z]/.test(chr)) { - return chr.charCodeAt(0) - "A".charCodeAt(0); - } - if (/[a-z]/.test(chr)) { - return chr.charCodeAt(0) - "a".charCodeAt(0) + 26; - } - if (/[0-9]/.test(chr)) { - return chr.charCodeAt(0) - "0".charCodeAt(0) + 52; - } - if (chr === "+") { - return 62; - } - if (chr === "/") { - return 63; - } - // Throw exception; should not be hit in tests - return undefined; -} - -module.exports = atob; diff --git a/node_modules/abab/lib/btoa.js b/node_modules/abab/lib/btoa.js deleted file mode 100644 index 85dd9667..00000000 --- a/node_modules/abab/lib/btoa.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; - -/** - * btoa() as defined by the HTML and Infra specs, which mostly just references - * RFC 4648. - */ -function btoa(s) { - let i; - // String conversion as required by Web IDL. - s = `${s}`; - // "The btoa() method must throw an "InvalidCharacterError" DOMException if - // data contains any character whose code point is greater than U+00FF." - for (i = 0; i < s.length; i++) { - if (s.charCodeAt(i) > 255) { - return null; - } - } - let out = ""; - for (i = 0; i < s.length; i += 3) { - const groupsOfSix = [undefined, undefined, undefined, undefined]; - groupsOfSix[0] = s.charCodeAt(i) >> 2; - groupsOfSix[1] = (s.charCodeAt(i) & 0x03) << 4; - if (s.length > i + 1) { - groupsOfSix[1] |= s.charCodeAt(i + 1) >> 4; - groupsOfSix[2] = (s.charCodeAt(i + 1) & 0x0f) << 2; - } - if (s.length > i + 2) { - groupsOfSix[2] |= s.charCodeAt(i + 2) >> 6; - groupsOfSix[3] = s.charCodeAt(i + 2) & 0x3f; - } - for (let j = 0; j < groupsOfSix.length; j++) { - if (typeof groupsOfSix[j] === "undefined") { - out += "="; - } else { - out += btoaLookup(groupsOfSix[j]); - } - } - } - return out; -} - -/** - * Lookup table for btoa(), which converts a six-bit number into the - * corresponding ASCII character. - */ -function btoaLookup(idx) { - if (idx < 26) { - return String.fromCharCode(idx + "A".charCodeAt(0)); - } - if (idx < 52) { - return String.fromCharCode(idx - 26 + "a".charCodeAt(0)); - } - if (idx < 62) { - return String.fromCharCode(idx - 52 + "0".charCodeAt(0)); - } - if (idx === 62) { - return "+"; - } - if (idx === 63) { - return "/"; - } - // Throw INVALID_CHARACTER_ERR exception here -- won't be hit in the tests. - return undefined; -} - -module.exports = btoa; diff --git a/node_modules/abab/package.json b/node_modules/abab/package.json deleted file mode 100644 index 4ceaba46..00000000 --- a/node_modules/abab/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_args": [ - [ - "abab@2.0.1", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "abab@2.0.1", - "_id": "abab@2.0.1", - "_inBundle": false, - "_integrity": "sha512-1zSbbCuoIjafKZ3mblY5ikvAb0ODUbqBnFuUb7f6uLeQhhGJ0vEV4ntmtxKLT2WgXCO94E07BjunsIw1jOMPZw==", - "_location": "/abab", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "abab@2.0.1", - "name": "abab", - "escapedName": "abab", - "rawSpec": "2.0.1", - "saveSpec": null, - "fetchSpec": "2.0.1" - }, - "_requiredBy": [ - "/data-urls", - "/jsdom" - ], - "_resolved": "https://registry.npmjs.org/abab/-/abab-2.0.1.tgz", - "_spec": "2.0.1", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Jeff Carpenter", - "email": "gcarpenterv@gmail.com" - }, - "bugs": { - "url": "https://github.com/jsdom/abab/issues" - }, - "description": "WHATWG spec-compliant implementations of window.atob and window.btoa.", - "devDependencies": { - "eslint": "^4.19.1", - "karma": "^2.0.0", - "karma-cli": "^1.0.1", - "karma-firefox-launcher": "^1.1.0", - "karma-mocha": "^1.3.0", - "karma-webpack": "^3.0.0", - "mocha": "^5.1.0", - "webpack": "^4.5.0" - }, - "files": [ - "index.d.ts", - "index.js", - "lib/" - ], - "homepage": "https://github.com/jsdom/abab#readme", - "keywords": [ - "atob", - "btoa", - "browser" - ], - "license": "SEE LICENSE IN LICENSE.md", - "main": "index.js", - "name": "abab", - "repository": { - "type": "git", - "url": "git+https://github.com/jsdom/abab.git" - }, - "scripts": { - "karma": "karma start", - "lint": "eslint .", - "mocha": "mocha test/node", - "test": "npm run lint && npm run mocha && npm run karma" - }, - "version": "2.0.1" -} diff --git a/node_modules/acorn-globals/LICENSE b/node_modules/acorn-globals/LICENSE deleted file mode 100644 index 27cc9f37..00000000 --- a/node_modules/acorn-globals/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014 Forbes Lindesay - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/acorn-globals/README.md b/node_modules/acorn-globals/README.md deleted file mode 100644 index 5f7326fd..00000000 --- a/node_modules/acorn-globals/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# acorn-globals - -Detect global variables in JavaScript using acorn - -[Get supported acorn-globals with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-acorn_globals?utm_source=npm-acorn-globals&utm_medium=referral&utm_campaign=readme) - -[![Build Status](https://img.shields.io/travis/ForbesLindesay/acorn-globals/master.svg)](https://travis-ci.org/ForbesLindesay/acorn-globals) -[![Dependency Status](https://img.shields.io/david/ForbesLindesay/acorn-globals.svg)](https://david-dm.org/ForbesLindesay/acorn-globals) -[![NPM version](https://img.shields.io/npm/v/acorn-globals.svg)](https://www.npmjs.org/package/acorn-globals) - -## Installation - - npm install acorn-globals - -## Usage - -detect.js - -```js -var fs = require('fs'); -var detect = require('acorn-globals'); - -var src = fs.readFileSync(__dirname + '/input.js', 'utf8'); - -var scope = detect(src); -console.dir(scope); -``` - -input.js - -```js -var x = 5; -var y = 3, z = 2; - -w.foo(); -w = 2; - -RAWR=444; -RAWR.foo(); - -BLARG=3; - -foo(function () { - var BAR = 3; - process.nextTick(function (ZZZZZZZZZZZZ) { - console.log('beep boop'); - var xyz = 4; - x += 10; - x.zzzzzz; - ZZZ=6; - }); - function doom () { - } - ZZZ.foo(); - -}); - -console.log(xyz); -``` - -output: - -``` -$ node example/detect.js -[ { name: 'BLARG', nodes: [ [Object] ] }, - { name: 'RAWR', nodes: [ [Object], [Object] ] }, - { name: 'ZZZ', nodes: [ [Object], [Object] ] }, - { name: 'console', nodes: [ [Object], [Object] ] }, - { name: 'foo', nodes: [ [Object] ] }, - { name: 'process', nodes: [ [Object] ] }, - { name: 'w', nodes: [ [Object], [Object] ] }, - { name: 'xyz', nodes: [ [Object] ] } ] -``` - -## Security contact information - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - -## License - - MIT diff --git a/node_modules/acorn-globals/index.js b/node_modules/acorn-globals/index.js deleted file mode 100644 index 1d8333b1..00000000 --- a/node_modules/acorn-globals/index.js +++ /dev/null @@ -1,179 +0,0 @@ -'use strict'; - -var acorn = require('acorn'); -var walk = require('acorn-walk'); - -function isScope(node) { - return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration' || node.type === 'ArrowFunctionExpression' || node.type === 'Program'; -} -function isBlockScope(node) { - return node.type === 'BlockStatement' || isScope(node); -} - -function declaresArguments(node) { - return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration'; -} - -function declaresThis(node) { - return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration'; -} - -function reallyParse(source, options) { - var parseOptions = Object.assign({}, options, - { - allowReturnOutsideFunction: true, - allowImportExportEverywhere: true, - allowHashBang: true - } - ); - return acorn.parse(source, parseOptions); -} -module.exports = findGlobals; -module.exports.parse = reallyParse; -function findGlobals(source, options) { - options = options || {}; - var globals = []; - var ast; - // istanbul ignore else - if (typeof source === 'string') { - ast = reallyParse(source, options); - } else { - ast = source; - } - // istanbul ignore if - if (!(ast && typeof ast === 'object' && ast.type === 'Program')) { - throw new TypeError('Source must be either a string of JavaScript or an acorn AST'); - } - var declareFunction = function (node) { - var fn = node; - fn.locals = fn.locals || Object.create(null); - node.params.forEach(function (node) { - declarePattern(node, fn); - }); - if (node.id) { - fn.locals[node.id.name] = true; - } - }; - var declareClass = function (node) { - node.locals = node.locals || Object.create(null); - if (node.id) { - node.locals[node.id.name] = true; - } - }; - var declarePattern = function (node, parent) { - switch (node.type) { - case 'Identifier': - parent.locals[node.name] = true; - break; - case 'ObjectPattern': - node.properties.forEach(function (node) { - declarePattern(node.value || node.argument, parent); - }); - break; - case 'ArrayPattern': - node.elements.forEach(function (node) { - if (node) declarePattern(node, parent); - }); - break; - case 'RestElement': - declarePattern(node.argument, parent); - break; - case 'AssignmentPattern': - declarePattern(node.left, parent); - break; - // istanbul ignore next - default: - throw new Error('Unrecognized pattern type: ' + node.type); - } - }; - var declareModuleSpecifier = function (node, parents) { - ast.locals = ast.locals || Object.create(null); - ast.locals[node.local.name] = true; - }; - walk.ancestor(ast, { - 'VariableDeclaration': function (node, parents) { - var parent = null; - for (var i = parents.length - 1; i >= 0 && parent === null; i--) { - if (node.kind === 'var' ? isScope(parents[i]) : isBlockScope(parents[i])) { - parent = parents[i]; - } - } - parent.locals = parent.locals || Object.create(null); - node.declarations.forEach(function (declaration) { - declarePattern(declaration.id, parent); - }); - }, - 'FunctionDeclaration': function (node, parents) { - var parent = null; - for (var i = parents.length - 2; i >= 0 && parent === null; i--) { - if (isScope(parents[i])) { - parent = parents[i]; - } - } - parent.locals = parent.locals || Object.create(null); - if (node.id) { - parent.locals[node.id.name] = true; - } - declareFunction(node); - }, - 'Function': declareFunction, - 'ClassDeclaration': function (node, parents) { - var parent = null; - for (var i = parents.length - 2; i >= 0 && parent === null; i--) { - if (isBlockScope(parents[i])) { - parent = parents[i]; - } - } - parent.locals = parent.locals || Object.create(null); - if (node.id) { - parent.locals[node.id.name] = true; - } - declareClass(node); - }, - 'Class': declareClass, - 'TryStatement': function (node) { - if (node.handler === null) return; - node.handler.locals = node.handler.locals || Object.create(null); - node.handler.locals[node.handler.param.name] = true; - }, - 'ImportDefaultSpecifier': declareModuleSpecifier, - 'ImportSpecifier': declareModuleSpecifier, - 'ImportNamespaceSpecifier': declareModuleSpecifier - }); - function identifier(node, parents) { - var name = node.name; - if (name === 'undefined') return; - for (var i = 0; i < parents.length; i++) { - if (name === 'arguments' && declaresArguments(parents[i])) { - return; - } - if (parents[i].locals && name in parents[i].locals) { - return; - } - } - node.parents = parents.slice(); - globals.push(node); - } - walk.ancestor(ast, { - 'VariablePattern': identifier, - 'Identifier': identifier, - 'ThisExpression': function (node, parents) { - for (var i = 0; i < parents.length; i++) { - if (declaresThis(parents[i])) { - return; - } - } - node.parents = parents.slice(); - globals.push(node); - } - }); - var groupedGlobals = Object.create(null); - globals.forEach(function (node) { - var name = node.type === 'ThisExpression' ? 'this' : node.name; - groupedGlobals[name] = (groupedGlobals[name] || []); - groupedGlobals[name].push(node); - }); - return Object.keys(groupedGlobals).sort().map(function (name) { - return {name: name, nodes: groupedGlobals[name]}; - }); -} diff --git a/node_modules/acorn-globals/node_modules/.bin/acorn b/node_modules/acorn-globals/node_modules/.bin/acorn deleted file mode 100644 index 558ebb98..00000000 --- a/node_modules/acorn-globals/node_modules/.bin/acorn +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../acorn/bin/acorn" "$@" - ret=$? -else - node "$basedir/../acorn/bin/acorn" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/acorn-globals/node_modules/.bin/acorn.cmd b/node_modules/acorn-globals/node_modules/.bin/acorn.cmd deleted file mode 100644 index 45c0c3d0..00000000 --- a/node_modules/acorn-globals/node_modules/.bin/acorn.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\acorn\bin\acorn" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\acorn\bin\acorn" %* -) \ No newline at end of file diff --git a/node_modules/acorn-globals/node_modules/acorn/CHANGELOG.md b/node_modules/acorn-globals/node_modules/acorn/CHANGELOG.md deleted file mode 100644 index 6b71c989..00000000 --- a/node_modules/acorn-globals/node_modules/acorn/CHANGELOG.md +++ /dev/null @@ -1,544 +0,0 @@ -## 6.3.0 (2019-08-12) - -### New features - -`sourceType: "module"` can now be used even when `ecmaVersion` is less than 6, to parse module-style code that otherwise conforms to an older standard. - -## 6.2.1 (2019-07-21) - -### Bug fixes - -Fix bug causing Acorn to treat some characters as identifier characters that shouldn't be treated as such. - -Fix issue where setting the `allowReserved` option to `"never"` allowed reserved words in some circumstances. - -## 6.2.0 (2019-07-04) - -### Bug fixes - -Improve valid assignment checking in `for`/`in` and `for`/`of` loops. - -Disallow binding `let` in patterns. - -### New features - -Support bigint syntax with `ecmaVersion` >= 10. - -Support dynamic `import` syntax with `ecmaVersion` >= 10. - -Upgrade to Unicode version 12. - -## 6.1.1 (2019-02-27) - -### Bug fixes - -Fix bug that caused parsing default exports of with names to fail. - -## 6.1.0 (2019-02-08) - -### Bug fixes - -Fix scope checking when redefining a `var` as a lexical binding. - -### New features - -Split up `parseSubscripts` to use an internal `parseSubscript` method to make it easier to extend with plugins. - -## 6.0.7 (2019-02-04) - -### Bug fixes - -Check that exported bindings are defined. - -Don't treat `\u180e` as a whitespace character. - -Check for duplicate parameter names in methods. - -Don't allow shorthand properties when they are generators or async methods. - -Forbid binding `await` in async arrow function's parameter list. - -## 6.0.6 (2019-01-30) - -### Bug fixes - -The content of class declarations and expressions is now always parsed in strict mode. - -Don't allow `let` or `const` to bind the variable name `let`. - -Treat class declarations as lexical. - -Don't allow a generator function declaration as the sole body of an `if` or `else`. - -Ignore `"use strict"` when after an empty statement. - -Allow string line continuations with special line terminator characters. - -Treat `for` bodies as part of the `for` scope when checking for conflicting bindings. - -Fix bug with parsing `yield` in a `for` loop initializer. - -Implement special cases around scope checking for functions. - -## 6.0.5 (2019-01-02) - -### Bug fixes - -Fix TypeScript type for `Parser.extend` and add `allowAwaitOutsideFunction` to options type. - -Don't treat `let` as a keyword when the next token is `{` on the next line. - -Fix bug that broke checking for parentheses around an object pattern in a destructuring assignment when `preserveParens` was on. - -## 6.0.4 (2018-11-05) - -### Bug fixes - -Further improvements to tokenizing regular expressions in corner cases. - -## 6.0.3 (2018-11-04) - -### Bug fixes - -Fix bug in tokenizing an expression-less return followed by a function followed by a regular expression. - -Remove stray symlink in the package tarball. - -## 6.0.2 (2018-09-26) - -### Bug fixes - -Fix bug where default expressions could fail to parse inside an object destructuring assignment expression. - -## 6.0.1 (2018-09-14) - -### Bug fixes - -Fix wrong value in `version` export. - -## 6.0.0 (2018-09-14) - -### Bug fixes - -Better handle variable-redefinition checks for catch bindings and functions directly under if statements. - -Forbid `new.target` in top-level arrow functions. - -Fix issue with parsing a regexp after `yield` in some contexts. - -### New features - -The package now comes with TypeScript definitions. - -### Breaking changes - -The default value of the `ecmaVersion` option is now 9 (2018). - -Plugins work differently, and will have to be rewritten to work with this version. - -The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`). - -## 5.7.3 (2018-09-10) - -### Bug fixes - -Fix failure to tokenize regexps after expressions like `x.of`. - -Better error message for unterminated template literals. - -## 5.7.2 (2018-08-24) - -### Bug fixes - -Properly handle `allowAwaitOutsideFunction` in for statements. - -Treat function declarations at the top level of modules like let bindings. - -Don't allow async function declarations as the only statement under a label. - -## 5.7.0 (2018-06-15) - -### New features - -Upgraded to Unicode 11. - -## 5.6.0 (2018-05-31) - -### New features - -Allow U+2028 and U+2029 in string when ECMAVersion >= 10. - -Allow binding-less catch statements when ECMAVersion >= 10. - -Add `allowAwaitOutsideFunction` option for parsing top-level `await`. - -## 5.5.3 (2018-03-08) - -### Bug fixes - -A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps. - -## 5.5.2 (2018-03-08) - -### Bug fixes - -A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0. - -## 5.5.1 (2018-03-06) - -### Bug fixes - -Fix misleading error message for octal escapes in template strings. - -## 5.5.0 (2018-02-27) - -### New features - -The identifier character categorization is now based on Unicode version 10. - -Acorn will now validate the content of regular expressions, including new ES9 features. - -## 5.4.0 (2018-02-01) - -### Bug fixes - -Disallow duplicate or escaped flags on regular expressions. - -Disallow octal escapes in strings in strict mode. - -### New features - -Add support for async iteration. - -Add support for object spread and rest. - -## 5.3.0 (2017-12-28) - -### Bug fixes - -Fix parsing of floating point literals with leading zeroes in loose mode. - -Allow duplicate property names in object patterns. - -Don't allow static class methods named `prototype`. - -Disallow async functions directly under `if` or `else`. - -Parse right-hand-side of `for`/`of` as an assignment expression. - -Stricter parsing of `for`/`in`. - -Don't allow unicode escapes in contextual keywords. - -### New features - -Parsing class members was factored into smaller methods to allow plugins to hook into it. - -## 5.2.1 (2017-10-30) - -### Bug fixes - -Fix a token context corruption bug. - -## 5.2.0 (2017-10-30) - -### Bug fixes - -Fix token context tracking for `class` and `function` in property-name position. - -Make sure `%*` isn't parsed as a valid operator. - -Allow shorthand properties `get` and `set` to be followed by default values. - -Disallow `super` when not in callee or object position. - -### New features - -Support [`directive` property](https://github.com/estree/estree/compare/b3de58c9997504d6fba04b72f76e6dd1619ee4eb...1da8e603237144f44710360f8feb7a9977e905e0) on directive expression statements. - -## 5.1.2 (2017-09-04) - -### Bug fixes - -Disable parsing of legacy HTML-style comments in modules. - -Fix parsing of async methods whose names are keywords. - -## 5.1.1 (2017-07-06) - -### Bug fixes - -Fix problem with disambiguating regexp and division after a class. - -## 5.1.0 (2017-07-05) - -### Bug fixes - -Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`. - -Parse zero-prefixed numbers with non-octal digits as decimal. - -Allow object/array patterns in rest parameters. - -Don't error when `yield` is used as a property name. - -Allow `async` as a shorthand object property. - -### New features - -Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9. - -## 5.0.3 (2017-04-01) - -### Bug fixes - -Fix spurious duplicate variable definition errors for named functions. - -## 5.0.2 (2017-03-30) - -### Bug fixes - -A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error. - -## 5.0.0 (2017-03-28) - -### Bug fixes - -Raise an error for duplicated lexical bindings. - -Fix spurious error when an assignement expression occurred after a spread expression. - -Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions. - -Allow labels in front or `var` declarations, even in strict mode. - -### Breaking changes - -Parse declarations following `export default` as declaration nodes, not expressions. This means that class and function declarations nodes can now have `null` as their `id`. - -## 4.0.11 (2017-02-07) - -### Bug fixes - -Allow all forms of member expressions to be parenthesized as lvalue. - -## 4.0.10 (2017-02-07) - -### Bug fixes - -Don't expect semicolons after default-exported functions or classes, even when they are expressions. - -Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode. - -## 4.0.9 (2017-02-06) - -### Bug fixes - -Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again. - -## 4.0.8 (2017-02-03) - -### Bug fixes - -Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet. - -## 4.0.7 (2017-02-02) - -### Bug fixes - -Accept invalidly rejected code like `(x).y = 2` again. - -Don't raise an error when a function _inside_ strict code has a non-simple parameter list. - -## 4.0.6 (2017-02-02) - -### Bug fixes - -Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check. - -## 4.0.5 (2017-02-02) - -### Bug fixes - -Disallow parenthesized pattern expressions. - -Allow keywords as export names. - -Don't allow the `async` keyword to be parenthesized. - -Properly raise an error when a keyword contains a character escape. - -Allow `"use strict"` to appear after other string literal expressions. - -Disallow labeled declarations. - -## 4.0.4 (2016-12-19) - -### Bug fixes - -Fix crash when `export` was followed by a keyword that can't be -exported. - -## 4.0.3 (2016-08-16) - -### Bug fixes - -Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode. - -Properly parse properties named `async` in ES2017 mode. - -Fix bug where reserved words were broken in ES2017 mode. - -## 4.0.2 (2016-08-11) - -### Bug fixes - -Don't ignore period or 'e' characters after octal numbers. - -Fix broken parsing for call expressions in default parameter values of arrow functions. - -## 4.0.1 (2016-08-08) - -### Bug fixes - -Fix false positives in duplicated export name errors. - -## 4.0.0 (2016-08-07) - -### Breaking changes - -The default `ecmaVersion` option value is now 7. - -A number of internal method signatures changed, so plugins might need to be updated. - -### Bug fixes - -The parser now raises errors on duplicated export names. - -`arguments` and `eval` can now be used in shorthand properties. - -Duplicate parameter names in non-simple argument lists now always produce an error. - -### New features - -The `ecmaVersion` option now also accepts year-style version numbers -(2015, etc). - -Support for `async`/`await` syntax when `ecmaVersion` is >= 8. - -Support for trailing commas in call expressions when `ecmaVersion` is >= 8. - -## 3.3.0 (2016-07-25) - -### Bug fixes - -Fix bug in tokenizing of regexp operator after a function declaration. - -Fix parser crash when parsing an array pattern with a hole. - -### New features - -Implement check against complex argument lists in functions that enable strict mode in ES7. - -## 3.2.0 (2016-06-07) - -### Bug fixes - -Improve handling of lack of unicode regexp support in host -environment. - -Properly reject shorthand properties whose name is a keyword. - -### New features - -Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object. - -## 3.1.0 (2016-04-18) - -### Bug fixes - -Properly tokenize the division operator directly after a function expression. - -Allow trailing comma in destructuring arrays. - -## 3.0.4 (2016-02-25) - -### Fixes - -Allow update expressions as left-hand-side of the ES7 exponential operator. - -## 3.0.2 (2016-02-10) - -### Fixes - -Fix bug that accidentally made `undefined` a reserved word when parsing ES7. - -## 3.0.0 (2016-02-10) - -### Breaking changes - -The default value of the `ecmaVersion` option is now 6 (used to be 5). - -Support for comprehension syntax (which was dropped from the draft spec) has been removed. - -### Fixes - -`let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code. - -A parenthesized class or function expression after `export default` is now parsed correctly. - -### New features - -When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`). - -The identifier character ranges are now based on Unicode 8.0.0. - -Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled. - -## 2.7.0 (2016-01-04) - -### Fixes - -Stop allowing rest parameters in setters. - -Disallow `y` rexexp flag in ES5. - -Disallow `\00` and `\000` escapes in strict mode. - -Raise an error when an import name is a reserved word. - -## 2.6.2 (2015-11-10) - -### Fixes - -Don't crash when no options object is passed. - -## 2.6.0 (2015-11-09) - -### Fixes - -Add `await` as a reserved word in module sources. - -Disallow `yield` in a parameter default value for a generator. - -Forbid using a comma after a rest pattern in an array destructuring. - -### New features - -Support parsing stdin in command-line tool. - -## 2.5.0 (2015-10-27) - -### Fixes - -Fix tokenizer support in the command-line tool. - -Stop allowing `new.target` outside of functions. - -Remove legacy `guard` and `guardedHandler` properties from try nodes. - -Stop allowing multiple `__proto__` properties on an object literal in strict mode. - -Don't allow rest parameters to be non-identifier patterns. - -Check for duplicate paramter names in arrow functions. diff --git a/node_modules/acorn-globals/node_modules/acorn/LICENSE b/node_modules/acorn-globals/node_modules/acorn/LICENSE deleted file mode 100644 index 2c0632b6..00000000 --- a/node_modules/acorn-globals/node_modules/acorn/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2012-2018 by various contributors (see AUTHORS) - -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/acorn-globals/node_modules/acorn/README.md b/node_modules/acorn-globals/node_modules/acorn/README.md deleted file mode 100644 index bcf85ccb..00000000 --- a/node_modules/acorn-globals/node_modules/acorn/README.md +++ /dev/null @@ -1,269 +0,0 @@ -# Acorn - -A tiny, fast JavaScript parser written in JavaScript. - -## Community - -Acorn is open source software released under an -[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE). - -You are welcome to -[report bugs](https://github.com/acornjs/acorn/issues) or create pull -requests on [github](https://github.com/acornjs/acorn). For questions -and discussion, please use the -[Tern discussion forum](https://discuss.ternjs.net). - -## Installation - -The easiest way to install acorn is from [`npm`](https://www.npmjs.com/): - -```sh -npm install acorn -``` - -Alternately, you can download the source and build acorn yourself: - -```sh -git clone https://github.com/acornjs/acorn.git -cd acorn -npm install -``` - -## Interface - -**parse**`(input, options)` is the main interface to the library. The -`input` parameter is a string, `options` can be undefined or an object -setting some of the options listed below. The return value will be an -abstract syntax tree object as specified by the [ESTree -spec](https://github.com/estree/estree). - -```javascript -let acorn = require("acorn"); -console.log(acorn.parse("1 + 1")); -``` - -When encountering a syntax error, the parser will raise a -`SyntaxError` object with a meaningful message. The error object will -have a `pos` property that indicates the string offset at which the -error occurred, and a `loc` object that contains a `{line, column}` -object referring to that same position. - -Options can be provided by passing a second argument, which should be -an object containing any of these fields: - -- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be - either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018) or 10 (2019, partial - support). This influences support for strict mode, the set of - reserved words, and support for new syntax features. Default is 9. - - **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being - implemented by Acorn. Other proposed new features can be implemented - through plugins. - -- **sourceType**: Indicate the mode the code should be parsed in. Can be - either `"script"` or `"module"`. This influences global strict mode - and parsing of `import` and `export` declarations. - - **NOTE**: If set to `"module"`, then static `import` / `export` syntax - will be valid, even if `ecmaVersion` is less than 6. - -- **onInsertedSemicolon**: If given a callback, that callback will be - called whenever a missing semicolon is inserted by the parser. The - callback will be given the character offset of the point where the - semicolon is inserted as argument, and if `locations` is on, also a - `{line, column}` object representing this position. - -- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing - commas. - -- **allowReserved**: If `false`, using a reserved word will generate - an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher - versions. When given the value `"never"`, reserved words and - keywords can also not be used as property names (as in Internet - Explorer's old parser). - -- **allowReturnOutsideFunction**: By default, a return statement at - the top level raises an error. Set this to `true` to accept such - code. - -- **allowImportExportEverywhere**: By default, `import` and `export` - declarations can only appear at a program's top level. Setting this - option to `true` allows them anywhere where a statement is allowed. - -- **allowAwaitOutsideFunction**: By default, `await` expressions can - only appear inside `async` functions. Setting this option to - `true` allows to have top-level `await` expressions. They are - still not allowed in non-`async` functions, though. - -- **allowHashBang**: When this is enabled (off by default), if the - code starts with the characters `#!` (as in a shellscript), the - first line will be treated as a comment. - -- **locations**: When `true`, each node has a `loc` object attached - with `start` and `end` subobjects, each of which contains the - one-based line and zero-based column numbers in `{line, column}` - form. Default is `false`. - -- **onToken**: If a function is passed for this option, each found - token will be passed in same format as tokens returned from - `tokenizer().getToken()`. - - If array is passed, each found token is pushed to it. - - Note that you are not allowed to call the parser from the - callback—that will corrupt its internal state. - -- **onComment**: If a function is passed for this option, whenever a - comment is encountered the function will be called with the - following parameters: - - - `block`: `true` if the comment is a block comment, false if it - is a line comment. - - `text`: The content of the comment. - - `start`: Character offset of the start of the comment. - - `end`: Character offset of the end of the comment. - - When the `locations` options is on, the `{line, column}` locations - of the comment’s start and end are passed as two additional - parameters. - - If array is passed for this option, each found comment is pushed - to it as object in Esprima format: - - ```javascript - { - "type": "Line" | "Block", - "value": "comment text", - "start": Number, - "end": Number, - // If `locations` option is on: - "loc": { - "start": {line: Number, column: Number} - "end": {line: Number, column: Number} - }, - // If `ranges` option is on: - "range": [Number, Number] - } - ``` - - Note that you are not allowed to call the parser from the - callback—that will corrupt its internal state. - -- **ranges**: Nodes have their start and end characters offsets - recorded in `start` and `end` properties (directly on the node, - rather than the `loc` object, which holds line/column data. To also - add a - [semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678) - `range` property holding a `[start, end]` array with the same - numbers, set the `ranges` option to `true`. - -- **program**: It is possible to parse multiple files into a single - AST by passing the tree produced by parsing the first file as the - `program` option in subsequent parses. This will add the toplevel - forms of the parsed file to the "Program" (top) node of an existing - parse tree. - -- **sourceFile**: When the `locations` option is `true`, you can pass - this option to add a `source` attribute in every node’s `loc` - object. Note that the contents of this option are not examined or - processed in any way; you are free to use whatever format you - choose. - -- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property - will be added (regardless of the `location` option) directly to the - nodes, rather than the `loc` object. - -- **preserveParens**: If this option is `true`, parenthesized expressions - are represented by (non-standard) `ParenthesizedExpression` nodes - that have a single `expression` property containing the expression - inside parentheses. - -**parseExpressionAt**`(input, offset, options)` will parse a single -expression in a string, and return its AST. It will not complain if -there is more of the string left after the expression. - -**tokenizer**`(input, options)` returns an object with a `getToken` -method that can be called repeatedly to get the next token, a `{start, -end, type, value}` object (with added `loc` property when the -`locations` option is enabled and `range` property when the `ranges` -option is enabled). When the token's type is `tokTypes.eof`, you -should stop calling the method, since it will keep returning that same -token forever. - -In ES6 environment, returned result can be used as any other -protocol-compliant iterable: - -```javascript -for (let token of acorn.tokenizer(str)) { - // iterate over the tokens -} - -// transform code to array of tokens: -var tokens = [...acorn.tokenizer(str)]; -``` - -**tokTypes** holds an object mapping names to the token type objects -that end up in the `type` properties of tokens. - -**getLineInfo**`(input, offset)` can be used to get a `{line, -column}` object for a given program string and offset. - -### The `Parser` class - -Instances of the **`Parser`** class contain all the state and logic -that drives a parse. It has static methods `parse`, -`parseExpressionAt`, and `tokenizer` that match the top-level -functions by the same name. - -When extending the parser with plugins, you need to call these methods -on the extended version of the class. To extend a parser with plugins, -you can use its static `extend` method. - -```javascript -var acorn = require("acorn"); -var jsx = require("acorn-jsx"); -var JSXParser = acorn.Parser.extend(jsx()); -JSXParser.parse("foo()"); -``` - -The `extend` method takes any number of plugin values, and returns a -new `Parser` class that includes the extra parser logic provided by -the plugins. - -## Command line interface - -The `bin/acorn` utility can be used to parse a file from the command -line. It accepts as arguments its input file and the following -options: - -- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version - to parse. Default is version 9. - -- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise. - -- `--locations`: Attaches a "loc" object to each node with "start" and - "end" subobjects, each of which contains the one-based line and - zero-based column numbers in `{line, column}` form. - -- `--allow-hash-bang`: If the code starts with the characters #! (as - in a shellscript), the first line will be treated as a comment. - -- `--compact`: No whitespace is used in the AST output. - -- `--silent`: Do not output the AST, just return the exit status. - -- `--help`: Print the usage information and quit. - -The utility spits out the syntax tree as JSON data. - -## Existing plugins - - - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx) - -Plugins for ECMAScript proposals: - - - [`acorn-stage3`](https://github.com/acornjs/acorn-stage3): Parse most stage 3 proposals, bundling: - - [`acorn-class-fields`](https://github.com/acornjs/acorn-class-fields): Parse [class fields proposal](https://github.com/tc39/proposal-class-fields) - - [`acorn-import-meta`](https://github.com/acornjs/acorn-import-meta): Parse [import.meta proposal](https://github.com/tc39/proposal-import-meta) - - [`acorn-numeric-separator`](https://github.com/acornjs/acorn-numeric-separator): Parse [numeric separator proposal](https://github.com/tc39/proposal-numeric-separator) - - [`acorn-private-methods`](https://github.com/acornjs/acorn-private-methods): parse [private methods, getters and setters proposal](https://github.com/tc39/proposal-private-methods)n diff --git a/node_modules/acorn-globals/node_modules/acorn/bin/acorn b/node_modules/acorn-globals/node_modules/acorn/bin/acorn deleted file mode 100644 index cf7df468..00000000 --- a/node_modules/acorn-globals/node_modules/acorn/bin/acorn +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -require('../dist/bin.js'); diff --git a/node_modules/acorn-globals/node_modules/acorn/dist/acorn.d.ts b/node_modules/acorn-globals/node_modules/acorn/dist/acorn.d.ts deleted file mode 100644 index c68e2391..00000000 --- a/node_modules/acorn-globals/node_modules/acorn/dist/acorn.d.ts +++ /dev/null @@ -1,209 +0,0 @@ -export as namespace acorn -export = acorn - -declare namespace acorn { - function parse(input: string, options?: Options): Node - - function parseExpressionAt(input: string, pos?: number, options?: Options): Node - - function tokenizer(input: string, options?: Options): { - getToken(): Token - [Symbol.iterator](): Iterator - } - - interface Options { - ecmaVersion?: 3 | 5 | 6 | 7 | 8 | 9 | 10 | 2015 | 2016 | 2017 | 2018 | 2019 - sourceType?: 'script' | 'module' - onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void - onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void - allowReserved?: boolean | 'never' - allowReturnOutsideFunction?: boolean - allowImportExportEverywhere?: boolean - allowAwaitOutsideFunction?: boolean - allowHashBang?: boolean - locations?: boolean - onToken?: ((token: Token) => any) | Token[] - onComment?: (( - isBlock: boolean, text: string, start: number, end: number, startLoc?: Position, - endLoc?: Position - ) => void) | Comment[] - ranges?: boolean - program?: Node - sourceFile?: string - directSourceFile?: string - preserveParens?: boolean - } - - class Parser { - constructor(options: Options, input: string, startPos?: number) - parse(this: Parser): Node - static parse(this: typeof Parser, input: string, options?: Options): Node - static parseExpressionAt(this: typeof Parser, input: string, pos: number, options?: Options): Node - static tokenizer(this: typeof Parser, input: string, options?: Options): { - getToken(): Token - [Symbol.iterator](): Iterator - } - static extend(this: typeof Parser, ...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser - } - - interface Position { line: number; column: number; offset: number } - - const defaultOptions: Options - - function getLineInfo(input: string, offset: number): Position - - class SourceLocation { - start: Position - end: Position - source?: string | null - constructor(p: Parser, start: Position, end: Position) - } - - class Node { - type: string - start: number - end: number - loc?: SourceLocation - sourceFile?: string - range?: [number, number] - constructor(parser: Parser, pos: number, loc?: SourceLocation) - } - - class TokenType { - label: string - keyword: string - beforeExpr: boolean - startsExpr: boolean - isLoop: boolean - isAssign: boolean - prefix: boolean - postfix: boolean - binop: number - updateContext?: (prevType: TokenType) => void - constructor(label: string, conf?: any) - } - - const tokTypes: { - num: TokenType - regexp: TokenType - string: TokenType - name: TokenType - eof: TokenType - bracketL: TokenType - bracketR: TokenType - braceL: TokenType - braceR: TokenType - parenL: TokenType - parenR: TokenType - comma: TokenType - semi: TokenType - colon: TokenType - dot: TokenType - question: TokenType - arrow: TokenType - template: TokenType - ellipsis: TokenType - backQuote: TokenType - dollarBraceL: TokenType - eq: TokenType - assign: TokenType - incDec: TokenType - prefix: TokenType - logicalOR: TokenType - logicalAND: TokenType - bitwiseOR: TokenType - bitwiseXOR: TokenType - bitwiseAND: TokenType - equality: TokenType - relational: TokenType - bitShift: TokenType - plusMin: TokenType - modulo: TokenType - star: TokenType - slash: TokenType - starstar: TokenType - _break: TokenType - _case: TokenType - _catch: TokenType - _continue: TokenType - _debugger: TokenType - _default: TokenType - _do: TokenType - _else: TokenType - _finally: TokenType - _for: TokenType - _function: TokenType - _if: TokenType - _return: TokenType - _switch: TokenType - _throw: TokenType - _try: TokenType - _var: TokenType - _const: TokenType - _while: TokenType - _with: TokenType - _new: TokenType - _this: TokenType - _super: TokenType - _class: TokenType - _extends: TokenType - _export: TokenType - _import: TokenType - _null: TokenType - _true: TokenType - _false: TokenType - _in: TokenType - _instanceof: TokenType - _typeof: TokenType - _void: TokenType - _delete: TokenType - } - - class TokContext { - constructor(token: string, isExpr: boolean, preserveSpace: boolean, override?: (p: Parser) => void) - } - - const tokContexts: { - b_stat: TokContext - b_expr: TokContext - b_tmpl: TokContext - p_stat: TokContext - p_expr: TokContext - q_tmpl: TokContext - f_expr: TokContext - } - - function isIdentifierStart(code: number, astral?: boolean): boolean - - function isIdentifierChar(code: number, astral?: boolean): boolean - - interface AbstractToken { - } - - interface Comment extends AbstractToken { - type: string - value: string - start: number - end: number - loc?: SourceLocation - range?: [number, number] - } - - class Token { - type: TokenType - value: any - start: number - end: number - loc?: SourceLocation - range?: [number, number] - constructor(p: Parser) - } - - function isNewLine(code: number): boolean - - const lineBreak: RegExp - - const lineBreakG: RegExp - - const version: string -} diff --git a/node_modules/acorn-globals/node_modules/acorn/dist/acorn.js b/node_modules/acorn-globals/node_modules/acorn/dist/acorn.js deleted file mode 100644 index c67f80b5..00000000 --- a/node_modules/acorn-globals/node_modules/acorn/dist/acorn.js +++ /dev/null @@ -1,4968 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = global || self, factory(global.acorn = {})); -}(this, function (exports) { 'use strict'; - - // Reserved word lists for various dialects of the language - - var reservedWords = { - 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", - 5: "class enum extends super const export import", - 6: "enum", - strict: "implements interface let package private protected public static yield", - strictBind: "eval arguments" - }; - - // And the keywords - - var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; - - var keywords = { - 5: ecma5AndLessKeywords, - "5module": ecma5AndLessKeywords + " export import", - 6: ecma5AndLessKeywords + " const class extends export import super" - }; - - var keywordRelationalOperator = /^in(stanceof)?$/; - - // ## Character categories - - // Big ugly regular expressions that match characters in the - // whitespace, identifier, and identifier-start categories. These - // are only applied when a character is found to actually have a - // code point above 128. - // Generated by `bin/generate-identifier-regex.js`. - var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7c6\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab67\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; - var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; - - var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); - var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - - nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - - // These are a run-length and offset encoded representation of the - // >0xffff code points that are a valid part of identifiers. The - // offset starts at 0x10000, and each pair of numbers represents an - // offset to the next range, and then a size of the range. They were - // generated by bin/generate-identifier-regex.js - - // eslint-disable-next-line comma-spacing - var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541]; - - // eslint-disable-next-line comma-spacing - var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239]; - - // This has a complexity linear to the value of the code. The - // assumption is that looking up astral identifier characters is - // rare. - function isInAstralSet(code, set) { - var pos = 0x10000; - for (var i = 0; i < set.length; i += 2) { - pos += set[i]; - if (pos > code) { return false } - pos += set[i + 1]; - if (pos >= code) { return true } - } - } - - // Test whether a given character code starts an identifier. - - function isIdentifierStart(code, astral) { - if (code < 65) { return code === 36 } - if (code < 91) { return true } - if (code < 97) { return code === 95 } - if (code < 123) { return true } - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) } - if (astral === false) { return false } - return isInAstralSet(code, astralIdentifierStartCodes) - } - - // Test whether a given character is part of an identifier. - - function isIdentifierChar(code, astral) { - if (code < 48) { return code === 36 } - if (code < 58) { return true } - if (code < 65) { return false } - if (code < 91) { return true } - if (code < 97) { return code === 95 } - if (code < 123) { return true } - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) } - if (astral === false) { return false } - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) - } - - // ## Token types - - // The assignment of fine-grained, information-carrying type objects - // allows the tokenizer to store the information it has about a - // token in a way that is very cheap for the parser to look up. - - // All token type variables start with an underscore, to make them - // easy to recognize. - - // The `beforeExpr` property is used to disambiguate between regular - // expressions and divisions. It is set on all token types that can - // be followed by an expression (thus, a slash after them would be a - // regular expression). - // - // The `startsExpr` property is used to check if the token ends a - // `yield` expression. It is set on all token types that either can - // directly start an expression (like a quotation mark) or can - // continue an expression (like the body of a string). - // - // `isLoop` marks a keyword as starting a loop, which is important - // to know when parsing a label, in order to allow or disallow - // continue jumps to that label. - - var TokenType = function TokenType(label, conf) { - if ( conf === void 0 ) conf = {}; - - this.label = label; - this.keyword = conf.keyword; - this.beforeExpr = !!conf.beforeExpr; - this.startsExpr = !!conf.startsExpr; - this.isLoop = !!conf.isLoop; - this.isAssign = !!conf.isAssign; - this.prefix = !!conf.prefix; - this.postfix = !!conf.postfix; - this.binop = conf.binop || null; - this.updateContext = null; - }; - - function binop(name, prec) { - return new TokenType(name, {beforeExpr: true, binop: prec}) - } - var beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true}; - - // Map keyword names to token types. - - var keywords$1 = {}; - - // Succinct definitions of keyword token types - function kw(name, options) { - if ( options === void 0 ) options = {}; - - options.keyword = name; - return keywords$1[name] = new TokenType(name, options) - } - - var types = { - num: new TokenType("num", startsExpr), - regexp: new TokenType("regexp", startsExpr), - string: new TokenType("string", startsExpr), - name: new TokenType("name", startsExpr), - eof: new TokenType("eof"), - - // Punctuation token types. - bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), - bracketR: new TokenType("]"), - braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), - braceR: new TokenType("}"), - parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), - parenR: new TokenType(")"), - comma: new TokenType(",", beforeExpr), - semi: new TokenType(";", beforeExpr), - colon: new TokenType(":", beforeExpr), - dot: new TokenType("."), - question: new TokenType("?", beforeExpr), - arrow: new TokenType("=>", beforeExpr), - template: new TokenType("template"), - invalidTemplate: new TokenType("invalidTemplate"), - ellipsis: new TokenType("...", beforeExpr), - backQuote: new TokenType("`", startsExpr), - dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), - - // Operators. These carry several kinds of properties to help the - // parser use them properly (the presence of these properties is - // what categorizes them as operators). - // - // `binop`, when present, specifies that this operator is a binary - // operator, and will refer to its precedence. - // - // `prefix` and `postfix` mark the operator as a prefix or postfix - // unary operator. - // - // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as - // binary operators with a very low precedence, that should result - // in AssignmentExpression nodes. - - eq: new TokenType("=", {beforeExpr: true, isAssign: true}), - assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), - incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), - prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}), - logicalOR: binop("||", 1), - logicalAND: binop("&&", 2), - bitwiseOR: binop("|", 3), - bitwiseXOR: binop("^", 4), - bitwiseAND: binop("&", 5), - equality: binop("==/!=/===/!==", 6), - relational: binop("/<=/>=", 7), - bitShift: binop("<>/>>>", 8), - plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), - modulo: binop("%", 10), - star: binop("*", 10), - slash: binop("/", 10), - starstar: new TokenType("**", {beforeExpr: true}), - - // Keyword token types. - _break: kw("break"), - _case: kw("case", beforeExpr), - _catch: kw("catch"), - _continue: kw("continue"), - _debugger: kw("debugger"), - _default: kw("default", beforeExpr), - _do: kw("do", {isLoop: true, beforeExpr: true}), - _else: kw("else", beforeExpr), - _finally: kw("finally"), - _for: kw("for", {isLoop: true}), - _function: kw("function", startsExpr), - _if: kw("if"), - _return: kw("return", beforeExpr), - _switch: kw("switch"), - _throw: kw("throw", beforeExpr), - _try: kw("try"), - _var: kw("var"), - _const: kw("const"), - _while: kw("while", {isLoop: true}), - _with: kw("with"), - _new: kw("new", {beforeExpr: true, startsExpr: true}), - _this: kw("this", startsExpr), - _super: kw("super", startsExpr), - _class: kw("class", startsExpr), - _extends: kw("extends", beforeExpr), - _export: kw("export"), - _import: kw("import", startsExpr), - _null: kw("null", startsExpr), - _true: kw("true", startsExpr), - _false: kw("false", startsExpr), - _in: kw("in", {beforeExpr: true, binop: 7}), - _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), - _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), - _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), - _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) - }; - - // Matches a whole line break (where CRLF is considered a single - // line break). Used to count lines. - - var lineBreak = /\r\n?|\n|\u2028|\u2029/; - var lineBreakG = new RegExp(lineBreak.source, "g"); - - function isNewLine(code, ecma2019String) { - return code === 10 || code === 13 || (!ecma2019String && (code === 0x2028 || code === 0x2029)) - } - - var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; - - var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; - - var ref = Object.prototype; - var hasOwnProperty = ref.hasOwnProperty; - var toString = ref.toString; - - // Checks if an object has a property. - - function has(obj, propName) { - return hasOwnProperty.call(obj, propName) - } - - var isArray = Array.isArray || (function (obj) { return ( - toString.call(obj) === "[object Array]" - ); }); - - function wordsRegexp(words) { - return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$") - } - - // These are used when `options.locations` is on, for the - // `startLoc` and `endLoc` properties. - - var Position = function Position(line, col) { - this.line = line; - this.column = col; - }; - - Position.prototype.offset = function offset (n) { - return new Position(this.line, this.column + n) - }; - - var SourceLocation = function SourceLocation(p, start, end) { - this.start = start; - this.end = end; - if (p.sourceFile !== null) { this.source = p.sourceFile; } - }; - - // The `getLineInfo` function is mostly useful when the - // `locations` option is off (for performance reasons) and you - // want to find the line/column position for a given character - // offset. `input` should be the code string that the offset refers - // into. - - function getLineInfo(input, offset) { - for (var line = 1, cur = 0;;) { - lineBreakG.lastIndex = cur; - var match = lineBreakG.exec(input); - if (match && match.index < offset) { - ++line; - cur = match.index + match[0].length; - } else { - return new Position(line, offset - cur) - } - } - } - - // A second optional argument can be given to further configure - // the parser process. These options are recognized: - - var defaultOptions = { - // `ecmaVersion` indicates the ECMAScript version to parse. Must be - // either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10 - // (2019). This influences support for strict mode, the set of - // reserved words, and support for new syntax features. The default - // is 9. - ecmaVersion: 9, - // `sourceType` indicates the mode the code should be parsed in. - // Can be either `"script"` or `"module"`. This influences global - // strict mode and parsing of `import` and `export` declarations. - sourceType: "script", - // `onInsertedSemicolon` can be a callback that will be called - // when a semicolon is automatically inserted. It will be passed - // the position of the comma as an offset, and if `locations` is - // enabled, it is given the location as a `{line, column}` object - // as second argument. - onInsertedSemicolon: null, - // `onTrailingComma` is similar to `onInsertedSemicolon`, but for - // trailing commas. - onTrailingComma: null, - // By default, reserved words are only enforced if ecmaVersion >= 5. - // Set `allowReserved` to a boolean value to explicitly turn this on - // an off. When this option has the value "never", reserved words - // and keywords can also not be used as property names. - allowReserved: null, - // When enabled, a return at the top level is not considered an - // error. - allowReturnOutsideFunction: false, - // When enabled, import/export statements are not constrained to - // appearing at the top of the program. - allowImportExportEverywhere: false, - // When enabled, await identifiers are allowed to appear at the top-level scope, - // but they are still not allowed in non-async functions. - allowAwaitOutsideFunction: false, - // When enabled, hashbang directive in the beginning of file - // is allowed and treated as a line comment. - allowHashBang: false, - // When `locations` is on, `loc` properties holding objects with - // `start` and `end` properties in `{line, column}` form (with - // line being 1-based and column 0-based) will be attached to the - // nodes. - locations: false, - // A function can be passed as `onToken` option, which will - // cause Acorn to call that function with object in the same - // format as tokens returned from `tokenizer().getToken()`. Note - // that you are not allowed to call the parser from the - // callback—that will corrupt its internal state. - onToken: null, - // A function can be passed as `onComment` option, which will - // cause Acorn to call that function with `(block, text, start, - // end)` parameters whenever a comment is skipped. `block` is a - // boolean indicating whether this is a block (`/* */`) comment, - // `text` is the content of the comment, and `start` and `end` are - // character offsets that denote the start and end of the comment. - // When the `locations` option is on, two more parameters are - // passed, the full `{line, column}` locations of the start and - // end of the comments. Note that you are not allowed to call the - // parser from the callback—that will corrupt its internal state. - onComment: null, - // Nodes have their start and end characters offsets recorded in - // `start` and `end` properties (directly on the node, rather than - // the `loc` object, which holds line/column data. To also add a - // [semi-standardized][range] `range` property holding a `[start, - // end]` array with the same numbers, set the `ranges` option to - // `true`. - // - // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - ranges: false, - // It is possible to parse multiple files into a single AST by - // passing the tree produced by parsing the first file as - // `program` option in subsequent parses. This will add the - // toplevel forms of the parsed file to the `Program` (top) node - // of an existing parse tree. - program: null, - // When `locations` is on, you can pass this to record the source - // file in every node's `loc` object. - sourceFile: null, - // This value, if given, is stored in every node, whether - // `locations` is on or off. - directSourceFile: null, - // When enabled, parenthesized expressions are represented by - // (non-standard) ParenthesizedExpression nodes - preserveParens: false - }; - - // Interpret and default an options object - - function getOptions(opts) { - var options = {}; - - for (var opt in defaultOptions) - { options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]; } - - if (options.ecmaVersion >= 2015) - { options.ecmaVersion -= 2009; } - - if (options.allowReserved == null) - { options.allowReserved = options.ecmaVersion < 5; } - - if (isArray(options.onToken)) { - var tokens = options.onToken; - options.onToken = function (token) { return tokens.push(token); }; - } - if (isArray(options.onComment)) - { options.onComment = pushComment(options, options.onComment); } - - return options - } - - function pushComment(options, array) { - return function(block, text, start, end, startLoc, endLoc) { - var comment = { - type: block ? "Block" : "Line", - value: text, - start: start, - end: end - }; - if (options.locations) - { comment.loc = new SourceLocation(this, startLoc, endLoc); } - if (options.ranges) - { comment.range = [start, end]; } - array.push(comment); - } - } - - // Each scope gets a bitset that may contain these flags - var - SCOPE_TOP = 1, - SCOPE_FUNCTION = 2, - SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION, - SCOPE_ASYNC = 4, - SCOPE_GENERATOR = 8, - SCOPE_ARROW = 16, - SCOPE_SIMPLE_CATCH = 32, - SCOPE_SUPER = 64, - SCOPE_DIRECT_SUPER = 128; - - function functionFlags(async, generator) { - return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0) - } - - // Used in checkLVal and declareName to determine the type of a binding - var - BIND_NONE = 0, // Not a binding - BIND_VAR = 1, // Var-style binding - BIND_LEXICAL = 2, // Let- or const-style binding - BIND_FUNCTION = 3, // Function declaration - BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding - BIND_OUTSIDE = 5; // Special case for function names as bound inside the function - - var Parser = function Parser(options, input, startPos) { - this.options = options = getOptions(options); - this.sourceFile = options.sourceFile; - this.keywords = wordsRegexp(keywords[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]); - var reserved = ""; - if (options.allowReserved !== true) { - for (var v = options.ecmaVersion;; v--) - { if (reserved = reservedWords[v]) { break } } - if (options.sourceType === "module") { reserved += " await"; } - } - this.reservedWords = wordsRegexp(reserved); - var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; - this.reservedWordsStrict = wordsRegexp(reservedStrict); - this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); - this.input = String(input); - - // Used to signal to callers of `readWord1` whether the word - // contained any escape sequences. This is needed because words with - // escape sequences must not be interpreted as keywords. - this.containsEsc = false; - - // Set up token state - - // The current position of the tokenizer in the input. - if (startPos) { - this.pos = startPos; - this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; - this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; - } else { - this.pos = this.lineStart = 0; - this.curLine = 1; - } - - // Properties of the current token: - // Its type - this.type = types.eof; - // For tokens that include more information than their type, the value - this.value = null; - // Its start and end offset - this.start = this.end = this.pos; - // And, if locations are used, the {line, column} object - // corresponding to those offsets - this.startLoc = this.endLoc = this.curPosition(); - - // Position information for the previous token - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - this.context = this.initialContext(); - this.exprAllowed = true; - - // Figure out if it's a module code. - this.inModule = options.sourceType === "module"; - this.strict = this.inModule || this.strictDirective(this.pos); - - // Used to signify the start of a potential arrow function - this.potentialArrowAt = -1; - - // Positions to delayed-check that yield/await does not exist in default parameters. - this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; - // Labels in scope. - this.labels = []; - // Thus-far undefined exports. - this.undefinedExports = {}; - - // If enabled, skip leading hashbang line. - if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") - { this.skipLineComment(2); } - - // Scope tracking for duplicate variable names (see scope.js) - this.scopeStack = []; - this.enterScope(SCOPE_TOP); - - // For RegExp validation - this.regexpState = null; - }; - - var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true } }; - - Parser.prototype.parse = function parse () { - var node = this.options.program || this.startNode(); - this.nextToken(); - return this.parseTopLevel(node) - }; - - prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }; - prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 }; - prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 }; - prototypeAccessors.allowSuper.get = function () { return (this.currentThisScope().flags & SCOPE_SUPER) > 0 }; - prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }; - prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) }; - - // Switch to a getter for 7.0.0. - Parser.prototype.inNonArrowFunction = function inNonArrowFunction () { return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0 }; - - Parser.extend = function extend () { - var plugins = [], len = arguments.length; - while ( len-- ) plugins[ len ] = arguments[ len ]; - - var cls = this; - for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); } - return cls - }; - - Parser.parse = function parse (input, options) { - return new this(options, input).parse() - }; - - Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) { - var parser = new this(options, input, pos); - parser.nextToken(); - return parser.parseExpression() - }; - - Parser.tokenizer = function tokenizer (input, options) { - return new this(options, input) - }; - - Object.defineProperties( Parser.prototype, prototypeAccessors ); - - var pp = Parser.prototype; - - // ## Parser utilities - - var literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/; - pp.strictDirective = function(start) { - for (;;) { - // Try to find string literal. - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this.input)[0].length; - var match = literal.exec(this.input.slice(start)); - if (!match) { return false } - if ((match[1] || match[2]) === "use strict") { return true } - start += match[0].length; - - // Skip semicolon, if any. - skipWhiteSpace.lastIndex = start; - start += skipWhiteSpace.exec(this.input)[0].length; - if (this.input[start] === ";") - { start++; } - } - }; - - // Predicate that tests whether the next token is of the given - // type, and if yes, consumes it as a side effect. - - pp.eat = function(type) { - if (this.type === type) { - this.next(); - return true - } else { - return false - } - }; - - // Tests whether parsed token is a contextual keyword. - - pp.isContextual = function(name) { - return this.type === types.name && this.value === name && !this.containsEsc - }; - - // Consumes contextual keyword if possible. - - pp.eatContextual = function(name) { - if (!this.isContextual(name)) { return false } - this.next(); - return true - }; - - // Asserts that following token is given contextual keyword. - - pp.expectContextual = function(name) { - if (!this.eatContextual(name)) { this.unexpected(); } - }; - - // Test whether a semicolon can be inserted at the current position. - - pp.canInsertSemicolon = function() { - return this.type === types.eof || - this.type === types.braceR || - lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) - }; - - pp.insertSemicolon = function() { - if (this.canInsertSemicolon()) { - if (this.options.onInsertedSemicolon) - { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } - return true - } - }; - - // Consume a semicolon, or, failing that, see if we are allowed to - // pretend that there is a semicolon at this position. - - pp.semicolon = function() { - if (!this.eat(types.semi) && !this.insertSemicolon()) { this.unexpected(); } - }; - - pp.afterTrailingComma = function(tokType, notNext) { - if (this.type === tokType) { - if (this.options.onTrailingComma) - { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } - if (!notNext) - { this.next(); } - return true - } - }; - - // Expect a token of a given type. If found, consume it, otherwise, - // raise an unexpected token error. - - pp.expect = function(type) { - this.eat(type) || this.unexpected(); - }; - - // Raise an unexpected token error. - - pp.unexpected = function(pos) { - this.raise(pos != null ? pos : this.start, "Unexpected token"); - }; - - function DestructuringErrors() { - this.shorthandAssign = - this.trailingComma = - this.parenthesizedAssign = - this.parenthesizedBind = - this.doubleProto = - -1; - } - - pp.checkPatternErrors = function(refDestructuringErrors, isAssign) { - if (!refDestructuringErrors) { return } - if (refDestructuringErrors.trailingComma > -1) - { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } - var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; - if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); } - }; - - pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { - if (!refDestructuringErrors) { return false } - var shorthandAssign = refDestructuringErrors.shorthandAssign; - var doubleProto = refDestructuringErrors.doubleProto; - if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 } - if (shorthandAssign >= 0) - { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } - if (doubleProto >= 0) - { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } - }; - - pp.checkYieldAwaitInDefaultParams = function() { - if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) - { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } - if (this.awaitPos) - { this.raise(this.awaitPos, "Await expression cannot be a default value"); } - }; - - pp.isSimpleAssignTarget = function(expr) { - if (expr.type === "ParenthesizedExpression") - { return this.isSimpleAssignTarget(expr.expression) } - return expr.type === "Identifier" || expr.type === "MemberExpression" - }; - - var pp$1 = Parser.prototype; - - // ### Statement parsing - - // Parse a program. Initializes the parser, reads any number of - // statements, and wraps them in a Program node. Optionally takes a - // `program` argument. If present, the statements will be appended - // to its body instead of creating a new node. - - pp$1.parseTopLevel = function(node) { - var exports = {}; - if (!node.body) { node.body = []; } - while (this.type !== types.eof) { - var stmt = this.parseStatement(null, true, exports); - node.body.push(stmt); - } - if (this.inModule) - { for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) - { - var name = list[i]; - - this.raiseRecoverable(this.undefinedExports[name].start, ("Export '" + name + "' is not defined")); - } } - this.adaptDirectivePrologue(node.body); - this.next(); - node.sourceType = this.options.sourceType; - return this.finishNode(node, "Program") - }; - - var loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}; - - pp$1.isLet = function(context) { - if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false } - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); - // For ambiguous cases, determine if a LexicalDeclaration (or only a - // Statement) is allowed here. If context is not empty then only a Statement - // is allowed. However, `let [` is an explicit negative lookahead for - // ExpressionStatement, so special-case it first. - if (nextCh === 91) { return true } // '[' - if (context) { return false } - - if (nextCh === 123) { return true } // '{' - if (isIdentifierStart(nextCh, true)) { - var pos = next + 1; - while (isIdentifierChar(this.input.charCodeAt(pos), true)) { ++pos; } - var ident = this.input.slice(next, pos); - if (!keywordRelationalOperator.test(ident)) { return true } - } - return false - }; - - // check 'async [no LineTerminator here] function' - // - 'async /*foo*/ function' is OK. - // - 'async /*\n*/ function' is invalid. - pp$1.isAsyncFunction = function() { - if (this.options.ecmaVersion < 8 || !this.isContextual("async")) - { return false } - - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length; - return !lineBreak.test(this.input.slice(this.pos, next)) && - this.input.slice(next, next + 8) === "function" && - (next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8))) - }; - - // Parse a single statement. - // - // If expecting a statement and finding a slash operator, parse a - // regular expression literal. This is to handle cases like - // `if (foo) /blah/.exec(foo)`, where looking at the previous token - // does not help. - - pp$1.parseStatement = function(context, topLevel, exports) { - var starttype = this.type, node = this.startNode(), kind; - - if (this.isLet(context)) { - starttype = types._var; - kind = "let"; - } - - // Most types of statements are recognized by the keyword they - // start with. Many are trivial to parse, some require a bit of - // complexity. - - switch (starttype) { - case types._break: case types._continue: return this.parseBreakContinueStatement(node, starttype.keyword) - case types._debugger: return this.parseDebuggerStatement(node) - case types._do: return this.parseDoStatement(node) - case types._for: return this.parseForStatement(node) - case types._function: - // Function as sole body of either an if statement or a labeled statement - // works, but not when it is part of a labeled statement that is the sole - // body of an if statement. - if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); } - return this.parseFunctionStatement(node, false, !context) - case types._class: - if (context) { this.unexpected(); } - return this.parseClass(node, true) - case types._if: return this.parseIfStatement(node) - case types._return: return this.parseReturnStatement(node) - case types._switch: return this.parseSwitchStatement(node) - case types._throw: return this.parseThrowStatement(node) - case types._try: return this.parseTryStatement(node) - case types._const: case types._var: - kind = kind || this.value; - if (context && kind !== "var") { this.unexpected(); } - return this.parseVarStatement(node, kind) - case types._while: return this.parseWhileStatement(node) - case types._with: return this.parseWithStatement(node) - case types.braceL: return this.parseBlock(true, node) - case types.semi: return this.parseEmptyStatement(node) - case types._export: - case types._import: - if (this.options.ecmaVersion > 10 && starttype === types._import) { - skipWhiteSpace.lastIndex = this.pos; - var skip = skipWhiteSpace.exec(this.input); - var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); - if (nextCh === 40) // '(' - { return this.parseExpressionStatement(node, this.parseExpression()) } - } - - if (!this.options.allowImportExportEverywhere) { - if (!topLevel) - { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } - if (!this.inModule) - { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } - } - return starttype === types._import ? this.parseImport(node) : this.parseExport(node, exports) - - // If the statement does not start with a statement keyword or a - // brace, it's an ExpressionStatement or LabeledStatement. We - // simply start parsing an expression, and afterwards, if the - // next token is a colon and the expression was a simple - // Identifier node, we switch to interpreting it as a label. - default: - if (this.isAsyncFunction()) { - if (context) { this.unexpected(); } - this.next(); - return this.parseFunctionStatement(node, true, !context) - } - - var maybeName = this.value, expr = this.parseExpression(); - if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) - { return this.parseLabeledStatement(node, maybeName, expr, context) } - else { return this.parseExpressionStatement(node, expr) } - } - }; - - pp$1.parseBreakContinueStatement = function(node, keyword) { - var isBreak = keyword === "break"; - this.next(); - if (this.eat(types.semi) || this.insertSemicolon()) { node.label = null; } - else if (this.type !== types.name) { this.unexpected(); } - else { - node.label = this.parseIdent(); - this.semicolon(); - } - - // Verify that there is an actual destination to break or - // continue to. - var i = 0; - for (; i < this.labels.length; ++i) { - var lab = this.labels[i]; - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) { break } - if (node.label && isBreak) { break } - } - } - if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") - }; - - pp$1.parseDebuggerStatement = function(node) { - this.next(); - this.semicolon(); - return this.finishNode(node, "DebuggerStatement") - }; - - pp$1.parseDoStatement = function(node) { - this.next(); - this.labels.push(loopLabel); - node.body = this.parseStatement("do"); - this.labels.pop(); - this.expect(types._while); - node.test = this.parseParenExpression(); - if (this.options.ecmaVersion >= 6) - { this.eat(types.semi); } - else - { this.semicolon(); } - return this.finishNode(node, "DoWhileStatement") - }; - - // Disambiguating between a `for` and a `for`/`in` or `for`/`of` - // loop is non-trivial. Basically, we have to parse the init `var` - // statement or expression, disallowing the `in` operator (see - // the second parameter to `parseExpression`), and then check - // whether the next token is `in` or `of`. When there is no init - // part (semicolon immediately after the opening parenthesis), it - // is a regular `for` loop. - - pp$1.parseForStatement = function(node) { - this.next(); - var awaitAt = (this.options.ecmaVersion >= 9 && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction)) && this.eatContextual("await")) ? this.lastTokStart : -1; - this.labels.push(loopLabel); - this.enterScope(0); - this.expect(types.parenL); - if (this.type === types.semi) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, null) - } - var isLet = this.isLet(); - if (this.type === types._var || this.type === types._const || isLet) { - var init$1 = this.startNode(), kind = isLet ? "let" : this.value; - this.next(); - this.parseVar(init$1, true, kind); - this.finishNode(init$1, "VariableDeclaration"); - if ((this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types._in) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - } else { node.await = awaitAt > -1; } - } - return this.parseForIn(node, init$1) - } - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, init$1) - } - var refDestructuringErrors = new DestructuringErrors; - var init = this.parseExpression(true, refDestructuringErrors); - if (this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { - if (this.options.ecmaVersion >= 9) { - if (this.type === types._in) { - if (awaitAt > -1) { this.unexpected(awaitAt); } - } else { node.await = awaitAt > -1; } - } - this.toAssignable(init, false, refDestructuringErrors); - this.checkLVal(init); - return this.parseForIn(node, init) - } else { - this.checkExpressionErrors(refDestructuringErrors, true); - } - if (awaitAt > -1) { this.unexpected(awaitAt); } - return this.parseFor(node, init) - }; - - pp$1.parseFunctionStatement = function(node, isAsync, declarationPosition) { - this.next(); - return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync) - }; - - pp$1.parseIfStatement = function(node) { - this.next(); - node.test = this.parseParenExpression(); - // allow function declarations in branches, but only in non-strict mode - node.consequent = this.parseStatement("if"); - node.alternate = this.eat(types._else) ? this.parseStatement("if") : null; - return this.finishNode(node, "IfStatement") - }; - - pp$1.parseReturnStatement = function(node) { - if (!this.inFunction && !this.options.allowReturnOutsideFunction) - { this.raise(this.start, "'return' outside of function"); } - this.next(); - - // In `return` (and `break`/`continue`), the keywords with - // optional arguments, we eagerly look for a semicolon or the - // possibility to insert one. - - if (this.eat(types.semi) || this.insertSemicolon()) { node.argument = null; } - else { node.argument = this.parseExpression(); this.semicolon(); } - return this.finishNode(node, "ReturnStatement") - }; - - pp$1.parseSwitchStatement = function(node) { - this.next(); - node.discriminant = this.parseParenExpression(); - node.cases = []; - this.expect(types.braceL); - this.labels.push(switchLabel); - this.enterScope(0); - - // Statements under must be grouped (by label) in SwitchCase - // nodes. `cur` is used to keep the node that we are currently - // adding statements to. - - var cur; - for (var sawDefault = false; this.type !== types.braceR;) { - if (this.type === types._case || this.type === types._default) { - var isCase = this.type === types._case; - if (cur) { this.finishNode(cur, "SwitchCase"); } - node.cases.push(cur = this.startNode()); - cur.consequent = []; - this.next(); - if (isCase) { - cur.test = this.parseExpression(); - } else { - if (sawDefault) { this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); } - sawDefault = true; - cur.test = null; - } - this.expect(types.colon); - } else { - if (!cur) { this.unexpected(); } - cur.consequent.push(this.parseStatement(null)); - } - } - this.exitScope(); - if (cur) { this.finishNode(cur, "SwitchCase"); } - this.next(); // Closing brace - this.labels.pop(); - return this.finishNode(node, "SwitchStatement") - }; - - pp$1.parseThrowStatement = function(node) { - this.next(); - if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) - { this.raise(this.lastTokEnd, "Illegal newline after throw"); } - node.argument = this.parseExpression(); - this.semicolon(); - return this.finishNode(node, "ThrowStatement") - }; - - // Reused empty array added for node fields that are always empty. - - var empty = []; - - pp$1.parseTryStatement = function(node) { - this.next(); - node.block = this.parseBlock(); - node.handler = null; - if (this.type === types._catch) { - var clause = this.startNode(); - this.next(); - if (this.eat(types.parenL)) { - clause.param = this.parseBindingAtom(); - var simple = clause.param.type === "Identifier"; - this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); - this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); - this.expect(types.parenR); - } else { - if (this.options.ecmaVersion < 10) { this.unexpected(); } - clause.param = null; - this.enterScope(0); - } - clause.body = this.parseBlock(false); - this.exitScope(); - node.handler = this.finishNode(clause, "CatchClause"); - } - node.finalizer = this.eat(types._finally) ? this.parseBlock() : null; - if (!node.handler && !node.finalizer) - { this.raise(node.start, "Missing catch or finally clause"); } - return this.finishNode(node, "TryStatement") - }; - - pp$1.parseVarStatement = function(node, kind) { - this.next(); - this.parseVar(node, false, kind); - this.semicolon(); - return this.finishNode(node, "VariableDeclaration") - }; - - pp$1.parseWhileStatement = function(node) { - this.next(); - node.test = this.parseParenExpression(); - this.labels.push(loopLabel); - node.body = this.parseStatement("while"); - this.labels.pop(); - return this.finishNode(node, "WhileStatement") - }; - - pp$1.parseWithStatement = function(node) { - if (this.strict) { this.raise(this.start, "'with' in strict mode"); } - this.next(); - node.object = this.parseParenExpression(); - node.body = this.parseStatement("with"); - return this.finishNode(node, "WithStatement") - }; - - pp$1.parseEmptyStatement = function(node) { - this.next(); - return this.finishNode(node, "EmptyStatement") - }; - - pp$1.parseLabeledStatement = function(node, maybeName, expr, context) { - for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1) - { - var label = list[i$1]; - - if (label.name === maybeName) - { this.raise(expr.start, "Label '" + maybeName + "' is already declared"); - } } - var kind = this.type.isLoop ? "loop" : this.type === types._switch ? "switch" : null; - for (var i = this.labels.length - 1; i >= 0; i--) { - var label$1 = this.labels[i]; - if (label$1.statementStart === node.start) { - // Update information about previous labels on this node - label$1.statementStart = this.start; - label$1.kind = kind; - } else { break } - } - this.labels.push({name: maybeName, kind: kind, statementStart: this.start}); - node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); - this.labels.pop(); - node.label = expr; - return this.finishNode(node, "LabeledStatement") - }; - - pp$1.parseExpressionStatement = function(node, expr) { - node.expression = expr; - this.semicolon(); - return this.finishNode(node, "ExpressionStatement") - }; - - // Parse a semicolon-enclosed block of statements, handling `"use - // strict"` declarations when `allowStrict` is true (used for - // function bodies). - - pp$1.parseBlock = function(createNewLexicalScope, node) { - if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; - if ( node === void 0 ) node = this.startNode(); - - node.body = []; - this.expect(types.braceL); - if (createNewLexicalScope) { this.enterScope(0); } - while (!this.eat(types.braceR)) { - var stmt = this.parseStatement(null); - node.body.push(stmt); - } - if (createNewLexicalScope) { this.exitScope(); } - return this.finishNode(node, "BlockStatement") - }; - - // Parse a regular `for` loop. The disambiguation code in - // `parseStatement` will already have parsed the init statement or - // expression. - - pp$1.parseFor = function(node, init) { - node.init = init; - this.expect(types.semi); - node.test = this.type === types.semi ? null : this.parseExpression(); - this.expect(types.semi); - node.update = this.type === types.parenR ? null : this.parseExpression(); - this.expect(types.parenR); - node.body = this.parseStatement("for"); - this.exitScope(); - this.labels.pop(); - return this.finishNode(node, "ForStatement") - }; - - // Parse a `for`/`in` and `for`/`of` loop, which are almost - // same from parser's perspective. - - pp$1.parseForIn = function(node, init) { - var isForIn = this.type === types._in; - this.next(); - - if ( - init.type === "VariableDeclaration" && - init.declarations[0].init != null && - ( - !isForIn || - this.options.ecmaVersion < 8 || - this.strict || - init.kind !== "var" || - init.declarations[0].id.type !== "Identifier" - ) - ) { - this.raise( - init.start, - ((isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer") - ); - } else if (init.type === "AssignmentPattern") { - this.raise(init.start, "Invalid left-hand side in for-loop"); - } - node.left = init; - node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); - this.expect(types.parenR); - node.body = this.parseStatement("for"); - this.exitScope(); - this.labels.pop(); - return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement") - }; - - // Parse a list of variable declarations. - - pp$1.parseVar = function(node, isFor, kind) { - node.declarations = []; - node.kind = kind; - for (;;) { - var decl = this.startNode(); - this.parseVarId(decl, kind); - if (this.eat(types.eq)) { - decl.init = this.parseMaybeAssign(isFor); - } else if (kind === "const" && !(this.type === types._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) { - this.unexpected(); - } else if (decl.id.type !== "Identifier" && !(isFor && (this.type === types._in || this.isContextual("of")))) { - this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); - } else { - decl.init = null; - } - node.declarations.push(this.finishNode(decl, "VariableDeclarator")); - if (!this.eat(types.comma)) { break } - } - return node - }; - - pp$1.parseVarId = function(decl, kind) { - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); - }; - - var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4; - - // Parse a function declaration or literal (depending on the - // `statement & FUNC_STATEMENT`). - - // Remove `allowExpressionBody` for 7.0.0, as it is only called with false - pp$1.parseFunction = function(node, statement, allowExpressionBody, isAsync) { - this.initFunction(node); - if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { - if (this.type === types.star && (statement & FUNC_HANGING_STATEMENT)) - { this.unexpected(); } - node.generator = this.eat(types.star); - } - if (this.options.ecmaVersion >= 8) - { node.async = !!isAsync; } - - if (statement & FUNC_STATEMENT) { - node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types.name ? null : this.parseIdent(); - if (node.id && !(statement & FUNC_HANGING_STATEMENT)) - // If it is a regular function declaration in sloppy mode, then it is - // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding - // mode depends on properties of the current scope (see - // treatFunctionsAsVar). - { this.checkLVal(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } - } - - var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - this.enterScope(functionFlags(node.async, node.generator)); - - if (!(statement & FUNC_STATEMENT)) - { node.id = this.type === types.name ? this.parseIdent() : null; } - - this.parseFunctionParams(node); - this.parseFunctionBody(node, allowExpressionBody, false); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression") - }; - - pp$1.parseFunctionParams = function(node) { - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); - }; - - // Parse a class declaration or literal (depending on the - // `isStatement` parameter). - - pp$1.parseClass = function(node, isStatement) { - this.next(); - - // ecma-262 14.6 Class Definitions - // A class definition is always strict mode code. - var oldStrict = this.strict; - this.strict = true; - - this.parseClassId(node, isStatement); - this.parseClassSuper(node); - var classBody = this.startNode(); - var hadConstructor = false; - classBody.body = []; - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - var element = this.parseClassElement(node.superClass !== null); - if (element) { - classBody.body.push(element); - if (element.type === "MethodDefinition" && element.kind === "constructor") { - if (hadConstructor) { this.raise(element.start, "Duplicate constructor in the same class"); } - hadConstructor = true; - } - } - } - node.body = this.finishNode(classBody, "ClassBody"); - this.strict = oldStrict; - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") - }; - - pp$1.parseClassElement = function(constructorAllowsSuper) { - var this$1 = this; - - if (this.eat(types.semi)) { return null } - - var method = this.startNode(); - var tryContextual = function (k, noLineBreak) { - if ( noLineBreak === void 0 ) noLineBreak = false; - - var start = this$1.start, startLoc = this$1.startLoc; - if (!this$1.eatContextual(k)) { return false } - if (this$1.type !== types.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) { return true } - if (method.key) { this$1.unexpected(); } - method.computed = false; - method.key = this$1.startNodeAt(start, startLoc); - method.key.name = k; - this$1.finishNode(method.key, "Identifier"); - return false - }; - - method.kind = "method"; - method.static = tryContextual("static"); - var isGenerator = this.eat(types.star); - var isAsync = false; - if (!isGenerator) { - if (this.options.ecmaVersion >= 8 && tryContextual("async", true)) { - isAsync = true; - isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); - } else if (tryContextual("get")) { - method.kind = "get"; - } else if (tryContextual("set")) { - method.kind = "set"; - } - } - if (!method.key) { this.parsePropertyName(method); } - var key = method.key; - var allowsDirectSuper = false; - if (!method.computed && !method.static && (key.type === "Identifier" && key.name === "constructor" || - key.type === "Literal" && key.value === "constructor")) { - if (method.kind !== "method") { this.raise(key.start, "Constructor can't have get/set modifier"); } - if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } - if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } - method.kind = "constructor"; - allowsDirectSuper = constructorAllowsSuper; - } else if (method.static && key.type === "Identifier" && key.name === "prototype") { - this.raise(key.start, "Classes may not have a static property named prototype"); - } - this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper); - if (method.kind === "get" && method.value.params.length !== 0) - { this.raiseRecoverable(method.value.start, "getter should have no params"); } - if (method.kind === "set" && method.value.params.length !== 1) - { this.raiseRecoverable(method.value.start, "setter should have exactly one param"); } - if (method.kind === "set" && method.value.params[0].type === "RestElement") - { this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params"); } - return method - }; - - pp$1.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { - method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); - return this.finishNode(method, "MethodDefinition") - }; - - pp$1.parseClassId = function(node, isStatement) { - if (this.type === types.name) { - node.id = this.parseIdent(); - if (isStatement) - { this.checkLVal(node.id, BIND_LEXICAL, false); } - } else { - if (isStatement === true) - { this.unexpected(); } - node.id = null; - } - }; - - pp$1.parseClassSuper = function(node) { - node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null; - }; - - // Parses module export declaration. - - pp$1.parseExport = function(node, exports) { - this.next(); - // export * from '...' - if (this.eat(types.star)) { - this.expectContextual("from"); - if (this.type !== types.string) { this.unexpected(); } - node.source = this.parseExprAtom(); - this.semicolon(); - return this.finishNode(node, "ExportAllDeclaration") - } - if (this.eat(types._default)) { // export default ... - this.checkExport(exports, "default", this.lastTokStart); - var isAsync; - if (this.type === types._function || (isAsync = this.isAsyncFunction())) { - var fNode = this.startNode(); - this.next(); - if (isAsync) { this.next(); } - node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync); - } else if (this.type === types._class) { - var cNode = this.startNode(); - node.declaration = this.parseClass(cNode, "nullableID"); - } else { - node.declaration = this.parseMaybeAssign(); - this.semicolon(); - } - return this.finishNode(node, "ExportDefaultDeclaration") - } - // export var|const|let|function|class ... - if (this.shouldParseExportStatement()) { - node.declaration = this.parseStatement(null); - if (node.declaration.type === "VariableDeclaration") - { this.checkVariableExport(exports, node.declaration.declarations); } - else - { this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); } - node.specifiers = []; - node.source = null; - } else { // export { x, y as z } [from '...'] - node.declaration = null; - node.specifiers = this.parseExportSpecifiers(exports); - if (this.eatContextual("from")) { - if (this.type !== types.string) { this.unexpected(); } - node.source = this.parseExprAtom(); - } else { - for (var i = 0, list = node.specifiers; i < list.length; i += 1) { - // check for keywords used as local names - var spec = list[i]; - - this.checkUnreserved(spec.local); - // check if export is defined - this.checkLocalExport(spec.local); - } - - node.source = null; - } - this.semicolon(); - } - return this.finishNode(node, "ExportNamedDeclaration") - }; - - pp$1.checkExport = function(exports, name, pos) { - if (!exports) { return } - if (has(exports, name)) - { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } - exports[name] = true; - }; - - pp$1.checkPatternExport = function(exports, pat) { - var type = pat.type; - if (type === "Identifier") - { this.checkExport(exports, pat.name, pat.start); } - else if (type === "ObjectPattern") - { for (var i = 0, list = pat.properties; i < list.length; i += 1) - { - var prop = list[i]; - - this.checkPatternExport(exports, prop); - } } - else if (type === "ArrayPattern") - { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { - var elt = list$1[i$1]; - - if (elt) { this.checkPatternExport(exports, elt); } - } } - else if (type === "Property") - { this.checkPatternExport(exports, pat.value); } - else if (type === "AssignmentPattern") - { this.checkPatternExport(exports, pat.left); } - else if (type === "RestElement") - { this.checkPatternExport(exports, pat.argument); } - else if (type === "ParenthesizedExpression") - { this.checkPatternExport(exports, pat.expression); } - }; - - pp$1.checkVariableExport = function(exports, decls) { - if (!exports) { return } - for (var i = 0, list = decls; i < list.length; i += 1) - { - var decl = list[i]; - - this.checkPatternExport(exports, decl.id); - } - }; - - pp$1.shouldParseExportStatement = function() { - return this.type.keyword === "var" || - this.type.keyword === "const" || - this.type.keyword === "class" || - this.type.keyword === "function" || - this.isLet() || - this.isAsyncFunction() - }; - - // Parses a comma-separated list of module exports. - - pp$1.parseExportSpecifiers = function(exports) { - var nodes = [], first = true; - // export { x, y as z } [from '...'] - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - if (!first) { - this.expect(types.comma); - if (this.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var node = this.startNode(); - node.local = this.parseIdent(true); - node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local; - this.checkExport(exports, node.exported.name, node.exported.start); - nodes.push(this.finishNode(node, "ExportSpecifier")); - } - return nodes - }; - - // Parses import declaration. - - pp$1.parseImport = function(node) { - this.next(); - // import '...' - if (this.type === types.string) { - node.specifiers = empty; - node.source = this.parseExprAtom(); - } else { - node.specifiers = this.parseImportSpecifiers(); - this.expectContextual("from"); - node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected(); - } - this.semicolon(); - return this.finishNode(node, "ImportDeclaration") - }; - - // Parses a comma-separated list of module imports. - - pp$1.parseImportSpecifiers = function() { - var nodes = [], first = true; - if (this.type === types.name) { - // import defaultObj, { x, y as z } from '...' - var node = this.startNode(); - node.local = this.parseIdent(); - this.checkLVal(node.local, BIND_LEXICAL); - nodes.push(this.finishNode(node, "ImportDefaultSpecifier")); - if (!this.eat(types.comma)) { return nodes } - } - if (this.type === types.star) { - var node$1 = this.startNode(); - this.next(); - this.expectContextual("as"); - node$1.local = this.parseIdent(); - this.checkLVal(node$1.local, BIND_LEXICAL); - nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")); - return nodes - } - this.expect(types.braceL); - while (!this.eat(types.braceR)) { - if (!first) { - this.expect(types.comma); - if (this.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var node$2 = this.startNode(); - node$2.imported = this.parseIdent(true); - if (this.eatContextual("as")) { - node$2.local = this.parseIdent(); - } else { - this.checkUnreserved(node$2.imported); - node$2.local = node$2.imported; - } - this.checkLVal(node$2.local, BIND_LEXICAL); - nodes.push(this.finishNode(node$2, "ImportSpecifier")); - } - return nodes - }; - - // Set `ExpressionStatement#directive` property for directive prologues. - pp$1.adaptDirectivePrologue = function(statements) { - for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { - statements[i].directive = statements[i].expression.raw.slice(1, -1); - } - }; - pp$1.isDirectiveCandidate = function(statement) { - return ( - statement.type === "ExpressionStatement" && - statement.expression.type === "Literal" && - typeof statement.expression.value === "string" && - // Reject parenthesized strings. - (this.input[statement.start] === "\"" || this.input[statement.start] === "'") - ) - }; - - var pp$2 = Parser.prototype; - - // Convert existing expression atom to assignable pattern - // if possible. - - pp$2.toAssignable = function(node, isBinding, refDestructuringErrors) { - if (this.options.ecmaVersion >= 6 && node) { - switch (node.type) { - case "Identifier": - if (this.inAsync && node.name === "await") - { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } - break - - case "ObjectPattern": - case "ArrayPattern": - case "RestElement": - break - - case "ObjectExpression": - node.type = "ObjectPattern"; - if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - for (var i = 0, list = node.properties; i < list.length; i += 1) { - var prop = list[i]; - - this.toAssignable(prop, isBinding); - // Early error: - // AssignmentRestProperty[Yield, Await] : - // `...` DestructuringAssignmentTarget[Yield, Await] - // - // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. - if ( - prop.type === "RestElement" && - (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") - ) { - this.raise(prop.argument.start, "Unexpected token"); - } - } - break - - case "Property": - // AssignmentProperty has type === "Property" - if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } - this.toAssignable(node.value, isBinding); - break - - case "ArrayExpression": - node.type = "ArrayPattern"; - if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - this.toAssignableList(node.elements, isBinding); - break - - case "SpreadElement": - node.type = "RestElement"; - this.toAssignable(node.argument, isBinding); - if (node.argument.type === "AssignmentPattern") - { this.raise(node.argument.start, "Rest elements cannot have a default value"); } - break - - case "AssignmentExpression": - if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } - node.type = "AssignmentPattern"; - delete node.operator; - this.toAssignable(node.left, isBinding); - // falls through to AssignmentPattern - - case "AssignmentPattern": - break - - case "ParenthesizedExpression": - this.toAssignable(node.expression, isBinding, refDestructuringErrors); - break - - case "MemberExpression": - if (!isBinding) { break } - - default: - this.raise(node.start, "Assigning to rvalue"); - } - } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } - return node - }; - - // Convert list of expression atoms to binding list. - - pp$2.toAssignableList = function(exprList, isBinding) { - var end = exprList.length; - for (var i = 0; i < end; i++) { - var elt = exprList[i]; - if (elt) { this.toAssignable(elt, isBinding); } - } - if (end) { - var last = exprList[end - 1]; - if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") - { this.unexpected(last.argument.start); } - } - return exprList - }; - - // Parses spread element. - - pp$2.parseSpread = function(refDestructuringErrors) { - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssign(false, refDestructuringErrors); - return this.finishNode(node, "SpreadElement") - }; - - pp$2.parseRestBinding = function() { - var node = this.startNode(); - this.next(); - - // RestElement inside of a function parameter must be an identifier - if (this.options.ecmaVersion === 6 && this.type !== types.name) - { this.unexpected(); } - - node.argument = this.parseBindingAtom(); - - return this.finishNode(node, "RestElement") - }; - - // Parses lvalue (assignable) atom. - - pp$2.parseBindingAtom = function() { - if (this.options.ecmaVersion >= 6) { - switch (this.type) { - case types.bracketL: - var node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(types.bracketR, true, true); - return this.finishNode(node, "ArrayPattern") - - case types.braceL: - return this.parseObj(true) - } - } - return this.parseIdent() - }; - - pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma) { - var elts = [], first = true; - while (!this.eat(close)) { - if (first) { first = false; } - else { this.expect(types.comma); } - if (allowEmpty && this.type === types.comma) { - elts.push(null); - } else if (allowTrailingComma && this.afterTrailingComma(close)) { - break - } else if (this.type === types.ellipsis) { - var rest = this.parseRestBinding(); - this.parseBindingListItem(rest); - elts.push(rest); - if (this.type === types.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } - this.expect(close); - break - } else { - var elem = this.parseMaybeDefault(this.start, this.startLoc); - this.parseBindingListItem(elem); - elts.push(elem); - } - } - return elts - }; - - pp$2.parseBindingListItem = function(param) { - return param - }; - - // Parses assignment pattern around given atom if possible. - - pp$2.parseMaybeDefault = function(startPos, startLoc, left) { - left = left || this.parseBindingAtom(); - if (this.options.ecmaVersion < 6 || !this.eat(types.eq)) { return left } - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentPattern") - }; - - // Verify that a node is an lval — something that can be assigned - // to. - // bindingType can be either: - // 'var' indicating that the lval creates a 'var' binding - // 'let' indicating that the lval creates a lexical ('let' or 'const') binding - // 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references - - pp$2.checkLVal = function(expr, bindingType, checkClashes) { - if ( bindingType === void 0 ) bindingType = BIND_NONE; - - switch (expr.type) { - case "Identifier": - if (bindingType === BIND_LEXICAL && expr.name === "let") - { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); } - if (this.strict && this.reservedWordsStrictBind.test(expr.name)) - { this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } - if (checkClashes) { - if (has(checkClashes, expr.name)) - { this.raiseRecoverable(expr.start, "Argument name clash"); } - checkClashes[expr.name] = true; - } - if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } - break - - case "MemberExpression": - if (bindingType) { this.raiseRecoverable(expr.start, "Binding member expression"); } - break - - case "ObjectPattern": - for (var i = 0, list = expr.properties; i < list.length; i += 1) - { - var prop = list[i]; - - this.checkLVal(prop, bindingType, checkClashes); - } - break - - case "Property": - // AssignmentProperty has type === "Property" - this.checkLVal(expr.value, bindingType, checkClashes); - break - - case "ArrayPattern": - for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { - var elem = list$1[i$1]; - - if (elem) { this.checkLVal(elem, bindingType, checkClashes); } - } - break - - case "AssignmentPattern": - this.checkLVal(expr.left, bindingType, checkClashes); - break - - case "RestElement": - this.checkLVal(expr.argument, bindingType, checkClashes); - break - - case "ParenthesizedExpression": - this.checkLVal(expr.expression, bindingType, checkClashes); - break - - default: - this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue"); - } - }; - - // A recursive descent parser operates by defining functions for all - - var pp$3 = Parser.prototype; - - // Check if property name clashes with already added. - // Object/class getters and setters are not allowed to clash — - // either with each other or with an init property — and in - // strict mode, init properties are also not allowed to be repeated. - - pp$3.checkPropClash = function(prop, propHash, refDestructuringErrors) { - if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") - { return } - if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) - { return } - var key = prop.key; - var name; - switch (key.type) { - case "Identifier": name = key.name; break - case "Literal": name = String(key.value); break - default: return - } - var kind = prop.kind; - if (this.options.ecmaVersion >= 6) { - if (name === "__proto__" && kind === "init") { - if (propHash.proto) { - if (refDestructuringErrors && refDestructuringErrors.doubleProto < 0) { refDestructuringErrors.doubleProto = key.start; } - // Backwards-compat kludge. Can be removed in version 6.0 - else { this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); } - } - propHash.proto = true; - } - return - } - name = "$" + name; - var other = propHash[name]; - if (other) { - var redefinition; - if (kind === "init") { - redefinition = this.strict && other.init || other.get || other.set; - } else { - redefinition = other.init || other[kind]; - } - if (redefinition) - { this.raiseRecoverable(key.start, "Redefinition of property"); } - } else { - other = propHash[name] = { - init: false, - get: false, - set: false - }; - } - other[kind] = true; - }; - - // ### Expression parsing - - // These nest, from the most general expression type at the top to - // 'atomic', nondivisible expression types at the bottom. Most of - // the functions will simply let the function(s) below them parse, - // and, *if* the syntactic construct they handle is present, wrap - // the AST node that the inner parser gave them in another node. - - // Parse a full expression. The optional arguments are used to - // forbid the `in` operator (in for loops initalization expressions) - // and provide reference for storing '=' operator inside shorthand - // property assignment in contexts where both object expression - // and object pattern might appear (so it's possible to raise - // delayed syntax error at correct position). - - pp$3.parseExpression = function(noIn, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeAssign(noIn, refDestructuringErrors); - if (this.type === types.comma) { - var node = this.startNodeAt(startPos, startLoc); - node.expressions = [expr]; - while (this.eat(types.comma)) { node.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors)); } - return this.finishNode(node, "SequenceExpression") - } - return expr - }; - - // Parse an assignment expression. This includes applications of - // operators like `+=`. - - pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { - if (this.isContextual("yield")) { - if (this.inGenerator) { return this.parseYield(noIn) } - // The tokenizer will assume an expression is allowed after - // `yield`, but this isn't that kind of yield - else { this.exprAllowed = false; } - } - - var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldShorthandAssign = -1; - if (refDestructuringErrors) { - oldParenAssign = refDestructuringErrors.parenthesizedAssign; - oldTrailingComma = refDestructuringErrors.trailingComma; - oldShorthandAssign = refDestructuringErrors.shorthandAssign; - refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.shorthandAssign = -1; - } else { - refDestructuringErrors = new DestructuringErrors; - ownDestructuringErrors = true; - } - - var startPos = this.start, startLoc = this.startLoc; - if (this.type === types.parenL || this.type === types.name) - { this.potentialArrowAt = this.start; } - var left = this.parseMaybeConditional(noIn, refDestructuringErrors); - if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } - if (this.type.isAssign) { - var node = this.startNodeAt(startPos, startLoc); - node.operator = this.value; - node.left = this.type === types.eq ? this.toAssignable(left, false, refDestructuringErrors) : left; - if (!ownDestructuringErrors) { DestructuringErrors.call(refDestructuringErrors); } - refDestructuringErrors.shorthandAssign = -1; // reset because shorthand default was used correctly - this.checkLVal(left); - this.next(); - node.right = this.parseMaybeAssign(noIn); - return this.finishNode(node, "AssignmentExpression") - } else { - if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } - } - if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } - if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } - if (oldShorthandAssign > -1) { refDestructuringErrors.shorthandAssign = oldShorthandAssign; } - return left - }; - - // Parse a ternary conditional (`?:`) operator. - - pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprOps(noIn, refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - if (this.eat(types.question)) { - var node = this.startNodeAt(startPos, startLoc); - node.test = expr; - node.consequent = this.parseMaybeAssign(); - this.expect(types.colon); - node.alternate = this.parseMaybeAssign(noIn); - return this.finishNode(node, "ConditionalExpression") - } - return expr - }; - - // Start the precedence parser. - - pp$3.parseExprOps = function(noIn, refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseMaybeUnary(refDestructuringErrors, false); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn) - }; - - // Parse binary operators with the operator precedence parsing - // algorithm. `left` is the left-hand side of the operator. - // `minPrec` provides context that allows the function to stop and - // defer further parser to one of its callers when it encounters an - // operator that has a lower precedence than the set it is parsing. - - pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { - var prec = this.type.binop; - if (prec != null && (!noIn || this.type !== types._in)) { - if (prec > minPrec) { - var logical = this.type === types.logicalOR || this.type === types.logicalAND; - var op = this.value; - this.next(); - var startPos = this.start, startLoc = this.startLoc; - var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn); - var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) - } - } - return left - }; - - pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { - var node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.operator = op; - node.right = right; - return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") - }; - - // Parse unary operators, both prefix and postfix. - - pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { - var startPos = this.start, startLoc = this.startLoc, expr; - if (this.isContextual("await") && (this.inAsync || (!this.inFunction && this.options.allowAwaitOutsideFunction))) { - expr = this.parseAwait(); - sawUnary = true; - } else if (this.type.prefix) { - var node = this.startNode(), update = this.type === types.incDec; - node.operator = this.value; - node.prefix = true; - this.next(); - node.argument = this.parseMaybeUnary(null, true); - this.checkExpressionErrors(refDestructuringErrors, true); - if (update) { this.checkLVal(node.argument); } - else if (this.strict && node.operator === "delete" && - node.argument.type === "Identifier") - { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } - else { sawUnary = true; } - expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); - } else { - expr = this.parseExprSubscripts(refDestructuringErrors); - if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } - while (this.type.postfix && !this.canInsertSemicolon()) { - var node$1 = this.startNodeAt(startPos, startLoc); - node$1.operator = this.value; - node$1.prefix = false; - node$1.argument = expr; - this.checkLVal(expr); - this.next(); - expr = this.finishNode(node$1, "UpdateExpression"); - } - } - - if (!sawUnary && this.eat(types.starstar)) - { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) } - else - { return expr } - }; - - // Parse call, dot, and `[]`-subscript expressions. - - pp$3.parseExprSubscripts = function(refDestructuringErrors) { - var startPos = this.start, startLoc = this.startLoc; - var expr = this.parseExprAtom(refDestructuringErrors); - var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")"; - if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) { return expr } - var result = this.parseSubscripts(expr, startPos, startLoc); - if (refDestructuringErrors && result.type === "MemberExpression") { - if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } - if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } - } - return result - }; - - pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { - var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && - this.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async"; - while (true) { - var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow); - if (element === base || element.type === "ArrowFunctionExpression") { return element } - base = element; - } - }; - - pp$3.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow) { - var computed = this.eat(types.bracketL); - if (computed || this.eat(types.dot)) { - var node = this.startNodeAt(startPos, startLoc); - node.object = base; - node.property = computed ? this.parseExpression() : this.parseIdent(this.options.allowReserved !== "never"); - node.computed = !!computed; - if (computed) { this.expect(types.bracketR); } - base = this.finishNode(node, "MemberExpression"); - } else if (!noCalls && this.eat(types.parenL)) { - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - var exprList = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8 && base.type !== "Import", false, refDestructuringErrors); - if (maybeAsyncArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false); - this.checkYieldAwaitInDefaultParams(); - if (this.awaitIdentPos > 0) - { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); } - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true) - } - this.checkExpressionErrors(refDestructuringErrors, true); - this.yieldPos = oldYieldPos || this.yieldPos; - this.awaitPos = oldAwaitPos || this.awaitPos; - this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; - var node$1 = this.startNodeAt(startPos, startLoc); - node$1.callee = base; - node$1.arguments = exprList; - if (node$1.callee.type === "Import") { - if (node$1.arguments.length !== 1) { - this.raise(node$1.start, "import() requires exactly one argument"); - } - - var importArg = node$1.arguments[0]; - if (importArg && importArg.type === "SpreadElement") { - this.raise(importArg.start, "... is not allowed in import()"); - } - } - base = this.finishNode(node$1, "CallExpression"); - } else if (this.type === types.backQuote) { - var node$2 = this.startNodeAt(startPos, startLoc); - node$2.tag = base; - node$2.quasi = this.parseTemplate({isTagged: true}); - base = this.finishNode(node$2, "TaggedTemplateExpression"); - } - return base - }; - - // Parse an atomic expression — either a single token that is an - // expression, an expression started by a keyword like `function` or - // `new`, or an expression wrapped in punctuation like `()`, `[]`, - // or `{}`. - - pp$3.parseExprAtom = function(refDestructuringErrors) { - // If a division operator appears in an expression position, the - // tokenizer got confused, and we force it to read a regexp instead. - if (this.type === types.slash) { this.readRegexp(); } - - var node, canBeArrow = this.potentialArrowAt === this.start; - switch (this.type) { - case types._super: - if (!this.allowSuper) - { this.raise(this.start, "'super' keyword outside a method"); } - node = this.startNode(); - this.next(); - if (this.type === types.parenL && !this.allowDirectSuper) - { this.raise(node.start, "super() call outside constructor of a subclass"); } - // The `super` keyword can appear at below: - // SuperProperty: - // super [ Expression ] - // super . IdentifierName - // SuperCall: - // super Arguments - if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL) - { this.unexpected(); } - return this.finishNode(node, "Super") - - case types._this: - node = this.startNode(); - this.next(); - return this.finishNode(node, "ThisExpression") - - case types.name: - var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; - var id = this.parseIdent(false); - if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types._function)) - { return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true) } - if (canBeArrow && !this.canInsertSemicolon()) { - if (this.eat(types.arrow)) - { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) } - if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types.name && !containsEsc) { - id = this.parseIdent(false); - if (this.canInsertSemicolon() || !this.eat(types.arrow)) - { this.unexpected(); } - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true) - } - } - return id - - case types.regexp: - var value = this.value; - node = this.parseLiteral(value.value); - node.regex = {pattern: value.pattern, flags: value.flags}; - return node - - case types.num: case types.string: - return this.parseLiteral(this.value) - - case types._null: case types._true: case types._false: - node = this.startNode(); - node.value = this.type === types._null ? null : this.type === types._true; - node.raw = this.type.keyword; - this.next(); - return this.finishNode(node, "Literal") - - case types.parenL: - var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow); - if (refDestructuringErrors) { - if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) - { refDestructuringErrors.parenthesizedAssign = start; } - if (refDestructuringErrors.parenthesizedBind < 0) - { refDestructuringErrors.parenthesizedBind = start; } - } - return expr - - case types.bracketL: - node = this.startNode(); - this.next(); - node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors); - return this.finishNode(node, "ArrayExpression") - - case types.braceL: - return this.parseObj(false, refDestructuringErrors) - - case types._function: - node = this.startNode(); - this.next(); - return this.parseFunction(node, 0) - - case types._class: - return this.parseClass(this.startNode(), false) - - case types._new: - return this.parseNew() - - case types.backQuote: - return this.parseTemplate() - - case types._import: - if (this.options.ecmaVersion > 10) { - return this.parseDynamicImport() - } else { - return this.unexpected() - } - - default: - this.unexpected(); - } - }; - - pp$3.parseDynamicImport = function() { - var node = this.startNode(); - this.next(); - if (this.type !== types.parenL) { - this.unexpected(); - } - return this.finishNode(node, "Import") - }; - - pp$3.parseLiteral = function(value) { - var node = this.startNode(); - node.value = value; - node.raw = this.input.slice(this.start, this.end); - if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1); } - this.next(); - return this.finishNode(node, "Literal") - }; - - pp$3.parseParenExpression = function() { - this.expect(types.parenL); - var val = this.parseExpression(); - this.expect(types.parenR); - return val - }; - - pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { - var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; - if (this.options.ecmaVersion >= 6) { - this.next(); - - var innerStartPos = this.start, innerStartLoc = this.startLoc; - var exprList = [], first = true, lastIsComma = false; - var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; - this.yieldPos = 0; - this.awaitPos = 0; - // Do not save awaitIdentPos to allow checking awaits nested in parameters - while (this.type !== types.parenR) { - first ? first = false : this.expect(types.comma); - if (allowTrailingComma && this.afterTrailingComma(types.parenR, true)) { - lastIsComma = true; - break - } else if (this.type === types.ellipsis) { - spreadStart = this.start; - exprList.push(this.parseParenItem(this.parseRestBinding())); - if (this.type === types.comma) { this.raise(this.start, "Comma is not permitted after the rest element"); } - break - } else { - exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); - } - } - var innerEndPos = this.start, innerEndLoc = this.startLoc; - this.expect(types.parenR); - - if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false); - this.checkYieldAwaitInDefaultParams(); - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - return this.parseParenArrowList(startPos, startLoc, exprList) - } - - if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } - if (spreadStart) { this.unexpected(spreadStart); } - this.checkExpressionErrors(refDestructuringErrors, true); - this.yieldPos = oldYieldPos || this.yieldPos; - this.awaitPos = oldAwaitPos || this.awaitPos; - - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); - val.expressions = exprList; - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); - } else { - val = exprList[0]; - } - } else { - val = this.parseParenExpression(); - } - - if (this.options.preserveParens) { - var par = this.startNodeAt(startPos, startLoc); - par.expression = val; - return this.finishNode(par, "ParenthesizedExpression") - } else { - return val - } - }; - - pp$3.parseParenItem = function(item) { - return item - }; - - pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) - }; - - // New's precedence is slightly tricky. It must allow its argument to - // be a `[]` or dot subscript expression, but not a call — at least, - // not without wrapping it in parentheses. Thus, it uses the noCalls - // argument to parseSubscripts to prevent it from consuming the - // argument list. - - var empty$1 = []; - - pp$3.parseNew = function() { - var node = this.startNode(); - var meta = this.parseIdent(true); - if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) { - node.meta = meta; - var containsEsc = this.containsEsc; - node.property = this.parseIdent(true); - if (node.property.name !== "target" || containsEsc) - { this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target"); } - if (!this.inNonArrowFunction()) - { this.raiseRecoverable(node.start, "new.target can only be used in functions"); } - return this.finishNode(node, "MetaProperty") - } - var startPos = this.start, startLoc = this.startLoc; - node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); - if (this.options.ecmaVersion > 10 && node.callee.type === "Import") { - this.raise(node.callee.start, "Cannot use new with import(...)"); - } - if (this.eat(types.parenL)) { node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8 && node.callee.type !== "Import", false); } - else { node.arguments = empty$1; } - return this.finishNode(node, "NewExpression") - }; - - // Parse template expression. - - pp$3.parseTemplateElement = function(ref) { - var isTagged = ref.isTagged; - - var elem = this.startNode(); - if (this.type === types.invalidTemplate) { - if (!isTagged) { - this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); - } - elem.value = { - raw: this.value, - cooked: null - }; - } else { - elem.value = { - raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), - cooked: this.value - }; - } - this.next(); - elem.tail = this.type === types.backQuote; - return this.finishNode(elem, "TemplateElement") - }; - - pp$3.parseTemplate = function(ref) { - if ( ref === void 0 ) ref = {}; - var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false; - - var node = this.startNode(); - this.next(); - node.expressions = []; - var curElt = this.parseTemplateElement({isTagged: isTagged}); - node.quasis = [curElt]; - while (!curElt.tail) { - if (this.type === types.eof) { this.raise(this.pos, "Unterminated template literal"); } - this.expect(types.dollarBraceL); - node.expressions.push(this.parseExpression()); - this.expect(types.braceR); - node.quasis.push(curElt = this.parseTemplateElement({isTagged: isTagged})); - } - this.next(); - return this.finishNode(node, "TemplateLiteral") - }; - - pp$3.isAsyncProp = function(prop) { - return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && - (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types.star)) && - !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) - }; - - // Parse an object literal or binding pattern. - - pp$3.parseObj = function(isPattern, refDestructuringErrors) { - var node = this.startNode(), first = true, propHash = {}; - node.properties = []; - this.next(); - while (!this.eat(types.braceR)) { - if (!first) { - this.expect(types.comma); - if (this.afterTrailingComma(types.braceR)) { break } - } else { first = false; } - - var prop = this.parseProperty(isPattern, refDestructuringErrors); - if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); } - node.properties.push(prop); - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") - }; - - pp$3.parseProperty = function(isPattern, refDestructuringErrors) { - var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; - if (this.options.ecmaVersion >= 9 && this.eat(types.ellipsis)) { - if (isPattern) { - prop.argument = this.parseIdent(false); - if (this.type === types.comma) { - this.raise(this.start, "Comma is not permitted after the rest element"); - } - return this.finishNode(prop, "RestElement") - } - // To disallow parenthesized identifier via `this.toAssignable()`. - if (this.type === types.parenL && refDestructuringErrors) { - if (refDestructuringErrors.parenthesizedAssign < 0) { - refDestructuringErrors.parenthesizedAssign = this.start; - } - if (refDestructuringErrors.parenthesizedBind < 0) { - refDestructuringErrors.parenthesizedBind = this.start; - } - } - // Parse argument. - prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); - // To disallow trailing comma via `this.toAssignable()`. - if (this.type === types.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { - refDestructuringErrors.trailingComma = this.start; - } - // Finish - return this.finishNode(prop, "SpreadElement") - } - if (this.options.ecmaVersion >= 6) { - prop.method = false; - prop.shorthand = false; - if (isPattern || refDestructuringErrors) { - startPos = this.start; - startLoc = this.startLoc; - } - if (!isPattern) - { isGenerator = this.eat(types.star); } - } - var containsEsc = this.containsEsc; - this.parsePropertyName(prop); - if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { - isAsync = true; - isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star); - this.parsePropertyName(prop, refDestructuringErrors); - } else { - isAsync = false; - } - this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); - return this.finishNode(prop, "Property") - }; - - pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { - if ((isGenerator || isAsync) && this.type === types.colon) - { this.unexpected(); } - - if (this.eat(types.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); - prop.kind = "init"; - } else if (this.options.ecmaVersion >= 6 && this.type === types.parenL) { - if (isPattern) { this.unexpected(); } - prop.kind = "init"; - prop.method = true; - prop.value = this.parseMethod(isGenerator, isAsync); - } else if (!isPattern && !containsEsc && - this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && - (prop.key.name === "get" || prop.key.name === "set") && - (this.type !== types.comma && this.type !== types.braceR)) { - if (isGenerator || isAsync) { this.unexpected(); } - prop.kind = prop.key.name; - this.parsePropertyName(prop); - prop.value = this.parseMethod(false); - var paramCount = prop.kind === "get" ? 0 : 1; - if (prop.value.params.length !== paramCount) { - var start = prop.value.start; - if (prop.kind === "get") - { this.raiseRecoverable(start, "getter should have no params"); } - else - { this.raiseRecoverable(start, "setter should have exactly one param"); } - } else { - if (prop.kind === "set" && prop.value.params[0].type === "RestElement") - { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } - } - } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - if (isGenerator || isAsync) { this.unexpected(); } - this.checkUnreserved(prop.key); - if (prop.key.name === "await" && !this.awaitIdentPos) - { this.awaitIdentPos = startPos; } - prop.kind = "init"; - if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else if (this.type === types.eq && refDestructuringErrors) { - if (refDestructuringErrors.shorthandAssign < 0) - { refDestructuringErrors.shorthandAssign = this.start; } - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key); - } else { - prop.value = prop.key; - } - prop.shorthand = true; - } else { this.unexpected(); } - }; - - pp$3.parsePropertyName = function(prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(types.bracketL)) { - prop.computed = true; - prop.key = this.parseMaybeAssign(); - this.expect(types.bracketR); - return prop.key - } else { - prop.computed = false; - } - } - return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never") - }; - - // Initialize empty function node. - - pp$3.initFunction = function(node) { - node.id = null; - if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } - if (this.options.ecmaVersion >= 8) { node.async = false; } - }; - - // Parse object or class method. - - pp$3.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { - var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - - this.initFunction(node); - if (this.options.ecmaVersion >= 6) - { node.generator = isGenerator; } - if (this.options.ecmaVersion >= 8) - { node.async = !!isAsync; } - - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); - - this.expect(types.parenL); - node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8); - this.checkYieldAwaitInDefaultParams(); - this.parseFunctionBody(node, false, true); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, "FunctionExpression") - }; - - // Parse arrow function expression with given parameters. - - pp$3.parseArrowExpression = function(node, params, isAsync) { - var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; - - this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); - this.initFunction(node); - if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } - - this.yieldPos = 0; - this.awaitPos = 0; - this.awaitIdentPos = 0; - - node.params = this.toAssignableList(params, true); - this.parseFunctionBody(node, true, false); - - this.yieldPos = oldYieldPos; - this.awaitPos = oldAwaitPos; - this.awaitIdentPos = oldAwaitIdentPos; - return this.finishNode(node, "ArrowFunctionExpression") - }; - - // Parse function body and check parameters. - - pp$3.parseFunctionBody = function(node, isArrowFunction, isMethod) { - var isExpression = isArrowFunction && this.type !== types.braceL; - var oldStrict = this.strict, useStrict = false; - - if (isExpression) { - node.body = this.parseMaybeAssign(); - node.expression = true; - this.checkParams(node, false); - } else { - var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); - if (!oldStrict || nonSimple) { - useStrict = this.strictDirective(this.end); - // If this is a strict mode function, verify that argument names - // are not repeated, and it does not try to bind the words `eval` - // or `arguments`. - if (useStrict && nonSimple) - { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } - } - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - var oldLabels = this.labels; - this.labels = []; - if (useStrict) { this.strict = true; } - - // Add the params to varDeclaredNames to ensure that an error is thrown - // if a let/const declaration in the function clashes with one of the params. - this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); - node.body = this.parseBlock(false); - node.expression = false; - this.adaptDirectivePrologue(node.body.body); - this.labels = oldLabels; - } - this.exitScope(); - - // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' - if (this.strict && node.id) { this.checkLVal(node.id, BIND_OUTSIDE); } - this.strict = oldStrict; - }; - - pp$3.isSimpleParamList = function(params) { - for (var i = 0, list = params; i < list.length; i += 1) - { - var param = list[i]; - - if (param.type !== "Identifier") { return false - } } - return true - }; - - // Checks function params for various disallowed patterns such as using "eval" - // or "arguments" and duplicate parameters. - - pp$3.checkParams = function(node, allowDuplicates) { - var nameHash = {}; - for (var i = 0, list = node.params; i < list.length; i += 1) - { - var param = list[i]; - - this.checkLVal(param, BIND_VAR, allowDuplicates ? null : nameHash); - } - }; - - // Parses a comma-separated list of expressions, and returns them as - // an array. `close` is the token type that ends the list, and - // `allowEmpty` can be turned on to allow subsequent commas with - // nothing in between them to be parsed as `null` (which is needed - // for array literals). - - pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { - var elts = [], first = true; - while (!this.eat(close)) { - if (!first) { - this.expect(types.comma); - if (allowTrailingComma && this.afterTrailingComma(close)) { break } - } else { first = false; } - - var elt = (void 0); - if (allowEmpty && this.type === types.comma) - { elt = null; } - else if (this.type === types.ellipsis) { - elt = this.parseSpread(refDestructuringErrors); - if (refDestructuringErrors && this.type === types.comma && refDestructuringErrors.trailingComma < 0) - { refDestructuringErrors.trailingComma = this.start; } - } else { - elt = this.parseMaybeAssign(false, refDestructuringErrors); - } - elts.push(elt); - } - return elts - }; - - pp$3.checkUnreserved = function(ref) { - var start = ref.start; - var end = ref.end; - var name = ref.name; - - if (this.inGenerator && name === "yield") - { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } - if (this.inAsync && name === "await") - { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } - if (this.keywords.test(name)) - { this.raise(start, ("Unexpected keyword '" + name + "'")); } - if (this.options.ecmaVersion < 6 && - this.input.slice(start, end).indexOf("\\") !== -1) { return } - var re = this.strict ? this.reservedWordsStrict : this.reservedWords; - if (re.test(name)) { - if (!this.inAsync && name === "await") - { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } - this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); - } - }; - - // Parse the next token as an identifier. If `liberal` is true (used - // when parsing properties), it will also convert keywords into - // identifiers. - - pp$3.parseIdent = function(liberal, isBinding) { - var node = this.startNode(); - if (this.type === types.name) { - node.name = this.value; - } else if (this.type.keyword) { - node.name = this.type.keyword; - - // To fix https://github.com/acornjs/acorn/issues/575 - // `class` and `function` keywords push new context into this.context. - // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. - // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword - if ((node.name === "class" || node.name === "function") && - (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { - this.context.pop(); - } - } else { - this.unexpected(); - } - this.next(); - this.finishNode(node, "Identifier"); - if (!liberal) { - this.checkUnreserved(node); - if (node.name === "await" && !this.awaitIdentPos) - { this.awaitIdentPos = node.start; } - } - return node - }; - - // Parses yield expression inside generator. - - pp$3.parseYield = function(noIn) { - if (!this.yieldPos) { this.yieldPos = this.start; } - - var node = this.startNode(); - this.next(); - if (this.type === types.semi || this.canInsertSemicolon() || (this.type !== types.star && !this.type.startsExpr)) { - node.delegate = false; - node.argument = null; - } else { - node.delegate = this.eat(types.star); - node.argument = this.parseMaybeAssign(noIn); - } - return this.finishNode(node, "YieldExpression") - }; - - pp$3.parseAwait = function() { - if (!this.awaitPos) { this.awaitPos = this.start; } - - var node = this.startNode(); - this.next(); - node.argument = this.parseMaybeUnary(null, true); - return this.finishNode(node, "AwaitExpression") - }; - - var pp$4 = Parser.prototype; - - // This function is used to raise exceptions on parse errors. It - // takes an offset integer (into the current `input`) to indicate - // the location of the error, attaches the position to the end - // of the error message, and then raises a `SyntaxError` with that - // message. - - pp$4.raise = function(pos, message) { - var loc = getLineInfo(this.input, pos); - message += " (" + loc.line + ":" + loc.column + ")"; - var err = new SyntaxError(message); - err.pos = pos; err.loc = loc; err.raisedAt = this.pos; - throw err - }; - - pp$4.raiseRecoverable = pp$4.raise; - - pp$4.curPosition = function() { - if (this.options.locations) { - return new Position(this.curLine, this.pos - this.lineStart) - } - }; - - var pp$5 = Parser.prototype; - - var Scope = function Scope(flags) { - this.flags = flags; - // A list of var-declared names in the current lexical scope - this.var = []; - // A list of lexically-declared names in the current lexical scope - this.lexical = []; - // A list of lexically-declared FunctionDeclaration names in the current lexical scope - this.functions = []; - }; - - // The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. - - pp$5.enterScope = function(flags) { - this.scopeStack.push(new Scope(flags)); - }; - - pp$5.exitScope = function() { - this.scopeStack.pop(); - }; - - // The spec says: - // > At the top level of a function, or script, function declarations are - // > treated like var declarations rather than like lexical declarations. - pp$5.treatFunctionsAsVarInScope = function(scope) { - return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP) - }; - - pp$5.declareName = function(name, bindingType, pos) { - var redeclared = false; - if (bindingType === BIND_LEXICAL) { - var scope = this.currentScope(); - redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; - scope.lexical.push(name); - if (this.inModule && (scope.flags & SCOPE_TOP)) - { delete this.undefinedExports[name]; } - } else if (bindingType === BIND_SIMPLE_CATCH) { - var scope$1 = this.currentScope(); - scope$1.lexical.push(name); - } else if (bindingType === BIND_FUNCTION) { - var scope$2 = this.currentScope(); - if (this.treatFunctionsAsVar) - { redeclared = scope$2.lexical.indexOf(name) > -1; } - else - { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; } - scope$2.functions.push(name); - } else { - for (var i = this.scopeStack.length - 1; i >= 0; --i) { - var scope$3 = this.scopeStack[i]; - if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) || - !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { - redeclared = true; - break - } - scope$3.var.push(name); - if (this.inModule && (scope$3.flags & SCOPE_TOP)) - { delete this.undefinedExports[name]; } - if (scope$3.flags & SCOPE_VAR) { break } - } - } - if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); } - }; - - pp$5.checkLocalExport = function(id) { - // scope.functions must be empty as Module code is always strict. - if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && - this.scopeStack[0].var.indexOf(id.name) === -1) { - this.undefinedExports[id.name] = id; - } - }; - - pp$5.currentScope = function() { - return this.scopeStack[this.scopeStack.length - 1] - }; - - pp$5.currentVarScope = function() { - for (var i = this.scopeStack.length - 1;; i--) { - var scope = this.scopeStack[i]; - if (scope.flags & SCOPE_VAR) { return scope } - } - }; - - // Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. - pp$5.currentThisScope = function() { - for (var i = this.scopeStack.length - 1;; i--) { - var scope = this.scopeStack[i]; - if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope } - } - }; - - var Node = function Node(parser, pos, loc) { - this.type = ""; - this.start = pos; - this.end = 0; - if (parser.options.locations) - { this.loc = new SourceLocation(parser, loc); } - if (parser.options.directSourceFile) - { this.sourceFile = parser.options.directSourceFile; } - if (parser.options.ranges) - { this.range = [pos, 0]; } - }; - - // Start an AST node, attaching a start offset. - - var pp$6 = Parser.prototype; - - pp$6.startNode = function() { - return new Node(this, this.start, this.startLoc) - }; - - pp$6.startNodeAt = function(pos, loc) { - return new Node(this, pos, loc) - }; - - // Finish an AST node, adding `type` and `end` properties. - - function finishNodeAt(node, type, pos, loc) { - node.type = type; - node.end = pos; - if (this.options.locations) - { node.loc.end = loc; } - if (this.options.ranges) - { node.range[1] = pos; } - return node - } - - pp$6.finishNode = function(node, type) { - return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) - }; - - // Finish node at given position - - pp$6.finishNodeAt = function(node, type, pos, loc) { - return finishNodeAt.call(this, node, type, pos, loc) - }; - - // The algorithm used to determine whether a regexp can appear at a - - var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { - this.token = token; - this.isExpr = !!isExpr; - this.preserveSpace = !!preserveSpace; - this.override = override; - this.generator = !!generator; - }; - - var types$1 = { - b_stat: new TokContext("{", false), - b_expr: new TokContext("{", true), - b_tmpl: new TokContext("${", false), - p_stat: new TokContext("(", false), - p_expr: new TokContext("(", true), - q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), - f_stat: new TokContext("function", false), - f_expr: new TokContext("function", true), - f_expr_gen: new TokContext("function", true, false, null, true), - f_gen: new TokContext("function", false, false, null, true) - }; - - var pp$7 = Parser.prototype; - - pp$7.initialContext = function() { - return [types$1.b_stat] - }; - - pp$7.braceIsBlock = function(prevType) { - var parent = this.curContext(); - if (parent === types$1.f_expr || parent === types$1.f_stat) - { return true } - if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr)) - { return !parent.isExpr } - - // The check for `tt.name && exprAllowed` detects whether we are - // after a `yield` or `of` construct. See the `updateContext` for - // `tt.name`. - if (prevType === types._return || prevType === types.name && this.exprAllowed) - { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) } - if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) - { return true } - if (prevType === types.braceL) - { return parent === types$1.b_stat } - if (prevType === types._var || prevType === types._const || prevType === types.name) - { return false } - return !this.exprAllowed - }; - - pp$7.inGeneratorContext = function() { - for (var i = this.context.length - 1; i >= 1; i--) { - var context = this.context[i]; - if (context.token === "function") - { return context.generator } - } - return false - }; - - pp$7.updateContext = function(prevType) { - var update, type = this.type; - if (type.keyword && prevType === types.dot) - { this.exprAllowed = false; } - else if (update = type.updateContext) - { update.call(this, prevType); } - else - { this.exprAllowed = type.beforeExpr; } - }; - - // Token-specific context update code - - types.parenR.updateContext = types.braceR.updateContext = function() { - if (this.context.length === 1) { - this.exprAllowed = true; - return - } - var out = this.context.pop(); - if (out === types$1.b_stat && this.curContext().token === "function") { - out = this.context.pop(); - } - this.exprAllowed = !out.isExpr; - }; - - types.braceL.updateContext = function(prevType) { - this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr); - this.exprAllowed = true; - }; - - types.dollarBraceL.updateContext = function() { - this.context.push(types$1.b_tmpl); - this.exprAllowed = true; - }; - - types.parenL.updateContext = function(prevType) { - var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while; - this.context.push(statementParens ? types$1.p_stat : types$1.p_expr); - this.exprAllowed = true; - }; - - types.incDec.updateContext = function() { - // tokExprAllowed stays unchanged - }; - - types._function.updateContext = types._class.updateContext = function(prevType) { - if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && - !(prevType === types._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && - !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) - { this.context.push(types$1.f_expr); } - else - { this.context.push(types$1.f_stat); } - this.exprAllowed = false; - }; - - types.backQuote.updateContext = function() { - if (this.curContext() === types$1.q_tmpl) - { this.context.pop(); } - else - { this.context.push(types$1.q_tmpl); } - this.exprAllowed = false; - }; - - types.star.updateContext = function(prevType) { - if (prevType === types._function) { - var index = this.context.length - 1; - if (this.context[index] === types$1.f_expr) - { this.context[index] = types$1.f_expr_gen; } - else - { this.context[index] = types$1.f_gen; } - } - this.exprAllowed = true; - }; - - types.name.updateContext = function(prevType) { - var allowed = false; - if (this.options.ecmaVersion >= 6 && prevType !== types.dot) { - if (this.value === "of" && !this.exprAllowed || - this.value === "yield" && this.inGeneratorContext()) - { allowed = true; } - } - this.exprAllowed = allowed; - }; - - // This file contains Unicode properties extracted from the ECMAScript - // specification. The lists are extracted like so: - // $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText) - - // #table-binary-unicode-properties - var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; - var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic"; - var ecma11BinaryProperties = ecma10BinaryProperties; - var unicodeBinaryProperties = { - 9: ecma9BinaryProperties, - 10: ecma10BinaryProperties, - 11: ecma11BinaryProperties - }; - - // #table-unicode-general-category-values - var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; - - // #table-unicode-script-values - var ecma9ScriptValues = "Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; - var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"; - var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"; - var unicodeScriptValues = { - 9: ecma9ScriptValues, - 10: ecma10ScriptValues, - 11: ecma11ScriptValues - }; - - var data = {}; - function buildUnicodeData(ecmaVersion) { - var d = data[ecmaVersion] = { - binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), - nonBinary: { - General_Category: wordsRegexp(unicodeGeneralCategoryValues), - Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) - } - }; - d.nonBinary.Script_Extensions = d.nonBinary.Script; - - d.nonBinary.gc = d.nonBinary.General_Category; - d.nonBinary.sc = d.nonBinary.Script; - d.nonBinary.scx = d.nonBinary.Script_Extensions; - } - buildUnicodeData(9); - buildUnicodeData(10); - buildUnicodeData(11); - - var pp$8 = Parser.prototype; - - var RegExpValidationState = function RegExpValidationState(parser) { - this.parser = parser; - this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : ""); - this.unicodeProperties = data[parser.options.ecmaVersion >= 11 ? 11 : parser.options.ecmaVersion]; - this.source = ""; - this.flags = ""; - this.start = 0; - this.switchU = false; - this.switchN = false; - this.pos = 0; - this.lastIntValue = 0; - this.lastStringValue = ""; - this.lastAssertionIsQuantifiable = false; - this.numCapturingParens = 0; - this.maxBackReference = 0; - this.groupNames = []; - this.backReferenceNames = []; - }; - - RegExpValidationState.prototype.reset = function reset (start, pattern, flags) { - var unicode = flags.indexOf("u") !== -1; - this.start = start | 0; - this.source = pattern + ""; - this.flags = flags; - this.switchU = unicode && this.parser.options.ecmaVersion >= 6; - this.switchN = unicode && this.parser.options.ecmaVersion >= 9; - }; - - RegExpValidationState.prototype.raise = function raise (message) { - this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); - }; - - // If u flag is given, this returns the code point at the index (it combines a surrogate pair). - // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). - RegExpValidationState.prototype.at = function at (i) { - var s = this.source; - var l = s.length; - if (i >= l) { - return -1 - } - var c = s.charCodeAt(i); - if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { - return c - } - return (c << 10) + s.charCodeAt(i + 1) - 0x35FDC00 - }; - - RegExpValidationState.prototype.nextIndex = function nextIndex (i) { - var s = this.source; - var l = s.length; - if (i >= l) { - return l - } - var c = s.charCodeAt(i); - if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { - return i + 1 - } - return i + 2 - }; - - RegExpValidationState.prototype.current = function current () { - return this.at(this.pos) - }; - - RegExpValidationState.prototype.lookahead = function lookahead () { - return this.at(this.nextIndex(this.pos)) - }; - - RegExpValidationState.prototype.advance = function advance () { - this.pos = this.nextIndex(this.pos); - }; - - RegExpValidationState.prototype.eat = function eat (ch) { - if (this.current() === ch) { - this.advance(); - return true - } - return false - }; - - function codePointToString(ch) { - if (ch <= 0xFFFF) { return String.fromCharCode(ch) } - ch -= 0x10000; - return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00) - } - - /** - * Validate the flags part of a given RegExpLiteral. - * - * @param {RegExpValidationState} state The state to validate RegExp. - * @returns {void} - */ - pp$8.validateRegExpFlags = function(state) { - var validFlags = state.validFlags; - var flags = state.flags; - - for (var i = 0; i < flags.length; i++) { - var flag = flags.charAt(i); - if (validFlags.indexOf(flag) === -1) { - this.raise(state.start, "Invalid regular expression flag"); - } - if (flags.indexOf(flag, i + 1) > -1) { - this.raise(state.start, "Duplicate regular expression flag"); - } - } - }; - - /** - * Validate the pattern part of a given RegExpLiteral. - * - * @param {RegExpValidationState} state The state to validate RegExp. - * @returns {void} - */ - pp$8.validateRegExpPattern = function(state) { - this.regexp_pattern(state); - - // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of - // parsing contains a |GroupName|, reparse with the goal symbol - // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* - // exception if _P_ did not conform to the grammar, if any elements of _P_ - // were not matched by the parse, or if any Early Error conditions exist. - if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) { - state.switchN = true; - this.regexp_pattern(state); - } - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern - pp$8.regexp_pattern = function(state) { - state.pos = 0; - state.lastIntValue = 0; - state.lastStringValue = ""; - state.lastAssertionIsQuantifiable = false; - state.numCapturingParens = 0; - state.maxBackReference = 0; - state.groupNames.length = 0; - state.backReferenceNames.length = 0; - - this.regexp_disjunction(state); - - if (state.pos !== state.source.length) { - // Make the same messages as V8. - if (state.eat(0x29 /* ) */)) { - state.raise("Unmatched ')'"); - } - if (state.eat(0x5D /* [ */) || state.eat(0x7D /* } */)) { - state.raise("Lone quantifier brackets"); - } - } - if (state.maxBackReference > state.numCapturingParens) { - state.raise("Invalid escape"); - } - for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { - var name = list[i]; - - if (state.groupNames.indexOf(name) === -1) { - state.raise("Invalid named capture referenced"); - } - } - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction - pp$8.regexp_disjunction = function(state) { - this.regexp_alternative(state); - while (state.eat(0x7C /* | */)) { - this.regexp_alternative(state); - } - - // Make the same message as V8. - if (this.regexp_eatQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - if (state.eat(0x7B /* { */)) { - state.raise("Lone quantifier brackets"); - } - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative - pp$8.regexp_alternative = function(state) { - while (state.pos < state.source.length && this.regexp_eatTerm(state)) - { } - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term - pp$8.regexp_eatTerm = function(state) { - if (this.regexp_eatAssertion(state)) { - // Handle `QuantifiableAssertion Quantifier` alternative. - // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion - // is a QuantifiableAssertion. - if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { - // Make the same message as V8. - if (state.switchU) { - state.raise("Invalid quantifier"); - } - } - return true - } - - if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { - this.regexp_eatQuantifier(state); - return true - } - - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion - pp$8.regexp_eatAssertion = function(state) { - var start = state.pos; - state.lastAssertionIsQuantifiable = false; - - // ^, $ - if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { - return true - } - - // \b \B - if (state.eat(0x5C /* \ */)) { - if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { - return true - } - state.pos = start; - } - - // Lookahead / Lookbehind - if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { - var lookbehind = false; - if (this.options.ecmaVersion >= 9) { - lookbehind = state.eat(0x3C /* < */); - } - if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { - this.regexp_disjunction(state); - if (!state.eat(0x29 /* ) */)) { - state.raise("Unterminated group"); - } - state.lastAssertionIsQuantifiable = !lookbehind; - return true - } - } - - state.pos = start; - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier - pp$8.regexp_eatQuantifier = function(state, noError) { - if ( noError === void 0 ) noError = false; - - if (this.regexp_eatQuantifierPrefix(state, noError)) { - state.eat(0x3F /* ? */); - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix - pp$8.regexp_eatQuantifierPrefix = function(state, noError) { - return ( - state.eat(0x2A /* * */) || - state.eat(0x2B /* + */) || - state.eat(0x3F /* ? */) || - this.regexp_eatBracedQuantifier(state, noError) - ) - }; - pp$8.regexp_eatBracedQuantifier = function(state, noError) { - var start = state.pos; - if (state.eat(0x7B /* { */)) { - var min = 0, max = -1; - if (this.regexp_eatDecimalDigits(state)) { - min = state.lastIntValue; - if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { - max = state.lastIntValue; - } - if (state.eat(0x7D /* } */)) { - // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term - if (max !== -1 && max < min && !noError) { - state.raise("numbers out of order in {} quantifier"); - } - return true - } - } - if (state.switchU && !noError) { - state.raise("Incomplete quantifier"); - } - state.pos = start; - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Atom - pp$8.regexp_eatAtom = function(state) { - return ( - this.regexp_eatPatternCharacters(state) || - state.eat(0x2E /* . */) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state) - ) - }; - pp$8.regexp_eatReverseSolidusAtomEscape = function(state) { - var start = state.pos; - if (state.eat(0x5C /* \ */)) { - if (this.regexp_eatAtomEscape(state)) { - return true - } - state.pos = start; - } - return false - }; - pp$8.regexp_eatUncapturingGroup = function(state) { - var start = state.pos; - if (state.eat(0x28 /* ( */)) { - if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) { - this.regexp_disjunction(state); - if (state.eat(0x29 /* ) */)) { - return true - } - state.raise("Unterminated group"); - } - state.pos = start; - } - return false - }; - pp$8.regexp_eatCapturingGroup = function(state) { - if (state.eat(0x28 /* ( */)) { - if (this.options.ecmaVersion >= 9) { - this.regexp_groupSpecifier(state); - } else if (state.current() === 0x3F /* ? */) { - state.raise("Invalid group"); - } - this.regexp_disjunction(state); - if (state.eat(0x29 /* ) */)) { - state.numCapturingParens += 1; - return true - } - state.raise("Unterminated group"); - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom - pp$8.regexp_eatExtendedAtom = function(state) { - return ( - state.eat(0x2E /* . */) || - this.regexp_eatReverseSolidusAtomEscape(state) || - this.regexp_eatCharacterClass(state) || - this.regexp_eatUncapturingGroup(state) || - this.regexp_eatCapturingGroup(state) || - this.regexp_eatInvalidBracedQuantifier(state) || - this.regexp_eatExtendedPatternCharacter(state) - ) - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier - pp$8.regexp_eatInvalidBracedQuantifier = function(state) { - if (this.regexp_eatBracedQuantifier(state, true)) { - state.raise("Nothing to repeat"); - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter - pp$8.regexp_eatSyntaxCharacter = function(state) { - var ch = state.current(); - if (isSyntaxCharacter(ch)) { - state.lastIntValue = ch; - state.advance(); - return true - } - return false - }; - function isSyntaxCharacter(ch) { - return ( - ch === 0x24 /* $ */ || - ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || - ch === 0x2E /* . */ || - ch === 0x3F /* ? */ || - ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || - ch >= 0x7B /* { */ && ch <= 0x7D /* } */ - ) - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter - // But eat eager. - pp$8.regexp_eatPatternCharacters = function(state) { - var start = state.pos; - var ch = 0; - while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { - state.advance(); - } - return state.pos !== start - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter - pp$8.regexp_eatExtendedPatternCharacter = function(state) { - var ch = state.current(); - if ( - ch !== -1 && - ch !== 0x24 /* $ */ && - !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && - ch !== 0x2E /* . */ && - ch !== 0x3F /* ? */ && - ch !== 0x5B /* [ */ && - ch !== 0x5E /* ^ */ && - ch !== 0x7C /* | */ - ) { - state.advance(); - return true - } - return false - }; - - // GroupSpecifier[U] :: - // [empty] - // `?` GroupName[?U] - pp$8.regexp_groupSpecifier = function(state) { - if (state.eat(0x3F /* ? */)) { - if (this.regexp_eatGroupName(state)) { - if (state.groupNames.indexOf(state.lastStringValue) !== -1) { - state.raise("Duplicate capture group name"); - } - state.groupNames.push(state.lastStringValue); - return - } - state.raise("Invalid group"); - } - }; - - // GroupName[U] :: - // `<` RegExpIdentifierName[?U] `>` - // Note: this updates `state.lastStringValue` property with the eaten name. - pp$8.regexp_eatGroupName = function(state) { - state.lastStringValue = ""; - if (state.eat(0x3C /* < */)) { - if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { - return true - } - state.raise("Invalid capture group name"); - } - return false - }; - - // RegExpIdentifierName[U] :: - // RegExpIdentifierStart[?U] - // RegExpIdentifierName[?U] RegExpIdentifierPart[?U] - // Note: this updates `state.lastStringValue` property with the eaten name. - pp$8.regexp_eatRegExpIdentifierName = function(state) { - state.lastStringValue = ""; - if (this.regexp_eatRegExpIdentifierStart(state)) { - state.lastStringValue += codePointToString(state.lastIntValue); - while (this.regexp_eatRegExpIdentifierPart(state)) { - state.lastStringValue += codePointToString(state.lastIntValue); - } - return true - } - return false - }; - - // RegExpIdentifierStart[U] :: - // UnicodeIDStart - // `$` - // `_` - // `\` RegExpUnicodeEscapeSequence[?U] - pp$8.regexp_eatRegExpIdentifierStart = function(state) { - var start = state.pos; - var ch = state.current(); - state.advance(); - - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierStart(ch)) { - state.lastIntValue = ch; - return true - } - - state.pos = start; - return false - }; - function isRegExpIdentifierStart(ch) { - return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ - } - - // RegExpIdentifierPart[U] :: - // UnicodeIDContinue - // `$` - // `_` - // `\` RegExpUnicodeEscapeSequence[?U] - // - // - pp$8.regexp_eatRegExpIdentifierPart = function(state) { - var start = state.pos; - var ch = state.current(); - state.advance(); - - if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) { - ch = state.lastIntValue; - } - if (isRegExpIdentifierPart(ch)) { - state.lastIntValue = ch; - return true - } - - state.pos = start; - return false - }; - function isRegExpIdentifierPart(ch) { - return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */ - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape - pp$8.regexp_eatAtomEscape = function(state) { - if ( - this.regexp_eatBackReference(state) || - this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state) || - (state.switchN && this.regexp_eatKGroupName(state)) - ) { - return true - } - if (state.switchU) { - // Make the same message as V8. - if (state.current() === 0x63 /* c */) { - state.raise("Invalid unicode escape"); - } - state.raise("Invalid escape"); - } - return false - }; - pp$8.regexp_eatBackReference = function(state) { - var start = state.pos; - if (this.regexp_eatDecimalEscape(state)) { - var n = state.lastIntValue; - if (state.switchU) { - // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape - if (n > state.maxBackReference) { - state.maxBackReference = n; - } - return true - } - if (n <= state.numCapturingParens) { - return true - } - state.pos = start; - } - return false - }; - pp$8.regexp_eatKGroupName = function(state) { - if (state.eat(0x6B /* k */)) { - if (this.regexp_eatGroupName(state)) { - state.backReferenceNames.push(state.lastStringValue); - return true - } - state.raise("Invalid named reference"); - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape - pp$8.regexp_eatCharacterEscape = function(state) { - return ( - this.regexp_eatControlEscape(state) || - this.regexp_eatCControlLetter(state) || - this.regexp_eatZero(state) || - this.regexp_eatHexEscapeSequence(state) || - this.regexp_eatRegExpUnicodeEscapeSequence(state) || - (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || - this.regexp_eatIdentityEscape(state) - ) - }; - pp$8.regexp_eatCControlLetter = function(state) { - var start = state.pos; - if (state.eat(0x63 /* c */)) { - if (this.regexp_eatControlLetter(state)) { - return true - } - state.pos = start; - } - return false - }; - pp$8.regexp_eatZero = function(state) { - if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { - state.lastIntValue = 0; - state.advance(); - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape - pp$8.regexp_eatControlEscape = function(state) { - var ch = state.current(); - if (ch === 0x74 /* t */) { - state.lastIntValue = 0x09; /* \t */ - state.advance(); - return true - } - if (ch === 0x6E /* n */) { - state.lastIntValue = 0x0A; /* \n */ - state.advance(); - return true - } - if (ch === 0x76 /* v */) { - state.lastIntValue = 0x0B; /* \v */ - state.advance(); - return true - } - if (ch === 0x66 /* f */) { - state.lastIntValue = 0x0C; /* \f */ - state.advance(); - return true - } - if (ch === 0x72 /* r */) { - state.lastIntValue = 0x0D; /* \r */ - state.advance(); - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter - pp$8.regexp_eatControlLetter = function(state) { - var ch = state.current(); - if (isControlLetter(ch)) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true - } - return false - }; - function isControlLetter(ch) { - return ( - (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) || - (ch >= 0x61 /* a */ && ch <= 0x7A /* z */) - ) - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence - pp$8.regexp_eatRegExpUnicodeEscapeSequence = function(state) { - var start = state.pos; - - if (state.eat(0x75 /* u */)) { - if (this.regexp_eatFixedHexDigits(state, 4)) { - var lead = state.lastIntValue; - if (state.switchU && lead >= 0xD800 && lead <= 0xDBFF) { - var leadSurrogateEnd = state.pos; - if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { - var trail = state.lastIntValue; - if (trail >= 0xDC00 && trail <= 0xDFFF) { - state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; - return true - } - } - state.pos = leadSurrogateEnd; - state.lastIntValue = lead; - } - return true - } - if ( - state.switchU && - state.eat(0x7B /* { */) && - this.regexp_eatHexDigits(state) && - state.eat(0x7D /* } */) && - isValidUnicode(state.lastIntValue) - ) { - return true - } - if (state.switchU) { - state.raise("Invalid unicode escape"); - } - state.pos = start; - } - - return false - }; - function isValidUnicode(ch) { - return ch >= 0 && ch <= 0x10FFFF - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape - pp$8.regexp_eatIdentityEscape = function(state) { - if (state.switchU) { - if (this.regexp_eatSyntaxCharacter(state)) { - return true - } - if (state.eat(0x2F /* / */)) { - state.lastIntValue = 0x2F; /* / */ - return true - } - return false - } - - var ch = state.current(); - if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { - state.lastIntValue = ch; - state.advance(); - return true - } - - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape - pp$8.regexp_eatDecimalEscape = function(state) { - state.lastIntValue = 0; - var ch = state.current(); - if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { - do { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); - state.advance(); - } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape - pp$8.regexp_eatCharacterClassEscape = function(state) { - var ch = state.current(); - - if (isCharacterClassEscape(ch)) { - state.lastIntValue = -1; - state.advance(); - return true - } - - if ( - state.switchU && - this.options.ecmaVersion >= 9 && - (ch === 0x50 /* P */ || ch === 0x70 /* p */) - ) { - state.lastIntValue = -1; - state.advance(); - if ( - state.eat(0x7B /* { */) && - this.regexp_eatUnicodePropertyValueExpression(state) && - state.eat(0x7D /* } */) - ) { - return true - } - state.raise("Invalid property name"); - } - - return false - }; - function isCharacterClassEscape(ch) { - return ( - ch === 0x64 /* d */ || - ch === 0x44 /* D */ || - ch === 0x73 /* s */ || - ch === 0x53 /* S */ || - ch === 0x77 /* w */ || - ch === 0x57 /* W */ - ) - } - - // UnicodePropertyValueExpression :: - // UnicodePropertyName `=` UnicodePropertyValue - // LoneUnicodePropertyNameOrValue - pp$8.regexp_eatUnicodePropertyValueExpression = function(state) { - var start = state.pos; - - // UnicodePropertyName `=` UnicodePropertyValue - if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { - var name = state.lastStringValue; - if (this.regexp_eatUnicodePropertyValue(state)) { - var value = state.lastStringValue; - this.regexp_validateUnicodePropertyNameAndValue(state, name, value); - return true - } - } - state.pos = start; - - // LoneUnicodePropertyNameOrValue - if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { - var nameOrValue = state.lastStringValue; - this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); - return true - } - return false - }; - pp$8.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) { - if (!has(state.unicodeProperties.nonBinary, name)) - { state.raise("Invalid property name"); } - if (!state.unicodeProperties.nonBinary[name].test(value)) - { state.raise("Invalid property value"); } - }; - pp$8.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { - if (!state.unicodeProperties.binary.test(nameOrValue)) - { state.raise("Invalid property name"); } - }; - - // UnicodePropertyName :: - // UnicodePropertyNameCharacters - pp$8.regexp_eatUnicodePropertyName = function(state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyNameCharacter(ch = state.current())) { - state.lastStringValue += codePointToString(ch); - state.advance(); - } - return state.lastStringValue !== "" - }; - function isUnicodePropertyNameCharacter(ch) { - return isControlLetter(ch) || ch === 0x5F /* _ */ - } - - // UnicodePropertyValue :: - // UnicodePropertyValueCharacters - pp$8.regexp_eatUnicodePropertyValue = function(state) { - var ch = 0; - state.lastStringValue = ""; - while (isUnicodePropertyValueCharacter(ch = state.current())) { - state.lastStringValue += codePointToString(ch); - state.advance(); - } - return state.lastStringValue !== "" - }; - function isUnicodePropertyValueCharacter(ch) { - return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch) - } - - // LoneUnicodePropertyNameOrValue :: - // UnicodePropertyValueCharacters - pp$8.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { - return this.regexp_eatUnicodePropertyValue(state) - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass - pp$8.regexp_eatCharacterClass = function(state) { - if (state.eat(0x5B /* [ */)) { - state.eat(0x5E /* ^ */); - this.regexp_classRanges(state); - if (state.eat(0x5D /* [ */)) { - return true - } - // Unreachable since it threw "unterminated regular expression" error before. - state.raise("Unterminated character class"); - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges - // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges - // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash - pp$8.regexp_classRanges = function(state) { - while (this.regexp_eatClassAtom(state)) { - var left = state.lastIntValue; - if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) { - var right = state.lastIntValue; - if (state.switchU && (left === -1 || right === -1)) { - state.raise("Invalid character class"); - } - if (left !== -1 && right !== -1 && left > right) { - state.raise("Range out of order in character class"); - } - } - } - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom - // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash - pp$8.regexp_eatClassAtom = function(state) { - var start = state.pos; - - if (state.eat(0x5C /* \ */)) { - if (this.regexp_eatClassEscape(state)) { - return true - } - if (state.switchU) { - // Make the same message as V8. - var ch$1 = state.current(); - if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { - state.raise("Invalid class escape"); - } - state.raise("Invalid escape"); - } - state.pos = start; - } - - var ch = state.current(); - if (ch !== 0x5D /* [ */) { - state.lastIntValue = ch; - state.advance(); - return true - } - - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape - pp$8.regexp_eatClassEscape = function(state) { - var start = state.pos; - - if (state.eat(0x62 /* b */)) { - state.lastIntValue = 0x08; /* */ - return true - } - - if (state.switchU && state.eat(0x2D /* - */)) { - state.lastIntValue = 0x2D; /* - */ - return true - } - - if (!state.switchU && state.eat(0x63 /* c */)) { - if (this.regexp_eatClassControlLetter(state)) { - return true - } - state.pos = start; - } - - return ( - this.regexp_eatCharacterClassEscape(state) || - this.regexp_eatCharacterEscape(state) - ) - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter - pp$8.regexp_eatClassControlLetter = function(state) { - var ch = state.current(); - if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { - state.lastIntValue = ch % 0x20; - state.advance(); - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence - pp$8.regexp_eatHexEscapeSequence = function(state) { - var start = state.pos; - if (state.eat(0x78 /* x */)) { - if (this.regexp_eatFixedHexDigits(state, 2)) { - return true - } - if (state.switchU) { - state.raise("Invalid escape"); - } - state.pos = start; - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits - pp$8.regexp_eatDecimalDigits = function(state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isDecimalDigit(ch = state.current())) { - state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); - state.advance(); - } - return state.pos !== start - }; - function isDecimalDigit(ch) { - return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits - pp$8.regexp_eatHexDigits = function(state) { - var start = state.pos; - var ch = 0; - state.lastIntValue = 0; - while (isHexDigit(ch = state.current())) { - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); - } - return state.pos !== start - }; - function isHexDigit(ch) { - return ( - (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) || - (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) || - (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) - ) - } - function hexToInt(ch) { - if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { - return 10 + (ch - 0x41 /* A */) - } - if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { - return 10 + (ch - 0x61 /* a */) - } - return ch - 0x30 /* 0 */ - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence - // Allows only 0-377(octal) i.e. 0-255(decimal). - pp$8.regexp_eatLegacyOctalEscapeSequence = function(state) { - if (this.regexp_eatOctalDigit(state)) { - var n1 = state.lastIntValue; - if (this.regexp_eatOctalDigit(state)) { - var n2 = state.lastIntValue; - if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { - state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; - } else { - state.lastIntValue = n1 * 8 + n2; - } - } else { - state.lastIntValue = n1; - } - return true - } - return false - }; - - // https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit - pp$8.regexp_eatOctalDigit = function(state) { - var ch = state.current(); - if (isOctalDigit(ch)) { - state.lastIntValue = ch - 0x30; /* 0 */ - state.advance(); - return true - } - state.lastIntValue = 0; - return false - }; - function isOctalDigit(ch) { - return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */ - } - - // https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits - // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit - // And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence - pp$8.regexp_eatFixedHexDigits = function(state, length) { - var start = state.pos; - state.lastIntValue = 0; - for (var i = 0; i < length; ++i) { - var ch = state.current(); - if (!isHexDigit(ch)) { - state.pos = start; - return false - } - state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); - state.advance(); - } - return true - }; - - // Object type used to represent tokens. Note that normally, tokens - // simply exist as properties on the parser object. This is only - // used for the onToken callback and the external tokenizer. - - var Token = function Token(p) { - this.type = p.type; - this.value = p.value; - this.start = p.start; - this.end = p.end; - if (p.options.locations) - { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } - if (p.options.ranges) - { this.range = [p.start, p.end]; } - }; - - // ## Tokenizer - - var pp$9 = Parser.prototype; - - // Move to the next token - - pp$9.next = function() { - if (this.options.onToken) - { this.options.onToken(new Token(this)); } - - this.lastTokEnd = this.end; - this.lastTokStart = this.start; - this.lastTokEndLoc = this.endLoc; - this.lastTokStartLoc = this.startLoc; - this.nextToken(); - }; - - pp$9.getToken = function() { - this.next(); - return new Token(this) - }; - - // If we're in an ES6 environment, make parsers iterable - if (typeof Symbol !== "undefined") - { pp$9[Symbol.iterator] = function() { - var this$1 = this; - - return { - next: function () { - var token = this$1.getToken(); - return { - done: token.type === types.eof, - value: token - } - } - } - }; } - - // Toggle strict mode. Re-reads the next number or string to please - // pedantic tests (`"use strict"; 010;` should fail). - - pp$9.curContext = function() { - return this.context[this.context.length - 1] - }; - - // Read a single token, updating the parser object's token-related - // properties. - - pp$9.nextToken = function() { - var curContext = this.curContext(); - if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } - - this.start = this.pos; - if (this.options.locations) { this.startLoc = this.curPosition(); } - if (this.pos >= this.input.length) { return this.finishToken(types.eof) } - - if (curContext.override) { return curContext.override(this) } - else { this.readToken(this.fullCharCodeAtPos()); } - }; - - pp$9.readToken = function(code) { - // Identifier or keyword. '\uXXXX' sequences are allowed in - // identifiers, so '\' also dispatches to that. - if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) - { return this.readWord() } - - return this.getTokenFromCode(code) - }; - - pp$9.fullCharCodeAtPos = function() { - var code = this.input.charCodeAt(this.pos); - if (code <= 0xd7ff || code >= 0xe000) { return code } - var next = this.input.charCodeAt(this.pos + 1); - return (code << 10) + next - 0x35fdc00 - }; - - pp$9.skipBlockComment = function() { - var startLoc = this.options.onComment && this.curPosition(); - var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); - if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } - this.pos = end + 2; - if (this.options.locations) { - lineBreakG.lastIndex = start; - var match; - while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { - ++this.curLine; - this.lineStart = match.index + match[0].length; - } - } - if (this.options.onComment) - { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, - startLoc, this.curPosition()); } - }; - - pp$9.skipLineComment = function(startSkip) { - var start = this.pos; - var startLoc = this.options.onComment && this.curPosition(); - var ch = this.input.charCodeAt(this.pos += startSkip); - while (this.pos < this.input.length && !isNewLine(ch)) { - ch = this.input.charCodeAt(++this.pos); - } - if (this.options.onComment) - { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, - startLoc, this.curPosition()); } - }; - - // Called at the start of the parse and after every token. Skips - // whitespace and comments, and. - - pp$9.skipSpace = function() { - loop: while (this.pos < this.input.length) { - var ch = this.input.charCodeAt(this.pos); - switch (ch) { - case 32: case 160: // ' ' - ++this.pos; - break - case 13: - if (this.input.charCodeAt(this.pos + 1) === 10) { - ++this.pos; - } - case 10: case 8232: case 8233: - ++this.pos; - if (this.options.locations) { - ++this.curLine; - this.lineStart = this.pos; - } - break - case 47: // '/' - switch (this.input.charCodeAt(this.pos + 1)) { - case 42: // '*' - this.skipBlockComment(); - break - case 47: - this.skipLineComment(2); - break - default: - break loop - } - break - default: - if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.pos; - } else { - break loop - } - } - } - }; - - // Called at the end of every token. Sets `end`, `val`, and - // maintains `context` and `exprAllowed`, and skips the space after - // the token, so that the next one's `start` will point at the - // right position. - - pp$9.finishToken = function(type, val) { - this.end = this.pos; - if (this.options.locations) { this.endLoc = this.curPosition(); } - var prevType = this.type; - this.type = type; - this.value = val; - - this.updateContext(prevType); - }; - - // ### Token reading - - // This is the function that is called to fetch the next token. It - // is somewhat obscure, because it works in character codes rather - // than characters, and because operator parsing has been inlined - // into it. - // - // All in the name of speed. - // - pp$9.readToken_dot = function() { - var next = this.input.charCodeAt(this.pos + 1); - if (next >= 48 && next <= 57) { return this.readNumber(true) } - var next2 = this.input.charCodeAt(this.pos + 2); - if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' - this.pos += 3; - return this.finishToken(types.ellipsis) - } else { - ++this.pos; - return this.finishToken(types.dot) - } - }; - - pp$9.readToken_slash = function() { // '/' - var next = this.input.charCodeAt(this.pos + 1); - if (this.exprAllowed) { ++this.pos; return this.readRegexp() } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.slash, 1) - }; - - pp$9.readToken_mult_modulo_exp = function(code) { // '%*' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - var tokentype = code === 42 ? types.star : types.modulo; - - // exponentiation operator ** and **= - if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { - ++size; - tokentype = types.starstar; - next = this.input.charCodeAt(this.pos + 2); - } - - if (next === 61) { return this.finishOp(types.assign, size + 1) } - return this.finishOp(tokentype, size) - }; - - pp$9.readToken_pipe_amp = function(code) { // '|&' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2) } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1) - }; - - pp$9.readToken_caret = function() { // '^' - var next = this.input.charCodeAt(this.pos + 1); - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.bitwiseXOR, 1) - }; - - pp$9.readToken_plus_min = function(code) { // '+-' - var next = this.input.charCodeAt(this.pos + 1); - if (next === code) { - if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && - (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { - // A `-->` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken() - } - return this.finishOp(types.incDec, 2) - } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.plusMin, 1) - }; - - pp$9.readToken_lt_gt = function(code) { // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } - return this.finishOp(types.bitShift, size) - } - if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && - this.input.charCodeAt(this.pos + 3) === 45) { - // `` line comment\n this.skipLineComment(3)\n this.skipSpace()\n return this.nextToken()\n }\n return this.finishOp(tt.incDec, 2)\n }\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.plusMin, 1)\n}\n\npp.readToken_lt_gt = function(code) { // '<>'\n let next = this.input.charCodeAt(this.pos + 1)\n let size = 1\n if (next === code) {\n size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2\n if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)\n return this.finishOp(tt.bitShift, size)\n }\n if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&\n this.input.charCodeAt(this.pos + 3) === 45) {\n // `` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken() - } - return this.finishOp(types.incDec, 2) - } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.plusMin, 1) -}; - -pp$9.readToken_lt_gt = function(code) { // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } - return this.finishOp(types.bitShift, size) - } - if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && - this.input.charCodeAt(this.pos + 3) === 45) { - // `` line comment\n this.skipLineComment(3)\n this.skipSpace()\n return this.nextToken()\n }\n return this.finishOp(tt.incDec, 2)\n }\n if (next === 61) return this.finishOp(tt.assign, 2)\n return this.finishOp(tt.plusMin, 1)\n}\n\npp.readToken_lt_gt = function(code) { // '<>'\n let next = this.input.charCodeAt(this.pos + 1)\n let size = 1\n if (next === code) {\n size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2\n if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)\n return this.finishOp(tt.bitShift, size)\n }\n if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 &&\n this.input.charCodeAt(this.pos + 3) === 45) {\n // `` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken() - } - return this.finishOp(types.incDec, 2) - } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.plusMin, 1) -}; - -pp$8.readToken_lt_gt = function(code) { // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } - return this.finishOp(types.bitShift, size) - } - if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && - this.input.charCodeAt(this.pos + 3) === 45) { - // `` line comment - this.skipLineComment(3); - this.skipSpace(); - return this.nextToken() - } - return this.finishOp(types.incDec, 2) - } - if (next === 61) { return this.finishOp(types.assign, 2) } - return this.finishOp(types.plusMin, 1) -}; - -pp$8.readToken_lt_gt = function(code) { // '<>' - var next = this.input.charCodeAt(this.pos + 1); - var size = 1; - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types.assign, size + 1) } - return this.finishOp(types.bitShift, size) - } - if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && - this.input.charCodeAt(this.pos + 3) === 45) { - // ` - -AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects. -Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method. - -It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators. - -| compression | size | -| :----------------- | -------: | -| asynckit.js | 12.34 kB | -| asynckit.min.js | 4.11 kB | -| asynckit.min.js.gz | 1.47 kB | - - -## Install - -```sh -$ npm install --save asynckit -``` - -## Examples - -### Parallel Jobs - -Runs iterator over provided array in parallel. Stores output in the `result` array, -on the matching positions. In unlikely event of an error from one of the jobs, -will terminate rest of the active jobs (if abort function is provided) -and return error along with salvaged data to the main callback function. - -#### Input Array - -```javascript -var parallel = require('asynckit').parallel - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] - , target = [] - ; - -parallel(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// async job accepts one element from the array -// and a callback function -function asyncJob(item, cb) -{ - // different delays (in ms) per item - var delay = item * 25; - - // pretend different jobs take different time to finish - // and not in consequential order - var timeoutId = setTimeout(function() { - target.push(item); - cb(null, item * 2); - }, delay); - - // allow to cancel "leftover" jobs upon error - // return function, invoking of which will abort this job - return clearTimeout.bind(null, timeoutId); -} -``` - -More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js). - -#### Input Object - -Also it supports named jobs, listed via object. - -```javascript -var parallel = require('asynckit/parallel') - , assert = require('assert') - ; - -var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } - , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } - , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] - , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ] - , target = [] - , keys = [] - ; - -parallel(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); - assert.deepEqual(keys, expectedKeys); -}); - -// supports full value, key, callback (shortcut) interface -function asyncJob(item, key, cb) -{ - // different delays (in ms) per item - var delay = item * 25; - - // pretend different jobs take different time to finish - // and not in consequential order - var timeoutId = setTimeout(function() { - keys.push(key); - target.push(item); - cb(null, item * 2); - }, delay); - - // allow to cancel "leftover" jobs upon error - // return function, invoking of which will abort this job - return clearTimeout.bind(null, timeoutId); -} -``` - -More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js). - -### Serial Jobs - -Runs iterator over provided array sequentially. Stores output in the `result` array, -on the matching positions. In unlikely event of an error from one of the jobs, -will not proceed to the rest of the items in the list -and return error along with salvaged data to the main callback function. - -#### Input Array - -```javascript -var serial = require('asynckit/serial') - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] - , target = [] - ; - -serial(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// extended interface (item, key, callback) -// also supported for arrays -function asyncJob(item, key, cb) -{ - target.push(key); - - // it will be automatically made async - // even it iterator "returns" in the same event loop - cb(null, item * 2); -} -``` - -More examples could be found in [test/test-serial-array.js](test/test-serial-array.js). - -#### Input Object - -Also it supports named jobs, listed via object. - -```javascript -var serial = require('asynckit').serial - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] - , target = [] - ; - -var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } - , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } - , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , target = [] - ; - - -serial(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// shortcut interface (item, callback) -// works for object as well as for the arrays -function asyncJob(item, cb) -{ - target.push(item); - - // it will be automatically made async - // even it iterator "returns" in the same event loop - cb(null, item * 2); -} -``` - -More examples could be found in [test/test-serial-object.js](test/test-serial-object.js). - -_Note: Since _object_ is an _unordered_ collection of properties, -it may produce unexpected results with sequential iterations. -Whenever order of the jobs' execution is important please use `serialOrdered` method._ - -### Ordered Serial Iterations - -TBD - -For example [compare-property](compare-property) package. - -### Streaming interface - -TBD - -## Want to Know More? - -More examples can be found in [test folder](test/). - -Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions. - -## License - -AsyncKit is licensed under the MIT license. diff --git a/node_modules/asynckit/bench.js b/node_modules/asynckit/bench.js deleted file mode 100644 index c612f1a5..00000000 --- a/node_modules/asynckit/bench.js +++ /dev/null @@ -1,76 +0,0 @@ -/* eslint no-console: "off" */ - -var asynckit = require('./') - , async = require('async') - , assert = require('assert') - , expected = 0 - ; - -var Benchmark = require('benchmark'); -var suite = new Benchmark.Suite; - -var source = []; -for (var z = 1; z < 100; z++) -{ - source.push(z); - expected += z; -} - -suite -// add tests - -.add('async.map', function(deferred) -{ - var total = 0; - - async.map(source, - function(i, cb) - { - setImmediate(function() - { - total += i; - cb(null, total); - }); - }, - function(err, result) - { - assert.ifError(err); - assert.equal(result[result.length - 1], expected); - deferred.resolve(); - }); -}, {'defer': true}) - - -.add('asynckit.parallel', function(deferred) -{ - var total = 0; - - asynckit.parallel(source, - function(i, cb) - { - setImmediate(function() - { - total += i; - cb(null, total); - }); - }, - function(err, result) - { - assert.ifError(err); - assert.equal(result[result.length - 1], expected); - deferred.resolve(); - }); -}, {'defer': true}) - - -// add listeners -.on('cycle', function(ev) -{ - console.log(String(ev.target)); -}) -.on('complete', function() -{ - console.log('Fastest is ' + this.filter('fastest').map('name')); -}) -// run async -.run({ 'async': true }); diff --git a/node_modules/asynckit/index.js b/node_modules/asynckit/index.js deleted file mode 100644 index 455f9454..00000000 --- a/node_modules/asynckit/index.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = -{ - parallel : require('./parallel.js'), - serial : require('./serial.js'), - serialOrdered : require('./serialOrdered.js') -}; diff --git a/node_modules/asynckit/lib/abort.js b/node_modules/asynckit/lib/abort.js deleted file mode 100644 index 114367e5..00000000 --- a/node_modules/asynckit/lib/abort.js +++ /dev/null @@ -1,29 +0,0 @@ -// API -module.exports = abort; - -/** - * Aborts leftover active jobs - * - * @param {object} state - current state object - */ -function abort(state) -{ - Object.keys(state.jobs).forEach(clean.bind(state)); - - // reset leftover jobs - state.jobs = {}; -} - -/** - * Cleans up leftover job by invoking abort function for the provided job id - * - * @this state - * @param {string|number} key - job id to abort - */ -function clean(key) -{ - if (typeof this.jobs[key] == 'function') - { - this.jobs[key](); - } -} diff --git a/node_modules/asynckit/lib/async.js b/node_modules/asynckit/lib/async.js deleted file mode 100644 index 7f1288a4..00000000 --- a/node_modules/asynckit/lib/async.js +++ /dev/null @@ -1,34 +0,0 @@ -var defer = require('./defer.js'); - -// API -module.exports = async; - -/** - * Runs provided callback asynchronously - * even if callback itself is not - * - * @param {function} callback - callback to invoke - * @returns {function} - augmented callback - */ -function async(callback) -{ - var isAsync = false; - - // check if async happened - defer(function() { isAsync = true; }); - - return function async_callback(err, result) - { - if (isAsync) - { - callback(err, result); - } - else - { - defer(function nextTick_callback() - { - callback(err, result); - }); - } - }; -} diff --git a/node_modules/asynckit/lib/defer.js b/node_modules/asynckit/lib/defer.js deleted file mode 100644 index b67110c7..00000000 --- a/node_modules/asynckit/lib/defer.js +++ /dev/null @@ -1,26 +0,0 @@ -module.exports = defer; - -/** - * Runs provided function on next iteration of the event loop - * - * @param {function} fn - function to run - */ -function defer(fn) -{ - var nextTick = typeof setImmediate == 'function' - ? setImmediate - : ( - typeof process == 'object' && typeof process.nextTick == 'function' - ? process.nextTick - : null - ); - - if (nextTick) - { - nextTick(fn); - } - else - { - setTimeout(fn, 0); - } -} diff --git a/node_modules/asynckit/lib/iterate.js b/node_modules/asynckit/lib/iterate.js deleted file mode 100644 index 5d2839a5..00000000 --- a/node_modules/asynckit/lib/iterate.js +++ /dev/null @@ -1,75 +0,0 @@ -var async = require('./async.js') - , abort = require('./abort.js') - ; - -// API -module.exports = iterate; - -/** - * Iterates over each job object - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {object} state - current job status - * @param {function} callback - invoked when all elements processed - */ -function iterate(list, iterator, state, callback) -{ - // store current index - var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; - - state.jobs[key] = runJob(iterator, key, list[key], function(error, output) - { - // don't repeat yourself - // skip secondary callbacks - if (!(key in state.jobs)) - { - return; - } - - // clean up jobs - delete state.jobs[key]; - - if (error) - { - // don't process rest of the results - // stop still active jobs - // and reset the list - abort(state); - } - else - { - state.results[key] = output; - } - - // return salvaged results - callback(error, state.results); - }); -} - -/** - * Runs iterator over provided job element - * - * @param {function} iterator - iterator to invoke - * @param {string|number} key - key/index of the element in the list of jobs - * @param {mixed} item - job description - * @param {function} callback - invoked after iterator is done with the job - * @returns {function|mixed} - job abort function or something else - */ -function runJob(iterator, key, item, callback) -{ - var aborter; - - // allow shortcut if iterator expects only two arguments - if (iterator.length == 2) - { - aborter = iterator(item, async(callback)); - } - // otherwise go with full three arguments - else - { - aborter = iterator(item, key, async(callback)); - } - - return aborter; -} diff --git a/node_modules/asynckit/lib/readable_asynckit.js b/node_modules/asynckit/lib/readable_asynckit.js deleted file mode 100644 index 78ad240f..00000000 --- a/node_modules/asynckit/lib/readable_asynckit.js +++ /dev/null @@ -1,91 +0,0 @@ -var streamify = require('./streamify.js') - , defer = require('./defer.js') - ; - -// API -module.exports = ReadableAsyncKit; - -/** - * Base constructor for all streams - * used to hold properties/methods - */ -function ReadableAsyncKit() -{ - ReadableAsyncKit.super_.apply(this, arguments); - - // list of active jobs - this.jobs = {}; - - // add stream methods - this.destroy = destroy; - this._start = _start; - this._read = _read; -} - -/** - * Destroys readable stream, - * by aborting outstanding jobs - * - * @returns {void} - */ -function destroy() -{ - if (this.destroyed) - { - return; - } - - this.destroyed = true; - - if (typeof this.terminator == 'function') - { - this.terminator(); - } -} - -/** - * Starts provided jobs in async manner - * - * @private - */ -function _start() -{ - // first argument – runner function - var runner = arguments[0] - // take away first argument - , args = Array.prototype.slice.call(arguments, 1) - // second argument - input data - , input = args[0] - // last argument - result callback - , endCb = streamify.callback.call(this, args[args.length - 1]) - ; - - args[args.length - 1] = endCb; - // third argument - iterator - args[1] = streamify.iterator.call(this, args[1]); - - // allow time for proper setup - defer(function() - { - if (!this.destroyed) - { - this.terminator = runner.apply(null, args); - } - else - { - endCb(null, Array.isArray(input) ? [] : {}); - } - }.bind(this)); -} - - -/** - * Implement _read to comply with Readable streams - * Doesn't really make sense for flowing object mode - * - * @private - */ -function _read() -{ - -} diff --git a/node_modules/asynckit/lib/readable_parallel.js b/node_modules/asynckit/lib/readable_parallel.js deleted file mode 100644 index 5d2929f7..00000000 --- a/node_modules/asynckit/lib/readable_parallel.js +++ /dev/null @@ -1,25 +0,0 @@ -var parallel = require('../parallel.js'); - -// API -module.exports = ReadableParallel; - -/** - * Streaming wrapper to `asynckit.parallel` - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {stream.Readable#} - */ -function ReadableParallel(list, iterator, callback) -{ - if (!(this instanceof ReadableParallel)) - { - return new ReadableParallel(list, iterator, callback); - } - - // turn on object mode - ReadableParallel.super_.call(this, {objectMode: true}); - - this._start(parallel, list, iterator, callback); -} diff --git a/node_modules/asynckit/lib/readable_serial.js b/node_modules/asynckit/lib/readable_serial.js deleted file mode 100644 index 78226982..00000000 --- a/node_modules/asynckit/lib/readable_serial.js +++ /dev/null @@ -1,25 +0,0 @@ -var serial = require('../serial.js'); - -// API -module.exports = ReadableSerial; - -/** - * Streaming wrapper to `asynckit.serial` - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {stream.Readable#} - */ -function ReadableSerial(list, iterator, callback) -{ - if (!(this instanceof ReadableSerial)) - { - return new ReadableSerial(list, iterator, callback); - } - - // turn on object mode - ReadableSerial.super_.call(this, {objectMode: true}); - - this._start(serial, list, iterator, callback); -} diff --git a/node_modules/asynckit/lib/readable_serial_ordered.js b/node_modules/asynckit/lib/readable_serial_ordered.js deleted file mode 100644 index 3de89c47..00000000 --- a/node_modules/asynckit/lib/readable_serial_ordered.js +++ /dev/null @@ -1,29 +0,0 @@ -var serialOrdered = require('../serialOrdered.js'); - -// API -module.exports = ReadableSerialOrdered; -// expose sort helpers -module.exports.ascending = serialOrdered.ascending; -module.exports.descending = serialOrdered.descending; - -/** - * Streaming wrapper to `asynckit.serialOrdered` - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {stream.Readable#} - */ -function ReadableSerialOrdered(list, iterator, sortMethod, callback) -{ - if (!(this instanceof ReadableSerialOrdered)) - { - return new ReadableSerialOrdered(list, iterator, sortMethod, callback); - } - - // turn on object mode - ReadableSerialOrdered.super_.call(this, {objectMode: true}); - - this._start(serialOrdered, list, iterator, sortMethod, callback); -} diff --git a/node_modules/asynckit/lib/state.js b/node_modules/asynckit/lib/state.js deleted file mode 100644 index cbea7ad8..00000000 --- a/node_modules/asynckit/lib/state.js +++ /dev/null @@ -1,37 +0,0 @@ -// API -module.exports = state; - -/** - * Creates initial state object - * for iteration over list - * - * @param {array|object} list - list to iterate over - * @param {function|null} sortMethod - function to use for keys sort, - * or `null` to keep them as is - * @returns {object} - initial state object - */ -function state(list, sortMethod) -{ - var isNamedList = !Array.isArray(list) - , initState = - { - index : 0, - keyedList: isNamedList || sortMethod ? Object.keys(list) : null, - jobs : {}, - results : isNamedList ? {} : [], - size : isNamedList ? Object.keys(list).length : list.length - } - ; - - if (sortMethod) - { - // sort array keys based on it's values - // sort object's keys just on own merit - initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) - { - return sortMethod(list[a], list[b]); - }); - } - - return initState; -} diff --git a/node_modules/asynckit/lib/streamify.js b/node_modules/asynckit/lib/streamify.js deleted file mode 100644 index f56a1c92..00000000 --- a/node_modules/asynckit/lib/streamify.js +++ /dev/null @@ -1,141 +0,0 @@ -var async = require('./async.js'); - -// API -module.exports = { - iterator: wrapIterator, - callback: wrapCallback -}; - -/** - * Wraps iterators with long signature - * - * @this ReadableAsyncKit# - * @param {function} iterator - function to wrap - * @returns {function} - wrapped function - */ -function wrapIterator(iterator) -{ - var stream = this; - - return function(item, key, cb) - { - var aborter - , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key)) - ; - - stream.jobs[key] = wrappedCb; - - // it's either shortcut (item, cb) - if (iterator.length == 2) - { - aborter = iterator(item, wrappedCb); - } - // or long format (item, key, cb) - else - { - aborter = iterator(item, key, wrappedCb); - } - - return aborter; - }; -} - -/** - * Wraps provided callback function - * allowing to execute snitch function before - * real callback - * - * @this ReadableAsyncKit# - * @param {function} callback - function to wrap - * @returns {function} - wrapped function - */ -function wrapCallback(callback) -{ - var stream = this; - - var wrapped = function(error, result) - { - return finisher.call(stream, error, result, callback); - }; - - return wrapped; -} - -/** - * Wraps provided iterator callback function - * makes sure snitch only called once, - * but passes secondary calls to the original callback - * - * @this ReadableAsyncKit# - * @param {function} callback - callback to wrap - * @param {number|string} key - iteration key - * @returns {function} wrapped callback - */ -function wrapIteratorCallback(callback, key) -{ - var stream = this; - - return function(error, output) - { - // don't repeat yourself - if (!(key in stream.jobs)) - { - callback(error, output); - return; - } - - // clean up jobs - delete stream.jobs[key]; - - return streamer.call(stream, error, {key: key, value: output}, callback); - }; -} - -/** - * Stream wrapper for iterator callback - * - * @this ReadableAsyncKit# - * @param {mixed} error - error response - * @param {mixed} output - iterator output - * @param {function} callback - callback that expects iterator results - */ -function streamer(error, output, callback) -{ - if (error && !this.error) - { - this.error = error; - this.pause(); - this.emit('error', error); - // send back value only, as expected - callback(error, output && output.value); - return; - } - - // stream stuff - this.push(output); - - // back to original track - // send back value only, as expected - callback(error, output && output.value); -} - -/** - * Stream wrapper for finishing callback - * - * @this ReadableAsyncKit# - * @param {mixed} error - error response - * @param {mixed} output - iterator output - * @param {function} callback - callback that expects final results - */ -function finisher(error, output, callback) -{ - // signal end of the stream - // only for successfully finished streams - if (!error) - { - this.push(null); - } - - // back to original track - callback(error, output); -} diff --git a/node_modules/asynckit/lib/terminator.js b/node_modules/asynckit/lib/terminator.js deleted file mode 100644 index d6eb9921..00000000 --- a/node_modules/asynckit/lib/terminator.js +++ /dev/null @@ -1,29 +0,0 @@ -var abort = require('./abort.js') - , async = require('./async.js') - ; - -// API -module.exports = terminator; - -/** - * Terminates jobs in the attached state context - * - * @this AsyncKitState# - * @param {function} callback - final callback to invoke after termination - */ -function terminator(callback) -{ - if (!Object.keys(this.jobs).length) - { - return; - } - - // fast forward iteration index - this.index = this.size; - - // abort jobs - abort(this); - - // send back results we have so far - async(callback)(null, this.results); -} diff --git a/node_modules/asynckit/package.json b/node_modules/asynckit/package.json deleted file mode 100644 index c7e8f5f7..00000000 --- a/node_modules/asynckit/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "_args": [ - [ - "asynckit@0.4.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "asynckit@0.4.0", - "_id": "asynckit@0.4.0", - "_inBundle": false, - "_integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "_location": "/asynckit", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "asynckit@0.4.0", - "name": "asynckit", - "escapedName": "asynckit", - "rawSpec": "0.4.0", - "saveSpec": null, - "fetchSpec": "0.4.0" - }, - "_requiredBy": [ - "/form-data" - ], - "_resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "_spec": "0.4.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Alex Indigo", - "email": "iam@alexindigo.com" - }, - "bugs": { - "url": "https://github.com/alexindigo/asynckit/issues" - }, - "dependencies": {}, - "description": "Minimal async jobs utility library, with streams support", - "devDependencies": { - "browserify": "^13.0.0", - "browserify-istanbul": "^2.0.0", - "coveralls": "^2.11.9", - "eslint": "^2.9.0", - "istanbul": "^0.4.3", - "obake": "^0.1.2", - "phantomjs-prebuilt": "^2.1.7", - "pre-commit": "^1.1.3", - "reamde": "^1.1.0", - "rimraf": "^2.5.2", - "size-table": "^0.2.0", - "tap-spec": "^4.1.1", - "tape": "^4.5.1" - }, - "homepage": "https://github.com/alexindigo/asynckit#readme", - "keywords": [ - "async", - "jobs", - "parallel", - "serial", - "iterator", - "array", - "object", - "stream", - "destroy", - "terminate", - "abort" - ], - "license": "MIT", - "main": "index.js", - "name": "asynckit", - "pre-commit": [ - "clean", - "lint", - "test", - "browser", - "report", - "size" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/alexindigo/asynckit.git" - }, - "scripts": { - "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec", - "clean": "rimraf coverage", - "debug": "tape test/test-*.js", - "lint": "eslint *.js lib/*.js test/*.js", - "report": "istanbul report", - "size": "browserify index.js | size-table asynckit", - "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec", - "win-test": "tape test/test-*.js" - }, - "version": "0.4.0" -} diff --git a/node_modules/asynckit/parallel.js b/node_modules/asynckit/parallel.js deleted file mode 100644 index 3c50344d..00000000 --- a/node_modules/asynckit/parallel.js +++ /dev/null @@ -1,43 +0,0 @@ -var iterate = require('./lib/iterate.js') - , initState = require('./lib/state.js') - , terminator = require('./lib/terminator.js') - ; - -// Public API -module.exports = parallel; - -/** - * Runs iterator over provided array elements in parallel - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function parallel(list, iterator, callback) -{ - var state = initState(list); - - while (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, function(error, result) - { - if (error) - { - callback(error, result); - return; - } - - // looks like it's the last one - if (Object.keys(state.jobs).length === 0) - { - callback(null, state.results); - return; - } - }); - - state.index++; - } - - return terminator.bind(state, callback); -} diff --git a/node_modules/asynckit/serial.js b/node_modules/asynckit/serial.js deleted file mode 100644 index 6cd949a6..00000000 --- a/node_modules/asynckit/serial.js +++ /dev/null @@ -1,17 +0,0 @@ -var serialOrdered = require('./serialOrdered.js'); - -// Public API -module.exports = serial; - -/** - * Runs iterator over provided array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serial(list, iterator, callback) -{ - return serialOrdered(list, iterator, null, callback); -} diff --git a/node_modules/asynckit/serialOrdered.js b/node_modules/asynckit/serialOrdered.js deleted file mode 100644 index 607eafea..00000000 --- a/node_modules/asynckit/serialOrdered.js +++ /dev/null @@ -1,75 +0,0 @@ -var iterate = require('./lib/iterate.js') - , initState = require('./lib/state.js') - , terminator = require('./lib/terminator.js') - ; - -// Public API -module.exports = serialOrdered; -// sorting helpers -module.exports.ascending = ascending; -module.exports.descending = descending; - -/** - * Runs iterator over provided sorted array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serialOrdered(list, iterator, sortMethod, callback) -{ - var state = initState(list, sortMethod); - - iterate(list, iterator, state, function iteratorHandler(error, result) - { - if (error) - { - callback(error, result); - return; - } - - state.index++; - - // are we there yet? - if (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, iteratorHandler); - return; - } - - // done here - callback(null, state.results); - }); - - return terminator.bind(state, callback); -} - -/* - * -- Sort methods - */ - -/** - * sort helper to sort array elements in ascending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function ascending(a, b) -{ - return a < b ? -1 : a > b ? 1 : 0; -} - -/** - * sort helper to sort array elements in descending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function descending(a, b) -{ - return -1 * ascending(a, b); -} diff --git a/node_modules/asynckit/stream.js b/node_modules/asynckit/stream.js deleted file mode 100644 index d43465f9..00000000 --- a/node_modules/asynckit/stream.js +++ /dev/null @@ -1,21 +0,0 @@ -var inherits = require('util').inherits - , Readable = require('stream').Readable - , ReadableAsyncKit = require('./lib/readable_asynckit.js') - , ReadableParallel = require('./lib/readable_parallel.js') - , ReadableSerial = require('./lib/readable_serial.js') - , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js') - ; - -// API -module.exports = -{ - parallel : ReadableParallel, - serial : ReadableSerial, - serialOrdered : ReadableSerialOrdered, -}; - -inherits(ReadableAsyncKit, Readable); - -inherits(ReadableParallel, ReadableAsyncKit); -inherits(ReadableSerial, ReadableAsyncKit); -inherits(ReadableSerialOrdered, ReadableAsyncKit); diff --git a/node_modules/atob/LICENSE b/node_modules/atob/LICENSE deleted file mode 100644 index 2d9338bd..00000000 --- a/node_modules/atob/LICENSE +++ /dev/null @@ -1,230 +0,0 @@ -At your option you may choose either of the following licenses: - - * The MIT License (MIT) - * The Apache License 2.0 (Apache-2.0) - - -The MIT License (MIT) - -Copyright (c) 2015 AJ ONeal - -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. - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2015 AJ ONeal - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/atob/LICENSE.DOCS b/node_modules/atob/LICENSE.DOCS deleted file mode 100644 index 1d658d6d..00000000 --- a/node_modules/atob/LICENSE.DOCS +++ /dev/null @@ -1,319 +0,0 @@ -Creative Commons Legal Code - -Attribution 3.0 Unported - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR - DAMAGES RESULTING FROM ITS USE. - -License - -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE -COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY -COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS -AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. - -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE -TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY -BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND -CONDITIONS. - -1. Definitions - - a. "Adaptation" means a work based upon the Work, or upon the Work and - other pre-existing works, such as a translation, adaptation, - derivative work, arrangement of music or other alterations of a - literary or artistic work, or phonogram or performance and includes - cinematographic adaptations or any other form in which the Work may be - recast, transformed, or adapted including in any form recognizably - derived from the original, except that a work that constitutes a - Collection will not be considered an Adaptation for the purpose of - this License. For the avoidance of doubt, where the Work is a musical - work, performance or phonogram, the synchronization of the Work in - timed-relation with a moving image ("synching") will be considered an - Adaptation for the purpose of this License. - b. "Collection" means a collection of literary or artistic works, such as - encyclopedias and anthologies, or performances, phonograms or - broadcasts, or other works or subject matter other than works listed - in Section 1(f) below, which, by reason of the selection and - arrangement of their contents, constitute intellectual creations, in - which the Work is included in its entirety in unmodified form along - with one or more other contributions, each constituting separate and - independent works in themselves, which together are assembled into a - collective whole. A work that constitutes a Collection will not be - considered an Adaptation (as defined above) for the purposes of this - License. - c. "Distribute" means to make available to the public the original and - copies of the Work or Adaptation, as appropriate, through sale or - other transfer of ownership. - d. "Licensor" means the individual, individuals, entity or entities that - offer(s) the Work under the terms of this License. - e. "Original Author" means, in the case of a literary or artistic work, - the individual, individuals, entity or entities who created the Work - or if no individual or entity can be identified, the publisher; and in - addition (i) in the case of a performance the actors, singers, - musicians, dancers, and other persons who act, sing, deliver, declaim, - play in, interpret or otherwise perform literary or artistic works or - expressions of folklore; (ii) in the case of a phonogram the producer - being the person or legal entity who first fixes the sounds of a - performance or other sounds; and, (iii) in the case of broadcasts, the - organization that transmits the broadcast. - f. "Work" means the literary and/or artistic work offered under the terms - of this License including without limitation any production in the - literary, scientific and artistic domain, whatever may be the mode or - form of its expression including digital form, such as a book, - pamphlet and other writing; a lecture, address, sermon or other work - of the same nature; a dramatic or dramatico-musical work; a - choreographic work or entertainment in dumb show; a musical - composition with or without words; a cinematographic work to which are - assimilated works expressed by a process analogous to cinematography; - a work of drawing, painting, architecture, sculpture, engraving or - lithography; a photographic work to which are assimilated works - expressed by a process analogous to photography; a work of applied - art; an illustration, map, plan, sketch or three-dimensional work - relative to geography, topography, architecture or science; a - performance; a broadcast; a phonogram; a compilation of data to the - extent it is protected as a copyrightable work; or a work performed by - a variety or circus performer to the extent it is not otherwise - considered a literary or artistic work. - g. "You" means an individual or entity exercising rights under this - License who has not previously violated the terms of this License with - respect to the Work, or who has received express permission from the - Licensor to exercise rights under this License despite a previous - violation. - h. "Publicly Perform" means to perform public recitations of the Work and - to communicate to the public those public recitations, by any means or - process, including by wire or wireless means or public digital - performances; to make available to the public Works in such a way that - members of the public may access these Works from a place and at a - place individually chosen by them; to perform the Work to the public - by any means or process and the communication to the public of the - performances of the Work, including by public digital performance; to - broadcast and rebroadcast the Work by any means including signs, - sounds or images. - i. "Reproduce" means to make copies of the Work by any means including - without limitation by sound or visual recordings and the right of - fixation and reproducing fixations of the Work, including storage of a - protected performance or phonogram in digital form or other electronic - medium. - -2. Fair Dealing Rights. Nothing in this License is intended to reduce, -limit, or restrict any uses free from copyright or rights arising from -limitations or exceptions that are provided for in connection with the -copyright protection under copyright law or other applicable laws. - -3. License Grant. Subject to the terms and conditions of this License, -Licensor hereby grants You a worldwide, royalty-free, non-exclusive, -perpetual (for the duration of the applicable copyright) license to -exercise the rights in the Work as stated below: - - a. to Reproduce the Work, to incorporate the Work into one or more - Collections, and to Reproduce the Work as incorporated in the - Collections; - b. to create and Reproduce Adaptations provided that any such Adaptation, - including any translation in any medium, takes reasonable steps to - clearly label, demarcate or otherwise identify that changes were made - to the original Work. For example, a translation could be marked "The - original work was translated from English to Spanish," or a - modification could indicate "The original work has been modified."; - c. to Distribute and Publicly Perform the Work including as incorporated - in Collections; and, - d. to Distribute and Publicly Perform Adaptations. - e. For the avoidance of doubt: - - i. Non-waivable Compulsory License Schemes. In those jurisdictions in - which the right to collect royalties through any statutory or - compulsory licensing scheme cannot be waived, the Licensor - reserves the exclusive right to collect such royalties for any - exercise by You of the rights granted under this License; - ii. Waivable Compulsory License Schemes. In those jurisdictions in - which the right to collect royalties through any statutory or - compulsory licensing scheme can be waived, the Licensor waives the - exclusive right to collect such royalties for any exercise by You - of the rights granted under this License; and, - iii. Voluntary License Schemes. The Licensor waives the right to - collect royalties, whether individually or, in the event that the - Licensor is a member of a collecting society that administers - voluntary licensing schemes, via that society, from any exercise - by You of the rights granted under this License. - -The above rights may be exercised in all media and formats whether now -known or hereafter devised. The above rights include the right to make -such modifications as are technically necessary to exercise the rights in -other media and formats. Subject to Section 8(f), all rights not expressly -granted by Licensor are hereby reserved. - -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: - - a. You may Distribute or Publicly Perform the Work only under the terms - of this License. You must include a copy of, or the Uniform Resource - Identifier (URI) for, this License with every copy of the Work You - Distribute or Publicly Perform. You may not offer or impose any terms - on the Work that restrict the terms of this License or the ability of - the recipient of the Work to exercise the rights granted to that - recipient under the terms of the License. You may not sublicense the - Work. You must keep intact all notices that refer to this License and - to the disclaimer of warranties with every copy of the Work You - Distribute or Publicly Perform. When You Distribute or Publicly - Perform the Work, You may not impose any effective technological - measures on the Work that restrict the ability of a recipient of the - Work from You to exercise the rights granted to that recipient under - the terms of the License. This Section 4(a) applies to the Work as - incorporated in a Collection, but this does not require the Collection - apart from the Work itself to be made subject to the terms of this - License. If You create a Collection, upon notice from any Licensor You - must, to the extent practicable, remove from the Collection any credit - as required by Section 4(b), as requested. If You create an - Adaptation, upon notice from any Licensor You must, to the extent - practicable, remove from the Adaptation any credit as required by - Section 4(b), as requested. - b. If You Distribute, or Publicly Perform the Work or any Adaptations or - Collections, You must, unless a request has been made pursuant to - Section 4(a), keep intact all copyright notices for the Work and - provide, reasonable to the medium or means You are utilizing: (i) the - name of the Original Author (or pseudonym, if applicable) if supplied, - and/or if the Original Author and/or Licensor designate another party - or parties (e.g., a sponsor institute, publishing entity, journal) for - attribution ("Attribution Parties") in Licensor's copyright notice, - terms of service or by other reasonable means, the name of such party - or parties; (ii) the title of the Work if supplied; (iii) to the - extent reasonably practicable, the URI, if any, that Licensor - specifies to be associated with the Work, unless such URI does not - refer to the copyright notice or licensing information for the Work; - and (iv) , consistent with Section 3(b), in the case of an Adaptation, - a credit identifying the use of the Work in the Adaptation (e.g., - "French translation of the Work by Original Author," or "Screenplay - based on original Work by Original Author"). The credit required by - this Section 4 (b) may be implemented in any reasonable manner; - provided, however, that in the case of a Adaptation or Collection, at - a minimum such credit will appear, if a credit for all contributing - authors of the Adaptation or Collection appears, then as part of these - credits and in a manner at least as prominent as the credits for the - other contributing authors. For the avoidance of doubt, You may only - use the credit required by this Section for the purpose of attribution - in the manner set out above and, by exercising Your rights under this - License, You may not implicitly or explicitly assert or imply any - connection with, sponsorship or endorsement by the Original Author, - Licensor and/or Attribution Parties, as appropriate, of You or Your - use of the Work, without the separate, express prior written - permission of the Original Author, Licensor and/or Attribution - Parties. - c. Except as otherwise agreed in writing by the Licensor or as may be - otherwise permitted by applicable law, if You Reproduce, Distribute or - Publicly Perform the Work either by itself or as part of any - Adaptations or Collections, You must not distort, mutilate, modify or - take other derogatory action in relation to the Work which would be - prejudicial to the Original Author's honor or reputation. Licensor - agrees that in those jurisdictions (e.g. Japan), in which any exercise - of the right granted in Section 3(b) of this License (the right to - make Adaptations) would be deemed to be a distortion, mutilation, - modification or other derogatory action prejudicial to the Original - Author's honor and reputation, the Licensor will waive or not assert, - as appropriate, this Section, to the fullest extent permitted by the - applicable national law, to enable You to reasonably exercise Your - right under Section 3(b) of this License (right to make Adaptations) - but not otherwise. - -5. Representations, Warranties and Disclaimer - -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR -OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY -KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, -INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, -FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF -LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, -WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION -OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE -LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR -ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES -ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS -BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. Termination - - a. This License and the rights granted hereunder will terminate - automatically upon any breach by You of the terms of this License. - Individuals or entities who have received Adaptations or Collections - from You under this License, however, will not have their licenses - terminated provided such individuals or entities remain in full - compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will - survive any termination of this License. - b. Subject to the above terms and conditions, the license granted here is - perpetual (for the duration of the applicable copyright in the Work). - Notwithstanding the above, Licensor reserves the right to release the - Work under different license terms or to stop distributing the Work at - any time; provided, however that any such election will not serve to - withdraw this License (or any other license that has been, or is - required to be, granted under the terms of this License), and this - License will continue in full force and effect unless terminated as - stated above. - -8. Miscellaneous - - a. Each time You Distribute or Publicly Perform the Work or a Collection, - the Licensor offers to the recipient a license to the Work on the same - terms and conditions as the license granted to You under this License. - b. Each time You Distribute or Publicly Perform an Adaptation, Licensor - offers to the recipient a license to the original Work on the same - terms and conditions as the license granted to You under this License. - c. If any provision of this License is invalid or unenforceable under - applicable law, it shall not affect the validity or enforceability of - the remainder of the terms of this License, and without further action - by the parties to this agreement, such provision shall be reformed to - the minimum extent necessary to make such provision valid and - enforceable. - d. No term or provision of this License shall be deemed waived and no - breach consented to unless such waiver or consent shall be in writing - and signed by the party to be charged with such waiver or consent. - e. This License constitutes the entire agreement between the parties with - respect to the Work licensed here. There are no understandings, - agreements or representations with respect to the Work not specified - here. Licensor shall not be bound by any additional provisions that - may appear in any communication from You. This License may not be - modified without the mutual written agreement of the Licensor and You. - f. The rights granted under, and the subject matter referenced, in this - License were drafted utilizing the terminology of the Berne Convention - for the Protection of Literary and Artistic Works (as amended on - September 28, 1979), the Rome Convention of 1961, the WIPO Copyright - Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 - and the Universal Copyright Convention (as revised on July 24, 1971). - These rights and subject matter take effect in the relevant - jurisdiction in which the License terms are sought to be enforced - according to the corresponding provisions of the implementation of - those treaty provisions in the applicable national law. If the - standard suite of rights granted under applicable copyright law - includes additional rights not granted under this License, such - additional rights are deemed to be included in the License; this - License is not intended to restrict the license of any rights under - applicable law. - - -Creative Commons Notice - - Creative Commons is not a party to this License, and makes no warranty - whatsoever in connection with the Work. Creative Commons will not be - liable to You or any party on any legal theory for any damages - whatsoever, including without limitation any general, special, - incidental or consequential damages arising in connection to this - license. Notwithstanding the foregoing two (2) sentences, if Creative - Commons has expressly identified itself as the Licensor hereunder, it - shall have all rights and obligations of Licensor. - - Except for the limited purpose of indicating to the public that the - Work is licensed under the CCPL, Creative Commons does not authorize - the use by either party of the trademark "Creative Commons" or any - related trademark or logo of Creative Commons without the prior - written consent of Creative Commons. Any permitted use will be in - compliance with Creative Commons' then-current trademark usage - guidelines, as may be published on its website or otherwise made - available upon request from time to time. For the avoidance of doubt, - this trademark restriction does not form part of this License. - - Creative Commons may be contacted at http://creativecommons.org/. diff --git a/node_modules/atob/README.md b/node_modules/atob/README.md deleted file mode 100644 index e15ef86b..00000000 --- a/node_modules/atob/README.md +++ /dev/null @@ -1,49 +0,0 @@ -atob -=== - -| **atob** -| [btoa](https://git.coolaj86.com/coolaj86/btoa.js) -| [unibabel.js](https://git.coolaj86.com/coolaj86/unibabel.js) -| Sponsored by [ppl](https://ppl.family) - -Uses `Buffer` to emulate the exact functionality of the browser's atob. - -Note: Unicode may be handled incorrectly (like the browser). - -It turns base64-encoded ascii data back **to** binary. - -```javascript -(function () { - "use strict"; - - var atob = require('atob'); - var b64 = "SGVsbG8sIFdvcmxkIQ=="; - var bin = atob(b64); - - console.log(bin); // "Hello, World!" -}()); -``` - -### Need Unicode and Binary Support in the Browser? - -Check out [unibabel.js](https://git.coolaj86.com/coolaj86/unibabel.js) - -Changelog -======= - - * v2.1.0 address a few issues and PRs, update URLs - * v2.0.0 provide browser version for ios web workers - * v1.2.0 provide (empty) browser version - * v1.1.3 add MIT license - * v1.1.2 node only - -LICENSE -======= - -Code copyright 2012-2018 AJ ONeal - -Dual-licensed MIT and Apache-2.0 - -Docs copyright 2012-2018 AJ ONeal - -Docs released under [Creative Commons](https://git.coolaj86.com/coolaj86/atob.js/blob/master/LICENSE.DOCS). diff --git a/node_modules/atob/bin/atob.js b/node_modules/atob/bin/atob.js deleted file mode 100644 index a56ac2ec..00000000 --- a/node_modules/atob/bin/atob.js +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var atob = require('../node-atob'); -var str = process.argv[2]; -console.log(atob(str)); diff --git a/node_modules/atob/bower.json b/node_modules/atob/bower.json deleted file mode 100644 index e3ef66e2..00000000 --- a/node_modules/atob/bower.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "atob", - "description": "atob for isomorphic environments", - "main": "browser-atob.js", - "authors": [ - "AJ ONeal (https://coolaj86.com)" - ], - "license": "(MIT OR Apache-2.0)", - "keywords": [ - "atob", - "browser" - ], - "homepage": "https://github.com/node-browser-compat/atob", - "moduleType": [ - "globals" - ], - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ] -} diff --git a/node_modules/atob/browser-atob.js b/node_modules/atob/browser-atob.js deleted file mode 100644 index af4f357b..00000000 --- a/node_modules/atob/browser-atob.js +++ /dev/null @@ -1,44 +0,0 @@ -(function (w) { - "use strict"; - - function findBest(atobNative) { - // normal window - if ('function' === typeof atobNative) { return atobNative; } - - - // browserify (web worker) - if ('function' === typeof Buffer) { - return function atobBrowserify(a) { - //!! Deliberately using an API that's deprecated in node.js because - //!! this file is for browsers and we expect them to cope with it. - //!! Discussion: github.com/node-browser-compat/atob/pull/9 - return new Buffer(a, 'base64').toString('binary'); - }; - } - - // ios web worker with base64js - if ('object' === typeof w.base64js) { - // bufferToBinaryString - // https://git.coolaj86.com/coolaj86/unibabel.js/blob/master/index.js#L50 - return function atobWebWorker_iOS(a) { - var buf = w.base64js.b64ToByteArray(a); - return Array.prototype.map.call(buf, function (ch) { - return String.fromCharCode(ch); - }).join(''); - }; - } - - return function () { - // ios web worker without base64js - throw new Error("You're probably in an old browser or an iOS webworker." + - " It might help to include beatgammit's base64-js."); - }; - } - - var atobBest = findBest(w.atob); - w.atob = atobBest; - - if ((typeof module === 'object') && module && module.exports) { - module.exports = atobBest; - } -}(window)); diff --git a/node_modules/atob/node-atob.js b/node_modules/atob/node-atob.js deleted file mode 100644 index d7305a32..00000000 --- a/node_modules/atob/node-atob.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -function atob(str) { - return Buffer.from(str, 'base64').toString('binary'); -} - -module.exports = atob.atob = atob; diff --git a/node_modules/atob/package.json b/node_modules/atob/package.json deleted file mode 100644 index 7d055ffe..00000000 --- a/node_modules/atob/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "_args": [ - [ - "atob@2.1.2", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "atob@2.1.2", - "_id": "atob@2.1.2", - "_inBundle": false, - "_integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "_location": "/atob", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "atob@2.1.2", - "name": "atob", - "escapedName": "atob", - "rawSpec": "2.1.2", - "saveSpec": null, - "fetchSpec": "2.1.2" - }, - "_requiredBy": [ - "/source-map-resolve" - ], - "_resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "_spec": "2.1.2", - "_where": "E:\\python\\setup-php", - "author": { - "name": "AJ ONeal", - "email": "coolaj86@gmail.com", - "url": "https://coolaj86.com" - }, - "bin": { - "atob": "bin/atob.js" - }, - "browser": "browser-atob.js", - "description": "atob for Node.JS and Linux / Mac / Windows CLI (it's a one-liner)", - "engines": { - "node": ">= 4.5.0" - }, - "homepage": "https://git.coolaj86.com/coolaj86/atob.js.git", - "keywords": [ - "atob", - "browser" - ], - "license": "(MIT OR Apache-2.0)", - "main": "node-atob.js", - "name": "atob", - "repository": { - "type": "git", - "url": "git://git.coolaj86.com/coolaj86/atob.js.git" - }, - "version": "2.1.2" -} diff --git a/node_modules/atob/test.js b/node_modules/atob/test.js deleted file mode 100644 index bd80a4ea..00000000 --- a/node_modules/atob/test.js +++ /dev/null @@ -1,18 +0,0 @@ -(function () { - "use strict"; - - var atob = require('.'); - var encoded = "SGVsbG8sIFdvcmxkIQ==" - var unencoded = "Hello, World!"; - /* - , encoded = "SGVsbG8sIBZM" - , unencoded = "Hello, 世界" - */ - - if (unencoded !== atob(encoded)) { - console.log('[FAIL]', unencoded, atob(encoded)); - return; - } - - console.log('[PASS] all tests pass'); -}()); diff --git a/node_modules/aws-sign2/LICENSE b/node_modules/aws-sign2/LICENSE deleted file mode 100644 index a4a9aee0..00000000 --- a/node_modules/aws-sign2/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/aws-sign2/README.md b/node_modules/aws-sign2/README.md deleted file mode 100644 index 763564e0..00000000 --- a/node_modules/aws-sign2/README.md +++ /dev/null @@ -1,4 +0,0 @@ -aws-sign -======== - -AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module. diff --git a/node_modules/aws-sign2/index.js b/node_modules/aws-sign2/index.js deleted file mode 100644 index fb35f6db..00000000 --- a/node_modules/aws-sign2/index.js +++ /dev/null @@ -1,212 +0,0 @@ - -/*! - * Copyright 2010 LearnBoost - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Module dependencies. - */ - -var crypto = require('crypto') - , parse = require('url').parse - ; - -/** - * Valid keys. - */ - -var keys = - [ 'acl' - , 'location' - , 'logging' - , 'notification' - , 'partNumber' - , 'policy' - , 'requestPayment' - , 'torrent' - , 'uploadId' - , 'uploads' - , 'versionId' - , 'versioning' - , 'versions' - , 'website' - ] - -/** - * Return an "Authorization" header value with the given `options` - * in the form of "AWS :" - * - * @param {Object} options - * @return {String} - * @api private - */ - -function authorization (options) { - return 'AWS ' + options.key + ':' + sign(options) -} - -module.exports = authorization -module.exports.authorization = authorization - -/** - * Simple HMAC-SHA1 Wrapper - * - * @param {Object} options - * @return {String} - * @api private - */ - -function hmacSha1 (options) { - return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64') -} - -module.exports.hmacSha1 = hmacSha1 - -/** - * Create a base64 sha1 HMAC for `options`. - * - * @param {Object} options - * @return {String} - * @api private - */ - -function sign (options) { - options.message = stringToSign(options) - return hmacSha1(options) -} -module.exports.sign = sign - -/** - * Create a base64 sha1 HMAC for `options`. - * - * Specifically to be used with S3 presigned URLs - * - * @param {Object} options - * @return {String} - * @api private - */ - -function signQuery (options) { - options.message = queryStringToSign(options) - return hmacSha1(options) -} -module.exports.signQuery= signQuery - -/** - * Return a string for sign() with the given `options`. - * - * Spec: - * - * \n - * \n - * \n - * \n - * [headers\n] - * - * - * @param {Object} options - * @return {String} - * @api private - */ - -function stringToSign (options) { - var headers = options.amazonHeaders || '' - if (headers) headers += '\n' - var r = - [ options.verb - , options.md5 - , options.contentType - , options.date ? options.date.toUTCString() : '' - , headers + options.resource - ] - return r.join('\n') -} -module.exports.stringToSign = stringToSign - -/** - * Return a string for sign() with the given `options`, but is meant exclusively - * for S3 presigned URLs - * - * Spec: - * - * \n - * - * - * @param {Object} options - * @return {String} - * @api private - */ - -function queryStringToSign (options){ - return 'GET\n\n\n' + options.date + '\n' + options.resource -} -module.exports.queryStringToSign = queryStringToSign - -/** - * Perform the following: - * - * - ignore non-amazon headers - * - lowercase fields - * - sort lexicographically - * - trim whitespace between ":" - * - join with newline - * - * @param {Object} headers - * @return {String} - * @api private - */ - -function canonicalizeHeaders (headers) { - var buf = [] - , fields = Object.keys(headers) - ; - for (var i = 0, len = fields.length; i < len; ++i) { - var field = fields[i] - , val = headers[field] - , field = field.toLowerCase() - ; - if (0 !== field.indexOf('x-amz')) continue - buf.push(field + ':' + val) - } - return buf.sort().join('\n') -} -module.exports.canonicalizeHeaders = canonicalizeHeaders - -/** - * Perform the following: - * - * - ignore non sub-resources - * - sort lexicographically - * - * @param {String} resource - * @return {String} - * @api private - */ - -function canonicalizeResource (resource) { - var url = parse(resource, true) - , path = url.pathname - , buf = [] - ; - - Object.keys(url.query).forEach(function(key){ - if (!~keys.indexOf(key)) return - var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key]) - buf.push(key + val) - }) - - return path + (buf.length ? '?' + buf.sort().join('&') : '') -} -module.exports.canonicalizeResource = canonicalizeResource diff --git a/node_modules/aws-sign2/package.json b/node_modules/aws-sign2/package.json deleted file mode 100644 index 41cb07c4..00000000 --- a/node_modules/aws-sign2/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "_args": [ - [ - "aws-sign2@0.7.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "aws-sign2@0.7.0", - "_id": "aws-sign2@0.7.0", - "_inBundle": false, - "_integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "_location": "/aws-sign2", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "aws-sign2@0.7.0", - "name": "aws-sign2", - "escapedName": "aws-sign2", - "rawSpec": "0.7.0", - "saveSpec": null, - "fetchSpec": "0.7.0" - }, - "_requiredBy": [ - "/request" - ], - "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "_spec": "0.7.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Mikeal Rogers", - "email": "mikeal.rogers@gmail.com", - "url": "http://www.futurealoof.com" - }, - "bugs": { - "url": "https://github.com/mikeal/aws-sign/issues" - }, - "dependencies": {}, - "description": "AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.", - "devDependencies": {}, - "engines": { - "node": "*" - }, - "homepage": "https://github.com/mikeal/aws-sign#readme", - "license": "Apache-2.0", - "main": "index.js", - "name": "aws-sign2", - "optionalDependencies": {}, - "repository": { - "url": "git+https://github.com/mikeal/aws-sign.git" - }, - "version": "0.7.0" -} diff --git a/node_modules/aws4/.travis.yml b/node_modules/aws4/.travis.yml deleted file mode 100644 index 61d06340..00000000 --- a/node_modules/aws4/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.12" - - "4.2" diff --git a/node_modules/aws4/LICENSE b/node_modules/aws4/LICENSE deleted file mode 100644 index 4f321e59..00000000 --- a/node_modules/aws4/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2013 Michael Hart (michael.hart.au@gmail.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/aws4/README.md b/node_modules/aws4/README.md deleted file mode 100644 index 6b002d02..00000000 --- a/node_modules/aws4/README.md +++ /dev/null @@ -1,523 +0,0 @@ -aws4 ----- - -[![Build Status](https://secure.travis-ci.org/mhart/aws4.png?branch=master)](http://travis-ci.org/mhart/aws4) - -A small utility to sign vanilla node.js http(s) request options using Amazon's -[AWS Signature Version 4](http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html). - -Can also be used [in the browser](./browser). - -This signature is supported by nearly all Amazon services, including -[S3](http://docs.aws.amazon.com/AmazonS3/latest/API/), -[EC2](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/), -[DynamoDB](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/API.html), -[Kinesis](http://docs.aws.amazon.com/kinesis/latest/APIReference/), -[Lambda](http://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html), -[SQS](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/), -[SNS](http://docs.aws.amazon.com/sns/latest/api/), -[IAM](http://docs.aws.amazon.com/IAM/latest/APIReference/), -[STS](http://docs.aws.amazon.com/STS/latest/APIReference/), -[RDS](http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/), -[CloudWatch](http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/), -[CloudWatch Logs](http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/), -[CodeDeploy](http://docs.aws.amazon.com/codedeploy/latest/APIReference/), -[CloudFront](http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/), -[CloudTrail](http://docs.aws.amazon.com/awscloudtrail/latest/APIReference/), -[ElastiCache](http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/), -[EMR](http://docs.aws.amazon.com/ElasticMapReduce/latest/API/), -[Glacier](http://docs.aws.amazon.com/amazonglacier/latest/dev/amazon-glacier-api.html), -[CloudSearch](http://docs.aws.amazon.com/cloudsearch/latest/developerguide/APIReq.html), -[Elastic Load Balancing](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/), -[Elastic Transcoder](http://docs.aws.amazon.com/elastictranscoder/latest/developerguide/api-reference.html), -[CloudFormation](http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/), -[Elastic Beanstalk](http://docs.aws.amazon.com/elasticbeanstalk/latest/api/), -[Storage Gateway](http://docs.aws.amazon.com/storagegateway/latest/userguide/AWSStorageGatewayAPI.html), -[Data Pipeline](http://docs.aws.amazon.com/datapipeline/latest/APIReference/), -[Direct Connect](http://docs.aws.amazon.com/directconnect/latest/APIReference/), -[Redshift](http://docs.aws.amazon.com/redshift/latest/APIReference/), -[OpsWorks](http://docs.aws.amazon.com/opsworks/latest/APIReference/), -[SES](http://docs.aws.amazon.com/ses/latest/APIReference/), -[SWF](http://docs.aws.amazon.com/amazonswf/latest/apireference/), -[AutoScaling](http://docs.aws.amazon.com/AutoScaling/latest/APIReference/), -[Mobile Analytics](http://docs.aws.amazon.com/mobileanalytics/latest/ug/server-reference.html), -[Cognito Identity](http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/), -[Cognito Sync](http://docs.aws.amazon.com/cognitosync/latest/APIReference/), -[Container Service](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/), -[AppStream](http://docs.aws.amazon.com/appstream/latest/developerguide/appstream-api-rest.html), -[Key Management Service](http://docs.aws.amazon.com/kms/latest/APIReference/), -[Config](http://docs.aws.amazon.com/config/latest/APIReference/), -[CloudHSM](http://docs.aws.amazon.com/cloudhsm/latest/dg/api-ref.html), -[Route53](http://docs.aws.amazon.com/Route53/latest/APIReference/requests-rest.html) and -[Route53 Domains](http://docs.aws.amazon.com/Route53/latest/APIReference/requests-rpc.html). - -Indeed, the only AWS services that *don't* support v4 as of 2014-12-30 are -[Import/Export](http://docs.aws.amazon.com/AWSImportExport/latest/DG/api-reference.html) and -[SimpleDB](http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API.html) -(they only support [AWS Signature Version 2](https://github.com/mhart/aws2)). - -It also provides defaults for a number of core AWS headers and -request parameters, making it very easy to query AWS services, or -build out a fully-featured AWS library. - -Example -------- - -```javascript -var http = require('http'), - https = require('https'), - aws4 = require('aws4') - -// given an options object you could pass to http.request -var opts = {host: 'sqs.us-east-1.amazonaws.com', path: '/?Action=ListQueues'} - -// alternatively (as aws4 can infer the host): -opts = {service: 'sqs', region: 'us-east-1', path: '/?Action=ListQueues'} - -// alternatively (as us-east-1 is default): -opts = {service: 'sqs', path: '/?Action=ListQueues'} - -aws4.sign(opts) // assumes AWS credentials are available in process.env - -console.log(opts) -/* -{ - host: 'sqs.us-east-1.amazonaws.com', - path: '/?Action=ListQueues', - headers: { - Host: 'sqs.us-east-1.amazonaws.com', - 'X-Amz-Date': '20121226T061030Z', - Authorization: 'AWS4-HMAC-SHA256 Credential=ABCDEF/20121226/us-east-1/sqs/aws4_request, ...' - } -} -*/ - -// we can now use this to query AWS using the standard node.js http API -http.request(opts, function(res) { res.pipe(process.stdout) }).end() -/* - - -... -*/ -``` - -More options ------------- - -```javascript -// you can also pass AWS credentials in explicitly (otherwise taken from process.env) -aws4.sign(opts, {accessKeyId: '', secretAccessKey: ''}) - -// can also add the signature to query strings -aws4.sign({service: 's3', path: '/my-bucket?X-Amz-Expires=12345', signQuery: true}) - -// create a utility function to pipe to stdout (with https this time) -function request(o) { https.request(o, function(res) { res.pipe(process.stdout) }).end(o.body || '') } - -// aws4 can infer the HTTP method if a body is passed in -// method will be POST and Content-Type: 'application/x-www-form-urlencoded; charset=utf-8' -request(aws4.sign({service: 'iam', body: 'Action=ListGroups&Version=2010-05-08'})) -/* - -... -*/ - -// can specify any custom option or header as per usual -request(aws4.sign({ - service: 'dynamodb', - region: 'ap-southeast-2', - method: 'POST', - path: '/', - headers: { - 'Content-Type': 'application/x-amz-json-1.0', - 'X-Amz-Target': 'DynamoDB_20120810.ListTables' - }, - body: '{}' -})) -/* -{"TableNames":[]} -... -*/ - -// works with all other services that support Signature Version 4 - -request(aws4.sign({service: 's3', path: '/', signQuery: true})) -/* - -... -*/ - -request(aws4.sign({service: 'ec2', path: '/?Action=DescribeRegions&Version=2014-06-15'})) -/* - -... -*/ - -request(aws4.sign({service: 'sns', path: '/?Action=ListTopics&Version=2010-03-31'})) -/* - -... -*/ - -request(aws4.sign({service: 'sts', path: '/?Action=GetSessionToken&Version=2011-06-15'})) -/* - -... -*/ - -request(aws4.sign({service: 'cloudsearch', path: '/?Action=ListDomainNames&Version=2013-01-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'ses', path: '/?Action=ListIdentities&Version=2010-12-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'autoscaling', path: '/?Action=DescribeAutoScalingInstances&Version=2011-01-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'elasticloadbalancing', path: '/?Action=DescribeLoadBalancers&Version=2012-06-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'cloudformation', path: '/?Action=ListStacks&Version=2010-05-15'})) -/* - -... -*/ - -request(aws4.sign({service: 'elasticbeanstalk', path: '/?Action=ListAvailableSolutionStacks&Version=2010-12-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'rds', path: '/?Action=DescribeDBInstances&Version=2012-09-17'})) -/* - -... -*/ - -request(aws4.sign({service: 'monitoring', path: '/?Action=ListMetrics&Version=2010-08-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'redshift', path: '/?Action=DescribeClusters&Version=2012-12-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'cloudfront', path: '/2014-05-31/distribution'})) -/* - -... -*/ - -request(aws4.sign({service: 'elasticache', path: '/?Action=DescribeCacheClusters&Version=2014-07-15'})) -/* - -... -*/ - -request(aws4.sign({service: 'elasticmapreduce', path: '/?Action=DescribeJobFlows&Version=2009-03-31'})) -/* - -... -*/ - -request(aws4.sign({service: 'route53', path: '/2013-04-01/hostedzone'})) -/* - -... -*/ - -request(aws4.sign({service: 'appstream', path: '/applications'})) -/* -{"_links":{"curie":[{"href":"http://docs.aws.amazon.com/appstream/latest/... -... -*/ - -request(aws4.sign({service: 'cognito-sync', path: '/identitypools'})) -/* -{"Count":0,"IdentityPoolUsages":[],"MaxResults":16,"NextToken":null} -... -*/ - -request(aws4.sign({service: 'elastictranscoder', path: '/2012-09-25/pipelines'})) -/* -{"NextPageToken":null,"Pipelines":[]} -... -*/ - -request(aws4.sign({service: 'lambda', path: '/2014-11-13/functions/'})) -/* -{"Functions":[],"NextMarker":null} -... -*/ - -request(aws4.sign({service: 'ecs', path: '/?Action=ListClusters&Version=2014-11-13'})) -/* - -... -*/ - -request(aws4.sign({service: 'glacier', path: '/-/vaults', headers: {'X-Amz-Glacier-Version': '2012-06-01'}})) -/* -{"Marker":null,"VaultList":[]} -... -*/ - -request(aws4.sign({service: 'storagegateway', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'StorageGateway_20120630.ListGateways' -}})) -/* -{"Gateways":[]} -... -*/ - -request(aws4.sign({service: 'datapipeline', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'DataPipeline.ListPipelines' -}})) -/* -{"hasMoreResults":false,"pipelineIdList":[]} -... -*/ - -request(aws4.sign({service: 'opsworks', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'OpsWorks_20130218.DescribeStacks' -}})) -/* -{"Stacks":[]} -... -*/ - -request(aws4.sign({service: 'route53domains', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'Route53Domains_v20140515.ListDomains' -}})) -/* -{"Domains":[]} -... -*/ - -request(aws4.sign({service: 'kinesis', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'Kinesis_20131202.ListStreams' -}})) -/* -{"HasMoreStreams":false,"StreamNames":[]} -... -*/ - -request(aws4.sign({service: 'cloudtrail', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'CloudTrail_20131101.DescribeTrails' -}})) -/* -{"trailList":[]} -... -*/ - -request(aws4.sign({service: 'logs', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'Logs_20140328.DescribeLogGroups' -}})) -/* -{"logGroups":[]} -... -*/ - -request(aws4.sign({service: 'codedeploy', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'CodeDeploy_20141006.ListApplications' -}})) -/* -{"applications":[]} -... -*/ - -request(aws4.sign({service: 'directconnect', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'OvertureService.DescribeConnections' -}})) -/* -{"connections":[]} -... -*/ - -request(aws4.sign({service: 'kms', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'TrentService.ListKeys' -}})) -/* -{"Keys":[],"Truncated":false} -... -*/ - -request(aws4.sign({service: 'config', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'StarlingDoveService.DescribeDeliveryChannels' -}})) -/* -{"DeliveryChannels":[]} -... -*/ - -request(aws4.sign({service: 'cloudhsm', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'CloudHsmFrontendService.ListAvailableZones' -}})) -/* -{"AZList":["us-east-1a","us-east-1b","us-east-1c"]} -... -*/ - -request(aws4.sign({ - service: 'swf', - body: '{"registrationStatus":"REGISTERED"}', - headers: { - 'Content-Type': 'application/x-amz-json-1.0', - 'X-Amz-Target': 'SimpleWorkflowService.ListDomains' - } -})) -/* -{"domainInfos":[]} -... -*/ - -request(aws4.sign({ - service: 'cognito-identity', - body: '{"MaxResults": 1}', - headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'AWSCognitoIdentityService.ListIdentityPools' - } -})) -/* -{"IdentityPools":[]} -... -*/ - -request(aws4.sign({ - service: 'mobileanalytics', - path: '/2014-06-05/events', - body: JSON.stringify({events:[{ - eventType: 'a', - timestamp: new Date().toISOString(), - session: {}, - }]}), - headers: { - 'Content-Type': 'application/json', - 'X-Amz-Client-Context': JSON.stringify({ - client: {client_id: 'a', app_title: 'a'}, - custom: {}, - env: {platform: 'a'}, - services: {}, - }), - } -})) -/* -(HTTP 202, empty response) -*/ - -// Generate CodeCommit Git access password -var signer = new aws4.RequestSigner({ - service: 'codecommit', - host: 'git-codecommit.us-east-1.amazonaws.com', - method: 'GIT', - path: '/v1/repos/MyAwesomeRepo', -}) -var password = signer.getDateTime() + 'Z' + signer.signature() -``` - -API ---- - -### aws4.sign(requestOptions, [credentials]) - -This calculates and populates the `Authorization` header of -`requestOptions`, and any other necessary AWS headers and/or request -options. Returns `requestOptions` as a convenience for chaining. - -`requestOptions` is an object holding the same options that the node.js -[http.request](http://nodejs.org/docs/latest/api/http.html#http_http_request_options_callback) -function takes. - -The following properties of `requestOptions` are used in the signing or -populated if they don't already exist: - -- `hostname` or `host` (will be determined from `service` and `region` if not given) -- `method` (will use `'GET'` if not given or `'POST'` if there is a `body`) -- `path` (will use `'/'` if not given) -- `body` (will use `''` if not given) -- `service` (will be calculated from `hostname` or `host` if not given) -- `region` (will be calculated from `hostname` or `host` or use `'us-east-1'` if not given) -- `headers['Host']` (will use `hostname` or `host` or be calculated if not given) -- `headers['Content-Type']` (will use `'application/x-www-form-urlencoded; charset=utf-8'` - if not given and there is a `body`) -- `headers['Date']` (used to calculate the signature date if given, otherwise `new Date` is used) - -Your AWS credentials (which can be found in your -[AWS console](https://portal.aws.amazon.com/gp/aws/securityCredentials)) -can be specified in one of two ways: - -- As the second argument, like this: - -```javascript -aws4.sign(requestOptions, { - secretAccessKey: "", - accessKeyId: "", - sessionToken: "" -}) -``` - -- From `process.env`, such as this: - -``` -export AWS_SECRET_ACCESS_KEY="" -export AWS_ACCESS_KEY_ID="" -export AWS_SESSION_TOKEN="" -``` - -(will also use `AWS_ACCESS_KEY` and `AWS_SECRET_KEY` if available) - -The `sessionToken` property and `AWS_SESSION_TOKEN` environment variable are optional for signing -with [IAM STS temporary credentials](http://docs.aws.amazon.com/STS/latest/UsingSTS/using-temp-creds.html). - -Installation ------------- - -With [npm](http://npmjs.org/) do: - -``` -npm install aws4 -``` - -Can also be used [in the browser](./browser). - -Thanks ------- - -Thanks to [@jed](https://github.com/jed) for his -[dynamo-client](https://github.com/jed/dynamo-client) lib where I first -committed and subsequently extracted this code. - -Also thanks to the -[official node.js AWS SDK](https://github.com/aws/aws-sdk-js) for giving -me a start on implementing the v4 signature. - diff --git a/node_modules/aws4/aws4.js b/node_modules/aws4/aws4.js deleted file mode 100644 index 124cd7ac..00000000 --- a/node_modules/aws4/aws4.js +++ /dev/null @@ -1,332 +0,0 @@ -var aws4 = exports, - url = require('url'), - querystring = require('querystring'), - crypto = require('crypto'), - lru = require('./lru'), - credentialsCache = lru(1000) - -// http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html - -function hmac(key, string, encoding) { - return crypto.createHmac('sha256', key).update(string, 'utf8').digest(encoding) -} - -function hash(string, encoding) { - return crypto.createHash('sha256').update(string, 'utf8').digest(encoding) -} - -// This function assumes the string has already been percent encoded -function encodeRfc3986(urlEncodedString) { - return urlEncodedString.replace(/[!'()*]/g, function(c) { - return '%' + c.charCodeAt(0).toString(16).toUpperCase() - }) -} - -// request: { path | body, [host], [method], [headers], [service], [region] } -// credentials: { accessKeyId, secretAccessKey, [sessionToken] } -function RequestSigner(request, credentials) { - - if (typeof request === 'string') request = url.parse(request) - - var headers = request.headers = (request.headers || {}), - hostParts = this.matchHost(request.hostname || request.host || headers.Host || headers.host) - - this.request = request - this.credentials = credentials || this.defaultCredentials() - - this.service = request.service || hostParts[0] || '' - this.region = request.region || hostParts[1] || 'us-east-1' - - // SES uses a different domain from the service name - if (this.service === 'email') this.service = 'ses' - - if (!request.method && request.body) - request.method = 'POST' - - if (!headers.Host && !headers.host) { - headers.Host = request.hostname || request.host || this.createHost() - - // If a port is specified explicitly, use it as is - if (request.port) - headers.Host += ':' + request.port - } - if (!request.hostname && !request.host) - request.hostname = headers.Host || headers.host - - this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT' -} - -RequestSigner.prototype.matchHost = function(host) { - var match = (host || '').match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com(\.cn)?$/) - var hostParts = (match || []).slice(1, 3) - - // ES's hostParts are sometimes the other way round, if the value that is expected - // to be region equals ‘es’ switch them back - // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com - if (hostParts[1] === 'es') - hostParts = hostParts.reverse() - - return hostParts -} - -// http://docs.aws.amazon.com/general/latest/gr/rande.html -RequestSigner.prototype.isSingleRegion = function() { - // Special case for S3 and SimpleDB in us-east-1 - if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true - - return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts'] - .indexOf(this.service) >= 0 -} - -RequestSigner.prototype.createHost = function() { - var region = this.isSingleRegion() ? '' : - (this.service === 's3' && this.region !== 'us-east-1' ? '-' : '.') + this.region, - service = this.service === 'ses' ? 'email' : this.service - return service + region + '.amazonaws.com' -} - -RequestSigner.prototype.prepareRequest = function() { - this.parsePath() - - var request = this.request, headers = request.headers, query - - if (request.signQuery) { - - this.parsedPath.query = query = this.parsedPath.query || {} - - if (this.credentials.sessionToken) - query['X-Amz-Security-Token'] = this.credentials.sessionToken - - if (this.service === 's3' && !query['X-Amz-Expires']) - query['X-Amz-Expires'] = 86400 - - if (query['X-Amz-Date']) - this.datetime = query['X-Amz-Date'] - else - query['X-Amz-Date'] = this.getDateTime() - - query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256' - query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString() - query['X-Amz-SignedHeaders'] = this.signedHeaders() - - } else { - - if (!request.doNotModifyHeaders && !this.isCodeCommitGit) { - if (request.body && !headers['Content-Type'] && !headers['content-type']) - headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8' - - if (request.body && !headers['Content-Length'] && !headers['content-length']) - headers['Content-Length'] = Buffer.byteLength(request.body) - - if (this.credentials.sessionToken && !headers['X-Amz-Security-Token'] && !headers['x-amz-security-token']) - headers['X-Amz-Security-Token'] = this.credentials.sessionToken - - if (this.service === 's3' && !headers['X-Amz-Content-Sha256'] && !headers['x-amz-content-sha256']) - headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex') - - if (headers['X-Amz-Date'] || headers['x-amz-date']) - this.datetime = headers['X-Amz-Date'] || headers['x-amz-date'] - else - headers['X-Amz-Date'] = this.getDateTime() - } - - delete headers.Authorization - delete headers.authorization - } -} - -RequestSigner.prototype.sign = function() { - if (!this.parsedPath) this.prepareRequest() - - if (this.request.signQuery) { - this.parsedPath.query['X-Amz-Signature'] = this.signature() - } else { - this.request.headers.Authorization = this.authHeader() - } - - this.request.path = this.formatPath() - - return this.request -} - -RequestSigner.prototype.getDateTime = function() { - if (!this.datetime) { - var headers = this.request.headers, - date = new Date(headers.Date || headers.date || new Date) - - this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '') - - // Remove the trailing 'Z' on the timestamp string for CodeCommit git access - if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1) - } - return this.datetime -} - -RequestSigner.prototype.getDate = function() { - return this.getDateTime().substr(0, 8) -} - -RequestSigner.prototype.authHeader = function() { - return [ - 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(), - 'SignedHeaders=' + this.signedHeaders(), - 'Signature=' + this.signature(), - ].join(', ') -} - -RequestSigner.prototype.signature = function() { - var date = this.getDate(), - cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(), - kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey) - if (!kCredentials) { - kDate = hmac('AWS4' + this.credentials.secretAccessKey, date) - kRegion = hmac(kDate, this.region) - kService = hmac(kRegion, this.service) - kCredentials = hmac(kService, 'aws4_request') - credentialsCache.set(cacheKey, kCredentials) - } - return hmac(kCredentials, this.stringToSign(), 'hex') -} - -RequestSigner.prototype.stringToSign = function() { - return [ - 'AWS4-HMAC-SHA256', - this.getDateTime(), - this.credentialString(), - hash(this.canonicalString(), 'hex'), - ].join('\n') -} - -RequestSigner.prototype.canonicalString = function() { - if (!this.parsedPath) this.prepareRequest() - - var pathStr = this.parsedPath.path, - query = this.parsedPath.query, - headers = this.request.headers, - queryStr = '', - normalizePath = this.service !== 's3', - decodePath = this.service === 's3' || this.request.doNotEncodePath, - decodeSlashesInPath = this.service === 's3', - firstValOnly = this.service === 's3', - bodyHash - - if (this.service === 's3' && this.request.signQuery) { - bodyHash = 'UNSIGNED-PAYLOAD' - } else if (this.isCodeCommitGit) { - bodyHash = '' - } else { - bodyHash = headers['X-Amz-Content-Sha256'] || headers['x-amz-content-sha256'] || - hash(this.request.body || '', 'hex') - } - - if (query) { - queryStr = encodeRfc3986(querystring.stringify(Object.keys(query).sort().reduce(function(obj, key) { - if (!key) return obj - obj[key] = !Array.isArray(query[key]) ? query[key] : - (firstValOnly ? query[key][0] : query[key].slice().sort()) - return obj - }, {}))) - } - if (pathStr !== '/') { - if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/') - pathStr = pathStr.split('/').reduce(function(path, piece) { - if (normalizePath && piece === '..') { - path.pop() - } else if (!normalizePath || piece !== '.') { - if (decodePath) piece = decodeURIComponent(piece) - path.push(encodeRfc3986(encodeURIComponent(piece))) - } - return path - }, []).join('/') - if (pathStr[0] !== '/') pathStr = '/' + pathStr - if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/') - } - - return [ - this.request.method || 'GET', - pathStr, - queryStr, - this.canonicalHeaders() + '\n', - this.signedHeaders(), - bodyHash, - ].join('\n') -} - -RequestSigner.prototype.canonicalHeaders = function() { - var headers = this.request.headers - function trimAll(header) { - return header.toString().trim().replace(/\s+/g, ' ') - } - return Object.keys(headers) - .sort(function(a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1 }) - .map(function(key) { return key.toLowerCase() + ':' + trimAll(headers[key]) }) - .join('\n') -} - -RequestSigner.prototype.signedHeaders = function() { - return Object.keys(this.request.headers) - .map(function(key) { return key.toLowerCase() }) - .sort() - .join(';') -} - -RequestSigner.prototype.credentialString = function() { - return [ - this.getDate(), - this.region, - this.service, - 'aws4_request', - ].join('/') -} - -RequestSigner.prototype.defaultCredentials = function() { - var env = process.env - return { - accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY, - secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY, - sessionToken: env.AWS_SESSION_TOKEN, - } -} - -RequestSigner.prototype.parsePath = function() { - var path = this.request.path || '/', - queryIx = path.indexOf('?'), - query = null - - if (queryIx >= 0) { - query = querystring.parse(path.slice(queryIx + 1)) - path = path.slice(0, queryIx) - } - - // S3 doesn't always encode characters > 127 correctly and - // all services don't encode characters > 255 correctly - // So if there are non-reserved chars (and it's not already all % encoded), just encode them all - if (/[^0-9A-Za-z!'()*\-._~%/]/.test(path)) { - path = path.split('/').map(function(piece) { - return encodeURIComponent(decodeURIComponent(piece)) - }).join('/') - } - - this.parsedPath = { - path: path, - query: query, - } -} - -RequestSigner.prototype.formatPath = function() { - var path = this.parsedPath.path, - query = this.parsedPath.query - - if (!query) return path - - // Services don't support empty query string keys - if (query[''] != null) delete query[''] - - return path + '?' + encodeRfc3986(querystring.stringify(query)) -} - -aws4.RequestSigner = RequestSigner - -aws4.sign = function(request, credentials) { - return new RequestSigner(request, credentials).sign() -} diff --git a/node_modules/aws4/lru.js b/node_modules/aws4/lru.js deleted file mode 100644 index 333f66a4..00000000 --- a/node_modules/aws4/lru.js +++ /dev/null @@ -1,96 +0,0 @@ -module.exports = function(size) { - return new LruCache(size) -} - -function LruCache(size) { - this.capacity = size | 0 - this.map = Object.create(null) - this.list = new DoublyLinkedList() -} - -LruCache.prototype.get = function(key) { - var node = this.map[key] - if (node == null) return undefined - this.used(node) - return node.val -} - -LruCache.prototype.set = function(key, val) { - var node = this.map[key] - if (node != null) { - node.val = val - } else { - if (!this.capacity) this.prune() - if (!this.capacity) return false - node = new DoublyLinkedNode(key, val) - this.map[key] = node - this.capacity-- - } - this.used(node) - return true -} - -LruCache.prototype.used = function(node) { - this.list.moveToFront(node) -} - -LruCache.prototype.prune = function() { - var node = this.list.pop() - if (node != null) { - delete this.map[node.key] - this.capacity++ - } -} - - -function DoublyLinkedList() { - this.firstNode = null - this.lastNode = null -} - -DoublyLinkedList.prototype.moveToFront = function(node) { - if (this.firstNode == node) return - - this.remove(node) - - if (this.firstNode == null) { - this.firstNode = node - this.lastNode = node - node.prev = null - node.next = null - } else { - node.prev = null - node.next = this.firstNode - node.next.prev = node - this.firstNode = node - } -} - -DoublyLinkedList.prototype.pop = function() { - var lastNode = this.lastNode - if (lastNode != null) { - this.remove(lastNode) - } - return lastNode -} - -DoublyLinkedList.prototype.remove = function(node) { - if (this.firstNode == node) { - this.firstNode = node.next - } else if (node.prev != null) { - node.prev.next = node.next - } - if (this.lastNode == node) { - this.lastNode = node.prev - } else if (node.next != null) { - node.next.prev = node.prev - } -} - - -function DoublyLinkedNode(key, val) { - this.key = key - this.val = val - this.prev = null - this.next = null -} diff --git a/node_modules/aws4/package.json b/node_modules/aws4/package.json deleted file mode 100644 index b51b9e5c..00000000 --- a/node_modules/aws4/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_args": [ - [ - "aws4@1.8.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "aws4@1.8.0", - "_id": "aws4@1.8.0", - "_inBundle": false, - "_integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "_location": "/aws4", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "aws4@1.8.0", - "name": "aws4", - "escapedName": "aws4", - "rawSpec": "1.8.0", - "saveSpec": null, - "fetchSpec": "1.8.0" - }, - "_requiredBy": [ - "/request" - ], - "_resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "_spec": "1.8.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Michael Hart", - "email": "michael.hart.au@gmail.com", - "url": "http://github.com/mhart" - }, - "bugs": { - "url": "https://github.com/mhart/aws4/issues" - }, - "description": "Signs and prepares requests using AWS Signature Version 4", - "devDependencies": { - "mocha": "^2.4.5", - "should": "^8.2.2" - }, - "homepage": "https://github.com/mhart/aws4#readme", - "keywords": [ - "amazon", - "aws", - "signature", - "s3", - "ec2", - "autoscaling", - "cloudformation", - "elasticloadbalancing", - "elb", - "elasticbeanstalk", - "cloudsearch", - "dynamodb", - "kinesis", - "lambda", - "glacier", - "sqs", - "sns", - "iam", - "sts", - "ses", - "swf", - "storagegateway", - "datapipeline", - "directconnect", - "redshift", - "opsworks", - "rds", - "monitoring", - "cloudtrail", - "cloudfront", - "codedeploy", - "elasticache", - "elasticmapreduce", - "elastictranscoder", - "emr", - "cloudwatch", - "mobileanalytics", - "cognitoidentity", - "cognitosync", - "cognito", - "containerservice", - "ecs", - "appstream", - "keymanagementservice", - "kms", - "config", - "cloudhsm", - "route53", - "route53domains", - "logs" - ], - "license": "MIT", - "main": "aws4.js", - "name": "aws4", - "repository": { - "type": "git", - "url": "git+https://github.com/mhart/aws4.git" - }, - "scripts": { - "test": "mocha ./test/fast.js ./test/slow.js -b -t 100s -R list" - }, - "version": "1.8.0" -} diff --git a/node_modules/axios/CHANGELOG.md b/node_modules/axios/CHANGELOG.md deleted file mode 100644 index 1b3c0df8..00000000 --- a/node_modules/axios/CHANGELOG.md +++ /dev/null @@ -1,348 +0,0 @@ -# Changelog - -### 0.19.0 (May 30, 2019) - -Fixes and Functionality: - -- Unzip response body only for statuses != 204 ([#1129](https://github.com/axios/axios/pull/1129)) - drawski -- Destroy stream on exceeding maxContentLength (fixes [#1098](https://github.com/axios/axios/issue/1098)) ([#1485](https://github.com/axios/axios/pull/1485)) - Gadzhi Gadzhiev -- Makes Axios error generic to use AxiosResponse ([#1738](https://github.com/axios/axios/pull/1738)) - Suman Lama -- Fixing Mocha tests by locking follow-redirects version to 1.5.10 ([#1993](https://github.com/axios/axios/pull/1993)) - grumblerchester -- Allow uppercase methods in typings. ([#1781](https://github.com/axios/axios/pull/1781)) - Ken Powers -- Fixing .eslintrc without extension ([#1789](https://github.com/axios/axios/pull/1789)) - Manoel -- Consistent coding style ([#1787](https://github.com/axios/axios/pull/1787)) - Ali Servet Donmez -- Fixing building url with hash mark ([#1771](https://github.com/axios/axios/pull/1771)) - Anatoly Ryabov -- This commit fix building url with hash map (fragment identifier) when parameters are present: they must not be added after `#`, because client cut everything after `#` -- Preserve HTTP method when following redirect ([#1758](https://github.com/axios/axios/pull/1758)) - Rikki Gibson -- Add `getUri` signature to TypeScript definition. ([#1736](https://github.com/axios/axios/pull/1736)) - Alexander Trauzzi -- Adding isAxiosError flag to errors thrown by axios ([#1419](https://github.com/axios/axios/pull/1419)) - Ayush Gupta -- Fix failing SauceLabs tests by updating configuration - Emily Morehouse - -Documentation: - -- Add information about auth parameter to README ([#2166](https://github.com/axios/axios/pull/2166)) - xlaguna -- Add DELETE to list of methods that allow data as a config option ([#2169](https://github.com/axios/axios/pull/2169)) - Daniela Borges Matos de Carvalho -- Update ECOSYSTEM.md - Add Axios Endpoints ([#2176](https://github.com/axios/axios/pull/2176)) - Renan -- Add r2curl in ECOSYSTEM ([#2141](https://github.com/axios/axios/pull/2141)) - 유용우 / CX -- Update README.md - Add instructions for installing with yarn ([#2036](https://github.com/axios/axios/pull/2036)) - Victor Hermes -- Fixing spacing for README.md ([#2066](https://github.com/axios/axios/pull/2066)) - Josh McCarty -- Update README.md. - Change `.then` to `.finally` in example code ([#2090](https://github.com/axios/axios/pull/2090)) - Omar Cai -- Clarify what values responseType can have in Node ([#2121](https://github.com/axios/axios/pull/2121)) - Tyler Breisacher -- docs(ECOSYSTEM): add axios-api-versioning ([#2020](https://github.com/axios/axios/pull/2020)) - Weffe -- It seems that `responseType: 'blob'` doesn't actually work in Node (when I tried using it, response.data was a string, not a Blob, since Node doesn't have Blobs), so this clarifies that this option should only be used in the browser -- Add issue templates - Emily Morehouse -- Update README.md. - Add Querystring library note ([#1896](https://github.com/axios/axios/pull/1896)) - Dmitriy Eroshenko -- Add react-hooks-axios to Libraries section of ECOSYSTEM.md ([#1925](https://github.com/axios/axios/pull/1925)) - Cody Chan -- Clarify in README that default timeout is 0 (no timeout) ([#1750](https://github.com/axios/axios/pull/1750)) - Ben Standefer - -### 0.19.0-beta.1 (Aug 9, 2018) - -**NOTE:** This is a beta version of this release. There may be functionality that is broken in -certain browsers, though we suspect that builds are hanging and not erroring. See -https://saucelabs.com/u/axios for the most up-to-date information. - -New Functionality: - -- Add getUri method ([#1712](https://github.com/axios/axios/issues/1712)) -- Add support for no_proxy env variable ([#1693](https://github.com/axios/axios/issues/1693)) -- Add toJSON to decorated Axios errors to faciliate serialization ([#1625](https://github.com/axios/axios/issues/1625)) -- Add second then on axios call ([#1623](https://github.com/axios/axios/issues/1623)) -- Typings: allow custom return types -- Add option to specify character set in responses (with http adapter) - -Fixes: - -- Fix Keep defaults local to instance ([#385](https://github.com/axios/axios/issues/385)) -- Correctly catch exception in http test ([#1475](https://github.com/axios/axios/issues/1475)) -- Fix accept header normalization ([#1698](https://github.com/axios/axios/issues/1698)) -- Fix http adapter to allow HTTPS connections via HTTP ([#959](https://github.com/axios/axios/issues/959)) -- Fix Removes usage of deprecated Buffer constructor. ([#1555](https://github.com/axios/axios/issues/1555), [#1622](https://github.com/axios/axios/issues/1622)) -- Fix defaults to use httpAdapter if available ([#1285](https://github.com/axios/axios/issues/1285)) - - Fixing defaults to use httpAdapter if available - - Use a safer, cross-platform method to detect the Node environment -- Fix Reject promise if request is cancelled by the browser ([#537](https://github.com/axios/axios/issues/537)) -- [Typescript] Fix missing type parameters on delete/head methods -- [NS]: Send `false` flag isStandardBrowserEnv for Nativescript -- Fix missing type parameters on delete/head -- Fix Default method for an instance always overwritten by get -- Fix type error when socketPath option in AxiosRequestConfig -- Capture errors on request data streams -- Decorate resolve and reject to clear timeout in all cases - -Huge thanks to everyone who contributed to this release via code (authors listed -below) or via reviews and triaging on GitHub: - -- Andrew Scott -- Anthony Gauthier -- arpit -- ascott18 -- Benedikt Rötsch -- Chance Dickson -- Dave Stewart -- Deric Cain -- Guillaume Briday -- Jacob Wejendorp -- Jim Lynch -- johntron -- Justin Beckwith -- Justin Beckwith -- Khaled Garbaya -- Lim Jing Rong -- Mark van den Broek -- Martti Laine -- mattridley -- mattridley -- Nicolas Del Valle -- Nilegfx -- pbarbiero -- Rikki Gibson -- Sako Hartounian -- Shane Fitzpatrick -- Stephan Schneider -- Steven -- Tim Garthwaite -- Tim Johns -- Yutaro Miyazaki - -### 0.18.0 (Feb 19, 2018) - -- Adding support for UNIX Sockets when running with Node.js ([#1070](https://github.com/axios/axios/pull/1070)) -- Fixing typings ([#1177](https://github.com/axios/axios/pull/1177)): - - AxiosRequestConfig.proxy: allows type false - - AxiosProxyConfig: added auth field -- Adding function signature in AxiosInstance interface so AxiosInstance can be invoked ([#1192](https://github.com/axios/axios/pull/1192), [#1254](https://github.com/axios/axios/pull/1254)) -- Allowing maxContentLength to pass through to redirected calls as maxBodyLength in follow-redirects config ([#1287](https://github.com/axios/axios/pull/1287)) -- Fixing configuration when using an instance - method can now be set ([#1342](https://github.com/axios/axios/pull/1342)) - -### 0.17.1 (Nov 11, 2017) - -- Fixing issue with web workers ([#1160](https://github.com/axios/axios/pull/1160)) -- Allowing overriding transport ([#1080](https://github.com/axios/axios/pull/1080)) -- Updating TypeScript typings ([#1165](https://github.com/axios/axios/pull/1165), [#1125](https://github.com/axios/axios/pull/1125), [#1131](https://github.com/axios/axios/pull/1131)) - -### 0.17.0 (Oct 21, 2017) - -- **BREAKING** Fixing issue with `baseURL` and interceptors ([#950](https://github.com/axios/axios/pull/950)) -- **BREAKING** Improving handing of duplicate headers ([#874](https://github.com/axios/axios/pull/874)) -- Adding support for disabling proxies ([#691](https://github.com/axios/axios/pull/691)) -- Updating TypeScript typings with generic type parameters ([#1061](https://github.com/axios/axios/pull/1061)) - -### 0.16.2 (Jun 3, 2017) - -- Fixing issue with including `buffer` in bundle ([#887](https://github.com/axios/axios/pull/887)) -- Including underlying request in errors ([#830](https://github.com/axios/axios/pull/830)) -- Convert `method` to lowercase ([#930](https://github.com/axios/axios/pull/930)) - -### 0.16.1 (Apr 8, 2017) - -- Improving HTTP adapter to return last request in case of redirects ([#828](https://github.com/axios/axios/pull/828)) -- Updating `follow-redirects` dependency ([#829](https://github.com/axios/axios/pull/829)) -- Adding support for passing `Buffer` in node ([#773](https://github.com/axios/axios/pull/773)) - -### 0.16.0 (Mar 31, 2017) - -- **BREAKING** Removing `Promise` from axios typings in favor of built-in type declarations ([#480](https://github.com/axios/axios/issues/480)) -- Adding `options` shortcut method ([#461](https://github.com/axios/axios/pull/461)) -- Fixing issue with using `responseType: 'json'` in browsers incompatible with XHR Level 2 ([#654](https://github.com/axios/axios/pull/654)) -- Improving React Native detection ([#731](https://github.com/axios/axios/pull/731)) -- Fixing `combineURLs` to support empty `relativeURL` ([#581](https://github.com/axios/axios/pull/581)) -- Removing `PROTECTION_PREFIX` support ([#561](https://github.com/axios/axios/pull/561)) - -### 0.15.3 (Nov 27, 2016) - -- Fixing issue with custom instances and global defaults ([#443](https://github.com/axios/axios/issues/443)) -- Renaming `axios.d.ts` to `index.d.ts` ([#519](https://github.com/axios/axios/issues/519)) -- Adding `get`, `head`, and `delete` to `defaults.headers` ([#509](https://github.com/axios/axios/issues/509)) -- Fixing issue with `btoa` and IE ([#507](https://github.com/axios/axios/issues/507)) -- Adding support for proxy authentication ([#483](https://github.com/axios/axios/pull/483)) -- Improving HTTP adapter to use `http` protocol by default ([#493](https://github.com/axios/axios/pull/493)) -- Fixing proxy issues ([#491](https://github.com/axios/axios/pull/491)) - -### 0.15.2 (Oct 17, 2016) - -- Fixing issue with calling `cancel` after response has been received ([#482](https://github.com/axios/axios/issues/482)) - -### 0.15.1 (Oct 14, 2016) - -- Fixing issue with UMD ([#485](https://github.com/axios/axios/issues/485)) - -### 0.15.0 (Oct 10, 2016) - -- Adding cancellation support ([#452](https://github.com/axios/axios/pull/452)) -- Moving default adapter to global defaults ([#437](https://github.com/axios/axios/pull/437)) -- Fixing issue with `file` URI scheme ([#440](https://github.com/axios/axios/pull/440)) -- Fixing issue with `params` objects that have no prototype ([#445](https://github.com/axios/axios/pull/445)) - -### 0.14.0 (Aug 27, 2016) - -- **BREAKING** Updating TypeScript definitions ([#419](https://github.com/axios/axios/pull/419)) -- **BREAKING** Replacing `agent` option with `httpAgent` and `httpsAgent` ([#387](https://github.com/axios/axios/pull/387)) -- **BREAKING** Splitting `progress` event handlers into `onUploadProgress` and `onDownloadProgress` ([#423](https://github.com/axios/axios/pull/423)) -- Adding support for `http_proxy` and `https_proxy` environment variables ([#366](https://github.com/axios/axios/pull/366)) -- Fixing issue with `auth` config option and `Authorization` header ([#397](https://github.com/axios/axios/pull/397)) -- Don't set XSRF header if `xsrfCookieName` is `null` ([#406](https://github.com/axios/axios/pull/406)) - -### 0.13.1 (Jul 16, 2016) - -- Fixing issue with response data not being transformed on error ([#378](https://github.com/axios/axios/issues/378)) - -### 0.13.0 (Jul 13, 2016) - -- **BREAKING** Improved error handling ([#345](https://github.com/axios/axios/pull/345)) -- **BREAKING** Response transformer now invoked in dispatcher not adapter ([10eb238](https://github.com/axios/axios/commit/10eb23865101f9347570552c04e9d6211376e25e)) -- **BREAKING** Request adapters now return a `Promise` ([157efd5](https://github.com/axios/axios/commit/157efd5615890301824e3121cc6c9d2f9b21f94a)) -- Fixing issue with `withCredentials` not being overwritten ([#343](https://github.com/axios/axios/issues/343)) -- Fixing regression with request transformer being called before request interceptor ([#352](https://github.com/axios/axios/issues/352)) -- Fixing custom instance defaults ([#341](https://github.com/axios/axios/issues/341)) -- Fixing instances created from `axios.create` to have same API as default axios ([#217](https://github.com/axios/axios/issues/217)) - -### 0.12.0 (May 31, 2016) - -- Adding support for `URLSearchParams` ([#317](https://github.com/axios/axios/pull/317)) -- Adding `maxRedirects` option ([#307](https://github.com/axios/axios/pull/307)) - -### 0.11.1 (May 17, 2016) - -- Fixing IE CORS support ([#313](https://github.com/axios/axios/pull/313)) -- Fixing detection of `FormData` ([#325](https://github.com/axios/axios/pull/325)) -- Adding `Axios` class to exports ([#321](https://github.com/axios/axios/pull/321)) - -### 0.11.0 (Apr 26, 2016) - -- Adding support for Stream with HTTP adapter ([#296](https://github.com/axios/axios/pull/296)) -- Adding support for custom HTTP status code error ranges ([#308](https://github.com/axios/axios/pull/308)) -- Fixing issue with ArrayBuffer ([#299](https://github.com/axios/axios/pull/299)) - -### 0.10.0 (Apr 20, 2016) - -- Fixing issue with some requests sending `undefined` instead of `null` ([#250](https://github.com/axios/axios/pull/250)) -- Fixing basic auth for HTTP adapter ([#252](https://github.com/axios/axios/pull/252)) -- Fixing request timeout for XHR adapter ([#227](https://github.com/axios/axios/pull/227)) -- Fixing IE8 support by using `onreadystatechange` instead of `onload` ([#249](https://github.com/axios/axios/pull/249)) -- Fixing IE9 cross domain requests ([#251](https://github.com/axios/axios/pull/251)) -- Adding `maxContentLength` option ([#275](https://github.com/axios/axios/pull/275)) -- Fixing XHR support for WebWorker environment ([#279](https://github.com/axios/axios/pull/279)) -- Adding request instance to response ([#200](https://github.com/axios/axios/pull/200)) - -### 0.9.1 (Jan 24, 2016) - -- Improving handling of request timeout in node ([#124](https://github.com/axios/axios/issues/124)) -- Fixing network errors not rejecting ([#205](https://github.com/axios/axios/pull/205)) -- Fixing issue with IE rejecting on HTTP 204 ([#201](https://github.com/axios/axios/issues/201)) -- Fixing host/port when following redirects ([#198](https://github.com/axios/axios/pull/198)) - -### 0.9.0 (Jan 18, 2016) - -- Adding support for custom adapters -- Fixing Content-Type header being removed when data is false ([#195](https://github.com/axios/axios/pull/195)) -- Improving XDomainRequest implementation ([#185](https://github.com/axios/axios/pull/185)) -- Improving config merging and order of precedence ([#183](https://github.com/axios/axios/pull/183)) -- Fixing XDomainRequest support for only <= IE9 ([#182](https://github.com/axios/axios/pull/182)) - -### 0.8.1 (Dec 14, 2015) - -- Adding support for passing XSRF token for cross domain requests when using `withCredentials` ([#168](https://github.com/axios/axios/pull/168)) -- Fixing error with format of basic auth header ([#178](https://github.com/axios/axios/pull/173)) -- Fixing error with JSON payloads throwing `InvalidStateError` in some cases ([#174](https://github.com/axios/axios/pull/174)) - -### 0.8.0 (Dec 11, 2015) - -- Adding support for creating instances of axios ([#123](https://github.com/axios/axios/pull/123)) -- Fixing http adapter to use `Buffer` instead of `String` in case of `responseType === 'arraybuffer'` ([#128](https://github.com/axios/axios/pull/128)) -- Adding support for using custom parameter serializer with `paramsSerializer` option ([#121](https://github.com/axios/axios/pull/121)) -- Fixing issue in IE8 caused by `forEach` on `arguments` ([#127](https://github.com/axios/axios/pull/127)) -- Adding support for following redirects in node ([#146](https://github.com/axios/axios/pull/146)) -- Adding support for transparent decompression if `content-encoding` is set ([#149](https://github.com/axios/axios/pull/149)) -- Adding support for transparent XDomainRequest to handle cross domain requests in IE9 ([#140](https://github.com/axios/axios/pull/140)) -- Adding support for HTTP basic auth via Authorization header ([#167](https://github.com/axios/axios/pull/167)) -- Adding support for baseURL option ([#160](https://github.com/axios/axios/pull/160)) - -### 0.7.0 (Sep 29, 2015) - -- Fixing issue with minified bundle in IE8 ([#87](https://github.com/axios/axios/pull/87)) -- Adding support for passing agent in node ([#102](https://github.com/axios/axios/pull/102)) -- Adding support for returning result from `axios.spread` for chaining ([#106](https://github.com/axios/axios/pull/106)) -- Fixing typescript definition ([#105](https://github.com/axios/axios/pull/105)) -- Fixing default timeout config for node ([#112](https://github.com/axios/axios/pull/112)) -- Adding support for use in web workers, and react-native ([#70](https://github.com/axios/axios/issue/70)), ([#98](https://github.com/axios/axios/pull/98)) -- Adding support for fetch like API `axios(url[, config])` ([#116](https://github.com/axios/axios/issues/116)) - -### 0.6.0 (Sep 21, 2015) - -- Removing deprecated success/error aliases -- Fixing issue with array params not being properly encoded ([#49](https://github.com/axios/axios/pull/49)) -- Fixing issue with User-Agent getting overridden ([#69](https://github.com/axios/axios/issues/69)) -- Adding support for timeout config ([#56](https://github.com/axios/axios/issues/56)) -- Removing es6-promise dependency -- Fixing issue preventing `length` to be used as a parameter ([#91](https://github.com/axios/axios/pull/91)) -- Fixing issue with IE8 ([#85](https://github.com/axios/axios/pull/85)) -- Converting build to UMD - -### 0.5.4 (Apr 08, 2015) - -- Fixing issue with FormData not being sent ([#53](https://github.com/axios/axios/issues/53)) - -### 0.5.3 (Apr 07, 2015) - -- Using JSON.parse unconditionally when transforming response string ([#55](https://github.com/axios/axios/issues/55)) - -### 0.5.2 (Mar 13, 2015) - -- Adding support for `statusText` in response ([#46](https://github.com/axios/axios/issues/46)) - -### 0.5.1 (Mar 10, 2015) - -- Fixing issue using strict mode ([#45](https://github.com/axios/axios/issues/45)) -- Fixing issue with standalone build ([#47](https://github.com/axios/axios/issues/47)) - -### 0.5.0 (Jan 23, 2015) - -- Adding support for intercepetors ([#14](https://github.com/axios/axios/issues/14)) -- Updating es6-promise dependency - -### 0.4.2 (Dec 10, 2014) - -- Fixing issue with `Content-Type` when using `FormData` ([#22](https://github.com/axios/axios/issues/22)) -- Adding support for TypeScript ([#25](https://github.com/axios/axios/issues/25)) -- Fixing issue with standalone build ([#29](https://github.com/axios/axios/issues/29)) -- Fixing issue with verbs needing to be capitalized in some browsers ([#30](https://github.com/axios/axios/issues/30)) - -### 0.4.1 (Oct 15, 2014) - -- Adding error handling to request for node.js ([#18](https://github.com/axios/axios/issues/18)) - -### 0.4.0 (Oct 03, 2014) - -- Adding support for `ArrayBuffer` and `ArrayBufferView` ([#10](https://github.com/axios/axios/issues/10)) -- Adding support for utf-8 for node.js ([#13](https://github.com/axios/axios/issues/13)) -- Adding support for SSL for node.js ([#12](https://github.com/axios/axios/issues/12)) -- Fixing incorrect `Content-Type` header ([#9](https://github.com/axios/axios/issues/9)) -- Adding standalone build without bundled es6-promise ([#11](https://github.com/axios/axios/issues/11)) -- Deprecating `success`/`error` in favor of `then`/`catch` - -### 0.3.1 (Sep 16, 2014) - -- Fixing missing post body when using node.js ([#3](https://github.com/axios/axios/issues/3)) - -### 0.3.0 (Sep 16, 2014) - -- Fixing `success` and `error` to properly receive response data as individual arguments ([#8](https://github.com/axios/axios/issues/8)) -- Updating `then` and `catch` to receive response data as a single object ([#6](https://github.com/axios/axios/issues/6)) -- Fixing issue with `all` not working ([#7](https://github.com/axios/axios/issues/7)) - -### 0.2.2 (Sep 14, 2014) - -- Fixing bundling with browserify ([#4](https://github.com/axios/axios/issues/4)) - -### 0.2.1 (Sep 12, 2014) - -- Fixing build problem causing ridiculous file sizes - -### 0.2.0 (Sep 12, 2014) - -- Adding support for `all` and `spread` -- Adding support for node.js ([#1](https://github.com/axios/axios/issues/1)) - -### 0.1.0 (Aug 29, 2014) - -- Initial release diff --git a/node_modules/axios/LICENSE b/node_modules/axios/LICENSE deleted file mode 100644 index d36c80ef..00000000 --- a/node_modules/axios/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014-present Matt Zabriskie - -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/axios/README.md b/node_modules/axios/README.md deleted file mode 100644 index 2533e8d7..00000000 --- a/node_modules/axios/README.md +++ /dev/null @@ -1,684 +0,0 @@ -# axios - -[![npm version](https://img.shields.io/npm/v/axios.svg?style=flat-square)](https://www.npmjs.org/package/axios) -[![build status](https://img.shields.io/travis/axios/axios.svg?style=flat-square)](https://travis-ci.org/axios/axios) -[![code coverage](https://img.shields.io/coveralls/mzabriskie/axios.svg?style=flat-square)](https://coveralls.io/r/mzabriskie/axios) -[![install size](https://packagephobia.now.sh/badge?p=axios)](https://packagephobia.now.sh/result?p=axios) -[![npm downloads](https://img.shields.io/npm/dm/axios.svg?style=flat-square)](http://npm-stat.com/charts.html?package=axios) -[![gitter chat](https://img.shields.io/gitter/room/mzabriskie/axios.svg?style=flat-square)](https://gitter.im/mzabriskie/axios) -[![code helpers](https://www.codetriage.com/axios/axios/badges/users.svg)](https://www.codetriage.com/axios/axios) - -Promise based HTTP client for the browser and node.js - -## Features - -- Make [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) from the browser -- Make [http](http://nodejs.org/api/http.html) requests from node.js -- Supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API -- Intercept request and response -- Transform request and response data -- Cancel requests -- Automatic transforms for JSON data -- Client side support for protecting against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) - -## Browser Support - -![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) | ---- | --- | --- | --- | --- | --- | -Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ | - -[![Browser Matrix](https://saucelabs.com/open_sauce/build_matrix/axios.svg)](https://saucelabs.com/u/axios) - -## Installing - -Using npm: - -```bash -$ npm install axios -``` - -Using bower: - -```bash -$ bower install axios -``` - -Using yarn: - -```bash -$ yarn add axios -``` - -Using cdn: - -```html - -``` - -## Example - -Performing a `GET` request - -```js -const axios = require('axios'); - -// Make a request for a user with a given ID -axios.get('/user?ID=12345') - .then(function (response) { - // handle success - console.log(response); - }) - .catch(function (error) { - // handle error - console.log(error); - }) - .finally(function () { - // always executed - }); - -// Optionally the request above could also be done as -axios.get('/user', { - params: { - ID: 12345 - } - }) - .then(function (response) { - console.log(response); - }) - .catch(function (error) { - console.log(error); - }) - .then(function () { - // always executed - }); - -// Want to use async/await? Add the `async` keyword to your outer function/method. -async function getUser() { - try { - const response = await axios.get('/user?ID=12345'); - console.log(response); - } catch (error) { - console.error(error); - } -} -``` - -> **NOTE:** `async/await` is part of ECMAScript 2017 and is not supported in Internet -> Explorer and older browsers, so use with caution. - -Performing a `POST` request - -```js -axios.post('/user', { - firstName: 'Fred', - lastName: 'Flintstone' - }) - .then(function (response) { - console.log(response); - }) - .catch(function (error) { - console.log(error); - }); -``` - -Performing multiple concurrent requests - -```js -function getUserAccount() { - return axios.get('/user/12345'); -} - -function getUserPermissions() { - return axios.get('/user/12345/permissions'); -} - -axios.all([getUserAccount(), getUserPermissions()]) - .then(axios.spread(function (acct, perms) { - // Both requests are now complete - })); -``` - -## axios API - -Requests can be made by passing the relevant config to `axios`. - -##### axios(config) - -```js -// Send a POST request -axios({ - method: 'post', - url: '/user/12345', - data: { - firstName: 'Fred', - lastName: 'Flintstone' - } -}); -``` - -```js -// GET request for remote image -axios({ - method: 'get', - url: 'http://bit.ly/2mTM3nY', - responseType: 'stream' -}) - .then(function (response) { - response.data.pipe(fs.createWriteStream('ada_lovelace.jpg')) - }); -``` - -##### axios(url[, config]) - -```js -// Send a GET request (default method) -axios('/user/12345'); -``` - -### Request method aliases - -For convenience aliases have been provided for all supported request methods. - -##### axios.request(config) -##### axios.get(url[, config]) -##### axios.delete(url[, config]) -##### axios.head(url[, config]) -##### axios.options(url[, config]) -##### axios.post(url[, data[, config]]) -##### axios.put(url[, data[, config]]) -##### axios.patch(url[, data[, config]]) - -###### NOTE -When using the alias methods `url`, `method`, and `data` properties don't need to be specified in config. - -### Concurrency - -Helper functions for dealing with concurrent requests. - -##### axios.all(iterable) -##### axios.spread(callback) - -### Creating an instance - -You can create a new instance of axios with a custom config. - -##### axios.create([config]) - -```js -const instance = axios.create({ - baseURL: 'https://some-domain.com/api/', - timeout: 1000, - headers: {'X-Custom-Header': 'foobar'} -}); -``` - -### Instance methods - -The available instance methods are listed below. The specified config will be merged with the instance config. - -##### axios#request(config) -##### axios#get(url[, config]) -##### axios#delete(url[, config]) -##### axios#head(url[, config]) -##### axios#options(url[, config]) -##### axios#post(url[, data[, config]]) -##### axios#put(url[, data[, config]]) -##### axios#patch(url[, data[, config]]) -##### axios#getUri([config]) - -## Request Config - -These are the available config options for making requests. Only the `url` is required. Requests will default to `GET` if `method` is not specified. - -```js -{ - // `url` is the server URL that will be used for the request - url: '/user', - - // `method` is the request method to be used when making the request - method: 'get', // default - - // `baseURL` will be prepended to `url` unless `url` is absolute. - // It can be convenient to set `baseURL` for an instance of axios to pass relative URLs - // to methods of that instance. - baseURL: 'https://some-domain.com/api/', - - // `transformRequest` allows changes to the request data before it is sent to the server - // This is only applicable for request methods 'PUT', 'POST', 'PATCH' and 'DELETE' - // The last function in the array must return a string or an instance of Buffer, ArrayBuffer, - // FormData or Stream - // You may modify the headers object. - transformRequest: [function (data, headers) { - // Do whatever you want to transform the data - - return data; - }], - - // `transformResponse` allows changes to the response data to be made before - // it is passed to then/catch - transformResponse: [function (data) { - // Do whatever you want to transform the data - - return data; - }], - - // `headers` are custom headers to be sent - headers: {'X-Requested-With': 'XMLHttpRequest'}, - - // `params` are the URL parameters to be sent with the request - // Must be a plain object or a URLSearchParams object - params: { - ID: 12345 - }, - - // `paramsSerializer` is an optional function in charge of serializing `params` - // (e.g. https://www.npmjs.com/package/qs, http://api.jquery.com/jquery.param/) - paramsSerializer: function (params) { - return Qs.stringify(params, {arrayFormat: 'brackets'}) - }, - - // `data` is the data to be sent as the request body - // Only applicable for request methods 'PUT', 'POST', and 'PATCH' - // When no `transformRequest` is set, must be of one of the following types: - // - string, plain object, ArrayBuffer, ArrayBufferView, URLSearchParams - // - Browser only: FormData, File, Blob - // - Node only: Stream, Buffer - data: { - firstName: 'Fred' - }, - - // `timeout` specifies the number of milliseconds before the request times out. - // If the request takes longer than `timeout`, the request will be aborted. - timeout: 1000, // default is `0` (no timeout) - - // `withCredentials` indicates whether or not cross-site Access-Control requests - // should be made using credentials - withCredentials: false, // default - - // `adapter` allows custom handling of requests which makes testing easier. - // Return a promise and supply a valid response (see lib/adapters/README.md). - adapter: function (config) { - /* ... */ - }, - - // `auth` indicates that HTTP Basic auth should be used, and supplies credentials. - // This will set an `Authorization` header, overwriting any existing - // `Authorization` custom headers you have set using `headers`. - // Please note that only HTTP Basic auth is configurable through this parameter. - // For Bearer tokens and such, use `Authorization` custom headers instead. - auth: { - username: 'janedoe', - password: 's00pers3cret' - }, - - // `responseType` indicates the type of data that the server will respond with - // options are: 'arraybuffer', 'document', 'json', 'text', 'stream' - // browser only: 'blob' - responseType: 'json', // default - - // `responseEncoding` indicates encoding to use for decoding responses - // Note: Ignored for `responseType` of 'stream' or client-side requests - responseEncoding: 'utf8', // default - - // `xsrfCookieName` is the name of the cookie to use as a value for xsrf token - xsrfCookieName: 'XSRF-TOKEN', // default - - // `xsrfHeaderName` is the name of the http header that carries the xsrf token value - xsrfHeaderName: 'X-XSRF-TOKEN', // default - - // `onUploadProgress` allows handling of progress events for uploads - onUploadProgress: function (progressEvent) { - // Do whatever you want with the native progress event - }, - - // `onDownloadProgress` allows handling of progress events for downloads - onDownloadProgress: function (progressEvent) { - // Do whatever you want with the native progress event - }, - - // `maxContentLength` defines the max size of the http response content in bytes allowed - maxContentLength: 2000, - - // `validateStatus` defines whether to resolve or reject the promise for a given - // HTTP response status code. If `validateStatus` returns `true` (or is set to `null` - // or `undefined`), the promise will be resolved; otherwise, the promise will be - // rejected. - validateStatus: function (status) { - return status >= 200 && status < 300; // default - }, - - // `maxRedirects` defines the maximum number of redirects to follow in node.js. - // If set to 0, no redirects will be followed. - maxRedirects: 5, // default - - // `socketPath` defines a UNIX Socket to be used in node.js. - // e.g. '/var/run/docker.sock' to send requests to the docker daemon. - // Only either `socketPath` or `proxy` can be specified. - // If both are specified, `socketPath` is used. - socketPath: null, // default - - // `httpAgent` and `httpsAgent` define a custom agent to be used when performing http - // and https requests, respectively, in node.js. This allows options to be added like - // `keepAlive` that are not enabled by default. - httpAgent: new http.Agent({ keepAlive: true }), - httpsAgent: new https.Agent({ keepAlive: true }), - - // 'proxy' defines the hostname and port of the proxy server. - // You can also define your proxy using the conventional `http_proxy` and - // `https_proxy` environment variables. If you are using environment variables - // for your proxy configuration, you can also define a `no_proxy` environment - // variable as a comma-separated list of domains that should not be proxied. - // Use `false` to disable proxies, ignoring environment variables. - // `auth` indicates that HTTP Basic auth should be used to connect to the proxy, and - // supplies credentials. - // This will set an `Proxy-Authorization` header, overwriting any existing - // `Proxy-Authorization` custom headers you have set using `headers`. - proxy: { - host: '127.0.0.1', - port: 9000, - auth: { - username: 'mikeymike', - password: 'rapunz3l' - } - }, - - // `cancelToken` specifies a cancel token that can be used to cancel the request - // (see Cancellation section below for details) - cancelToken: new CancelToken(function (cancel) { - }) -} -``` - -## Response Schema - -The response for a request contains the following information. - -```js -{ - // `data` is the response that was provided by the server - data: {}, - - // `status` is the HTTP status code from the server response - status: 200, - - // `statusText` is the HTTP status message from the server response - statusText: 'OK', - - // `headers` the headers that the server responded with - // All header names are lower cased - headers: {}, - - // `config` is the config that was provided to `axios` for the request - config: {}, - - // `request` is the request that generated this response - // It is the last ClientRequest instance in node.js (in redirects) - // and an XMLHttpRequest instance the browser - request: {} -} -``` - -When using `then`, you will receive the response as follows: - -```js -axios.get('/user/12345') - .then(function (response) { - console.log(response.data); - console.log(response.status); - console.log(response.statusText); - console.log(response.headers); - console.log(response.config); - }); -``` - -When using `catch`, or passing a [rejection callback](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then) as second parameter of `then`, the response will be available through the `error` object as explained in the [Handling Errors](#handling-errors) section. - -## Config Defaults - -You can specify config defaults that will be applied to every request. - -### Global axios defaults - -```js -axios.defaults.baseURL = 'https://api.example.com'; -axios.defaults.headers.common['Authorization'] = AUTH_TOKEN; -axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'; -``` - -### Custom instance defaults - -```js -// Set config defaults when creating the instance -const instance = axios.create({ - baseURL: 'https://api.example.com' -}); - -// Alter defaults after instance has been created -instance.defaults.headers.common['Authorization'] = AUTH_TOKEN; -``` - -### Config order of precedence - -Config will be merged with an order of precedence. The order is library defaults found in [lib/defaults.js](https://github.com/axios/axios/blob/master/lib/defaults.js#L28), then `defaults` property of the instance, and finally `config` argument for the request. The latter will take precedence over the former. Here's an example. - -```js -// Create an instance using the config defaults provided by the library -// At this point the timeout config value is `0` as is the default for the library -const instance = axios.create(); - -// Override timeout default for the library -// Now all requests using this instance will wait 2.5 seconds before timing out -instance.defaults.timeout = 2500; - -// Override timeout for this request as it's known to take a long time -instance.get('/longRequest', { - timeout: 5000 -}); -``` - -## Interceptors - -You can intercept requests or responses before they are handled by `then` or `catch`. - -```js -// Add a request interceptor -axios.interceptors.request.use(function (config) { - // Do something before request is sent - return config; - }, function (error) { - // Do something with request error - return Promise.reject(error); - }); - -// Add a response interceptor -axios.interceptors.response.use(function (response) { - // Do something with response data - return response; - }, function (error) { - // Do something with response error - return Promise.reject(error); - }); -``` - -If you may need to remove an interceptor later you can. - -```js -const myInterceptor = axios.interceptors.request.use(function () {/*...*/}); -axios.interceptors.request.eject(myInterceptor); -``` - -You can add interceptors to a custom instance of axios. - -```js -const instance = axios.create(); -instance.interceptors.request.use(function () {/*...*/}); -``` - -## Handling Errors - -```js -axios.get('/user/12345') - .catch(function (error) { - if (error.response) { - // The request was made and the server responded with a status code - // that falls out of the range of 2xx - console.log(error.response.data); - console.log(error.response.status); - console.log(error.response.headers); - } else if (error.request) { - // The request was made but no response was received - // `error.request` is an instance of XMLHttpRequest in the browser and an instance of - // http.ClientRequest in node.js - console.log(error.request); - } else { - // Something happened in setting up the request that triggered an Error - console.log('Error', error.message); - } - console.log(error.config); - }); -``` - -You can define a custom HTTP status code error range using the `validateStatus` config option. - -```js -axios.get('/user/12345', { - validateStatus: function (status) { - return status < 500; // Reject only if the status code is greater than or equal to 500 - } -}) -``` - -## Cancellation - -You can cancel a request using a *cancel token*. - -> The axios cancel token API is based on the withdrawn [cancelable promises proposal](https://github.com/tc39/proposal-cancelable-promises). - -You can create a cancel token using the `CancelToken.source` factory as shown below: - -```js -const CancelToken = axios.CancelToken; -const source = CancelToken.source(); - -axios.get('/user/12345', { - cancelToken: source.token -}).catch(function (thrown) { - if (axios.isCancel(thrown)) { - console.log('Request canceled', thrown.message); - } else { - // handle error - } -}); - -axios.post('/user/12345', { - name: 'new name' -}, { - cancelToken: source.token -}) - -// cancel the request (the message parameter is optional) -source.cancel('Operation canceled by the user.'); -``` - -You can also create a cancel token by passing an executor function to the `CancelToken` constructor: - -```js -const CancelToken = axios.CancelToken; -let cancel; - -axios.get('/user/12345', { - cancelToken: new CancelToken(function executor(c) { - // An executor function receives a cancel function as a parameter - cancel = c; - }) -}); - -// cancel the request -cancel(); -``` - -> Note: you can cancel several requests with the same cancel token. - -## Using application/x-www-form-urlencoded format - -By default, axios serializes JavaScript objects to `JSON`. To send data in the `application/x-www-form-urlencoded` format instead, you can use one of the following options. - -### Browser - -In a browser, you can use the [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) API as follows: - -```js -const params = new URLSearchParams(); -params.append('param1', 'value1'); -params.append('param2', 'value2'); -axios.post('/foo', params); -``` - -> Note that `URLSearchParams` is not supported by all browsers (see [caniuse.com](http://www.caniuse.com/#feat=urlsearchparams)), but there is a [polyfill](https://github.com/WebReflection/url-search-params) available (make sure to polyfill the global environment). - -Alternatively, you can encode data using the [`qs`](https://github.com/ljharb/qs) library: - -```js -const qs = require('qs'); -axios.post('/foo', qs.stringify({ 'bar': 123 })); -``` - -Or in another way (ES6), - -```js -import qs from 'qs'; -const data = { 'bar': 123 }; -const options = { - method: 'POST', - headers: { 'content-type': 'application/x-www-form-urlencoded' }, - data: qs.stringify(data), - url, -}; -axios(options); -``` - -### Node.js - -In node.js, you can use the [`querystring`](https://nodejs.org/api/querystring.html) module as follows: - -```js -const querystring = require('querystring'); -axios.post('http://something.com/', querystring.stringify({ foo: 'bar' })); -``` - -You can also use the [`qs`](https://github.com/ljharb/qs) library. - -###### NOTE -The `qs` library is preferable if you need to stringify nested objects, as the `querystring` method has known issues with that use case (https://github.com/nodejs/node-v0.x-archive/issues/1665). - -## Semver - -Until axios reaches a `1.0` release, breaking changes will be released with a new minor version. For example `0.5.1`, and `0.5.4` will have the same API, but `0.6.0` will have breaking changes. - -## Promises - -axios depends on a native ES6 Promise implementation to be [supported](http://caniuse.com/promises). -If your environment doesn't support ES6 Promises, you can [polyfill](https://github.com/jakearchibald/es6-promise). - -## TypeScript -axios includes [TypeScript](http://typescriptlang.org) definitions. -```typescript -import axios from 'axios'; -axios.get('/user?ID=12345'); -``` - -## Resources - -* [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md) -* [Upgrade Guide](https://github.com/axios/axios/blob/master/UPGRADE_GUIDE.md) -* [Ecosystem](https://github.com/axios/axios/blob/master/ECOSYSTEM.md) -* [Contributing Guide](https://github.com/axios/axios/blob/master/CONTRIBUTING.md) -* [Code of Conduct](https://github.com/axios/axios/blob/master/CODE_OF_CONDUCT.md) - -## Credits - -axios is heavily inspired by the [$http service](https://docs.angularjs.org/api/ng/service/$http) provided in [Angular](https://angularjs.org/). Ultimately axios is an effort to provide a standalone `$http`-like service for use outside of Angular. - -## License - -MIT diff --git a/node_modules/axios/UPGRADE_GUIDE.md b/node_modules/axios/UPGRADE_GUIDE.md deleted file mode 100644 index eedb0492..00000000 --- a/node_modules/axios/UPGRADE_GUIDE.md +++ /dev/null @@ -1,162 +0,0 @@ -# Upgrade Guide - -### 0.15.x -> 0.16.0 - -#### `Promise` Type Declarations - -The `Promise` type declarations have been removed from the axios typings in favor of the built-in type declarations. If you use axios in a TypeScript project that targets `ES5`, please make sure to include the `es2015.promise` lib. Please see [this post](https://blog.mariusschulz.com/2016/11/25/typescript-2-0-built-in-type-declarations) for details. - -### 0.13.x -> 0.14.0 - -#### TypeScript Definitions - -The axios TypeScript definitions have been updated to match the axios API and use the ES2015 module syntax. - -Please use the following `import` statement to import axios in TypeScript: - -```typescript -import axios from 'axios'; - -axios.get('/foo') - .then(response => console.log(response)) - .catch(error => console.log(error)); -``` - -#### `agent` Config Option - -The `agent` config option has been replaced with two new options: `httpAgent` and `httpsAgent`. Please use them instead. - -```js -{ - // Define a custom agent for HTTP - httpAgent: new http.Agent({ keepAlive: true }), - // Define a custom agent for HTTPS - httpsAgent: new https.Agent({ keepAlive: true }) -} -``` - -#### `progress` Config Option - -The `progress` config option has been replaced with the `onUploadProgress` and `onDownloadProgress` options. - -```js -{ - // Define a handler for upload progress events - onUploadProgress: function (progressEvent) { - // ... - }, - - // Define a handler for download progress events - onDownloadProgress: function (progressEvent) { - // ... - } -} -``` - -### 0.12.x -> 0.13.0 - -The `0.13.0` release contains several changes to custom adapters and error handling. - -#### Error Handling - -Previous to this release an error could either be a server response with bad status code or an actual `Error`. With this release Promise will always reject with an `Error`. In the case that a response was received, the `Error` will also include the response. - -```js -axios.get('/user/12345') - .catch((error) => { - console.log(error.message); - console.log(error.code); // Not always specified - console.log(error.config); // The config that was used to make the request - console.log(error.response); // Only available if response was received from the server - }); -``` - -#### Request Adapters - -This release changes a few things about how request adapters work. Please take note if you are using your own custom adapter. - -1. Response transformer is now called outside of adapter. -2. Request adapter returns a `Promise`. - -This means that you no longer need to invoke `transformData` on response data. You will also no longer receive `resolve` and `reject` as arguments in your adapter. - -Previous code: - -```js -function myAdapter(resolve, reject, config) { - var response = { - data: transformData( - responseData, - responseHeaders, - config.transformResponse - ), - status: request.status, - statusText: request.statusText, - headers: responseHeaders - }; - settle(resolve, reject, response); -} -``` - -New code: - -```js -function myAdapter(config) { - return new Promise(function (resolve, reject) { - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders - }; - settle(resolve, reject, response); - }); -} -``` - -See the related commits for more details: -- [Response transformers](https://github.com/axios/axios/commit/10eb23865101f9347570552c04e9d6211376e25e) -- [Request adapter Promise](https://github.com/axios/axios/commit/157efd5615890301824e3121cc6c9d2f9b21f94a) - -### 0.5.x -> 0.6.0 - -The `0.6.0` release contains mostly bug fixes, but there are a couple things to be aware of when upgrading. - -#### ES6 Promise Polyfill - -Up until the `0.6.0` release ES6 `Promise` was being polyfilled using [es6-promise](https://github.com/jakearchibald/es6-promise). With this release, the polyfill has been removed, and you will need to supply it yourself if your environment needs it. - -```js -require('es6-promise').polyfill(); -var axios = require('axios'); -``` - -This will polyfill the global environment, and only needs to be done once. - -#### `axios.success`/`axios.error` - -The `success`, and `error` aliases were deprectated in [0.4.0](https://github.com/axios/axios/blob/master/CHANGELOG.md#040-oct-03-2014). As of this release they have been removed entirely. Instead please use `axios.then`, and `axios.catch` respectively. - -```js -axios.get('some/url') - .then(function (res) { - /* ... */ - }) - .catch(function (err) { - /* ... */ - }); -``` - -#### UMD - -Previous versions of axios shipped with an AMD, CommonJS, and Global build. This has all been rolled into a single UMD build. - -```js -// AMD -require(['bower_components/axios/dist/axios'], function (axios) { - /* ... */ -}); - -// CommonJS -var axios = require('axios/dist/axios'); -``` diff --git a/node_modules/axios/dist/axios.js b/node_modules/axios/dist/axios.js deleted file mode 100644 index 5cef419c..00000000 --- a/node_modules/axios/dist/axios.js +++ /dev/null @@ -1,1668 +0,0 @@ -/* axios v0.19.0 | (c) 2019 by Matt Zabriskie */ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["axios"] = factory(); - else - root["axios"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - module.exports = __webpack_require__(1); - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - var bind = __webpack_require__(3); - var Axios = __webpack_require__(5); - var mergeConfig = __webpack_require__(22); - var defaults = __webpack_require__(11); - - /** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * @return {Axios} A new instance of Axios - */ - function createInstance(defaultConfig) { - var context = new Axios(defaultConfig); - var instance = bind(Axios.prototype.request, context); - - // Copy axios.prototype to instance - utils.extend(instance, Axios.prototype, context); - - // Copy context to instance - utils.extend(instance, context); - - return instance; - } - - // Create the default instance to be exported - var axios = createInstance(defaults); - - // Expose Axios class to allow class inheritance - axios.Axios = Axios; - - // Factory for creating new instances - axios.create = function create(instanceConfig) { - return createInstance(mergeConfig(axios.defaults, instanceConfig)); - }; - - // Expose Cancel & CancelToken - axios.Cancel = __webpack_require__(23); - axios.CancelToken = __webpack_require__(24); - axios.isCancel = __webpack_require__(10); - - // Expose all/spread - axios.all = function all(promises) { - return Promise.all(promises); - }; - axios.spread = __webpack_require__(25); - - module.exports = axios; - - // Allow use of default import syntax in TypeScript - module.exports.default = axios; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var bind = __webpack_require__(3); - var isBuffer = __webpack_require__(4); - - /*global toString:true*/ - - // utils is a library of generic helper functions non-specific to axios - - var toString = Object.prototype.toString; - - /** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Array, otherwise false - */ - function isArray(val) { - return toString.call(val) === '[object Array]'; - } - - /** - * Determine if a value is an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ - function isArrayBuffer(val) { - return toString.call(val) === '[object ArrayBuffer]'; - } - - /** - * Determine if a value is a FormData - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an FormData, otherwise false - */ - function isFormData(val) { - return (typeof FormData !== 'undefined') && (val instanceof FormData); - } - - /** - * Determine if a value is a view on an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ - function isArrayBufferView(val) { - var result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); - } - return result; - } - - /** - * Determine if a value is a String - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a String, otherwise false - */ - function isString(val) { - return typeof val === 'string'; - } - - /** - * Determine if a value is a Number - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Number, otherwise false - */ - function isNumber(val) { - return typeof val === 'number'; - } - - /** - * Determine if a value is undefined - * - * @param {Object} val The value to test - * @returns {boolean} True if the value is undefined, otherwise false - */ - function isUndefined(val) { - return typeof val === 'undefined'; - } - - /** - * Determine if a value is an Object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Object, otherwise false - */ - function isObject(val) { - return val !== null && typeof val === 'object'; - } - - /** - * Determine if a value is a Date - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Date, otherwise false - */ - function isDate(val) { - return toString.call(val) === '[object Date]'; - } - - /** - * Determine if a value is a File - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a File, otherwise false - */ - function isFile(val) { - return toString.call(val) === '[object File]'; - } - - /** - * Determine if a value is a Blob - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Blob, otherwise false - */ - function isBlob(val) { - return toString.call(val) === '[object Blob]'; - } - - /** - * Determine if a value is a Function - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ - function isFunction(val) { - return toString.call(val) === '[object Function]'; - } - - /** - * Determine if a value is a Stream - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Stream, otherwise false - */ - function isStream(val) { - return isObject(val) && isFunction(val.pipe); - } - - /** - * Determine if a value is a URLSearchParams object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ - function isURLSearchParams(val) { - return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; - } - - /** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * @returns {String} The String freed of excess whitespace - */ - function trim(str) { - return str.replace(/^\s*/, '').replace(/\s*$/, ''); - } - - /** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - */ - function isStandardBrowserEnv() { - if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || - navigator.product === 'NativeScript' || - navigator.product === 'NS')) { - return false; - } - return ( - typeof window !== 'undefined' && - typeof document !== 'undefined' - ); - } - - /** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - */ - function forEach(obj, fn) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (var i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - fn.call(null, obj[key], key, obj); - } - } - } - } - - /** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ - function merge(/* obj1, obj2, obj3, ... */) { - var result = {}; - function assignValue(val, key) { - if (typeof result[key] === 'object' && typeof val === 'object') { - result[key] = merge(result[key], val); - } else { - result[key] = val; - } - } - - for (var i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue); - } - return result; - } - - /** - * Function equal to merge with the difference being that no reference - * to original objects is kept. - * - * @see merge - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ - function deepMerge(/* obj1, obj2, obj3, ... */) { - var result = {}; - function assignValue(val, key) { - if (typeof result[key] === 'object' && typeof val === 'object') { - result[key] = deepMerge(result[key], val); - } else if (typeof val === 'object') { - result[key] = deepMerge({}, val); - } else { - result[key] = val; - } - } - - for (var i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue); - } - return result; - } - - /** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * @return {Object} The resulting value of object a - */ - function extend(a, b, thisArg) { - forEach(b, function assignValue(val, key) { - if (thisArg && typeof val === 'function') { - a[key] = bind(val, thisArg); - } else { - a[key] = val; - } - }); - return a; - } - - module.exports = { - isArray: isArray, - isArrayBuffer: isArrayBuffer, - isBuffer: isBuffer, - isFormData: isFormData, - isArrayBufferView: isArrayBufferView, - isString: isString, - isNumber: isNumber, - isObject: isObject, - isUndefined: isUndefined, - isDate: isDate, - isFile: isFile, - isBlob: isBlob, - isFunction: isFunction, - isStream: isStream, - isURLSearchParams: isURLSearchParams, - isStandardBrowserEnv: isStandardBrowserEnv, - forEach: forEach, - merge: merge, - deepMerge: deepMerge, - extend: extend, - trim: trim - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - 'use strict'; - - module.exports = function bind(fn, thisArg) { - return function wrap() { - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - return fn.apply(thisArg, args); - }; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /*! - * Determine if an object is a Buffer - * - * @author Feross Aboukhadijeh - * @license MIT - */ - - module.exports = function isBuffer (obj) { - return obj != null && obj.constructor != null && - typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) - } - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - var buildURL = __webpack_require__(6); - var InterceptorManager = __webpack_require__(7); - var dispatchRequest = __webpack_require__(8); - var mergeConfig = __webpack_require__(22); - - /** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - */ - function Axios(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new InterceptorManager(), - response: new InterceptorManager() - }; - } - - /** - * Dispatch a request - * - * @param {Object} config The config specific for this request (merged with this.defaults) - */ - Axios.prototype.request = function request(config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof config === 'string') { - config = arguments[1] || {}; - config.url = arguments[0]; - } else { - config = config || {}; - } - - config = mergeConfig(this.defaults, config); - config.method = config.method ? config.method.toLowerCase() : 'get'; - - // Hook up interceptors middleware - var chain = [dispatchRequest, undefined]; - var promise = Promise.resolve(config); - - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - chain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - chain.push(interceptor.fulfilled, interceptor.rejected); - }); - - while (chain.length) { - promise = promise.then(chain.shift(), chain.shift()); - } - - return promise; - }; - - Axios.prototype.getUri = function getUri(config) { - config = mergeConfig(this.defaults, config); - return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, ''); - }; - - // Provide aliases for supported request methods - utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request(utils.merge(config || {}, { - method: method, - url: url - })); - }; - }); - - utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, data, config) { - return this.request(utils.merge(config || {}, { - method: method, - url: url, - data: data - })); - }; - }); - - module.exports = Axios; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - function encode(val) { - return encodeURIComponent(val). - replace(/%40/gi, '@'). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); - } - - /** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @returns {string} The formatted url - */ - module.exports = function buildURL(url, params, paramsSerializer) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - var serializedParams; - if (paramsSerializer) { - serializedParams = paramsSerializer(params); - } else if (utils.isURLSearchParams(params)) { - serializedParams = params.toString(); - } else { - var parts = []; - - utils.forEach(params, function serialize(val, key) { - if (val === null || typeof val === 'undefined') { - return; - } - - if (utils.isArray(val)) { - key = key + '[]'; - } else { - val = [val]; - } - - utils.forEach(val, function parseValue(v) { - if (utils.isDate(v)) { - v = v.toISOString(); - } else if (utils.isObject(v)) { - v = JSON.stringify(v); - } - parts.push(encode(key) + '=' + encode(v)); - }); - }); - - serializedParams = parts.join('&'); - } - - if (serializedParams) { - var hashmarkIndex = url.indexOf('#'); - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - - return url; - }; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - function InterceptorManager() { - this.handlers = []; - } - - /** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ - InterceptorManager.prototype.use = function use(fulfilled, rejected) { - this.handlers.push({ - fulfilled: fulfilled, - rejected: rejected - }); - return this.handlers.length - 1; - }; - - /** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - */ - InterceptorManager.prototype.eject = function eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } - }; - - /** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - */ - InterceptorManager.prototype.forEach = function forEach(fn) { - utils.forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); - }; - - module.exports = InterceptorManager; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - var transformData = __webpack_require__(9); - var isCancel = __webpack_require__(10); - var defaults = __webpack_require__(11); - var isAbsoluteURL = __webpack_require__(20); - var combineURLs = __webpack_require__(21); - - /** - * Throws a `Cancel` if cancellation has been requested. - */ - function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } - } - - /** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * @returns {Promise} The Promise to be fulfilled - */ - module.exports = function dispatchRequest(config) { - throwIfCancellationRequested(config); - - // Support baseURL config - if (config.baseURL && !isAbsoluteURL(config.url)) { - config.url = combineURLs(config.baseURL, config.url); - } - - // Ensure headers exist - config.headers = config.headers || {}; - - // Transform request data - config.data = transformData( - config.data, - config.headers, - config.transformRequest - ); - - // Flatten headers - config.headers = utils.merge( - config.headers.common || {}, - config.headers[config.method] || {}, - config.headers || {} - ); - - utils.forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - function cleanHeaderConfig(method) { - delete config.headers[method]; - } - ); - - var adapter = config.adapter || defaults.adapter; - - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - - // Transform response data - response.data = transformData( - response.data, - response.headers, - config.transformResponse - ); - - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config); - - // Transform response data - if (reason && reason.response) { - reason.response.data = transformData( - reason.response.data, - reason.response.headers, - config.transformResponse - ); - } - } - - return Promise.reject(reason); - }); - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - /** - * Transform the data for a request or a response - * - * @param {Object|String} data The data to be transformed - * @param {Array} headers The headers for the request or response - * @param {Array|Function} fns A single function or Array of functions - * @returns {*} The resulting transformed data - */ - module.exports = function transformData(data, headers, fns) { - /*eslint no-param-reassign:0*/ - utils.forEach(fns, function transform(fn) { - data = fn(data, headers); - }); - - return data; - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports) { - - 'use strict'; - - module.exports = function isCancel(value) { - return !!(value && value.__CANCEL__); - }; - - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - var normalizeHeaderName = __webpack_require__(12); - - var DEFAULT_CONTENT_TYPE = { - 'Content-Type': 'application/x-www-form-urlencoded' - }; - - function setContentTypeIfUnset(headers, value) { - if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { - headers['Content-Type'] = value; - } - } - - function getDefaultAdapter() { - var adapter; - // Only Node.JS has a process variable that is of [[Class]] process - if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { - // For node use HTTP adapter - adapter = __webpack_require__(13); - } else if (typeof XMLHttpRequest !== 'undefined') { - // For browsers use XHR adapter - adapter = __webpack_require__(13); - } - return adapter; - } - - var defaults = { - adapter: getDefaultAdapter(), - - transformRequest: [function transformRequest(data, headers) { - normalizeHeaderName(headers, 'Accept'); - normalizeHeaderName(headers, 'Content-Type'); - if (utils.isFormData(data) || - utils.isArrayBuffer(data) || - utils.isBuffer(data) || - utils.isStream(data) || - utils.isFile(data) || - utils.isBlob(data) - ) { - return data; - } - if (utils.isArrayBufferView(data)) { - return data.buffer; - } - if (utils.isURLSearchParams(data)) { - setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); - return data.toString(); - } - if (utils.isObject(data)) { - setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); - return JSON.stringify(data); - } - return data; - }], - - transformResponse: [function transformResponse(data) { - /*eslint no-param-reassign:0*/ - if (typeof data === 'string') { - try { - data = JSON.parse(data); - } catch (e) { /* Ignore */ } - } - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - } - }; - - defaults.headers = { - common: { - 'Accept': 'application/json, text/plain, */*' - } - }; - - utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { - defaults.headers[method] = {}; - }); - - utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); - }); - - module.exports = defaults; - - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - module.exports = function normalizeHeaderName(headers, normalizedName) { - utils.forEach(headers, function processHeader(value, name) { - if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { - headers[normalizedName] = value; - delete headers[name]; - } - }); - }; - - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - var settle = __webpack_require__(14); - var buildURL = __webpack_require__(6); - var parseHeaders = __webpack_require__(17); - var isURLSameOrigin = __webpack_require__(18); - var createError = __webpack_require__(15); - - module.exports = function xhrAdapter(config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - var requestData = config.data; - var requestHeaders = config.headers; - - if (utils.isFormData(requestData)) { - delete requestHeaders['Content-Type']; // Let the browser set it - } - - var request = new XMLHttpRequest(); - - // HTTP basic authentication - if (config.auth) { - var username = config.auth.username || ''; - var password = config.auth.password || ''; - requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); - } - - request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); - - // Set the request timeout in MS - request.timeout = config.timeout; - - // Listen for ready state - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - - // Prepare the response - var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; - var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config: config, - request: request - }; - - settle(resolve, reject, response); - - // Clean up request - request = null; - }; - - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - - reject(createError('Request aborted', config, 'ECONNABORTED', request)); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(createError('Network Error', config, null, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', - request)); - - // Clean up request - request = null; - }; - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - if (utils.isStandardBrowserEnv()) { - var cookies = __webpack_require__(19); - - // Add xsrf header - var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? - cookies.read(config.xsrfCookieName) : - undefined; - - if (xsrfValue) { - requestHeaders[config.xsrfHeaderName] = xsrfValue; - } - } - - // Add headers to the request - if ('setRequestHeader' in request) { - utils.forEach(requestHeaders, function setRequestHeader(val, key) { - if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { - // Remove Content-Type if data is undefined - delete requestHeaders[key]; - } else { - // Otherwise add header to the request - request.setRequestHeader(key, val); - } - }); - } - - // Add withCredentials to request if needed - if (config.withCredentials) { - request.withCredentials = true; - } - - // Add responseType to request if needed - if (config.responseType) { - try { - request.responseType = config.responseType; - } catch (e) { - // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. - // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. - if (config.responseType !== 'json') { - throw e; - } - } - } - - // Handle progress if needed - if (typeof config.onDownloadProgress === 'function') { - request.addEventListener('progress', config.onDownloadProgress); - } - - // Not all browsers support upload events - if (typeof config.onUploadProgress === 'function' && request.upload) { - request.upload.addEventListener('progress', config.onUploadProgress); - } - - if (config.cancelToken) { - // Handle cancellation - config.cancelToken.promise.then(function onCanceled(cancel) { - if (!request) { - return; - } - - request.abort(); - reject(cancel); - // Clean up request - request = null; - }); - } - - if (requestData === undefined) { - requestData = null; - } - - // Send the request - request.send(requestData); - }); - }; - - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var createError = __webpack_require__(15); - - /** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - */ - module.exports = function settle(resolve, reject, response) { - var validateStatus = response.config.validateStatus; - if (!validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(createError( - 'Request failed with status code ' + response.status, - response.config, - null, - response.request, - response - )); - } - }; - - -/***/ }), -/* 15 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var enhanceError = __webpack_require__(16); - - /** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The created error. - */ - module.exports = function createError(message, config, code, request, response) { - var error = new Error(message); - return enhanceError(error, config, code, request, response); - }; - - -/***/ }), -/* 16 */ -/***/ (function(module, exports) { - - 'use strict'; - - /** - * Update an Error with the specified config, error code, and response. - * - * @param {Error} error The error to update. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The error. - */ - module.exports = function enhanceError(error, config, code, request, response) { - error.config = config; - if (code) { - error.code = code; - } - - error.request = request; - error.response = response; - error.isAxiosError = true; - - error.toJSON = function() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: this.config, - code: this.code - }; - }; - return error; - }; - - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - // Headers whose duplicates are ignored by node - // c.f. https://nodejs.org/api/http.html#http_message_headers - var ignoreDuplicateOf = [ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' - ]; - - /** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} headers Headers needing to be parsed - * @returns {Object} Headers parsed into an object - */ - module.exports = function parseHeaders(headers) { - var parsed = {}; - var key; - var val; - var i; - - if (!headers) { return parsed; } - - utils.forEach(headers.split('\n'), function parser(line) { - i = line.indexOf(':'); - key = utils.trim(line.substr(0, i)).toLowerCase(); - val = utils.trim(line.substr(i + 1)); - - if (key) { - if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { - return; - } - if (key === 'set-cookie') { - parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - } - }); - - return parsed; - }; - - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs have full support of the APIs needed to test - // whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - var msie = /(msie|trident)/i.test(navigator.userAgent); - var urlParsingNode = document.createElement('a'); - var originURL; - - /** - * Parse a URL to discover it's components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - var href = url; - - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } - - originURL = resolveURL(window.location.href); - - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : - - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })() - ); - - -/***/ }), -/* 19 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs support document.cookie - (function standardBrowserEnv() { - return { - write: function write(name, value, expires, path, domain, secure) { - var cookie = []; - cookie.push(name + '=' + encodeURIComponent(value)); - - if (utils.isNumber(expires)) { - cookie.push('expires=' + new Date(expires).toGMTString()); - } - - if (utils.isString(path)) { - cookie.push('path=' + path); - } - - if (utils.isString(domain)) { - cookie.push('domain=' + domain); - } - - if (secure === true) { - cookie.push('secure'); - } - - document.cookie = cookie.join('; '); - }, - - read: function read(name) { - var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove: function remove(name) { - this.write(name, '', Date.now() - 86400000); - } - }; - })() : - - // Non standard browser env (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return { - write: function write() {}, - read: function read() { return null; }, - remove: function remove() {} - }; - })() - ); - - -/***/ }), -/* 20 */ -/***/ (function(module, exports) { - - 'use strict'; - - /** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ - module.exports = function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); - }; - - -/***/ }), -/* 21 */ -/***/ (function(module, exports) { - - 'use strict'; - - /** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * @returns {string} The combined URL - */ - module.exports = function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; - }; - - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - /** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * @returns {Object} New object resulting from merging config2 to config1 - */ - module.exports = function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - var config = {}; - - utils.forEach(['url', 'method', 'params', 'data'], function valueFromConfig2(prop) { - if (typeof config2[prop] !== 'undefined') { - config[prop] = config2[prop]; - } - }); - - utils.forEach(['headers', 'auth', 'proxy'], function mergeDeepProperties(prop) { - if (utils.isObject(config2[prop])) { - config[prop] = utils.deepMerge(config1[prop], config2[prop]); - } else if (typeof config2[prop] !== 'undefined') { - config[prop] = config2[prop]; - } else if (utils.isObject(config1[prop])) { - config[prop] = utils.deepMerge(config1[prop]); - } else if (typeof config1[prop] !== 'undefined') { - config[prop] = config1[prop]; - } - }); - - utils.forEach([ - 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', - 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', - 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'maxContentLength', - 'validateStatus', 'maxRedirects', 'httpAgent', 'httpsAgent', 'cancelToken', - 'socketPath' - ], function defaultToConfig2(prop) { - if (typeof config2[prop] !== 'undefined') { - config[prop] = config2[prop]; - } else if (typeof config1[prop] !== 'undefined') { - config[prop] = config1[prop]; - } - }); - - return config; - }; - - -/***/ }), -/* 23 */ -/***/ (function(module, exports) { - - 'use strict'; - - /** - * A `Cancel` is an object that is thrown when an operation is canceled. - * - * @class - * @param {string=} message The message. - */ - function Cancel(message) { - this.message = message; - } - - Cancel.prototype.toString = function toString() { - return 'Cancel' + (this.message ? ': ' + this.message : ''); - }; - - Cancel.prototype.__CANCEL__ = true; - - module.exports = Cancel; - - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var Cancel = __webpack_require__(23); - - /** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @class - * @param {Function} executor The executor function. - */ - function CancelToken(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - - var resolvePromise; - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - - var token = this; - executor(function cancel(message) { - if (token.reason) { - // Cancellation has already been requested - return; - } - - token.reason = new Cancel(message); - resolvePromise(token.reason); - }); - } - - /** - * Throws a `Cancel` if cancellation has been requested. - */ - CancelToken.prototype.throwIfRequested = function throwIfRequested() { - if (this.reason) { - throw this.reason; - } - }; - - /** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ - CancelToken.source = function source() { - var cancel; - var token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token: token, - cancel: cancel - }; - }; - - module.exports = CancelToken; - - -/***/ }), -/* 25 */ -/***/ (function(module, exports) { - - 'use strict'; - - /** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * @returns {Function} - */ - module.exports = function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; - }; - - -/***/ }) -/******/ ]) -}); -; -//# sourceMappingURL=axios.map \ No newline at end of file diff --git a/node_modules/axios/dist/axios.map b/node_modules/axios/dist/axios.map deleted file mode 100644 index 6fff93e6..00000000 --- a/node_modules/axios/dist/axios.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap ddfe8a04d3b6bbcd8d1c","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/utils.js","webpack:///./lib/helpers/bind.js","webpack:///./~/is-buffer/index.js","webpack:///./lib/core/Axios.js","webpack:///./lib/helpers/buildURL.js","webpack:///./lib/core/InterceptorManager.js","webpack:///./lib/core/dispatchRequest.js","webpack:///./lib/core/transformData.js","webpack:///./lib/cancel/isCancel.js","webpack:///./lib/defaults.js","webpack:///./lib/helpers/normalizeHeaderName.js","webpack:///./lib/adapters/xhr.js","webpack:///./lib/core/settle.js","webpack:///./lib/core/createError.js","webpack:///./lib/core/enhanceError.js","webpack:///./lib/helpers/parseHeaders.js","webpack:///./lib/helpers/isURLSameOrigin.js","webpack:///./lib/helpers/cookies.js","webpack:///./lib/helpers/isAbsoluteURL.js","webpack:///./lib/helpers/combineURLs.js","webpack:///./lib/core/mergeConfig.js","webpack:///./lib/cancel/Cancel.js","webpack:///./lib/cancel/CancelToken.js","webpack:///./lib/helpers/spread.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA,yC;;;;;;ACAA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,aAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;;;;;ACpDA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,aAAa;AACxB,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAmC,OAAO;AAC1C;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA2B;AAC3B;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA,wCAAuC,OAAO;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,iCAAgC;AAChC,MAAK;AACL;AACA;AACA;;AAEA,wCAAuC,OAAO;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7UA;;AAEA;AACA;AACA;AACA,oBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;ACVA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAgD;AAChD;AACA;AACA,MAAK;AACL;AACA,EAAC;;AAED;AACA;AACA;AACA,iDAAgD;AAChD;AACA;AACA;AACA,MAAK;AACL;AACA,EAAC;;AAED;;;;;;;ACrFA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,QAAO;AACP,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB;AACA,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;;;;;;;ACnDA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;AAC/B,wCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;;;;;;;ACrFA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,cAAc;AACzB,YAAW,MAAM;AACjB,YAAW,eAAe;AAC1B,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;ACnBA;;AAEA;AACA;AACA;;;;;;;ACJA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAwE;AACxE;AACA;AACA;AACA,wDAAuD;AACvD;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,QAAO,YAAY;AACnB;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;;;;;;;ACjGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;;;;;;ACXA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,6CAA4C;AAC5C;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;;;;;;AC7KA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxBA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;;;;;;ACjBA;;AAEA;AACA;AACA;AACA,YAAW,MAAM;AACjB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzCA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAiB,eAAe;;AAEhC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;ACpDA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,iBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,iBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;;;;;;ACnEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2CAA0C;AAC1C,UAAS;;AAET;AACA,6DAA4D,wBAAwB;AACpF;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,mCAAkC;AAClC,gCAA+B,aAAa,EAAE;AAC9C;AACA;AACA,MAAK;AACL;;;;;;;ACpDA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACbA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;;;;;;ACbA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;AClDA;;AAEA;AACA;AACA;AACA;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;;;;;;AClBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACxDA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA,YAAW,SAAS;AACpB,cAAa;AACb;AACA;AACA;AACA;AACA;AACA","file":"axios.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap ddfe8a04d3b6bbcd8d1c","module.exports = require('./lib/axios');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/axios.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nvar bind = require('./helpers/bind');\nvar isBuffer = require('is-buffer');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Function equal to merge with the difference being that no reference\n * to original objects is kept.\n *\n * @see merge\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction deepMerge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = deepMerge(result[key], val);\n } else if (typeof val === 'object') {\n result[key] = deepMerge({}, val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n deepMerge: deepMerge,\n extend: extend,\n trim: trim\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/bind.js\n// module id = 3\n// module chunks = 0","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\nmodule.exports = function isBuffer (obj) {\n return obj != null && obj.constructor != null &&\n typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/is-buffer/index.js\n// module id = 4\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n config.method = config.method ? config.method.toLowerCase() : 'get';\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/Axios.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/buildURL.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/InterceptorManager.js\n// module id = 7\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar isAbsoluteURL = require('./../helpers/isAbsoluteURL');\nvar combineURLs = require('./../helpers/combineURLs');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/dispatchRequest.js\n// module id = 8\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/transformData.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/isCancel.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n // Only Node.JS has a process variable that is of [[Class]] process\n if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n } else if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/defaults.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/normalizeHeaderName.js\n// module id = 12\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies');\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/adapters/xhr.js\n// module id = 13\n// module chunks = 0","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/settle.js\n// module id = 14\n// module chunks = 0","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/createError.js\n// module id = 15\n// module chunks = 0","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/enhanceError.js\n// module id = 16\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/parseHeaders.js\n// module id = 17\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isURLSameOrigin.js\n// module id = 18\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/cookies.js\n// module id = 19\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isAbsoluteURL.js\n// module id = 20\n// module chunks = 0","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/combineURLs.js\n// module id = 21\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n utils.forEach(['url', 'method', 'params', 'data'], function valueFromConfig2(prop) {\n if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n }\n });\n\n utils.forEach(['headers', 'auth', 'proxy'], function mergeDeepProperties(prop) {\n if (utils.isObject(config2[prop])) {\n config[prop] = utils.deepMerge(config1[prop], config2[prop]);\n } else if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n } else if (utils.isObject(config1[prop])) {\n config[prop] = utils.deepMerge(config1[prop]);\n } else if (typeof config1[prop] !== 'undefined') {\n config[prop] = config1[prop];\n }\n });\n\n utils.forEach([\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'maxContentLength',\n 'validateStatus', 'maxRedirects', 'httpAgent', 'httpsAgent', 'cancelToken',\n 'socketPath'\n ], function defaultToConfig2(prop) {\n if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n } else if (typeof config1[prop] !== 'undefined') {\n config[prop] = config1[prop];\n }\n });\n\n return config;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/mergeConfig.js\n// module id = 22\n// module chunks = 0","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/Cancel.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/CancelToken.js\n// module id = 24\n// module chunks = 0","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/spread.js\n// module id = 25\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/axios/dist/axios.min.js b/node_modules/axios/dist/axios.min.js deleted file mode 100644 index 0f368163..00000000 --- a/node_modules/axios/dist/axios.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/* axios v0.19.0 | (c) 2019 by Matt Zabriskie */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new i(e),n=s(i.prototype.request,t);return o.extend(n,i.prototype,t),o.extend(n,t),n}var o=n(2),s=n(3),i=n(5),a=n(22),u=n(11),c=r(u);c.Axios=i,c.create=function(e){return r(a(c.defaults,e))},c.Cancel=n(23),c.CancelToken=n(24),c.isCancel=n(10),c.all=function(e){return Promise.all(e)},c.spread=n(25),e.exports=c,e.exports.default=c},function(e,t,n){"use strict";function r(e){return"[object Array]"===j.call(e)}function o(e){return"[object ArrayBuffer]"===j.call(e)}function s(e){return"undefined"!=typeof FormData&&e instanceof FormData}function i(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function a(e){return"string"==typeof e}function u(e){return"number"==typeof e}function c(e){return"undefined"==typeof e}function f(e){return null!==e&&"object"==typeof e}function p(e){return"[object Date]"===j.call(e)}function d(e){return"[object File]"===j.call(e)}function l(e){return"[object Blob]"===j.call(e)}function h(e){return"[object Function]"===j.call(e)}function m(e){return f(e)&&h(e.pipe)}function y(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function g(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function x(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function v(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n - * @license MIT - */ -e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new i,response:new i}}var o=n(2),s=n(6),i=n(7),a=n(8),u=n(22);r.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=u(this.defaults,e),e.method=e.method?e.method.toLowerCase():"get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},r.prototype.getUri=function(e){return e=u(this.defaults,e),s(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},o.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(o.merge(n||{},{method:e,url:t}))}}),o.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(o.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(2);e.exports=function(e,t,n){if(!t)return e;var s;if(n)s=n(t);else if(o.isURLSearchParams(t))s=t.toString();else{var i=[];o.forEach(t,function(e,t){null!==e&&"undefined"!=typeof e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),i.push(r(t)+"="+r(e))}))}),s=i.join("&")}if(s){var a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(2);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(2),s=n(9),i=n(10),a=n(11),u=n(20),c=n(21);e.exports=function(e){r(e),e.baseURL&&!u(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=s(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});var t=e.adapter||a.adapter;return t(e).then(function(t){return r(e),t.data=s(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(r(e),t&&t.response&&(t.response.data=s(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";function r(e,t){!s.isUndefined(e)&&s.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var e;return"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)?e=n(13):"undefined"!=typeof XMLHttpRequest&&(e=n(13)),e}var s=n(2),i=n(12),a={"Content-Type":"application/x-www-form-urlencoded"},u={adapter:o(),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),s.isFormData(e)||s.isArrayBuffer(e)||s.isBuffer(e)||s.isStream(e)||s.isFile(e)||s.isBlob(e)?e:s.isArrayBufferView(e)?e.buffer:s.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):s.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},s.forEach(["delete","get","head"],function(e){u.headers[e]={}}),s.forEach(["post","put","patch"],function(e){u.headers[e]=s.merge(a)}),e.exports=u},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(14),s=n(6),i=n(17),a=n(18),u=n(15);e.exports=function(e){return new Promise(function(t,c){var f=e.data,p=e.headers;r.isFormData(f)&&delete p["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var l=e.auth.username||"",h=e.auth.password||"";p.Authorization="Basic "+btoa(l+":"+h)}if(d.open(e.method.toUpperCase(),s(e.url,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?i(d.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?d.response:d.responseText,s={data:r,status:d.status,statusText:d.statusText,headers:n,config:e,request:d};o(t,c,s),d=null}},d.onabort=function(){d&&(c(u("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){c(u("Network Error",e,null,d)),d=null},d.ontimeout=function(){c(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var m=n(19),y=(e.withCredentials||a(e.url))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;y&&(p[e.xsrfHeaderName]=y)}if("setRequestHeader"in d&&r.forEach(p,function(e,t){"undefined"==typeof f&&"content-type"===t.toLowerCase()?delete p[t]:d.setRequestHeader(t,e)}),e.withCredentials&&(d.withCredentials=!0),e.responseType)try{d.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){d&&(d.abort(),c(e),d=null)}),void 0===f&&(f=null),d.send(f)})}},function(e,t,n){"use strict";var r=n(15);e.exports=function(e,t,n){var o=n.config.validateStatus;!o||o(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";var r=n(16);e.exports=function(e,t,n,o,s){var i=new Error(e);return r(i,t,n,o,s)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,s,i={};return e?(r.forEach(e.split("\n"),function(e){if(s=e.indexOf(":"),t=r.trim(e.substr(0,s)).toLowerCase(),n=r.trim(e.substr(s+1)),t){if(i[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?i[t]=(i[t]?i[t]:[]).concat([n]):i[t]=i[t]?i[t]+", "+n:n}}),i):i}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,s,i){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){t=t||{};var n={};return r.forEach(["url","method","params","data"],function(e){"undefined"!=typeof t[e]&&(n[e]=t[e])}),r.forEach(["headers","auth","proxy"],function(o){r.isObject(t[o])?n[o]=r.deepMerge(e[o],t[o]):"undefined"!=typeof t[o]?n[o]=t[o]:r.isObject(e[o])?n[o]=r.deepMerge(e[o]):"undefined"!=typeof e[o]&&(n[o]=e[o])}),r.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],function(r){"undefined"!=typeof t[r]?n[r]=t[r]:"undefined"!=typeof e[r]&&(n[r]=e[r])}),n}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}])}); -//# sourceMappingURL=axios.min.map \ No newline at end of file diff --git a/node_modules/axios/dist/axios.min.map b/node_modules/axios/dist/axios.min.map deleted file mode 100644 index 8dcff1cd..00000000 --- a/node_modules/axios/dist/axios.min.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///axios.min.js","webpack:///webpack/bootstrap 3e317bb69558239a2225","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/utils.js","webpack:///./lib/helpers/bind.js","webpack:///./~/is-buffer/index.js","webpack:///./lib/core/Axios.js","webpack:///./lib/helpers/buildURL.js","webpack:///./lib/core/InterceptorManager.js","webpack:///./lib/core/dispatchRequest.js","webpack:///./lib/core/transformData.js","webpack:///./lib/cancel/isCancel.js","webpack:///./lib/defaults.js","webpack:///./lib/helpers/normalizeHeaderName.js","webpack:///./lib/adapters/xhr.js","webpack:///./lib/core/settle.js","webpack:///./lib/core/createError.js","webpack:///./lib/core/enhanceError.js","webpack:///./lib/helpers/parseHeaders.js","webpack:///./lib/helpers/isURLSameOrigin.js","webpack:///./lib/helpers/cookies.js","webpack:///./lib/helpers/isAbsoluteURL.js","webpack:///./lib/helpers/combineURLs.js","webpack:///./lib/core/mergeConfig.js","webpack:///./lib/cancel/Cancel.js","webpack:///./lib/cancel/CancelToken.js","webpack:///./lib/helpers/spread.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","createInstance","defaultConfig","context","Axios","instance","bind","prototype","request","utils","extend","mergeConfig","defaults","axios","create","instanceConfig","Cancel","CancelToken","isCancel","all","promises","Promise","spread","default","isArray","val","toString","isArrayBuffer","isFormData","FormData","isArrayBufferView","result","ArrayBuffer","isView","buffer","isString","isNumber","isUndefined","isObject","isDate","isFile","isBlob","isFunction","isStream","pipe","isURLSearchParams","URLSearchParams","trim","str","replace","isStandardBrowserEnv","navigator","product","window","document","forEach","obj","fn","i","l","length","key","Object","hasOwnProperty","merge","assignValue","arguments","deepMerge","a","b","thisArg","isBuffer","args","Array","apply","constructor","interceptors","InterceptorManager","response","buildURL","dispatchRequest","config","url","method","toLowerCase","chain","undefined","promise","resolve","interceptor","unshift","fulfilled","rejected","push","then","shift","getUri","params","paramsSerializer","data","encode","encodeURIComponent","serializedParams","parts","v","toISOString","JSON","stringify","join","hashmarkIndex","indexOf","slice","handlers","use","eject","h","throwIfCancellationRequested","cancelToken","throwIfRequested","transformData","isAbsoluteURL","combineURLs","baseURL","headers","transformRequest","common","adapter","transformResponse","reason","reject","fns","value","__CANCEL__","setContentTypeIfUnset","getDefaultAdapter","process","XMLHttpRequest","normalizeHeaderName","DEFAULT_CONTENT_TYPE","Content-Type","parse","e","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","validateStatus","status","Accept","normalizedName","name","toUpperCase","settle","parseHeaders","isURLSameOrigin","createError","requestData","requestHeaders","auth","username","password","Authorization","btoa","open","onreadystatechange","readyState","responseURL","responseHeaders","getAllResponseHeaders","responseData","responseType","responseText","statusText","onabort","onerror","ontimeout","cookies","xsrfValue","withCredentials","read","setRequestHeader","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","abort","send","enhanceError","message","code","error","Error","isAxiosError","toJSON","description","number","fileName","lineNumber","columnNumber","stack","ignoreDuplicateOf","parsed","split","line","substr","concat","resolveURL","href","msie","urlParsingNode","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","originURL","test","userAgent","createElement","location","requestURL","write","expires","path","domain","secure","cookie","Date","toGMTString","match","RegExp","decodeURIComponent","remove","now","relativeURL","config1","config2","prop","executor","TypeError","resolvePromise","token","source","callback","arr"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,MAAAD,IAEAD,EAAA,MAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAAUL,EAAQD,EAASM,GEtDjCL,EAAAD,QAAAM,EAAA,IF4DM,SAAUL,EAAQD,EAASM,GG5DjC,YAcA,SAAAS,GAAAC,GACA,GAAAC,GAAA,GAAAC,GAAAF,GACAG,EAAAC,EAAAF,EAAAG,UAAAC,QAAAL,EAQA,OALAM,GAAAC,OAAAL,EAAAD,EAAAG,UAAAJ,GAGAM,EAAAC,OAAAL,EAAAF,GAEAE,EAtBA,GAAAI,GAAAjB,EAAA,GACAc,EAAAd,EAAA,GACAY,EAAAZ,EAAA,GACAmB,EAAAnB,EAAA,IACAoB,EAAApB,EAAA,IAsBAqB,EAAAZ,EAAAW,EAGAC,GAAAT,QAGAS,EAAAC,OAAA,SAAAC,GACA,MAAAd,GAAAU,EAAAE,EAAAD,SAAAG,KAIAF,EAAAG,OAAAxB,EAAA,IACAqB,EAAAI,YAAAzB,EAAA,IACAqB,EAAAK,SAAA1B,EAAA,IAGAqB,EAAAM,IAAA,SAAAC,GACA,MAAAC,SAAAF,IAAAC,IAEAP,EAAAS,OAAA9B,EAAA,IAEAL,EAAAD,QAAA2B,EAGA1B,EAAAD,QAAAqC,QAAAV,GHmEM,SAAU1B,EAAQD,EAASM,GIvHjC,YAiBA,SAAAgC,GAAAC,GACA,yBAAAC,EAAA7B,KAAA4B,GASA,QAAAE,GAAAF,GACA,+BAAAC,EAAA7B,KAAA4B,GASA,QAAAG,GAAAH,GACA,yBAAAI,WAAAJ,YAAAI,UASA,QAAAC,GAAAL,GACA,GAAAM,EAMA,OAJAA,GADA,mBAAAC,0BAAA,OACAA,YAAAC,OAAAR,GAEA,GAAAA,EAAA,QAAAA,EAAAS,iBAAAF,aAWA,QAAAG,GAAAV,GACA,sBAAAA,GASA,QAAAW,GAAAX,GACA,sBAAAA,GASA,QAAAY,GAAAZ,GACA,yBAAAA,GASA,QAAAa,GAAAb,GACA,cAAAA,GAAA,gBAAAA,GASA,QAAAc,GAAAd,GACA,wBAAAC,EAAA7B,KAAA4B,GASA,QAAAe,GAAAf,GACA,wBAAAC,EAAA7B,KAAA4B,GASA,QAAAgB,GAAAhB,GACA,wBAAAC,EAAA7B,KAAA4B,GASA,QAAAiB,GAAAjB,GACA,4BAAAC,EAAA7B,KAAA4B,GASA,QAAAkB,GAAAlB,GACA,MAAAa,GAAAb,IAAAiB,EAAAjB,EAAAmB,MASA,QAAAC,GAAApB,GACA,yBAAAqB,kBAAArB,YAAAqB,iBASA,QAAAC,GAAAC,GACA,MAAAA,GAAAC,QAAA,WAAAA,QAAA,WAkBA,QAAAC,KACA,0BAAAC,YAAA,gBAAAA,UAAAC,SACA,iBAAAD,UAAAC,SACA,OAAAD,UAAAC,WAIA,mBAAAC,SACA,mBAAAC,WAgBA,QAAAC,GAAAC,EAAAC,GAEA,UAAAD,GAAA,mBAAAA,GAUA,GALA,gBAAAA,KAEAA,OAGAhC,EAAAgC,GAEA,OAAAE,GAAA,EAAAC,EAAAH,EAAAI,OAAmCF,EAAAC,EAAOD,IAC1CD,EAAA5D,KAAA,KAAA2D,EAAAE,KAAAF,OAIA,QAAAK,KAAAL,GACAM,OAAAvD,UAAAwD,eAAAlE,KAAA2D,EAAAK,IACAJ,EAAA5D,KAAA,KAAA2D,EAAAK,KAAAL,GAuBA,QAAAQ,KAEA,QAAAC,GAAAxC,EAAAoC,GACA,gBAAA9B,GAAA8B,IAAA,gBAAApC,GACAM,EAAA8B,GAAAG,EAAAjC,EAAA8B,GAAApC,GAEAM,EAAA8B,GAAApC,EAIA,OATAM,MASA2B,EAAA,EAAAC,EAAAO,UAAAN,OAAuCF,EAAAC,EAAOD,IAC9CH,EAAAW,UAAAR,GAAAO,EAEA,OAAAlC,GAWA,QAAAoC,KAEA,QAAAF,GAAAxC,EAAAoC,GACA,gBAAA9B,GAAA8B,IAAA,gBAAApC,GACAM,EAAA8B,GAAAM,EAAApC,EAAA8B,GAAApC,GACK,gBAAAA,GACLM,EAAA8B,GAAAM,KAAgC1C,GAEhCM,EAAA8B,GAAApC,EAIA,OAXAM,MAWA2B,EAAA,EAAAC,EAAAO,UAAAN,OAAuCF,EAAAC,EAAOD,IAC9CH,EAAAW,UAAAR,GAAAO,EAEA,OAAAlC,GAWA,QAAArB,GAAA0D,EAAAC,EAAAC,GAQA,MAPAf,GAAAc,EAAA,SAAA5C,EAAAoC,GACAS,GAAA,kBAAA7C,GACA2C,EAAAP,GAAAvD,EAAAmB,EAAA6C,GAEAF,EAAAP,GAAApC,IAGA2C,EAlTA,GAAA9D,GAAAd,EAAA,GACA+E,EAAA/E,EAAA,GAMAkC,EAAAoC,OAAAvD,UAAAmB,QA8SAvC,GAAAD,SACAsC,UACAG,gBACA4C,WACA3C,aACAE,oBACAK,WACAC,WACAE,WACAD,cACAE,SACAC,SACAC,SACAC,aACAC,WACAE,oBACAK,uBACAK,UACAS,QACAG,YACAzD,SACAqC,SJ+HM,SAAU5D,EAAQD,GK3cxB,YAEAC,GAAAD,QAAA,SAAAuE,EAAAa,GACA,kBAEA,OADAE,GAAA,GAAAC,OAAAP,UAAAN,QACAF,EAAA,EAAmBA,EAAAc,EAAAZ,OAAiBF,IACpCc,EAAAd,GAAAQ,UAAAR,EAEA,OAAAD,GAAAiB,MAAAJ,EAAAE,MLodM,SAAUrF,EAAQD;;;;;;AMrdxBC,EAAAD,QAAA,SAAAsE,GACA,aAAAA,GAAA,MAAAA,EAAAmB,aACA,kBAAAnB,GAAAmB,YAAAJ,UAAAf,EAAAmB,YAAAJ,SAAAf,KNoeM,SAAUrE,EAAQD,EAASM,GO7ejC,YAaA,SAAAY,GAAAW,GACAzB,KAAAsB,SAAAG,EACAzB,KAAAsF,cACApE,QAAA,GAAAqE,GACAC,SAAA,GAAAD,IAfA,GAAApE,GAAAjB,EAAA,GACAuF,EAAAvF,EAAA,GACAqF,EAAArF,EAAA,GACAwF,EAAAxF,EAAA,GACAmB,EAAAnB,EAAA,GAoBAY,GAAAG,UAAAC,QAAA,SAAAyE,GAGA,gBAAAA,IACAA,EAAAf,UAAA,OACAe,EAAAC,IAAAhB,UAAA,IAEAe,QAGAA,EAAAtE,EAAArB,KAAAsB,SAAAqE,GACAA,EAAAE,OAAAF,EAAAE,OAAAF,EAAAE,OAAAC,cAAA,KAGA,IAAAC,IAAAL,EAAAM,QACAC,EAAAlE,QAAAmE,QAAAP,EAUA,KARA3F,KAAAsF,aAAApE,QAAA+C,QAAA,SAAAkC,GACAJ,EAAAK,QAAAD,EAAAE,UAAAF,EAAAG,YAGAtG,KAAAsF,aAAAE,SAAAvB,QAAA,SAAAkC,GACAJ,EAAAQ,KAAAJ,EAAAE,UAAAF,EAAAG,YAGAP,EAAAzB,QACA2B,IAAAO,KAAAT,EAAAU,QAAAV,EAAAU,QAGA,OAAAR,IAGAnF,EAAAG,UAAAyF,OAAA,SAAAf,GAEA,MADAA,GAAAtE,EAAArB,KAAAsB,SAAAqE,GACAF,EAAAE,EAAAC,IAAAD,EAAAgB,OAAAhB,EAAAiB,kBAAAjD,QAAA,WAIAxC,EAAA8C,SAAA,0CAAA4B,GAEA/E,EAAAG,UAAA4E,GAAA,SAAAD,EAAAD,GACA,MAAA3F,MAAAkB,QAAAC,EAAAuD,MAAAiB,OACAE,SACAD,YAKAzE,EAAA8C,SAAA,+BAAA4B,GAEA/E,EAAAG,UAAA4E,GAAA,SAAAD,EAAAiB,EAAAlB,GACA,MAAA3F,MAAAkB,QAAAC,EAAAuD,MAAAiB,OACAE,SACAD,MACAiB,aAKAhH,EAAAD,QAAAkB,GPofM,SAAUjB,EAAQD,EAASM,GQzkBjC,YAIA,SAAA4G,GAAA3E,GACA,MAAA4E,oBAAA5E,GACAwB,QAAA,aACAA,QAAA,aACAA,QAAA,YACAA,QAAA,aACAA,QAAA,YACAA,QAAA,aACAA,QAAA,aAVA,GAAAxC,GAAAjB,EAAA,EAoBAL,GAAAD,QAAA,SAAAgG,EAAAe,EAAAC,GAEA,IAAAD,EACA,MAAAf,EAGA,IAAAoB,EACA,IAAAJ,EACAI,EAAAJ,EAAAD,OACG,IAAAxF,EAAAoC,kBAAAoD,GACHK,EAAAL,EAAAvE,eACG,CACH,GAAA6E,KAEA9F,GAAA8C,QAAA0C,EAAA,SAAAxE,EAAAoC,GACA,OAAApC,GAAA,mBAAAA,KAIAhB,EAAAe,QAAAC,GACAoC,GAAA,KAEApC,MAGAhB,EAAA8C,QAAA9B,EAAA,SAAA+E,GACA/F,EAAA8B,OAAAiE,GACAA,IAAAC,cACShG,EAAA6B,SAAAkE,KACTA,EAAAE,KAAAC,UAAAH,IAEAD,EAAAV,KAAAO,EAAAvC,GAAA,IAAAuC,EAAAI,SAIAF,EAAAC,EAAAK,KAAA,KAGA,GAAAN,EAAA,CACA,GAAAO,GAAA3B,EAAA4B,QAAA,IACAD,MAAA,IACA3B,IAAA6B,MAAA,EAAAF,IAGA3B,MAAA4B,QAAA,mBAAAR,EAGA,MAAApB,KRilBM,SAAU/F,EAAQD,EAASM,GStpBjC,YAIA,SAAAqF,KACAvF,KAAA0H,YAHA,GAAAvG,GAAAjB,EAAA,EAcAqF,GAAAtE,UAAA0G,IAAA,SAAAtB,EAAAC,GAKA,MAJAtG,MAAA0H,SAAAnB,MACAF,YACAC,aAEAtG,KAAA0H,SAAApD,OAAA,GAQAiB,EAAAtE,UAAA2G,MAAA,SAAAvH,GACAL,KAAA0H,SAAArH,KACAL,KAAA0H,SAAArH,GAAA,OAYAkF,EAAAtE,UAAAgD,QAAA,SAAAE,GACAhD,EAAA8C,QAAAjE,KAAA0H,SAAA,SAAAG,GACA,OAAAA,GACA1D,EAAA0D,MAKAhI,EAAAD,QAAA2F,GT6pBM,SAAU1F,EAAQD,EAASM,GUhtBjC,YAYA,SAAA4H,GAAAnC,GACAA,EAAAoC,aACApC,EAAAoC,YAAAC,mBAZA,GAAA7G,GAAAjB,EAAA,GACA+H,EAAA/H,EAAA,GACA0B,EAAA1B,EAAA,IACAoB,EAAApB,EAAA,IACAgI,EAAAhI,EAAA,IACAiI,EAAAjI,EAAA,GAiBAL,GAAAD,QAAA,SAAA+F,GACAmC,EAAAnC,GAGAA,EAAAyC,UAAAF,EAAAvC,EAAAC,OACAD,EAAAC,IAAAuC,EAAAxC,EAAAyC,QAAAzC,EAAAC,MAIAD,EAAA0C,QAAA1C,EAAA0C,YAGA1C,EAAAkB,KAAAoB,EACAtC,EAAAkB,KACAlB,EAAA0C,QACA1C,EAAA2C,kBAIA3C,EAAA0C,QAAAlH,EAAAuD,MACAiB,EAAA0C,QAAAE,WACA5C,EAAA0C,QAAA1C,EAAAE,YACAF,EAAA0C,aAGAlH,EAAA8C,SACA,qDACA,SAAA4B,SACAF,GAAA0C,QAAAxC,IAIA,IAAA2C,GAAA7C,EAAA6C,SAAAlH,EAAAkH,OAEA,OAAAA,GAAA7C,GAAAa,KAAA,SAAAhB,GAUA,MATAsC,GAAAnC,GAGAH,EAAAqB,KAAAoB,EACAzC,EAAAqB,KACArB,EAAA6C,QACA1C,EAAA8C,mBAGAjD,GACG,SAAAkD,GAcH,MAbA9G,GAAA8G,KACAZ,EAAAnC,GAGA+C,KAAAlD,WACAkD,EAAAlD,SAAAqB,KAAAoB,EACAS,EAAAlD,SAAAqB,KACA6B,EAAAlD,SAAA6C,QACA1C,EAAA8C,qBAKA1G,QAAA4G,OAAAD,OVytBM,SAAU7I,EAAQD,EAASM,GW5yBjC,YAEA,IAAAiB,GAAAjB,EAAA,EAUAL,GAAAD,QAAA,SAAAiH,EAAAwB,EAAAO,GAMA,MAJAzH,GAAA8C,QAAA2E,EAAA,SAAAzE,GACA0C,EAAA1C,EAAA0C,EAAAwB,KAGAxB,IXozBM,SAAUhH,EAAQD,GYt0BxB,YAEAC,GAAAD,QAAA,SAAAiJ,GACA,SAAAA,MAAAC,cZ80BM,SAAUjJ,EAAQD,EAASM,Gaj1BjC,YASA,SAAA6I,GAAAV,EAAAQ,IACA1H,EAAA4B,YAAAsF,IAAAlH,EAAA4B,YAAAsF,EAAA,mBACAA,EAAA,gBAAAQ,GAIA,QAAAG,KACA,GAAAR,EASA,OAPA,mBAAAS,UAAA,qBAAAzE,OAAAvD,UAAAmB,SAAA7B,KAAA0I,SAEAT,EAAAtI,EAAA,IACG,mBAAAgJ,kBAEHV,EAAAtI,EAAA,KAEAsI,EAvBA,GAAArH,GAAAjB,EAAA,GACAiJ,EAAAjJ,EAAA,IAEAkJ,GACAC,eAAA,qCAsBA/H,GACAkH,QAAAQ,IAEAV,kBAAA,SAAAzB,EAAAwB,GAGA,MAFAc,GAAAd,EAAA,UACAc,EAAAd,EAAA,gBACAlH,EAAAmB,WAAAuE,IACA1F,EAAAkB,cAAAwE,IACA1F,EAAA8D,SAAA4B,IACA1F,EAAAkC,SAAAwD,IACA1F,EAAA+B,OAAA2D,IACA1F,EAAAgC,OAAA0D,GAEAA,EAEA1F,EAAAqB,kBAAAqE,GACAA,EAAAjE,OAEAzB,EAAAoC,kBAAAsD,IACAkC,EAAAV,EAAA,mDACAxB,EAAAzE,YAEAjB,EAAA6B,SAAA6D,IACAkC,EAAAV,EAAA,kCACAjB,KAAAC,UAAAR,IAEAA,IAGA4B,mBAAA,SAAA5B,GAEA,mBAAAA,GACA,IACAA,EAAAO,KAAAkC,MAAAzC,GACO,MAAA0C,IAEP,MAAA1C,KAOA2C,QAAA,EAEAC,eAAA,aACAC,eAAA,eAEAC,kBAAA,EAEAC,eAAA,SAAAC,GACA,MAAAA,IAAA,KAAAA,EAAA,KAIAvI,GAAA+G,SACAE,QACAuB,OAAA,sCAIA3I,EAAA8C,SAAA,gCAAA4B,GACAvE,EAAA+G,QAAAxC,QAGA1E,EAAA8C,SAAA,+BAAA4B,GACAvE,EAAA+G,QAAAxC,GAAA1E,EAAAuD,MAAA0E,KAGAvJ,EAAAD,QAAA0B,Gbw1BM,SAAUzB,EAAQD,EAASM,Gcz7BjC,YAEA,IAAAiB,GAAAjB,EAAA,EAEAL,GAAAD,QAAA,SAAAyI,EAAA0B,GACA5I,EAAA8C,QAAAoE,EAAA,SAAAQ,EAAAmB,GACAA,IAAAD,GAAAC,EAAAC,gBAAAF,EAAAE,gBACA5B,EAAA0B,GAAAlB,QACAR,GAAA2B,Qdm8BM,SAAUnK,EAAQD,EAASM,Ge38BjC,YAEA,IAAAiB,GAAAjB,EAAA,GACAgK,EAAAhK,EAAA,IACAuF,EAAAvF,EAAA,GACAiK,EAAAjK,EAAA,IACAkK,EAAAlK,EAAA,IACAmK,EAAAnK,EAAA,GAEAL,GAAAD,QAAA,SAAA+F,GACA,UAAA5D,SAAA,SAAAmE,EAAAyC,GACA,GAAA2B,GAAA3E,EAAAkB,KACA0D,EAAA5E,EAAA0C,OAEAlH,GAAAmB,WAAAgI,UACAC,GAAA,eAGA,IAAArJ,GAAA,GAAAgI,eAGA,IAAAvD,EAAA6E,KAAA,CACA,GAAAC,GAAA9E,EAAA6E,KAAAC,UAAA,GACAC,EAAA/E,EAAA6E,KAAAE,UAAA,EACAH,GAAAI,cAAA,SAAAC,KAAAH,EAAA,IAAAC,GA0EA,GAvEAxJ,EAAA2J,KAAAlF,EAAAE,OAAAoE,cAAAxE,EAAAE,EAAAC,IAAAD,EAAAgB,OAAAhB,EAAAiB,mBAAA,GAGA1F,EAAAsI,QAAA7D,EAAA6D,QAGAtI,EAAA4J,mBAAA,WACA,GAAA5J,GAAA,IAAAA,EAAA6J,aAQA,IAAA7J,EAAA2I,QAAA3I,EAAA8J,aAAA,IAAA9J,EAAA8J,YAAAxD,QAAA,WAKA,GAAAyD,GAAA,yBAAA/J,GAAAiJ,EAAAjJ,EAAAgK,yBAAA,KACAC,EAAAxF,EAAAyF,cAAA,SAAAzF,EAAAyF,aAAAlK,EAAAsE,SAAAtE,EAAAmK,aACA7F,GACAqB,KAAAsE,EACAtB,OAAA3I,EAAA2I,OACAyB,WAAApK,EAAAoK,WACAjD,QAAA4C,EACAtF,SACAzE,UAGAgJ,GAAAhE,EAAAyC,EAAAnD,GAGAtE,EAAA,OAIAA,EAAAqK,QAAA,WACArK,IAIAyH,EAAA0B,EAAA,kBAAA1E,EAAA,eAAAzE,IAGAA,EAAA,OAIAA,EAAAsK,QAAA,WAGA7C,EAAA0B,EAAA,gBAAA1E,EAAA,KAAAzE,IAGAA,EAAA,MAIAA,EAAAuK,UAAA,WACA9C,EAAA0B,EAAA,cAAA1E,EAAA6D,QAAA,cAAA7D,EAAA,eACAzE,IAGAA,EAAA,MAMAC,EAAAyC,uBAAA,CACA,GAAA8H,GAAAxL,EAAA,IAGAyL,GAAAhG,EAAAiG,iBAAAxB,EAAAzE,EAAAC,OAAAD,EAAA8D,eACAiC,EAAAG,KAAAlG,EAAA8D,gBACAzD,MAEA2F,KACApB,EAAA5E,EAAA+D,gBAAAiC,GAuBA,GAlBA,oBAAAzK,IACAC,EAAA8C,QAAAsG,EAAA,SAAApI,EAAAoC,GACA,mBAAA+F,IAAA,iBAAA/F,EAAAuB,oBAEAyE,GAAAhG,GAGArD,EAAA4K,iBAAAvH,EAAApC,KAMAwD,EAAAiG,kBACA1K,EAAA0K,iBAAA,GAIAjG,EAAAyF,aACA,IACAlK,EAAAkK,aAAAzF,EAAAyF,aACO,MAAA7B,GAGP,YAAA5D,EAAAyF,aACA,KAAA7B,GAMA,kBAAA5D,GAAAoG,oBACA7K,EAAA8K,iBAAA,WAAArG,EAAAoG,oBAIA,kBAAApG,GAAAsG,kBAAA/K,EAAAgL,QACAhL,EAAAgL,OAAAF,iBAAA,WAAArG,EAAAsG,kBAGAtG,EAAAoC,aAEApC,EAAAoC,YAAA9B,QAAAO,KAAA,SAAA2F,GACAjL,IAIAA,EAAAkL,QACAzD,EAAAwD,GAEAjL,EAAA,QAIA8E,SAAAsE,IACAA,EAAA,MAIApJ,EAAAmL,KAAA/B,Ofo9BM,SAAUzK,EAAQD,EAASM,GgB/nCjC,YAEA,IAAAmK,GAAAnK,EAAA,GASAL,GAAAD,QAAA,SAAAsG,EAAAyC,EAAAnD,GACA,GAAAoE,GAAApE,EAAAG,OAAAiE,gBACAA,KAAApE,EAAAqE,QACA3D,EAAAV,GAEAmD,EAAA0B,EACA,mCAAA7E,EAAAqE,OACArE,EAAAG,OACA,KACAH,EAAAtE,QACAsE,MhByoCM,SAAU3F,EAAQD,EAASM,GiB9pCjC,YAEA,IAAAoM,GAAApM,EAAA,GAYAL,GAAAD,QAAA,SAAA2M,EAAA5G,EAAA6G,EAAAtL,EAAAsE,GACA,GAAAiH,GAAA,GAAAC,OAAAH,EACA,OAAAD,GAAAG,EAAA9G,EAAA6G,EAAAtL,EAAAsE,KjBsqCM,SAAU3F,EAAQD,GkBtrCxB,YAYAC,GAAAD,QAAA,SAAA6M,EAAA9G,EAAA6G,EAAAtL,EAAAsE,GA4BA,MA3BAiH,GAAA9G,SACA6G,IACAC,EAAAD,QAGAC,EAAAvL,UACAuL,EAAAjH,WACAiH,EAAAE,cAAA,EAEAF,EAAAG,OAAA,WACA,OAEAL,QAAAvM,KAAAuM,QACAvC,KAAAhK,KAAAgK,KAEA6C,YAAA7M,KAAA6M,YACAC,OAAA9M,KAAA8M,OAEAC,SAAA/M,KAAA+M,SACAC,WAAAhN,KAAAgN,WACAC,aAAAjN,KAAAiN,aACAC,MAAAlN,KAAAkN,MAEAvH,OAAA3F,KAAA2F,OACA6G,KAAAxM,KAAAwM,OAGAC,IlB8rCM,SAAU5M,EAAQD,EAASM,GmBtuCjC,YAEA,IAAAiB,GAAAjB,EAAA,GAIAiN,GACA,6DACA,kEACA,gEACA,qCAgBAtN,GAAAD,QAAA,SAAAyI,GACA,GACA9D,GACApC,EACAiC,EAHAgJ,IAKA,OAAA/E,IAEAlH,EAAA8C,QAAAoE,EAAAgF,MAAA,eAAAC,GAKA,GAJAlJ,EAAAkJ,EAAA9F,QAAA,KACAjD,EAAApD,EAAAsC,KAAA6J,EAAAC,OAAA,EAAAnJ,IAAA0B,cACA3D,EAAAhB,EAAAsC,KAAA6J,EAAAC,OAAAnJ,EAAA,IAEAG,EAAA,CACA,GAAA6I,EAAA7I,IAAA4I,EAAA3F,QAAAjD,IAAA,EACA,MAEA,gBAAAA,EACA6I,EAAA7I,IAAA6I,EAAA7I,GAAA6I,EAAA7I,OAAAiJ,QAAArL,IAEAiL,EAAA7I,GAAA6I,EAAA7I,GAAA6I,EAAA7I,GAAA,KAAApC,OAKAiL,GAnBiBA,InBiwCX,SAAUvN,EAAQD,EAASM,GoBjyCjC,YAEA,IAAAiB,GAAAjB,EAAA,EAEAL,GAAAD,QACAuB,EAAAyC,uBAIA,WAWA,QAAA6J,GAAA7H,GACA,GAAA8H,GAAA9H,CAWA,OATA+H,KAEAC,EAAAC,aAAA,OAAAH,GACAA,EAAAE,EAAAF,MAGAE,EAAAC,aAAA,OAAAH,IAIAA,KAAAE,EAAAF,KACAI,SAAAF,EAAAE,SAAAF,EAAAE,SAAAnK,QAAA,YACAoK,KAAAH,EAAAG,KACAC,OAAAJ,EAAAI,OAAAJ,EAAAI,OAAArK,QAAA,aACAsK,KAAAL,EAAAK,KAAAL,EAAAK,KAAAtK,QAAA,YACAuK,SAAAN,EAAAM,SACAC,KAAAP,EAAAO,KACAC,SAAA,MAAAR,EAAAQ,SAAAC,OAAA,GACAT,EAAAQ,SACA,IAAAR,EAAAQ,UAhCA,GAEAE,GAFAX,EAAA,kBAAAY,KAAA1K,UAAA2K,WACAZ,EAAA5J,SAAAyK,cAAA,IA2CA,OARAH,GAAAb,EAAA1J,OAAA2K,SAAAhB,MAQA,SAAAiB,GACA,GAAAvB,GAAAjM,EAAA0B,SAAA8L,GAAAlB,EAAAkB,IACA,OAAAvB,GAAAU,WAAAQ,EAAAR,UACAV,EAAAW,OAAAO,EAAAP,SAKA,WACA,kBACA,cpB2yCM,SAAUlO,EAAQD,EAASM,GqB32CjC,YAEA,IAAAiB,GAAAjB,EAAA,EAEAL,GAAAD,QACAuB,EAAAyC,uBAGA,WACA,OACAgL,MAAA,SAAA5E,EAAAnB,EAAAgG,EAAAC,EAAAC,EAAAC,GACA,GAAAC,KACAA,GAAA1I,KAAAyD,EAAA,IAAAjD,mBAAA8B,IAEA1H,EAAA2B,SAAA+L,IACAI,EAAA1I,KAAA,cAAA2I,MAAAL,GAAAM,eAGAhO,EAAA0B,SAAAiM,IACAG,EAAA1I,KAAA,QAAAuI,GAGA3N,EAAA0B,SAAAkM,IACAE,EAAA1I,KAAA,UAAAwI,GAGAC,KAAA,GACAC,EAAA1I,KAAA,UAGAvC,SAAAiL,SAAA3H,KAAA,OAGAuE,KAAA,SAAA7B,GACA,GAAAoF,GAAApL,SAAAiL,OAAAG,MAAA,GAAAC,QAAA,aAA4DrF,EAAA,aAC5D,OAAAoF,GAAAE,mBAAAF,EAAA,UAGAG,OAAA,SAAAvF,GACAhK,KAAA4O,MAAA5E,EAAA,GAAAkF,KAAAM,MAAA,YAMA,WACA,OACAZ,MAAA,aACA/C,KAAA,WAA+B,aAC/B0D,OAAA,kBrBq3CM,SAAU1P,EAAQD,GsBt6CxB,YAQAC,GAAAD,QAAA,SAAAgG,GAIA,sCAAA2I,KAAA3I,KtB86CM,SAAU/F,EAAQD,GuB17CxB,YASAC,GAAAD,QAAA,SAAAwI,EAAAqH,GACA,MAAAA,GACArH,EAAAzE,QAAA,eAAA8L,EAAA9L,QAAA,WACAyE,IvBk8CM,SAAUvI,EAAQD,EAASM,GwB98CjC,YAEA,IAAAiB,GAAAjB,EAAA,EAUAL,GAAAD,QAAA,SAAA8P,EAAAC,GAEAA,OACA,IAAAhK,KAkCA,OAhCAxE,GAAA8C,SAAA,yCAAA2L,GACA,mBAAAD,GAAAC,KACAjK,EAAAiK,GAAAD,EAAAC,MAIAzO,EAAA8C,SAAA,mCAAA2L,GACAzO,EAAA6B,SAAA2M,EAAAC,IACAjK,EAAAiK,GAAAzO,EAAA0D,UAAA6K,EAAAE,GAAAD,EAAAC,IACK,mBAAAD,GAAAC,GACLjK,EAAAiK,GAAAD,EAAAC,GACKzO,EAAA6B,SAAA0M,EAAAE,IACLjK,EAAAiK,GAAAzO,EAAA0D,UAAA6K,EAAAE,IACK,mBAAAF,GAAAE,KACLjK,EAAAiK,GAAAF,EAAAE,MAIAzO,EAAA8C,SACA,oEACA,sEACA,4EACA,uEACA,cACA,SAAA2L,GACA,mBAAAD,GAAAC,GACAjK,EAAAiK,GAAAD,EAAAC,GACK,mBAAAF,GAAAE,KACLjK,EAAAiK,GAAAF,EAAAE,MAIAjK,IxBs9CM,SAAU9F,EAAQD,GyBvgDxB,YAQA,SAAA8B,GAAA6K,GACAvM,KAAAuM,UAGA7K,EAAAT,UAAAmB,SAAA,WACA,gBAAApC,KAAAuM,QAAA,KAAAvM,KAAAuM,QAAA,KAGA7K,EAAAT,UAAA6H,YAAA,EAEAjJ,EAAAD,QAAA8B,GzB8gDM,SAAU7B,EAAQD,EAASM,G0BhiDjC,YAUA,SAAAyB,GAAAkO,GACA,qBAAAA,GACA,SAAAC,WAAA,+BAGA,IAAAC,EACA/P,MAAAiG,QAAA,GAAAlE,SAAA,SAAAmE,GACA6J,EAAA7J,GAGA,IAAA8J,GAAAhQ,IACA6P,GAAA,SAAAtD,GACAyD,EAAAtH,SAKAsH,EAAAtH,OAAA,GAAAhH,GAAA6K,GACAwD,EAAAC,EAAAtH,WA1BA,GAAAhH,GAAAxB,EAAA,GAiCAyB,GAAAV,UAAA+G,iBAAA,WACA,GAAAhI,KAAA0I,OACA,KAAA1I,MAAA0I,QAQA/G,EAAAsO,OAAA,WACA,GAAA9D,GACA6D,EAAA,GAAArO,GAAA,SAAAlB,GACA0L,EAAA1L,GAEA,QACAuP,QACA7D,WAIAtM,EAAAD,QAAA+B,G1BuiDM,SAAU9B,EAAQD,G2B/lDxB,YAsBAC,GAAAD,QAAA,SAAAsQ,GACA,gBAAAC,GACA,MAAAD,GAAA9K,MAAA,KAAA+K","file":"axios.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(1);\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar bind = __webpack_require__(3);\n\tvar Axios = __webpack_require__(5);\n\tvar mergeConfig = __webpack_require__(22);\n\tvar defaults = __webpack_require__(11);\n\t\n\t/**\n\t * Create an instance of Axios\n\t *\n\t * @param {Object} defaultConfig The default config for the instance\n\t * @return {Axios} A new instance of Axios\n\t */\n\tfunction createInstance(defaultConfig) {\n\t var context = new Axios(defaultConfig);\n\t var instance = bind(Axios.prototype.request, context);\n\t\n\t // Copy axios.prototype to instance\n\t utils.extend(instance, Axios.prototype, context);\n\t\n\t // Copy context to instance\n\t utils.extend(instance, context);\n\t\n\t return instance;\n\t}\n\t\n\t// Create the default instance to be exported\n\tvar axios = createInstance(defaults);\n\t\n\t// Expose Axios class to allow class inheritance\n\taxios.Axios = Axios;\n\t\n\t// Factory for creating new instances\n\taxios.create = function create(instanceConfig) {\n\t return createInstance(mergeConfig(axios.defaults, instanceConfig));\n\t};\n\t\n\t// Expose Cancel & CancelToken\n\taxios.Cancel = __webpack_require__(23);\n\taxios.CancelToken = __webpack_require__(24);\n\taxios.isCancel = __webpack_require__(10);\n\t\n\t// Expose all/spread\n\taxios.all = function all(promises) {\n\t return Promise.all(promises);\n\t};\n\taxios.spread = __webpack_require__(25);\n\t\n\tmodule.exports = axios;\n\t\n\t// Allow use of default import syntax in TypeScript\n\tmodule.exports.default = axios;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar bind = __webpack_require__(3);\n\tvar isBuffer = __webpack_require__(4);\n\t\n\t/*global toString:true*/\n\t\n\t// utils is a library of generic helper functions non-specific to axios\n\t\n\tvar toString = Object.prototype.toString;\n\t\n\t/**\n\t * Determine if a value is an Array\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Array, otherwise false\n\t */\n\tfunction isArray(val) {\n\t return toString.call(val) === '[object Array]';\n\t}\n\t\n\t/**\n\t * Determine if a value is an ArrayBuffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n\t */\n\tfunction isArrayBuffer(val) {\n\t return toString.call(val) === '[object ArrayBuffer]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a FormData\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an FormData, otherwise false\n\t */\n\tfunction isFormData(val) {\n\t return (typeof FormData !== 'undefined') && (val instanceof FormData);\n\t}\n\t\n\t/**\n\t * Determine if a value is a view on an ArrayBuffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n\t */\n\tfunction isArrayBufferView(val) {\n\t var result;\n\t if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n\t result = ArrayBuffer.isView(val);\n\t } else {\n\t result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Determine if a value is a String\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a String, otherwise false\n\t */\n\tfunction isString(val) {\n\t return typeof val === 'string';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Number\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Number, otherwise false\n\t */\n\tfunction isNumber(val) {\n\t return typeof val === 'number';\n\t}\n\t\n\t/**\n\t * Determine if a value is undefined\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if the value is undefined, otherwise false\n\t */\n\tfunction isUndefined(val) {\n\t return typeof val === 'undefined';\n\t}\n\t\n\t/**\n\t * Determine if a value is an Object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Object, otherwise false\n\t */\n\tfunction isObject(val) {\n\t return val !== null && typeof val === 'object';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Date\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Date, otherwise false\n\t */\n\tfunction isDate(val) {\n\t return toString.call(val) === '[object Date]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a File\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a File, otherwise false\n\t */\n\tfunction isFile(val) {\n\t return toString.call(val) === '[object File]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Blob\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Blob, otherwise false\n\t */\n\tfunction isBlob(val) {\n\t return toString.call(val) === '[object Blob]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Function\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Function, otherwise false\n\t */\n\tfunction isFunction(val) {\n\t return toString.call(val) === '[object Function]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Stream\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Stream, otherwise false\n\t */\n\tfunction isStream(val) {\n\t return isObject(val) && isFunction(val.pipe);\n\t}\n\t\n\t/**\n\t * Determine if a value is a URLSearchParams object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n\t */\n\tfunction isURLSearchParams(val) {\n\t return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n\t}\n\t\n\t/**\n\t * Trim excess whitespace off the beginning and end of a string\n\t *\n\t * @param {String} str The String to trim\n\t * @returns {String} The String freed of excess whitespace\n\t */\n\tfunction trim(str) {\n\t return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n\t}\n\t\n\t/**\n\t * Determine if we're running in a standard browser environment\n\t *\n\t * This allows axios to run in a web worker, and react-native.\n\t * Both environments support XMLHttpRequest, but not fully standard globals.\n\t *\n\t * web workers:\n\t * typeof window -> undefined\n\t * typeof document -> undefined\n\t *\n\t * react-native:\n\t * navigator.product -> 'ReactNative'\n\t * nativescript\n\t * navigator.product -> 'NativeScript' or 'NS'\n\t */\n\tfunction isStandardBrowserEnv() {\n\t if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n\t navigator.product === 'NativeScript' ||\n\t navigator.product === 'NS')) {\n\t return false;\n\t }\n\t return (\n\t typeof window !== 'undefined' &&\n\t typeof document !== 'undefined'\n\t );\n\t}\n\t\n\t/**\n\t * Iterate over an Array or an Object invoking a function for each item.\n\t *\n\t * If `obj` is an Array callback will be called passing\n\t * the value, index, and complete array for each item.\n\t *\n\t * If 'obj' is an Object callback will be called passing\n\t * the value, key, and complete object for each property.\n\t *\n\t * @param {Object|Array} obj The object to iterate\n\t * @param {Function} fn The callback to invoke for each item\n\t */\n\tfunction forEach(obj, fn) {\n\t // Don't bother if no value provided\n\t if (obj === null || typeof obj === 'undefined') {\n\t return;\n\t }\n\t\n\t // Force an array if not already something iterable\n\t if (typeof obj !== 'object') {\n\t /*eslint no-param-reassign:0*/\n\t obj = [obj];\n\t }\n\t\n\t if (isArray(obj)) {\n\t // Iterate over array values\n\t for (var i = 0, l = obj.length; i < l; i++) {\n\t fn.call(null, obj[i], i, obj);\n\t }\n\t } else {\n\t // Iterate over object keys\n\t for (var key in obj) {\n\t if (Object.prototype.hasOwnProperty.call(obj, key)) {\n\t fn.call(null, obj[key], key, obj);\n\t }\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * Accepts varargs expecting each argument to be an object, then\n\t * immutably merges the properties of each object and returns result.\n\t *\n\t * When multiple objects contain the same key the later object in\n\t * the arguments list will take precedence.\n\t *\n\t * Example:\n\t *\n\t * ```js\n\t * var result = merge({foo: 123}, {foo: 456});\n\t * console.log(result.foo); // outputs 456\n\t * ```\n\t *\n\t * @param {Object} obj1 Object to merge\n\t * @returns {Object} Result of all merge properties\n\t */\n\tfunction merge(/* obj1, obj2, obj3, ... */) {\n\t var result = {};\n\t function assignValue(val, key) {\n\t if (typeof result[key] === 'object' && typeof val === 'object') {\n\t result[key] = merge(result[key], val);\n\t } else {\n\t result[key] = val;\n\t }\n\t }\n\t\n\t for (var i = 0, l = arguments.length; i < l; i++) {\n\t forEach(arguments[i], assignValue);\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Function equal to merge with the difference being that no reference\n\t * to original objects is kept.\n\t *\n\t * @see merge\n\t * @param {Object} obj1 Object to merge\n\t * @returns {Object} Result of all merge properties\n\t */\n\tfunction deepMerge(/* obj1, obj2, obj3, ... */) {\n\t var result = {};\n\t function assignValue(val, key) {\n\t if (typeof result[key] === 'object' && typeof val === 'object') {\n\t result[key] = deepMerge(result[key], val);\n\t } else if (typeof val === 'object') {\n\t result[key] = deepMerge({}, val);\n\t } else {\n\t result[key] = val;\n\t }\n\t }\n\t\n\t for (var i = 0, l = arguments.length; i < l; i++) {\n\t forEach(arguments[i], assignValue);\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Extends object a by mutably adding to it the properties of object b.\n\t *\n\t * @param {Object} a The object to be extended\n\t * @param {Object} b The object to copy properties from\n\t * @param {Object} thisArg The object to bind function to\n\t * @return {Object} The resulting value of object a\n\t */\n\tfunction extend(a, b, thisArg) {\n\t forEach(b, function assignValue(val, key) {\n\t if (thisArg && typeof val === 'function') {\n\t a[key] = bind(val, thisArg);\n\t } else {\n\t a[key] = val;\n\t }\n\t });\n\t return a;\n\t}\n\t\n\tmodule.exports = {\n\t isArray: isArray,\n\t isArrayBuffer: isArrayBuffer,\n\t isBuffer: isBuffer,\n\t isFormData: isFormData,\n\t isArrayBufferView: isArrayBufferView,\n\t isString: isString,\n\t isNumber: isNumber,\n\t isObject: isObject,\n\t isUndefined: isUndefined,\n\t isDate: isDate,\n\t isFile: isFile,\n\t isBlob: isBlob,\n\t isFunction: isFunction,\n\t isStream: isStream,\n\t isURLSearchParams: isURLSearchParams,\n\t isStandardBrowserEnv: isStandardBrowserEnv,\n\t forEach: forEach,\n\t merge: merge,\n\t deepMerge: deepMerge,\n\t extend: extend,\n\t trim: trim\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function bind(fn, thisArg) {\n\t return function wrap() {\n\t var args = new Array(arguments.length);\n\t for (var i = 0; i < args.length; i++) {\n\t args[i] = arguments[i];\n\t }\n\t return fn.apply(thisArg, args);\n\t };\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/*!\n\t * Determine if an object is a Buffer\n\t *\n\t * @author Feross Aboukhadijeh \n\t * @license MIT\n\t */\n\t\n\tmodule.exports = function isBuffer (obj) {\n\t return obj != null && obj.constructor != null &&\n\t typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n\t}\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar buildURL = __webpack_require__(6);\n\tvar InterceptorManager = __webpack_require__(7);\n\tvar dispatchRequest = __webpack_require__(8);\n\tvar mergeConfig = __webpack_require__(22);\n\t\n\t/**\n\t * Create a new instance of Axios\n\t *\n\t * @param {Object} instanceConfig The default config for the instance\n\t */\n\tfunction Axios(instanceConfig) {\n\t this.defaults = instanceConfig;\n\t this.interceptors = {\n\t request: new InterceptorManager(),\n\t response: new InterceptorManager()\n\t };\n\t}\n\t\n\t/**\n\t * Dispatch a request\n\t *\n\t * @param {Object} config The config specific for this request (merged with this.defaults)\n\t */\n\tAxios.prototype.request = function request(config) {\n\t /*eslint no-param-reassign:0*/\n\t // Allow for axios('example/url'[, config]) a la fetch API\n\t if (typeof config === 'string') {\n\t config = arguments[1] || {};\n\t config.url = arguments[0];\n\t } else {\n\t config = config || {};\n\t }\n\t\n\t config = mergeConfig(this.defaults, config);\n\t config.method = config.method ? config.method.toLowerCase() : 'get';\n\t\n\t // Hook up interceptors middleware\n\t var chain = [dispatchRequest, undefined];\n\t var promise = Promise.resolve(config);\n\t\n\t this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n\t chain.unshift(interceptor.fulfilled, interceptor.rejected);\n\t });\n\t\n\t this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n\t chain.push(interceptor.fulfilled, interceptor.rejected);\n\t });\n\t\n\t while (chain.length) {\n\t promise = promise.then(chain.shift(), chain.shift());\n\t }\n\t\n\t return promise;\n\t};\n\t\n\tAxios.prototype.getUri = function getUri(config) {\n\t config = mergeConfig(this.defaults, config);\n\t return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n\t};\n\t\n\t// Provide aliases for supported request methods\n\tutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n\t /*eslint func-names:0*/\n\t Axios.prototype[method] = function(url, config) {\n\t return this.request(utils.merge(config || {}, {\n\t method: method,\n\t url: url\n\t }));\n\t };\n\t});\n\t\n\tutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n\t /*eslint func-names:0*/\n\t Axios.prototype[method] = function(url, data, config) {\n\t return this.request(utils.merge(config || {}, {\n\t method: method,\n\t url: url,\n\t data: data\n\t }));\n\t };\n\t});\n\t\n\tmodule.exports = Axios;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tfunction encode(val) {\n\t return encodeURIComponent(val).\n\t replace(/%40/gi, '@').\n\t replace(/%3A/gi, ':').\n\t replace(/%24/g, '$').\n\t replace(/%2C/gi, ',').\n\t replace(/%20/g, '+').\n\t replace(/%5B/gi, '[').\n\t replace(/%5D/gi, ']');\n\t}\n\t\n\t/**\n\t * Build a URL by appending params to the end\n\t *\n\t * @param {string} url The base of the url (e.g., http://www.google.com)\n\t * @param {object} [params] The params to be appended\n\t * @returns {string} The formatted url\n\t */\n\tmodule.exports = function buildURL(url, params, paramsSerializer) {\n\t /*eslint no-param-reassign:0*/\n\t if (!params) {\n\t return url;\n\t }\n\t\n\t var serializedParams;\n\t if (paramsSerializer) {\n\t serializedParams = paramsSerializer(params);\n\t } else if (utils.isURLSearchParams(params)) {\n\t serializedParams = params.toString();\n\t } else {\n\t var parts = [];\n\t\n\t utils.forEach(params, function serialize(val, key) {\n\t if (val === null || typeof val === 'undefined') {\n\t return;\n\t }\n\t\n\t if (utils.isArray(val)) {\n\t key = key + '[]';\n\t } else {\n\t val = [val];\n\t }\n\t\n\t utils.forEach(val, function parseValue(v) {\n\t if (utils.isDate(v)) {\n\t v = v.toISOString();\n\t } else if (utils.isObject(v)) {\n\t v = JSON.stringify(v);\n\t }\n\t parts.push(encode(key) + '=' + encode(v));\n\t });\n\t });\n\t\n\t serializedParams = parts.join('&');\n\t }\n\t\n\t if (serializedParams) {\n\t var hashmarkIndex = url.indexOf('#');\n\t if (hashmarkIndex !== -1) {\n\t url = url.slice(0, hashmarkIndex);\n\t }\n\t\n\t url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n\t }\n\t\n\t return url;\n\t};\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tfunction InterceptorManager() {\n\t this.handlers = [];\n\t}\n\t\n\t/**\n\t * Add a new interceptor to the stack\n\t *\n\t * @param {Function} fulfilled The function to handle `then` for a `Promise`\n\t * @param {Function} rejected The function to handle `reject` for a `Promise`\n\t *\n\t * @return {Number} An ID used to remove interceptor later\n\t */\n\tInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n\t this.handlers.push({\n\t fulfilled: fulfilled,\n\t rejected: rejected\n\t });\n\t return this.handlers.length - 1;\n\t};\n\t\n\t/**\n\t * Remove an interceptor from the stack\n\t *\n\t * @param {Number} id The ID that was returned by `use`\n\t */\n\tInterceptorManager.prototype.eject = function eject(id) {\n\t if (this.handlers[id]) {\n\t this.handlers[id] = null;\n\t }\n\t};\n\t\n\t/**\n\t * Iterate over all the registered interceptors\n\t *\n\t * This method is particularly useful for skipping over any\n\t * interceptors that may have become `null` calling `eject`.\n\t *\n\t * @param {Function} fn The function to call for each interceptor\n\t */\n\tInterceptorManager.prototype.forEach = function forEach(fn) {\n\t utils.forEach(this.handlers, function forEachHandler(h) {\n\t if (h !== null) {\n\t fn(h);\n\t }\n\t });\n\t};\n\t\n\tmodule.exports = InterceptorManager;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar transformData = __webpack_require__(9);\n\tvar isCancel = __webpack_require__(10);\n\tvar defaults = __webpack_require__(11);\n\tvar isAbsoluteURL = __webpack_require__(20);\n\tvar combineURLs = __webpack_require__(21);\n\t\n\t/**\n\t * Throws a `Cancel` if cancellation has been requested.\n\t */\n\tfunction throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}\n\t\n\t/**\n\t * Dispatch a request to the server using the configured adapter.\n\t *\n\t * @param {object} config The config that is to be used for the request\n\t * @returns {Promise} The Promise to be fulfilled\n\t */\n\tmodule.exports = function dispatchRequest(config) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Support baseURL config\n\t if (config.baseURL && !isAbsoluteURL(config.url)) {\n\t config.url = combineURLs(config.baseURL, config.url);\n\t }\n\t\n\t // Ensure headers exist\n\t config.headers = config.headers || {};\n\t\n\t // Transform request data\n\t config.data = transformData(\n\t config.data,\n\t config.headers,\n\t config.transformRequest\n\t );\n\t\n\t // Flatten headers\n\t config.headers = utils.merge(\n\t config.headers.common || {},\n\t config.headers[config.method] || {},\n\t config.headers || {}\n\t );\n\t\n\t utils.forEach(\n\t ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n\t function cleanHeaderConfig(method) {\n\t delete config.headers[method];\n\t }\n\t );\n\t\n\t var adapter = config.adapter || defaults.adapter;\n\t\n\t return adapter(config).then(function onAdapterResolution(response) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Transform response data\n\t response.data = transformData(\n\t response.data,\n\t response.headers,\n\t config.transformResponse\n\t );\n\t\n\t return response;\n\t }, function onAdapterRejection(reason) {\n\t if (!isCancel(reason)) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Transform response data\n\t if (reason && reason.response) {\n\t reason.response.data = transformData(\n\t reason.response.data,\n\t reason.response.headers,\n\t config.transformResponse\n\t );\n\t }\n\t }\n\t\n\t return Promise.reject(reason);\n\t });\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\t/**\n\t * Transform the data for a request or a response\n\t *\n\t * @param {Object|String} data The data to be transformed\n\t * @param {Array} headers The headers for the request or response\n\t * @param {Array|Function} fns A single function or Array of functions\n\t * @returns {*} The resulting transformed data\n\t */\n\tmodule.exports = function transformData(data, headers, fns) {\n\t /*eslint no-param-reassign:0*/\n\t utils.forEach(fns, function transform(fn) {\n\t data = fn(data, headers);\n\t });\n\t\n\t return data;\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function isCancel(value) {\n\t return !!(value && value.__CANCEL__);\n\t};\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar normalizeHeaderName = __webpack_require__(12);\n\t\n\tvar DEFAULT_CONTENT_TYPE = {\n\t 'Content-Type': 'application/x-www-form-urlencoded'\n\t};\n\t\n\tfunction setContentTypeIfUnset(headers, value) {\n\t if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n\t headers['Content-Type'] = value;\n\t }\n\t}\n\t\n\tfunction getDefaultAdapter() {\n\t var adapter;\n\t // Only Node.JS has a process variable that is of [[Class]] process\n\t if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n\t // For node use HTTP adapter\n\t adapter = __webpack_require__(13);\n\t } else if (typeof XMLHttpRequest !== 'undefined') {\n\t // For browsers use XHR adapter\n\t adapter = __webpack_require__(13);\n\t }\n\t return adapter;\n\t}\n\t\n\tvar defaults = {\n\t adapter: getDefaultAdapter(),\n\t\n\t transformRequest: [function transformRequest(data, headers) {\n\t normalizeHeaderName(headers, 'Accept');\n\t normalizeHeaderName(headers, 'Content-Type');\n\t if (utils.isFormData(data) ||\n\t utils.isArrayBuffer(data) ||\n\t utils.isBuffer(data) ||\n\t utils.isStream(data) ||\n\t utils.isFile(data) ||\n\t utils.isBlob(data)\n\t ) {\n\t return data;\n\t }\n\t if (utils.isArrayBufferView(data)) {\n\t return data.buffer;\n\t }\n\t if (utils.isURLSearchParams(data)) {\n\t setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n\t return data.toString();\n\t }\n\t if (utils.isObject(data)) {\n\t setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n\t return JSON.stringify(data);\n\t }\n\t return data;\n\t }],\n\t\n\t transformResponse: [function transformResponse(data) {\n\t /*eslint no-param-reassign:0*/\n\t if (typeof data === 'string') {\n\t try {\n\t data = JSON.parse(data);\n\t } catch (e) { /* Ignore */ }\n\t }\n\t return data;\n\t }],\n\t\n\t /**\n\t * A timeout in milliseconds to abort a request. If set to 0 (default) a\n\t * timeout is not created.\n\t */\n\t timeout: 0,\n\t\n\t xsrfCookieName: 'XSRF-TOKEN',\n\t xsrfHeaderName: 'X-XSRF-TOKEN',\n\t\n\t maxContentLength: -1,\n\t\n\t validateStatus: function validateStatus(status) {\n\t return status >= 200 && status < 300;\n\t }\n\t};\n\t\n\tdefaults.headers = {\n\t common: {\n\t 'Accept': 'application/json, text/plain, */*'\n\t }\n\t};\n\t\n\tutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n\t defaults.headers[method] = {};\n\t});\n\t\n\tutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n\t defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n\t});\n\t\n\tmodule.exports = defaults;\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n\t utils.forEach(headers, function processHeader(value, name) {\n\t if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n\t headers[normalizedName] = value;\n\t delete headers[name];\n\t }\n\t });\n\t};\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar settle = __webpack_require__(14);\n\tvar buildURL = __webpack_require__(6);\n\tvar parseHeaders = __webpack_require__(17);\n\tvar isURLSameOrigin = __webpack_require__(18);\n\tvar createError = __webpack_require__(15);\n\t\n\tmodule.exports = function xhrAdapter(config) {\n\t return new Promise(function dispatchXhrRequest(resolve, reject) {\n\t var requestData = config.data;\n\t var requestHeaders = config.headers;\n\t\n\t if (utils.isFormData(requestData)) {\n\t delete requestHeaders['Content-Type']; // Let the browser set it\n\t }\n\t\n\t var request = new XMLHttpRequest();\n\t\n\t // HTTP basic authentication\n\t if (config.auth) {\n\t var username = config.auth.username || '';\n\t var password = config.auth.password || '';\n\t requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n\t }\n\t\n\t request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\t\n\t // Set the request timeout in MS\n\t request.timeout = config.timeout;\n\t\n\t // Listen for ready state\n\t request.onreadystatechange = function handleLoad() {\n\t if (!request || request.readyState !== 4) {\n\t return;\n\t }\n\t\n\t // The request errored out and we didn't get a response, this will be\n\t // handled by onerror instead\n\t // With one exception: request that using file: protocol, most browsers\n\t // will return status as 0 even though it's a successful request\n\t if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n\t return;\n\t }\n\t\n\t // Prepare the response\n\t var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n\t var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n\t var response = {\n\t data: responseData,\n\t status: request.status,\n\t statusText: request.statusText,\n\t headers: responseHeaders,\n\t config: config,\n\t request: request\n\t };\n\t\n\t settle(resolve, reject, response);\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Handle browser request cancellation (as opposed to a manual cancellation)\n\t request.onabort = function handleAbort() {\n\t if (!request) {\n\t return;\n\t }\n\t\n\t reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Handle low level network errors\n\t request.onerror = function handleError() {\n\t // Real errors are hidden from us by the browser\n\t // onerror should only fire if it's a network error\n\t reject(createError('Network Error', config, null, request));\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Handle timeout\n\t request.ontimeout = function handleTimeout() {\n\t reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n\t request));\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Add xsrf header\n\t // This is only done if running in a standard browser environment.\n\t // Specifically not if we're in a web worker, or react-native.\n\t if (utils.isStandardBrowserEnv()) {\n\t var cookies = __webpack_require__(19);\n\t\n\t // Add xsrf header\n\t var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n\t cookies.read(config.xsrfCookieName) :\n\t undefined;\n\t\n\t if (xsrfValue) {\n\t requestHeaders[config.xsrfHeaderName] = xsrfValue;\n\t }\n\t }\n\t\n\t // Add headers to the request\n\t if ('setRequestHeader' in request) {\n\t utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n\t if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n\t // Remove Content-Type if data is undefined\n\t delete requestHeaders[key];\n\t } else {\n\t // Otherwise add header to the request\n\t request.setRequestHeader(key, val);\n\t }\n\t });\n\t }\n\t\n\t // Add withCredentials to request if needed\n\t if (config.withCredentials) {\n\t request.withCredentials = true;\n\t }\n\t\n\t // Add responseType to request if needed\n\t if (config.responseType) {\n\t try {\n\t request.responseType = config.responseType;\n\t } catch (e) {\n\t // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n\t // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n\t if (config.responseType !== 'json') {\n\t throw e;\n\t }\n\t }\n\t }\n\t\n\t // Handle progress if needed\n\t if (typeof config.onDownloadProgress === 'function') {\n\t request.addEventListener('progress', config.onDownloadProgress);\n\t }\n\t\n\t // Not all browsers support upload events\n\t if (typeof config.onUploadProgress === 'function' && request.upload) {\n\t request.upload.addEventListener('progress', config.onUploadProgress);\n\t }\n\t\n\t if (config.cancelToken) {\n\t // Handle cancellation\n\t config.cancelToken.promise.then(function onCanceled(cancel) {\n\t if (!request) {\n\t return;\n\t }\n\t\n\t request.abort();\n\t reject(cancel);\n\t // Clean up request\n\t request = null;\n\t });\n\t }\n\t\n\t if (requestData === undefined) {\n\t requestData = null;\n\t }\n\t\n\t // Send the request\n\t request.send(requestData);\n\t });\n\t};\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar createError = __webpack_require__(15);\n\t\n\t/**\n\t * Resolve or reject a Promise based on response status.\n\t *\n\t * @param {Function} resolve A function that resolves the promise.\n\t * @param {Function} reject A function that rejects the promise.\n\t * @param {object} response The response.\n\t */\n\tmodule.exports = function settle(resolve, reject, response) {\n\t var validateStatus = response.config.validateStatus;\n\t if (!validateStatus || validateStatus(response.status)) {\n\t resolve(response);\n\t } else {\n\t reject(createError(\n\t 'Request failed with status code ' + response.status,\n\t response.config,\n\t null,\n\t response.request,\n\t response\n\t ));\n\t }\n\t};\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar enhanceError = __webpack_require__(16);\n\t\n\t/**\n\t * Create an Error with the specified message, config, error code, request and response.\n\t *\n\t * @param {string} message The error message.\n\t * @param {Object} config The config.\n\t * @param {string} [code] The error code (for example, 'ECONNABORTED').\n\t * @param {Object} [request] The request.\n\t * @param {Object} [response] The response.\n\t * @returns {Error} The created error.\n\t */\n\tmodule.exports = function createError(message, config, code, request, response) {\n\t var error = new Error(message);\n\t return enhanceError(error, config, code, request, response);\n\t};\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Update an Error with the specified config, error code, and response.\n\t *\n\t * @param {Error} error The error to update.\n\t * @param {Object} config The config.\n\t * @param {string} [code] The error code (for example, 'ECONNABORTED').\n\t * @param {Object} [request] The request.\n\t * @param {Object} [response] The response.\n\t * @returns {Error} The error.\n\t */\n\tmodule.exports = function enhanceError(error, config, code, request, response) {\n\t error.config = config;\n\t if (code) {\n\t error.code = code;\n\t }\n\t\n\t error.request = request;\n\t error.response = response;\n\t error.isAxiosError = true;\n\t\n\t error.toJSON = function() {\n\t return {\n\t // Standard\n\t message: this.message,\n\t name: this.name,\n\t // Microsoft\n\t description: this.description,\n\t number: this.number,\n\t // Mozilla\n\t fileName: this.fileName,\n\t lineNumber: this.lineNumber,\n\t columnNumber: this.columnNumber,\n\t stack: this.stack,\n\t // Axios\n\t config: this.config,\n\t code: this.code\n\t };\n\t };\n\t return error;\n\t};\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\t// Headers whose duplicates are ignored by node\n\t// c.f. https://nodejs.org/api/http.html#http_message_headers\n\tvar ignoreDuplicateOf = [\n\t 'age', 'authorization', 'content-length', 'content-type', 'etag',\n\t 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n\t 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n\t 'referer', 'retry-after', 'user-agent'\n\t];\n\t\n\t/**\n\t * Parse headers into an object\n\t *\n\t * ```\n\t * Date: Wed, 27 Aug 2014 08:58:49 GMT\n\t * Content-Type: application/json\n\t * Connection: keep-alive\n\t * Transfer-Encoding: chunked\n\t * ```\n\t *\n\t * @param {String} headers Headers needing to be parsed\n\t * @returns {Object} Headers parsed into an object\n\t */\n\tmodule.exports = function parseHeaders(headers) {\n\t var parsed = {};\n\t var key;\n\t var val;\n\t var i;\n\t\n\t if (!headers) { return parsed; }\n\t\n\t utils.forEach(headers.split('\\n'), function parser(line) {\n\t i = line.indexOf(':');\n\t key = utils.trim(line.substr(0, i)).toLowerCase();\n\t val = utils.trim(line.substr(i + 1));\n\t\n\t if (key) {\n\t if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n\t return;\n\t }\n\t if (key === 'set-cookie') {\n\t parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n\t } else {\n\t parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n\t }\n\t }\n\t });\n\t\n\t return parsed;\n\t};\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = (\n\t utils.isStandardBrowserEnv() ?\n\t\n\t // Standard browser envs have full support of the APIs needed to test\n\t // whether the request URL is of the same origin as current location.\n\t (function standardBrowserEnv() {\n\t var msie = /(msie|trident)/i.test(navigator.userAgent);\n\t var urlParsingNode = document.createElement('a');\n\t var originURL;\n\t\n\t /**\n\t * Parse a URL to discover it's components\n\t *\n\t * @param {String} url The URL to be parsed\n\t * @returns {Object}\n\t */\n\t function resolveURL(url) {\n\t var href = url;\n\t\n\t if (msie) {\n\t // IE needs attribute set twice to normalize properties\n\t urlParsingNode.setAttribute('href', href);\n\t href = urlParsingNode.href;\n\t }\n\t\n\t urlParsingNode.setAttribute('href', href);\n\t\n\t // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n\t return {\n\t href: urlParsingNode.href,\n\t protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n\t host: urlParsingNode.host,\n\t search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n\t hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n\t hostname: urlParsingNode.hostname,\n\t port: urlParsingNode.port,\n\t pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n\t urlParsingNode.pathname :\n\t '/' + urlParsingNode.pathname\n\t };\n\t }\n\t\n\t originURL = resolveURL(window.location.href);\n\t\n\t /**\n\t * Determine if a URL shares the same origin as the current location\n\t *\n\t * @param {String} requestURL The URL to test\n\t * @returns {boolean} True if URL shares the same origin, otherwise false\n\t */\n\t return function isURLSameOrigin(requestURL) {\n\t var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n\t return (parsed.protocol === originURL.protocol &&\n\t parsed.host === originURL.host);\n\t };\n\t })() :\n\t\n\t // Non standard browser envs (web workers, react-native) lack needed support.\n\t (function nonStandardBrowserEnv() {\n\t return function isURLSameOrigin() {\n\t return true;\n\t };\n\t })()\n\t);\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = (\n\t utils.isStandardBrowserEnv() ?\n\t\n\t // Standard browser envs support document.cookie\n\t (function standardBrowserEnv() {\n\t return {\n\t write: function write(name, value, expires, path, domain, secure) {\n\t var cookie = [];\n\t cookie.push(name + '=' + encodeURIComponent(value));\n\t\n\t if (utils.isNumber(expires)) {\n\t cookie.push('expires=' + new Date(expires).toGMTString());\n\t }\n\t\n\t if (utils.isString(path)) {\n\t cookie.push('path=' + path);\n\t }\n\t\n\t if (utils.isString(domain)) {\n\t cookie.push('domain=' + domain);\n\t }\n\t\n\t if (secure === true) {\n\t cookie.push('secure');\n\t }\n\t\n\t document.cookie = cookie.join('; ');\n\t },\n\t\n\t read: function read(name) {\n\t var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n\t return (match ? decodeURIComponent(match[3]) : null);\n\t },\n\t\n\t remove: function remove(name) {\n\t this.write(name, '', Date.now() - 86400000);\n\t }\n\t };\n\t })() :\n\t\n\t // Non standard browser env (web workers, react-native) lack needed support.\n\t (function nonStandardBrowserEnv() {\n\t return {\n\t write: function write() {},\n\t read: function read() { return null; },\n\t remove: function remove() {}\n\t };\n\t })()\n\t);\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Determines whether the specified URL is absolute\n\t *\n\t * @param {string} url The URL to test\n\t * @returns {boolean} True if the specified URL is absolute, otherwise false\n\t */\n\tmodule.exports = function isAbsoluteURL(url) {\n\t // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n\t // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n\t // by any combination of letters, digits, plus, period, or hyphen.\n\t return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n\t};\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Creates a new URL by combining the specified URLs\n\t *\n\t * @param {string} baseURL The base URL\n\t * @param {string} relativeURL The relative URL\n\t * @returns {string} The combined URL\n\t */\n\tmodule.exports = function combineURLs(baseURL, relativeURL) {\n\t return relativeURL\n\t ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n\t : baseURL;\n\t};\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\t/**\n\t * Config-specific merge-function which creates a new config-object\n\t * by merging two configuration objects together.\n\t *\n\t * @param {Object} config1\n\t * @param {Object} config2\n\t * @returns {Object} New object resulting from merging config2 to config1\n\t */\n\tmodule.exports = function mergeConfig(config1, config2) {\n\t // eslint-disable-next-line no-param-reassign\n\t config2 = config2 || {};\n\t var config = {};\n\t\n\t utils.forEach(['url', 'method', 'params', 'data'], function valueFromConfig2(prop) {\n\t if (typeof config2[prop] !== 'undefined') {\n\t config[prop] = config2[prop];\n\t }\n\t });\n\t\n\t utils.forEach(['headers', 'auth', 'proxy'], function mergeDeepProperties(prop) {\n\t if (utils.isObject(config2[prop])) {\n\t config[prop] = utils.deepMerge(config1[prop], config2[prop]);\n\t } else if (typeof config2[prop] !== 'undefined') {\n\t config[prop] = config2[prop];\n\t } else if (utils.isObject(config1[prop])) {\n\t config[prop] = utils.deepMerge(config1[prop]);\n\t } else if (typeof config1[prop] !== 'undefined') {\n\t config[prop] = config1[prop];\n\t }\n\t });\n\t\n\t utils.forEach([\n\t 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n\t 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n\t 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'maxContentLength',\n\t 'validateStatus', 'maxRedirects', 'httpAgent', 'httpsAgent', 'cancelToken',\n\t 'socketPath'\n\t ], function defaultToConfig2(prop) {\n\t if (typeof config2[prop] !== 'undefined') {\n\t config[prop] = config2[prop];\n\t } else if (typeof config1[prop] !== 'undefined') {\n\t config[prop] = config1[prop];\n\t }\n\t });\n\t\n\t return config;\n\t};\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * A `Cancel` is an object that is thrown when an operation is canceled.\n\t *\n\t * @class\n\t * @param {string=} message The message.\n\t */\n\tfunction Cancel(message) {\n\t this.message = message;\n\t}\n\t\n\tCancel.prototype.toString = function toString() {\n\t return 'Cancel' + (this.message ? ': ' + this.message : '');\n\t};\n\t\n\tCancel.prototype.__CANCEL__ = true;\n\t\n\tmodule.exports = Cancel;\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar Cancel = __webpack_require__(23);\n\t\n\t/**\n\t * A `CancelToken` is an object that can be used to request cancellation of an operation.\n\t *\n\t * @class\n\t * @param {Function} executor The executor function.\n\t */\n\tfunction CancelToken(executor) {\n\t if (typeof executor !== 'function') {\n\t throw new TypeError('executor must be a function.');\n\t }\n\t\n\t var resolvePromise;\n\t this.promise = new Promise(function promiseExecutor(resolve) {\n\t resolvePromise = resolve;\n\t });\n\t\n\t var token = this;\n\t executor(function cancel(message) {\n\t if (token.reason) {\n\t // Cancellation has already been requested\n\t return;\n\t }\n\t\n\t token.reason = new Cancel(message);\n\t resolvePromise(token.reason);\n\t });\n\t}\n\t\n\t/**\n\t * Throws a `Cancel` if cancellation has been requested.\n\t */\n\tCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n\t if (this.reason) {\n\t throw this.reason;\n\t }\n\t};\n\t\n\t/**\n\t * Returns an object that contains a new `CancelToken` and a function that, when called,\n\t * cancels the `CancelToken`.\n\t */\n\tCancelToken.source = function source() {\n\t var cancel;\n\t var token = new CancelToken(function executor(c) {\n\t cancel = c;\n\t });\n\t return {\n\t token: token,\n\t cancel: cancel\n\t };\n\t};\n\t\n\tmodule.exports = CancelToken;\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Syntactic sugar for invoking a function and expanding an array for arguments.\n\t *\n\t * Common use case would be to use `Function.prototype.apply`.\n\t *\n\t * ```js\n\t * function f(x, y, z) {}\n\t * var args = [1, 2, 3];\n\t * f.apply(null, args);\n\t * ```\n\t *\n\t * With `spread` this example can be re-written.\n\t *\n\t * ```js\n\t * spread(function(x, y, z) {})([1, 2, 3]);\n\t * ```\n\t *\n\t * @param {Function} callback\n\t * @returns {Function}\n\t */\n\tmodule.exports = function spread(callback) {\n\t return function wrap(arr) {\n\t return callback.apply(null, arr);\n\t };\n\t};\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// axios.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 3e317bb69558239a2225","module.exports = require('./lib/axios');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/axios.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nvar bind = require('./helpers/bind');\nvar isBuffer = require('is-buffer');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Function equal to merge with the difference being that no reference\n * to original objects is kept.\n *\n * @see merge\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction deepMerge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = deepMerge(result[key], val);\n } else if (typeof val === 'object') {\n result[key] = deepMerge({}, val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n deepMerge: deepMerge,\n extend: extend,\n trim: trim\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/bind.js\n// module id = 3\n// module chunks = 0","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\nmodule.exports = function isBuffer (obj) {\n return obj != null && obj.constructor != null &&\n typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/is-buffer/index.js\n// module id = 4\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n config.method = config.method ? config.method.toLowerCase() : 'get';\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/Axios.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/buildURL.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/InterceptorManager.js\n// module id = 7\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar isAbsoluteURL = require('./../helpers/isAbsoluteURL');\nvar combineURLs = require('./../helpers/combineURLs');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/dispatchRequest.js\n// module id = 8\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/transformData.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/isCancel.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n // Only Node.JS has a process variable that is of [[Class]] process\n if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n } else if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/defaults.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/normalizeHeaderName.js\n// module id = 12\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies');\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/adapters/xhr.js\n// module id = 13\n// module chunks = 0","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/settle.js\n// module id = 14\n// module chunks = 0","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/createError.js\n// module id = 15\n// module chunks = 0","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/enhanceError.js\n// module id = 16\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/parseHeaders.js\n// module id = 17\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isURLSameOrigin.js\n// module id = 18\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/cookies.js\n// module id = 19\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isAbsoluteURL.js\n// module id = 20\n// module chunks = 0","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/combineURLs.js\n// module id = 21\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n utils.forEach(['url', 'method', 'params', 'data'], function valueFromConfig2(prop) {\n if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n }\n });\n\n utils.forEach(['headers', 'auth', 'proxy'], function mergeDeepProperties(prop) {\n if (utils.isObject(config2[prop])) {\n config[prop] = utils.deepMerge(config1[prop], config2[prop]);\n } else if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n } else if (utils.isObject(config1[prop])) {\n config[prop] = utils.deepMerge(config1[prop]);\n } else if (typeof config1[prop] !== 'undefined') {\n config[prop] = config1[prop];\n }\n });\n\n utils.forEach([\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'maxContentLength',\n 'validateStatus', 'maxRedirects', 'httpAgent', 'httpsAgent', 'cancelToken',\n 'socketPath'\n ], function defaultToConfig2(prop) {\n if (typeof config2[prop] !== 'undefined') {\n config[prop] = config2[prop];\n } else if (typeof config1[prop] !== 'undefined') {\n config[prop] = config1[prop];\n }\n });\n\n return config;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/mergeConfig.js\n// module id = 22\n// module chunks = 0","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/Cancel.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/CancelToken.js\n// module id = 24\n// module chunks = 0","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/spread.js\n// module id = 25\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/axios/index.d.ts b/node_modules/axios/index.d.ts deleted file mode 100644 index f9348866..00000000 --- a/node_modules/axios/index.d.ts +++ /dev/null @@ -1,152 +0,0 @@ -export interface AxiosTransformer { - (data: any, headers?: any): any; -} - -export interface AxiosAdapter { - (config: AxiosRequestConfig): AxiosPromise; -} - -export interface AxiosBasicCredentials { - username: string; - password: string; -} - -export interface AxiosProxyConfig { - host: string; - port: number; - auth?: { - username: string; - password:string; - }; - protocol?: string; -} - -export type Method = - | 'get' | 'GET' - | 'delete' | 'DELETE' - | 'head' | 'HEAD' - | 'options' | 'OPTIONS' - | 'post' | 'POST' - | 'put' | 'PUT' - | 'patch' | 'PATCH' - -export type ResponseType = - | 'arraybuffer' - | 'blob' - | 'document' - | 'json' - | 'text' - | 'stream' - -export interface AxiosRequestConfig { - url?: string; - method?: Method; - baseURL?: string; - transformRequest?: AxiosTransformer | AxiosTransformer[]; - transformResponse?: AxiosTransformer | AxiosTransformer[]; - headers?: any; - params?: any; - paramsSerializer?: (params: any) => string; - data?: any; - timeout?: number; - withCredentials?: boolean; - adapter?: AxiosAdapter; - auth?: AxiosBasicCredentials; - responseType?: ResponseType; - xsrfCookieName?: string; - xsrfHeaderName?: string; - onUploadProgress?: (progressEvent: any) => void; - onDownloadProgress?: (progressEvent: any) => void; - maxContentLength?: number; - validateStatus?: (status: number) => boolean; - maxRedirects?: number; - socketPath?: string | null; - httpAgent?: any; - httpsAgent?: any; - proxy?: AxiosProxyConfig | false; - cancelToken?: CancelToken; -} - -export interface AxiosResponse { - data: T; - status: number; - statusText: string; - headers: any; - config: AxiosRequestConfig; - request?: any; -} - -export interface AxiosError extends Error { - config: AxiosRequestConfig; - code?: string; - request?: any; - response?: AxiosResponse; - isAxiosError: boolean; -} - -export interface AxiosPromise extends Promise> { -} - -export interface CancelStatic { - new (message?: string): Cancel; -} - -export interface Cancel { - message: string; -} - -export interface Canceler { - (message?: string): void; -} - -export interface CancelTokenStatic { - new (executor: (cancel: Canceler) => void): CancelToken; - source(): CancelTokenSource; -} - -export interface CancelToken { - promise: Promise; - reason?: Cancel; - throwIfRequested(): void; -} - -export interface CancelTokenSource { - token: CancelToken; - cancel: Canceler; -} - -export interface AxiosInterceptorManager { - use(onFulfilled?: (value: V) => V | Promise, onRejected?: (error: any) => any): number; - eject(id: number): void; -} - -export interface AxiosInstance { - (config: AxiosRequestConfig): AxiosPromise; - (url: string, config?: AxiosRequestConfig): AxiosPromise; - defaults: AxiosRequestConfig; - interceptors: { - request: AxiosInterceptorManager; - response: AxiosInterceptorManager; - }; - getUri(config?: AxiosRequestConfig): string; - request> (config: AxiosRequestConfig): Promise; - get>(url: string, config?: AxiosRequestConfig): Promise; - delete>(url: string, config?: AxiosRequestConfig): Promise; - head>(url: string, config?: AxiosRequestConfig): Promise; - post>(url: string, data?: any, config?: AxiosRequestConfig): Promise; - put>(url: string, data?: any, config?: AxiosRequestConfig): Promise; - patch>(url: string, data?: any, config?: AxiosRequestConfig): Promise; -} - -export interface AxiosStatic extends AxiosInstance { - create(config?: AxiosRequestConfig): AxiosInstance; - Cancel: CancelStatic; - CancelToken: CancelTokenStatic; - isCancel(value: any): boolean; - all(values: (T | Promise)[]): Promise; - spread(callback: (...args: T[]) => R): (array: T[]) => R; -} - -declare const Axios: AxiosStatic; - -export default Axios; diff --git a/node_modules/axios/index.js b/node_modules/axios/index.js deleted file mode 100644 index 79dfd09d..00000000 --- a/node_modules/axios/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/axios'); \ No newline at end of file diff --git a/node_modules/axios/lib/adapters/README.md b/node_modules/axios/lib/adapters/README.md deleted file mode 100644 index 68f11189..00000000 --- a/node_modules/axios/lib/adapters/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# axios // adapters - -The modules under `adapters/` are modules that handle dispatching a request and settling a returned `Promise` once a response is received. - -## Example - -```js -var settle = require('./../core/settle'); - -module.exports = function myAdapter(config) { - // At this point: - // - config has been merged with defaults - // - request transformers have already run - // - request interceptors have already run - - // Make the request using config provided - // Upon response settle the Promise - - return new Promise(function(resolve, reject) { - - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config: config, - request: request - }; - - settle(resolve, reject, response); - - // From here: - // - response transformers will run - // - response interceptors will run - }); -} -``` diff --git a/node_modules/axios/lib/adapters/http.js b/node_modules/axios/lib/adapters/http.js deleted file mode 100644 index 06169ff2..00000000 --- a/node_modules/axios/lib/adapters/http.js +++ /dev/null @@ -1,275 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); -var settle = require('./../core/settle'); -var buildURL = require('./../helpers/buildURL'); -var http = require('http'); -var https = require('https'); -var httpFollow = require('follow-redirects').http; -var httpsFollow = require('follow-redirects').https; -var url = require('url'); -var zlib = require('zlib'); -var pkg = require('./../../package.json'); -var createError = require('../core/createError'); -var enhanceError = require('../core/enhanceError'); - -var isHttps = /https:?/; - -/*eslint consistent-return:0*/ -module.exports = function httpAdapter(config) { - return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) { - var timer; - var resolve = function resolve(value) { - clearTimeout(timer); - resolvePromise(value); - }; - var reject = function reject(value) { - clearTimeout(timer); - rejectPromise(value); - }; - var data = config.data; - var headers = config.headers; - - // Set User-Agent (required by some servers) - // Only set header if it hasn't been set in config - // See https://github.com/axios/axios/issues/69 - if (!headers['User-Agent'] && !headers['user-agent']) { - headers['User-Agent'] = 'axios/' + pkg.version; - } - - if (data && !utils.isStream(data)) { - if (Buffer.isBuffer(data)) { - // Nothing to do... - } else if (utils.isArrayBuffer(data)) { - data = Buffer.from(new Uint8Array(data)); - } else if (utils.isString(data)) { - data = Buffer.from(data, 'utf-8'); - } else { - return reject(createError( - 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', - config - )); - } - - // Add Content-Length header if data exists - headers['Content-Length'] = data.length; - } - - // HTTP basic authentication - var auth = undefined; - if (config.auth) { - var username = config.auth.username || ''; - var password = config.auth.password || ''; - auth = username + ':' + password; - } - - // Parse url - var parsed = url.parse(config.url); - var protocol = parsed.protocol || 'http:'; - - if (!auth && parsed.auth) { - var urlAuth = parsed.auth.split(':'); - var urlUsername = urlAuth[0] || ''; - var urlPassword = urlAuth[1] || ''; - auth = urlUsername + ':' + urlPassword; - } - - if (auth) { - delete headers.Authorization; - } - - var isHttpsRequest = isHttps.test(protocol); - var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; - - var options = { - path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''), - method: config.method.toUpperCase(), - headers: headers, - agent: agent, - auth: auth - }; - - if (config.socketPath) { - options.socketPath = config.socketPath; - } else { - options.hostname = parsed.hostname; - options.port = parsed.port; - } - - var proxy = config.proxy; - if (!proxy && proxy !== false) { - var proxyEnv = protocol.slice(0, -1) + '_proxy'; - var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()]; - if (proxyUrl) { - var parsedProxyUrl = url.parse(proxyUrl); - var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY; - var shouldProxy = true; - - if (noProxyEnv) { - var noProxy = noProxyEnv.split(',').map(function trim(s) { - return s.trim(); - }); - - shouldProxy = !noProxy.some(function proxyMatch(proxyElement) { - if (!proxyElement) { - return false; - } - if (proxyElement === '*') { - return true; - } - if (proxyElement[0] === '.' && - parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement && - proxyElement.match(/\./g).length === parsed.hostname.match(/\./g).length) { - return true; - } - - return parsed.hostname === proxyElement; - }); - } - - - if (shouldProxy) { - proxy = { - host: parsedProxyUrl.hostname, - port: parsedProxyUrl.port - }; - - if (parsedProxyUrl.auth) { - var proxyUrlAuth = parsedProxyUrl.auth.split(':'); - proxy.auth = { - username: proxyUrlAuth[0], - password: proxyUrlAuth[1] - }; - } - } - } - } - - if (proxy) { - options.hostname = proxy.host; - options.host = proxy.host; - options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : ''); - options.port = proxy.port; - options.path = protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path; - - // Basic proxy authorization - if (proxy.auth) { - var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64'); - options.headers['Proxy-Authorization'] = 'Basic ' + base64; - } - } - - var transport; - var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true); - if (config.transport) { - transport = config.transport; - } else if (config.maxRedirects === 0) { - transport = isHttpsProxy ? https : http; - } else { - if (config.maxRedirects) { - options.maxRedirects = config.maxRedirects; - } - transport = isHttpsProxy ? httpsFollow : httpFollow; - } - - if (config.maxContentLength && config.maxContentLength > -1) { - options.maxBodyLength = config.maxContentLength; - } - - // Create the request - var req = transport.request(options, function handleResponse(res) { - if (req.aborted) return; - - // uncompress the response body transparently if required - var stream = res; - switch (res.headers['content-encoding']) { - /*eslint default-case:0*/ - case 'gzip': - case 'compress': - case 'deflate': - // add the unzipper to the body stream processing pipeline - stream = (res.statusCode === 204) ? stream : stream.pipe(zlib.createUnzip()); - - // remove the content-encoding in order to not confuse downstream operations - delete res.headers['content-encoding']; - break; - } - - // return the last request in case of redirects - var lastRequest = res.req || req; - - var response = { - status: res.statusCode, - statusText: res.statusMessage, - headers: res.headers, - config: config, - request: lastRequest - }; - - if (config.responseType === 'stream') { - response.data = stream; - settle(resolve, reject, response); - } else { - var responseBuffer = []; - stream.on('data', function handleStreamData(chunk) { - responseBuffer.push(chunk); - - // make sure the content length is not over the maxContentLength if specified - if (config.maxContentLength > -1 && Buffer.concat(responseBuffer).length > config.maxContentLength) { - stream.destroy(); - reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded', - config, null, lastRequest)); - } - }); - - stream.on('error', function handleStreamError(err) { - if (req.aborted) return; - reject(enhanceError(err, config, null, lastRequest)); - }); - - stream.on('end', function handleStreamEnd() { - var responseData = Buffer.concat(responseBuffer); - if (config.responseType !== 'arraybuffer') { - responseData = responseData.toString(config.responseEncoding); - } - - response.data = responseData; - settle(resolve, reject, response); - }); - } - }); - - // Handle errors - req.on('error', function handleRequestError(err) { - if (req.aborted) return; - reject(enhanceError(err, config, null, req)); - }); - - // Handle request timeout - if (config.timeout) { - timer = setTimeout(function handleRequestTimeout() { - req.abort(); - reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', req)); - }, config.timeout); - } - - if (config.cancelToken) { - // Handle cancellation - config.cancelToken.promise.then(function onCanceled(cancel) { - if (req.aborted) return; - - req.abort(); - reject(cancel); - }); - } - - // Send the request - if (utils.isStream(data)) { - data.on('error', function handleStreamError(err) { - reject(enhanceError(err, config, null, req)); - }).pipe(req); - } else { - req.end(data); - } - }); -}; diff --git a/node_modules/axios/lib/adapters/xhr.js b/node_modules/axios/lib/adapters/xhr.js deleted file mode 100644 index 8c98d114..00000000 --- a/node_modules/axios/lib/adapters/xhr.js +++ /dev/null @@ -1,174 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); -var settle = require('./../core/settle'); -var buildURL = require('./../helpers/buildURL'); -var parseHeaders = require('./../helpers/parseHeaders'); -var isURLSameOrigin = require('./../helpers/isURLSameOrigin'); -var createError = require('../core/createError'); - -module.exports = function xhrAdapter(config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - var requestData = config.data; - var requestHeaders = config.headers; - - if (utils.isFormData(requestData)) { - delete requestHeaders['Content-Type']; // Let the browser set it - } - - var request = new XMLHttpRequest(); - - // HTTP basic authentication - if (config.auth) { - var username = config.auth.username || ''; - var password = config.auth.password || ''; - requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); - } - - request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); - - // Set the request timeout in MS - request.timeout = config.timeout; - - // Listen for ready state - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - - // Prepare the response - var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; - var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config: config, - request: request - }; - - settle(resolve, reject, response); - - // Clean up request - request = null; - }; - - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - - reject(createError('Request aborted', config, 'ECONNABORTED', request)); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(createError('Network Error', config, null, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', - request)); - - // Clean up request - request = null; - }; - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - if (utils.isStandardBrowserEnv()) { - var cookies = require('./../helpers/cookies'); - - // Add xsrf header - var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? - cookies.read(config.xsrfCookieName) : - undefined; - - if (xsrfValue) { - requestHeaders[config.xsrfHeaderName] = xsrfValue; - } - } - - // Add headers to the request - if ('setRequestHeader' in request) { - utils.forEach(requestHeaders, function setRequestHeader(val, key) { - if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { - // Remove Content-Type if data is undefined - delete requestHeaders[key]; - } else { - // Otherwise add header to the request - request.setRequestHeader(key, val); - } - }); - } - - // Add withCredentials to request if needed - if (config.withCredentials) { - request.withCredentials = true; - } - - // Add responseType to request if needed - if (config.responseType) { - try { - request.responseType = config.responseType; - } catch (e) { - // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. - // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. - if (config.responseType !== 'json') { - throw e; - } - } - } - - // Handle progress if needed - if (typeof config.onDownloadProgress === 'function') { - request.addEventListener('progress', config.onDownloadProgress); - } - - // Not all browsers support upload events - if (typeof config.onUploadProgress === 'function' && request.upload) { - request.upload.addEventListener('progress', config.onUploadProgress); - } - - if (config.cancelToken) { - // Handle cancellation - config.cancelToken.promise.then(function onCanceled(cancel) { - if (!request) { - return; - } - - request.abort(); - reject(cancel); - // Clean up request - request = null; - }); - } - - if (requestData === undefined) { - requestData = null; - } - - // Send the request - request.send(requestData); - }); -}; diff --git a/node_modules/axios/lib/axios.js b/node_modules/axios/lib/axios.js deleted file mode 100644 index 81424379..00000000 --- a/node_modules/axios/lib/axios.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -var utils = require('./utils'); -var bind = require('./helpers/bind'); -var Axios = require('./core/Axios'); -var mergeConfig = require('./core/mergeConfig'); -var defaults = require('./defaults'); - -/** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * @return {Axios} A new instance of Axios - */ -function createInstance(defaultConfig) { - var context = new Axios(defaultConfig); - var instance = bind(Axios.prototype.request, context); - - // Copy axios.prototype to instance - utils.extend(instance, Axios.prototype, context); - - // Copy context to instance - utils.extend(instance, context); - - return instance; -} - -// Create the default instance to be exported -var axios = createInstance(defaults); - -// Expose Axios class to allow class inheritance -axios.Axios = Axios; - -// Factory for creating new instances -axios.create = function create(instanceConfig) { - return createInstance(mergeConfig(axios.defaults, instanceConfig)); -}; - -// Expose Cancel & CancelToken -axios.Cancel = require('./cancel/Cancel'); -axios.CancelToken = require('./cancel/CancelToken'); -axios.isCancel = require('./cancel/isCancel'); - -// Expose all/spread -axios.all = function all(promises) { - return Promise.all(promises); -}; -axios.spread = require('./helpers/spread'); - -module.exports = axios; - -// Allow use of default import syntax in TypeScript -module.exports.default = axios; diff --git a/node_modules/axios/lib/cancel/Cancel.js b/node_modules/axios/lib/cancel/Cancel.js deleted file mode 100644 index e0de4003..00000000 --- a/node_modules/axios/lib/cancel/Cancel.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -/** - * A `Cancel` is an object that is thrown when an operation is canceled. - * - * @class - * @param {string=} message The message. - */ -function Cancel(message) { - this.message = message; -} - -Cancel.prototype.toString = function toString() { - return 'Cancel' + (this.message ? ': ' + this.message : ''); -}; - -Cancel.prototype.__CANCEL__ = true; - -module.exports = Cancel; diff --git a/node_modules/axios/lib/cancel/CancelToken.js b/node_modules/axios/lib/cancel/CancelToken.js deleted file mode 100644 index 6b46e666..00000000 --- a/node_modules/axios/lib/cancel/CancelToken.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -var Cancel = require('./Cancel'); - -/** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @class - * @param {Function} executor The executor function. - */ -function CancelToken(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - - var resolvePromise; - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - - var token = this; - executor(function cancel(message) { - if (token.reason) { - // Cancellation has already been requested - return; - } - - token.reason = new Cancel(message); - resolvePromise(token.reason); - }); -} - -/** - * Throws a `Cancel` if cancellation has been requested. - */ -CancelToken.prototype.throwIfRequested = function throwIfRequested() { - if (this.reason) { - throw this.reason; - } -}; - -/** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ -CancelToken.source = function source() { - var cancel; - var token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token: token, - cancel: cancel - }; -}; - -module.exports = CancelToken; diff --git a/node_modules/axios/lib/cancel/isCancel.js b/node_modules/axios/lib/cancel/isCancel.js deleted file mode 100644 index 051f3ae4..00000000 --- a/node_modules/axios/lib/cancel/isCancel.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = function isCancel(value) { - return !!(value && value.__CANCEL__); -}; diff --git a/node_modules/axios/lib/core/Axios.js b/node_modules/axios/lib/core/Axios.js deleted file mode 100644 index 811cb364..00000000 --- a/node_modules/axios/lib/core/Axios.js +++ /dev/null @@ -1,86 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); -var buildURL = require('../helpers/buildURL'); -var InterceptorManager = require('./InterceptorManager'); -var dispatchRequest = require('./dispatchRequest'); -var mergeConfig = require('./mergeConfig'); - -/** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - */ -function Axios(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new InterceptorManager(), - response: new InterceptorManager() - }; -} - -/** - * Dispatch a request - * - * @param {Object} config The config specific for this request (merged with this.defaults) - */ -Axios.prototype.request = function request(config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof config === 'string') { - config = arguments[1] || {}; - config.url = arguments[0]; - } else { - config = config || {}; - } - - config = mergeConfig(this.defaults, config); - config.method = config.method ? config.method.toLowerCase() : 'get'; - - // Hook up interceptors middleware - var chain = [dispatchRequest, undefined]; - var promise = Promise.resolve(config); - - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - chain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - chain.push(interceptor.fulfilled, interceptor.rejected); - }); - - while (chain.length) { - promise = promise.then(chain.shift(), chain.shift()); - } - - return promise; -}; - -Axios.prototype.getUri = function getUri(config) { - config = mergeConfig(this.defaults, config); - return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, ''); -}; - -// Provide aliases for supported request methods -utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request(utils.merge(config || {}, { - method: method, - url: url - })); - }; -}); - -utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, data, config) { - return this.request(utils.merge(config || {}, { - method: method, - url: url, - data: data - })); - }; -}); - -module.exports = Axios; diff --git a/node_modules/axios/lib/core/InterceptorManager.js b/node_modules/axios/lib/core/InterceptorManager.js deleted file mode 100644 index 50d667bb..00000000 --- a/node_modules/axios/lib/core/InterceptorManager.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -function InterceptorManager() { - this.handlers = []; -} - -/** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ -InterceptorManager.prototype.use = function use(fulfilled, rejected) { - this.handlers.push({ - fulfilled: fulfilled, - rejected: rejected - }); - return this.handlers.length - 1; -}; - -/** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - */ -InterceptorManager.prototype.eject = function eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } -}; - -/** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - */ -InterceptorManager.prototype.forEach = function forEach(fn) { - utils.forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); -}; - -module.exports = InterceptorManager; diff --git a/node_modules/axios/lib/core/README.md b/node_modules/axios/lib/core/README.md deleted file mode 100644 index 253bc486..00000000 --- a/node_modules/axios/lib/core/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# axios // core - -The modules found in `core/` should be modules that are specific to the domain logic of axios. These modules would most likely not make sense to be consumed outside of the axios module, as their logic is too specific. Some examples of core modules are: - -- Dispatching requests -- Managing interceptors -- Handling config diff --git a/node_modules/axios/lib/core/createError.js b/node_modules/axios/lib/core/createError.js deleted file mode 100644 index 933680f6..00000000 --- a/node_modules/axios/lib/core/createError.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var enhanceError = require('./enhanceError'); - -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The created error. - */ -module.exports = function createError(message, config, code, request, response) { - var error = new Error(message); - return enhanceError(error, config, code, request, response); -}; diff --git a/node_modules/axios/lib/core/dispatchRequest.js b/node_modules/axios/lib/core/dispatchRequest.js deleted file mode 100644 index 9ea70f22..00000000 --- a/node_modules/axios/lib/core/dispatchRequest.js +++ /dev/null @@ -1,86 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); -var transformData = require('./transformData'); -var isCancel = require('../cancel/isCancel'); -var defaults = require('../defaults'); -var isAbsoluteURL = require('./../helpers/isAbsoluteURL'); -var combineURLs = require('./../helpers/combineURLs'); - -/** - * Throws a `Cancel` if cancellation has been requested. - */ -function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } -} - -/** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * @returns {Promise} The Promise to be fulfilled - */ -module.exports = function dispatchRequest(config) { - throwIfCancellationRequested(config); - - // Support baseURL config - if (config.baseURL && !isAbsoluteURL(config.url)) { - config.url = combineURLs(config.baseURL, config.url); - } - - // Ensure headers exist - config.headers = config.headers || {}; - - // Transform request data - config.data = transformData( - config.data, - config.headers, - config.transformRequest - ); - - // Flatten headers - config.headers = utils.merge( - config.headers.common || {}, - config.headers[config.method] || {}, - config.headers || {} - ); - - utils.forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - function cleanHeaderConfig(method) { - delete config.headers[method]; - } - ); - - var adapter = config.adapter || defaults.adapter; - - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - - // Transform response data - response.data = transformData( - response.data, - response.headers, - config.transformResponse - ); - - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config); - - // Transform response data - if (reason && reason.response) { - reason.response.data = transformData( - reason.response.data, - reason.response.headers, - config.transformResponse - ); - } - } - - return Promise.reject(reason); - }); -}; diff --git a/node_modules/axios/lib/core/enhanceError.js b/node_modules/axios/lib/core/enhanceError.js deleted file mode 100644 index 02fbbd6a..00000000 --- a/node_modules/axios/lib/core/enhanceError.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -/** - * Update an Error with the specified config, error code, and response. - * - * @param {Error} error The error to update. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The error. - */ -module.exports = function enhanceError(error, config, code, request, response) { - error.config = config; - if (code) { - error.code = code; - } - - error.request = request; - error.response = response; - error.isAxiosError = true; - - error.toJSON = function() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: this.config, - code: this.code - }; - }; - return error; -}; diff --git a/node_modules/axios/lib/core/mergeConfig.js b/node_modules/axios/lib/core/mergeConfig.js deleted file mode 100644 index 6097a3e5..00000000 --- a/node_modules/axios/lib/core/mergeConfig.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; - -var utils = require('../utils'); - -/** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * @returns {Object} New object resulting from merging config2 to config1 - */ -module.exports = function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - var config = {}; - - utils.forEach(['url', 'method', 'params', 'data'], function valueFromConfig2(prop) { - if (typeof config2[prop] !== 'undefined') { - config[prop] = config2[prop]; - } - }); - - utils.forEach(['headers', 'auth', 'proxy'], function mergeDeepProperties(prop) { - if (utils.isObject(config2[prop])) { - config[prop] = utils.deepMerge(config1[prop], config2[prop]); - } else if (typeof config2[prop] !== 'undefined') { - config[prop] = config2[prop]; - } else if (utils.isObject(config1[prop])) { - config[prop] = utils.deepMerge(config1[prop]); - } else if (typeof config1[prop] !== 'undefined') { - config[prop] = config1[prop]; - } - }); - - utils.forEach([ - 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', - 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', - 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'maxContentLength', - 'validateStatus', 'maxRedirects', 'httpAgent', 'httpsAgent', 'cancelToken', - 'socketPath' - ], function defaultToConfig2(prop) { - if (typeof config2[prop] !== 'undefined') { - config[prop] = config2[prop]; - } else if (typeof config1[prop] !== 'undefined') { - config[prop] = config1[prop]; - } - }); - - return config; -}; diff --git a/node_modules/axios/lib/core/settle.js b/node_modules/axios/lib/core/settle.js deleted file mode 100644 index 071d9e3e..00000000 --- a/node_modules/axios/lib/core/settle.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -var createError = require('./createError'); - -/** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - */ -module.exports = function settle(resolve, reject, response) { - var validateStatus = response.config.validateStatus; - if (!validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(createError( - 'Request failed with status code ' + response.status, - response.config, - null, - response.request, - response - )); - } -}; diff --git a/node_modules/axios/lib/core/transformData.js b/node_modules/axios/lib/core/transformData.js deleted file mode 100644 index e0653620..00000000 --- a/node_modules/axios/lib/core/transformData.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -/** - * Transform the data for a request or a response - * - * @param {Object|String} data The data to be transformed - * @param {Array} headers The headers for the request or response - * @param {Array|Function} fns A single function or Array of functions - * @returns {*} The resulting transformed data - */ -module.exports = function transformData(data, headers, fns) { - /*eslint no-param-reassign:0*/ - utils.forEach(fns, function transform(fn) { - data = fn(data, headers); - }); - - return data; -}; diff --git a/node_modules/axios/lib/defaults.js b/node_modules/axios/lib/defaults.js deleted file mode 100644 index 7cb8a250..00000000 --- a/node_modules/axios/lib/defaults.js +++ /dev/null @@ -1,98 +0,0 @@ -'use strict'; - -var utils = require('./utils'); -var normalizeHeaderName = require('./helpers/normalizeHeaderName'); - -var DEFAULT_CONTENT_TYPE = { - 'Content-Type': 'application/x-www-form-urlencoded' -}; - -function setContentTypeIfUnset(headers, value) { - if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { - headers['Content-Type'] = value; - } -} - -function getDefaultAdapter() { - var adapter; - // Only Node.JS has a process variable that is of [[Class]] process - if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { - // For node use HTTP adapter - adapter = require('./adapters/http'); - } else if (typeof XMLHttpRequest !== 'undefined') { - // For browsers use XHR adapter - adapter = require('./adapters/xhr'); - } - return adapter; -} - -var defaults = { - adapter: getDefaultAdapter(), - - transformRequest: [function transformRequest(data, headers) { - normalizeHeaderName(headers, 'Accept'); - normalizeHeaderName(headers, 'Content-Type'); - if (utils.isFormData(data) || - utils.isArrayBuffer(data) || - utils.isBuffer(data) || - utils.isStream(data) || - utils.isFile(data) || - utils.isBlob(data) - ) { - return data; - } - if (utils.isArrayBufferView(data)) { - return data.buffer; - } - if (utils.isURLSearchParams(data)) { - setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); - return data.toString(); - } - if (utils.isObject(data)) { - setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); - return JSON.stringify(data); - } - return data; - }], - - transformResponse: [function transformResponse(data) { - /*eslint no-param-reassign:0*/ - if (typeof data === 'string') { - try { - data = JSON.parse(data); - } catch (e) { /* Ignore */ } - } - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - } -}; - -defaults.headers = { - common: { - 'Accept': 'application/json, text/plain, */*' - } -}; - -utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { - defaults.headers[method] = {}; -}); - -utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); -}); - -module.exports = defaults; diff --git a/node_modules/axios/lib/helpers/README.md b/node_modules/axios/lib/helpers/README.md deleted file mode 100644 index 4ae34193..00000000 --- a/node_modules/axios/lib/helpers/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# axios // helpers - -The modules found in `helpers/` should be generic modules that are _not_ specific to the domain logic of axios. These modules could theoretically be published to npm on their own and consumed by other modules or apps. Some examples of generic modules are things like: - -- Browser polyfills -- Managing cookies -- Parsing HTTP headers diff --git a/node_modules/axios/lib/helpers/bind.js b/node_modules/axios/lib/helpers/bind.js deleted file mode 100644 index 6147c608..00000000 --- a/node_modules/axios/lib/helpers/bind.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -module.exports = function bind(fn, thisArg) { - return function wrap() { - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - return fn.apply(thisArg, args); - }; -}; diff --git a/node_modules/axios/lib/helpers/buildURL.js b/node_modules/axios/lib/helpers/buildURL.js deleted file mode 100644 index 8c40e409..00000000 --- a/node_modules/axios/lib/helpers/buildURL.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -function encode(val) { - return encodeURIComponent(val). - replace(/%40/gi, '@'). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); -} - -/** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @returns {string} The formatted url - */ -module.exports = function buildURL(url, params, paramsSerializer) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - var serializedParams; - if (paramsSerializer) { - serializedParams = paramsSerializer(params); - } else if (utils.isURLSearchParams(params)) { - serializedParams = params.toString(); - } else { - var parts = []; - - utils.forEach(params, function serialize(val, key) { - if (val === null || typeof val === 'undefined') { - return; - } - - if (utils.isArray(val)) { - key = key + '[]'; - } else { - val = [val]; - } - - utils.forEach(val, function parseValue(v) { - if (utils.isDate(v)) { - v = v.toISOString(); - } else if (utils.isObject(v)) { - v = JSON.stringify(v); - } - parts.push(encode(key) + '=' + encode(v)); - }); - }); - - serializedParams = parts.join('&'); - } - - if (serializedParams) { - var hashmarkIndex = url.indexOf('#'); - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - - return url; -}; diff --git a/node_modules/axios/lib/helpers/combineURLs.js b/node_modules/axios/lib/helpers/combineURLs.js deleted file mode 100644 index f1b58a58..00000000 --- a/node_modules/axios/lib/helpers/combineURLs.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -/** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * @returns {string} The combined URL - */ -module.exports = function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; -}; diff --git a/node_modules/axios/lib/helpers/cookies.js b/node_modules/axios/lib/helpers/cookies.js deleted file mode 100644 index 5a8a6666..00000000 --- a/node_modules/axios/lib/helpers/cookies.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs support document.cookie - (function standardBrowserEnv() { - return { - write: function write(name, value, expires, path, domain, secure) { - var cookie = []; - cookie.push(name + '=' + encodeURIComponent(value)); - - if (utils.isNumber(expires)) { - cookie.push('expires=' + new Date(expires).toGMTString()); - } - - if (utils.isString(path)) { - cookie.push('path=' + path); - } - - if (utils.isString(domain)) { - cookie.push('domain=' + domain); - } - - if (secure === true) { - cookie.push('secure'); - } - - document.cookie = cookie.join('; '); - }, - - read: function read(name) { - var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove: function remove(name) { - this.write(name, '', Date.now() - 86400000); - } - }; - })() : - - // Non standard browser env (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return { - write: function write() {}, - read: function read() { return null; }, - remove: function remove() {} - }; - })() -); diff --git a/node_modules/axios/lib/helpers/deprecatedMethod.js b/node_modules/axios/lib/helpers/deprecatedMethod.js deleted file mode 100644 index ed40965b..00000000 --- a/node_modules/axios/lib/helpers/deprecatedMethod.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -/*eslint no-console:0*/ - -/** - * Supply a warning to the developer that a method they are using - * has been deprecated. - * - * @param {string} method The name of the deprecated method - * @param {string} [instead] The alternate method to use if applicable - * @param {string} [docs] The documentation URL to get further details - */ -module.exports = function deprecatedMethod(method, instead, docs) { - try { - console.warn( - 'DEPRECATED method `' + method + '`.' + - (instead ? ' Use `' + instead + '` instead.' : '') + - ' This method will be removed in a future release.'); - - if (docs) { - console.warn('For more information about usage see ' + docs); - } - } catch (e) { /* Ignore */ } -}; diff --git a/node_modules/axios/lib/helpers/isAbsoluteURL.js b/node_modules/axios/lib/helpers/isAbsoluteURL.js deleted file mode 100644 index d33e9927..00000000 --- a/node_modules/axios/lib/helpers/isAbsoluteURL.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -/** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ -module.exports = function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); -}; diff --git a/node_modules/axios/lib/helpers/isURLSameOrigin.js b/node_modules/axios/lib/helpers/isURLSameOrigin.js deleted file mode 100644 index f1d89ad1..00000000 --- a/node_modules/axios/lib/helpers/isURLSameOrigin.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs have full support of the APIs needed to test - // whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - var msie = /(msie|trident)/i.test(navigator.userAgent); - var urlParsingNode = document.createElement('a'); - var originURL; - - /** - * Parse a URL to discover it's components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - var href = url; - - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } - - originURL = resolveURL(window.location.href); - - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : - - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })() -); diff --git a/node_modules/axios/lib/helpers/normalizeHeaderName.js b/node_modules/axios/lib/helpers/normalizeHeaderName.js deleted file mode 100644 index 738c9fe4..00000000 --- a/node_modules/axios/lib/helpers/normalizeHeaderName.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -var utils = require('../utils'); - -module.exports = function normalizeHeaderName(headers, normalizedName) { - utils.forEach(headers, function processHeader(value, name) { - if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { - headers[normalizedName] = value; - delete headers[name]; - } - }); -}; diff --git a/node_modules/axios/lib/helpers/parseHeaders.js b/node_modules/axios/lib/helpers/parseHeaders.js deleted file mode 100644 index 8af2cc7f..00000000 --- a/node_modules/axios/lib/helpers/parseHeaders.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -// Headers whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -var ignoreDuplicateOf = [ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' -]; - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} headers Headers needing to be parsed - * @returns {Object} Headers parsed into an object - */ -module.exports = function parseHeaders(headers) { - var parsed = {}; - var key; - var val; - var i; - - if (!headers) { return parsed; } - - utils.forEach(headers.split('\n'), function parser(line) { - i = line.indexOf(':'); - key = utils.trim(line.substr(0, i)).toLowerCase(); - val = utils.trim(line.substr(i + 1)); - - if (key) { - if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { - return; - } - if (key === 'set-cookie') { - parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - } - }); - - return parsed; -}; diff --git a/node_modules/axios/lib/helpers/spread.js b/node_modules/axios/lib/helpers/spread.js deleted file mode 100644 index 25e3cdd3..00000000 --- a/node_modules/axios/lib/helpers/spread.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -/** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * @returns {Function} - */ -module.exports = function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; -}; diff --git a/node_modules/axios/lib/utils.js b/node_modules/axios/lib/utils.js deleted file mode 100644 index 8946055d..00000000 --- a/node_modules/axios/lib/utils.js +++ /dev/null @@ -1,334 +0,0 @@ -'use strict'; - -var bind = require('./helpers/bind'); -var isBuffer = require('is-buffer'); - -/*global toString:true*/ - -// utils is a library of generic helper functions non-specific to axios - -var toString = Object.prototype.toString; - -/** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Array, otherwise false - */ -function isArray(val) { - return toString.call(val) === '[object Array]'; -} - -/** - * Determine if a value is an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ -function isArrayBuffer(val) { - return toString.call(val) === '[object ArrayBuffer]'; -} - -/** - * Determine if a value is a FormData - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an FormData, otherwise false - */ -function isFormData(val) { - return (typeof FormData !== 'undefined') && (val instanceof FormData); -} - -/** - * Determine if a value is a view on an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ -function isArrayBufferView(val) { - var result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); - } - return result; -} - -/** - * Determine if a value is a String - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a String, otherwise false - */ -function isString(val) { - return typeof val === 'string'; -} - -/** - * Determine if a value is a Number - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Number, otherwise false - */ -function isNumber(val) { - return typeof val === 'number'; -} - -/** - * Determine if a value is undefined - * - * @param {Object} val The value to test - * @returns {boolean} True if the value is undefined, otherwise false - */ -function isUndefined(val) { - return typeof val === 'undefined'; -} - -/** - * Determine if a value is an Object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Object, otherwise false - */ -function isObject(val) { - return val !== null && typeof val === 'object'; -} - -/** - * Determine if a value is a Date - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Date, otherwise false - */ -function isDate(val) { - return toString.call(val) === '[object Date]'; -} - -/** - * Determine if a value is a File - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a File, otherwise false - */ -function isFile(val) { - return toString.call(val) === '[object File]'; -} - -/** - * Determine if a value is a Blob - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Blob, otherwise false - */ -function isBlob(val) { - return toString.call(val) === '[object Blob]'; -} - -/** - * Determine if a value is a Function - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ -function isFunction(val) { - return toString.call(val) === '[object Function]'; -} - -/** - * Determine if a value is a Stream - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Stream, otherwise false - */ -function isStream(val) { - return isObject(val) && isFunction(val.pipe); -} - -/** - * Determine if a value is a URLSearchParams object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ -function isURLSearchParams(val) { - return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; -} - -/** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * @returns {String} The String freed of excess whitespace - */ -function trim(str) { - return str.replace(/^\s*/, '').replace(/\s*$/, ''); -} - -/** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - */ -function isStandardBrowserEnv() { - if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || - navigator.product === 'NativeScript' || - navigator.product === 'NS')) { - return false; - } - return ( - typeof window !== 'undefined' && - typeof document !== 'undefined' - ); -} - -/** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - */ -function forEach(obj, fn) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (var i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - fn.call(null, obj[key], key, obj); - } - } - } -} - -/** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ -function merge(/* obj1, obj2, obj3, ... */) { - var result = {}; - function assignValue(val, key) { - if (typeof result[key] === 'object' && typeof val === 'object') { - result[key] = merge(result[key], val); - } else { - result[key] = val; - } - } - - for (var i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue); - } - return result; -} - -/** - * Function equal to merge with the difference being that no reference - * to original objects is kept. - * - * @see merge - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ -function deepMerge(/* obj1, obj2, obj3, ... */) { - var result = {}; - function assignValue(val, key) { - if (typeof result[key] === 'object' && typeof val === 'object') { - result[key] = deepMerge(result[key], val); - } else if (typeof val === 'object') { - result[key] = deepMerge({}, val); - } else { - result[key] = val; - } - } - - for (var i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue); - } - return result; -} - -/** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * @return {Object} The resulting value of object a - */ -function extend(a, b, thisArg) { - forEach(b, function assignValue(val, key) { - if (thisArg && typeof val === 'function') { - a[key] = bind(val, thisArg); - } else { - a[key] = val; - } - }); - return a; -} - -module.exports = { - isArray: isArray, - isArrayBuffer: isArrayBuffer, - isBuffer: isBuffer, - isFormData: isFormData, - isArrayBufferView: isArrayBufferView, - isString: isString, - isNumber: isNumber, - isObject: isObject, - isUndefined: isUndefined, - isDate: isDate, - isFile: isFile, - isBlob: isBlob, - isFunction: isFunction, - isStream: isStream, - isURLSearchParams: isURLSearchParams, - isStandardBrowserEnv: isStandardBrowserEnv, - forEach: forEach, - merge: merge, - deepMerge: deepMerge, - extend: extend, - trim: trim -}; diff --git a/node_modules/axios/node_modules/is-buffer/LICENSE b/node_modules/axios/node_modules/is-buffer/LICENSE deleted file mode 100644 index 0c068cee..00000000 --- a/node_modules/axios/node_modules/is-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -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/axios/node_modules/is-buffer/README.md b/node_modules/axios/node_modules/is-buffer/README.md deleted file mode 100644 index cce0a8cf..00000000 --- a/node_modules/axios/node_modules/is-buffer/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# is-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/is-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/is-buffer -[npm-image]: https://img.shields.io/npm/v/is-buffer.svg -[npm-url]: https://npmjs.org/package/is-buffer -[downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg -[downloads-url]: https://npmjs.org/package/is-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (including the [browserify Buffer](https://github.com/feross/buffer)) - -[![saucelabs][saucelabs-image]][saucelabs-url] - -[saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg -[saucelabs-url]: https://saucelabs.com/u/is-buffer - -## Why not use `Buffer.isBuffer`? - -This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)). - -It's future-proof and works in node too! - -## install - -```bash -npm install is-buffer -``` - -## usage - -```js -var isBuffer = require('is-buffer') - -isBuffer(new Buffer(4)) // true - -isBuffer(undefined) // false -isBuffer(null) // false -isBuffer('') // false -isBuffer(true) // false -isBuffer(false) // false -isBuffer(0) // false -isBuffer(1) // false -isBuffer(1.0) // false -isBuffer('string') // false -isBuffer({}) // false -isBuffer(function foo () {}) // false -``` - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). diff --git a/node_modules/axios/node_modules/is-buffer/index.js b/node_modules/axios/node_modules/is-buffer/index.js deleted file mode 100644 index da9bfdd7..00000000 --- a/node_modules/axios/node_modules/is-buffer/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * Determine if an object is a Buffer - * - * @author Feross Aboukhadijeh - * @license MIT - */ - -module.exports = function isBuffer (obj) { - return obj != null && obj.constructor != null && - typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) -} diff --git a/node_modules/axios/node_modules/is-buffer/package.json b/node_modules/axios/node_modules/is-buffer/package.json deleted file mode 100644 index 38207aff..00000000 --- a/node_modules/axios/node_modules/is-buffer/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_args": [ - [ - "is-buffer@2.0.3", - "E:\\python\\setup-php" - ] - ], - "_from": "is-buffer@2.0.3", - "_id": "is-buffer@2.0.3", - "_inBundle": false, - "_integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", - "_location": "/axios/is-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "is-buffer@2.0.3", - "name": "is-buffer", - "escapedName": "is-buffer", - "rawSpec": "2.0.3", - "saveSpec": null, - "fetchSpec": "2.0.3" - }, - "_requiredBy": [ - "/axios" - ], - "_resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", - "_spec": "2.0.3", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/is-buffer/issues" - }, - "dependencies": {}, - "description": "Determine if an object is a Buffer", - "devDependencies": { - "airtap": "0.0.7", - "standard": "*", - "tape": "^4.0.0" - }, - "engines": { - "node": ">=4" - }, - "homepage": "https://github.com/feross/is-buffer#readme", - "keywords": [ - "arraybuffer", - "browser", - "browser buffer", - "browserify", - "buffer", - "buffers", - "core buffer", - "dataview", - "float32array", - "float64array", - "int16array", - "int32array", - "type", - "typed array", - "uint32array" - ], - "license": "MIT", - "main": "index.js", - "name": "is-buffer", - "repository": { - "type": "git", - "url": "git://github.com/feross/is-buffer.git" - }, - "scripts": { - "test": "standard && npm run test-node && npm run test-browser", - "test-browser": "airtap -- test/*.js", - "test-browser-local": "airtap --local -- test/*.js", - "test-node": "tape test/*.js" - }, - "testling": { - "files": "test/*.js" - }, - "version": "2.0.3" -} diff --git a/node_modules/axios/package.json b/node_modules/axios/package.json deleted file mode 100644 index c1b64416..00000000 --- a/node_modules/axios/package.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "_args": [ - [ - "axios@0.19.0", - "E:\\python\\setup-php" - ] - ], - "_from": "axios@0.19.0", - "_id": "axios@0.19.0", - "_inBundle": false, - "_integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==", - "_location": "/axios", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "axios@0.19.0", - "name": "axios", - "escapedName": "axios", - "rawSpec": "0.19.0", - "saveSpec": null, - "fetchSpec": "0.19.0" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz", - "_spec": "0.19.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Matt Zabriskie" - }, - "browser": { - "./lib/adapters/http.js": "./lib/adapters/xhr.js" - }, - "bugs": { - "url": "https://github.com/axios/axios/issues" - }, - "bundlesize": [ - { - "path": "./dist/axios.min.js", - "threshold": "5kB" - } - ], - "dependencies": { - "follow-redirects": "1.5.10", - "is-buffer": "^2.0.2" - }, - "description": "Promise based HTTP client for the browser and node.js", - "devDependencies": { - "bundlesize": "^0.17.0", - "coveralls": "^3.0.0", - "es6-promise": "^4.2.4", - "grunt": "^1.0.2", - "grunt-banner": "^0.6.0", - "grunt-cli": "^1.2.0", - "grunt-contrib-clean": "^1.1.0", - "grunt-contrib-watch": "^1.0.0", - "grunt-eslint": "^20.1.0", - "grunt-karma": "^2.0.0", - "grunt-mocha-test": "^0.13.3", - "grunt-ts": "^6.0.0-beta.19", - "grunt-webpack": "^1.0.18", - "istanbul-instrumenter-loader": "^1.0.0", - "jasmine-core": "^2.4.1", - "karma": "^1.3.0", - "karma-chrome-launcher": "^2.2.0", - "karma-coverage": "^1.1.1", - "karma-firefox-launcher": "^1.1.0", - "karma-jasmine": "^1.1.1", - "karma-jasmine-ajax": "^0.1.13", - "karma-opera-launcher": "^1.0.0", - "karma-safari-launcher": "^1.0.0", - "karma-sauce-launcher": "^1.2.0", - "karma-sinon": "^1.0.5", - "karma-sourcemap-loader": "^0.3.7", - "karma-webpack": "^1.7.0", - "load-grunt-tasks": "^3.5.2", - "minimist": "^1.2.0", - "mocha": "^5.2.0", - "sinon": "^4.5.0", - "typescript": "^2.8.1", - "url-search-params": "^0.10.0", - "webpack": "^1.13.1", - "webpack-dev-server": "^1.14.1" - }, - "homepage": "https://github.com/axios/axios", - "keywords": [ - "xhr", - "http", - "ajax", - "promise", - "node" - ], - "license": "MIT", - "main": "index.js", - "name": "axios", - "repository": { - "type": "git", - "url": "git+https://github.com/axios/axios.git" - }, - "scripts": { - "build": "NODE_ENV=production grunt build", - "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", - "examples": "node ./examples/server.js", - "fix": "eslint --fix lib/**/*.js", - "postversion": "git push && git push --tags", - "preversion": "npm test", - "start": "node ./sandbox/server.js", - "test": "grunt test && bundlesize", - "version": "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json" - }, - "typings": "./index.d.ts", - "version": "0.19.0" -} diff --git a/node_modules/babel-jest/README.md b/node_modules/babel-jest/README.md deleted file mode 100644 index e0a6890f..00000000 --- a/node_modules/babel-jest/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# babel-jest - -[Babel](https://github.com/babel/babel) [jest](https://github.com/facebook/jest) plugin - -## Usage - -If you are already using `jest-cli`, just add `babel-jest` and it will automatically compile JavaScript code using Babel. - -```bash -yarn add --dev babel-jest @babel/core -``` - -If you would like to write your own preprocessor, uninstall and delete babel-jest and set the [config.transform](https://jestjs.io/docs/configuration#transform-object-string-string) option to your preprocessor. - -## Setup - -_Note: this step is only required if you are using `babel-jest` with additional code preprocessors._ - -To explicitly define `babel-jest` as a transformer for your JavaScript code, map _.js_ files to the `babel-jest` module. Typescript files are also supported. - -```json -"transform": { - "^.+\\.[t|j]sx?$": "babel-jest" -}, -``` diff --git a/node_modules/babel-jest/build/index.d.ts b/node_modules/babel-jest/build/index.d.ts deleted file mode 100644 index e9338728..00000000 --- a/node_modules/babel-jest/build/index.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Transformer } from '@jest/transform'; -import { TransformOptions } from '@babel/core'; -interface BabelJestTransformer extends Transformer { - canInstrument: true; -} -declare const transformer: BabelJestTransformer & { - createTransformer: (options?: TransformOptions) => BabelJestTransformer; -}; -export = transformer; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/babel-jest/build/index.d.ts.map b/node_modules/babel-jest/build/index.d.ts.map deleted file mode 100644 index 9b8ec417..00000000 --- a/node_modules/babel-jest/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAGL,gBAAgB,EAEjB,MAAM,aAAa,CAAC;AASrB,UAAU,oBAAqB,SAAQ,WAAW;IAChD,aAAa,EAAE,IAAI,CAAC;CACrB;AAwGD,QAAA,MAAM,WAAW,EAAE,oBAAoB,GAAG;IACxC,iBAAiB,EAAE,CAAC,OAAO,CAAC,EAAE,gBAAgB,KAAK,oBAAoB,CAAC;CAMzE,CAAC;AAEF,SAAS,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/babel-jest/build/index.js b/node_modules/babel-jest/build/index.js deleted file mode 100644 index 51f9e1bf..00000000 --- a/node_modules/babel-jest/build/index.js +++ /dev/null @@ -1,226 +0,0 @@ -'use strict'; - -function _crypto() { - const data = _interopRequireDefault(require('crypto')); - - _crypto = function _crypto() { - return data; - }; - - return data; -} - -function _fs() { - const data = _interopRequireDefault(require('fs')); - - _fs = function _fs() { - return data; - }; - - return data; -} - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _core() { - const data = require('@babel/core'); - - _core = function _core() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _slash() { - const data = _interopRequireDefault(require('slash')); - - _slash = function _slash() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const THIS_FILE = _fs().default.readFileSync(__filename); - -const jestPresetPath = require.resolve('babel-preset-jest'); - -const babelIstanbulPlugin = require.resolve('babel-plugin-istanbul'); // Narrow down the types - -const createTransformer = (options = {}) => { - options = _objectSpread({}, options, { - caller: { - name: 'babel-jest', - supportsStaticESM: false - }, - compact: false, - plugins: (options && options.plugins) || [], - presets: ((options && options.presets) || []).concat(jestPresetPath), - sourceMaps: 'both' - }); - - function loadBabelConfig(cwd, filename) { - // `cwd` first to allow incoming options to override it - const babelConfig = (0, _core().loadPartialConfig)( - _objectSpread( - { - cwd - }, - options, - { - filename - } - ) - ); - - if (!babelConfig) { - throw new Error( - `babel-jest: Babel ignores ${_chalk().default.bold( - (0, _slash().default)(_path().default.relative(cwd, filename)) - )} - make sure to include the file in Jest's ${_chalk().default.bold( - 'transformIgnorePatterns' - )} as well.` - ); - } - - return babelConfig; - } - - return { - canInstrument: true, - - getCacheKey( - fileData, - filename, - configString, - {config, instrument, rootDir} - ) { - const babelOptions = loadBabelConfig(config.cwd, filename); - const configPath = [ - babelOptions.config || '', - babelOptions.babelrc || '' - ]; - return _crypto() - .default.createHash('md5') - .update(THIS_FILE) - .update('\0', 'utf8') - .update(JSON.stringify(babelOptions.options)) - .update('\0', 'utf8') - .update(fileData) - .update('\0', 'utf8') - .update(_path().default.relative(rootDir, filename)) - .update('\0', 'utf8') - .update(configString) - .update('\0', 'utf8') - .update(configPath.join('')) - .update('\0', 'utf8') - .update(instrument ? 'instrument' : '') - .update('\0', 'utf8') - .update(process.env.NODE_ENV || '') - .update('\0', 'utf8') - .update(process.env.BABEL_ENV || '') - .digest('hex'); - }, - - process(src, filename, config, transformOptions) { - const babelOptions = _objectSpread( - {}, - loadBabelConfig(config.cwd, filename).options - ); - - if (transformOptions && transformOptions.instrument) { - babelOptions.auxiliaryCommentBefore = ' istanbul ignore next '; // Copied from jest-runtime transform.js - - babelOptions.plugins = (babelOptions.plugins || []).concat([ - [ - babelIstanbulPlugin, - { - // files outside `cwd` will not be instrumented - cwd: config.rootDir, - exclude: [] - } - ] - ]); - } - - const transformResult = (0, _core().transformSync)(src, babelOptions); - - if (transformResult) { - const code = transformResult.code, - map = transformResult.map; - - if (typeof code === 'string') { - return { - code, - map - }; - } - } - - return src; - } - }; -}; - -const transformer = _objectSpread({}, createTransformer(), { - // Assigned here so only the exported transformer has `createTransformer`, - // instead of all created transformers by the function - createTransformer -}); - -module.exports = transformer; diff --git a/node_modules/babel-jest/node_modules/slash/index.js b/node_modules/babel-jest/node_modules/slash/index.js deleted file mode 100644 index 75d72501..00000000 --- a/node_modules/babel-jest/node_modules/slash/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -module.exports = input => { - const isExtendedLengthPath = /^\\\\\?\\/.test(input); - const hasNonAscii = /[^\u0000-\u0080]+/.test(input); // eslint-disable-line no-control-regex - - if (isExtendedLengthPath || hasNonAscii) { - return input; - } - - return input.replace(/\\/g, '/'); -}; diff --git a/node_modules/babel-jest/node_modules/slash/license b/node_modules/babel-jest/node_modules/slash/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/babel-jest/node_modules/slash/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/babel-jest/node_modules/slash/package.json b/node_modules/babel-jest/node_modules/slash/package.json deleted file mode 100644 index d5e31762..00000000 --- a/node_modules/babel-jest/node_modules/slash/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "slash@2.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "slash@2.0.0", - "_id": "slash@2.0.0", - "_inBundle": false, - "_integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "_location": "/babel-jest/slash", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "slash@2.0.0", - "name": "slash", - "escapedName": "slash", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/babel-jest" - ], - "_resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/slash/issues" - }, - "description": "Convert Windows backslash paths to slash paths", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/slash#readme", - "keywords": [ - "path", - "seperator", - "sep", - "slash", - "backslash", - "windows", - "win" - ], - "license": "MIT", - "name": "slash", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/slash.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0" -} diff --git a/node_modules/babel-jest/node_modules/slash/readme.md b/node_modules/babel-jest/node_modules/slash/readme.md deleted file mode 100644 index 5e2fedbc..00000000 --- a/node_modules/babel-jest/node_modules/slash/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# slash [![Build Status](https://travis-ci.org/sindresorhus/slash.svg?branch=master)](https://travis-ci.org/sindresorhus/slash) - -> Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar` - -[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters. - -This was created since the `path` methods in Node outputs `\\` paths on Windows. - - -## Install - -``` -$ npm install slash -``` - - -## Usage - -```js -const path = require('path'); -const slash = require('slash'); - -const str = path.join('foo', 'bar'); -// Unix => foo/bar -// Windows => foo\\bar - -slash(str); -// Unix => foo/bar -// Windows => foo/bar -``` - - -## API - -### slash(path) - -Type: `string` - -Accepts a Windows backslash path and returns a slash path. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/babel-jest/package.json b/node_modules/babel-jest/package.json deleted file mode 100644 index 80bb963e..00000000 --- a/node_modules/babel-jest/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_args": [ - [ - "babel-jest@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "babel-jest@24.9.0", - "_id": "babel-jest@24.9.0", - "_inBundle": false, - "_integrity": "sha512-ntuddfyiN+EhMw58PTNL1ph4C9rECiQXjI4nMMBKBaNjXvqLdkXpPRcMSr4iyBrJg/+wz9brFUD6RhOAT6r4Iw==", - "_location": "/babel-jest", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "babel-jest@24.9.0", - "name": "babel-jest", - "escapedName": "babel-jest", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/jest-config" - ], - "_resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "@types/babel__core": "^7.1.0", - "babel-plugin-istanbul": "^5.1.0", - "babel-preset-jest": "^24.9.0", - "chalk": "^2.4.2", - "slash": "^2.0.0" - }, - "description": "Jest plugin to use babel for transformation.", - "devDependencies": { - "@babel/core": "^7.1.0", - "@types/slash": "^2.0.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "babel-jest", - "peerDependencies": { - "@babel/core": "^7.0.0" - }, - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/babel-jest" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/babel-plugin-istanbul/CHANGELOG.md b/node_modules/babel-plugin-istanbul/CHANGELOG.md deleted file mode 100644 index ef7c03af..00000000 --- a/node_modules/babel-plugin-istanbul/CHANGELOG.md +++ /dev/null @@ -1,294 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -## [5.2.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.1.4...v5.2.0) (2019-07-18) - - -### Bug Fixes - -* Print explicit error if use with babel 6 is attempted ([#207](https://github.com/istanbuljs/babel-plugin-istanbul/issues/207)) ([a12cf16](https://github.com/istanbuljs/babel-plugin-istanbul/commit/a12cf16)) - - -### Features - -* Support turning off node_modules default exclude via flag ([#172](https://github.com/istanbuljs/babel-plugin-istanbul/issues/172)) ([a314f06](https://github.com/istanbuljs/babel-plugin-istanbul/commit/a314f06)) - - - -## [5.1.4](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.1.3...v5.1.4) (2019-04-25) - - - -## [5.1.3](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.1.2...v5.1.3) (2019-04-23) - - -### Bug Fixes - -* Revert [#192](https://github.com/istanbuljs/babel-plugin-istanbul/issues/192) ([201a933](https://github.com/istanbuljs/babel-plugin-istanbul/commit/201a933)) due to regression detailed at [#201](https://github.com/istanbuljs/babel-plugin-istanbul/issues/201) - - - -## [5.1.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.1.1...v5.1.2) (2019-04-10) - - -### Bug Fixes - -* Ensure correct scope references after traversal ([#192](https://github.com/istanbuljs/babel-plugin-istanbul/issues/192)) ([201a933](https://github.com/istanbuljs/babel-plugin-istanbul/commit/201a933)) - - - - -## [5.1.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.1.0...v5.1.1) (2019-01-11) - - -### Bug Fixes - -* respect changes of cwd in options ([#171](https://github.com/istanbuljs/babel-plugin-istanbul/issues/171)) ([adec723](https://github.com/istanbuljs/babel-plugin-istanbul/commit/adec723)) - - - - -# [5.1.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.0.1...v5.1.0) (2018-09-07) - - -### Features - -* Bump dependencies. ([b509649](https://github.com/istanbuljs/babel-plugin-istanbul/commit/b509649)) - - - - -## [5.0.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.0.0...v5.0.1) (2018-07-24) - - - - -# [5.0.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.6...v5.0.0) (2018-06-27) - - -### Features - -* upgrade to babel 7 and newest istanbul libraries ([#158](https://github.com/istanbuljs/babel-plugin-istanbul/issues/158)) ([a9e1564](https://github.com/istanbuljs/babel-plugin-istanbul/commit/a9e1564)) - - -### BREAKING CHANGES - -* Drop node 4 support, upgrade to babel 7, stop shipping @babel/plugin-syntax-object-rest-spread - - - - -## 4.1.6 (2018-03-09) - -* chore: explicit update of istanbul dependencies (#149) ([77b6eb7](https://github.com/istanbuljs/babel-plugin-istanbul/commit/77b6eb7)), closes [#149](https://github.com/istanbuljs/babel-plugin-istanbul/issues/149) -* chore(package): update coveralls to version 3.0.0 (#133) ([7045a03](https://github.com/istanbuljs/babel-plugin-istanbul/commit/7045a03)), closes [#133](https://github.com/istanbuljs/babel-plugin-istanbul/issues/133) -* chore(package): update mocha to version 4.0.0 (#134) ([38176ba](https://github.com/istanbuljs/babel-plugin-istanbul/commit/38176ba)), closes [#134](https://github.com/istanbuljs/babel-plugin-istanbul/issues/134) -* fix: babel-preset-es2015 => babel-preset-env (#138) ([18fe954](https://github.com/istanbuljs/babel-plugin-istanbul/commit/18fe954)), closes [#138](https://github.com/istanbuljs/babel-plugin-istanbul/issues/138) -* fix: include object-spread-syntax plugin (#141) ([428a952](https://github.com/istanbuljs/babel-plugin-istanbul/commit/428a952)), closes [#141](https://github.com/istanbuljs/babel-plugin-istanbul/issues/141) - - - - -## [4.1.5](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.2...v4.1.5) (2017-08-23) - - - - -## [4.1.4](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.3...v4.1.4) (2017-05-27) - - - - -## [4.1.3](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.1...v4.1.3) (2017-04-29) - - - - -## [4.1.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.1...v4.1.2) (2017-03-27) - - - - -## [4.1.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.0...v4.1.1) (2017-03-22) - - -### Bug Fixes - -* explicit upgrade to patched version of istanbul-lib-instrument ([db8ecbe](https://github.com/istanbuljs/babel-plugin-istanbul/commit/db8ecbe)) - - - - -# [4.1.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.0.0...v4.1.0) (2017-03-21) - - -### Features - -* add includeUntested option to expose coverage of all instrumented files ([#80](https://github.com/istanbuljs/babel-plugin-istanbul/issues/80)) ([b078bbd](https://github.com/istanbuljs/babel-plugin-istanbul/commit/b078bbd)) - - - - -# [4.0.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v3.1.2...v4.0.0) (2017-02-07) - - -### Bug Fixes - -* load configuration from process.env.NYC_CONFIG if present ([#93](https://github.com/istanbuljs/babel-plugin-istanbul/issues/93)) ([e902924](https://github.com/istanbuljs/babel-plugin-istanbul/commit/e902924)) - - -### Features - -* drop Node 0.10 and 0.12 support, upgrade dependencies to reflect this ([#88](https://github.com/istanbuljs/babel-plugin-istanbul/issues/88)) ([594c03a](https://github.com/istanbuljs/babel-plugin-istanbul/commit/594c03a)) -* we can now use the language feature Object.assign ([#92](https://github.com/istanbuljs/babel-plugin-istanbul/issues/92)) ([f77db2a](https://github.com/istanbuljs/babel-plugin-istanbul/commit/f77db2a)) - - -### BREAKING CHANGES - -* I've updated dependencies and dropped Node 0.10 and Node 0.12 support. - - - - -## [3.1.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v3.1.1...v3.1.2) (2017-01-04) - - -### Bug Fixes - -* address regression related to export const foo = () => {} ([#79](https://github.com/istanbuljs/babel-plugin-istanbul/issues/79)) ([f870a8f](https://github.com/istanbuljs/babel-plugin-istanbul/commit/f870a8f)) - - - - -## [3.1.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v3.1.0...v3.1.1) (2017-01-02) - - - - -# [3.1.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v3.0.0...v3.1.0) (2016-12-27) - - -### Bug Fixes - -* upgrade a bunch of core dependencies ([#77](https://github.com/istanbuljs/babel-plugin-istanbul/issues/77)) ([e764330](https://github.com/istanbuljs/babel-plugin-istanbul/commit/e764330)) - - -### Features - -* accept source map input for the visitor ([#75](https://github.com/istanbuljs/babel-plugin-istanbul/issues/75)) ([437e90b](https://github.com/istanbuljs/babel-plugin-istanbul/commit/437e90b)) - - - - -# [3.0.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v2.0.3...v3.0.0) (2016-11-14) - - -### Chores - -* **package:** update test-exclude to version 3.0.0 ([#68](https://github.com/istanbuljs/babel-plugin-istanbul/issues/68)) ([0396385](https://github.com/istanbuljs/babel-plugin-istanbul/commit/0396385)) - - -### BREAKING CHANGES - -* package: test-exclude now adds `**/node_modules/**` as exclude rule by default. - - - - -## [2.0.3](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v2.0.2...v2.0.3) (2016-10-17) - - -### Bug Fixes - -* force istanbul-lib-instrument with variable hoisting fix ([#64](https://github.com/istanbuljs/babel-plugin-istanbul/issues/64)) ([209a0cf](https://github.com/istanbuljs/babel-plugin-istanbul/commit/209a0cf)) -* switch deprecated lodash.assign for object-assign ([#58](https://github.com/istanbuljs/babel-plugin-istanbul/issues/58)) ([6e051fc](https://github.com/istanbuljs/babel-plugin-istanbul/commit/6e051fc)) - - - - -## [2.0.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v2.0.1...v2.0.2) (2016-09-08) - - -### Bug Fixes - -* take realpath of cwd, whether or not set in env ([#37](https://github.com/istanbuljs/babel-plugin-istanbul/issues/37)) ([6274d83](https://github.com/istanbuljs/babel-plugin-istanbul/commit/6274d83)) - - - - -## [2.0.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v2.0.0...v2.0.1) (2016-09-02) - - -### Bug Fixes - -* update istanbul-lib-instrument ([573e0d4](https://github.com/istanbuljs/babel-plugin-istanbul/commit/573e0d4)) - - - - -# [2.0.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.1.0...v2.0.0) (2016-08-14) - - -### Chores - -* upgrade to version of test-exclude with new exclude rules ([#35](https://github.com/istanbuljs/babel-plugin-istanbul/issues/35)) ([220ce2b](https://github.com/istanbuljs/babel-plugin-istanbul/commit/220ce2b)) - - -### BREAKING CHANGES - -* see https://github.com/istanbuljs/test-exclude/blob/master/CHANGELOG.md#breaking-changes - - - - -# [1.1.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.0.3...v1.1.0) (2016-07-21) - - -### Bug Fixes - -* upgrade to istanbul-lib-instrument with faster babel-generator ([#18](https://github.com/istanbuljs/babel-plugin-istanbul/issues/18)) ([d33263c](https://github.com/istanbuljs/babel-plugin-istanbul/commit/d33263c)) - - -### Features - -* allow exclude/include options to be passed as Babel plugin config ([#16](https://github.com/istanbuljs/babel-plugin-istanbul/issues/16)) ([cf68421](https://github.com/istanbuljs/babel-plugin-istanbul/commit/cf68421)) - - - - -## [1.0.3](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.0.2...v1.0.3) (2016-07-09) - - -### Bug Fixes - -* keep using NYC_CWD if available ([#10](https://github.com/istanbuljs/babel-plugin-istanbul/issues/10)) ([db0352b](https://github.com/istanbuljs/babel-plugin-istanbul/commit/db0352b)) - - - - -## [1.0.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.0.1...v1.0.2) (2016-07-03) - - -### Bug Fixes - -* take realpath of process.cwd(), fixes [#7](https://github.com/istanbuljs/babel-plugin-istanbul/issues/7) ([#8](https://github.com/istanbuljs/babel-plugin-istanbul/issues/8)) ([e8d3785](https://github.com/istanbuljs/babel-plugin-istanbul/commit/e8d3785)), closes [#7](https://github.com/istanbuljs/babel-plugin-istanbul/issues/7) [#8](https://github.com/istanbuljs/babel-plugin-istanbul/issues/8) - - - - -## [1.0.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.0.0...v1.0.1) (2016-06-30) - - -### Bug Fixes - -* upgrade to version of istanbul-lib-instrument that fixes some out of bounds issues ([#6](https://github.com/istanbuljs/babel-plugin-istanbul/issues/6)) ([a949065](https://github.com/istanbuljs/babel-plugin-istanbul/commit/a949065)), closes [#6](https://github.com/istanbuljs/babel-plugin-istanbul/issues/6) - - - -# 1.0.0 (2016-06-26) - - -### Features - -* port functionality from __coverage__, get ready for first release ([#2](https://github.com/istanbuljs/babel-plugin-istanbul/issues/2)) ([2a8ee44](https://github.com/istanbuljs/babel-plugin-istanbul/commit/2a8ee44)) diff --git a/node_modules/babel-plugin-istanbul/LICENSE b/node_modules/babel-plugin-istanbul/LICENSE deleted file mode 100644 index 22f21ab9..00000000 --- a/node_modules/babel-plugin-istanbul/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2016, Istanbul Code Coverage -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 babel-plugin-istanbul nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/babel-plugin-istanbul/README.md b/node_modules/babel-plugin-istanbul/README.md deleted file mode 100644 index 4c19da3c..00000000 --- a/node_modules/babel-plugin-istanbul/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# babel-plugin-istanbul - -[![Greenkeeper badge](https://badges.greenkeeper.io/istanbuljs/babel-plugin-istanbul.svg)](https://greenkeeper.io/) -[![Build Status](https://travis-ci.org/istanbuljs/babel-plugin-istanbul.svg?branch=master)](https://travis-ci.org/istanbuljs/babel-plugin-istanbul) -[![Coverage Status](https://coveralls.io/repos/github/istanbuljs/babel-plugin-istanbul/badge.svg?branch=master)](https://coveralls.io/github/istanbuljs/babel-plugin-istanbul?branch=master) -[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) -[![community slack](http://devtoolscommunity.herokuapp.com/badge.svg)](http://devtoolscommunity.herokuapp.com) - -_Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com)_. - -A Babel plugin that instruments your code with Istanbul coverage. -It can instantly be used with [karma-coverage](https://github.com/karma-runner/karma-coverage) and mocha on Node.js (through [nyc](https://github.com/bcoe/nyc)). - -__Note:__ This plugin does not generate any report or save any data to any file; -it only adds instrumenting code to your JavaScript source code. -To integrate with testing tools, please see the [Integrations](#integrations) section. - -## Usage - -Install it: - -``` -npm install --save-dev babel-plugin-istanbul -``` - -Add it to `.babelrc` in test mode: - -```js -{ - "env": { - "test": { - "plugins": [ "istanbul" ] - } - } -} -``` - -Optionally, use [cross-env](https://www.npmjs.com/package/cross-env) to set -`NODE_ENV=test`: - -```json -{ - "scripts": { - "test": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha test/*.js" - } -} -``` - -## Integrations - -### karma - -It _just works_ with Karma. First, make sure that the code is already transpiled by Babel (either using `karma-babel-preprocessor`, `karma-webpack`, or `karma-browserify`). Then, simply set up [karma-coverage](https://github.com/karma-runner/karma-coverage) according to the docs, but __don’t add the `coverage` preprocessor.__ This plugin has already instrumented your code, and Karma should pick it up automatically. - -It has been tested with [bemusic/bemuse](https://codecov.io/github/bemusic/bemuse) project, which contains ~2400 statements. - -### mocha on node.js (through nyc) - -Configure Mocha to transpile JavaScript code using Babel, then you can run your tests with [`nyc`](https://github.com/bcoe/nyc), which will collect all the coverage report. - -babel-plugin-istanbul respects the `include`/`exclude` configuration options from nyc, -but you also need to __configure NYC not to instrument your code__ by adding these settings in your `package.json`: - -```js - "nyc": { - "sourceMap": false, - "instrument": false - }, -``` - -## Ignoring files - -You don't want to cover your test files as this will skew your coverage results. You can configure this by providing plugin options matching nyc's [`exclude`/`include` rules](https://github.com/bcoe/nyc#excluding-files): - -```json -{ - "env": { - "test": { - "plugins": [ - ["istanbul", { - "exclude": [ - "**/*.spec.js" - ] - }] - ] - } - } -} -``` - -If you don't provide options in your Babel config, the plugin will look for `exclude`/`include` config under an `"nyc"` key in `package.json`. - -You can also use [istanbul's ignore hints](https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes) to specify specific lines of code to skip instrumenting. - -## Source Maps - -By default, this plugin will pick up inline source maps and attach them to the instrumented code such that code coverage can be remapped back to the original source, even for multi-step build processes. This can be memory intensive. Set `useInlineSourceMaps` to prevent this behavior. - -```json -{ - "env": { - "test": { - "plugins": [ - ["istanbul", { - "useInlineSourceMaps": false - }] - ] - } - } -} -``` - -If you're instrumenting code programatically, you can pass a source map explicitly. -```js -import babelPluginIstanbul from 'babel-plugin-istanbul'; - -function instrument(sourceCode, sourceMap, fileName) { - return babel.transform(sourceCode, { - filename, - plugins: [ - [babelPluginIstanbul, { - inputSourceMap: sourceMap - }] - ] - }) -} -``` - -## Credit where credit is due - -The approach used in `babel-plugin-istanbul` was inspired by [Thai Pangsakulyanont](https://github.com/dtinth)'s original library [`babel-plugin-__coverage__`](https://github.com/dtinth/babel-plugin-__coverage__). diff --git a/node_modules/babel-plugin-istanbul/lib/index.js b/node_modules/babel-plugin-istanbul/lib/index.js deleted file mode 100644 index 5b4a5815..00000000 --- a/node_modules/babel-plugin-istanbul/lib/index.js +++ /dev/null @@ -1,117 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _fs = require("fs"); - -var _path = require("path"); - -var _helperPluginUtils = require("@babel/helper-plugin-utils"); - -var _istanbulLibInstrument = require("istanbul-lib-instrument"); - -const testExclude = require('test-exclude'); - -const findUp = require('find-up'); - -function getRealpath(n) { - try { - return (0, _fs.realpathSync)(n) || n; - } catch (e) { - return n; - } -} - -function makeShouldSkip() { - let exclude; - return function shouldSkip(file, opts) { - if (!exclude || exclude.cwd !== opts.cwd) { - const cwd = getRealpath(process.env.NYC_CWD || process.cwd()); - const nycConfig = process.env.NYC_CONFIG ? JSON.parse(process.env.NYC_CONFIG) : {}; - let config = {}; - - if (Object.keys(opts).length > 0) { - // explicitly configuring options in babel - // takes precedence. - config = opts; - } else if (nycConfig.include || nycConfig.exclude) { - // nyc was configured in a parent process (keep these settings). - config = { - include: nycConfig.include, - exclude: nycConfig.exclude, - // Make sure this is true unless explicitly set to `false`. `undefined` is still `true`. - excludeNodeModules: nycConfig.excludeNodeModules !== false - }; - } else { - // fallback to loading config from key in package.json. - config = { - configKey: 'nyc', - configPath: (0, _path.dirname)(findUp.sync('package.json', { - cwd - })) - }; - } - - exclude = testExclude(Object.assign({ - cwd - }, config)); - } - - return !exclude.shouldInstrument(file); - }; -} - -var _default = (0, _helperPluginUtils.declare)(api => { - api.assertVersion(7); - const t = api.types; - const shouldSkip = makeShouldSkip(); - return { - visitor: { - Program: { - enter(path) { - this.__dv__ = null; - const realPath = getRealpath(this.file.opts.filename); - - if (shouldSkip(realPath, this.opts)) { - return; - } - - let { - inputSourceMap - } = this.opts; - - if (this.opts.useInlineSourceMaps !== false) { - if (!inputSourceMap && this.file.inputMap) { - inputSourceMap = this.file.inputMap.sourcemap; - } - } - - this.__dv__ = (0, _istanbulLibInstrument.programVisitor)(t, realPath, { - coverageVariable: '__coverage__', - inputSourceMap - }); - - this.__dv__.enter(path); - }, - - exit(path) { - if (!this.__dv__) { - return; - } - - const result = this.__dv__.exit(path); - - if (this.opts.onCover) { - this.opts.onCover(getRealpath(this.file.opts.filename), result.fileCoverage); - } - } - - } - } - }; -}); - -exports.default = _default; \ No newline at end of file diff --git a/node_modules/babel-plugin-istanbul/package.json b/node_modules/babel-plugin-istanbul/package.json deleted file mode 100644 index 24ac9d23..00000000 --- a/node_modules/babel-plugin-istanbul/package.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "_args": [ - [ - "babel-plugin-istanbul@5.2.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "babel-plugin-istanbul@5.2.0", - "_id": "babel-plugin-istanbul@5.2.0", - "_inBundle": false, - "_integrity": "sha512-5LphC0USA8t4i1zCtjbbNb6jJj/9+X6P37Qfirc/70EQ34xKlMW+a1RHGwxGI+SwWpNwZ27HqvzAobeqaXwiZw==", - "_location": "/babel-plugin-istanbul", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "babel-plugin-istanbul@5.2.0", - "name": "babel-plugin-istanbul", - "escapedName": "babel-plugin-istanbul", - "rawSpec": "5.2.0", - "saveSpec": null, - "fetchSpec": "5.2.0" - }, - "_requiredBy": [ - "/@jest/transform", - "/babel-jest" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz", - "_spec": "5.2.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Thai Pangsakulyanont @dtinth" - }, - "bugs": { - "url": "https://github.com/istanbuljs/babel-plugin-istanbul/issues" - }, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "find-up": "^3.0.0", - "istanbul-lib-instrument": "^3.3.0", - "test-exclude": "^5.2.3" - }, - "description": "A babel plugin that adds istanbul instrumentation to ES6 code", - "devDependencies": { - "@babel/cli": "^7.4.3", - "@babel/core": "^7.4.3", - "@babel/plugin-transform-modules-commonjs": "^7.4.3", - "@babel/register": "^7.4.0", - "chai": "^4.2.0", - "coveralls": "^3.0.3", - "cross-env": "^5.2.0", - "mocha": "^6.1.4", - "nyc": "^14.1.0", - "pmock": "^0.2.3", - "standard": "^12.0.1", - "standard-version": "^6.0.1" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/istanbuljs/babel-plugin-istanbul#readme", - "keywords": [ - "istanbul", - "babel", - "plugin", - "instrumentation" - ], - "license": "BSD-3-Clause", - "main": "lib/index.js", - "name": "babel-plugin-istanbul", - "nyc": { - "include": [ - "src/*.js", - "fixtures/should-cover.js" - ], - "require": [ - "@babel/register" - ], - "sourceMap": false, - "instrument": false - }, - "repository": { - "type": "git", - "url": "git+https://github.com/istanbuljs/babel-plugin-istanbul.git" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "prepublish": "npm test && npm run release", - "pretest": "standard && npm run release", - "release": "babel src --out-dir lib", - "test": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha test/*.js", - "version": "standard-version" - }, - "standard": { - "ignore": [ - "fixtures/has-inline-source-map.js" - ] - }, - "version": "5.2.0" -} diff --git a/node_modules/babel-plugin-jest-hoist/LICENSE b/node_modules/babel-plugin-jest-hoist/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/babel-plugin-jest-hoist/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/babel-plugin-jest-hoist/README.md b/node_modules/babel-plugin-jest-hoist/README.md deleted file mode 100644 index 15c1b181..00000000 --- a/node_modules/babel-plugin-jest-hoist/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# babel-plugin-jest-hoist - -Babel plugin to hoist `jest.disableAutomock`, `jest.enableAutomock`, `jest.unmock`, `jest.mock`, calls above `import` statements. This plugin is automatically included when using [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest). - -## Installation - -```sh -$ yarn add --dev babel-plugin-jest-hoist -``` - -## Usage - -### Via `babel.config.js` (Recommended) - -```js -module.exports = { - plugins: ['jest-hoist'], -}; -``` - -### Via CLI - -```sh -$ babel --plugins jest-hoist script.js -``` - -### Via Node API - -```javascript -require('@babel/core').transform('code', { - plugins: ['jest-hoist'], -}); -``` diff --git a/node_modules/babel-plugin-jest-hoist/build/index.d.ts b/node_modules/babel-plugin-jest-hoist/build/index.d.ts deleted file mode 100644 index bbfe1448..00000000 --- a/node_modules/babel-plugin-jest-hoist/build/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { Visitor } from '@babel/traverse'; -declare const _default: () => { - visitor: Visitor<{}>; -}; -export = _default; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/babel-plugin-jest-hoist/build/index.d.ts.map b/node_modules/babel-plugin-jest-hoist/build/index.d.ts.map deleted file mode 100644 index 109d5160..00000000 --- a/node_modules/babel-plugin-jest-hoist/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAW,OAAO,EAAC,MAAM,iBAAiB,CAAC;;;;AAmJlD,kBA8BE"} \ No newline at end of file diff --git a/node_modules/babel-plugin-jest-hoist/build/index.js b/node_modules/babel-plugin-jest-hoist/build/index.js deleted file mode 100644 index 006f3af6..00000000 --- a/node_modules/babel-plugin-jest-hoist/build/index.js +++ /dev/null @@ -1,208 +0,0 @@ -'use strict'; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -// Only used for types -// eslint-disable-next-line -// eslint-disable-next-line -const invariant = (condition, message) => { - if (!condition) { - throw new Error('babel-plugin-jest-hoist: ' + message); - } -}; // We allow `jest`, `expect`, `require`, all default Node.js globals and all -// ES2015 built-ins to be used inside of a `jest.mock` factory. -// We also allow variables prefixed with `mock` as an escape-hatch. - -const WHITELISTED_IDENTIFIERS = new Set([ - 'Array', - 'ArrayBuffer', - 'Boolean', - 'DataView', - 'Date', - 'Error', - 'EvalError', - 'Float32Array', - 'Float64Array', - 'Function', - 'Generator', - 'GeneratorFunction', - 'Infinity', - 'Int16Array', - 'Int32Array', - 'Int8Array', - 'InternalError', - 'Intl', - 'JSON', - 'Map', - 'Math', - 'NaN', - 'Number', - 'Object', - 'Promise', - 'Proxy', - 'RangeError', - 'ReferenceError', - 'Reflect', - 'RegExp', - 'Set', - 'String', - 'Symbol', - 'SyntaxError', - 'TypeError', - 'URIError', - 'Uint16Array', - 'Uint32Array', - 'Uint8Array', - 'Uint8ClampedArray', - 'WeakMap', - 'WeakSet', - 'arguments', - 'console', - 'expect', - 'isNaN', - 'jest', - 'parseFloat', - 'parseInt', - 'require', - 'undefined' -]); -Object.getOwnPropertyNames(global).forEach(name => { - WHITELISTED_IDENTIFIERS.add(name); -}); -const JEST_GLOBAL = { - name: 'jest' -}; // TODO: Should be Visitor<{ids: Set>}>, but `ReferencedIdentifier` doesn't exist - -const IDVisitor = { - ReferencedIdentifier(path) { - // @ts-ignore: passed as Visitor State - this.ids.add(path); - }, - - blacklist: ['TypeAnnotation', 'TSTypeAnnotation', 'TSTypeReference'] -}; -const FUNCTIONS = Object.create(null); - -FUNCTIONS.mock = args => { - if (args.length === 1) { - return args[0].isStringLiteral() || args[0].isLiteral(); - } else if (args.length === 2 || args.length === 3) { - const moduleFactory = args[1]; - invariant( - moduleFactory.isFunction(), - 'The second argument of `jest.mock` must be an inline function.' - ); - const ids = new Set(); - const parentScope = moduleFactory.parentPath.scope; // @ts-ignore: Same as above: ReferencedIdentifier doesn't exist - - moduleFactory.traverse(IDVisitor, { - ids - }); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = ids[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const id = _step.value; - const name = id.node.name; - let found = false; - let scope = id.scope; - - while (scope !== parentScope) { - if (scope.bindings[name]) { - found = true; - break; - } - - scope = scope.parent; - } - - if (!found) { - invariant( - (scope.hasGlobal(name) && WHITELISTED_IDENTIFIERS.has(name)) || - /^mock/i.test(name) || // Allow istanbul's coverage variable to pass. - /^(?:__)?cov/.test(name), - 'The module factory of `jest.mock()` is not allowed to ' + - 'reference any out-of-scope variables.\n' + - 'Invalid variable access: ' + - name + - '\n' + - 'Whitelisted objects: ' + - Array.from(WHITELISTED_IDENTIFIERS).join(', ') + - '.\n' + - 'Note: This is a precaution to guard against uninitialized mock ' + - 'variables. If it is ensured that the mock is required lazily, ' + - 'variable names prefixed with `mock` (case insensitive) are permitted.' - ); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - return true; - } - - return false; -}; - -FUNCTIONS.unmock = args => args.length === 1 && args[0].isStringLiteral(); - -FUNCTIONS.deepUnmock = args => args.length === 1 && args[0].isStringLiteral(); - -FUNCTIONS.disableAutomock = FUNCTIONS.enableAutomock = args => - args.length === 0; - -module.exports = () => { - const shouldHoistExpression = expr => { - if (!expr.isCallExpression()) { - return false; - } - - const callee = expr.get('callee'); - const expressionArguments = expr.get('arguments'); // TODO: avoid type casts - the types can be arrays (is it possible to ignore that without casting?) - - const object = callee.get('object'); - const property = callee.get('property'); - return ( - property.isIdentifier() && - FUNCTIONS[property.node.name] && - (object.isIdentifier(JEST_GLOBAL) || - (callee.isMemberExpression() && shouldHoistExpression(object))) && - FUNCTIONS[property.node.name](expressionArguments) - ); - }; - - const visitor = { - ExpressionStatement(path) { - if (shouldHoistExpression(path.get('expression'))) { - // @ts-ignore: private, magical property - path.node._blockHoist = Infinity; - } - } - }; - return { - visitor - }; -}; diff --git a/node_modules/babel-plugin-jest-hoist/package.json b/node_modules/babel-plugin-jest-hoist/package.json deleted file mode 100644 index 54c8b1bd..00000000 --- a/node_modules/babel-plugin-jest-hoist/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_args": [ - [ - "babel-plugin-jest-hoist@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "babel-plugin-jest-hoist@24.9.0", - "_id": "babel-plugin-jest-hoist@24.9.0", - "_inBundle": false, - "_integrity": "sha512-2EMA2P8Vp7lG0RAzr4HXqtYwacfMErOuv1U3wrvxHX6rD1sV6xS3WXG3r8TRQ2r6w8OhvSdWt+z41hQNwNm3Xw==", - "_location": "/babel-plugin-jest-hoist", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "babel-plugin-jest-hoist@24.9.0", - "name": "babel-plugin-jest-hoist", - "escapedName": "babel-plugin-jest-hoist", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/babel-preset-jest" - ], - "_resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@types/babel__traverse": "^7.0.6" - }, - "description": "Babel plugin to hoist `jest.disableAutomock`, `jest.enableAutomock`, `jest.unmock`, `jest.mock`, calls above `import` statements. This plugin is automatically included when using [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest).", - "devDependencies": { - "@babel/types": "^7.3.3" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "babel-plugin-jest-hoist", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/babel-plugin-jest-hoist" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/babel-preset-jest/LICENSE b/node_modules/babel-preset-jest/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/babel-preset-jest/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/babel-preset-jest/README.md b/node_modules/babel-preset-jest/README.md deleted file mode 100644 index b0f085f6..00000000 --- a/node_modules/babel-preset-jest/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# babel-preset-jest - -> Babel preset for all Jest plugins. This preset is automatically included when using [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest). - -## Install - -```sh -$ npm install --save-dev babel-preset-jest -``` - -## Usage - -### Via `babel.config.js` (Recommended) - -```js -module.exports = { - presets: ['jest'], -}; -``` - -### Via CLI - -```sh -$ babel script.js --presets jest -``` - -### Via Node API - -```javascript -require('@babel/core').transform('code', { - presets: ['jest'], -}); -``` diff --git a/node_modules/babel-preset-jest/index.js b/node_modules/babel-preset-jest/index.js deleted file mode 100644 index 3a6e9a89..00000000 --- a/node_modules/babel-preset-jest/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -module.exports = () => ({ - plugins: [ - require.resolve('babel-plugin-jest-hoist'), - require.resolve('@babel/plugin-syntax-object-rest-spread'), - ], -}); diff --git a/node_modules/babel-preset-jest/package.json b/node_modules/babel-preset-jest/package.json deleted file mode 100644 index f0971e56..00000000 --- a/node_modules/babel-preset-jest/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_args": [ - [ - "babel-preset-jest@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "babel-preset-jest@24.9.0", - "_id": "babel-preset-jest@24.9.0", - "_inBundle": false, - "_integrity": "sha512-izTUuhE4TMfTRPF92fFwD2QfdXaZW08qvWTFCI51V8rW5x00UuPgc3ajRoWofXOuxjfcOM5zzSYsQS3H8KGCAg==", - "_location": "/babel-preset-jest", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "babel-preset-jest@24.9.0", - "name": "babel-preset-jest", - "escapedName": "babel-preset-jest", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/babel-jest" - ], - "_resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@babel/plugin-syntax-object-rest-spread": "^7.0.0", - "babel-plugin-jest-hoist": "^24.9.0" - }, - "description": "> Babel preset for all Jest plugins. This preset is automatically included when using [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest).", - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "index.js", - "name": "babel-preset-jest", - "peerDependencies": { - "@babel/core": "^7.0.0" - }, - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/babel-preset-jest" - }, - "version": "24.9.0" -} diff --git a/node_modules/balanced-match/.npmignore b/node_modules/balanced-match/.npmignore deleted file mode 100644 index ae5d8c36..00000000 --- a/node_modules/balanced-match/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -test -.gitignore -.travis.yml -Makefile -example.js diff --git a/node_modules/balanced-match/LICENSE.md b/node_modules/balanced-match/LICENSE.md deleted file mode 100644 index 2cdc8e41..00000000 --- a/node_modules/balanced-match/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/balanced-match/README.md b/node_modules/balanced-match/README.md deleted file mode 100644 index 08e918c0..00000000 --- a/node_modules/balanced-match/README.md +++ /dev/null @@ -1,91 +0,0 @@ -# balanced-match - -Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! - -[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) -[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) - -[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) - -## Example - -Get the first matching pair of braces: - -```js -var balanced = require('balanced-match'); - -console.log(balanced('{', '}', 'pre{in{nested}}post')); -console.log(balanced('{', '}', 'pre{first}between{second}post')); -console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); -``` - -The matches are: - -```bash -$ node example.js -{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } -{ start: 3, - end: 9, - pre: 'pre', - body: 'first', - post: 'between{second}post' } -{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } -``` - -## API - -### var m = balanced(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -object with those keys: - -* **start** the index of the first match of `a` -* **end** the index of the matching `b` -* **pre** the preamble, `a` and `b` not included -* **body** the match, `a` and `b` not included -* **post** the postscript, `a` and `b` not included - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. - -### var r = balanced.range(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -array with indexes: `[ , ]`. - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install balanced-match -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/balanced-match/index.js b/node_modules/balanced-match/index.js deleted file mode 100644 index 1685a762..00000000 --- a/node_modules/balanced-match/index.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; - } - - if (begs.length) { - result = [ left, right ]; - } - } - - return result; -} diff --git a/node_modules/balanced-match/package.json b/node_modules/balanced-match/package.json deleted file mode 100644 index 8cd69a69..00000000 --- a/node_modules/balanced-match/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_args": [ - [ - "balanced-match@1.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "balanced-match@1.0.0", - "_id": "balanced-match@1.0.0", - "_inBundle": false, - "_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "_location": "/balanced-match", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "balanced-match@1.0.0", - "name": "balanced-match", - "escapedName": "balanced-match", - "rawSpec": "1.0.0", - "saveSpec": null, - "fetchSpec": "1.0.0" - }, - "_requiredBy": [ - "/brace-expansion" - ], - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/balanced-match/issues" - }, - "dependencies": {}, - "description": "Match balanced character pairs, like \"{\" and \"}\"", - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "homepage": "https://github.com/juliangruber/balanced-match", - "keywords": [ - "match", - "regexp", - "test", - "balanced", - "parse" - ], - "license": "MIT", - "main": "index.js", - "name": "balanced-match", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/balanced-match.git" - }, - "scripts": { - "bench": "make bench", - "test": "make test" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.0.0" -} diff --git a/node_modules/base/LICENSE b/node_modules/base/LICENSE deleted file mode 100644 index e33d14b7..00000000 --- a/node_modules/base/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2017, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/base/README.md b/node_modules/base/README.md deleted file mode 100644 index c77cdaf9..00000000 --- a/node_modules/base/README.md +++ /dev/null @@ -1,491 +0,0 @@ -

- - - -

- -# base [![NPM version](https://img.shields.io/npm/v/base.svg?style=flat)](https://www.npmjs.com/package/base) [![NPM monthly downloads](https://img.shields.io/npm/dm/base.svg?style=flat)](https://npmjs.org/package/base) [![NPM total downloads](https://img.shields.io/npm/dt/base.svg?style=flat)](https://npmjs.org/package/base) [![Linux Build Status](https://img.shields.io/travis/node-base/base.svg?style=flat&label=Travis)](https://travis-ci.org/node-base/base) - -> base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save base -``` - -## What is Base? - -Base is a framework for rapidly creating high quality node.js applications, using plugins like building blocks. - -### Guiding principles - -The core team follows these principles to help guide API decisions: - -* **Compact API surface**: The smaller the API surface, the easier the library will be to learn and use. -* **Easy to extend**: Implementors can use any npm package, and write plugins in pure JavaScript. If you're building complex apps, Base simplifies inheritance. -* **Easy to test**: No special setup should be required to unit test `Base` or base plugins - -### Minimal API surface - -[The API](#api) was designed to provide only the minimum necessary functionality for creating a useful application, with or without [plugins](#plugins). - -**Base core** - -Base itself ships with only a handful of [useful methods](#api), such as: - -* `.set`: for setting values on the instance -* `.get`: for getting values from the instance -* `.has`: to check if a property exists on the instance -* `.define`: for setting non-enumerable values on the instance -* `.use`: for adding plugins - -**Be generic** - -When deciding on method to add or remove, we try to answer these questions: - -1. Will all or most Base applications need this method? -2. Will this method encourage practices or enforce conventions that are beneficial to implementors? -3. Can or should this be done in a plugin instead? - -### Composability - -**Plugin system** - -It couldn't be easier to extend Base with any features or custom functionality you can think of. - -Base plugins are just functions that take an instance of `Base`: - -```js -var base = new Base(); - -function plugin(base) { - // do plugin stuff, in pure JavaScript -} -// use the plugin -base.use(plugin); -``` - -**Inheritance** - -Easily inherit Base using `.extend`: - -```js -var Base = require('base'); - -function MyApp() { - Base.call(this); -} -Base.extend(MyApp); - -var app = new MyApp(); -app.set('a', 'b'); -app.get('a'); -//=> 'b'; -``` - -**Inherit or instantiate with a namespace** - -By default, the `.get`, `.set` and `.has` methods set and get values from the root of the `base` instance. You can customize this using the `.namespace` method exposed on the exported function. For example: - -```js -var Base = require('base'); -// get and set values on the `base.cache` object -var base = Base.namespace('cache'); - -var app = base(); -app.set('foo', 'bar'); -console.log(app.cache.foo); -//=> 'bar' -``` - -## API - -**Usage** - -```js -var Base = require('base'); -var app = new Base(); -app.set('foo', 'bar'); -console.log(app.foo); -//=> 'bar' -``` - -### [Base](index.js#L44) - -Create an instance of `Base` with the given `config` and `options`. - -**Params** - -* `config` **{Object}**: If supplied, this object is passed to [cache-base](https://github.com/jonschlinkert/cache-base) to merge onto the the instance upon instantiation. -* `options` **{Object}**: If supplied, this object is used to initialize the `base.options` object. - -**Example** - -```js -// initialize with `config` and `options` -var app = new Base({isApp: true}, {abc: true}); -app.set('foo', 'bar'); - -// values defined with the given `config` object will be on the root of the instance -console.log(app.baz); //=> undefined -console.log(app.foo); //=> 'bar' -// or use `.get` -console.log(app.get('isApp')); //=> true -console.log(app.get('foo')); //=> 'bar' - -// values defined with the given `options` object will be on `app.options -console.log(app.options.abc); //=> true -``` - -### [.is](index.js#L107) - -Set the given `name` on `app._name` and `app.is*` properties. Used for doing lookups in plugins. - -**Params** - -* `name` **{String}** -* `returns` **{Boolean}** - -**Example** - -```js -app.is('foo'); -console.log(app._name); -//=> 'foo' -console.log(app.isFoo); -//=> true -app.is('bar'); -console.log(app.isFoo); -//=> true -console.log(app.isBar); -//=> true -console.log(app._name); -//=> 'bar' -``` - -### [.isRegistered](index.js#L145) - -Returns true if a plugin has already been registered on an instance. - -Plugin implementors are encouraged to use this first thing in a plugin -to prevent the plugin from being called more than once on the same -instance. - -**Params** - -* `name` **{String}**: The plugin name. -* `register` **{Boolean}**: If the plugin if not already registered, to record it as being registered pass `true` as the second argument. -* `returns` **{Boolean}**: Returns true if a plugin is already registered. - -**Events** - -* `emits`: `plugin` Emits the name of the plugin being registered. Useful for unit tests, to ensure plugins are only registered once. - -**Example** - -```js -var base = new Base(); -base.use(function(app) { - if (app.isRegistered('myPlugin')) return; - // do stuff to `app` -}); - -// to also record the plugin as being registered -base.use(function(app) { - if (app.isRegistered('myPlugin', true)) return; - // do stuff to `app` -}); -``` - -### [.use](index.js#L175) - -Define a plugin function to be called immediately upon init. Plugins are chainable and expose the following arguments to the plugin function: - -* `app`: the current instance of `Base` -* `base`: the [first ancestor instance](#base) of `Base` - -**Params** - -* `fn` **{Function}**: plugin function to call -* `returns` **{Object}**: Returns the item instance for chaining. - -**Example** - -```js -var app = new Base() - .use(foo) - .use(bar) - .use(baz) -``` - -### [.define](index.js#L197) - -The `.define` method is used for adding non-enumerable property on the instance. Dot-notation is **not supported** with `define`. - -**Params** - -* `key` **{String}**: The name of the property to define. -* `value` **{any}** -* `returns` **{Object}**: Returns the instance for chaining. - -**Example** - -```js -// arbitrary `render` function using lodash `template` -app.define('render', function(str, locals) { - return _.template(str)(locals); -}); -``` - -### [.mixin](index.js#L222) - -Mix property `key` onto the Base prototype. If base is inherited using `Base.extend` this method will be overridden by a new `mixin` method that will only add properties to the prototype of the inheriting application. - -**Params** - -* `key` **{String}** -* `val` **{Object|Array}** -* `returns` **{Object}**: Returns the `base` instance for chaining. - -**Example** - -```js -app.mixin('foo', function() { - // do stuff -}); -``` - -### [.base](index.js#L268) - -Getter/setter used when creating nested instances of `Base`, for storing a reference to the first ancestor instance. This works by setting an instance of `Base` on the `parent` property of a "child" instance. The `base` property defaults to the current instance if no `parent` property is defined. - -**Example** - -```js -// create an instance of `Base`, this is our first ("base") instance -var first = new Base(); -first.foo = 'bar'; // arbitrary property, to make it easier to see what's happening later - -// create another instance -var second = new Base(); -// create a reference to the first instance (`first`) -second.parent = first; - -// create another instance -var third = new Base(); -// create a reference to the previous instance (`second`) -// repeat this pattern every time a "child" instance is created -third.parent = second; - -// we can always access the first instance using the `base` property -console.log(first.base.foo); -//=> 'bar' -console.log(second.base.foo); -//=> 'bar' -console.log(third.base.foo); -//=> 'bar' -// and now you know how to get to third base ;) -``` - -### [#use](index.js#L293) - -Static method for adding global plugin functions that will be added to an instance when created. - -**Params** - -* `fn` **{Function}**: Plugin function to use on each instance. -* `returns` **{Object}**: Returns the `Base` constructor for chaining - -**Example** - -```js -Base.use(function(app) { - app.foo = 'bar'; -}); -var app = new Base(); -console.log(app.foo); -//=> 'bar' -``` - -### [#extend](index.js#L337) - -Static method for inheriting the prototype and static methods of the `Base` class. This method greatly simplifies the process of creating inheritance-based applications. See [static-extend](https://github.com/jonschlinkert/static-extend) for more details. - -**Params** - -* `Ctor` **{Function}**: constructor to extend -* `methods` **{Object}**: Optional prototype properties to mix in. -* `returns` **{Object}**: Returns the `Base` constructor for chaining - -**Example** - -```js -var extend = cu.extend(Parent); -Parent.extend(Child); - -// optional methods -Parent.extend(Child, { - foo: function() {}, - bar: function() {} -}); -``` - -### [#mixin](index.js#L379) - -Used for adding methods to the `Base` prototype, and/or to the prototype of child instances. When a mixin function returns a function, the returned function is pushed onto the `.mixins` array, making it available to be used on inheriting classes whenever `Base.mixins()` is called (e.g. `Base.mixins(Child)`). - -**Params** - -* `fn` **{Function}**: Function to call -* `returns` **{Object}**: Returns the `Base` constructor for chaining - -**Example** - -```js -Base.mixin(function(proto) { - proto.foo = function(msg) { - return 'foo ' + msg; - }; -}); -``` - -### [#mixins](index.js#L401) - -Static method for running global mixin functions against a child constructor. Mixins must be registered before calling this method. - -**Params** - -* `Child` **{Function}**: Constructor function of a child class -* `returns` **{Object}**: Returns the `Base` constructor for chaining - -**Example** - -```js -Base.extend(Child); -Base.mixins(Child); -``` - -### [#inherit](index.js#L420) - -Similar to `util.inherit`, but copies all static properties, prototype properties, and getters/setters from `Provider` to `Receiver`. See [class-utils](https://github.com/jonschlinkert/class-utils#inherit) for more details. - -**Params** - -* `Receiver` **{Function}**: Receiving (child) constructor -* `Provider` **{Function}**: Providing (parent) constructor -* `returns` **{Object}**: Returns the `Base` constructor for chaining - -**Example** - -```js -Base.inherit(Foo, Bar); -``` - -## In the wild - -The following node.js applications were built with `Base`: - -* [assemble](https://github.com/assemble/assemble) -* [verb](https://github.com/verbose/verb) -* [generate](https://github.com/generate/generate) -* [scaffold](https://github.com/jonschlinkert/scaffold) -* [boilerplate](https://github.com/jonschlinkert/boilerplate) - -## Test coverage - -``` -Statements : 98.91% ( 91/92 ) -Branches : 92.86% ( 26/28 ) -Functions : 100% ( 17/17 ) -Lines : 98.9% ( 90/91 ) -``` - -## History - -### v0.11.2 - -* fixes https://github.com/micromatch/micromatch/issues/99 - -### v0.11.0 - -**Breaking changes** - -* Static `.use` and `.run` methods are now non-enumerable - -### v0.9.0 - -**Breaking changes** - -* `.is` no longer takes a function, a string must be passed -* all remaining `.debug` code has been removed -* `app._namespace` was removed (related to `debug`) -* `.plugin`, `.use`, and `.define` no longer emit events -* `.assertPlugin` was removed -* `.lazy` was removed - -## About - -### Related projects - -* [base-cwd](https://www.npmjs.com/package/base-cwd): Base plugin that adds a getter/setter for the current working directory. | [homepage](https://github.com/node-base/base-cwd "Base plugin that adds a getter/setter for the current working directory.") -* [base-data](https://www.npmjs.com/package/base-data): adds a `data` method to base-methods. | [homepage](https://github.com/node-base/base-data "adds a `data` method to base-methods.") -* [base-fs](https://www.npmjs.com/package/base-fs): base-methods plugin that adds vinyl-fs methods to your 'base' application for working with the file… [more](https://github.com/node-base/base-fs) | [homepage](https://github.com/node-base/base-fs "base-methods plugin that adds vinyl-fs methods to your 'base' application for working with the file system, like src, dest, copy and symlink.") -* [base-generators](https://www.npmjs.com/package/base-generators): Adds project-generator support to your `base` application. | [homepage](https://github.com/node-base/base-generators "Adds project-generator support to your `base` application.") -* [base-option](https://www.npmjs.com/package/base-option): Adds a few options methods to base, like `option`, `enable` and `disable`. See the readme… [more](https://github.com/node-base/base-option) | [homepage](https://github.com/node-base/base-option "Adds a few options methods to base, like `option`, `enable` and `disable`. See the readme for the full API.") -* [base-pipeline](https://www.npmjs.com/package/base-pipeline): base-methods plugin that adds pipeline and plugin methods for dynamically composing streaming plugin pipelines. | [homepage](https://github.com/node-base/base-pipeline "base-methods plugin that adds pipeline and plugin methods for dynamically composing streaming plugin pipelines.") -* [base-pkg](https://www.npmjs.com/package/base-pkg): Plugin for adding a `pkg` method that exposes pkg-store to your base application. | [homepage](https://github.com/node-base/base-pkg "Plugin for adding a `pkg` method that exposes pkg-store to your base application.") -* [base-plugins](https://www.npmjs.com/package/base-plugins): Adds 'smart plugin' support to your base application. | [homepage](https://github.com/node-base/base-plugins "Adds 'smart plugin' support to your base application.") -* [base-questions](https://www.npmjs.com/package/base-questions): Plugin for base-methods that adds methods for prompting the user and storing the answers on… [more](https://github.com/node-base/base-questions) | [homepage](https://github.com/node-base/base-questions "Plugin for base-methods that adds methods for prompting the user and storing the answers on a project-by-project basis.") -* [base-store](https://www.npmjs.com/package/base-store): Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object… [more](https://github.com/node-base/base-store) | [homepage](https://github.com/node-base/base-store "Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object that exposes all of the methods from the data-store library. Also now supports sub-stores!") -* [base-task](https://www.npmjs.com/package/base-task): base plugin that provides a very thin wrapper around [https://github.com/doowb/composer](https://github.com/doowb/composer) for adding task methods to… [more](https://github.com/node-base/base-task) | [homepage](https://github.com/node-base/base-task "base plugin that provides a very thin wrapper around for adding task methods to your application.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 141 | [jonschlinkert](https://github.com/jonschlinkert) | -| 30 | [doowb](https://github.com/doowb) | -| 3 | [charlike](https://github.com/charlike) | -| 1 | [criticalmash](https://github.com/criticalmash) | -| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on September 07, 2017._ \ No newline at end of file diff --git a/node_modules/base/index.js b/node_modules/base/index.js deleted file mode 100644 index fb680481..00000000 --- a/node_modules/base/index.js +++ /dev/null @@ -1,435 +0,0 @@ -'use strict'; - -var util = require('util'); -var define = require('define-property'); -var CacheBase = require('cache-base'); -var Emitter = require('component-emitter'); -var isObject = require('isobject'); -var merge = require('mixin-deep'); -var pascal = require('pascalcase'); -var cu = require('class-utils'); - -/** - * Optionally define a custom `cache` namespace to use. - */ - -function namespace(name) { - var Cache = name ? CacheBase.namespace(name) : CacheBase; - var fns = []; - - /** - * Create an instance of `Base` with the given `config` and `options`. - * - * ```js - * // initialize with `config` and `options` - * var app = new Base({isApp: true}, {abc: true}); - * app.set('foo', 'bar'); - * - * // values defined with the given `config` object will be on the root of the instance - * console.log(app.baz); //=> undefined - * console.log(app.foo); //=> 'bar' - * // or use `.get` - * console.log(app.get('isApp')); //=> true - * console.log(app.get('foo')); //=> 'bar' - * - * // values defined with the given `options` object will be on `app.options - * console.log(app.options.abc); //=> true - * ``` - * - * @param {Object} `config` If supplied, this object is passed to [cache-base][] to merge onto the the instance upon instantiation. - * @param {Object} `options` If supplied, this object is used to initialize the `base.options` object. - * @api public - */ - - function Base(config, options) { - if (!(this instanceof Base)) { - return new Base(config, options); - } - Cache.call(this, config); - this.is('base'); - this.initBase(config, options); - } - - /** - * Inherit cache-base - */ - - util.inherits(Base, Cache); - - /** - * Add static emitter methods - */ - - Emitter(Base); - - /** - * Initialize `Base` defaults with the given `config` object - */ - - Base.prototype.initBase = function(config, options) { - this.options = merge({}, this.options, options); - this.cache = this.cache || {}; - this.define('registered', {}); - if (name) this[name] = {}; - - // make `app._callbacks` non-enumerable - this.define('_callbacks', this._callbacks); - if (isObject(config)) { - this.visit('set', config); - } - Base.run(this, 'use', fns); - }; - - /** - * Set the given `name` on `app._name` and `app.is*` properties. Used for doing - * lookups in plugins. - * - * ```js - * app.is('foo'); - * console.log(app._name); - * //=> 'foo' - * console.log(app.isFoo); - * //=> true - * app.is('bar'); - * console.log(app.isFoo); - * //=> true - * console.log(app.isBar); - * //=> true - * console.log(app._name); - * //=> 'bar' - * ``` - * @name .is - * @param {String} `name` - * @return {Boolean} - * @api public - */ - - Base.prototype.is = function(name) { - if (typeof name !== 'string') { - throw new TypeError('expected name to be a string'); - } - this.define('is' + pascal(name), true); - this.define('_name', name); - this.define('_appname', name); - return this; - }; - - /** - * Returns true if a plugin has already been registered on an instance. - * - * Plugin implementors are encouraged to use this first thing in a plugin - * to prevent the plugin from being called more than once on the same - * instance. - * - * ```js - * var base = new Base(); - * base.use(function(app) { - * if (app.isRegistered('myPlugin')) return; - * // do stuff to `app` - * }); - * - * // to also record the plugin as being registered - * base.use(function(app) { - * if (app.isRegistered('myPlugin', true)) return; - * // do stuff to `app` - * }); - * ``` - * @name .isRegistered - * @emits `plugin` Emits the name of the plugin being registered. Useful for unit tests, to ensure plugins are only registered once. - * @param {String} `name` The plugin name. - * @param {Boolean} `register` If the plugin if not already registered, to record it as being registered pass `true` as the second argument. - * @return {Boolean} Returns true if a plugin is already registered. - * @api public - */ - - Base.prototype.isRegistered = function(name, register) { - if (this.registered.hasOwnProperty(name)) { - return true; - } - if (register !== false) { - this.registered[name] = true; - this.emit('plugin', name); - } - return false; - }; - - /** - * Define a plugin function to be called immediately upon init. Plugins are chainable - * and expose the following arguments to the plugin function: - * - * - `app`: the current instance of `Base` - * - `base`: the [first ancestor instance](#base) of `Base` - * - * ```js - * var app = new Base() - * .use(foo) - * .use(bar) - * .use(baz) - * ``` - * @name .use - * @param {Function} `fn` plugin function to call - * @return {Object} Returns the item instance for chaining. - * @api public - */ - - Base.prototype.use = function(fn) { - fn.call(this, this); - return this; - }; - - /** - * The `.define` method is used for adding non-enumerable property on the instance. - * Dot-notation is **not supported** with `define`. - * - * ```js - * // arbitrary `render` function using lodash `template` - * app.define('render', function(str, locals) { - * return _.template(str)(locals); - * }); - * ``` - * @name .define - * @param {String} `key` The name of the property to define. - * @param {any} `value` - * @return {Object} Returns the instance for chaining. - * @api public - */ - - Base.prototype.define = function(key, val) { - if (isObject(key)) { - return this.visit('define', key); - } - define(this, key, val); - return this; - }; - - /** - * Mix property `key` onto the Base prototype. If base is inherited using - * `Base.extend` this method will be overridden by a new `mixin` method that will - * only add properties to the prototype of the inheriting application. - * - * ```js - * app.mixin('foo', function() { - * // do stuff - * }); - * ``` - * @name .mixin - * @param {String} `key` - * @param {Object|Array} `val` - * @return {Object} Returns the `base` instance for chaining. - * @api public - */ - - Base.prototype.mixin = function(key, val) { - Base.prototype[key] = val; - return this; - }; - - /** - * Non-enumberable mixin array, used by the static [Base.mixin]() method. - */ - - Base.prototype.mixins = Base.prototype.mixins || []; - - /** - * Getter/setter used when creating nested instances of `Base`, for storing a reference - * to the first ancestor instance. This works by setting an instance of `Base` on the `parent` - * property of a "child" instance. The `base` property defaults to the current instance if - * no `parent` property is defined. - * - * ```js - * // create an instance of `Base`, this is our first ("base") instance - * var first = new Base(); - * first.foo = 'bar'; // arbitrary property, to make it easier to see what's happening later - * - * // create another instance - * var second = new Base(); - * // create a reference to the first instance (`first`) - * second.parent = first; - * - * // create another instance - * var third = new Base(); - * // create a reference to the previous instance (`second`) - * // repeat this pattern every time a "child" instance is created - * third.parent = second; - * - * // we can always access the first instance using the `base` property - * console.log(first.base.foo); - * //=> 'bar' - * console.log(second.base.foo); - * //=> 'bar' - * console.log(third.base.foo); - * //=> 'bar' - * // and now you know how to get to third base ;) - * ``` - * @name .base - * @api public - */ - - Object.defineProperty(Base.prototype, 'base', { - configurable: true, - get: function() { - return this.parent ? this.parent.base : this; - } - }); - - /** - * Static method for adding global plugin functions that will - * be added to an instance when created. - * - * ```js - * Base.use(function(app) { - * app.foo = 'bar'; - * }); - * var app = new Base(); - * console.log(app.foo); - * //=> 'bar' - * ``` - * @name #use - * @param {Function} `fn` Plugin function to use on each instance. - * @return {Object} Returns the `Base` constructor for chaining - * @api public - */ - - define(Base, 'use', function(fn) { - fns.push(fn); - return Base; - }); - - /** - * Run an array of functions by passing each function - * to a method on the given object specified by the given property. - * - * @param {Object} `obj` Object containing method to use. - * @param {String} `prop` Name of the method on the object to use. - * @param {Array} `arr` Array of functions to pass to the method. - */ - - define(Base, 'run', function(obj, prop, arr) { - var len = arr.length, i = 0; - while (len--) { - obj[prop](arr[i++]); - } - return Base; - }); - - /** - * Static method for inheriting the prototype and static methods of the `Base` class. - * This method greatly simplifies the process of creating inheritance-based applications. - * See [static-extend][] for more details. - * - * ```js - * var extend = cu.extend(Parent); - * Parent.extend(Child); - * - * // optional methods - * Parent.extend(Child, { - * foo: function() {}, - * bar: function() {} - * }); - * ``` - * @name #extend - * @param {Function} `Ctor` constructor to extend - * @param {Object} `methods` Optional prototype properties to mix in. - * @return {Object} Returns the `Base` constructor for chaining - * @api public - */ - - define(Base, 'extend', cu.extend(Base, function(Ctor, Parent) { - Ctor.prototype.mixins = Ctor.prototype.mixins || []; - - define(Ctor, 'mixin', function(fn) { - var mixin = fn(Ctor.prototype, Ctor); - if (typeof mixin === 'function') { - Ctor.prototype.mixins.push(mixin); - } - return Ctor; - }); - - define(Ctor, 'mixins', function(Child) { - Base.run(Child, 'mixin', Ctor.prototype.mixins); - return Ctor; - }); - - Ctor.prototype.mixin = function(key, value) { - Ctor.prototype[key] = value; - return this; - }; - return Base; - })); - - /** - * Used for adding methods to the `Base` prototype, and/or to the prototype of child instances. - * When a mixin function returns a function, the returned function is pushed onto the `.mixins` - * array, making it available to be used on inheriting classes whenever `Base.mixins()` is - * called (e.g. `Base.mixins(Child)`). - * - * ```js - * Base.mixin(function(proto) { - * proto.foo = function(msg) { - * return 'foo ' + msg; - * }; - * }); - * ``` - * @name #mixin - * @param {Function} `fn` Function to call - * @return {Object} Returns the `Base` constructor for chaining - * @api public - */ - - define(Base, 'mixin', function(fn) { - var mixin = fn(Base.prototype, Base); - if (typeof mixin === 'function') { - Base.prototype.mixins.push(mixin); - } - return Base; - }); - - /** - * Static method for running global mixin functions against a child constructor. - * Mixins must be registered before calling this method. - * - * ```js - * Base.extend(Child); - * Base.mixins(Child); - * ``` - * @name #mixins - * @param {Function} `Child` Constructor function of a child class - * @return {Object} Returns the `Base` constructor for chaining - * @api public - */ - - define(Base, 'mixins', function(Child) { - Base.run(Child, 'mixin', Base.prototype.mixins); - return Base; - }); - - /** - * Similar to `util.inherit`, but copies all static properties, prototype properties, and - * getters/setters from `Provider` to `Receiver`. See [class-utils][]{#inherit} for more details. - * - * ```js - * Base.inherit(Foo, Bar); - * ``` - * @name #inherit - * @param {Function} `Receiver` Receiving (child) constructor - * @param {Function} `Provider` Providing (parent) constructor - * @return {Object} Returns the `Base` constructor for chaining - * @api public - */ - - define(Base, 'inherit', cu.inherit); - define(Base, 'bubble', cu.bubble); - return Base; -} - -/** - * Expose `Base` with default settings - */ - -module.exports = namespace(); - -/** - * Allow users to define a namespace - */ - -module.exports.namespace = namespace; diff --git a/node_modules/base/node_modules/define-property/LICENSE b/node_modules/base/node_modules/define-property/LICENSE deleted file mode 100644 index ec85897e..00000000 --- a/node_modules/base/node_modules/define-property/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015, 2017, Jon Schlinkert - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/base/node_modules/define-property/README.md b/node_modules/base/node_modules/define-property/README.md deleted file mode 100644 index 2f1af05f..00000000 --- a/node_modules/base/node_modules/define-property/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# define-property [![NPM version](https://img.shields.io/npm/v/define-property.svg?style=flat)](https://www.npmjs.com/package/define-property) [![NPM monthly downloads](https://img.shields.io/npm/dm/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![NPM total downloads](https://img.shields.io/npm/dt/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/define-property.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/define-property) - -> Define a non-enumerable property on an object. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save define-property -``` - -Install with [yarn](https://yarnpkg.com): - -```sh -$ yarn add define-property -``` - -## Usage - -**Params** - -* `obj`: The object on which to define the property. -* `prop`: The name of the property to be defined or modified. -* `descriptor`: The descriptor for the property being defined or modified. - -```js -var define = require('define-property'); -var obj = {}; -define(obj, 'foo', function(val) { - return val.toUpperCase(); -}); - -console.log(obj); -//=> {} - -console.log(obj.foo('bar')); -//=> 'BAR' -``` - -**get/set** - -```js -define(obj, 'foo', { - get: function() {}, - set: function() {} -}); -``` - -## About - -### Related projects - -* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.") -* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.") -* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.") -* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 20, 2017._ \ No newline at end of file diff --git a/node_modules/base/node_modules/define-property/index.js b/node_modules/base/node_modules/define-property/index.js deleted file mode 100644 index 27c19ebf..00000000 --- a/node_modules/base/node_modules/define-property/index.js +++ /dev/null @@ -1,31 +0,0 @@ -/*! - * define-property - * - * Copyright (c) 2015, 2017, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -var isDescriptor = require('is-descriptor'); - -module.exports = function defineProperty(obj, prop, val) { - if (typeof obj !== 'object' && typeof obj !== 'function') { - throw new TypeError('expected an object or function.'); - } - - if (typeof prop !== 'string') { - throw new TypeError('expected `prop` to be a string.'); - } - - if (isDescriptor(val) && ('set' in val || 'get' in val)) { - return Object.defineProperty(obj, prop, val); - } - - return Object.defineProperty(obj, prop, { - configurable: true, - enumerable: false, - writable: true, - value: val - }); -}; diff --git a/node_modules/base/node_modules/define-property/package.json b/node_modules/base/node_modules/define-property/package.json deleted file mode 100644 index 5edf01fd..00000000 --- a/node_modules/base/node_modules/define-property/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - "define-property@1.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "define-property@1.0.0", - "_id": "define-property@1.0.0", - "_inBundle": false, - "_integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "_location": "/base/define-property", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "define-property@1.0.0", - "name": "define-property", - "escapedName": "define-property", - "rawSpec": "1.0.0", - "saveSpec": null, - "fetchSpec": "1.0.0" - }, - "_requiredBy": [ - "/base" - ], - "_resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/define-property/issues" - }, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "description": "Define a non-enumerable property on an object.", - "devDependencies": { - "gulp-format-md": "^0.1.12", - "mocha": "^3.2.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/define-property", - "keywords": [ - "define", - "define-property", - "enumerable", - "key", - "non", - "non-enumerable", - "object", - "prop", - "property", - "value" - ], - "license": "MIT", - "main": "index.js", - "name": "define-property", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/define-property.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "extend-shallow", - "merge-deep", - "assign-deep", - "mixin-deep" - ] - }, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - } - }, - "version": "1.0.0" -} diff --git a/node_modules/base/node_modules/is-accessor-descriptor/LICENSE b/node_modules/base/node_modules/is-accessor-descriptor/LICENSE deleted file mode 100644 index e33d14b7..00000000 --- a/node_modules/base/node_modules/is-accessor-descriptor/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2017, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/base/node_modules/is-accessor-descriptor/README.md b/node_modules/base/node_modules/is-accessor-descriptor/README.md deleted file mode 100644 index d198e1f0..00000000 --- a/node_modules/base/node_modules/is-accessor-descriptor/README.md +++ /dev/null @@ -1,144 +0,0 @@ -# is-accessor-descriptor [![NPM version](https://img.shields.io/npm/v/is-accessor-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-accessor-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-accessor-descriptor.svg?style=flat)](https://npmjs.org/package/is-accessor-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-accessor-descriptor.svg?style=flat)](https://npmjs.org/package/is-accessor-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-accessor-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-accessor-descriptor) - -> Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-accessor-descriptor -``` - -## Usage - -```js -var isAccessor = require('is-accessor-descriptor'); - -isAccessor({get: function() {}}); -//=> true -``` - -You may also pass an object and property name to check if the property is an accessor: - -```js -isAccessor(foo, 'bar'); -``` - -## Examples - -`false` when not an object - -```js -isAccessor('a') -isAccessor(null) -isAccessor([]) -//=> false -``` - -`true` when the object has valid properties - -and the properties all have the correct JavaScript types: - -```js -isAccessor({get: noop, set: noop}) -isAccessor({get: noop}) -isAccessor({set: noop}) -//=> true -``` - -`false` when the object has invalid properties - -```js -isAccessor({get: noop, set: noop, bar: 'baz'}) -isAccessor({get: noop, writable: true}) -isAccessor({get: noop, value: true}) -//=> false -``` - -`false` when an accessor is not a function - -```js -isAccessor({get: noop, set: 'baz'}) -isAccessor({get: 'foo', set: noop}) -isAccessor({get: 'foo', bar: 'baz'}) -isAccessor({get: 'foo', set: 'baz'}) -//=> false -``` - -`false` when a value is not the correct type - -```js -isAccessor({get: noop, set: noop, enumerable: 'foo'}) -isAccessor({set: noop, configurable: 'foo'}) -isAccessor({get: noop, configurable: 'foo'}) -//=> false -``` - -## About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -### Related projects - -You might also be interested in these projects: - -* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.") -* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.") -* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.") -* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") -* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 22 | [jonschlinkert](https://github.com/jonschlinkert) | -| 2 | [realityking](https://github.com/realityking) | - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 01, 2017._ \ No newline at end of file diff --git a/node_modules/base/node_modules/is-accessor-descriptor/index.js b/node_modules/base/node_modules/is-accessor-descriptor/index.js deleted file mode 100644 index d2e6fe8b..00000000 --- a/node_modules/base/node_modules/is-accessor-descriptor/index.js +++ /dev/null @@ -1,69 +0,0 @@ -/*! - * is-accessor-descriptor - * - * Copyright (c) 2015-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -var typeOf = require('kind-of'); - -// accessor descriptor properties -var accessor = { - get: 'function', - set: 'function', - configurable: 'boolean', - enumerable: 'boolean' -}; - -function isAccessorDescriptor(obj, prop) { - if (typeof prop === 'string') { - var val = Object.getOwnPropertyDescriptor(obj, prop); - return typeof val !== 'undefined'; - } - - if (typeOf(obj) !== 'object') { - return false; - } - - if (has(obj, 'value') || has(obj, 'writable')) { - return false; - } - - if (!has(obj, 'get') || typeof obj.get !== 'function') { - return false; - } - - // tldr: it's valid to have "set" be undefined - // "set" might be undefined if `Object.getOwnPropertyDescriptor` - // was used to get the value, and only `get` was defined by the user - if (has(obj, 'set') && typeof obj[key] !== 'function' && typeof obj[key] !== 'undefined') { - return false; - } - - for (var key in obj) { - if (!accessor.hasOwnProperty(key)) { - continue; - } - - if (typeOf(obj[key]) === accessor[key]) { - continue; - } - - if (typeof obj[key] !== 'undefined') { - return false; - } - } - return true; -} - -function has(obj, key) { - return {}.hasOwnProperty.call(obj, key); -} - -/** - * Expose `isAccessorDescriptor` - */ - -module.exports = isAccessorDescriptor; diff --git a/node_modules/base/node_modules/is-accessor-descriptor/package.json b/node_modules/base/node_modules/is-accessor-descriptor/package.json deleted file mode 100644 index ebb939a8..00000000 --- a/node_modules/base/node_modules/is-accessor-descriptor/package.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "_args": [ - [ - "is-accessor-descriptor@1.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "is-accessor-descriptor@1.0.0", - "_id": "is-accessor-descriptor@1.0.0", - "_inBundle": false, - "_integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "_location": "/base/is-accessor-descriptor", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "is-accessor-descriptor@1.0.0", - "name": "is-accessor-descriptor", - "escapedName": "is-accessor-descriptor", - "rawSpec": "1.0.0", - "saveSpec": null, - "fetchSpec": "1.0.0" - }, - "_requiredBy": [ - "/base/is-descriptor" - ], - "_resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-accessor-descriptor/issues" - }, - "contributors": [ - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Rouven Weßling", - "url": "www.rouvenwessling.de" - } - ], - "dependencies": { - "kind-of": "^6.0.0" - }, - "description": "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.", - "devDependencies": { - "gulp-format-md": "^1.0.0", - "mocha": "^3.5.3" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/is-accessor-descriptor", - "keywords": [ - "accessor", - "check", - "data", - "descriptor", - "get", - "getter", - "is", - "keys", - "object", - "properties", - "property", - "set", - "setter", - "type", - "valid", - "value" - ], - "license": "MIT", - "main": "index.js", - "name": "is-accessor-descriptor", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-accessor-descriptor.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "is-accessor-descriptor", - "is-data-descriptor", - "is-descriptor", - "is-plain-object", - "isobject" - ] - }, - "lint": { - "reflinks": true - } - }, - "version": "1.0.0" -} diff --git a/node_modules/base/node_modules/is-data-descriptor/LICENSE b/node_modules/base/node_modules/is-data-descriptor/LICENSE deleted file mode 100644 index e33d14b7..00000000 --- a/node_modules/base/node_modules/is-data-descriptor/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2017, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/base/node_modules/is-data-descriptor/README.md b/node_modules/base/node_modules/is-data-descriptor/README.md deleted file mode 100644 index 42b07144..00000000 --- a/node_modules/base/node_modules/is-data-descriptor/README.md +++ /dev/null @@ -1,161 +0,0 @@ -# is-data-descriptor [![NPM version](https://img.shields.io/npm/v/is-data-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-data-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-data-descriptor.svg?style=flat)](https://npmjs.org/package/is-data-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-data-descriptor.svg?style=flat)](https://npmjs.org/package/is-data-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-data-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-data-descriptor) - -> Returns true if a value has the characteristics of a valid JavaScript data descriptor. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-data-descriptor -``` - -## Usage - -```js -var isDataDesc = require('is-data-descriptor'); -``` - -## Examples - -`true` when the descriptor has valid properties with valid values. - -```js -// `value` can be anything -isDataDesc({value: 'foo'}) -isDataDesc({value: function() {}}) -isDataDesc({value: true}) -//=> true -``` - -`false` when not an object - -```js -isDataDesc('a') -//=> false -isDataDesc(null) -//=> false -isDataDesc([]) -//=> false -``` - -`false` when the object has invalid properties - -```js -isDataDesc({value: 'foo', bar: 'baz'}) -//=> false -isDataDesc({value: 'foo', bar: 'baz'}) -//=> false -isDataDesc({value: 'foo', get: function(){}}) -//=> false -isDataDesc({get: function(){}, value: 'foo'}) -//=> false -``` - -`false` when a value is not the correct type - -```js -isDataDesc({value: 'foo', enumerable: 'foo'}) -//=> false -isDataDesc({value: 'foo', configurable: 'foo'}) -//=> false -isDataDesc({value: 'foo', writable: 'foo'}) -//=> false -``` - -## Valid properties - -The only valid data descriptor properties are the following: - -* `configurable` (required) -* `enumerable` (required) -* `value` (optional) -* `writable` (optional) - -To be a valid data descriptor, either `value` or `writable` must be defined. - -**Invalid properties** - -A descriptor may have additional _invalid_ properties (an error will **not** be thrown). - -```js -var foo = {}; - -Object.defineProperty(foo, 'bar', { - enumerable: true, - whatever: 'blah', // invalid, but doesn't cause an error - get: function() { - return 'baz'; - } -}); - -console.log(foo.bar); -//=> 'baz' -``` - -## About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -### Related projects - -You might also be interested in these projects: - -* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.") -* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.") -* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.") -* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 21 | [jonschlinkert](https://github.com/jonschlinkert) | -| 2 | [realityking](https://github.com/realityking) | - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 01, 2017._ \ No newline at end of file diff --git a/node_modules/base/node_modules/is-data-descriptor/index.js b/node_modules/base/node_modules/is-data-descriptor/index.js deleted file mode 100644 index cfeae361..00000000 --- a/node_modules/base/node_modules/is-data-descriptor/index.js +++ /dev/null @@ -1,49 +0,0 @@ -/*! - * is-data-descriptor - * - * Copyright (c) 2015-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -var typeOf = require('kind-of'); - -module.exports = function isDataDescriptor(obj, prop) { - // data descriptor properties - var data = { - configurable: 'boolean', - enumerable: 'boolean', - writable: 'boolean' - }; - - if (typeOf(obj) !== 'object') { - return false; - } - - if (typeof prop === 'string') { - var val = Object.getOwnPropertyDescriptor(obj, prop); - return typeof val !== 'undefined'; - } - - if (!('value' in obj) && !('writable' in obj)) { - return false; - } - - for (var key in obj) { - if (key === 'value') continue; - - if (!data.hasOwnProperty(key)) { - continue; - } - - if (typeOf(obj[key]) === data[key]) { - continue; - } - - if (typeof obj[key] !== 'undefined') { - return false; - } - } - return true; -}; diff --git a/node_modules/base/node_modules/is-data-descriptor/package.json b/node_modules/base/node_modules/is-data-descriptor/package.json deleted file mode 100644 index 159a95dd..00000000 --- a/node_modules/base/node_modules/is-data-descriptor/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - "is-data-descriptor@1.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "is-data-descriptor@1.0.0", - "_id": "is-data-descriptor@1.0.0", - "_inBundle": false, - "_integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "_location": "/base/is-data-descriptor", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "is-data-descriptor@1.0.0", - "name": "is-data-descriptor", - "escapedName": "is-data-descriptor", - "rawSpec": "1.0.0", - "saveSpec": null, - "fetchSpec": "1.0.0" - }, - "_requiredBy": [ - "/base/is-descriptor" - ], - "_resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "_spec": "1.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-data-descriptor/issues" - }, - "contributors": [ - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Rouven Weßling", - "url": "www.rouvenwessling.de" - } - ], - "dependencies": { - "kind-of": "^6.0.0" - }, - "description": "Returns true if a value has the characteristics of a valid JavaScript data descriptor.", - "devDependencies": { - "gulp-format-md": "^1.0.0", - "mocha": "^3.5.3" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/is-data-descriptor", - "keywords": [ - "accessor", - "check", - "data", - "descriptor", - "get", - "getter", - "is", - "keys", - "object", - "properties", - "property", - "set", - "setter", - "type", - "valid", - "value" - ], - "license": "MIT", - "main": "index.js", - "name": "is-data-descriptor", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-data-descriptor.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "is-accessor-descriptor", - "is-data-descriptor", - "is-descriptor", - "isobject" - ] - }, - "lint": { - "reflinks": true - } - }, - "version": "1.0.0" -} diff --git a/node_modules/base/node_modules/is-descriptor/LICENSE b/node_modules/base/node_modules/is-descriptor/LICENSE deleted file mode 100644 index c0d7f136..00000000 --- a/node_modules/base/node_modules/is-descriptor/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2017, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/base/node_modules/is-descriptor/README.md b/node_modules/base/node_modules/is-descriptor/README.md deleted file mode 100644 index 658e5330..00000000 --- a/node_modules/base/node_modules/is-descriptor/README.md +++ /dev/null @@ -1,193 +0,0 @@ -# is-descriptor [![NPM version](https://img.shields.io/npm/v/is-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-descriptor) - -> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-descriptor -``` - -## Usage - -```js -var isDescriptor = require('is-descriptor'); - -isDescriptor({value: 'foo'}) -//=> true -isDescriptor({get: function(){}, set: function(){}}) -//=> true -isDescriptor({get: 'foo', set: function(){}}) -//=> false -``` - -You may also check for a descriptor by passing an object as the first argument and property name (`string`) as the second argument. - -```js -var obj = {}; -obj.foo = 'abc'; - -Object.defineProperty(obj, 'bar', { - value: 'xyz' -}); - -isDescriptor(obj, 'foo'); -//=> true -isDescriptor(obj, 'bar'); -//=> true -``` - -## Examples - -### value type - -`false` when not an object - -```js -isDescriptor('a'); -//=> false -isDescriptor(null); -//=> false -isDescriptor([]); -//=> false -``` - -### data descriptor - -`true` when the object has valid properties with valid values. - -```js -isDescriptor({value: 'foo'}); -//=> true -isDescriptor({value: noop}); -//=> true -``` - -`false` when the object has invalid properties - -```js -isDescriptor({value: 'foo', bar: 'baz'}); -//=> false -isDescriptor({value: 'foo', bar: 'baz'}); -//=> false -isDescriptor({value: 'foo', get: noop}); -//=> false -isDescriptor({get: noop, value: noop}); -//=> false -``` - -`false` when a value is not the correct type - -```js -isDescriptor({value: 'foo', enumerable: 'foo'}); -//=> false -isDescriptor({value: 'foo', configurable: 'foo'}); -//=> false -isDescriptor({value: 'foo', writable: 'foo'}); -//=> false -``` - -### accessor descriptor - -`true` when the object has valid properties with valid values. - -```js -isDescriptor({get: noop, set: noop}); -//=> true -isDescriptor({get: noop}); -//=> true -isDescriptor({set: noop}); -//=> true -``` - -`false` when the object has invalid properties - -```js -isDescriptor({get: noop, set: noop, bar: 'baz'}); -//=> false -isDescriptor({get: noop, writable: true}); -//=> false -isDescriptor({get: noop, value: true}); -//=> false -``` - -`false` when an accessor is not a function - -```js -isDescriptor({get: noop, set: 'baz'}); -//=> false -isDescriptor({get: 'foo', set: noop}); -//=> false -isDescriptor({get: 'foo', bar: 'baz'}); -//=> false -isDescriptor({get: 'foo', set: 'baz'}); -//=> false -``` - -`false` when a value is not the correct type - -```js -isDescriptor({get: noop, set: noop, enumerable: 'foo'}); -//=> false -isDescriptor({set: noop, configurable: 'foo'}); -//=> false -isDescriptor({get: noop, configurable: 'foo'}); -//=> false -``` - -## About - -### Related projects - -* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.") -* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.") -* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.") -* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 24 | [jonschlinkert](https://github.com/jonschlinkert) | -| 1 | [doowb](https://github.com/doowb) | -| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 22, 2017._ \ No newline at end of file diff --git a/node_modules/base/node_modules/is-descriptor/index.js b/node_modules/base/node_modules/is-descriptor/index.js deleted file mode 100644 index c9b91d76..00000000 --- a/node_modules/base/node_modules/is-descriptor/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/*! - * is-descriptor - * - * Copyright (c) 2015-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -var typeOf = require('kind-of'); -var isAccessor = require('is-accessor-descriptor'); -var isData = require('is-data-descriptor'); - -module.exports = function isDescriptor(obj, key) { - if (typeOf(obj) !== 'object') { - return false; - } - if ('get' in obj) { - return isAccessor(obj, key); - } - return isData(obj, key); -}; diff --git a/node_modules/base/node_modules/is-descriptor/package.json b/node_modules/base/node_modules/is-descriptor/package.json deleted file mode 100644 index d030aeab..00000000 --- a/node_modules/base/node_modules/is-descriptor/package.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "_args": [ - [ - "is-descriptor@1.0.2", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "is-descriptor@1.0.2", - "_id": "is-descriptor@1.0.2", - "_inBundle": false, - "_integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "_location": "/base/is-descriptor", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "is-descriptor@1.0.2", - "name": "is-descriptor", - "escapedName": "is-descriptor", - "rawSpec": "1.0.2", - "saveSpec": null, - "fetchSpec": "1.0.2" - }, - "_requiredBy": [ - "/base/define-property" - ], - "_resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "_spec": "1.0.2", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-descriptor/issues" - }, - "contributors": [ - { - "name": "Brian Woodward", - "url": "https://twitter.com/doowb" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "url": "https://github.com/wtgtybhertgeghgtwtg" - } - ], - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "description": "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.", - "devDependencies": { - "gulp-format-md": "^1.0.0", - "mocha": "^3.5.3" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/is-descriptor", - "keywords": [ - "accessor", - "check", - "data", - "descriptor", - "get", - "getter", - "is", - "keys", - "object", - "properties", - "property", - "set", - "setter", - "type", - "valid", - "value" - ], - "license": "MIT", - "main": "index.js", - "name": "is-descriptor", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-descriptor.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "related": { - "list": [ - "is-accessor-descriptor", - "is-data-descriptor", - "is-descriptor", - "isobject" - ] - }, - "plugins": [ - "gulp-format-md" - ], - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "lint": { - "reflinks": true - } - }, - "version": "1.0.2" -} diff --git a/node_modules/base/package.json b/node_modules/base/package.json deleted file mode 100644 index b03a3179..00000000 --- a/node_modules/base/package.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "_args": [ - [ - "base@0.11.2", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "base@0.11.2", - "_id": "base@0.11.2", - "_inBundle": false, - "_integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "_location": "/base", - "_phantomChildren": { - "kind-of": "6.0.2" - }, - "_requested": { - "type": "version", - "registry": true, - "raw": "base@0.11.2", - "name": "base", - "escapedName": "base", - "rawSpec": "0.11.2", - "saveSpec": null, - "fetchSpec": "0.11.2" - }, - "_requiredBy": [ - "/snapdragon" - ], - "_resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "_spec": "0.11.2", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/node-base/base/issues" - }, - "contributors": [ - { - "name": "Brian Woodward", - "url": "https://twitter.com/doowb" - }, - { - "name": "John O'Donnell", - "url": "https://github.com/criticalmash" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "tunnckoCore", - "url": "https://i.am.charlike.online" - }, - { - "url": "https://github.com/wtgtybhertgeghgtwtg" - } - ], - "dependencies": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "description": "base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.", - "devDependencies": { - "gulp": "^3.9.1", - "gulp-eslint": "^4.0.0", - "gulp-format-md": "^1.0.0", - "gulp-istanbul": "^1.1.2", - "gulp-mocha": "^3.0.1", - "helper-coverage": "^0.1.3", - "mocha": "^3.5.0", - "should": "^13.0.1", - "through2": "^2.0.3", - "verb-generate-readme": "^0.6.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/node-base/base", - "keywords": [ - "base", - "boilerplate", - "cache", - "del", - "get", - "inherit", - "methods", - "set", - "starter", - "unset", - "visit" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "name": "Brian Woodward", - "url": "https://github.com/doowb" - }, - { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - } - ], - "name": "base", - "repository": { - "type": "git", - "url": "git+https://github.com/node-base/base.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "run": true, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "helpers": [ - "helper-coverage" - ], - "related": { - "description": "There are a number of different plugins available for extending base. Let us know if you create your own!", - "hightlight": "generate", - "list": [ - "base-cwd", - "base-data", - "base-fs", - "base-generators", - "base-option", - "base-pipeline", - "base-pkg", - "base-plugins", - "base-questions", - "base-store", - "base-task" - ] - }, - "reflinks": [ - "assemble", - "boilerplate", - "cache-base", - "class-utils", - "generate", - "scaffold", - "static-extend", - "verb" - ], - "lint": { - "reflinks": true - } - }, - "version": "0.11.2" -} diff --git a/node_modules/bcrypt-pbkdf/CONTRIBUTING.md b/node_modules/bcrypt-pbkdf/CONTRIBUTING.md deleted file mode 100644 index 401d34ed..00000000 --- a/node_modules/bcrypt-pbkdf/CONTRIBUTING.md +++ /dev/null @@ -1,13 +0,0 @@ -# Contributing - -This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new -changes. Anyone can submit changes. To get started, see the [cr.joyent.us user -guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md). -This repo does not use GitHub pull requests. - -See the [Joyent Engineering -Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general -best practices expected in this repository. - -If you're changing something non-trivial or user-facing, you may want to submit -an issue first. diff --git a/node_modules/bcrypt-pbkdf/LICENSE b/node_modules/bcrypt-pbkdf/LICENSE deleted file mode 100644 index fc58d2ab..00000000 --- a/node_modules/bcrypt-pbkdf/LICENSE +++ /dev/null @@ -1,66 +0,0 @@ -The Blowfish portions are under the following license: - -Blowfish block cipher for OpenBSD -Copyright 1997 Niels Provos -All rights reserved. - -Implementation advice by David Mazieres . - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. 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. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR 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. - - - -The bcrypt_pbkdf portions are under the following license: - -Copyright (c) 2013 Ted Unangst - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - - -Performance improvements (Javascript-specific): - -Copyright 2016, Joyent Inc -Author: Alex Wilson - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/bcrypt-pbkdf/README.md b/node_modules/bcrypt-pbkdf/README.md deleted file mode 100644 index 7551f335..00000000 --- a/node_modules/bcrypt-pbkdf/README.md +++ /dev/null @@ -1,45 +0,0 @@ -Port of the OpenBSD `bcrypt_pbkdf` function to pure Javascript. `npm`-ified -version of [Devi Mandiri's port](https://github.com/devi/tmp/blob/master/js/bcrypt_pbkdf.js), -with some minor performance improvements. The code is copied verbatim (and -un-styled) from Devi's work. - -This product includes software developed by Niels Provos. - -## API - -### `bcrypt_pbkdf.pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds)` - -Derive a cryptographic key of arbitrary length from a given password and salt, -using the OpenBSD `bcrypt_pbkdf` function. This is a combination of Blowfish and -SHA-512. - -See [this article](http://www.tedunangst.com/flak/post/bcrypt-pbkdf) for -further information. - -Parameters: - - * `pass`, a Uint8Array of length `passlen` - * `passlen`, an integer Number - * `salt`, a Uint8Array of length `saltlen` - * `saltlen`, an integer Number - * `key`, a Uint8Array of length `keylen`, will be filled with output - * `keylen`, an integer Number - * `rounds`, an integer Number, number of rounds of the PBKDF to run - -### `bcrypt_pbkdf.hash(sha2pass, sha2salt, out)` - -Calculate a Blowfish hash, given SHA2-512 output of a password and salt. Used as -part of the inner round function in the PBKDF. - -Parameters: - - * `sha2pass`, a Uint8Array of length 64 - * `sha2salt`, a Uint8Array of length 64 - * `out`, a Uint8Array of length 32, will be filled with output - -## License - -This source form is a 1:1 port from the OpenBSD `blowfish.c` and `bcrypt_pbkdf.c`. -As a result, it retains the original copyright and license. The two files are -under slightly different (but compatible) licenses, and are here combined in -one file. For each of the full license texts see `LICENSE`. diff --git a/node_modules/bcrypt-pbkdf/index.js b/node_modules/bcrypt-pbkdf/index.js deleted file mode 100644 index b1b5ad4b..00000000 --- a/node_modules/bcrypt-pbkdf/index.js +++ /dev/null @@ -1,556 +0,0 @@ -'use strict'; - -var crypto_hash_sha512 = require('tweetnacl').lowlevel.crypto_hash; - -/* - * This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a - * result, it retains the original copyright and license. The two files are - * under slightly different (but compatible) licenses, and are here combined in - * one file. - * - * Credit for the actual porting work goes to: - * Devi Mandiri - */ - -/* - * The Blowfish portions are under the following license: - * - * Blowfish block cipher for OpenBSD - * Copyright 1997 Niels Provos - * All rights reserved. - * - * Implementation advice by David Mazieres . - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR 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. - */ - -/* - * The bcrypt_pbkdf portions are under the following license: - * - * Copyright (c) 2013 Ted Unangst - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * Performance improvements (Javascript-specific): - * - * Copyright 2016, Joyent Inc - * Author: Alex Wilson - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -// Ported from OpenBSD bcrypt_pbkdf.c v1.9 - -var BLF_J = 0; - -var Blowfish = function() { - this.S = [ - new Uint32Array([ - 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, - 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, - 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, - 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, - 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, - 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, - 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, - 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, - 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, - 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, - 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, - 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, - 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, - 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, - 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, - 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, - 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, - 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, - 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, - 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, - 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, - 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, - 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, - 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, - 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, - 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, - 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, - 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, - 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, - 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, - 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, - 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, - 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, - 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, - 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, - 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, - 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, - 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, - 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, - 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, - 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, - 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, - 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, - 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, - 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, - 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, - 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, - 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, - 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, - 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, - 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, - 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, - 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, - 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, - 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, - 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, - 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, - 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, - 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, - 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, - 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, - 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, - 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, - 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a]), - new Uint32Array([ - 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, - 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, - 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, - 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, - 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, - 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, - 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, - 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, - 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, - 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, - 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, - 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, - 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, - 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, - 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, - 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, - 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, - 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, - 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, - 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, - 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, - 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, - 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, - 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, - 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, - 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, - 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, - 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, - 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, - 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, - 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, - 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, - 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, - 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, - 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, - 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, - 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, - 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, - 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, - 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, - 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, - 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, - 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, - 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, - 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, - 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, - 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, - 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, - 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, - 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, - 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, - 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, - 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, - 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, - 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, - 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, - 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, - 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, - 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, - 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, - 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, - 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, - 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, - 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7]), - new Uint32Array([ - 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, - 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, - 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, - 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, - 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, - 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, - 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, - 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, - 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, - 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, - 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, - 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, - 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, - 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, - 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, - 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, - 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, - 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, - 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, - 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, - 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, - 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, - 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, - 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, - 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, - 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, - 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, - 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, - 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, - 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, - 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, - 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, - 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, - 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, - 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, - 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, - 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, - 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, - 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, - 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, - 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, - 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, - 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, - 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, - 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, - 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, - 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, - 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, - 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, - 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, - 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, - 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, - 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, - 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, - 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, - 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, - 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, - 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, - 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, - 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, - 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, - 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, - 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, - 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0]), - new Uint32Array([ - 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, - 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, - 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, - 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, - 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, - 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, - 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, - 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, - 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, - 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, - 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, - 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, - 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, - 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, - 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, - 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, - 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, - 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, - 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, - 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, - 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, - 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, - 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, - 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, - 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, - 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, - 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, - 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, - 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, - 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, - 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, - 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, - 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, - 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, - 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, - 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, - 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, - 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, - 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, - 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, - 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, - 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, - 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, - 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, - 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, - 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, - 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, - 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, - 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, - 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, - 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, - 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, - 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, - 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, - 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, - 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, - 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, - 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, - 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, - 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, - 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, - 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, - 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, - 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6]) - ]; - this.P = new Uint32Array([ - 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, - 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, - 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, - 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, - 0x9216d5d9, 0x8979fb1b]); -}; - -function F(S, x8, i) { - return (((S[0][x8[i+3]] + - S[1][x8[i+2]]) ^ - S[2][x8[i+1]]) + - S[3][x8[i]]); -}; - -Blowfish.prototype.encipher = function(x, x8) { - if (x8 === undefined) { - x8 = new Uint8Array(x.buffer); - if (x.byteOffset !== 0) - x8 = x8.subarray(x.byteOffset); - } - x[0] ^= this.P[0]; - for (var i = 1; i < 16; i += 2) { - x[1] ^= F(this.S, x8, 0) ^ this.P[i]; - x[0] ^= F(this.S, x8, 4) ^ this.P[i+1]; - } - var t = x[0]; - x[0] = x[1] ^ this.P[17]; - x[1] = t; -}; - -Blowfish.prototype.decipher = function(x) { - var x8 = new Uint8Array(x.buffer); - if (x.byteOffset !== 0) - x8 = x8.subarray(x.byteOffset); - x[0] ^= this.P[17]; - for (var i = 16; i > 0; i -= 2) { - x[1] ^= F(this.S, x8, 0) ^ this.P[i]; - x[0] ^= F(this.S, x8, 4) ^ this.P[i-1]; - } - var t = x[0]; - x[0] = x[1] ^ this.P[0]; - x[1] = t; -}; - -function stream2word(data, databytes){ - var i, temp = 0; - for (i = 0; i < 4; i++, BLF_J++) { - if (BLF_J >= databytes) BLF_J = 0; - temp = (temp << 8) | data[BLF_J]; - } - return temp; -}; - -Blowfish.prototype.expand0state = function(key, keybytes) { - var d = new Uint32Array(2), i, k; - var d8 = new Uint8Array(d.buffer); - - for (i = 0, BLF_J = 0; i < 18; i++) { - this.P[i] ^= stream2word(key, keybytes); - } - BLF_J = 0; - - for (i = 0; i < 18; i += 2) { - this.encipher(d, d8); - this.P[i] = d[0]; - this.P[i+1] = d[1]; - } - - for (i = 0; i < 4; i++) { - for (k = 0; k < 256; k += 2) { - this.encipher(d, d8); - this.S[i][k] = d[0]; - this.S[i][k+1] = d[1]; - } - } -}; - -Blowfish.prototype.expandstate = function(data, databytes, key, keybytes) { - var d = new Uint32Array(2), i, k; - - for (i = 0, BLF_J = 0; i < 18; i++) { - this.P[i] ^= stream2word(key, keybytes); - } - - for (i = 0, BLF_J = 0; i < 18; i += 2) { - d[0] ^= stream2word(data, databytes); - d[1] ^= stream2word(data, databytes); - this.encipher(d); - this.P[i] = d[0]; - this.P[i+1] = d[1]; - } - - for (i = 0; i < 4; i++) { - for (k = 0; k < 256; k += 2) { - d[0] ^= stream2word(data, databytes); - d[1] ^= stream2word(data, databytes); - this.encipher(d); - this.S[i][k] = d[0]; - this.S[i][k+1] = d[1]; - } - } - BLF_J = 0; -}; - -Blowfish.prototype.enc = function(data, blocks) { - for (var i = 0; i < blocks; i++) { - this.encipher(data.subarray(i*2)); - } -}; - -Blowfish.prototype.dec = function(data, blocks) { - for (var i = 0; i < blocks; i++) { - this.decipher(data.subarray(i*2)); - } -}; - -var BCRYPT_BLOCKS = 8, - BCRYPT_HASHSIZE = 32; - -function bcrypt_hash(sha2pass, sha2salt, out) { - var state = new Blowfish(), - cdata = new Uint32Array(BCRYPT_BLOCKS), i, - ciphertext = new Uint8Array([79,120,121,99,104,114,111,109,97,116,105, - 99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109, - 105,116,101]); //"OxychromaticBlowfishSwatDynamite" - - state.expandstate(sha2salt, 64, sha2pass, 64); - for (i = 0; i < 64; i++) { - state.expand0state(sha2salt, 64); - state.expand0state(sha2pass, 64); - } - - for (i = 0; i < BCRYPT_BLOCKS; i++) - cdata[i] = stream2word(ciphertext, ciphertext.byteLength); - for (i = 0; i < 64; i++) - state.enc(cdata, cdata.byteLength / 8); - - for (i = 0; i < BCRYPT_BLOCKS; i++) { - out[4*i+3] = cdata[i] >>> 24; - out[4*i+2] = cdata[i] >>> 16; - out[4*i+1] = cdata[i] >>> 8; - out[4*i+0] = cdata[i]; - } -}; - -function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) { - var sha2pass = new Uint8Array(64), - sha2salt = new Uint8Array(64), - out = new Uint8Array(BCRYPT_HASHSIZE), - tmpout = new Uint8Array(BCRYPT_HASHSIZE), - countsalt = new Uint8Array(saltlen+4), - i, j, amt, stride, dest, count, - origkeylen = keylen; - - if (rounds < 1) - return -1; - if (passlen === 0 || saltlen === 0 || keylen === 0 || - keylen > (out.byteLength * out.byteLength) || saltlen > (1<<20)) - return -1; - - stride = Math.floor((keylen + out.byteLength - 1) / out.byteLength); - amt = Math.floor((keylen + stride - 1) / stride); - - for (i = 0; i < saltlen; i++) - countsalt[i] = salt[i]; - - crypto_hash_sha512(sha2pass, pass, passlen); - - for (count = 1; keylen > 0; count++) { - countsalt[saltlen+0] = count >>> 24; - countsalt[saltlen+1] = count >>> 16; - countsalt[saltlen+2] = count >>> 8; - countsalt[saltlen+3] = count; - - crypto_hash_sha512(sha2salt, countsalt, saltlen + 4); - bcrypt_hash(sha2pass, sha2salt, tmpout); - for (i = out.byteLength; i--;) - out[i] = tmpout[i]; - - for (i = 1; i < rounds; i++) { - crypto_hash_sha512(sha2salt, tmpout, tmpout.byteLength); - bcrypt_hash(sha2pass, sha2salt, tmpout); - for (j = 0; j < out.byteLength; j++) - out[j] ^= tmpout[j]; - } - - amt = Math.min(amt, keylen); - for (i = 0; i < amt; i++) { - dest = i * stride + (count - 1); - if (dest >= origkeylen) - break; - key[dest] = out[i]; - } - keylen -= i; - } - - return 0; -}; - -module.exports = { - BLOCKS: BCRYPT_BLOCKS, - HASHSIZE: BCRYPT_HASHSIZE, - hash: bcrypt_hash, - pbkdf: bcrypt_pbkdf -}; diff --git a/node_modules/bcrypt-pbkdf/package.json b/node_modules/bcrypt-pbkdf/package.json deleted file mode 100644 index 7e660caf..00000000 --- a/node_modules/bcrypt-pbkdf/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "_args": [ - [ - "bcrypt-pbkdf@1.0.2", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "bcrypt-pbkdf@1.0.2", - "_id": "bcrypt-pbkdf@1.0.2", - "_inBundle": false, - "_integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "_location": "/bcrypt-pbkdf", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "bcrypt-pbkdf@1.0.2", - "name": "bcrypt-pbkdf", - "escapedName": "bcrypt-pbkdf", - "rawSpec": "1.0.2", - "saveSpec": null, - "fetchSpec": "1.0.2" - }, - "_requiredBy": [ - "/sshpk" - ], - "_resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "_spec": "1.0.2", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/joyent/node-bcrypt-pbkdf/issues" - }, - "dependencies": { - "tweetnacl": "^0.14.3" - }, - "description": "Port of the OpenBSD bcrypt_pbkdf function to pure JS", - "devDependencies": {}, - "homepage": "https://github.com/joyent/node-bcrypt-pbkdf#readme", - "license": "BSD-3-Clause", - "main": "index.js", - "name": "bcrypt-pbkdf", - "repository": { - "type": "git", - "url": "git://github.com/joyent/node-bcrypt-pbkdf.git" - }, - "version": "1.0.2" -} diff --git a/node_modules/brace-expansion/LICENSE b/node_modules/brace-expansion/LICENSE deleted file mode 100644 index de322667..00000000 --- a/node_modules/brace-expansion/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2013 Julian Gruber - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/brace-expansion/README.md b/node_modules/brace-expansion/README.md deleted file mode 100644 index 6b4e0e16..00000000 --- a/node_modules/brace-expansion/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# brace-expansion - -[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), -as known from sh/bash, in JavaScript. - -[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) -[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) -[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) - -[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) - -## Example - -```js -var expand = require('brace-expansion'); - -expand('file-{a,b,c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('-v{,,}') -// => ['-v', '-v', '-v'] - -expand('file{0..2}.jpg') -// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] - -expand('file-{a..c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('file{2..0}.jpg') -// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] - -expand('file{0..4..2}.jpg') -// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] - -expand('file-{a..e..2}.jpg') -// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] - -expand('file{00..10..5}.jpg') -// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] - -expand('{{A..C},{a..c}}') -// => ['A', 'B', 'C', 'a', 'b', 'c'] - -expand('ppp{,config,oe{,conf}}') -// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] -``` - -## API - -```js -var expand = require('brace-expansion'); -``` - -### var expanded = expand(str) - -Return an array of all possible and valid expansions of `str`. If none are -found, `[str]` is returned. - -Valid expansions are: - -```js -/^(.*,)+(.+)?$/ -// {a,b,...} -``` - -A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -A numeric sequence from `x` to `y` inclusive, with optional increment. -If `x` or `y` start with a leading `0`, all the numbers will be padded -to have equal length. Negative numbers and backwards iteration work too. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -An alphabetic sequence from `x` to `y` inclusive, with optional increment. -`x` and `y` must be exactly one character, and if given, `incr` must be a -number. - -For compatibility reasons, the string `${` is not eligible for brace expansion. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install brace-expansion -``` - -## Contributors - -- [Julian Gruber](https://github.com/juliangruber) -- [Isaac Z. Schlueter](https://github.com/isaacs) - -## Sponsors - -This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! - -Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/brace-expansion/index.js b/node_modules/brace-expansion/index.js deleted file mode 100644 index 0478be81..00000000 --- a/node_modules/brace-expansion/index.js +++ /dev/null @@ -1,201 +0,0 @@ -var concatMap = require('concat-map'); -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), true).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; -} - diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json deleted file mode 100644 index 74bcb3fc..00000000 --- a/node_modules/brace-expansion/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "_args": [ - [ - "brace-expansion@1.1.11", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "brace-expansion@1.1.11", - "_id": "brace-expansion@1.1.11", - "_inBundle": false, - "_integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "_location": "/brace-expansion", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "brace-expansion@1.1.11", - "name": "brace-expansion", - "escapedName": "brace-expansion", - "rawSpec": "1.1.11", - "saveSpec": null, - "fetchSpec": "1.1.11" - }, - "_requiredBy": [ - "/minimatch" - ], - "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "_spec": "1.1.11", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/brace-expansion/issues" - }, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - }, - "description": "Brace expansion as known from sh/bash", - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "homepage": "https://github.com/juliangruber/brace-expansion", - "keywords": [], - "license": "MIT", - "main": "index.js", - "name": "brace-expansion", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" - }, - "scripts": { - "bench": "matcha test/perf/bench.js", - "gentest": "bash test/generate.sh", - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.1.11" -} diff --git a/node_modules/braces/LICENSE b/node_modules/braces/LICENSE deleted file mode 100644 index d32ab442..00000000 --- a/node_modules/braces/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2018, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/braces/README.md b/node_modules/braces/README.md deleted file mode 100644 index f909bfba..00000000 --- a/node_modules/braces/README.md +++ /dev/null @@ -1,640 +0,0 @@ -# braces [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM monthly downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![NPM total downloads](https://img.shields.io/npm/dt/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Linux Build Status](https://img.shields.io/travis/micromatch/braces.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/braces) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/braces.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/micromatch/braces) - -> Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save braces -``` - -## Why use braces? - -Brace patterns are great for matching ranges. Users (and implementors) shouldn't have to think about whether or not they will break their application (or yours) from accidentally defining an aggressive brace pattern. _Braces is the only library that offers a [solution to this problem](#performance)_. - -* **Safe(r)**: Braces isn't vulnerable to DoS attacks like [brace-expansion](https://github.com/juliangruber/brace-expansion), [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch) (a different bug than the [other regex DoS bug](https://medium.com/node-security/minimatch-redos-vulnerability-590da24e6d3c#.jew0b6mpc)). -* **Accurate**: complete support for the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/) specification (passes all of the Bash braces tests) -* **[fast and performant](#benchmarks)**: Starts fast, runs fast and [scales well](#performance) as patterns increase in complexity. -* **Organized code base**: with parser and compiler that are eas(y|ier) to maintain and update when edge cases crop up. -* **Well-tested**: thousands of test assertions. Passes 100% of the [minimatch](https://github.com/isaacs/minimatch) and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests as well (as of the writing of this). - -## Usage - -The main export is a function that takes one or more brace `patterns` and `options`. - -```js -var braces = require('braces'); -braces(pattern[, options]); -``` - -By default, braces returns an optimized regex-source string. To get an array of brace patterns, use `brace.expand()`. - -The following section explains the difference in more detail. _(If you're curious about "why" braces does this by default, see [brace matching pitfalls](#brace-matching-pitfalls)_. - -### Optimized vs. expanded braces - -**Optimized** - -By default, patterns are optimized for regex and matching: - -```js -console.log(braces('a/{x,y,z}/b')); -//=> ['a/(x|y|z)/b'] -``` - -**Expanded** - -To expand patterns the same way as Bash or [minimatch](https://github.com/isaacs/minimatch), use the [.expand](#expand) method: - -```js -console.log(braces.expand('a/{x,y,z}/b')); -//=> ['a/x/b', 'a/y/b', 'a/z/b'] -``` - -Or use [options.expand](#optionsexpand): - -```js -console.log(braces('a/{x,y,z}/b', {expand: true})); -//=> ['a/x/b', 'a/y/b', 'a/z/b'] -``` - -## Features - -* [lists](#lists): Supports "lists": `a/{b,c}/d` => `['a/b/d', 'a/c/d']` -* [sequences](#sequences): Supports alphabetical or numerical "sequences" (ranges): `{1..3}` => `['1', '2', '3']` -* [steps](#steps): Supports "steps" or increments: `{2..10..2}` => `['2', '4', '6', '8', '10']` -* [escaping](#escaping) -* [options](#options) - -### Lists - -Uses [fill-range](https://github.com/jonschlinkert/fill-range) for expanding alphabetical or numeric lists: - -```js -console.log(braces('a/{foo,bar,baz}/*.js')); -//=> ['a/(foo|bar|baz)/*.js'] - -console.log(braces.expand('a/{foo,bar,baz}/*.js')); -//=> ['a/foo/*.js', 'a/bar/*.js', 'a/baz/*.js'] -``` - -### Sequences - -Uses [fill-range](https://github.com/jonschlinkert/fill-range) for expanding alphabetical or numeric ranges (bash "sequences"): - -```js -console.log(braces.expand('{1..3}')); // ['1', '2', '3'] -console.log(braces.expand('a{01..03}b')); // ['a01b', 'a02b', 'a03b'] -console.log(braces.expand('a{1..3}b')); // ['a1b', 'a2b', 'a3b'] -console.log(braces.expand('{a..c}')); // ['a', 'b', 'c'] -console.log(braces.expand('foo/{a..c}')); // ['foo/a', 'foo/b', 'foo/c'] - -// supports padded ranges -console.log(braces('a{01..03}b')); //=> [ 'a(0[1-3])b' ] -console.log(braces('a{001..300}b')); //=> [ 'a(0{2}[1-9]|0[1-9][0-9]|[12][0-9]{2}|300)b' ] -``` - -### Steps - -Steps, or increments, may be used with ranges: - -```js -console.log(braces.expand('{2..10..2}')); -//=> ['2', '4', '6', '8', '10'] - -console.log(braces('{2..10..2}')); -//=> ['(2|4|6|8|10)'] -``` - -When the [.optimize](#optimize) method is used, or [options.optimize](#optionsoptimize) is set to true, sequences are passed to [to-regex-range](https://github.com/jonschlinkert/to-regex-range) for expansion. - -### Nesting - -Brace patterns may be nested. The results of each expanded string are not sorted, and left to right order is preserved. - -**"Expanded" braces** - -```js -console.log(braces.expand('a{b,c,/{x,y}}/e')); -//=> ['ab/e', 'ac/e', 'a/x/e', 'a/y/e'] - -console.log(braces.expand('a/{x,{1..5},y}/c')); -//=> ['a/x/c', 'a/1/c', 'a/2/c', 'a/3/c', 'a/4/c', 'a/5/c', 'a/y/c'] -``` - -**"Optimized" braces** - -```js -console.log(braces('a{b,c,/{x,y}}/e')); -//=> ['a(b|c|/(x|y))/e'] - -console.log(braces('a/{x,{1..5},y}/c')); -//=> ['a/(x|([1-5])|y)/c'] -``` - -### Escaping - -**Escaping braces** - -A brace pattern will not be expanded or evaluted if _either the opening or closing brace is escaped_: - -```js -console.log(braces.expand('a\\{d,c,b}e')); -//=> ['a{d,c,b}e'] - -console.log(braces.expand('a{d,c,b\\}e')); -//=> ['a{d,c,b}e'] -``` - -**Escaping commas** - -Commas inside braces may also be escaped: - -```js -console.log(braces.expand('a{b\\,c}d')); -//=> ['a{b,c}d'] - -console.log(braces.expand('a{d\\,c,b}e')); -//=> ['ad,ce', 'abe'] -``` - -**Single items** - -Following bash conventions, a brace pattern is also not expanded when it contains a single character: - -```js -console.log(braces.expand('a{b}c')); -//=> ['a{b}c'] -``` - -## Options - -### options.maxLength - -**Type**: `Number` - -**Default**: `65,536` - -**Description**: Limit the length of the input string. Useful when the input string is generated or your application allows users to pass a string, et cetera. - -```js -console.log(braces('a/{b,c}/d', { maxLength: 3 })); //=> throws an error -``` - -### options.expand - -**Type**: `Boolean` - -**Default**: `undefined` - -**Description**: Generate an "expanded" brace pattern (this option is unncessary with the `.expand` method, which does the same thing). - -```js -console.log(braces('a/{b,c}/d', {expand: true})); -//=> [ 'a/b/d', 'a/c/d' ] -``` - -### options.optimize - -**Type**: `Boolean` - -**Default**: `true` - -**Description**: Enabled by default. - -```js -console.log(braces('a/{b,c}/d')); -//=> [ 'a/(b|c)/d' ] -``` - -### options.nodupes - -**Type**: `Boolean` - -**Default**: `true` - -**Description**: Duplicates are removed by default. To keep duplicates, pass `{nodupes: false}` on the options - -### options.rangeLimit - -**Type**: `Number` - -**Default**: `250` - -**Description**: When `braces.expand()` is used, or `options.expand` is true, brace patterns will automatically be [optimized](#optionsoptimize) when the difference between the range minimum and range maximum exceeds the `rangeLimit`. This is to prevent huge ranges from freezing your application. - -You can set this to any number, or change `options.rangeLimit` to `Inifinity` to disable this altogether. - -**Examples** - -```js -// pattern exceeds the "rangeLimit", so it's optimized automatically -console.log(braces.expand('{1..1000}')); -//=> ['([1-9]|[1-9][0-9]{1,2}|1000)'] - -// pattern does not exceed "rangeLimit", so it's NOT optimized -console.log(braces.expand('{1..100}')); -//=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100'] -``` - -### options.transform - -**Type**: `Function` - -**Default**: `undefined` - -**Description**: Customize range expansion. - -```js -var range = braces.expand('x{a..e}y', { - transform: function(str) { - return 'foo' + str; - } -}); - -console.log(range); -//=> [ 'xfooay', 'xfooby', 'xfoocy', 'xfoody', 'xfooey' ] -``` - -### options.quantifiers - -**Type**: `Boolean` - -**Default**: `undefined` - -**Description**: In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times. - -Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists) - -The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) are defined in the given pattern, and not to try to expand them as lists. - -**Examples** - -```js -var braces = require('braces'); -console.log(braces('a/b{1,3}/{x,y,z}')); -//=> [ 'a/b(1|3)/(x|y|z)' ] -console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true})); -//=> [ 'a/b{1,3}/(x|y|z)' ] -console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true, expand: true})); -//=> [ 'a/b{1,3}/x', 'a/b{1,3}/y', 'a/b{1,3}/z' ] -``` - -### options.unescape - -**Type**: `Boolean` - -**Default**: `undefined` - -**Description**: Strip backslashes that were used for escaping from the result. - -## What is "brace expansion"? - -Brace expansion is a type of parameter expansion that was made popular by unix shells for generating lists of strings, as well as regex-like matching when used alongside wildcards (globs). - -In addition to "expansion", braces are also used for matching. In other words: - -* [brace expansion](#brace-expansion) is for generating new lists -* [brace matching](#brace-matching) is for filtering existing lists - -
-More about brace expansion (click to expand) - -There are two main types of brace expansion: - -1. **lists**: which are defined using comma-separated values inside curly braces: `{a,b,c}` -2. **sequences**: which are defined using a starting value and an ending value, separated by two dots: `a{1..3}b`. Optionally, a third argument may be passed to define a "step" or increment to use: `a{1..100..10}b`. These are also sometimes referred to as "ranges". - -Here are some example brace patterns to illustrate how they work: - -**Sets** - -``` -{a,b,c} => a b c -{a,b,c}{1,2} => a1 a2 b1 b2 c1 c2 -``` - -**Sequences** - -``` -{1..9} => 1 2 3 4 5 6 7 8 9 -{4..-4} => 4 3 2 1 0 -1 -2 -3 -4 -{1..20..3} => 1 4 7 10 13 16 19 -{a..j} => a b c d e f g h i j -{j..a} => j i h g f e d c b a -{a..z..3} => a d g j m p s v y -``` - -**Combination** - -Sets and sequences can be mixed together or used along with any other strings. - -``` -{a,b,c}{1..3} => a1 a2 a3 b1 b2 b3 c1 c2 c3 -foo/{a,b,c}/bar => foo/a/bar foo/b/bar foo/c/bar -``` - -The fact that braces can be "expanded" from relatively simple patterns makes them ideal for quickly generating test fixtures, file paths, and similar use cases. - -## Brace matching - -In addition to _expansion_, brace patterns are also useful for performing regular-expression-like matching. - -For example, the pattern `foo/{1..3}/bar` would match any of following strings: - -``` -foo/1/bar -foo/2/bar -foo/3/bar -``` - -But not: - -``` -baz/1/qux -baz/2/qux -baz/3/qux -``` - -Braces can also be combined with [glob patterns](https://github.com/jonschlinkert/micromatch) to perform more advanced wildcard matching. For example, the pattern `*/{1..3}/*` would match any of following strings: - -``` -foo/1/bar -foo/2/bar -foo/3/bar -baz/1/qux -baz/2/qux -baz/3/qux -``` - -## Brace matching pitfalls - -Although brace patterns offer a user-friendly way of matching ranges or sets of strings, there are also some major disadvantages and potential risks you should be aware of. - -### tldr - -**"brace bombs"** - -* brace expansion can eat up a huge amount of processing resources -* as brace patterns increase _linearly in size_, the system resources required to expand the pattern increase exponentially -* users can accidentally (or intentially) exhaust your system's resources resulting in the equivalent of a DoS attack (bonus: no programming knowledge is required!) - -For a more detailed explanation with examples, see the [geometric complexity](#geometric-complexity) section. - -### The solution - -Jump to the [performance section](#performance) to see how Braces solves this problem in comparison to other libraries. - -### Geometric complexity - -At minimum, brace patterns with sets limited to two elements have quadradic or `O(n^2)` complexity. But the complexity of the algorithm increases exponentially as the number of sets, _and elements per set_, increases, which is `O(n^c)`. - -For example, the following sets demonstrate quadratic (`O(n^2)`) complexity: - -``` -{1,2}{3,4} => (2X2) => 13 14 23 24 -{1,2}{3,4}{5,6} => (2X2X2) => 135 136 145 146 235 236 245 246 -``` - -But add an element to a set, and we get a n-fold Cartesian product with `O(n^c)` complexity: - -``` -{1,2,3}{4,5,6}{7,8,9} => (3X3X3) => 147 148 149 157 158 159 167 168 169 247 248 - 249 257 258 259 267 268 269 347 348 349 357 - 358 359 367 368 369 -``` - -Now, imagine how this complexity grows given that each element is a n-tuple: - -``` -{1..100}{1..100} => (100X100) => 10,000 elements (38.4 kB) -{1..100}{1..100}{1..100} => (100X100X100) => 1,000,000 elements (5.76 MB) -``` - -Although these examples are clearly contrived, they demonstrate how brace patterns can quickly grow out of control. - -**More information** - -Interested in learning more about brace expansion? - -* [linuxjournal/bash-brace-expansion](http://www.linuxjournal.com/content/bash-brace-expansion) -* [rosettacode/Brace_expansion](https://rosettacode.org/wiki/Brace_expansion) -* [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) - -
- -## Performance - -Braces is not only screaming fast, it's also more accurate the other brace expansion libraries. - -### Better algorithms - -Fortunately there is a solution to the ["brace bomb" problem](#brace-matching-pitfalls): _don't expand brace patterns into an array when they're used for matching_. - -Instead, convert the pattern into an optimized regular expression. This is easier said than done, and braces is the only library that does this currently. - -**The proof is in the numbers** - -Minimatch gets exponentially slower as patterns increase in complexity, braces does not. The following results were generated using `braces()` and `minimatch.braceExpand()`, respectively. - -| **Pattern** | **braces** | **[minimatch](https://github.com/isaacs/minimatch)** | -| --- | --- | --- | -| `{1..9007199254740991}`[1] | `298 B` (5ms 459μs) | N/A (freezes) | -| `{1..1000000000000000}` | `41 B` (1ms 15μs) | N/A (freezes) | -| `{1..100000000000000}` | `40 B` (890μs) | N/A (freezes) | -| `{1..10000000000000}` | `39 B` (2ms 49μs) | N/A (freezes) | -| `{1..1000000000000}` | `38 B` (608μs) | N/A (freezes) | -| `{1..100000000000}` | `37 B` (397μs) | N/A (freezes) | -| `{1..10000000000}` | `35 B` (983μs) | N/A (freezes) | -| `{1..1000000000}` | `34 B` (798μs) | N/A (freezes) | -| `{1..100000000}` | `33 B` (733μs) | N/A (freezes) | -| `{1..10000000}` | `32 B` (5ms 632μs) | `78.89 MB` (16s 388ms 569μs) | -| `{1..1000000}` | `31 B` (1ms 381μs) | `6.89 MB` (1s 496ms 887μs) | -| `{1..100000}` | `30 B` (950μs) | `588.89 kB` (146ms 921μs) | -| `{1..10000}` | `29 B` (1ms 114μs) | `48.89 kB` (14ms 187μs) | -| `{1..1000}` | `28 B` (760μs) | `3.89 kB` (1ms 453μs) | -| `{1..100}` | `22 B` (345μs) | `291 B` (196μs) | -| `{1..10}` | `10 B` (533μs) | `20 B` (37μs) | -| `{1..3}` | `7 B` (190μs) | `5 B` (27μs) | - -### Faster algorithms - -When you need expansion, braces is still much faster. - -_(the following results were generated using `braces.expand()` and `minimatch.braceExpand()`, respectively)_ - -| **Pattern** | **braces** | **[minimatch](https://github.com/isaacs/minimatch)** | -| --- | --- | --- | -| `{1..10000000}` | `78.89 MB` (2s 698ms 642μs) | `78.89 MB` (18s 601ms 974μs) | -| `{1..1000000}` | `6.89 MB` (458ms 576μs) | `6.89 MB` (1s 491ms 621μs) | -| `{1..100000}` | `588.89 kB` (20ms 728μs) | `588.89 kB` (156ms 919μs) | -| `{1..10000}` | `48.89 kB` (2ms 202μs) | `48.89 kB` (13ms 641μs) | -| `{1..1000}` | `3.89 kB` (1ms 796μs) | `3.89 kB` (1ms 958μs) | -| `{1..100}` | `291 B` (424μs) | `291 B` (211μs) | -| `{1..10}` | `20 B` (487μs) | `20 B` (72μs) | -| `{1..3}` | `5 B` (166μs) | `5 B` (27μs) | - -If you'd like to run these comparisons yourself, see [test/support/generate.js](test/support/generate.js). - -## Benchmarks - -### Running benchmarks - -Install dev dependencies: - -```bash -npm i -d && npm benchmark -``` - -### Latest results - -```bash -Benchmarking: (8 of 8) - · combination-nested - · combination - · escaped - · list-basic - · list-multiple - · no-braces - · sequence-basic - · sequence-multiple - -# benchmark/fixtures/combination-nested.js (52 bytes) - brace-expansion x 4,756 ops/sec ±1.09% (86 runs sampled) - braces x 11,202,303 ops/sec ±1.06% (88 runs sampled) - minimatch x 4,816 ops/sec ±0.99% (87 runs sampled) - - fastest is braces - -# benchmark/fixtures/combination.js (51 bytes) - brace-expansion x 625 ops/sec ±0.87% (87 runs sampled) - braces x 11,031,884 ops/sec ±0.72% (90 runs sampled) - minimatch x 637 ops/sec ±0.84% (88 runs sampled) - - fastest is braces - -# benchmark/fixtures/escaped.js (44 bytes) - brace-expansion x 163,325 ops/sec ±1.05% (87 runs sampled) - braces x 10,655,071 ops/sec ±1.22% (88 runs sampled) - minimatch x 147,495 ops/sec ±0.96% (88 runs sampled) - - fastest is braces - -# benchmark/fixtures/list-basic.js (40 bytes) - brace-expansion x 99,726 ops/sec ±1.07% (83 runs sampled) - braces x 10,596,584 ops/sec ±0.98% (88 runs sampled) - minimatch x 100,069 ops/sec ±1.17% (86 runs sampled) - - fastest is braces - -# benchmark/fixtures/list-multiple.js (52 bytes) - brace-expansion x 34,348 ops/sec ±1.08% (88 runs sampled) - braces x 9,264,131 ops/sec ±1.12% (88 runs sampled) - minimatch x 34,893 ops/sec ±0.87% (87 runs sampled) - - fastest is braces - -# benchmark/fixtures/no-braces.js (48 bytes) - brace-expansion x 275,368 ops/sec ±1.18% (89 runs sampled) - braces x 9,134,677 ops/sec ±0.95% (88 runs sampled) - minimatch x 3,755,954 ops/sec ±1.13% (89 runs sampled) - - fastest is braces - -# benchmark/fixtures/sequence-basic.js (41 bytes) - brace-expansion x 5,492 ops/sec ±1.35% (87 runs sampled) - braces x 8,485,034 ops/sec ±1.28% (89 runs sampled) - minimatch x 5,341 ops/sec ±1.17% (87 runs sampled) - - fastest is braces - -# benchmark/fixtures/sequence-multiple.js (51 bytes) - brace-expansion x 116 ops/sec ±0.77% (77 runs sampled) - braces x 9,445,118 ops/sec ±1.32% (84 runs sampled) - minimatch x 109 ops/sec ±1.16% (76 runs sampled) - - fastest is braces -``` - -## About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -### Related projects - -You might also be interested in these projects: - -* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.") -* [extglob](https://www.npmjs.com/package/extglob): Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob… [more](https://github.com/micromatch/extglob) | [homepage](https://github.com/micromatch/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.") -* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") -* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") -* [nanomatch](https://www.npmjs.com/package/nanomatch): Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash… [more](https://github.com/micromatch/nanomatch) | [homepage](https://github.com/micromatch/nanomatch "Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces)") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 188 | [jonschlinkert](https://github.com/jonschlinkert) | -| 4 | [doowb](https://github.com/doowb) | -| 1 | [es128](https://github.com/es128) | -| 1 | [eush77](https://github.com/eush77) | -| 1 | [hemanth](https://github.com/hemanth) | - -### Author - -**Jon Schlinkert** - -* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 17, 2018._ - -
-
-
    -
  1. this is the largest safe integer allowed in JavaScript. - -
  2. -
-
\ No newline at end of file diff --git a/node_modules/braces/index.js b/node_modules/braces/index.js deleted file mode 100644 index 048e1c23..00000000 --- a/node_modules/braces/index.js +++ /dev/null @@ -1,318 +0,0 @@ -'use strict'; - -/** - * Module dependencies - */ - -var toRegex = require('to-regex'); -var unique = require('array-unique'); -var extend = require('extend-shallow'); - -/** - * Local dependencies - */ - -var compilers = require('./lib/compilers'); -var parsers = require('./lib/parsers'); -var Braces = require('./lib/braces'); -var utils = require('./lib/utils'); -var MAX_LENGTH = 1024 * 64; -var cache = {}; - -/** - * Convert the given `braces` pattern into a regex-compatible string. By default, only one string is generated for every input string. Set `options.expand` to true to return an array of patterns (similar to Bash or minimatch. Before using `options.expand`, it's recommended that you read the [performance notes](#performance)). - * - * ```js - * var braces = require('braces'); - * console.log(braces('{a,b,c}')); - * //=> ['(a|b|c)'] - * - * console.log(braces('{a,b,c}', {expand: true})); - * //=> ['a', 'b', 'c'] - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {String} - * @api public - */ - -function braces(pattern, options) { - var key = utils.createKey(String(pattern), options); - var arr = []; - - var disabled = options && options.cache === false; - if (!disabled && cache.hasOwnProperty(key)) { - return cache[key]; - } - - if (Array.isArray(pattern)) { - for (var i = 0; i < pattern.length; i++) { - arr.push.apply(arr, braces.create(pattern[i], options)); - } - } else { - arr = braces.create(pattern, options); - } - - if (options && options.nodupes === true) { - arr = unique(arr); - } - - if (!disabled) { - cache[key] = arr; - } - return arr; -} - -/** - * Expands a brace pattern into an array. This method is called by the main [braces](#braces) function when `options.expand` is true. Before using this method it's recommended that you read the [performance notes](#performance)) and advantages of using [.optimize](#optimize) instead. - * - * ```js - * var braces = require('braces'); - * console.log(braces.expand('a/{b,c}/d')); - * //=> ['a/b/d', 'a/c/d']; - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.expand = function(pattern, options) { - return braces.create(pattern, extend({}, options, {expand: true})); -}; - -/** - * Expands a brace pattern into a regex-compatible, optimized string. This method is called by the main [braces](#braces) function by default. - * - * ```js - * var braces = require('braces'); - * console.log(braces.expand('a/{b,c}/d')); - * //=> ['a/(b|c)/d'] - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.optimize = function(pattern, options) { - return braces.create(pattern, options); -}; - -/** - * Processes a brace pattern and returns either an expanded array (if `options.expand` is true), a highly optimized regex-compatible string. This method is called by the main [braces](#braces) function. - * - * ```js - * var braces = require('braces'); - * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) - * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.create = function(pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('expected a string'); - } - - var maxLength = (options && options.maxLength) || MAX_LENGTH; - if (pattern.length >= maxLength) { - throw new Error('expected pattern to be less than ' + maxLength + ' characters'); - } - - function create() { - if (pattern === '' || pattern.length < 3) { - return [pattern]; - } - - if (utils.isEmptySets(pattern)) { - return []; - } - - if (utils.isQuotedString(pattern)) { - return [pattern.slice(1, -1)]; - } - - var proto = new Braces(options); - var result = !options || options.expand !== true - ? proto.optimize(pattern, options) - : proto.expand(pattern, options); - - // get the generated pattern(s) - var arr = result.output; - - // filter out empty strings if specified - if (options && options.noempty === true) { - arr = arr.filter(Boolean); - } - - // filter out duplicates if specified - if (options && options.nodupes === true) { - arr = unique(arr); - } - - Object.defineProperty(arr, 'result', { - enumerable: false, - value: result - }); - - return arr; - } - - return memoize('create', pattern, options, create); -}; - -/** - * Create a regular expression from the given string `pattern`. - * - * ```js - * var braces = require('braces'); - * - * console.log(braces.makeRe('id-{200..300}')); - * //=> /^(?:id-(20[0-9]|2[1-9][0-9]|300))$/ - * ``` - * @param {String} `pattern` The pattern to convert to regex. - * @param {Object} `options` - * @return {RegExp} - * @api public - */ - -braces.makeRe = function(pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('expected a string'); - } - - var maxLength = (options && options.maxLength) || MAX_LENGTH; - if (pattern.length >= maxLength) { - throw new Error('expected pattern to be less than ' + maxLength + ' characters'); - } - - function makeRe() { - var arr = braces(pattern, options); - var opts = extend({strictErrors: false}, options); - return toRegex(arr, opts); - } - - return memoize('makeRe', pattern, options, makeRe); -}; - -/** - * Parse the given `str` with the given `options`. - * - * ```js - * var braces = require('braces'); - * var ast = braces.parse('a/{b,c}/d'); - * console.log(ast); - * // { type: 'root', - * // errors: [], - * // input: 'a/{b,c}/d', - * // nodes: - * // [ { type: 'bos', val: '' }, - * // { type: 'text', val: 'a/' }, - * // { type: 'brace', - * // nodes: - * // [ { type: 'brace.open', val: '{' }, - * // { type: 'text', val: 'b,c' }, - * // { type: 'brace.close', val: '}' } ] }, - * // { type: 'text', val: '/d' }, - * // { type: 'eos', val: '' } ] } - * ``` - * @param {String} `pattern` Brace pattern to parse - * @param {Object} `options` - * @return {Object} Returns an AST - * @api public - */ - -braces.parse = function(pattern, options) { - var proto = new Braces(options); - return proto.parse(pattern, options); -}; - -/** - * Compile the given `ast` or string with the given `options`. - * - * ```js - * var braces = require('braces'); - * var ast = braces.parse('a/{b,c}/d'); - * console.log(braces.compile(ast)); - * // { options: { source: 'string' }, - * // state: {}, - * // compilers: - * // { eos: [Function], - * // noop: [Function], - * // bos: [Function], - * // brace: [Function], - * // 'brace.open': [Function], - * // text: [Function], - * // 'brace.close': [Function] }, - * // output: [ 'a/(b|c)/d' ], - * // ast: - * // { ... }, - * // parsingErrors: [] } - * ``` - * @param {Object|String} `ast` AST from [.parse](#parse). If a string is passed it will be parsed first. - * @param {Object} `options` - * @return {Object} Returns an object that has an `output` property with the compiled string. - * @api public - */ - -braces.compile = function(ast, options) { - var proto = new Braces(options); - return proto.compile(ast, options); -}; - -/** - * Clear the regex cache. - * - * ```js - * braces.clearCache(); - * ``` - * @api public - */ - -braces.clearCache = function() { - cache = braces.cache = {}; -}; - -/** - * Memoize a generated regex or function. A unique key is generated - * from the method name, pattern, and user-defined options. Set - * options.memoize to false to disable. - */ - -function memoize(type, pattern, options, fn) { - var key = utils.createKey(type + ':' + pattern, options); - var disabled = options && options.cache === false; - if (disabled) { - braces.clearCache(); - return fn(pattern, options); - } - - if (cache.hasOwnProperty(key)) { - return cache[key]; - } - - var res = fn(pattern, options); - cache[key] = res; - return res; -} - -/** - * Expose `Braces` constructor and methods - * @type {Function} - */ - -braces.Braces = Braces; -braces.compilers = compilers; -braces.parsers = parsers; -braces.cache = cache; - -/** - * Expose `braces` - * @type {Function} - */ - -module.exports = braces; diff --git a/node_modules/braces/lib/braces.js b/node_modules/braces/lib/braces.js deleted file mode 100644 index baf6bf1b..00000000 --- a/node_modules/braces/lib/braces.js +++ /dev/null @@ -1,104 +0,0 @@ -'use strict'; - -var extend = require('extend-shallow'); -var Snapdragon = require('snapdragon'); -var compilers = require('./compilers'); -var parsers = require('./parsers'); -var utils = require('./utils'); - -/** - * Customize Snapdragon parser and renderer - */ - -function Braces(options) { - this.options = extend({}, options); -} - -/** - * Initialize braces - */ - -Braces.prototype.init = function(options) { - if (this.isInitialized) return; - this.isInitialized = true; - var opts = utils.createOptions({}, this.options, options); - this.snapdragon = this.options.snapdragon || new Snapdragon(opts); - this.compiler = this.snapdragon.compiler; - this.parser = this.snapdragon.parser; - - compilers(this.snapdragon, opts); - parsers(this.snapdragon, opts); - - /** - * Call Snapdragon `.parse` method. When AST is returned, we check to - * see if any unclosed braces are left on the stack and, if so, we iterate - * over the stack and correct the AST so that compilers are called in the correct - * order and unbalance braces are properly escaped. - */ - - utils.define(this.snapdragon, 'parse', function(pattern, options) { - var parsed = Snapdragon.prototype.parse.apply(this, arguments); - this.parser.ast.input = pattern; - - var stack = this.parser.stack; - while (stack.length) { - addParent({type: 'brace.close', val: ''}, stack.pop()); - } - - function addParent(node, parent) { - utils.define(node, 'parent', parent); - parent.nodes.push(node); - } - - // add non-enumerable parser reference - utils.define(parsed, 'parser', this.parser); - return parsed; - }); -}; - -/** - * Decorate `.parse` method - */ - -Braces.prototype.parse = function(ast, options) { - if (ast && typeof ast === 'object' && ast.nodes) return ast; - this.init(options); - return this.snapdragon.parse(ast, options); -}; - -/** - * Decorate `.compile` method - */ - -Braces.prototype.compile = function(ast, options) { - if (typeof ast === 'string') { - ast = this.parse(ast, options); - } else { - this.init(options); - } - return this.snapdragon.compile(ast, options); -}; - -/** - * Expand - */ - -Braces.prototype.expand = function(pattern) { - var ast = this.parse(pattern, {expand: true}); - return this.compile(ast, {expand: true}); -}; - -/** - * Optimize - */ - -Braces.prototype.optimize = function(pattern) { - var ast = this.parse(pattern, {optimize: true}); - return this.compile(ast, {optimize: true}); -}; - -/** - * Expose `Braces` - */ - -module.exports = Braces; diff --git a/node_modules/braces/lib/compilers.js b/node_modules/braces/lib/compilers.js deleted file mode 100644 index a3b820e4..00000000 --- a/node_modules/braces/lib/compilers.js +++ /dev/null @@ -1,282 +0,0 @@ -'use strict'; - -var utils = require('./utils'); - -module.exports = function(braces, options) { - braces.compiler - - /** - * bos - */ - - .set('bos', function() { - if (this.output) return; - this.ast.queue = isEscaped(this.ast) ? [this.ast.val] : []; - this.ast.count = 1; - }) - - /** - * Square brackets - */ - - .set('bracket', function(node) { - var close = node.close; - var open = !node.escaped ? '[' : '\\['; - var negated = node.negated; - var inner = node.inner; - - inner = inner.replace(/\\(?=[\\\w]|$)/g, '\\\\'); - if (inner === ']-') { - inner = '\\]\\-'; - } - - if (negated && inner.indexOf('.') === -1) { - inner += '.'; - } - if (negated && inner.indexOf('/') === -1) { - inner += '/'; - } - - var val = open + negated + inner + close; - var queue = node.parent.queue; - var last = utils.arrayify(queue.pop()); - - queue.push(utils.join(last, val)); - queue.push.apply(queue, []); - }) - - /** - * Brace - */ - - .set('brace', function(node) { - node.queue = isEscaped(node) ? [node.val] : []; - node.count = 1; - return this.mapVisit(node.nodes); - }) - - /** - * Open - */ - - .set('brace.open', function(node) { - node.parent.open = node.val; - }) - - /** - * Inner - */ - - .set('text', function(node) { - var queue = node.parent.queue; - var escaped = node.escaped; - var segs = [node.val]; - - if (node.optimize === false) { - options = utils.extend({}, options, {optimize: false}); - } - - if (node.multiplier > 1) { - node.parent.count *= node.multiplier; - } - - if (options.quantifiers === true && utils.isQuantifier(node.val)) { - escaped = true; - - } else if (node.val.length > 1) { - if (isType(node.parent, 'brace') && !isEscaped(node)) { - var expanded = utils.expand(node.val, options); - segs = expanded.segs; - - if (expanded.isOptimized) { - node.parent.isOptimized = true; - } - - // if nothing was expanded, we probably have a literal brace - if (!segs.length) { - var val = (expanded.val || node.val); - if (options.unescape !== false) { - // unescape unexpanded brace sequence/set separators - val = val.replace(/\\([,.])/g, '$1'); - // strip quotes - val = val.replace(/["'`]/g, ''); - } - - segs = [val]; - escaped = true; - } - } - - } else if (node.val === ',') { - if (options.expand) { - node.parent.queue.push(['']); - segs = ['']; - } else { - segs = ['|']; - } - } else { - escaped = true; - } - - if (escaped && isType(node.parent, 'brace')) { - if (node.parent.nodes.length <= 4 && node.parent.count === 1) { - node.parent.escaped = true; - } else if (node.parent.length <= 3) { - node.parent.escaped = true; - } - } - - if (!hasQueue(node.parent)) { - node.parent.queue = segs; - return; - } - - var last = utils.arrayify(queue.pop()); - if (node.parent.count > 1 && options.expand) { - last = multiply(last, node.parent.count); - node.parent.count = 1; - } - - queue.push(utils.join(utils.flatten(last), segs.shift())); - queue.push.apply(queue, segs); - }) - - /** - * Close - */ - - .set('brace.close', function(node) { - var queue = node.parent.queue; - var prev = node.parent.parent; - var last = prev.queue.pop(); - var open = node.parent.open; - var close = node.val; - - if (open && close && isOptimized(node, options)) { - open = '('; - close = ')'; - } - - // if a close brace exists, and the previous segment is one character - // don't wrap the result in braces or parens - var ele = utils.last(queue); - if (node.parent.count > 1 && options.expand) { - ele = multiply(queue.pop(), node.parent.count); - node.parent.count = 1; - queue.push(ele); - } - - if (close && typeof ele === 'string' && ele.length === 1) { - open = ''; - close = ''; - } - - if ((isLiteralBrace(node, options) || noInner(node)) && !node.parent.hasEmpty) { - queue.push(utils.join(open, queue.pop() || '')); - queue = utils.flatten(utils.join(queue, close)); - } - - if (typeof last === 'undefined') { - prev.queue = [queue]; - } else { - prev.queue.push(utils.flatten(utils.join(last, queue))); - } - }) - - /** - * eos - */ - - .set('eos', function(node) { - if (this.input) return; - - if (options.optimize !== false) { - this.output = utils.last(utils.flatten(this.ast.queue)); - } else if (Array.isArray(utils.last(this.ast.queue))) { - this.output = utils.flatten(this.ast.queue.pop()); - } else { - this.output = utils.flatten(this.ast.queue); - } - - if (node.parent.count > 1 && options.expand) { - this.output = multiply(this.output, node.parent.count); - } - - this.output = utils.arrayify(this.output); - this.ast.queue = []; - }); - -}; - -/** - * Multiply the segments in the current brace level - */ - -function multiply(queue, n, options) { - return utils.flatten(utils.repeat(utils.arrayify(queue), n)); -} - -/** - * Return true if `node` is escaped - */ - -function isEscaped(node) { - return node.escaped === true; -} - -/** - * Returns true if regex parens should be used for sets. If the parent `type` - * is not `brace`, then we're on a root node, which means we should never - * expand segments and open/close braces should be `{}` (since this indicates - * a brace is missing from the set) - */ - -function isOptimized(node, options) { - if (node.parent.isOptimized) return true; - return isType(node.parent, 'brace') - && !isEscaped(node.parent) - && options.expand !== true; -} - -/** - * Returns true if the value in `node` should be wrapped in a literal brace. - * @return {Boolean} - */ - -function isLiteralBrace(node, options) { - return isEscaped(node.parent) || options.optimize !== false; -} - -/** - * Returns true if the given `node` does not have an inner value. - * @return {Boolean} - */ - -function noInner(node, type) { - if (node.parent.queue.length === 1) { - return true; - } - var nodes = node.parent.nodes; - return nodes.length === 3 - && isType(nodes[0], 'brace.open') - && !isType(nodes[1], 'text') - && isType(nodes[2], 'brace.close'); -} - -/** - * Returns true if the given `node` is the given `type` - * @return {Boolean} - */ - -function isType(node, type) { - return typeof node !== 'undefined' && node.type === type; -} - -/** - * Returns true if the given `node` has a non-empty queue. - * @return {Boolean} - */ - -function hasQueue(node) { - return Array.isArray(node.queue) && node.queue.length; -} diff --git a/node_modules/braces/lib/parsers.js b/node_modules/braces/lib/parsers.js deleted file mode 100644 index 8bf3e92b..00000000 --- a/node_modules/braces/lib/parsers.js +++ /dev/null @@ -1,360 +0,0 @@ -'use strict'; - -var Node = require('snapdragon-node'); -var utils = require('./utils'); - -/** - * Braces parsers - */ - -module.exports = function(braces, options) { - braces.parser - .set('bos', function() { - if (!this.parsed) { - this.ast = this.nodes[0] = new Node(this.ast); - } - }) - - /** - * Character parsers - */ - - .set('escape', function() { - var pos = this.position(); - var m = this.match(/^(?:\\(.)|\$\{)/); - if (!m) return; - - var prev = this.prev(); - var last = utils.last(prev.nodes); - - var node = pos(new Node({ - type: 'text', - multiplier: 1, - val: m[0] - })); - - if (node.val === '\\\\') { - return node; - } - - if (node.val === '${') { - var str = this.input; - var idx = -1; - var ch; - - while ((ch = str[++idx])) { - this.consume(1); - node.val += ch; - if (ch === '\\') { - node.val += str[++idx]; - continue; - } - if (ch === '}') { - break; - } - } - } - - if (this.options.unescape !== false) { - node.val = node.val.replace(/\\([{}])/g, '$1'); - } - - if (last.val === '"' && this.input.charAt(0) === '"') { - last.val = node.val; - this.consume(1); - return; - } - - return concatNodes.call(this, pos, node, prev, options); - }) - - /** - * Brackets: "[...]" (basic, this is overridden by - * other parsers in more advanced implementations) - */ - - .set('bracket', function() { - var isInside = this.isInside('brace'); - var pos = this.position(); - var m = this.match(/^(?:\[([!^]?)([^\]]{2,}|\]-)(\]|[^*+?]+)|\[)/); - if (!m) return; - - var prev = this.prev(); - var val = m[0]; - var negated = m[1] ? '^' : ''; - var inner = m[2] || ''; - var close = m[3] || ''; - - if (isInside && prev.type === 'brace') { - prev.text = prev.text || ''; - prev.text += val; - } - - var esc = this.input.slice(0, 2); - if (inner === '' && esc === '\\]') { - inner += esc; - this.consume(2); - - var str = this.input; - var idx = -1; - var ch; - - while ((ch = str[++idx])) { - this.consume(1); - if (ch === ']') { - close = ch; - break; - } - inner += ch; - } - } - - return pos(new Node({ - type: 'bracket', - val: val, - escaped: close !== ']', - negated: negated, - inner: inner, - close: close - })); - }) - - /** - * Empty braces (we capture these early to - * speed up processing in the compiler) - */ - - .set('multiplier', function() { - var isInside = this.isInside('brace'); - var pos = this.position(); - var m = this.match(/^\{((?:,|\{,+\})+)\}/); - if (!m) return; - - this.multiplier = true; - var prev = this.prev(); - var val = m[0]; - - if (isInside && prev.type === 'brace') { - prev.text = prev.text || ''; - prev.text += val; - } - - var node = pos(new Node({ - type: 'text', - multiplier: 1, - match: m, - val: val - })); - - return concatNodes.call(this, pos, node, prev, options); - }) - - /** - * Open - */ - - .set('brace.open', function() { - var pos = this.position(); - var m = this.match(/^\{(?!(?:[^\\}]?|,+)\})/); - if (!m) return; - - var prev = this.prev(); - var last = utils.last(prev.nodes); - - // if the last parsed character was an extglob character - // we need to _not optimize_ the brace pattern because - // it might be mistaken for an extglob by a downstream parser - if (last && last.val && isExtglobChar(last.val.slice(-1))) { - last.optimize = false; - } - - var open = pos(new Node({ - type: 'brace.open', - val: m[0] - })); - - var node = pos(new Node({ - type: 'brace', - nodes: [] - })); - - node.push(open); - prev.push(node); - this.push('brace', node); - }) - - /** - * Close - */ - - .set('brace.close', function() { - var pos = this.position(); - var m = this.match(/^\}/); - if (!m || !m[0]) return; - - var brace = this.pop('brace'); - var node = pos(new Node({ - type: 'brace.close', - val: m[0] - })); - - if (!this.isType(brace, 'brace')) { - if (this.options.strict) { - throw new Error('missing opening "{"'); - } - node.type = 'text'; - node.multiplier = 0; - node.escaped = true; - return node; - } - - var prev = this.prev(); - var last = utils.last(prev.nodes); - if (last.text) { - var lastNode = utils.last(last.nodes); - if (lastNode.val === ')' && /[!@*?+]\(/.test(last.text)) { - var open = last.nodes[0]; - var text = last.nodes[1]; - if (open.type === 'brace.open' && text && text.type === 'text') { - text.optimize = false; - } - } - } - - if (brace.nodes.length > 2) { - var first = brace.nodes[1]; - if (first.type === 'text' && first.val === ',') { - brace.nodes.splice(1, 1); - brace.nodes.push(first); - } - } - - brace.push(node); - }) - - /** - * Capture boundary characters - */ - - .set('boundary', function() { - var pos = this.position(); - var m = this.match(/^[$^](?!\{)/); - if (!m) return; - return pos(new Node({ - type: 'text', - val: m[0] - })); - }) - - /** - * One or zero, non-comma characters wrapped in braces - */ - - .set('nobrace', function() { - var isInside = this.isInside('brace'); - var pos = this.position(); - var m = this.match(/^\{[^,]?\}/); - if (!m) return; - - var prev = this.prev(); - var val = m[0]; - - if (isInside && prev.type === 'brace') { - prev.text = prev.text || ''; - prev.text += val; - } - - return pos(new Node({ - type: 'text', - multiplier: 0, - val: val - })); - }) - - /** - * Text - */ - - .set('text', function() { - var isInside = this.isInside('brace'); - var pos = this.position(); - var m = this.match(/^((?!\\)[^${}[\]])+/); - if (!m) return; - - var prev = this.prev(); - var val = m[0]; - - if (isInside && prev.type === 'brace') { - prev.text = prev.text || ''; - prev.text += val; - } - - var node = pos(new Node({ - type: 'text', - multiplier: 1, - val: val - })); - - return concatNodes.call(this, pos, node, prev, options); - }); -}; - -/** - * Returns true if the character is an extglob character. - */ - -function isExtglobChar(ch) { - return ch === '!' || ch === '@' || ch === '*' || ch === '?' || ch === '+'; -} - -/** - * Combine text nodes, and calculate empty sets (`{,,}`) - * @param {Function} `pos` Function to calculate node position - * @param {Object} `node` AST node - * @return {Object} - */ - -function concatNodes(pos, node, parent, options) { - node.orig = node.val; - var prev = this.prev(); - var last = utils.last(prev.nodes); - var isEscaped = false; - - if (node.val.length > 1) { - var a = node.val.charAt(0); - var b = node.val.slice(-1); - - isEscaped = (a === '"' && b === '"') - || (a === "'" && b === "'") - || (a === '`' && b === '`'); - } - - if (isEscaped && options.unescape !== false) { - node.val = node.val.slice(1, node.val.length - 1); - node.escaped = true; - } - - if (node.match) { - var match = node.match[1]; - if (!match || match.indexOf('}') === -1) { - match = node.match[0]; - } - - // replace each set with a single "," - var val = match.replace(/\{/g, ',').replace(/\}/g, ''); - node.multiplier *= val.length; - node.val = ''; - } - - var simpleText = last.type === 'text' - && last.multiplier === 1 - && node.multiplier === 1 - && node.val; - - if (simpleText) { - last.val += node.val; - return; - } - - prev.push(node); -} diff --git a/node_modules/braces/lib/utils.js b/node_modules/braces/lib/utils.js deleted file mode 100644 index 47166717..00000000 --- a/node_modules/braces/lib/utils.js +++ /dev/null @@ -1,343 +0,0 @@ -'use strict'; - -var splitString = require('split-string'); -var utils = module.exports; - -/** - * Module dependencies - */ - -utils.extend = require('extend-shallow'); -utils.flatten = require('arr-flatten'); -utils.isObject = require('isobject'); -utils.fillRange = require('fill-range'); -utils.repeat = require('repeat-element'); -utils.unique = require('array-unique'); - -utils.define = function(obj, key, val) { - Object.defineProperty(obj, key, { - writable: true, - configurable: true, - enumerable: false, - value: val - }); -}; - -/** - * Returns true if the given string contains only empty brace sets. - */ - -utils.isEmptySets = function(str) { - return /^(?:\{,\})+$/.test(str); -}; - -/** - * Returns true if the given string contains only empty brace sets. - */ - -utils.isQuotedString = function(str) { - var open = str.charAt(0); - if (open === '\'' || open === '"' || open === '`') { - return str.slice(-1) === open; - } - return false; -}; - -/** - * Create the key to use for memoization. The unique key is generated - * by iterating over the options and concatenating key-value pairs - * to the pattern string. - */ - -utils.createKey = function(pattern, options) { - var id = pattern; - if (typeof options === 'undefined') { - return id; - } - var keys = Object.keys(options); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - id += ';' + key + '=' + String(options[key]); - } - return id; -}; - -/** - * Normalize options - */ - -utils.createOptions = function(options) { - var opts = utils.extend.apply(null, arguments); - if (typeof opts.expand === 'boolean') { - opts.optimize = !opts.expand; - } - if (typeof opts.optimize === 'boolean') { - opts.expand = !opts.optimize; - } - if (opts.optimize === true) { - opts.makeRe = true; - } - return opts; -}; - -/** - * Join patterns in `a` to patterns in `b` - */ - -utils.join = function(a, b, options) { - options = options || {}; - a = utils.arrayify(a); - b = utils.arrayify(b); - - if (!a.length) return b; - if (!b.length) return a; - - var len = a.length; - var idx = -1; - var arr = []; - - while (++idx < len) { - var val = a[idx]; - if (Array.isArray(val)) { - for (var i = 0; i < val.length; i++) { - val[i] = utils.join(val[i], b, options); - } - arr.push(val); - continue; - } - - for (var j = 0; j < b.length; j++) { - var bval = b[j]; - - if (Array.isArray(bval)) { - arr.push(utils.join(val, bval, options)); - } else { - arr.push(val + bval); - } - } - } - return arr; -}; - -/** - * Split the given string on `,` if not escaped. - */ - -utils.split = function(str, options) { - var opts = utils.extend({sep: ','}, options); - if (typeof opts.keepQuotes !== 'boolean') { - opts.keepQuotes = true; - } - if (opts.unescape === false) { - opts.keepEscaping = true; - } - return splitString(str, opts, utils.escapeBrackets(opts)); -}; - -/** - * Expand ranges or sets in the given `pattern`. - * - * @param {String} `str` - * @param {Object} `options` - * @return {Object} - */ - -utils.expand = function(str, options) { - var opts = utils.extend({rangeLimit: 10000}, options); - var segs = utils.split(str, opts); - var tok = { segs: segs }; - - if (utils.isQuotedString(str)) { - return tok; - } - - if (opts.rangeLimit === true) { - opts.rangeLimit = 10000; - } - - if (segs.length > 1) { - if (opts.optimize === false) { - tok.val = segs[0]; - return tok; - } - - tok.segs = utils.stringifyArray(tok.segs); - } else if (segs.length === 1) { - var arr = str.split('..'); - - if (arr.length === 1) { - tok.val = tok.segs[tok.segs.length - 1] || tok.val || str; - tok.segs = []; - return tok; - } - - if (arr.length === 2 && arr[0] === arr[1]) { - tok.escaped = true; - tok.val = arr[0]; - tok.segs = []; - return tok; - } - - if (arr.length > 1) { - if (opts.optimize !== false) { - opts.optimize = true; - delete opts.expand; - } - - if (opts.optimize !== true) { - var min = Math.min(arr[0], arr[1]); - var max = Math.max(arr[0], arr[1]); - var step = arr[2] || 1; - - if (opts.rangeLimit !== false && ((max - min) / step >= opts.rangeLimit)) { - throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); - } - } - - arr.push(opts); - tok.segs = utils.fillRange.apply(null, arr); - - if (!tok.segs.length) { - tok.escaped = true; - tok.val = str; - return tok; - } - - if (opts.optimize === true) { - tok.segs = utils.stringifyArray(tok.segs); - } - - if (tok.segs === '') { - tok.val = str; - } else { - tok.val = tok.segs[0]; - } - return tok; - } - } else { - tok.val = str; - } - return tok; -}; - -/** - * Ensure commas inside brackets and parens are not split. - * @param {Object} `tok` Token from the `split-string` module - * @return {undefined} - */ - -utils.escapeBrackets = function(options) { - return function(tok) { - if (tok.escaped && tok.val === 'b') { - tok.val = '\\b'; - return; - } - - if (tok.val !== '(' && tok.val !== '[') return; - var opts = utils.extend({}, options); - var brackets = []; - var parens = []; - var stack = []; - var val = tok.val; - var str = tok.str; - var i = tok.idx - 1; - - while (++i < str.length) { - var ch = str[i]; - - if (ch === '\\') { - val += (opts.keepEscaping === false ? '' : ch) + str[++i]; - continue; - } - - if (ch === '(') { - parens.push(ch); - stack.push(ch); - } - - if (ch === '[') { - brackets.push(ch); - stack.push(ch); - } - - if (ch === ')') { - parens.pop(); - stack.pop(); - if (!stack.length) { - val += ch; - break; - } - } - - if (ch === ']') { - brackets.pop(); - stack.pop(); - if (!stack.length) { - val += ch; - break; - } - } - val += ch; - } - - tok.split = false; - tok.val = val.slice(1); - tok.idx = i; - }; -}; - -/** - * Returns true if the given string looks like a regex quantifier - * @return {Boolean} - */ - -utils.isQuantifier = function(str) { - return /^(?:[0-9]?,[0-9]|[0-9],)$/.test(str); -}; - -/** - * Cast `val` to an array. - * @param {*} `val` - */ - -utils.stringifyArray = function(arr) { - return [utils.arrayify(arr).join('|')]; -}; - -/** - * Cast `val` to an array. - * @param {*} `val` - */ - -utils.arrayify = function(arr) { - if (typeof arr === 'undefined') { - return []; - } - if (typeof arr === 'string') { - return [arr]; - } - return arr; -}; - -/** - * Returns true if the given `str` is a non-empty string - * @return {Boolean} - */ - -utils.isString = function(str) { - return str != null && typeof str === 'string'; -}; - -/** - * Get the last element from `array` - * @param {Array} `array` - * @return {*} - */ - -utils.last = function(arr, n) { - return arr[arr.length - (n || 1)]; -}; - -utils.escapeRegex = function(str) { - return str.replace(/\\?([!^*?()[\]{}+?/])/g, '\\$1'); -}; diff --git a/node_modules/braces/node_modules/extend-shallow/LICENSE b/node_modules/braces/node_modules/extend-shallow/LICENSE deleted file mode 100644 index fa30c4cb..00000000 --- a/node_modules/braces/node_modules/extend-shallow/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/braces/node_modules/extend-shallow/README.md b/node_modules/braces/node_modules/extend-shallow/README.md deleted file mode 100644 index cdc45d4f..00000000 --- a/node_modules/braces/node_modules/extend-shallow/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# extend-shallow [![NPM version](https://badge.fury.io/js/extend-shallow.svg)](http://badge.fury.io/js/extend-shallow) [![Build Status](https://travis-ci.org/jonschlinkert/extend-shallow.svg)](https://travis-ci.org/jonschlinkert/extend-shallow) - -> Extend an object with the properties of additional objects. node.js/javascript util. - -## Install - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i extend-shallow --save -``` - -## Usage - -```js -var extend = require('extend-shallow'); - -extend({a: 'b'}, {c: 'd'}) -//=> {a: 'b', c: 'd'} -``` - -Pass an empty object to shallow clone: - -```js -var obj = {}; -extend(obj, {a: 'b'}, {c: 'd'}) -//=> {a: 'b', c: 'd'} -``` - -## Related - -* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. -* [for-own](https://github.com/jonschlinkert/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) -* [for-in](https://github.com/jonschlinkert/for-in): Iterate over the own and inherited enumerable properties of an objecte, and return an object… [more](https://github.com/jonschlinkert/for-in) -* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor. -* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null. -* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value. - -## Running tests - -Install dev dependencies: - -```sh -$ npm i -d && npm test -``` - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2015 Jon Schlinkert -Released under the MIT license. - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 29, 2015._ \ No newline at end of file diff --git a/node_modules/braces/node_modules/extend-shallow/index.js b/node_modules/braces/node_modules/extend-shallow/index.js deleted file mode 100644 index 92a067fc..00000000 --- a/node_modules/braces/node_modules/extend-shallow/index.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -var isObject = require('is-extendable'); - -module.exports = function extend(o/*, objects*/) { - if (!isObject(o)) { o = {}; } - - var len = arguments.length; - for (var i = 1; i < len; i++) { - var obj = arguments[i]; - - if (isObject(obj)) { - assign(o, obj); - } - } - return o; -}; - -function assign(a, b) { - for (var key in b) { - if (hasOwn(b, key)) { - a[key] = b[key]; - } - } -} - -/** - * Returns true if the given `key` is an own property of `obj`. - */ - -function hasOwn(obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key); -} diff --git a/node_modules/braces/node_modules/extend-shallow/package.json b/node_modules/braces/node_modules/extend-shallow/package.json deleted file mode 100644 index 44bf8310..00000000 --- a/node_modules/braces/node_modules/extend-shallow/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "_args": [ - [ - "extend-shallow@2.0.1", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "extend-shallow@2.0.1", - "_id": "extend-shallow@2.0.1", - "_inBundle": false, - "_integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "_location": "/braces/extend-shallow", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "extend-shallow@2.0.1", - "name": "extend-shallow", - "escapedName": "extend-shallow", - "rawSpec": "2.0.1", - "saveSpec": null, - "fetchSpec": "2.0.1" - }, - "_requiredBy": [ - "/braces" - ], - "_resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "_spec": "2.0.1", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/extend-shallow/issues" - }, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "description": "Extend an object with the properties of additional objects. node.js/javascript util.", - "devDependencies": { - "array-slice": "^0.2.3", - "benchmarked": "^0.1.4", - "chalk": "^1.0.0", - "for-own": "^0.1.3", - "glob": "^5.0.12", - "is-plain-object": "^2.0.1", - "kind-of": "^2.0.0", - "minimist": "^1.1.1", - "mocha": "^2.2.5", - "should": "^7.0.1" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/extend-shallow", - "keywords": [ - "assign", - "extend", - "javascript", - "js", - "keys", - "merge", - "obj", - "object", - "prop", - "properties", - "property", - "props", - "shallow", - "util", - "utility", - "utils", - "value" - ], - "license": "MIT", - "main": "index.js", - "name": "extend-shallow", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/extend-shallow.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "2.0.1" -} diff --git a/node_modules/braces/package.json b/node_modules/braces/package.json deleted file mode 100644 index 4b435476..00000000 --- a/node_modules/braces/package.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "_args": [ - [ - "braces@2.3.2", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "braces@2.3.2", - "_id": "braces@2.3.2", - "_inBundle": false, - "_integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "_location": "/braces", - "_phantomChildren": { - "is-extendable": "0.1.1" - }, - "_requested": { - "type": "version", - "registry": true, - "raw": "braces@2.3.2", - "name": "braces", - "escapedName": "braces", - "rawSpec": "2.3.2", - "saveSpec": null, - "fetchSpec": "2.3.2" - }, - "_requiredBy": [ - "/micromatch" - ], - "_resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "_spec": "2.3.2", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/micromatch/braces/issues" - }, - "contributors": [ - { - "name": "Brian Woodward", - "url": "https://twitter.com/doowb" - }, - { - "name": "Elan Shanker", - "url": "https://github.com/es128" - }, - { - "name": "Eugene Sharygin", - "url": "https://github.com/eush77" - }, - { - "name": "hemanth.hm", - "url": "http://h3manth.com" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - } - ], - "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.", - "devDependencies": { - "ansi-cyan": "^0.1.1", - "benchmarked": "^2.0.0", - "brace-expansion": "^1.1.8", - "cross-spawn": "^5.1.0", - "gulp": "^3.9.1", - "gulp-eslint": "^4.0.0", - "gulp-format-md": "^1.0.0", - "gulp-istanbul": "^1.1.2", - "gulp-mocha": "^3.0.1", - "gulp-unused": "^0.2.1", - "is-windows": "^1.0.1", - "minimatch": "^3.0.4", - "mocha": "^3.2.0", - "noncharacters": "^1.1.0", - "text-table": "^0.2.0", - "time-diff": "^0.3.1", - "yargs-parser": "^8.0.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js", - "lib" - ], - "homepage": "https://github.com/micromatch/braces", - "keywords": [ - "alpha", - "alphabetical", - "bash", - "brace", - "braces", - "expand", - "expansion", - "filepath", - "fill", - "fs", - "glob", - "globbing", - "letter", - "match", - "matches", - "matching", - "number", - "numerical", - "path", - "range", - "ranges", - "sh" - ], - "license": "MIT", - "main": "index.js", - "name": "braces", - "repository": { - "type": "git", - "url": "git+https://github.com/micromatch/braces.git" - }, - "scripts": { - "benchmark": "node benchmark", - "test": "mocha" - }, - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "lint": { - "reflinks": true - }, - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "expand-brackets", - "extglob", - "fill-range", - "micromatch", - "nanomatch" - ] - } - }, - "version": "2.3.2" -} diff --git a/node_modules/browser-process-hrtime/LICENSE b/node_modules/browser-process-hrtime/LICENSE deleted file mode 100644 index d78d0763..00000000 --- a/node_modules/browser-process-hrtime/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -Copyright 2014 kumavis - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. 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. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/browser-process-hrtime/README.md b/node_modules/browser-process-hrtime/README.md deleted file mode 100644 index acecb1c5..00000000 --- a/node_modules/browser-process-hrtime/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# browser-process-hrtime - -Browser shim for Node.js process.hrtime(). -See [documentation at nodejs.org](http://nodejs.org/api/process.html#process_process_hrtime) - -### usage -Use hrtime independant of environment (node or browser). -It will use process.hrtime first and fallback if not present. -```js -var hrtime = require('browser-process-hrtime') -var start = hrtime() -// ... -var delta = hrtime(start) -``` - -### monkey-patching -You can monkey-patch process.hrtime for your dependency graph like this: -```js -process.hrtime = require('browser-process-hrtime') -var coolTool = require('module-that-uses-hrtime-somewhere-in-its-depths') -``` - -### note -This was originally pull-requested against [node-process](https://github.com/defunctzombie/node-process), -but they are trying to stay lean. diff --git a/node_modules/browser-process-hrtime/index.js b/node_modules/browser-process-hrtime/index.js deleted file mode 100644 index 7312c2ca..00000000 --- a/node_modules/browser-process-hrtime/index.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = process.hrtime || hrtime - -// polyfil for window.performance.now -var performance = global.performance || {} -var performanceNow = - performance.now || - performance.mozNow || - performance.msNow || - performance.oNow || - performance.webkitNow || - function(){ return (new Date()).getTime() } - -// generate timestamp or delta -// see http://nodejs.org/api/process.html#process_process_hrtime -function hrtime(previousTimestamp){ - var clocktime = performanceNow.call(performance)*1e-3 - var seconds = Math.floor(clocktime) - var nanoseconds = Math.floor((clocktime%1)*1e9) - if (previousTimestamp) { - seconds = seconds - previousTimestamp[0] - nanoseconds = nanoseconds - previousTimestamp[1] - if (nanoseconds<0) { - seconds-- - nanoseconds += 1e9 - } - } - return [seconds,nanoseconds] -} \ No newline at end of file diff --git a/node_modules/browser-process-hrtime/package.json b/node_modules/browser-process-hrtime/package.json deleted file mode 100644 index bb1d45a6..00000000 --- a/node_modules/browser-process-hrtime/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "_args": [ - [ - "browser-process-hrtime@0.1.3", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "browser-process-hrtime@0.1.3", - "_id": "browser-process-hrtime@0.1.3", - "_inBundle": false, - "_integrity": "sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw==", - "_location": "/browser-process-hrtime", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "browser-process-hrtime@0.1.3", - "name": "browser-process-hrtime", - "escapedName": "browser-process-hrtime", - "rawSpec": "0.1.3", - "saveSpec": null, - "fetchSpec": "0.1.3" - }, - "_requiredBy": [ - "/w3c-hr-time" - ], - "_resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz", - "_spec": "0.1.3", - "_where": "E:\\python\\setup-php", - "author": { - "name": "kumavis" - }, - "bugs": { - "url": "https://github.com/kumavis/browser-process-hrtime/issues" - }, - "description": "Shim for process.hrtime in the browser", - "homepage": "https://github.com/kumavis/browser-process-hrtime#readme", - "license": "BSD-2-Clause", - "main": "index.js", - "name": "browser-process-hrtime", - "repository": { - "type": "git", - "url": "git://github.com/kumavis/browser-process-hrtime.git" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "version": "0.1.3" -} diff --git a/node_modules/browser-resolve/LICENSE b/node_modules/browser-resolve/LICENSE deleted file mode 100644 index 1a0e8373..00000000 --- a/node_modules/browser-resolve/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013-2015 Roman Shtylman - -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/browser-resolve/README.md b/node_modules/browser-resolve/README.md deleted file mode 100644 index 38ec854f..00000000 --- a/node_modules/browser-resolve/README.md +++ /dev/null @@ -1,146 +0,0 @@ -# browser-resolve [![Build Status](https://travis-ci.org/defunctzombie/node-browser-resolve.png?branch=master)](https://travis-ci.org/defunctzombie/node-browser-resolve) - -node.js resolve algorithm with [browser field](https://github.com/defunctzombie/package-browser-field-spec) support. - -## api - -### resolve(id, opts={}, cb) - -Resolve a module path and call `cb(err, path [, pkg])` - -Options: - -* `basedir` - directory to begin resolving from -* `browser` - the 'browser' property to use from package.json (defaults to 'browser') -* `filename` - the calling filename where the `require()` call originated (in the source) -* `modules` - object with module id/name -> path mappings to consult before doing manual resolution (use to provide core modules) -* `packageFilter` - transform the parsed `package.json` contents before looking at the `main` field -* `paths` - `require.paths` array to use if nothing is found on the normal `node_modules` recursive walk - -Options supported by [node-resolve](https://github.com/substack/node-resolve#resolveid-opts-cb) can be used. - -### resolve.sync(id, opts={}) - -Same as the async resolve, just uses sync methods. - -Options supported by [node-resolve](https://github.com/substack/node-resolve#resolvesyncid-opts) `sync` can be used. - -## basic usage - -you can resolve files like `require.resolve()`: -``` js -var resolve = require('browser-resolve'); -resolve('../', { filename: __filename }, function(err, path) { - console.log(path); -}); -``` - -``` -$ node example/resolve.js -/home/substack/projects/node-browser-resolve/index.js -``` - -## core modules - -By default, core modules (http, dgram, etc) will return their same name as the path. If you want to have specific paths returned, specify a `modules` property in the options object. - -``` js -var shims = { - http: '/your/path/to/http.js' -}; - -var resolve = require('browser-resolve'); -resolve('fs', { modules: shims }, function(err, path) { - console.log(path); -}); -``` - -``` -$ node example/builtin.js -/home/substack/projects/node-browser-resolve/builtin/fs.js -``` - -## browser field -browser-specific versions of modules - -``` js -{ - "name": "custom", - "version": "0.0.0", - "browser": { - "./main.js": "custom.js" - }, - "chromeapp": { - "./main.js": "custom-chromeapp.js" - } -} -``` - -``` js -var resolve = require('browser-resolve'); -var parent = { filename: __dirname + '/custom/file.js' /*, browser: 'chromeapp' */ }; -resolve('./main.js', parent, function(err, path) { - console.log(path); -}); -``` - -``` -$ node example/custom.js -/home/substack/projects/node-browser-resolve/example/custom/custom.js -``` - -## skip - -You can skip over dependencies by setting a -[browser field](https://gist.github.com/defunctzombie/4339901) -value to `false`: - -``` json -{ - "name": "skip", - "version": "0.0.0", - "browser": { - "tar": false - } -} -``` - -This is handy if you have code like: - -``` js -var tar = require('tar'); - -exports.add = function (a, b) { - return a + b; -}; - -exports.parse = function () { - return tar.Parse(); -}; -``` - -so that `require('tar')` will just return `{}` in the browser because you don't -intend to support the `.parse()` export in a browser environment. - -``` js -var resolve = require('browser-resolve'); -var parent = { filename: __dirname + '/skip/main.js' }; -resolve('tar', parent, function(err, path) { - console.log(path); -}); -``` - -``` -$ node example/skip.js -/home/substack/projects/node-browser-resolve/empty.js -``` - -# license - -MIT - -# upgrade notes - -Prior to v1.x this library provided shims for node core modules. These have since been removed. If you want to have alternative core modules provided, use the `modules` option when calling resolve. - -This was done to allow package managers to choose which shims they want to use without browser-resolve being the central point of update. diff --git a/node_modules/browser-resolve/empty.js b/node_modules/browser-resolve/empty.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browser-resolve/index.js b/node_modules/browser-resolve/index.js deleted file mode 100644 index 8a1908ad..00000000 --- a/node_modules/browser-resolve/index.js +++ /dev/null @@ -1,345 +0,0 @@ -// builtin -var fs = require('fs'); -var path = require('path'); - -// vendor -var resv = require('resolve'); - -// given a path, create an array of node_module paths for it -// borrowed from substack/resolve -function nodeModulesPaths (start, cb) { - var splitRe = process.platform === 'win32' ? /[\/\\]/ : /\/+/; - var parts = start.split(splitRe); - - var dirs = []; - for (var i = parts.length - 1; i >= 0; i--) { - if (parts[i] === 'node_modules') continue; - var dir = path.join.apply( - path, parts.slice(0, i + 1).concat(['node_modules']) - ); - if (!parts[0].match(/([A-Za-z]:)/)) { - dir = '/' + dir; - } - dirs.push(dir); - } - return dirs; -} - -function find_shims_in_package(pkgJson, cur_path, shims, browser) { - try { - var info = JSON.parse(pkgJson); - } - catch (err) { - err.message = pkgJson + ' : ' + err.message - throw err; - } - - var replacements = getReplacements(info, browser); - - // no replacements, skip shims - if (!replacements) { - return; - } - - // if browser mapping is a string - // then it just replaces the main entry point - if (typeof replacements === 'string') { - var key = path.resolve(cur_path, info.main || 'index.js'); - shims[key] = path.resolve(cur_path, replacements); - return; - } - - // http://nodejs.org/api/modules.html#modules_loading_from_node_modules_folders - Object.keys(replacements).forEach(function(key) { - var val; - if (replacements[key] === false) { - val = path.normalize(__dirname + '/empty.js'); - } - else { - val = replacements[key]; - // if target is a relative path, then resolve - // otherwise we assume target is a module - if (val[0] === '.') { - val = path.resolve(cur_path, val); - } - } - - if (key[0] === '/' || key[0] === '.') { - // if begins with / ../ or ./ then we must resolve to a full path - key = path.resolve(cur_path, key); - } - shims[key] = val; - }); - - [ '.js', '.json' ].forEach(function (ext) { - Object.keys(shims).forEach(function (key) { - if (!shims[key + ext]) { - shims[key + ext] = shims[key]; - } - }); - }); -} - -// paths is mutated -// load shims from first package.json file found -function load_shims(paths, browser, cb) { - // identify if our file should be replaced per the browser field - // original filename|id -> replacement - var shims = Object.create(null); - - (function next() { - var cur_path = paths.shift(); - if (!cur_path) { - return cb(null, shims); - } - - var pkg_path = path.join(cur_path, 'package.json'); - - fs.readFile(pkg_path, 'utf8', function(err, data) { - if (err) { - // ignore paths we can't open - // avoids an exists check - if (err.code === 'ENOENT') { - return next(); - } - - return cb(err); - } - try { - find_shims_in_package(data, cur_path, shims, browser); - return cb(null, shims); - } - catch (err) { - return cb(err); - } - }); - })(); -}; - -// paths is mutated -// synchronously load shims from first package.json file found -function load_shims_sync(paths, browser) { - // identify if our file should be replaced per the browser field - // original filename|id -> replacement - var shims = Object.create(null); - var cur_path; - - while (cur_path = paths.shift()) { - var pkg_path = path.join(cur_path, 'package.json'); - - try { - var data = fs.readFileSync(pkg_path, 'utf8'); - find_shims_in_package(data, cur_path, shims, browser); - return shims; - } - catch (err) { - // ignore paths we can't open - // avoids an exists check - if (err.code === 'ENOENT') { - continue; - } - - throw err; - } - } - return shims; -} - -function build_resolve_opts(opts, base) { - var packageFilter = opts.packageFilter; - var browser = normalizeBrowserFieldName(opts.browser) - - opts.basedir = base; - opts.packageFilter = function (info, pkgdir) { - if (packageFilter) info = packageFilter(info, pkgdir); - - var replacements = getReplacements(info, browser); - - // no browser field, keep info unchanged - if (!replacements) { - return info; - } - - info[browser] = replacements; - - // replace main - if (typeof replacements === 'string') { - info.main = replacements; - return info; - } - - var replace_main = replacements[info.main || './index.js'] || - replacements['./' + info.main || './index.js']; - - info.main = replace_main || info.main; - return info; - }; - - var pathFilter = opts.pathFilter; - opts.pathFilter = function(info, resvPath, relativePath) { - if (relativePath[0] != '.') { - relativePath = './' + relativePath; - } - var mappedPath; - if (pathFilter) { - mappedPath = pathFilter.apply(this, arguments); - } - if (mappedPath) { - return mappedPath; - } - - var replacements = info[browser]; - if (!replacements) { - return; - } - - mappedPath = replacements[relativePath]; - if (!mappedPath && path.extname(relativePath) === '') { - mappedPath = replacements[relativePath + '.js']; - if (!mappedPath) { - mappedPath = replacements[relativePath + '.json']; - } - } - return mappedPath; - }; - - return opts; -} - -function resolve(id, opts, cb) { - - // opts.filename - // opts.paths - // opts.modules - // opts.packageFilter - - opts = opts || {}; - opts.filename = opts.filename || ''; - - var base = path.dirname(opts.filename); - - if (opts.basedir) { - base = opts.basedir; - } - - var paths = nodeModulesPaths(base); - - if (opts.paths) { - paths.push.apply(paths, opts.paths); - } - - paths = paths.map(function(p) { - return path.dirname(p); - }); - - // we must always load shims because the browser field could shim out a module - load_shims(paths, opts.browser, function(err, shims) { - if (err) { - return cb(err); - } - - var resid = path.resolve(opts.basedir || path.dirname(opts.filename), id); - if (shims[id] || shims[resid]) { - var xid = shims[id] ? id : resid; - // if the shim was is an absolute path, it was fully resolved - if (shims[xid][0] === '/') { - return resv(shims[xid], build_resolve_opts(opts, base), function(err, full, pkg) { - cb(null, full, pkg); - }); - } - - // module -> alt-module shims - id = shims[xid]; - } - - var modules = opts.modules || Object.create(null); - var shim_path = modules[id]; - if (shim_path) { - return cb(null, shim_path); - } - - // our browser field resolver - // if browser field is an object tho? - var full = resv(id, build_resolve_opts(opts, base), function(err, full, pkg) { - if (err) { - return cb(err); - } - - var resolved = (shims) ? shims[full] || full : full; - cb(null, resolved, pkg); - }); - }); -}; - -resolve.sync = function (id, opts) { - - // opts.filename - // opts.paths - // opts.modules - // opts.packageFilter - - opts = opts || {}; - opts.filename = opts.filename || ''; - - var base = path.dirname(opts.filename); - - if (opts.basedir) { - base = opts.basedir; - } - - var paths = nodeModulesPaths(base); - - if (opts.paths) { - paths.push.apply(paths, opts.paths); - } - - paths = paths.map(function(p) { - return path.dirname(p); - }); - - // we must always load shims because the browser field could shim out a module - var shims = load_shims_sync(paths, opts.browser); - var resid = path.resolve(opts.basedir || path.dirname(opts.filename), id); - - if (shims[id] || shims[resid]) { - var xid = shims[id] ? id : resid; - // if the shim was is an absolute path, it was fully resolved - if (shims[xid][0] === '/') { - return resv.sync(shims[xid], build_resolve_opts(opts, base)); - } - - // module -> alt-module shims - id = shims[xid]; - } - - var modules = opts.modules || Object.create(null); - var shim_path = modules[id]; - if (shim_path) { - return shim_path; - } - - // our browser field resolver - // if browser field is an object tho? - var full = resv.sync(id, build_resolve_opts(opts, base)); - - return (shims) ? shims[full] || full : full; -}; - -function normalizeBrowserFieldName(browser) { - return browser || 'browser'; -} - -function getReplacements(info, browser) { - browser = normalizeBrowserFieldName(browser); - var replacements = info[browser] || info.browser; - - // support legacy browserify field for easier migration from legacy - // many packages used this field historically - if (typeof info.browserify === 'string' && !replacements) { - replacements = info.browserify; - } - - return replacements; -} - -module.exports = resolve; diff --git a/node_modules/browser-resolve/node_modules/resolve/.travis.yml b/node_modules/browser-resolve/node_modules/resolve/.travis.yml deleted file mode 100644 index 895dbd36..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/node_modules/browser-resolve/node_modules/resolve/LICENSE b/node_modules/browser-resolve/node_modules/resolve/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/browser-resolve/node_modules/resolve/example/async.js b/node_modules/browser-resolve/node_modules/resolve/example/async.js deleted file mode 100644 index 6624ff72..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/example/async.js +++ /dev/null @@ -1,5 +0,0 @@ -var resolve = require('../'); -resolve('tap', { basedir: __dirname }, function (err, res) { - if (err) console.error(err) - else console.log(res) -}); diff --git a/node_modules/browser-resolve/node_modules/resolve/example/sync.js b/node_modules/browser-resolve/node_modules/resolve/example/sync.js deleted file mode 100644 index 54b2cc10..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/example/sync.js +++ /dev/null @@ -1,3 +0,0 @@ -var resolve = require('../'); -var res = resolve.sync('tap', { basedir: __dirname }); -console.log(res); diff --git a/node_modules/browser-resolve/node_modules/resolve/index.js b/node_modules/browser-resolve/node_modules/resolve/index.js deleted file mode 100644 index 51f194b4..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var core = require('./lib/core'); -exports = module.exports = require('./lib/async'); -exports.core = core; -exports.isCore = function (x) { return core[x] }; -exports.sync = require('./lib/sync'); diff --git a/node_modules/browser-resolve/node_modules/resolve/lib/async.js b/node_modules/browser-resolve/node_modules/resolve/lib/async.js deleted file mode 100644 index 0f0eeca5..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/lib/async.js +++ /dev/null @@ -1,192 +0,0 @@ -var core = require('./core'); -var fs = require('fs'); -var path = require('path'); -var caller = require('./caller.js'); -var nodeModulesPaths = require('./node-modules-paths.js'); -var splitRe = process.platform === 'win32' ? /[\/\\]/ : /\//; - -module.exports = function resolve (x, opts, cb) { - if (typeof opts === 'function') { - cb = opts; - opts = {}; - } - if (!opts) opts = {}; - if (typeof x !== 'string') { - return process.nextTick(function () { - cb(new Error('path must be a string')); - }); - } - - var isFile = opts.isFile || function (file, cb) { - fs.stat(file, function (err, stat) { - if (err && err.code === 'ENOENT') cb(null, false) - else if (err) cb(err) - else cb(null, stat.isFile() || stat.isFIFO()) - }); - }; - var readFile = opts.readFile || fs.readFile; - - var extensions = opts.extensions || [ '.js' ]; - var y = opts.basedir || path.dirname(caller()); - - opts.paths = opts.paths || []; - - if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[\\\/])/.test(x)) { - var res = path.resolve(y, x); - if (x === '..') res += '/'; - if (/\/$/.test(x) && res === y) { - loadAsDirectory(res, opts.package, onfile); - } - else loadAsFile(res, opts.package, onfile); - } - else loadNodeModules(x, y, function (err, n, pkg) { - if (err) cb(err) - else if (n) cb(null, n, pkg) - else if (core[x]) return cb(null, x); - else cb(new Error("Cannot find module '" + x + "' from '" + y + "'")) - }); - - function onfile (err, m, pkg) { - if (err) cb(err) - else if (m) cb(null, m, pkg) - else loadAsDirectory(res, function (err, d, pkg) { - if (err) cb(err) - else if (d) cb(null, d, pkg) - else cb(new Error("Cannot find module '" + x + "' from '" + y + "'")) - }) - } - - function loadAsFile (x, pkg, cb) { - if (typeof pkg === 'function') { - cb = pkg; - pkg = undefined; - } - - var exts = [''].concat(extensions); - load(exts, x, pkg) - - function load (exts, x, pkg) { - if (exts.length === 0) return cb(null, undefined, pkg); - var file = x + exts[0]; - - if (pkg) onpkg(null, pkg) - else loadpkg(path.dirname(file), onpkg); - - function onpkg (err, pkg_, dir) { - pkg = pkg_; - if (err) return cb(err) - if (dir && pkg && opts.pathFilter) { - var rfile = path.relative(dir, file); - var rel = rfile.slice(0, rfile.length - exts[0].length); - var r = opts.pathFilter(pkg, x, rel); - if (r) return load( - [''].concat(extensions.slice()), - path.resolve(dir, r), - pkg - ); - } - isFile(file, onex); - } - function onex (err, ex) { - if (err) cb(err) - else if (!ex) load(exts.slice(1), x, pkg) - else cb(null, file, pkg) - } - } - } - - function loadpkg (dir, cb) { - if (dir === '' || dir === '/') return cb(null); - if (process.platform === 'win32' && /^\w:[\\\/]*$/.test(dir)) { - return cb(null); - } - if (/[\\\/]node_modules[\\\/]*$/.test(dir)) return cb(null); - - var pkgfile = path.join(dir, 'package.json'); - isFile(pkgfile, function (err, ex) { - // on err, ex is false - if (!ex) return loadpkg( - path.dirname(dir), cb - ); - - readFile(pkgfile, function (err, body) { - if (err) cb(err); - try { var pkg = JSON.parse(body) } - catch (err) {} - - if (pkg && opts.packageFilter) { - pkg = opts.packageFilter(pkg, pkgfile); - } - cb(null, pkg, dir); - }); - }); - } - - function loadAsDirectory (x, fpkg, cb) { - if (typeof fpkg === 'function') { - cb = fpkg; - fpkg = opts.package; - } - - var pkgfile = path.join(x, '/package.json'); - isFile(pkgfile, function (err, ex) { - if (err) return cb(err); - if (!ex) return loadAsFile(path.join(x, '/index'), fpkg, cb); - - readFile(pkgfile, function (err, body) { - if (err) return cb(err); - try { - var pkg = JSON.parse(body); - } - catch (err) {} - - if (opts.packageFilter) { - pkg = opts.packageFilter(pkg, pkgfile); - } - - if (pkg.main) { - if (pkg.main === '.' || pkg.main === './'){ - pkg.main = 'index' - } - loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { - if (err) return cb(err); - if (m) return cb(null, m, pkg); - if (!pkg) return loadAsFile(path.join(x, '/index'), pkg, cb); - - var dir = path.resolve(x, pkg.main); - loadAsDirectory(dir, pkg, function (err, n, pkg) { - if (err) return cb(err); - if (n) return cb(null, n, pkg); - loadAsFile(path.join(x, '/index'), pkg, cb); - }); - }); - return; - } - - loadAsFile(path.join(x, '/index'), pkg, cb); - }); - }); - } - - function loadNodeModules (x, start, cb) { - (function process (dirs) { - if (dirs.length === 0) return cb(null, undefined); - var dir = dirs[0]; - - var file = path.join(dir, '/', x); - loadAsFile(file, undefined, onfile); - - function onfile (err, m, pkg) { - if (err) return cb(err); - if (m) return cb(null, m, pkg); - loadAsDirectory(path.join(dir, '/', x), undefined, ondir); - } - - function ondir (err, n, pkg) { - if (err) return cb(err); - if (n) return cb(null, n, pkg); - process(dirs.slice(1)); - } - })(nodeModulesPaths(start, opts)); - } -}; diff --git a/node_modules/browser-resolve/node_modules/resolve/lib/caller.js b/node_modules/browser-resolve/node_modules/resolve/lib/caller.js deleted file mode 100644 index 5536549b..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/lib/caller.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = function () { - // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi - var origPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = function (_, stack) { return stack }; - var stack = (new Error()).stack; - Error.prepareStackTrace = origPrepareStackTrace; - return stack[2].getFileName(); -}; diff --git a/node_modules/browser-resolve/node_modules/resolve/lib/core.js b/node_modules/browser-resolve/node_modules/resolve/lib/core.js deleted file mode 100644 index ea4a6c87..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/lib/core.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = require('./core.json').reduce(function (acc, x) { - acc[x] = true; - return acc; -}, {}); diff --git a/node_modules/browser-resolve/node_modules/resolve/lib/core.json b/node_modules/browser-resolve/node_modules/resolve/lib/core.json deleted file mode 100644 index 28560f7e..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/lib/core.json +++ /dev/null @@ -1,38 +0,0 @@ -[ - "assert", - "buffer_ieee754", - "buffer", - "child_process", - "cluster", - "console", - "constants", - "crypto", - "_debugger", - "dgram", - "dns", - "domain", - "events", - "freelist", - "fs", - "http", - "https", - "_linklist", - "module", - "net", - "os", - "path", - "punycode", - "querystring", - "readline", - "repl", - "stream", - "string_decoder", - "sys", - "timers", - "tls", - "tty", - "url", - "util", - "vm", - "zlib" -] diff --git a/node_modules/browser-resolve/node_modules/resolve/lib/node-modules-paths.js b/node_modules/browser-resolve/node_modules/resolve/lib/node-modules-paths.js deleted file mode 100644 index ce0a0d9f..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/lib/node-modules-paths.js +++ /dev/null @@ -1,38 +0,0 @@ -var path = require('path'); - -module.exports = function (start, opts) { - var modules = opts.moduleDirectory - ? [].concat(opts.moduleDirectory) - : ['node_modules'] - ; - - // ensure that `start` is an absolute path at this point, - // resolving against the process' current working directory - start = path.resolve(start); - - var prefix = '/'; - if (/^([A-Za-z]:)/.test(start)) { - prefix = ''; - } else if (/^\\\\/.test(start)) { - prefix = '\\\\'; - } - - var splitRe = process.platform === 'win32' ? /[\/\\]/ : /\/+/; - - var parts = start.split(splitRe); - - var dirs = []; - for (var i = parts.length - 1; i >= 0; i--) { - if (modules.indexOf(parts[i]) !== -1) continue; - dirs = dirs.concat(modules.map(function(module_dir) { - return prefix + path.join( - path.join.apply(path, parts.slice(0, i + 1)), - module_dir - ); - })); - } - if (process.platform === 'win32'){ - dirs[dirs.length-1] = dirs[dirs.length-1].replace(":", ":\\"); - } - return dirs.concat(opts.paths); -} diff --git a/node_modules/browser-resolve/node_modules/resolve/lib/sync.js b/node_modules/browser-resolve/node_modules/resolve/lib/sync.js deleted file mode 100644 index ef91eddb..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/lib/sync.js +++ /dev/null @@ -1,81 +0,0 @@ -var core = require('./core'); -var fs = require('fs'); -var path = require('path'); -var caller = require('./caller.js'); -var nodeModulesPaths = require('./node-modules-paths.js'); - -module.exports = function (x, opts) { - if (!opts) opts = {}; - var isFile = opts.isFile || function (file) { - try { var stat = fs.statSync(file) } - catch (err) { if (err && err.code === 'ENOENT') return false } - return stat.isFile() || stat.isFIFO(); - }; - var readFileSync = opts.readFileSync || fs.readFileSync; - - var extensions = opts.extensions || [ '.js' ]; - var y = opts.basedir || path.dirname(caller()); - - opts.paths = opts.paths || []; - - if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[\\\/])/.test(x)) { - var res = path.resolve(y, x); - if (x === '..') res += '/'; - var m = loadAsFileSync(res) || loadAsDirectorySync(res); - if (m) return m; - } else { - var n = loadNodeModulesSync(x, y); - if (n) return n; - } - - if (core[x]) return x; - - throw new Error("Cannot find module '" + x + "' from '" + y + "'"); - - function loadAsFileSync (x) { - if (isFile(x)) { - return x; - } - - for (var i = 0; i < extensions.length; i++) { - var file = x + extensions[i]; - if (isFile(file)) { - return file; - } - } - } - - function loadAsDirectorySync (x) { - var pkgfile = path.join(x, '/package.json'); - if (isFile(pkgfile)) { - var body = readFileSync(pkgfile, 'utf8'); - try { - var pkg = JSON.parse(body); - if (opts.packageFilter) { - pkg = opts.packageFilter(pkg, x); - } - - if (pkg.main) { - var m = loadAsFileSync(path.resolve(x, pkg.main)); - if (m) return m; - var n = loadAsDirectorySync(path.resolve(x, pkg.main)); - if (n) return n; - } - } - catch (err) {} - } - - return loadAsFileSync(path.join( x, '/index')); - } - - function loadNodeModulesSync (x, start) { - var dirs = nodeModulesPaths(start, opts); - for (var i = 0; i < dirs.length; i++) { - var dir = dirs[i]; - var m = loadAsFileSync(path.join( dir, '/', x)); - if (m) return m; - var n = loadAsDirectorySync(path.join( dir, '/', x )); - if (n) return n; - } - } -}; diff --git a/node_modules/browser-resolve/node_modules/resolve/package.json b/node_modules/browser-resolve/node_modules/resolve/package.json deleted file mode 100644 index bbcadbfa..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_args": [ - [ - "resolve@1.1.7", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "resolve@1.1.7", - "_id": "resolve@1.1.7", - "_inBundle": false, - "_integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "_location": "/browser-resolve/resolve", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "resolve@1.1.7", - "name": "resolve", - "escapedName": "resolve", - "rawSpec": "1.1.7", - "saveSpec": null, - "fetchSpec": "1.1.7" - }, - "_requiredBy": [ - "/browser-resolve" - ], - "_resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "_spec": "1.1.7", - "_where": "E:\\python\\setup-php", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/node-resolve/issues" - }, - "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", - "devDependencies": { - "tap": "0.4.13", - "tape": "^3.5.0" - }, - "homepage": "https://github.com/substack/node-resolve#readme", - "keywords": [ - "resolve", - "require", - "node", - "module" - ], - "license": "MIT", - "main": "index.js", - "name": "resolve", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-resolve.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "version": "1.1.7" -} diff --git a/node_modules/browser-resolve/node_modules/resolve/readme.markdown b/node_modules/browser-resolve/node_modules/resolve/readme.markdown deleted file mode 100644 index 4fab9b04..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/readme.markdown +++ /dev/null @@ -1,148 +0,0 @@ -# resolve - -implements the [node `require.resolve()` -algorithm](http://nodejs.org/docs/v0.4.8/api/all.html#all_Together...) -such that you can `require.resolve()` on behalf of a file asynchronously and -synchronously - -[![build status](https://secure.travis-ci.org/substack/node-resolve.png)](http://travis-ci.org/substack/node-resolve) - -# example - -asynchronously resolve: - -``` js -var resolve = require('resolve'); -resolve('tap', { basedir: __dirname }, function (err, res) { - if (err) console.error(err) - else console.log(res) -}); -``` - -``` -$ node example/async.js -/home/substack/projects/node-resolve/node_modules/tap/lib/main.js -``` - -synchronously resolve: - -``` js -var resolve = require('resolve'); -var res = resolve.sync('tap', { basedir: __dirname }); -console.log(res); -``` - -``` -$ node example/sync.js -/home/substack/projects/node-resolve/node_modules/tap/lib/main.js -``` - -# methods - -``` js -var resolve = require('resolve') -``` - -## resolve(id, opts={}, cb) - -Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`. - -options are: - -* opts.basedir - directory to begin resolving from - -* opts.package - `package.json` data applicable to the module being loaded - -* opts.extensions - array of file extensions to search in order - -* opts.readFile - how to read files asynchronously - -* opts.isFile - function to asynchronously test whether a file exists - -* opts.packageFilter - transform the parsed package.json contents before looking -at the "main" field - -* opts.pathFilter(pkg, path, relativePath) - transform a path within a package - * pkg - package data - * path - the path being resolved - * relativePath - the path relative from the package.json location - * returns - a relative path that will be joined from the package.json location - -* opts.paths - require.paths array to use if nothing is found on the normal -node_modules recursive walk (probably don't use this) - -* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` - -default `opts` values: - -``` javascript -{ - paths: [], - basedir: __dirname, - extensions: [ '.js' ], - readFile: fs.readFile, - isFile: function (file, cb) { - fs.stat(file, function (err, stat) { - if (err && err.code === 'ENOENT') cb(null, false) - else if (err) cb(err) - else cb(null, stat.isFile()) - }); - }, - moduleDirectory: 'node_modules' -} -``` - -## resolve.sync(id, opts) - -Synchronously resolve the module path string `id`, returning the result and -throwing an error when `id` can't be resolved. - -options are: - -* opts.basedir - directory to begin resolving from - -* opts.extensions - array of file extensions to search in order - -* opts.readFile - how to read files synchronously - -* opts.isFile - function to synchronously test whether a file exists - -* `opts.packageFilter(pkg, pkgfile)` - transform the parsed package.json -* contents before looking at the "main" field - -* opts.paths - require.paths array to use if nothing is found on the normal -node_modules recursive walk (probably don't use this) - -* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` - -default `opts` values: - -``` javascript -{ - paths: [], - basedir: __dirname, - extensions: [ '.js' ], - readFileSync: fs.readFileSync, - isFile: function (file) { - try { return fs.statSync(file).isFile() } - catch (e) { return false } - }, - moduleDirectory: 'node_modules' -} -```` - -## resolve.isCore(pkg) - -Return whether a package is in core. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install resolve -``` - -# license - -MIT diff --git a/node_modules/browser-resolve/node_modules/resolve/test/core.js b/node_modules/browser-resolve/node_modules/resolve/test/core.js deleted file mode 100644 index 4a566820..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/core.js +++ /dev/null @@ -1,12 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('core modules', function (t) { - t.ok(resolve.isCore('fs')); - t.ok(resolve.isCore('net')); - t.ok(resolve.isCore('http')); - - t.ok(!resolve.isCore('seq')); - t.ok(!resolve.isCore('../')); - t.end(); -}); diff --git a/node_modules/browser-resolve/node_modules/resolve/test/dotdot.js b/node_modules/browser-resolve/node_modules/resolve/test/dotdot.js deleted file mode 100644 index b8767727..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/dotdot.js +++ /dev/null @@ -1,29 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('dotdot', function (t) { - t.plan(4); - var dir = __dirname + '/dotdot/abc'; - - resolve('..', { basedir : dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, __dirname + '/dotdot/index.js'); - }); - - resolve('.', { basedir : dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/index.js'); - }); -}); - -test('dotdot sync', function (t) { - t.plan(2); - var dir = __dirname + '/dotdot/abc'; - - var a = resolve.sync('..', { basedir : dir }); - t.equal(a, __dirname + '/dotdot/index.js'); - - var b = resolve.sync('.', { basedir : dir }); - t.equal(b, dir + '/index.js'); -}); diff --git a/node_modules/browser-resolve/node_modules/resolve/test/dotdot/abc/index.js b/node_modules/browser-resolve/node_modules/resolve/test/dotdot/abc/index.js deleted file mode 100644 index 67f2534e..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/dotdot/abc/index.js +++ /dev/null @@ -1,2 +0,0 @@ -var x = require('..'); -console.log(x); diff --git a/node_modules/browser-resolve/node_modules/resolve/test/dotdot/index.js b/node_modules/browser-resolve/node_modules/resolve/test/dotdot/index.js deleted file mode 100644 index afec7360..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/dotdot/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'whatever' diff --git a/node_modules/browser-resolve/node_modules/resolve/test/faulty_basedir.js b/node_modules/browser-resolve/node_modules/resolve/test/faulty_basedir.js deleted file mode 100644 index 24408188..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/faulty_basedir.js +++ /dev/null @@ -1,17 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -// not sure what's up with this test anymore -if (process.platform !== 'win32') return; - -test('faulty basedir must produce error in windows', function (t) { - t.plan(1); - - var resolverDir = 'C:\\a\\b\\c\\d'; - - resolve('tape/lib/test.js', { basedir : resolverDir }, function (err, res, pkg) { - t.equal(true, !!err); - }); - -}); diff --git a/node_modules/browser-resolve/node_modules/resolve/test/filter.js b/node_modules/browser-resolve/node_modules/resolve/test/filter.js deleted file mode 100644 index 07c38f34..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/filter.js +++ /dev/null @@ -1,18 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('filter', function (t) { - t.plan(2); - var dir = __dirname + '/resolver'; - resolve('./baz', { - basedir : dir, - packageFilter : function (pkg) { - pkg.main = 'doom'; - return pkg; - } - }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/baz/doom.js'); - t.equal(pkg.main, 'doom'); - }); -}); diff --git a/node_modules/browser-resolve/node_modules/resolve/test/filter_sync.js b/node_modules/browser-resolve/node_modules/resolve/test/filter_sync.js deleted file mode 100644 index 3f89b794..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/filter_sync.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('filter', function (t) { - var dir = __dirname + '/resolver'; - var res = resolve.sync('./baz', { - basedir : dir, - packageFilter : function (pkg) { - pkg.main = 'doom' - return pkg; - } - }); - t.equal(res, dir + '/baz/doom.js'); - t.end(); -}); diff --git a/node_modules/browser-resolve/node_modules/resolve/test/mock.js b/node_modules/browser-resolve/node_modules/resolve/test/mock.js deleted file mode 100644 index 1cf3b124..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/mock.js +++ /dev/null @@ -1,142 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('mock', function (t) { - t.plan(6); - - var files = { - '/foo/bar/baz.js' : 'beep' - }; - - function opts (basedir) { - return { - basedir : basedir, - isFile : function (file, cb) { - cb(null, files.hasOwnProperty(file)); - }, - readFile : function (file, cb) { - cb(null, files[file]); - } - } - } - - resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/bar/baz.js'); - t.equal(pkg, undefined); - }); - - resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/bar/baz.js'); - t.equal(pkg, undefined); - }); - - resolve('baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module 'baz' from '/foo/bar'"); - }); - - resolve('../baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module '../baz' from '/foo/bar'"); - }); -}); - -test('mock from package', function (t) { - t.plan(6); - - var files = { - '/foo/bar/baz.js' : 'beep' - }; - - function opts (basedir) { - return { - basedir : basedir, - package : { main: 'bar' }, - isFile : function (file, cb) { - cb(null, files.hasOwnProperty(file)); - }, - readFile : function (file, cb) { - cb(null, files[file]); - } - } - } - - resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/bar/baz.js'); - t.equal(pkg.main, 'bar'); - }); - - resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/bar/baz.js'); - t.equal(pkg.main, 'bar'); - }); - - resolve('baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module 'baz' from '/foo/bar'"); - }); - - resolve('../baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module '../baz' from '/foo/bar'"); - }); -}); - -test('mock package', function (t) { - t.plan(2); - - var files = { - '/foo/node_modules/bar/baz.js' : 'beep', - '/foo/node_modules/bar/package.json' : JSON.stringify({ - main : './baz.js' - }) - }; - - function opts (basedir) { - return { - basedir : basedir, - isFile : function (file, cb) { - cb(null, files.hasOwnProperty(file)); - }, - readFile : function (file, cb) { - cb(null, files[file]); - } - } - } - - resolve('bar', opts('/foo'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/node_modules/bar/baz.js'); - t.equal(pkg.main, './baz.js'); - }); -}); - -test('mock package from package', function (t) { - t.plan(2); - - var files = { - '/foo/node_modules/bar/baz.js' : 'beep', - '/foo/node_modules/bar/package.json' : JSON.stringify({ - main : './baz.js' - }) - }; - - function opts (basedir) { - return { - basedir : basedir, - package : { main: 'bar' }, - isFile : function (file, cb) { - cb(null, files.hasOwnProperty(file)); - }, - readFile : function (file, cb) { - cb(null, files[file]); - } - } - } - - resolve('bar', opts('/foo'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/node_modules/bar/baz.js'); - t.equal(pkg.main, './baz.js'); - }); -}); diff --git a/node_modules/browser-resolve/node_modules/resolve/test/mock_sync.js b/node_modules/browser-resolve/node_modules/resolve/test/mock_sync.js deleted file mode 100644 index abfd2893..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/mock_sync.js +++ /dev/null @@ -1,68 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('mock', function (t) { - t.plan(4); - - var files = { - '/foo/bar/baz.js' : 'beep' - }; - - function opts (basedir) { - return { - basedir : basedir, - isFile : function (file) { - return files.hasOwnProperty(file) - }, - readFileSync : function (file) { - return files[file] - } - } - } - - t.equal( - resolve.sync('./baz', opts('/foo/bar')), - '/foo/bar/baz.js' - ); - - t.equal( - resolve.sync('./baz.js', opts('/foo/bar')), - '/foo/bar/baz.js' - ); - - t.throws(function () { - resolve.sync('baz', opts('/foo/bar')); - }); - - t.throws(function () { - resolve.sync('../baz', opts('/foo/bar')); - }); -}); - -test('mock package', function (t) { - t.plan(1); - - var files = { - '/foo/node_modules/bar/baz.js' : 'beep', - '/foo/node_modules/bar/package.json' : JSON.stringify({ - main : './baz.js' - }) - }; - - function opts (basedir) { - return { - basedir : basedir, - isFile : function (file) { - return files.hasOwnProperty(file) - }, - readFileSync : function (file) { - return files[file] - } - } - } - - t.equal( - resolve.sync('bar', opts('/foo')), - '/foo/node_modules/bar/baz.js' - ); -}); diff --git a/node_modules/browser-resolve/node_modules/resolve/test/module_dir.js b/node_modules/browser-resolve/node_modules/resolve/test/module_dir.js deleted file mode 100644 index 06395d8c..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/module_dir.js +++ /dev/null @@ -1,56 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('moduleDirectory strings', function (t) { - t.plan(4); - var dir = __dirname + '/module_dir'; - var xopts = { - basedir : dir, - moduleDirectory: 'xmodules' - }; - resolve('aaa', xopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/xmodules/aaa/index.js'); - }); - - var yopts = { - basedir : dir, - moduleDirectory: 'ymodules' - }; - resolve('aaa', yopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/ymodules/aaa/index.js'); - }); -}); - -test('moduleDirectory array', function (t) { - t.plan(6); - var dir = __dirname + '/module_dir'; - var aopts = { - basedir : dir, - moduleDirectory: [ 'xmodules', 'ymodules', 'zmodules' ] - }; - resolve('aaa', aopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/xmodules/aaa/index.js'); - }); - - var bopts = { - basedir : dir, - moduleDirectory: [ 'zmodules', 'ymodules', 'xmodules' ] - }; - resolve('aaa', bopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/ymodules/aaa/index.js'); - }); - - var copts = { - basedir : dir, - moduleDirectory: [ 'xmodules', 'ymodules', 'zmodules' ] - }; - resolve('bbb', copts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/zmodules/bbb/main.js'); - }); -}); diff --git a/node_modules/browser-resolve/node_modules/resolve/test/module_dir/xmodules/aaa/index.js b/node_modules/browser-resolve/node_modules/resolve/test/module_dir/xmodules/aaa/index.js deleted file mode 100644 index 55cd18ca..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x * 100 } diff --git a/node_modules/browser-resolve/node_modules/resolve/test/module_dir/ymodules/aaa/index.js b/node_modules/browser-resolve/node_modules/resolve/test/module_dir/ymodules/aaa/index.js deleted file mode 100644 index 651aca86..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x + 100 } diff --git a/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/main.js b/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/main.js deleted file mode 100644 index 4325a0bd..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (n) { return n * 111 } diff --git a/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/package.json deleted file mode 100644 index c13b8cf6..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "main.js" -} diff --git a/node_modules/browser-resolve/node_modules/resolve/test/node_path.js b/node_modules/browser-resolve/node_modules/resolve/test/node_path.js deleted file mode 100644 index 2407189b..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/node_path.js +++ /dev/null @@ -1,48 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('$NODE_PATH', function (t) { - t.plan(4); - - resolve('aaa', { - paths: [ - __dirname + '/node_path/x', - __dirname + '/node_path/y' - ], - basedir: __dirname, - }, function (err, res) { - t.equal(res, __dirname + '/node_path/x/aaa/index.js'); - }); - - resolve('bbb', { - paths: [ - __dirname + '/node_path/x', - __dirname + '/node_path/y' - ], - basedir: __dirname, - }, function (err, res) { - t.equal(res, __dirname + '/node_path/y/bbb/index.js'); - }); - - resolve('ccc', { - paths: [ - __dirname + '/node_path/x', - __dirname + '/node_path/y' - ], - basedir: __dirname, - }, function (err, res) { - t.equal(res, __dirname + '/node_path/x/ccc/index.js'); - }); - - // ensure that relative paths still resolve against the - // regular `node_modules` correctly - resolve('tap', { - paths: [ - 'node_path', - ], - basedir: 'node_path/x', - }, function (err, res) { - t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap/lib/main.js')); - }); -}); diff --git a/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/aaa/index.js b/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/aaa/index.js deleted file mode 100644 index 1ea59138..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'A' diff --git a/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/ccc/index.js b/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/ccc/index.js deleted file mode 100644 index f186fa75..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/ccc/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'C' diff --git a/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/bbb/index.js b/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/bbb/index.js deleted file mode 100644 index e22dd83c..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/bbb/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'B' diff --git a/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/ccc/index.js b/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/ccc/index.js deleted file mode 100644 index d0043d1e..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/ccc/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'CY' diff --git a/node_modules/browser-resolve/node_modules/resolve/test/nonstring.js b/node_modules/browser-resolve/node_modules/resolve/test/nonstring.js deleted file mode 100644 index ef63c40f..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/nonstring.js +++ /dev/null @@ -1,9 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('nonstring', function (t) { - t.plan(1); - resolve(555, function (err, res, pkg) { - t.ok(err); - }); -}); diff --git a/node_modules/browser-resolve/node_modules/resolve/test/pathfilter.js b/node_modules/browser-resolve/node_modules/resolve/test/pathfilter.js deleted file mode 100644 index 142f94d6..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/pathfilter.js +++ /dev/null @@ -1,35 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('#62: deep module references and the pathFilter', function(t){ - t.plan(9); - - var resolverDir = __dirname + '/pathfilter/deep_ref'; - var pathFilter = function(pkg, x, remainder){ - t.equal(pkg.version, "1.2.3"); - t.equal(x, resolverDir + '/node_modules/deep/ref'); - t.equal(remainder, "ref"); - return "alt"; - }; - - resolve('deep/ref', { basedir : resolverDir }, function (err, res, pkg) { - if (err) t.fail(err); - - t.equal(pkg.version, "1.2.3"); - t.equal(res, resolverDir + '/node_modules/deep/ref.js'); - }); - - resolve('deep/deeper/ref', { basedir: resolverDir }, - function(err, res, pkg) { - if(err) t.fail(err); - t.notEqual(pkg, undefined); - t.equal(pkg.version, "1.2.3"); - t.equal(res, resolverDir + '/node_modules/deep/deeper/ref.js'); - }); - - resolve('deep/ref', { basedir : resolverDir, pathFilter : pathFilter }, - function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, resolverDir + '/node_modules/deep/alt.js'); - }); -}); diff --git a/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/main.js b/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/main.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/alt.js b/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/alt.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/deeper/ref.js b/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/deeper/ref.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/package.json b/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/package.json deleted file mode 100644 index fe4b408a..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "deep", - "version": "1.2.3" -} diff --git a/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/ref.js b/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/ref.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browser-resolve/node_modules/resolve/test/precedence.js b/node_modules/browser-resolve/node_modules/resolve/test/precedence.js deleted file mode 100644 index c716f0e9..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/precedence.js +++ /dev/null @@ -1,23 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('precedence', function (t) { - t.plan(3); - var dir = path.join(__dirname, 'precedence/aaa'); - - resolve('./', { basedir : dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, 'index.js')); - t.equal(pkg.name, 'resolve'); - }); -}); - -test('./ should not load ${dir}.js', function (t) { - t.plan(1); - var dir = path.join(__dirname, 'precedence/bbb'); - - resolve('./', { basedir : dir }, function (err, res, pkg) { - t.ok(err); - }); -}); diff --git a/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa.js b/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa.js deleted file mode 100644 index a182397c..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'wtf' diff --git a/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/index.js b/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/index.js deleted file mode 100644 index 993b03c2..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'okok' diff --git a/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/main.js b/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/main.js deleted file mode 100644 index db38959d..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('./')) diff --git a/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb.js b/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb.js deleted file mode 100644 index c8a9996b..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb.js +++ /dev/null @@ -1 +0,0 @@ -module.exports '>_<' diff --git a/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb/main.js b/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb/main.js deleted file mode 100644 index 716b81d4..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('./')); // should throw diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver.js b/node_modules/browser-resolve/node_modules/resolve/test/resolver.js deleted file mode 100644 index 5bbb05f9..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/resolver.js +++ /dev/null @@ -1,281 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('async foo', function (t) { - t.plan(9); - var dir = __dirname + '/resolver'; - - resolve('./foo', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo.js'); - t.equal(pkg.name, 'resolve'); - }); - - resolve('./foo.js', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo.js'); - t.equal(pkg.name, 'resolve'); - }); - - resolve('./foo', { basedir : dir, package: { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo.js'); - t.equal(pkg.main, 'resolver'); - }); - - resolve('./foo.js', { basedir : dir, package: { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo.js'); - t.equal(pkg.main, 'resolver'); - }); - - resolve('foo', { basedir : dir }, function (err) { - t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'"); - }); -}); - -test('bar', function (t) { - t.plan(6); - var dir = __dirname + '/resolver'; - - resolve('foo', { basedir : dir + '/bar' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/bar/node_modules/foo/index.js'); - t.equal(pkg, undefined); - }); - - resolve('foo', { basedir : dir + '/bar' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/bar/node_modules/foo/index.js'); - t.equal(pkg, undefined); - }); - - resolve('foo', { basedir : dir + '/bar', package: { main: 'bar' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/bar/node_modules/foo/index.js'); - t.equal(pkg, undefined); - }); -}); - -test('baz', function (t) { - t.plan(4); - var dir = __dirname + '/resolver'; - - resolve('./baz', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/baz/quux.js'); - t.equal(pkg.main, 'quux.js'); - }); - - resolve('./baz', { basedir : dir, package: { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/baz/quux.js'); - t.equal(pkg.main, 'quux.js'); - }); -}); - -test('biz', function (t) { - t.plan(24); - var dir = __dirname + '/resolver/biz/node_modules'; - - resolve('./grux', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/grux/index.js'); - t.equal(pkg, undefined); - }); - - resolve('./grux', { basedir : dir, package: { main: 'biz' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/grux/index.js'); - t.equal(pkg.main, 'biz'); - }); - - resolve('./garply', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/garply/lib/index.js'); - t.equal(pkg.main, './lib'); - }); - - resolve('./garply', { basedir : dir, package: { main: 'biz' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/garply/lib/index.js'); - t.equal(pkg.main, './lib'); - }); - - resolve('tiv', { basedir : dir + '/grux' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/tiv/index.js'); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir : dir + '/grux', package: { main: 'grux' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/tiv/index.js'); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir : dir + '/garply' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/tiv/index.js'); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir : dir + '/garply', package: { main: './lib' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/tiv/index.js'); - t.equal(pkg, undefined); - }); - - resolve('grux', { basedir : dir + '/tiv' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/grux/index.js'); - t.equal(pkg, undefined); - }); - - resolve('grux', { basedir : dir + '/tiv', package: { main: 'tiv' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/grux/index.js'); - t.equal(pkg, undefined); - }); - - resolve('garply', { basedir : dir + '/tiv' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/garply/lib/index.js'); - t.equal(pkg.main, './lib'); - }); - - resolve('garply', { basedir : dir + '/tiv', package: { main: 'tiv' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/garply/lib/index.js'); - t.equal(pkg.main, './lib'); - }); -}); - -test('quux', function (t) { - t.plan(2); - var dir = __dirname + '/resolver/quux'; - - resolve('./foo', { basedir : dir, package: { main: 'quux' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo/index.js'); - t.equal(pkg.main, 'quux'); - }); -}); - -test('normalize', function (t) { - t.plan(2); - var dir = __dirname + '/resolver/biz/node_modules/grux'; - - resolve('../grux', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/index.js'); - t.equal(pkg, undefined); - }); -}); - -test('cup', function (t) { - t.plan(3); - var dir = __dirname + '/resolver'; - - resolve('./cup', { basedir : dir, extensions : [ '.js', '.coffee' ] }, - function (err, res) { - if (err) t.fail(err); - t.equal(res, dir + '/cup.coffee'); - }); - - resolve('./cup.coffee', { basedir : dir }, function (err, res) { - if (err) t.fail(err); - t.equal(res, dir + '/cup.coffee'); - }); - - resolve('./cup', { basedir : dir, extensions : [ '.js' ] }, - function (err, res) { - t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'"); - }); -}); - -test('mug', function (t) { - t.plan(3); - var dir = __dirname + '/resolver'; - - resolve('./mug', { basedir : dir }, function (err, res) { - if (err) t.fail(err); - t.equal(res, dir + '/mug.js'); - }); - - resolve('./mug', { basedir : dir, extensions : [ '.coffee', '.js' ] }, - function (err, res) { - if (err) t.fail(err); - t.equal(res, dir + '/mug.coffee'); - }); - - resolve('./mug', { basedir : dir, extensions : [ '.js', '.coffee' ] }, - function (err, res) { - t.equal(res, dir + '/mug.js'); - }); -}); - -test('other path', function (t) { - t.plan(4); - var resolverDir = __dirname + '/resolver'; - var dir = resolverDir + '/bar'; - var otherDir = resolverDir + '/other_path'; - - resolve('root', { basedir : dir, paths: [otherDir] }, function (err, res) { - if (err) t.fail(err); - t.equal(res, resolverDir + '/other_path/root.js'); - }); - - resolve('lib/other-lib', { basedir : dir, paths: [otherDir] }, - function (err, res) { - if (err) t.fail(err); - t.equal(res, resolverDir + '/other_path/lib/other-lib.js'); - }); - - resolve('root', { basedir : dir, }, function (err, res) { - t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'"); - }); - - resolve('zzz', { basedir : dir, paths: [otherDir] }, function (err, res) { - t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'"); - }); -}); - -test('incorrect main', function (t) { - t.plan(1) - - var resolverDir = __dirname + '/resolver'; - var dir = resolverDir + '/incorrect_main'; - - resolve('./incorrect_main', { basedir : resolverDir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/index.js'); - }); -}); - -test('without basedir', function (t) { - t.plan(1); - - var dir = __dirname + '/resolver/without_basedir'; - var tester = require(dir + '/main.js'); - - tester(t, function (err, res, pkg){ - if (err) { - t.fail(err); - } else { - t.equal(res, dir + '/node_modules/mymodule.js'); - } - }); -}); - -test('#25: node modules with the same name as node stdlib modules', function (t) { - t.plan(1); - - var resolverDir = __dirname + '/resolver/punycode'; - - resolve('punycode', { basedir : resolverDir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, resolverDir + '/node_modules/punycode/index.js'); - }); -}); diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js b/node_modules/browser-resolve/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js deleted file mode 100644 index bd816eab..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/doom.js b/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/doom.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/package.json b/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/package.json deleted file mode 100644 index 6b81dcdd..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main" : "quux.js" -} diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/quux.js b/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/quux.js deleted file mode 100644 index bd816eab..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/quux.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js b/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js deleted file mode 100644 index 0379e29f..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'hello garply'; diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json b/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json deleted file mode 100644 index babaac58..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main" : "./lib" -} diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js b/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js deleted file mode 100644 index 49960555..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('tiv') * 100; diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js b/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js deleted file mode 100644 index 690aad34..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 3; diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/cup.coffee b/node_modules/browser-resolve/node_modules/resolve/test/resolver/cup.coffee deleted file mode 100644 index 8b137891..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/resolver/cup.coffee +++ /dev/null @@ -1 +0,0 @@ - diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/foo.js b/node_modules/browser-resolve/node_modules/resolve/test/resolver/foo.js deleted file mode 100644 index bd816eab..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/resolver/foo.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/index.js b/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/index.js deleted file mode 100644 index bc1fb0a6..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate -module.exports = 1; diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/package.json b/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/package.json deleted file mode 100644 index 1592ed39..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main" : "wrong.js" -} diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.coffee b/node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.coffee deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.js b/node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/node_modules/browser-resolve/node_modules/resolve/test/resolver/other_path/lib/other-lib.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/other_path/root.js b/node_modules/browser-resolve/node_modules/resolve/test/resolver/other_path/root.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/punycode/node_modules/punycode/index.js b/node_modules/browser-resolve/node_modules/resolve/test/resolver/punycode/node_modules/punycode/index.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/quux/foo/index.js b/node_modules/browser-resolve/node_modules/resolve/test/resolver/quux/foo/index.js deleted file mode 100644 index bd816eab..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/resolver/quux/foo/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/main.js b/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/main.js deleted file mode 100644 index 5f211e9c..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/main.js +++ /dev/null @@ -1,6 +0,0 @@ -resolve = require('../../../'); - -module.exports = function(t, cb) { - resolve('mymodule', null, cb); -} - diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js b/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js deleted file mode 100644 index 2b58aa40..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "The tools we use have a profound (and devious!) influence on our thinking habits, and, therefore, on our thinking abilities.- E. Dijkstra" diff --git a/node_modules/browser-resolve/node_modules/resolve/test/resolver_sync.js b/node_modules/browser-resolve/node_modules/resolve/test/resolver_sync.js deleted file mode 100644 index 59825317..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/resolver_sync.js +++ /dev/null @@ -1,180 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('foo', function (t) { - var dir = __dirname + '/resolver'; - - t.equal( - resolve.sync('./foo', { basedir : dir }), - dir + '/foo.js' - ); - - t.equal( - resolve.sync('./foo.js', { basedir : dir }), - dir + '/foo.js' - ); - - t.throws(function () { - resolve.sync('foo', { basedir : dir }); - }); - - t.end(); -}); - -test('bar', function (t) { - var dir = __dirname + '/resolver'; - - t.equal( - resolve.sync('foo', { basedir : dir + '/bar' }), - dir + '/bar/node_modules/foo/index.js' - ); - t.end(); -}); - -test('baz', function (t) { - var dir = __dirname + '/resolver'; - - t.equal( - resolve.sync('./baz', { basedir : dir }), - dir + '/baz/quux.js' - ); - t.end(); -}); - -test('biz', function (t) { - var dir = __dirname + '/resolver/biz/node_modules'; - t.equal( - resolve.sync('./grux', { basedir : dir }), - dir + '/grux/index.js' - ); - - t.equal( - resolve.sync('tiv', { basedir : dir + '/grux' }), - dir + '/tiv/index.js' - ); - - t.equal( - resolve.sync('grux', { basedir : dir + '/tiv' }), - dir + '/grux/index.js' - ); - t.end(); -}); - -test('normalize', function (t) { - var dir = __dirname + '/resolver/biz/node_modules/grux'; - t.equal( - resolve.sync('../grux', { basedir : dir }), - dir + '/index.js' - ); - t.end(); -}); - -test('cup', function (t) { - var dir = __dirname + '/resolver'; - t.equal( - resolve.sync('./cup', { - basedir : dir, - extensions : [ '.js', '.coffee' ] - }), - dir + '/cup.coffee' - ); - - t.equal( - resolve.sync('./cup.coffee', { - basedir : dir - }), - dir + '/cup.coffee' - ); - - t.throws(function () { - resolve.sync('./cup', { - basedir : dir, - extensions : [ '.js' ] - }) - }); - - t.end(); -}); - -test('mug', function (t) { - var dir = __dirname + '/resolver'; - t.equal( - resolve.sync('./mug', { basedir : dir }), - dir + '/mug.js' - ); - - t.equal( - resolve.sync('./mug', { - basedir : dir, - extensions : [ '.coffee', '.js' ] - }), - dir + '/mug.coffee' - ); - - t.equal( - resolve.sync('./mug', { - basedir : dir, - extensions : [ '.js', '.coffee' ] - }), - dir + '/mug.js' - ); - - t.end(); -}); - -test('other path', function (t) { - var resolverDir = __dirname + '/resolver'; - var dir = resolverDir + '/bar'; - var otherDir = resolverDir + '/other_path'; - - var path = require('path'); - - t.equal( - resolve.sync('root', { - basedir : dir, - paths: [otherDir] }), - resolverDir + '/other_path/root.js' - ); - - t.equal( - resolve.sync('lib/other-lib', { - basedir : dir, - paths: [otherDir] }), - resolverDir + '/other_path/lib/other-lib.js' - ); - - t.throws(function () { - resolve.sync('root', { basedir : dir, }); - }); - - t.throws(function () { - resolve.sync('zzz', { - basedir : dir, - paths: [otherDir] }); - }); - - t.end(); -}); - -test('incorrect main', function (t) { - var resolverDir = __dirname + '/resolver'; - var dir = resolverDir + '/incorrect_main'; - - t.equal( - resolve.sync('./incorrect_main', { basedir : resolverDir }), - dir + '/index.js' - ) - - t.end() -}); - -test('#25: node modules with the same name as node stdlib modules', function (t) { - var resolverDir = __dirname + '/resolver/punycode'; - - t.equal( - resolve.sync('punycode', { basedir : resolverDir }), - resolverDir + '/node_modules/punycode/index.js' - ) - - t.end() -}); diff --git a/node_modules/browser-resolve/node_modules/resolve/test/subdirs.js b/node_modules/browser-resolve/node_modules/resolve/test/subdirs.js deleted file mode 100644 index 957abfe0..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/subdirs.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); -var path = require('path'); - -test('subdirs', function (t) { - t.plan(2); - - var dir = path.join(__dirname, '/subdirs'); - resolve('a/b/c/x.json', { basedir: dir }, function (err, res) { - t.ifError(err); - t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json')); - }); -}); diff --git a/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json b/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json deleted file mode 100644 index 3cc0ecbe..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json +++ /dev/null @@ -1 +0,0 @@ -[1,2,3] diff --git a/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/package.json b/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/package.json deleted file mode 100644 index 0967ef42..00000000 --- a/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/node_modules/browser-resolve/package.json b/node_modules/browser-resolve/package.json deleted file mode 100644 index f0632e90..00000000 --- a/node_modules/browser-resolve/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_args": [ - [ - "browser-resolve@1.11.3", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "browser-resolve@1.11.3", - "_id": "browser-resolve@1.11.3", - "_inBundle": false, - "_integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", - "_location": "/browser-resolve", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "browser-resolve@1.11.3", - "name": "browser-resolve", - "escapedName": "browser-resolve", - "rawSpec": "1.11.3", - "saveSpec": null, - "fetchSpec": "1.11.3" - }, - "_requiredBy": [ - "/jest-resolve" - ], - "_resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", - "_spec": "1.11.3", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - }, - "bugs": { - "url": "https://github.com/shtylman/node-browser-resolve/issues" - }, - "dependencies": { - "resolve": "1.1.7" - }, - "description": "resolve which handles browser field support in package.json", - "devDependencies": { - "mocha": "1.14.0" - }, - "files": [ - "index.js", - "empty.js" - ], - "homepage": "https://github.com/shtylman/node-browser-resolve#readme", - "keywords": [ - "resolve", - "browser" - ], - "license": "MIT", - "main": "index.js", - "name": "browser-resolve", - "repository": { - "type": "git", - "url": "git://github.com/shtylman/node-browser-resolve.git" - }, - "scripts": { - "test": "mocha --reporter list test/*.js" - }, - "version": "1.11.3" -} diff --git a/node_modules/bs-logger/CHANGELOG.md b/node_modules/bs-logger/CHANGELOG.md deleted file mode 100644 index 19364b81..00000000 --- a/node_modules/bs-logger/CHANGELOG.md +++ /dev/null @@ -1,60 +0,0 @@ - -## [0.2.6](https://github.com/huafu/bs-logger/compare/v0.2.5...v0.2.6) (2018-11-10) - - - - -## [0.2.5](https://github.com/huafu/bs-logger/compare/v0.2.4...v0.2.5) (2018-09-04) - - - - -## [0.2.4](https://github.com/huafu/bs-logger/compare/v0.2.3...v0.2.4) (2018-09-04) - - - - -## [0.2.3](https://github.com/huafu/bs-logger/compare/v0.2.2...v0.2.3) (2018-08-31) - - -### Bug Fixes - -* **formatter:** allow json formatter to serialize circular data ([103bac0](https://github.com/huafu/bs-logger/commit/103bac0)) - - - - -## [0.2.2](https://github.com/huafu/bs-logger/compare/v0.2.1...v0.2.2) (2018-08-31) - - -### Bug Fixes - -* **testing:** adds LoggerMock to exported symbols ([134dab8](https://github.com/huafu/bs-logger/commit/134dab8)) - - - - -## [0.2.1](https://github.com/huafu/bs-logger/compare/v0.2.0...v0.2.1) (2018-08-31) - - - - -# [0.2.0](https://github.com/huafu/bs-logger/compare/v0.1.1...v0.2.0) (2018-08-31) - - -### Features - -* **testing:** adds helpers for testing ([0e65a49](https://github.com/huafu/bs-logger/commit/0e65a49)) - - - - -## [0.1.1](https://github.com/huafu/bs-logger/compare/02d6fc7...v0.1.1) (2018-08-30) - - -### Features - -* adds custom formatters ([02d6fc7](https://github.com/huafu/bs-logger/commit/02d6fc7)) - - - diff --git a/node_modules/bs-logger/LICENSE b/node_modules/bs-logger/LICENSE deleted file mode 100644 index 116a6d1a..00000000 --- a/node_modules/bs-logger/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Huafu Gandon - -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/bs-logger/README.md b/node_modules/bs-logger/README.md deleted file mode 100644 index c885264e..00000000 --- a/node_modules/bs-logger/README.md +++ /dev/null @@ -1,319 +0,0 @@ - - -# B.S. Logger [![Build Status](https://travis-ci.org/huafu/bs-logger.svg?branch=master)](https://travis-ci.org/huafu/bs-logger) [![Coverage Status](https://img.shields.io/coveralls/huafu/bs-logger/master.svg)](https://coveralls.io/github/huafu/bs-logger?branch=master) [![Beerpay](https://beerpay.io/huafu/bs-logger/badge.svg?style=beer-square)](https://beerpay.io/huafu/bs-logger) [![Beerpay](https://beerpay.io/huafu/bs-logger/make-wish.svg?style=flat-square)](https://beerpay.io/huafu/bs-logger?focus=wish) - -**Opinionated bare simple logger for NodeJS (with TypeScript typings)**. - -BSLogger has been created after being disapointed not finding a matching logger on the internet. Not that others aren't good, they just did not fit what I was looking for. - -Here is what I was looking for (and tried to implemented in BSLogger): -- light memory usage -- easily extendable (see `child` method) -- as few dependencies as possible -- ability to define all targets in a string (so that `ENV` vars can be used) -- when using file targets, not re-opening them -- reasonable defautls: - - logs warnings and above to `stderr` - - logs JSON to files -- no overhead if it's not going to log anywhere - -## TL,DR: - -Install: -```sh -npm install --save bs-logger -# or -yarn add bs-logger -``` -Use: -```js -const { logger } = require('bs-logger'); -// or -// import logger from 'bs-logger'; -// or -// import { logger } from 'bs-logger'; -// as default exports the logger - -logger('foo'); -logger.debug('bar'); -logger.warn({foo: 'bar'}, 'dummy', 'other'/*, ...*/); -``` - -More complex example: -```js -// env MY_LOG_TARGETS="debug.log:trace,stderr:warn%json" -import { createLogger } from 'bs-logger'; -const logger = createLogger({ - context: {namespace: 'http'}, - targets: process.env.MY_LOG_TARGETS, - translate: (m) => { - if (process.env.NODE_ENV === 'production') { - m.context = { ...m.context, secret: null }; - } - return m; - }, -}); -// [...] -logger.debug({secret: 'xyz'}, 'trying to login') -// will log into debug.log `trying to login` with secret in the context except in prod - -const login = logger.wrap(function login() { - // your login code -}) -// [...] -login(); -// will log `calling login` with the arguments in context -``` - -## Usage - -### Creating a logger - -#### Root logger - -BSLogger exports a global logger lazyly created on first use, but it is advised to create your own using the `createLogger()` helper: - -- If you are using it in a library wich is meant to be re-distributed: - ```js - import { createLogger, LogContexts } 'bs-logger'; - const logger = createLogger({ [LogContexts.package]: 'my-pacakge' }); - ``` - -- If you are using it in an application of your own: - ```js - import { createLogger, LogContexts } 'bs-logger'; - const logger = createLogger({ [LogContexts.application]: 'my-app' }); - ``` - -#### Child logger - -Child loggers extends the context, targets and message translators from their parent. You create a child logger using the `child` method: - -```js -const childLogger = logger.child({ [LogContexts.namespace]: 'http' }) -// childLogger becomes a new logger -``` - -### Logging - -Any helper to log within BSLogger is a function which has the same signature as `console.log()`, and also accepts an **optional** first argument being the context. A context is any `object`, with some specific (but optional) properties which we'll see later. - -```ts -logMethod(message: string, ...args: any[]): void - // or -logMethod(context: LogContext, message: string, ...args: any[]): void -``` - -#### Directly - -You can log using any logger as a function directly (if the logger or its possible parent(s) has not been created with any log level in its context, no level will be attached): -```js -import { createLogger } from 'bs-logger' -const logger = createLogger() -// [...] -logger('my message'); -``` - -#### Using level helpers - -BSLogger is aware of 6 log levels (`trace`, `debug`, `info`, `warn`, `error` and `fatal`) but you can create your owns. A log level is basically a number. The higher it is, the more important will be the message. You can find log levels constants in `LogLevels` export: -```js -import { LogLevels } from 'bs-logger'; - -const traceLevelValue = LogLevels.trace; -const debugLevelValue = LogLevels.debug; -// etc. -``` - -For each log level listed above, a logger will have a helper method to directly log using this level: -```js -import { createLogger } from 'bs-logger' -const logger = createLogger() -// [...] -logger.trace('foo') -logger.debug('bar') -// etc. -``` - -Those helpers are the equivalent to -```js -logger({ [LogContexts.logLevel]: level }, 'foo') -``` -...except that they'll be replaced with an empty function on the first call if their level will not be handled by any target. - -### Wrapping functions - -Each logger has a `wrap` method which you can use to wrap a function. If there is no matching log target, the `wrap` method will simply return your function, else it'll wrap it in another function of same signature. The wrapper will, before calling your function, log a message with received arguments in the context. - -```ts -// With `F` being the type of your funciton: -logger.wrap(func: F): F - // or -logger.wrap(message: string, func: F): F - // or -logger.wrap(context: LogContext, messages: string, func: F): F -``` - -### Defining target(s) - -Each root logger (created using `createLogger` helper) is attached to 0 or more "target". A target is responsible of writing a log entry somewhere. It is an object with the following properties: - -- **minLevel** `string`: The minimum log level this target's strem writer will be called for -- **stream** `{ write: (str: string) => void }`: An object with a write function (like node's `stream.Writable`) which will be used to write log entries -- **format** `(msg: LogMessage) => string`: A formatter which will be used to transform a log entry (message object) into a string - -#### Using targets - -When using the global logger, or if no `targets` specified when creating a logger, calling log methods will output to STDERR anything which has log level higher or equal to `warn`. This can be modified as follow by defineing the `LOG_TARGETS` environment variable or passing the `targets` option to `createLogger`. The `targets` can be an array of `LogTarget` (see above) or a `string` defining a list of one or more targets separated by comma (`,`). A `string` target is composed as follow: -- The file path, absolute or relative to CWD. It can also be the specials `stdout` or `stderr` strings (case insensitive). When giving a path to a file, if it ends with the plus sign (`+`) the log data will be appended to the file instead of re-creating the file for each run. -- An optional minimum log level after a colon (`:`). It should be a `number` or the log level name (ie `trace`, `error`, ...). -- An optional formatter name after a percent sign (`%`). There are 2 included formatter: `json` (used for files by default) and `simple` (used for `stdout` and `stderr` by default). See below to define your own. - -Examples: -- `debug.log%simple,stdout:fatal` - - Log everything to `debug.log` file in CWD dir (re-creates the file for each run). Uses the `simple` formatter. - - Log only messages with level >= `fatal` to the standard out. -- `errors.log+:error,debug.log:15` - - Log only messages with level >= `error` to `errors.log` file (without re-creating the file at each run). - - Log only messages with level >= 15 to `debug.log` file (re-creates the file for each run). - -#### Custom formatters - -A custom formatter is a function that takes a `LogMessage` object and returns a `string`. It can be registered giving it a name using the `registerLogFormatter` helper: - -```js -import { registerLogFormatter, createLogger } from 'bs-logger'; -registerLogFormatter('foo', m => `${m.sequence} ${new Date(m.tim).toLocaleString()} ${m.message}`); -const logger = createLogger({ - targets: 'stdout%foo', // specifying out formatter - }); -``` - -### Testing - -The whole `testing` namespace has useful helpers for using BSLogger while unit testing your product. - -In your tests you would usually prefer not having any logging to happen, or you would like to check what has been logged but without actually logging it to any target. - -The `testing` namespace holds all testing utilities: -```js -import { testing } from 'bs-logger' -``` - -- If you use the root logger, here is how to disable its output: -```js -testing.setup() -``` -and the `logger` (or `default`) export will become a `LoggerMock` instance (see below). - -- If you create logger(s) using `createLogger`, when testing use the `testing.createLoggerMock` instead. It accepts the same first argument, with an extra second argument, optional, being the `LogTargetMock` to be used (see below). - -#### LoggerMock - -Loggers created using the `testing` namespace will have one and only one log target being a `LogTargetMock`, and that target will be set on the `target` extra property of the logger. - -Here are the extra properties of `LogTargetMock` which you can then use for testing: - -- **messages** `LogMessage[]`: all log message objects which would have normally be logged - - **last** `LogMessage`: the last one being logged - - **trace** `LogMessage[]`: all log message objects with `trace` level - - **last** `LogMessage`: last one with `trace` level - - **debug** `LogMessage[]`: all log message objects with `debug` level - - **last** `LogMessage`: last one with `debug` level - - ... -- **lines** `string[]`: all formatted log message lines which would have normally be logged - - **last** `string`: the last one being logged - - **trace** `string[]`: all formatted log message lines with `trace` level - - **last** `string`: last one with `trace` level - - **debug** `string[]`: all formatted log message lines with `debug` level - - **last** `string`: last one with `debug` level - - ... -- **clear** `() => void`: method to clear all log message objects and formatted lines -- **filteredMessages** `(level: number | null, untilLevel?: number) => LogMessage[]`: method to filter log message objects -- **filteredLins** `(level: number | null, untilLevel?: number) => string[]`: method to filter formatted log message lines - -#### Example - -Let's say you have a `logger.js` file in which you create the logger for your app: -```js -// file: logger.js -import { testing, createLogger, LogContexts } from 'bs-logger'; - -const factory = process.env.TEST ? testing.createLoggerMock : createLogger; - -export default factory({ [LogContexts.application]: 'foo' }); -``` - -In a test you could: -```js -import logger from './logger'; -// in `fetch(url)` you'd use the logger like `logger.debug({url}, 'GET')` when the request is actually made -import fetch from './http'; - -test('it should cache request', () => { - logger.target.clear(); - fetch('http://foo.bar/dummy.json'); - expect(logger.target.messages.length).toBe(1); - fetch('http://foo.bar/dummy.json'); - expect(logger.target.messages.length).toBe(1); - // you can also expect on the message: - expect(logger.target.messages.last.message).toBe('GET') - expect(logger.target.messages.last.context.url).toBe('http://foo.bar/dummy.json') - // or (mock target formater prefix the message with `[level:xxx] ` when there is a level) - expect(logger.target.lines.last).toBe('[level:20] GET') - // or filtering with level: - expect(logger.target.lines.debug.last).toBe('[level:20] GET') -}); -``` - -## Installing - -Add to your project with `npm`: - -```bash -npm install --save bs-logger -``` - -or with `yarn`: - -```bash -yarn add bs-logger -``` - -## Running the tests - -You need to get a copy of the repository to run the tests: - -```bash -git clone https://github.com/huafu/bs-logger.git -cd bs-logger -npm run test -``` - -## Built With - -* [TypeScript](https://www.typescriptlang.org/) -* [ts-jest](https://github.com/kulshekhar/ts-jest) - -## Contributing - -Pull requests welcome! - -## Versioning - -We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/huafu/bs-logger/tags). - -## Authors - -* **Huafu Gandon** - *Initial work* - [huafu](https://github.com/huafu) - -See also the list of [contributors](https://github.com/huafu/bs-logger/contributors) who participated in this project. - -## License - -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details - -## Support on Beerpay -Hey dude! Help me out for a couple of :beers:! - -[![Beerpay](https://beerpay.io/huafu/bs-logger/badge.svg?style=beer-square)](https://beerpay.io/huafu/bs-logger) [![Beerpay](https://beerpay.io/huafu/bs-logger/make-wish.svg?style=flat-square)](https://beerpay.io/huafu/bs-logger?focus=wish) diff --git a/node_modules/bs-logger/dist/index.d.ts b/node_modules/bs-logger/dist/index.d.ts deleted file mode 100644 index 45e2dfd6..00000000 --- a/node_modules/bs-logger/dist/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { LogMethod, Logger, createLogger, lastSequenceNumber, resetSequence } from './logger'; -import { LogContext, LogContexts } from './logger/context'; -import { LogLevelName, LogLevels, logLevelNameFor, parseLogLevel } from './logger/level'; -import { LogMessage, LogMessageFormatter, LogMessageTranslator, registerLogFormatter, resetLogFormatters } from './logger/message'; -import { rootLogger, setup } from './logger/root'; -import { DEFAULT_LOG_TARGET, LogTarget, parseLogTargets } from './logger/target'; -import * as testing from './testing'; -export { rootLogger as default, rootLogger as logger, setup, createLogger, DEFAULT_LOG_TARGET, lastSequenceNumber, LogContext, LogContexts, Logger, LogLevelName, logLevelNameFor, LogLevels, LogMessage, LogMessageFormatter, LogMessageTranslator, LogMethod, LogTarget, parseLogLevel, parseLogTargets, registerLogFormatter, resetLogFormatters, resetSequence, testing, }; diff --git a/node_modules/bs-logger/dist/index.js b/node_modules/bs-logger/dist/index.js deleted file mode 100644 index 4257d803..00000000 --- a/node_modules/bs-logger/dist/index.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var logger_1 = require("./logger"); -exports.createLogger = logger_1.createLogger; -exports.lastSequenceNumber = logger_1.lastSequenceNumber; -exports.resetSequence = logger_1.resetSequence; -var context_1 = require("./logger/context"); -exports.LogContexts = context_1.LogContexts; -var level_1 = require("./logger/level"); -exports.LogLevels = level_1.LogLevels; -exports.logLevelNameFor = level_1.logLevelNameFor; -exports.parseLogLevel = level_1.parseLogLevel; -var message_1 = require("./logger/message"); -exports.registerLogFormatter = message_1.registerLogFormatter; -exports.resetLogFormatters = message_1.resetLogFormatters; -var root_1 = require("./logger/root"); -exports.default = root_1.rootLogger; -exports.logger = root_1.rootLogger; -exports.setup = root_1.setup; -var target_1 = require("./logger/target"); -exports.DEFAULT_LOG_TARGET = target_1.DEFAULT_LOG_TARGET; -exports.parseLogTargets = target_1.parseLogTargets; -var testing = __importStar(require("./testing")); -exports.testing = testing; diff --git a/node_modules/bs-logger/dist/logger/context.d.ts b/node_modules/bs-logger/dist/logger/context.d.ts deleted file mode 100644 index 8e43e933..00000000 --- a/node_modules/bs-logger/dist/logger/context.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -declare enum LogContexts { - application = "application", - hostname = "hostname", - logLevel = "logLevel", - namespace = "namespace", - package = "package" -} -interface LogContext { - [key: string]: any; - [LogContexts.application]?: string; - [LogContexts.hostname]?: string; - [LogContexts.logLevel]?: number; - [LogContexts.namespace]?: string; - [LogContexts.package]?: string; -} -export { LogContext, LogContexts }; diff --git a/node_modules/bs-logger/dist/logger/context.js b/node_modules/bs-logger/dist/logger/context.js deleted file mode 100644 index 6cf9b77b..00000000 --- a/node_modules/bs-logger/dist/logger/context.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var LogContexts; -(function (LogContexts) { - LogContexts["application"] = "application"; - LogContexts["hostname"] = "hostname"; - LogContexts["logLevel"] = "logLevel"; - LogContexts["namespace"] = "namespace"; - LogContexts["package"] = "package"; -})(LogContexts || (LogContexts = {})); -exports.LogContexts = LogContexts; diff --git a/node_modules/bs-logger/dist/logger/index.d.ts b/node_modules/bs-logger/dist/logger/index.d.ts deleted file mode 100644 index f051c974..00000000 --- a/node_modules/bs-logger/dist/logger/index.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { LogContext } from './context'; -import { LogMessageTranslator } from './message'; -import { LogTarget } from './target'; -interface LogMethod { - (message: string, ...args: any[]): void; - (context: LogContext, message: string, ...args: any[]): void; - isEmptyFunction?: boolean; -} -interface LogChildMethod { - (context: LogContext): Logger; - (translate: LogMessageTranslator): Logger; -} -interface LogWrapMethod { - any>(func: F): F; - any>(message: string, func: F): F; - any>(context: LogContext, message: string, func: F): F; - any>(level: number, message: string, func: F): F; -} -interface Logger extends LogMethod { - trace: LogMethod; - debug: LogMethod; - info: LogMethod; - warn: LogMethod; - error: LogMethod; - fatal: LogMethod; - child: LogChildMethod; - wrap: LogWrapMethod; -} -declare const resetSequence: (next?: number) => void; -declare const lastSequenceNumber: () => number; -interface CreateLoggerOptions { - context?: LogContext; - translate?: LogMessageTranslator; - targets?: string | LogTarget[]; -} -declare const createLogger: ({ context: baseContext, targets: logTargets, translate: logTranslator, }?: CreateLoggerOptions) => Logger; -export { createLogger, lastSequenceNumber, Logger, LogMethod, resetSequence, CreateLoggerOptions }; diff --git a/node_modules/bs-logger/dist/logger/index.js b/node_modules/bs-logger/dist/logger/index.js deleted file mode 100644 index 6dd01505..00000000 --- a/node_modules/bs-logger/dist/logger/index.js +++ /dev/null @@ -1,164 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spread = (this && this.__spread) || function () { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var util_1 = require("util"); -var context_1 = require("./context"); -var level_1 = require("./level"); -var target_1 = require("./target"); -var lastSeqNumber = 0; -var resetSequence = function (next) { - if (next === void 0) { next = 1; } - lastSeqNumber = next - 1; -}; -exports.resetSequence = resetSequence; -var lastSequenceNumber = function () { return lastSeqNumber; }; -exports.lastSequenceNumber = lastSequenceNumber; -var createEmptyFunction = function () { - return Object.defineProperty(function emptyFunction() { }, 'isEmptyFunction', { value: true }); -}; -var createEmptyLogger = function () { - var log = createEmptyFunction(); - log.child = function () { return createEmptyLogger(); }; - log.wrap = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return args.pop(); - }; - level_1.LogLevelNames.forEach(function (name) { - log[name] = log; - }); - return log; -}; -var createLogger = function (_a) { - var _b = _a === void 0 ? {} : _a, _c = _b.context, baseContext = _c === void 0 ? {} : _c, _d = _b.targets, logTargets = _d === void 0 ? target_1.DEFAULT_LOG_TARGET : _d, logTranslator = _b.translate; - var targets = typeof logTargets === 'string' ? target_1.parseLogTargets(logTargets) : logTargets; - if (targets.length === 0) { - return createEmptyLogger(); - } - var log = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var time = Date.now(); - var sequence = ++lastSeqNumber; - var context; - if (typeof args[0] === 'string') { - context = __assign({}, baseContext); - } - else { - context = __assign({}, baseContext, args.shift()); - } - var msg = args.shift(); - var logLevel = context[context_1.LogContexts.logLevel]; - var destTargets = logLevel == null ? targets : targets.filter(function (t) { return logLevel >= t.minLevel; }); - if (destTargets.length === 0) { - return; - } - var message = util_1.format.apply(void 0, __spread([msg], args)); - var logMessage = { - context: context, - time: time, - sequence: sequence, - message: message, - }; - if (logTranslator) { - logMessage = logTranslator(logMessage); - } - destTargets.forEach(function (t) { return t.stream.write(t.format(logMessage) + "\n"); }); - }; - log.child = function (ctxOrTranslator) { - var isTranslator = typeof ctxOrTranslator === 'function'; - var childContext = isTranslator ? __assign({}, baseContext) : __assign({}, baseContext, ctxOrTranslator); - var translate; - if (isTranslator) { - if (logTranslator) { - translate = function (msg) { return ctxOrTranslator(logTranslator(msg)); }; - } - else { - translate = ctxOrTranslator; - } - } - else { - translate = logTranslator; - } - return createLogger({ context: childContext, targets: targets, translate: translate }); - }; - log.wrap = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var _a; - var _b = __read(Array(3 - args.length).concat(args), 3), ctx = _b[0], msg = _b[1], func = _b[2]; - var context = typeof ctx === 'number' ? __assign({}, baseContext, (_a = {}, _a[context_1.LogContexts.logLevel] = ctx, _a)) : __assign({}, baseContext, ctx); - var logLevel = context[context_1.LogContexts.logLevel]; - if (typeof logLevel === 'number' && targets.every(function (t) { return t.minLevel > logLevel; })) { - return func; - } - var message = msg == null ? "calling " + (func.name || '[anonymous]') + "()" : msg; - return function wrapped() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - log(__assign({ call: { args: args } }, context), message); - return func.apply(this, args); - }; - }; - level_1.LogLevelNames.forEach(function (name) { - var _a; - var level = level_1.LogLevels[name]; - var extraContext = (_a = {}, _a[context_1.LogContexts.logLevel] = level, _a); - log[name] = function (ctxOrMsg) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - if (targets.length === 0 || targets.every(function (t) { return t.minLevel > level; })) { - log[name] = createEmptyFunction(); - return; - } - if (typeof ctxOrMsg === 'string') { - log.apply(void 0, __spread([extraContext, ctxOrMsg], args)); - } - else { - log.apply(void 0, __spread([__assign({}, ctxOrMsg, extraContext)], args)); - } - }; - }); - return log; -}; -exports.createLogger = createLogger; diff --git a/node_modules/bs-logger/dist/logger/level.d.ts b/node_modules/bs-logger/dist/logger/level.d.ts deleted file mode 100644 index 3bb73e2d..00000000 --- a/node_modules/bs-logger/dist/logger/level.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -declare const LogLevels: { - trace: number; - debug: number; - info: number; - warn: number; - error: number; - fatal: number; - readonly lower: number; - readonly higher: number; -}; -declare type LogLevelName = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal'; -declare const LogLevelNames: LogLevelName[]; -declare const LogLevelValues: number[]; -interface LogLevelsScaleEntry { - range: { - from: number; - next: number; - }; - name: string; - test(level: number): boolean; -} -declare const LogLevelsScale: ReadonlyArray; -declare const logLevelNameFor: (level?: number | undefined) => string; -declare const parseLogLevel: (level: string | number) => number | undefined; -export { logLevelNameFor, LogLevels, LogLevelNames, LogLevelValues, LogLevelsScale, parseLogLevel, LogLevelName }; diff --git a/node_modules/bs-logger/dist/logger/level.js b/node_modules/bs-logger/dist/logger/level.js deleted file mode 100644 index 93788918..00000000 --- a/node_modules/bs-logger/dist/logger/level.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var cache_getters_1 = require("../utils/cache-getters"); -var LogLevels = cache_getters_1.cacheGetters({ - trace: 10, - debug: 20, - info: 30, - warn: 40, - error: 50, - fatal: 60, - get lower() { - return LogLevels.trace; - }, - get higher() { - return LogLevels.fatal; - }, -}, 'lower', 'higher'); -exports.LogLevels = LogLevels; -var LogLevelNames = ['trace', 'debug', 'info', 'warn', 'error', 'fatal']; -exports.LogLevelNames = LogLevelNames; -var LogLevelValues = LogLevelNames.map(function (name) { return LogLevels[name]; }); -exports.LogLevelValues = LogLevelValues; -var LogLevelsScale = LogLevelNames.map(function (name, index, _a) { - var length = _a.length; - var first = index === 0; - var last = index === length - 1; - var from = first ? -Infinity : LogLevelValues[index]; - var next = last ? +Infinity : LogLevelValues[index + 1]; - var test; - if (first) { - test = function (level) { return level < next; }; - } - else if (last) { - test = function (level) { return level >= from; }; - } - else { - test = function (level) { return level < next && level >= from; }; - } - return { range: { from: from, next: next }, name: name, test: test }; -}); -exports.LogLevelsScale = LogLevelsScale; -var logLevelNameFor = function (level) { - if (level == null || isNaN(level)) { - return LogLevelNames[0]; - } - return LogLevelsScale.find(function (_a) { - var test = _a.test; - return test(level); - }).name; -}; -exports.logLevelNameFor = logLevelNameFor; -var parseLogLevel = function (level) { - if (typeof level === 'string') { - level = level.toLowerCase(); - if (level in LogLevels) { - return LogLevels[level]; - } - return /^\s*[0-9]+\s*$/.test(level) ? parseInt(level.trim(), 10) : undefined; - } - return typeof level === 'number' && !isNaN(level) ? +level : undefined; -}; -exports.parseLogLevel = parseLogLevel; diff --git a/node_modules/bs-logger/dist/logger/message.d.ts b/node_modules/bs-logger/dist/logger/message.d.ts deleted file mode 100644 index 6a31fb19..00000000 --- a/node_modules/bs-logger/dist/logger/message.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { LogContext } from './context'; -interface LogMessage { - context: LogContext; - message: string; - sequence: number; - time: number; -} -declare type LogMessageFormatter = (msg: LogMessage) => string; -declare type LogMessageTranslator = (msg: LogMessage) => LogMessage; -interface LogFormattersMap { - json: LogMessageFormatter; - simple: LogMessageFormatter; - [key: string]: LogMessageFormatter; -} -declare let LogFormatters: LogFormattersMap; -declare const resetLogFormatters: () => void; -declare const registerLogFormatter: (name: string, format: LogMessageFormatter) => void; -export { LogMessage, LogMessageTranslator, LogMessageFormatter, LogFormatters, resetLogFormatters, registerLogFormatter, }; diff --git a/node_modules/bs-logger/dist/logger/message.js b/node_modules/bs-logger/dist/logger/message.js deleted file mode 100644 index 4664e27e..00000000 --- a/node_modules/bs-logger/dist/logger/message.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var fast_json_stable_stringify_1 = __importDefault(require("fast-json-stable-stringify")); -var context_1 = require("./context"); -var level_1 = require("./level"); -var LogFormatters = defaultLogFormatters(); -exports.LogFormatters = LogFormatters; -var resetLogFormatters = function () { - exports.LogFormatters = LogFormatters = defaultLogFormatters(); -}; -exports.resetLogFormatters = resetLogFormatters; -var registerLogFormatter = function (name, format) { - LogFormatters[name] = format; -}; -exports.registerLogFormatter = registerLogFormatter; -function defaultLogFormatters() { - return { - json: function (msg) { return fast_json_stable_stringify_1.default(__assign({}, msg, { time: new Date(msg.time) }), { cycles: true }); }, - simple: function (msg) { - return (msg.context[context_1.LogContexts.package] || msg.context[context_1.LogContexts.application] || 'main') + "[" + (msg.context[context_1.LogContexts.namespace] || 'root') + "] (" + level_1.logLevelNameFor(msg.context[context_1.LogContexts.logLevel]).toUpperCase() + ") " + msg.message; - }, - }; -} diff --git a/node_modules/bs-logger/dist/logger/root.d.ts b/node_modules/bs-logger/dist/logger/root.d.ts deleted file mode 100644 index 546afc3a..00000000 --- a/node_modules/bs-logger/dist/logger/root.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Logger } from '.'; -declare const setup: (factory?: () => Logger) => void; -declare const rootLogger: Logger; -export { rootLogger, setup }; diff --git a/node_modules/bs-logger/dist/logger/root.js b/node_modules/bs-logger/dist/logger/root.js deleted file mode 100644 index a0496167..00000000 --- a/node_modules/bs-logger/dist/logger/root.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spread = (this && this.__spread) || function () { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; -}; -var __values = (this && this.__values) || function (o) { - var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; - if (m) return m.call(o); - return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var e_1, _a; -var cache_getters_1 = require("../utils/cache-getters"); -var _1 = require("."); -var level_1 = require("./level"); -var cache; -var setup = function (factory) { - if (factory === void 0) { factory = function () { return _1.createLogger({ targets: process.env.LOG_TARGETS || process.env.LOG_TARGET }); }; } - cache = cache_getters_1.cacheGetters({ - get root() { - return factory(); - }, - }, 'root'); -}; -exports.setup = setup; -var rootLogger = (function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return cache.root.apply(cache, __spread(args)); -}); -exports.rootLogger = rootLogger; -var props = __spread(level_1.LogLevelNames, ['child', 'wrap']); -var _loop_1 = function (prop) { - Object.defineProperty(rootLogger, prop, { - enumerable: true, - configurable: true, - get: function () { - return cache.root[prop]; - }, - }); -}; -try { - for (var props_1 = __values(props), props_1_1 = props_1.next(); !props_1_1.done; props_1_1 = props_1.next()) { - var prop = props_1_1.value; - _loop_1(prop); - } -} -catch (e_1_1) { e_1 = { error: e_1_1 }; } -finally { - try { - if (props_1_1 && !props_1_1.done && (_a = props_1.return)) _a.call(props_1); - } - finally { if (e_1) throw e_1.error; } -} -cache_getters_1.cacheGetters.apply(void 0, __spread([rootLogger], props)); -setup(); diff --git a/node_modules/bs-logger/dist/logger/target.d.ts b/node_modules/bs-logger/dist/logger/target.d.ts deleted file mode 100644 index 1374d950..00000000 --- a/node_modules/bs-logger/dist/logger/target.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/// -import { Writable } from 'stream'; -import { LogMessageFormatter } from './message'; -interface LogTarget { - stream: Writable; - minLevel: number; - format: LogMessageFormatter; -} -declare const parseLogTargets: (targetString?: string | undefined) => LogTarget[]; -declare const DEFAULT_LOG_TARGET: string; -export { LogTarget, DEFAULT_LOG_TARGET, parseLogTargets }; diff --git a/node_modules/bs-logger/dist/logger/target.js b/node_modules/bs-logger/dist/logger/target.js deleted file mode 100644 index 1b20841e..00000000 --- a/node_modules/bs-logger/dist/logger/target.js +++ /dev/null @@ -1,90 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spread = (this && this.__spread) || function () { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var fs_1 = require("fs"); -var path_1 = require("path"); -var cache_getters_1 = require("../utils/cache-getters"); -var level_1 = require("./level"); -var message_1 = require("./message"); -var logTargetWithLevelRegex = new RegExp("^\\s*(.+):([0-9]+|" + level_1.LogLevelNames.join('|') + ")\\s*$", 'i'); -var parseLogTargets = function (targetString) { - var items = (targetString || '').split(/([^\\]),/g).reduce(function (list, item, index) { - if (index % 2 === 1) { - list[list.length - 1] += item; - } - else { - list.push(item); - } - return list; - }, []); - return items.reduce(function (targets, str) { - var format; - str = str.replace(/^(.+)%([a-z_][a-z0-9_]*)$/, function (_, before, key) { - format = message_1.LogFormatters[key]; - return before; - }); - var pieces = str.match(logTargetWithLevelRegex); - var file; - var level; - if (pieces) { - file = pieces[1].trim(); - level = pieces[2].trim(); - } - else { - file = str.trim(); - } - var append = file.endsWith('+'); - if (append) { - file = file.slice(0, -1).trim(); - } - file = file.replace(/\\,/g, ','); - if (!file) { - return targets; - } - var isStandardFd = /^(stdout|stderr)$/i.test(file); - if (format == null) { - format = isStandardFd ? message_1.LogFormatters.simple : message_1.LogFormatters.json; - } - var target = cache_getters_1.cacheGetters({ - format: format, - get minLevel() { - return level_1.parseLogLevel(level) || -Infinity; - }, - get stream() { - if (isStandardFd) { - return process[file.toLowerCase()]; - } - else { - return fs_1.createWriteStream(path_1.resolve(process.cwd(), file), { - flags: append ? 'a' : 'w', - autoClose: true, - encoding: 'utf8', - }); - } - }, - }, 'minLevel', 'stream'); - return __spread(targets, [target]); - }, []); -}; -exports.parseLogTargets = parseLogTargets; -var DEFAULT_LOG_TARGET = "stderr:" + level_1.LogLevels.warn; -exports.DEFAULT_LOG_TARGET = DEFAULT_LOG_TARGET; diff --git a/node_modules/bs-logger/dist/testing/index.d.ts b/node_modules/bs-logger/dist/testing/index.d.ts deleted file mode 100644 index 94cce016..00000000 --- a/node_modules/bs-logger/dist/testing/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { CreateLoggerOptions, Logger } from '../logger'; -import { ExtendedArray, LogTargetMock, extendArray } from './target-mock'; -declare const setupForTesting: (target?: LogTargetMock) => void; -interface LoggerMock extends Logger { - readonly target: LogTargetMock; -} -declare const createLoggerMock: (options?: CreateLoggerOptions | undefined, target?: LogTargetMock) => LoggerMock; -export { LogTargetMock, ExtendedArray, extendArray, setupForTesting as setup, createLoggerMock, LoggerMock }; diff --git a/node_modules/bs-logger/dist/testing/index.js b/node_modules/bs-logger/dist/testing/index.js deleted file mode 100644 index 928d7cb2..00000000 --- a/node_modules/bs-logger/dist/testing/index.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var logger_1 = require("../logger"); -var root_1 = require("../logger/root"); -var target_mock_1 = require("./target-mock"); -exports.LogTargetMock = target_mock_1.LogTargetMock; -exports.extendArray = target_mock_1.extendArray; -var setupForTesting = function (target) { - if (target === void 0) { target = new target_mock_1.LogTargetMock(); } - root_1.setup(function () { return createLoggerMock(undefined, target); }); -}; -exports.setup = setupForTesting; -var createLoggerMock = function (options, target) { - if (target === void 0) { target = new target_mock_1.LogTargetMock(); } - var opt = __assign({}, options, { targets: [target] }); - return Object.assign(logger_1.createLogger(opt), { target: target }); -}; -exports.createLoggerMock = createLoggerMock; diff --git a/node_modules/bs-logger/dist/testing/target-mock.d.ts b/node_modules/bs-logger/dist/testing/target-mock.d.ts deleted file mode 100644 index a3248dd5..00000000 --- a/node_modules/bs-logger/dist/testing/target-mock.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { LogMessage } from '../logger/message'; -import { LogTarget } from '../logger/target'; -interface ExtendedArray extends Array { - readonly last: T | undefined; -} -interface LogLevelMap { - trace: T; - debug: T; - info: T; - warn: T; - error: T; - fatal: T; -} -declare const extendArray: (array: T[]) => ExtendedArray; -declare class LogTargetMock implements LogTarget { - minLevel: number; - readonly messages: ExtendedArray & LogLevelMap>; - readonly lines: ExtendedArray & LogLevelMap>; - readonly stream: LogTarget['stream']; - constructor(minLevel?: number); - format(msg: LogMessage): string; - clear(): void; - filteredMessages(level: number, untilLevel?: number): ExtendedArray; - filteredMessages(level: null): ExtendedArray; - filteredLines(level: number, untilLevel?: number): ExtendedArray; - filteredLines(level: null): ExtendedArray; -} -export { LogTargetMock, extendArray, ExtendedArray }; diff --git a/node_modules/bs-logger/dist/testing/target-mock.js b/node_modules/bs-logger/dist/testing/target-mock.js deleted file mode 100644 index b41757cf..00000000 --- a/node_modules/bs-logger/dist/testing/target-mock.js +++ /dev/null @@ -1,89 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var context_1 = require("../logger/context"); -var level_1 = require("../logger/level"); -var extendArray = function (array) { - return Object.defineProperty(array, 'last', { - configurable: true, - get: function () { - return this[this.length - 1]; - }, - }); -}; -exports.extendArray = extendArray; -var LogTargetMock = (function () { - function LogTargetMock(minLevel) { - if (minLevel === void 0) { minLevel = -Infinity; } - var _this = this; - this.minLevel = minLevel; - this.messages = Object.defineProperties(extendArray([]), { - trace: { get: function () { return _this.filteredMessages(level_1.LogLevels.trace); } }, - debug: { get: function () { return _this.filteredMessages(level_1.LogLevels.debug); } }, - info: { get: function () { return _this.filteredMessages(level_1.LogLevels.info); } }, - warn: { get: function () { return _this.filteredMessages(level_1.LogLevels.warn); } }, - error: { get: function () { return _this.filteredMessages(level_1.LogLevels.error); } }, - fatal: { get: function () { return _this.filteredMessages(level_1.LogLevels.fatal); } }, - }); - this.lines = Object.defineProperties(extendArray([]), { - trace: { get: function () { return _this.filteredLines(level_1.LogLevels.trace); } }, - debug: { get: function () { return _this.filteredLines(level_1.LogLevels.debug); } }, - info: { get: function () { return _this.filteredLines(level_1.LogLevels.info); } }, - warn: { get: function () { return _this.filteredLines(level_1.LogLevels.warn); } }, - error: { get: function () { return _this.filteredLines(level_1.LogLevels.error); } }, - fatal: { get: function () { return _this.filteredLines(level_1.LogLevels.fatal); } }, - }); - this.stream = { - write: function (msg) { return !!_this.lines.push(msg); }, - }; - } - LogTargetMock.prototype.format = function (msg) { - this.messages.push(msg); - var lvl = msg.context[context_1.LogContexts.logLevel]; - if (lvl != null) { - return "[level:" + lvl + "] " + msg.message; - } - return msg.message; - }; - LogTargetMock.prototype.clear = function () { - this.messages.splice(0, this.messages.length); - this.lines.splice(0, this.lines.length); - }; - LogTargetMock.prototype.filteredMessages = function (level, untilLevel) { - var filter; - if (level == null) { - filter = function (m) { return m.context[context_1.LogContexts.logLevel] == null; }; - } - else if (untilLevel != null) { - filter = function (m) { - var lvl = m.context[context_1.LogContexts.logLevel]; - return lvl != null && lvl >= level && lvl <= untilLevel; - }; - } - else { - filter = function (m) { return m.context[context_1.LogContexts.logLevel] === level; }; - } - return extendArray(this.messages.filter(filter)); - }; - LogTargetMock.prototype.filteredLines = function (level, untilLevel) { - var extractLevel = function (line) { - var level = (line.match(/^\[level:([0-9]+)\] /) || [])[1]; - return level == null ? undefined : parseInt(level, 10); - }; - var filter; - if (level == null) { - filter = function (line) { return extractLevel(line) === undefined; }; - } - else if (untilLevel != null) { - filter = function (line) { - var lvl = extractLevel(line); - return lvl != null && lvl >= level && lvl <= untilLevel; - }; - } - else { - filter = function (line) { return extractLevel(line) === level; }; - } - return extendArray(this.lines.filter(filter)); - }; - return LogTargetMock; -}()); -exports.LogTargetMock = LogTargetMock; diff --git a/node_modules/bs-logger/dist/utils/cache-getters.d.ts b/node_modules/bs-logger/dist/utils/cache-getters.d.ts deleted file mode 100644 index e09c5adc..00000000 --- a/node_modules/bs-logger/dist/utils/cache-getters.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const cacheGetters: (target: T, ...props: (keyof T)[]) => T; -export { cacheGetters }; diff --git a/node_modules/bs-logger/dist/utils/cache-getters.js b/node_modules/bs-logger/dist/utils/cache-getters.js deleted file mode 100644 index 665489bd..00000000 --- a/node_modules/bs-logger/dist/utils/cache-getters.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; - return t; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var cacheGetters = function (target) { - var props = []; - for (var _i = 1; _i < arguments.length; _i++) { - props[_i - 1] = arguments[_i]; - } - props.forEach(function (prop) { - var desc = Object.getOwnPropertyDescriptor(target, prop); - var set = desc.set, previousGet = desc.get, partial = __rest(desc, ["set", "get"]); - desc.get = function get() { - var value = previousGet.call(this); - Object.defineProperty(this, prop, __assign({}, partial, { value: value })); - return value; - }; - Object.defineProperty(target, prop, desc); - }); - return target; -}; -exports.cacheGetters = cacheGetters; diff --git a/node_modules/bs-logger/package.json b/node_modules/bs-logger/package.json deleted file mode 100644 index e74ee385..00000000 --- a/node_modules/bs-logger/package.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "_args": [ - [ - "bs-logger@0.2.6", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "bs-logger@0.2.6", - "_id": "bs-logger@0.2.6", - "_inBundle": false, - "_integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", - "_location": "/bs-logger", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "bs-logger@0.2.6", - "name": "bs-logger", - "escapedName": "bs-logger", - "rawSpec": "0.2.6", - "saveSpec": null, - "fetchSpec": "0.2.6" - }, - "_requiredBy": [ - "/ts-jest" - ], - "_resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", - "_spec": "0.2.6", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Huafu Gandon", - "email": "huafu.gandon@gmail.com" - }, - "bugs": { - "url": "https://github.com/huafu/bs-logger/issues" - }, - "dependencies": { - "fast-json-stable-stringify": "2.x" - }, - "description": "Bare simple logger for NodeJS", - "devDependencies": { - "@commitlint/cli": "7.x", - "@commitlint/config-conventional": "7.x", - "@types/jest": "23.x", - "@types/node": "10.x", - "conventional-changelog-cli": "2.x", - "husky": "0.x", - "jest": "23.x", - "lint-staged": "7.x", - "prettier": "1.x", - "rimraf": "2.x", - "ts-jest": "23.x", - "tslint": "5.x", - "tslint-config-prettier": "1.x", - "tslint-plugin-prettier": "2.x", - "typescript": "3.x" - }, - "engines": { - "node": ">= 6" - }, - "files": [ - "dist" - ], - "homepage": "https://github.com/huafu/bs-logger#readme", - "keywords": [ - "bare simple logger", - "simple logger", - "simple", - "logger", - "typescript", - "lib", - "library" - ], - "license": "MIT", - "lint-staged": { - "linters": { - "*.{ts,tsx}": [ - "tslint --fix", - "git add" - ] - } - }, - "main": "dist/index.js", - "name": "bs-logger", - "repository": { - "type": "git", - "url": "git+https://github.com/huafu/bs-logger.git" - }, - "scripts": { - "build": "tsc -p tsconfig.build.json", - "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0", - "clean": "rimraf dist coverage", - "commitmsg": "commitlint -E GIT_PARAMS", - "lint": "tslint --project tsconfig.json --format stylish", - "lint:fix": "tslint --fix --project tsconfig.json", - "postcommit": "git reset", - "posttest": "npm run typecheck && npm run lint", - "postversion": "git push && git push --tags", - "prebuild": "npm run clean", - "precommit": "lint-staged", - "prepare": "npm run build", - "prepublishOnly": "npm run test", - "preversion": "npm test", - "test": "jest --coverage", - "test:watch": "jest --watch", - "typecheck": "tsc -p . --noEmit", - "version": "npm run changelog && git add CHANGELOG.md" - }, - "types": "dist/index.d.ts", - "version": "0.2.6" -} diff --git a/node_modules/bser/README.md b/node_modules/bser/README.md deleted file mode 100644 index eab0658a..00000000 --- a/node_modules/bser/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# BSER Binary Serialization - -BSER is a binary serialization scheme that can be used as an alternative to JSON. -BSER uses a framed encoding that makes it simpler to use to stream a sequence of -encoded values. - -It is intended to be used for local-IPC only and strings are represented as binary -with no specific encoding; this matches the convention employed by most operating -system filename storage. - -For more details about the serialization scheme see -[Watchman's docs](https://facebook.github.io/watchman/docs/bser.html). - -## API - -```js -var bser = require('bser'); -``` - -### bser.loadFromBuffer - -The is the synchronous decoder; given an input string or buffer, -decodes a single value and returns it. Throws an error if the -input is invalid. - -```js -var obj = bser.loadFromBuffer(buf); -``` - -### bser.dumpToBuffer - -Synchronously encodes a value as BSER. - -```js -var encoded = bser.dumpToBuffer(['hello']); -console.log(bser.loadFromBuffer(encoded)); // ['hello'] -``` - -### BunserBuf - -The asynchronous decoder API is implemented in the BunserBuf object. -You may incrementally append data to this object and it will emit the -decoded values via its `value` event. - -```js -var bunser = new bser.BunserBuf(); - -bunser.on('value', function(obj) { - console.log(obj); -}); -``` - -Then in your socket `data` event: - -```js -bunser.append(buf); -``` - -## Example - -Read BSER from socket: - -```js -var bunser = new bser.BunserBuf(); - -bunser.on('value', function(obj) { - console.log('data from socket', obj); -}); - -var socket = net.connect('/socket'); - -socket.on('data', function(buf) { - bunser.append(buf); -}); -``` - -Write BSER to socket: - -```js -socket.write(bser.dumpToBuffer(obj)); -``` diff --git a/node_modules/bser/index.js b/node_modules/bser/index.js deleted file mode 100644 index 6b6ae091..00000000 --- a/node_modules/bser/index.js +++ /dev/null @@ -1,586 +0,0 @@ -/* Copyright 2015-present Facebook, Inc. - * Licensed under the Apache License, Version 2.0 */ - -var EE = require('events').EventEmitter; -var util = require('util'); -var os = require('os'); -var assert = require('assert'); -var Int64 = require('node-int64'); - -// BSER uses the local endianness to reduce byte swapping overheads -// (the protocol is expressly local IPC only). We need to tell node -// to use the native endianness when reading various native values. -var isBigEndian = os.endianness() == 'BE'; - -// Find the next power-of-2 >= size -function nextPow2(size) { - return Math.pow(2, Math.ceil(Math.log(size) / Math.LN2)); -} - -// Expandable buffer that we can provide a size hint for -function Accumulator(initsize) { - this.buf = Buffer.alloc(nextPow2(initsize || 8192)); - this.readOffset = 0; - this.writeOffset = 0; -} -// For testing -exports.Accumulator = Accumulator - -// How much we can write into this buffer without allocating -Accumulator.prototype.writeAvail = function() { - return this.buf.length - this.writeOffset; -} - -// How much we can read -Accumulator.prototype.readAvail = function() { - return this.writeOffset - this.readOffset; -} - -// Ensure that we have enough space for size bytes -Accumulator.prototype.reserve = function(size) { - if (size < this.writeAvail()) { - return; - } - - // If we can make room by shunting down, do so - if (this.readOffset > 0) { - this.buf.copy(this.buf, 0, this.readOffset, this.writeOffset); - this.writeOffset -= this.readOffset; - this.readOffset = 0; - } - - // If we made enough room, no need to allocate more - if (size < this.writeAvail()) { - return; - } - - // Allocate a replacement and copy it in - var buf = Buffer.alloc(nextPow2(this.buf.length + size - this.writeAvail())); - this.buf.copy(buf); - this.buf = buf; -} - -// Append buffer or string. Will resize as needed -Accumulator.prototype.append = function(buf) { - if (Buffer.isBuffer(buf)) { - this.reserve(buf.length); - buf.copy(this.buf, this.writeOffset, 0, buf.length); - this.writeOffset += buf.length; - } else { - var size = Buffer.byteLength(buf); - this.reserve(size); - this.buf.write(buf, this.writeOffset); - this.writeOffset += size; - } -} - -Accumulator.prototype.assertReadableSize = function(size) { - if (this.readAvail() < size) { - throw new Error("wanted to read " + size + - " bytes but only have " + this.readAvail()); - } -} - -Accumulator.prototype.peekString = function(size) { - this.assertReadableSize(size); - return this.buf.toString('utf-8', this.readOffset, this.readOffset + size); -} - -Accumulator.prototype.readString = function(size) { - var str = this.peekString(size); - this.readOffset += size; - return str; -} - -Accumulator.prototype.peekInt = function(size) { - this.assertReadableSize(size); - switch (size) { - case 1: - return this.buf.readInt8(this.readOffset, size); - case 2: - return isBigEndian ? - this.buf.readInt16BE(this.readOffset, size) : - this.buf.readInt16LE(this.readOffset, size); - case 4: - return isBigEndian ? - this.buf.readInt32BE(this.readOffset, size) : - this.buf.readInt32LE(this.readOffset, size); - case 8: - var big = this.buf.slice(this.readOffset, this.readOffset + 8); - if (isBigEndian) { - // On a big endian system we can simply pass the buffer directly - return new Int64(big); - } - // Otherwise we need to byteswap - return new Int64(byteswap64(big)); - default: - throw new Error("invalid integer size " + size); - } -} - -Accumulator.prototype.readInt = function(bytes) { - var ival = this.peekInt(bytes); - if (ival instanceof Int64 && isFinite(ival.valueOf())) { - ival = ival.valueOf(); - } - this.readOffset += bytes; - return ival; -} - -Accumulator.prototype.peekDouble = function() { - this.assertReadableSize(8); - return isBigEndian ? - this.buf.readDoubleBE(this.readOffset) : - this.buf.readDoubleLE(this.readOffset); -} - -Accumulator.prototype.readDouble = function() { - var dval = this.peekDouble(); - this.readOffset += 8; - return dval; -} - -Accumulator.prototype.readAdvance = function(size) { - if (size > 0) { - this.assertReadableSize(size); - } else if (size < 0 && this.readOffset + size < 0) { - throw new Error("advance with negative offset " + size + - " would seek off the start of the buffer"); - } - this.readOffset += size; -} - -Accumulator.prototype.writeByte = function(value) { - this.reserve(1); - this.buf.writeInt8(value, this.writeOffset); - ++this.writeOffset; -} - -Accumulator.prototype.writeInt = function(value, size) { - this.reserve(size); - switch (size) { - case 1: - this.buf.writeInt8(value, this.writeOffset); - break; - case 2: - if (isBigEndian) { - this.buf.writeInt16BE(value, this.writeOffset); - } else { - this.buf.writeInt16LE(value, this.writeOffset); - } - break; - case 4: - if (isBigEndian) { - this.buf.writeInt32BE(value, this.writeOffset); - } else { - this.buf.writeInt32LE(value, this.writeOffset); - } - break; - default: - throw new Error("unsupported integer size " + size); - } - this.writeOffset += size; -} - -Accumulator.prototype.writeDouble = function(value) { - this.reserve(8); - if (isBigEndian) { - this.buf.writeDoubleBE(value, this.writeOffset); - } else { - this.buf.writeDoubleLE(value, this.writeOffset); - } - this.writeOffset += 8; -} - -var BSER_ARRAY = 0x00; -var BSER_OBJECT = 0x01; -var BSER_STRING = 0x02; -var BSER_INT8 = 0x03; -var BSER_INT16 = 0x04; -var BSER_INT32 = 0x05; -var BSER_INT64 = 0x06; -var BSER_REAL = 0x07; -var BSER_TRUE = 0x08; -var BSER_FALSE = 0x09; -var BSER_NULL = 0x0a; -var BSER_TEMPLATE = 0x0b; -var BSER_SKIP = 0x0c; - -var ST_NEED_PDU = 0; // Need to read and decode PDU length -var ST_FILL_PDU = 1; // Know the length, need to read whole content - -var MAX_INT8 = 127; -var MAX_INT16 = 32767; -var MAX_INT32 = 2147483647; - -function BunserBuf() { - EE.call(this); - this.buf = new Accumulator(); - this.state = ST_NEED_PDU; -} -util.inherits(BunserBuf, EE); -exports.BunserBuf = BunserBuf; - -BunserBuf.prototype.append = function(buf, synchronous) { - if (synchronous) { - this.buf.append(buf); - return this.process(synchronous); - } - - try { - this.buf.append(buf); - } catch (err) { - this.emit('error', err); - return; - } - // Arrange to decode later. This allows the consuming - // application to make progress with other work in the - // case that we have a lot of subscription updates coming - // in from a large tree. - this.processLater(); -} - -BunserBuf.prototype.processLater = function() { - var self = this; - process.nextTick(function() { - try { - self.process(false); - } catch (err) { - self.emit('error', err); - } - }); -} - -// Do something with the buffer to advance our state. -// If we're running synchronously we'll return either -// the value we've decoded or undefined if we don't -// yet have enought data. -// If we're running asynchronously, we'll emit the value -// when it becomes ready and schedule another invocation -// of process on the next tick if we still have data we -// can process. -BunserBuf.prototype.process = function(synchronous) { - if (this.state == ST_NEED_PDU) { - if (this.buf.readAvail() < 2) { - return; - } - // Validate BSER header - this.expectCode(0); - this.expectCode(1); - this.pduLen = this.decodeInt(true /* relaxed */); - if (this.pduLen === false) { - // Need more data, walk backwards - this.buf.readAdvance(-2); - return; - } - // Ensure that we have a big enough buffer to read the rest of the PDU - this.buf.reserve(this.pduLen); - this.state = ST_FILL_PDU; - } - - if (this.state == ST_FILL_PDU) { - if (this.buf.readAvail() < this.pduLen) { - // Need more data - return; - } - - // We have enough to decode it - var val = this.decodeAny(); - if (synchronous) { - return val; - } - this.emit('value', val); - this.state = ST_NEED_PDU; - } - - if (!synchronous && this.buf.readAvail() > 0) { - this.processLater(); - } -} - -BunserBuf.prototype.raise = function(reason) { - throw new Error(reason + ", in Buffer of length " + - this.buf.buf.length + " (" + this.buf.readAvail() + - " readable) at offset " + this.buf.readOffset + " buffer: " + - JSON.stringify(this.buf.buf.slice( - this.buf.readOffset, this.buf.readOffset + 32).toJSON())); -} - -BunserBuf.prototype.expectCode = function(expected) { - var code = this.buf.readInt(1); - if (code != expected) { - this.raise("expected bser opcode " + expected + " but got " + code); - } -} - -BunserBuf.prototype.decodeAny = function() { - var code = this.buf.peekInt(1); - switch (code) { - case BSER_INT8: - case BSER_INT16: - case BSER_INT32: - case BSER_INT64: - return this.decodeInt(); - case BSER_REAL: - this.buf.readAdvance(1); - return this.buf.readDouble(); - case BSER_TRUE: - this.buf.readAdvance(1); - return true; - case BSER_FALSE: - this.buf.readAdvance(1); - return false; - case BSER_NULL: - this.buf.readAdvance(1); - return null; - case BSER_STRING: - return this.decodeString(); - case BSER_ARRAY: - return this.decodeArray(); - case BSER_OBJECT: - return this.decodeObject(); - case BSER_TEMPLATE: - return this.decodeTemplate(); - default: - this.raise("unhandled bser opcode " + code); - } -} - -BunserBuf.prototype.decodeArray = function() { - this.expectCode(BSER_ARRAY); - var nitems = this.decodeInt(); - var arr = []; - for (var i = 0; i < nitems; ++i) { - arr.push(this.decodeAny()); - } - return arr; -} - -BunserBuf.prototype.decodeObject = function() { - this.expectCode(BSER_OBJECT); - var nitems = this.decodeInt(); - var res = {}; - for (var i = 0; i < nitems; ++i) { - var key = this.decodeString(); - var val = this.decodeAny(); - res[key] = val; - } - return res; -} - -BunserBuf.prototype.decodeTemplate = function() { - this.expectCode(BSER_TEMPLATE); - var keys = this.decodeArray(); - var nitems = this.decodeInt(); - var arr = []; - for (var i = 0; i < nitems; ++i) { - var obj = {}; - for (var keyidx = 0; keyidx < keys.length; ++keyidx) { - if (this.buf.peekInt(1) == BSER_SKIP) { - this.buf.readAdvance(1); - continue; - } - var val = this.decodeAny(); - obj[keys[keyidx]] = val; - } - arr.push(obj); - } - return arr; -} - -BunserBuf.prototype.decodeString = function() { - this.expectCode(BSER_STRING); - var len = this.decodeInt(); - return this.buf.readString(len); -} - -// This is unusual compared to the other decode functions in that -// we may not have enough data available to satisfy the read, and -// we don't want to throw. This is only true when we're reading -// the PDU length from the PDU header; we'll set relaxSizeAsserts -// in that case. -BunserBuf.prototype.decodeInt = function(relaxSizeAsserts) { - if (relaxSizeAsserts && !this.buf.readAvail(1)) { - return false; - } else { - this.buf.assertReadableSize(1); - } - var code = this.buf.peekInt(1); - var size = 0; - switch (code) { - case BSER_INT8: - size = 1; - break; - case BSER_INT16: - size = 2; - break; - case BSER_INT32: - size = 4; - break; - case BSER_INT64: - size = 8; - break; - default: - this.raise("invalid bser int encoding " + code); - } - - if (relaxSizeAsserts && !this.buf.readAvail(1 + size)) { - return false; - } - this.buf.readAdvance(1); - return this.buf.readInt(size); -} - -// synchronously BSER decode a string and return the value -function loadFromBuffer(input) { - var buf = new BunserBuf(); - var result = buf.append(input, true); - if (buf.buf.readAvail()) { - throw Error( - 'excess data found after input buffer, use BunserBuf instead'); - } - if (typeof result === 'undefined') { - throw Error( - 'no bser found in string and no error raised!?'); - } - return result; -} -exports.loadFromBuffer = loadFromBuffer - -// Byteswap an arbitrary buffer, flipping from one endian -// to the other, returning a new buffer with the resultant data -function byteswap64(buf) { - var swap = Buffer.alloc(buf.length); - for (var i = 0; i < buf.length; i++) { - swap[i] = buf[buf.length -1 - i]; - } - return swap; -} - -function dump_int64(buf, val) { - // Get the raw bytes. The Int64 buffer is big endian - var be = val.toBuffer(); - - if (isBigEndian) { - // We're a big endian system, so the buffer is exactly how we - // want it to be - buf.writeByte(BSER_INT64); - buf.append(be); - return; - } - // We need to byte swap to get the correct representation - var le = byteswap64(be); - buf.writeByte(BSER_INT64); - buf.append(le); -} - -function dump_int(buf, val) { - var abs = Math.abs(val); - if (abs <= MAX_INT8) { - buf.writeByte(BSER_INT8); - buf.writeInt(val, 1); - } else if (abs <= MAX_INT16) { - buf.writeByte(BSER_INT16); - buf.writeInt(val, 2); - } else if (abs <= MAX_INT32) { - buf.writeByte(BSER_INT32); - buf.writeInt(val, 4); - } else { - dump_int64(buf, new Int64(val)); - } -} - -function dump_any(buf, val) { - switch (typeof(val)) { - case 'number': - // check if it is an integer or a float - if (isFinite(val) && Math.floor(val) === val) { - dump_int(buf, val); - } else { - buf.writeByte(BSER_REAL); - buf.writeDouble(val); - } - return; - case 'string': - buf.writeByte(BSER_STRING); - dump_int(buf, Buffer.byteLength(val)); - buf.append(val); - return; - case 'boolean': - buf.writeByte(val ? BSER_TRUE : BSER_FALSE); - return; - case 'object': - if (val === null) { - buf.writeByte(BSER_NULL); - return; - } - if (val instanceof Int64) { - dump_int64(buf, val); - return; - } - if (Array.isArray(val)) { - buf.writeByte(BSER_ARRAY); - dump_int(buf, val.length); - for (var i = 0; i < val.length; ++i) { - dump_any(buf, val[i]); - } - return; - } - buf.writeByte(BSER_OBJECT); - var keys = Object.keys(val); - - // First pass to compute number of defined keys - var num_keys = keys.length; - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var v = val[key]; - if (typeof(v) == 'undefined') { - num_keys--; - } - } - dump_int(buf, num_keys); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var v = val[key]; - if (typeof(v) == 'undefined') { - // Don't include it - continue; - } - dump_any(buf, key); - try { - dump_any(buf, v); - } catch (e) { - throw new Error( - e.message + ' (while serializing object property with name `' + - key + "')"); - } - } - return; - - default: - throw new Error('cannot serialize type ' + typeof(val) + ' to BSER'); - } -} - -// BSER encode value and return a buffer of the contents -function dumpToBuffer(val) { - var buf = new Accumulator(); - // Build out the header - buf.writeByte(0); - buf.writeByte(1); - // Reserve room for an int32 to hold our PDU length - buf.writeByte(BSER_INT32); - buf.writeInt(0, 4); // We'll come back and fill this in at the end - - dump_any(buf, val); - - // Compute PDU length - var off = buf.writeOffset; - var len = off - 7 /* the header length */; - buf.writeOffset = 3; // The length value to fill in - buf.writeInt(len, 4); // write the length in the space we reserved - buf.writeOffset = off; - - return buf.buf.slice(0, off); -} -exports.dumpToBuffer = dumpToBuffer diff --git a/node_modules/bser/package.json b/node_modules/bser/package.json deleted file mode 100644 index d34712d5..00000000 --- a/node_modules/bser/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_args": [ - [ - "bser@2.1.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "bser@2.1.0", - "_id": "bser@2.1.0", - "_inBundle": false, - "_integrity": "sha512-8zsjWrQkkBoLK6uxASk1nJ2SKv97ltiGDo6A3wA0/yRPz+CwmEyDo0hUrhIuukG2JHpAl3bvFIixw2/3Hi0DOg==", - "_location": "/bser", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "bser@2.1.0", - "name": "bser", - "escapedName": "bser", - "rawSpec": "2.1.0", - "saveSpec": null, - "fetchSpec": "2.1.0" - }, - "_requiredBy": [ - "/fb-watchman" - ], - "_resolved": "https://registry.npmjs.org/bser/-/bser-2.1.0.tgz", - "_spec": "2.1.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Wez Furlong", - "email": "wez@fb.com", - "url": "http://wezfurlong.org" - }, - "bugs": { - "url": "https://github.com/facebook/watchman/issues" - }, - "dependencies": { - "node-int64": "^0.4.0" - }, - "description": "JavaScript implementation of the BSER Binary Serialization", - "directories": { - "test": "test" - }, - "files": [ - "index.js" - ], - "homepage": "https://facebook.github.io/watchman/docs/bser.html", - "keywords": [ - "bser", - "binary", - "protocol" - ], - "license": "Apache-2.0", - "main": "index.js", - "name": "bser", - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/watchman.git" - }, - "scripts": { - "test": "node test/bser.js" - }, - "version": "2.1.0" -} diff --git a/node_modules/buffer-from/LICENSE b/node_modules/buffer-from/LICENSE deleted file mode 100644 index e4bf1d69..00000000 --- a/node_modules/buffer-from/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016, 2018 Linus Unnebäck - -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/buffer-from/index.js b/node_modules/buffer-from/index.js deleted file mode 100644 index d92a83d0..00000000 --- a/node_modules/buffer-from/index.js +++ /dev/null @@ -1,69 +0,0 @@ -var toString = Object.prototype.toString - -var isModern = ( - typeof Buffer.alloc === 'function' && - typeof Buffer.allocUnsafe === 'function' && - typeof Buffer.from === 'function' -) - -function isArrayBuffer (input) { - return toString.call(input).slice(8, -1) === 'ArrayBuffer' -} - -function fromArrayBuffer (obj, byteOffset, length) { - byteOffset >>>= 0 - - var maxLength = obj.byteLength - byteOffset - - if (maxLength < 0) { - throw new RangeError("'offset' is out of bounds") - } - - if (length === undefined) { - length = maxLength - } else { - length >>>= 0 - - if (length > maxLength) { - throw new RangeError("'length' is out of bounds") - } - } - - return isModern - ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) - : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length))) -} - -function fromString (string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8' - } - - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('"encoding" must be a valid string encoding') - } - - return isModern - ? Buffer.from(string, encoding) - : new Buffer(string, encoding) -} - -function bufferFrom (value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number') - } - - if (isArrayBuffer(value)) { - return fromArrayBuffer(value, encodingOrOffset, length) - } - - if (typeof value === 'string') { - return fromString(value, encodingOrOffset) - } - - return isModern - ? Buffer.from(value) - : new Buffer(value) -} - -module.exports = bufferFrom diff --git a/node_modules/buffer-from/package.json b/node_modules/buffer-from/package.json deleted file mode 100644 index cec3a168..00000000 --- a/node_modules/buffer-from/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "_args": [ - [ - "buffer-from@1.1.1", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "buffer-from@1.1.1", - "_id": "buffer-from@1.1.1", - "_inBundle": false, - "_integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "_location": "/buffer-from", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "buffer-from@1.1.1", - "name": "buffer-from", - "escapedName": "buffer-from", - "rawSpec": "1.1.1", - "saveSpec": null, - "fetchSpec": "1.1.1" - }, - "_requiredBy": [ - "/source-map-support", - "/ts-jest" - ], - "_resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "_spec": "1.1.1", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/LinusU/buffer-from/issues" - }, - "description": "A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available.", - "devDependencies": { - "standard": "^7.1.2" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/LinusU/buffer-from#readme", - "keywords": [ - "buffer", - "buffer from" - ], - "license": "MIT", - "name": "buffer-from", - "repository": { - "type": "git", - "url": "git+https://github.com/LinusU/buffer-from.git" - }, - "scripts": { - "test": "standard && node test" - }, - "version": "1.1.1" -} diff --git a/node_modules/buffer-from/readme.md b/node_modules/buffer-from/readme.md deleted file mode 100644 index 9880a558..00000000 --- a/node_modules/buffer-from/readme.md +++ /dev/null @@ -1,69 +0,0 @@ -# Buffer From - -A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available. - -## Installation - -```sh -npm install --save buffer-from -``` - -## Usage - -```js -const bufferFrom = require('buffer-from') - -console.log(bufferFrom([1, 2, 3, 4])) -//=> - -const arr = new Uint8Array([1, 2, 3, 4]) -console.log(bufferFrom(arr.buffer, 1, 2)) -//=> - -console.log(bufferFrom('test', 'utf8')) -//=> - -const buf = bufferFrom('test') -console.log(bufferFrom(buf)) -//=> -``` - -## API - -### bufferFrom(array) - -- `array` <Array> - -Allocates a new `Buffer` using an `array` of octets. - -### bufferFrom(arrayBuffer[, byteOffset[, length]]) - -- `arrayBuffer` <ArrayBuffer> The `.buffer` property of a TypedArray or ArrayBuffer -- `byteOffset` <Integer> Where to start copying from `arrayBuffer`. **Default:** `0` -- `length` <Integer> How many bytes to copy from `arrayBuffer`. **Default:** `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a TypedArray instance, the -newly created `Buffer` will share the same allocated memory as the TypedArray. - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -### bufferFrom(buffer) - -- `buffer` <Buffer> An existing `Buffer` to copy data from - -Copies the passed `buffer` data onto a new `Buffer` instance. - -### bufferFrom(string[, encoding]) - -- `string` <String> A string to encode. -- `encoding` <String> The encoding of `string`. **Default:** `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `string`. If -provided, the `encoding` parameter identifies the character encoding of -`string`. - -## See also - -- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc` -- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe` diff --git a/node_modules/cache-base/LICENSE b/node_modules/cache-base/LICENSE deleted file mode 100644 index 943e71d0..00000000 --- a/node_modules/cache-base/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2017, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/cache-base/README.md b/node_modules/cache-base/README.md deleted file mode 100644 index 62c6ffeb..00000000 --- a/node_modules/cache-base/README.md +++ /dev/null @@ -1,291 +0,0 @@ -# cache-base [![NPM version](https://img.shields.io/npm/v/cache-base.svg?style=flat)](https://www.npmjs.com/package/cache-base) [![NPM monthly downloads](https://img.shields.io/npm/dm/cache-base.svg?style=flat)](https://npmjs.org/package/cache-base) [![NPM total downloads](https://img.shields.io/npm/dt/cache-base.svg?style=flat)](https://npmjs.org/package/cache-base) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/cache-base.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/cache-base) - -> Basic object cache with `get`, `set`, `del`, and `has` methods for node.js/javascript projects. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save cache-base -``` - -## Usage - -```js -var Cache = require('cache-base'); - -// instantiate -var app = new Cache(); - -// set values -app.set('a', 'b'); -app.set('c.d', 'e'); - -// get values -app.get('a'); -//=> 'b' -app.get('c'); -//=> {d: 'e'} - -console.log(app.cache); -//=> {a: 'b'} -``` - -**Inherit** - -```js -var util = require('util'); -var Cache = require('cache-base'); - -function MyApp() { - Cache.call(this); -} -util.inherits(MyApp, Cache); - -var app = new MyApp(); -app.set('a', 'b'); -app.get('a'); -//=> 'b' -``` - -**Namespace** - -Define a custom property for storing values. - -```js -var Cache = require('cache-base').namespace('data'); -var app = new Cache(); -app.set('a', 'b'); -console.log(app.data); -//=> {a: 'b'} -``` - -## API - -### [namespace](index.js#L29) - -Create a `Cache` constructor that when instantiated will store values on the given `prop`. - -**Params** - -* `prop` **{String}**: The property name to use for storing values. -* `returns` **{Function}**: Returns a custom `Cache` constructor - -**Example** - -```js -var Cache = require('cache-base').namespace('data'); -var cache = new Cache(); - -cache.set('foo', 'bar'); -//=> {data: {foo: 'bar'}} -``` - -### [Cache](index.js#L43) - -Create a new `Cache`. Internally the `Cache` constructor is created using the `namespace` function, with `cache` defined as the storage object. - -**Params** - -* `cache` **{Object}**: Optionally pass an object to initialize with. - -**Example** - -```js -var app = new Cache(); -``` - -### [.set](index.js#L84) - -Assign `value` to `key`. Also emits `set` with the key and value. - -**Params** - -* `key` **{String}** -* `value` **{any}** -* `returns` **{Object}**: Returns the instance for chaining. - -**Events** - -* `emits`: `set` with `key` and `value` as arguments. - -**Example** - -```js -app.on('set', function(key, val) { - // do something when `set` is emitted -}); - -app.set(key, value); - -// also takes an object or array -app.set({name: 'Halle'}); -app.set([{foo: 'bar'}, {baz: 'quux'}]); -console.log(app); -//=> {name: 'Halle', foo: 'bar', baz: 'quux'} -``` - -### [.union](index.js#L114) - -Union `array` to `key`. Also emits `set` with the key and value. - -**Params** - -* `key` **{String}** -* `value` **{any}** -* `returns` **{Object}**: Returns the instance for chaining. - -**Example** - -```js -app.union('a.b', ['foo']); -app.union('a.b', ['bar']); -console.log(app.get('a')); -//=> {b: ['foo', 'bar']} -``` - -### [.get](index.js#L144) - -Return the value of `key`. Dot notation may be used to get [nested property values](https://github.com/jonschlinkert/get-value). - -**Params** - -* `key` **{String}**: The name of the property to get. Dot-notation may be used. -* `returns` **{any}**: Returns the value of `key` - -**Events** - -* `emits`: `get` with `key` and `value` as arguments. - -**Example** - -```js -app.set('a.b.c', 'd'); -app.get('a.b'); -//=> {c: 'd'} - -app.get(['a', 'b']); -//=> {c: 'd'} -``` - -### [.has](index.js#L171) - -Return true if app has a stored value for `key`, false only if value is `undefined`. - -**Params** - -* `key` **{String}** -* `returns` **{Boolean}** - -**Events** - -* `emits`: `has` with `key` and true or false as arguments. - -**Example** - -```js -app.set('foo', 'bar'); -app.has('foo'); -//=> true -``` - -### [.del](index.js#L199) - -Delete one or more properties from the instance. - -**Params** - -* `key` **{String|Array}**: Property name or array of property names. -* `returns` **{Object}**: Returns the instance for chaining. - -**Events** - -* `emits`: `del` with the `key` as the only argument. - -**Example** - -```js -app.del(); // delete all -// or -app.del('foo'); -// or -app.del(['foo', 'bar']); -``` - -### [.clear](index.js#L218) - -Reset the entire cache to an empty object. - -**Example** - -```js -app.clear(); -``` - -### [.visit](index.js#L235) - -Visit `method` over the properties in the given object, or map -visit over the object-elements in an array. - -**Params** - -* `method` **{String}**: The name of the `base` method to call. -* `val` **{Object|Array}**: The object or array to iterate over. -* `returns` **{Object}**: Returns the instance for chaining. - -## About - -### Related projects - -* [base-methods](https://www.npmjs.com/package/base-methods): base-methods is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/jonschlinkert/base-methods) | [homepage](https://github.com/jonschlinkert/base-methods "base-methods is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.") -* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.") -* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://github.com/jonschlinkert/has-value) | [homepage](https://github.com/jonschlinkert/has-value "Returns true if a value exists, false if empty. Works with deeply nested values using object paths.") -* [option-cache](https://www.npmjs.com/package/option-cache): Simple API for managing options in JavaScript applications. | [homepage](https://github.com/jonschlinkert/option-cache "Simple API for managing options in JavaScript applications.") -* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.") -* [unset-value](https://www.npmjs.com/package/unset-value): Delete nested properties from an object using dot notation. | [homepage](https://github.com/jonschlinkert/unset-value "Delete nested properties from an object using dot notation.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 54 | [jonschlinkert](https://github.com/jonschlinkert) | -| 2 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | - -### Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -### Running tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 22, 2017._ \ No newline at end of file diff --git a/node_modules/cache-base/index.js b/node_modules/cache-base/index.js deleted file mode 100644 index 41280245..00000000 --- a/node_modules/cache-base/index.js +++ /dev/null @@ -1,261 +0,0 @@ -'use strict'; - -var isObject = require('isobject'); -var Emitter = require('component-emitter'); -var visit = require('collection-visit'); -var toPath = require('to-object-path'); -var union = require('union-value'); -var del = require('unset-value'); -var get = require('get-value'); -var has = require('has-value'); -var set = require('set-value'); - -/** - * Create a `Cache` constructor that when instantiated will - * store values on the given `prop`. - * - * ```js - * var Cache = require('cache-base').namespace('data'); - * var cache = new Cache(); - * - * cache.set('foo', 'bar'); - * //=> {data: {foo: 'bar'}} - * ``` - * @param {String} `prop` The property name to use for storing values. - * @return {Function} Returns a custom `Cache` constructor - * @api public - */ - -function namespace(prop) { - - /** - * Create a new `Cache`. Internally the `Cache` constructor is created using - * the `namespace` function, with `cache` defined as the storage object. - * - * ```js - * var app = new Cache(); - * ``` - * @param {Object} `cache` Optionally pass an object to initialize with. - * @constructor - * @api public - */ - - function Cache(cache) { - if (prop) { - this[prop] = {}; - } - if (cache) { - this.set(cache); - } - } - - /** - * Inherit Emitter - */ - - Emitter(Cache.prototype); - - /** - * Assign `value` to `key`. Also emits `set` with - * the key and value. - * - * ```js - * app.on('set', function(key, val) { - * // do something when `set` is emitted - * }); - * - * app.set(key, value); - * - * // also takes an object or array - * app.set({name: 'Halle'}); - * app.set([{foo: 'bar'}, {baz: 'quux'}]); - * console.log(app); - * //=> {name: 'Halle', foo: 'bar', baz: 'quux'} - * ``` - * - * @name .set - * @emits `set` with `key` and `value` as arguments. - * @param {String} `key` - * @param {any} `value` - * @return {Object} Returns the instance for chaining. - * @api public - */ - - Cache.prototype.set = function(key, val) { - if (Array.isArray(key) && arguments.length === 2) { - key = toPath(key); - } - if (isObject(key) || Array.isArray(key)) { - this.visit('set', key); - } else { - set(prop ? this[prop] : this, key, val); - this.emit('set', key, val); - } - return this; - }; - - /** - * Union `array` to `key`. Also emits `set` with - * the key and value. - * - * ```js - * app.union('a.b', ['foo']); - * app.union('a.b', ['bar']); - * console.log(app.get('a')); - * //=> {b: ['foo', 'bar']} - * ``` - * @name .union - * @param {String} `key` - * @param {any} `value` - * @return {Object} Returns the instance for chaining. - * @api public - */ - - Cache.prototype.union = function(key, val) { - if (Array.isArray(key) && arguments.length === 2) { - key = toPath(key); - } - var ctx = prop ? this[prop] : this; - union(ctx, key, arrayify(val)); - this.emit('union', val); - return this; - }; - - /** - * Return the value of `key`. Dot notation may be used - * to get [nested property values][get-value]. - * - * ```js - * app.set('a.b.c', 'd'); - * app.get('a.b'); - * //=> {c: 'd'} - * - * app.get(['a', 'b']); - * //=> {c: 'd'} - * ``` - * - * @name .get - * @emits `get` with `key` and `value` as arguments. - * @param {String} `key` The name of the property to get. Dot-notation may be used. - * @return {any} Returns the value of `key` - * @api public - */ - - Cache.prototype.get = function(key) { - key = toPath(arguments); - - var ctx = prop ? this[prop] : this; - var val = get(ctx, key); - - this.emit('get', key, val); - return val; - }; - - /** - * Return true if app has a stored value for `key`, - * false only if value is `undefined`. - * - * ```js - * app.set('foo', 'bar'); - * app.has('foo'); - * //=> true - * ``` - * - * @name .has - * @emits `has` with `key` and true or false as arguments. - * @param {String} `key` - * @return {Boolean} - * @api public - */ - - Cache.prototype.has = function(key) { - key = toPath(arguments); - - var ctx = prop ? this[prop] : this; - var val = get(ctx, key); - - var has = typeof val !== 'undefined'; - this.emit('has', key, has); - return has; - }; - - /** - * Delete one or more properties from the instance. - * - * ```js - * app.del(); // delete all - * // or - * app.del('foo'); - * // or - * app.del(['foo', 'bar']); - * ``` - * @name .del - * @emits `del` with the `key` as the only argument. - * @param {String|Array} `key` Property name or array of property names. - * @return {Object} Returns the instance for chaining. - * @api public - */ - - Cache.prototype.del = function(key) { - if (Array.isArray(key)) { - this.visit('del', key); - } else { - del(prop ? this[prop] : this, key); - this.emit('del', key); - } - return this; - }; - - /** - * Reset the entire cache to an empty object. - * - * ```js - * app.clear(); - * ``` - * @api public - */ - - Cache.prototype.clear = function() { - if (prop) { - this[prop] = {}; - } - }; - - /** - * Visit `method` over the properties in the given object, or map - * visit over the object-elements in an array. - * - * @name .visit - * @param {String} `method` The name of the `base` method to call. - * @param {Object|Array} `val` The object or array to iterate over. - * @return {Object} Returns the instance for chaining. - * @api public - */ - - Cache.prototype.visit = function(method, val) { - visit(this, method, val); - return this; - }; - - return Cache; -} - -/** - * Cast val to an array - */ - -function arrayify(val) { - return val ? (Array.isArray(val) ? val : [val]) : []; -} - -/** - * Expose `Cache` - */ - -module.exports = namespace(); - -/** - * Expose `Cache.namespace` - */ - -module.exports.namespace = namespace; diff --git a/node_modules/cache-base/package.json b/node_modules/cache-base/package.json deleted file mode 100644 index aa376466..00000000 --- a/node_modules/cache-base/package.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "_args": [ - [ - "cache-base@1.0.1", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "cache-base@1.0.1", - "_id": "cache-base@1.0.1", - "_inBundle": false, - "_integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "_location": "/cache-base", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "cache-base@1.0.1", - "name": "cache-base", - "escapedName": "cache-base", - "rawSpec": "1.0.1", - "saveSpec": null, - "fetchSpec": "1.0.1" - }, - "_requiredBy": [ - "/base" - ], - "_resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "_spec": "1.0.1", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/jonschlinkert/cache-base/issues" - }, - "contributors": [ - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "url": "https://github.com/wtgtybhertgeghgtwtg" - } - ], - "dependencies": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - }, - "description": "Basic object cache with `get`, `set`, `del`, and `has` methods for node.js/javascript projects.", - "devDependencies": { - "gulp-format-md": "^1.0.0", - "mocha": "^3.4.2" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/cache-base", - "keywords": [ - "base", - "cache", - "config", - "data", - "get", - "has", - "hash", - "hasown", - "object", - "set", - "store" - ], - "license": "MIT", - "main": "index.js", - "name": "cache-base", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/cache-base.git" - }, - "scripts": { - "test": "mocha" - }, - "verb": { - "run": true, - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "highligh": "base", - "list": [ - "base-methods", - "get-value", - "has-value", - "option-cache", - "set-value", - "unset-value" - ] - }, - "reflinks": [ - "verb" - ], - "lint": { - "reflinks": true - } - }, - "version": "1.0.1" -} diff --git a/node_modules/caller-callsite/index.js b/node_modules/caller-callsite/index.js deleted file mode 100644 index ba201226..00000000 --- a/node_modules/caller-callsite/index.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; -const callsites = require('callsites'); - -module.exports = () => { - const c = callsites(); - let caller; - - for (let i = 0; i < c.length; i++) { - const hasReceiver = c[i].getTypeName() !== null; - - if (hasReceiver) { - caller = i; - break; - } - } - - return c[caller]; -}; diff --git a/node_modules/caller-callsite/license b/node_modules/caller-callsite/license deleted file mode 100644 index 654d0bfe..00000000 --- a/node_modules/caller-callsite/license +++ /dev/null @@ -1,21 +0,0 @@ -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/caller-callsite/package.json b/node_modules/caller-callsite/package.json deleted file mode 100644 index e16e0c34..00000000 --- a/node_modules/caller-callsite/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_args": [ - [ - "caller-callsite@2.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "caller-callsite@2.0.0", - "_id": "caller-callsite@2.0.0", - "_inBundle": false, - "_integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "_location": "/caller-callsite", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "caller-callsite@2.0.0", - "name": "caller-callsite", - "escapedName": "caller-callsite", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/caller-path" - ], - "_resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/caller-callsite/issues" - }, - "dependencies": { - "callsites": "^2.0.0" - }, - "description": "Get the callsite of the caller function", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/caller-callsite#readme", - "keywords": [ - "caller", - "calling", - "module", - "parent", - "callsites", - "callsite", - "stacktrace", - "stack", - "trace", - "function", - "file" - ], - "license": "MIT", - "name": "caller-callsite", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/caller-callsite.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0", - "xo": { - "esnext": true - } -} diff --git a/node_modules/caller-callsite/readme.md b/node_modules/caller-callsite/readme.md deleted file mode 100644 index 90084679..00000000 --- a/node_modules/caller-callsite/readme.md +++ /dev/null @@ -1,41 +0,0 @@ -# caller-callsite [![Build Status](https://travis-ci.org/sindresorhus/caller-callsite.svg?branch=master)](https://travis-ci.org/sindresorhus/caller-callsite) - -> Get the [callsite](https://github.com/sindresorhus/callsites#api) of the caller function - - -## Install - -``` -$ npm install --save caller-callsite -``` - - -## Usage - -```js -// foo.js -const callerCallsite = require('caller-callsite'); - -module.exports = () => { - console.log(callerCallsite().getFileName()); - //=> '/Users/sindresorhus/dev/unicorn/bar.js' -} -``` - -```js -// bar.js -const foo = require('./foo'); -foo(); -``` - - -## API - -### callerCallsite() - -Returns a [`callsite`](https://github.com/sindresorhus/callsites#api) object. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/caller-path/index.js b/node_modules/caller-path/index.js deleted file mode 100644 index e5900f03..00000000 --- a/node_modules/caller-path/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -const callerCallsite = require('caller-callsite'); - -module.exports = () => callerCallsite().getFileName(); diff --git a/node_modules/caller-path/license b/node_modules/caller-path/license deleted file mode 100644 index 654d0bfe..00000000 --- a/node_modules/caller-path/license +++ /dev/null @@ -1,21 +0,0 @@ -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/caller-path/package.json b/node_modules/caller-path/package.json deleted file mode 100644 index ee1c403f..00000000 --- a/node_modules/caller-path/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_args": [ - [ - "caller-path@2.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "caller-path@2.0.0", - "_id": "caller-path@2.0.0", - "_inBundle": false, - "_integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "_location": "/caller-path", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "caller-path@2.0.0", - "name": "caller-path", - "escapedName": "caller-path", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/import-fresh" - ], - "_resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/caller-path/issues" - }, - "dependencies": { - "caller-callsite": "^2.0.0" - }, - "description": "Get the path of the caller function", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/caller-path#readme", - "keywords": [ - "caller", - "calling", - "module", - "path", - "parent", - "callsites", - "callsite", - "stacktrace", - "stack", - "trace", - "function", - "file" - ], - "license": "MIT", - "name": "caller-path", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/caller-path.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0", - "xo": { - "esnext": true - } -} diff --git a/node_modules/caller-path/readme.md b/node_modules/caller-path/readme.md deleted file mode 100644 index 59aac48d..00000000 --- a/node_modules/caller-path/readme.md +++ /dev/null @@ -1,34 +0,0 @@ -# caller-path [![Build Status](https://travis-ci.org/sindresorhus/caller-path.svg?branch=master)](https://travis-ci.org/sindresorhus/caller-path) - -> Get the path of the caller function - - -## Install - -``` -$ npm install --save caller-path -``` - - -## Usage - -```js -// foo.js -const callerPath = require('caller-path'); - -module.exports = () => { - console.log(callerPath()); - //=> '/Users/sindresorhus/dev/unicorn/bar.js' -} -``` - -```js -// bar.js -const foo = require('./foo'); -foo(); -``` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/callsites/index.js b/node_modules/callsites/index.js deleted file mode 100644 index f4840838..00000000 --- a/node_modules/callsites/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; -module.exports = () => { - const _ = Error.prepareStackTrace; - Error.prepareStackTrace = (_, stack) => stack; - const stack = new Error().stack.slice(1); - Error.prepareStackTrace = _; - return stack; -}; diff --git a/node_modules/callsites/license b/node_modules/callsites/license deleted file mode 100644 index 654d0bfe..00000000 --- a/node_modules/callsites/license +++ /dev/null @@ -1,21 +0,0 @@ -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/callsites/package.json b/node_modules/callsites/package.json deleted file mode 100644 index c866c593..00000000 --- a/node_modules/callsites/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_args": [ - [ - "callsites@2.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "callsites@2.0.0", - "_id": "callsites@2.0.0", - "_inBundle": false, - "_integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "_location": "/callsites", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "callsites@2.0.0", - "name": "callsites", - "escapedName": "callsites", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/caller-callsite" - ], - "_resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/callsites/issues" - }, - "description": "Get callsites from the V8 stack trace API", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/callsites#readme", - "keywords": [ - "stacktrace", - "v8", - "callsite", - "callsites", - "stack", - "trace", - "function", - "file", - "line", - "debug" - ], - "license": "MIT", - "name": "callsites", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/callsites.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0", - "xo": { - "esnext": true - } -} diff --git a/node_modules/callsites/readme.md b/node_modules/callsites/readme.md deleted file mode 100644 index 7a5fccde..00000000 --- a/node_modules/callsites/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# 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://github.com/v8/v8/wiki/Stack-Trace-API) - - -## Install - -``` -$ npm install --save 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: - -- `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. -- `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 CallSite object 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/camelcase/index.d.ts b/node_modules/camelcase/index.d.ts deleted file mode 100644 index 58f2069a..00000000 --- a/node_modules/camelcase/index.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -declare namespace camelcase { - interface Options { - /** - Uppercase the first character: `foo-bar` → `FooBar`. - - @default false - */ - readonly pascalCase?: boolean; - } -} - -declare const camelcase: { - /** - Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`. - - @param input - String to convert to camel case. - - @example - ``` - import camelCase = require('camelcase'); - - camelCase('foo-bar'); - //=> 'fooBar' - - camelCase('foo_bar'); - //=> 'fooBar' - - camelCase('Foo-Bar'); - //=> 'fooBar' - - camelCase('Foo-Bar', {pascalCase: true}); - //=> 'FooBar' - - camelCase('--foo.bar', {pascalCase: false}); - //=> 'fooBar' - - camelCase('foo bar'); - //=> 'fooBar' - - console.log(process.argv[3]); - //=> '--foo-bar' - camelCase(process.argv[3]); - //=> 'fooBar' - - camelCase(['foo', 'bar']); - //=> 'fooBar' - - camelCase(['__foo__', '--bar'], {pascalCase: true}); - //=> 'FooBar' - ``` - */ - (input: string | ReadonlyArray, options?: camelcase.Options): string; - - // TODO: Remove this for the next major release, refactor the whole definition to: - // declare function camelcase( - // input: string | ReadonlyArray, - // options?: camelcase.Options - // ): string; - // export = camelcase; - default: typeof camelcase; -}; - -export = camelcase; diff --git a/node_modules/camelcase/index.js b/node_modules/camelcase/index.js deleted file mode 100644 index 579f99b4..00000000 --- a/node_modules/camelcase/index.js +++ /dev/null @@ -1,76 +0,0 @@ -'use strict'; - -const preserveCamelCase = string => { - let isLastCharLower = false; - let isLastCharUpper = false; - let isLastLastCharUpper = false; - - for (let i = 0; i < string.length; i++) { - const character = string[i]; - - if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) { - string = string.slice(0, i) + '-' + string.slice(i); - isLastCharLower = false; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = true; - i++; - } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) { - string = string.slice(0, i - 1) + '-' + string.slice(i - 1); - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = false; - isLastCharLower = true; - } else { - isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character; - } - } - - return string; -}; - -const camelCase = (input, options) => { - if (!(typeof input === 'string' || Array.isArray(input))) { - throw new TypeError('Expected the input to be `string | string[]`'); - } - - options = Object.assign({ - pascalCase: false - }, options); - - const postProcess = x => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x; - - if (Array.isArray(input)) { - input = input.map(x => x.trim()) - .filter(x => x.length) - .join('-'); - } else { - input = input.trim(); - } - - if (input.length === 0) { - return ''; - } - - if (input.length === 1) { - return options.pascalCase ? input.toUpperCase() : input.toLowerCase(); - } - - const hasUpperCase = input !== input.toLowerCase(); - - if (hasUpperCase) { - input = preserveCamelCase(input); - } - - input = input - .replace(/^[_.\- ]+/, '') - .toLowerCase() - .replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()) - .replace(/\d+(\w|$)/g, m => m.toUpperCase()); - - return postProcess(input); -}; - -module.exports = camelCase; -// TODO: Remove this for the next major release -module.exports.default = camelCase; diff --git a/node_modules/camelcase/license b/node_modules/camelcase/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/camelcase/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/camelcase/package.json b/node_modules/camelcase/package.json deleted file mode 100644 index ca5201fa..00000000 --- a/node_modules/camelcase/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_args": [ - [ - "camelcase@5.3.1", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "camelcase@5.3.1", - "_id": "camelcase@5.3.1", - "_inBundle": false, - "_integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "_location": "/camelcase", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "camelcase@5.3.1", - "name": "camelcase", - "escapedName": "camelcase", - "rawSpec": "5.3.1", - "saveSpec": null, - "fetchSpec": "5.3.1" - }, - "_requiredBy": [ - "/jest-validate", - "/yargs-parser" - ], - "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "_spec": "5.3.1", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/camelcase/issues" - }, - "description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`", - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/sindresorhus/camelcase#readme", - "keywords": [ - "camelcase", - "camel-case", - "camel", - "case", - "dash", - "hyphen", - "dot", - "underscore", - "separator", - "string", - "text", - "convert", - "pascalcase", - "pascal-case" - ], - "license": "MIT", - "name": "camelcase", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/camelcase.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "5.3.1" -} diff --git a/node_modules/camelcase/readme.md b/node_modules/camelcase/readme.md deleted file mode 100644 index fde27261..00000000 --- a/node_modules/camelcase/readme.md +++ /dev/null @@ -1,99 +0,0 @@ -# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) - -> Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar` - ---- - -
- - Get professional support for 'camelcase' with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
- ---- - -## Install - -``` -$ npm install camelcase -``` - - -## Usage - -```js -const camelCase = require('camelcase'); - -camelCase('foo-bar'); -//=> 'fooBar' - -camelCase('foo_bar'); -//=> 'fooBar' - -camelCase('Foo-Bar'); -//=> 'fooBar' - -camelCase('Foo-Bar', {pascalCase: true}); -//=> 'FooBar' - -camelCase('--foo.bar', {pascalCase: false}); -//=> 'fooBar' - -camelCase('foo bar'); -//=> 'fooBar' - -console.log(process.argv[3]); -//=> '--foo-bar' -camelCase(process.argv[3]); -//=> 'fooBar' - -camelCase(['foo', 'bar']); -//=> 'fooBar' - -camelCase(['__foo__', '--bar'], {pascalCase: true}); -//=> 'FooBar' -``` - - -## API - -### camelCase(input, [options]) - -#### input - -Type: `string` `string[]` - -String to convert to camel case. - -#### options - -Type: `Object` - -##### pascalCase - -Type: `boolean`
-Default: `false` - -Uppercase the first character: `foo-bar` → `FooBar` - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## Related - -- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module -- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase -- [titleize](https://github.com/sindresorhus/titleize) - Capitalize every word in string -- [humanize-string](https://github.com/sindresorhus/humanize-string) - Convert a camelized/dasherized/underscored string into a humanized one - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/capture-exit/README.md b/node_modules/capture-exit/README.md deleted file mode 100644 index 23b663c2..00000000 --- a/node_modules/capture-exit/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# capture-exit - -[![Build status](https://ci.appveyor.com/api/projects/status/8044m918rwic8b9n/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/capture-exit/branch/master) -[![Build Status](https://travis-ci.org/ember-cli/capture-exit.svg?branch=master)](https://travis-ci.org/ember-cli/capture-exit) - -Allow cooprative async exit handlers, we unfortunately must hijack -process.exit. - -It allows a handler to ensure exit, without that exit handler impeding other -similar handlers - -for example, see: [sindresorhus/ora#27](https://github.com/sindresorhus/ora/issues/27) - -Differences between `process.on('exit')` and `captureExit.onExit(...)` => https://github.com/ember-cli/capture-exit/issues/12 - - -### Installation - -```sh -yarn add capture-exit -// or -npm install --save capture-exit -``` - -### Usage - -```js -// as early in startup as possible -require('capture-exit').captureExit(); - -// when you want to schedule some work on exit: -function onExit() { - return something.processWillExit(); // you can return promises, which will pause exit until fulfilled -} - -require('capture-exit').onExit(onExit); // add an exit handler -require('capture-exit').offExit(onExit); // allows one to remove an exit handle if it is not longer required -``` diff --git a/node_modules/capture-exit/index.js b/node_modules/capture-exit/index.js deleted file mode 100644 index 9066c2d3..00000000 --- a/node_modules/capture-exit/index.js +++ /dev/null @@ -1,153 +0,0 @@ -var RSVP = require('rsvp'); - -var exit; -var handlers = []; -var lastTime; -var isExiting = false; - -process.on('beforeExit', function (code) { - if (handlers.length === 0) { return; } - - var own = lastTime = module.exports._flush(lastTime, code) - .finally(function () { - // if an onExit handler has called process.exit, do not disturb - // `lastTime`. - // - // Otherwise, clear `lastTime` so that we know to synchronously call the - // real `process.exit` with the given exit code, when our captured - // `process.exit` is called during a `process.on('exit')` handler - // - // This is impossible to reason about, don't feel bad. Just look at - // test-natural-exit-subprocess-error.js - if (own === lastTime) { - lastTime = undefined; - } - }); -}); - -// This exists only for testing -module.exports._reset = function () { - module.exports.releaseExit(); - handlers = []; - lastTime = undefined; - isExiting = false; - firstExitCode = undefined; -} - -/* - * To allow cooperative async exit handlers, we unfortunately must hijack - * process.exit. - * - * It allows a handler to ensure exit, without that exit handler impeding other - * similar handlers - * - * for example, see: https://github.com/sindresorhus/ora/issues/27 - * - */ -module.exports.releaseExit = function() { - if (exit) { - process.exit = exit; - exit = null; - } -}; - -var firstExitCode; - -module.exports.captureExit = function() { - if (exit) { - // already captured, no need to do more work - return; - } - exit = process.exit; - - process.exit = function(code) { - if (handlers.length === 0 && lastTime === undefined) { - // synchronously exit. - // - // We do this brecause either - // - // 1. The process exited due to a call to `process.exit` but we have no - // async work to do because no handlers had been attached. It - // doesn't really matter whether we take this branch or not in this - // case. - // - // 2. The process exited naturally. We did our async work during - // `beforeExit` and are in this function because someone else has - // called `process.exit` during an `on('exit')` hook. The only way - // for us to preserve the exit code in this case is to exit - // synchronously. - // - return exit.call(process, code); - } - - if (firstExitCode === undefined) { - firstExitCode = code; - } - var own = lastTime = module.exports._flush(lastTime, firstExitCode) - .then(function() { - // if another chain has started, let it exit - if (own !== lastTime) { return; } - exit.call(process, firstExitCode); - }) - .catch(function(error) { - // if another chain has started, let it exit - if (own !== lastTime) { - throw error; - } - console.error(error); - exit.call(process, 1); - }); - }; -}; - -module.exports._handlers = handlers; -module.exports._flush = function(lastTime, code) { - isExiting = true; - var work = handlers.splice(0, handlers.length); - - return RSVP.Promise.resolve(lastTime). - then(function() { - var firstRejected; - return RSVP.allSettled(work.map(function(handler) { - return RSVP.resolve(handler.call(null, code)).catch(function(e) { - if (!firstRejected) { - firstRejected = e; - } - throw e; - }); - })).then(function(results) { - if (firstRejected) { - throw firstRejected; - } - }); - }); -}; - -module.exports.onExit = function(cb) { - if (!exit) { - throw new Error('Cannot install handler when exit is not captured. Call `captureExit()` first'); - } - if (isExiting) { - throw new Error('Cannot install handler while `onExit` handlers are running.'); - } - var index = handlers.indexOf(cb); - - if (index > -1) { return; } - handlers.push(cb); -}; - -module.exports.offExit = function(cb) { - var index = handlers.indexOf(cb); - - if (index < 0) { return; } - - handlers.splice(index, 1); -}; - -module.exports.exit = function() { - exit.apply(process, arguments); -}; - -module.exports.listenerCount = function() { - return handlers.length; -}; diff --git a/node_modules/capture-exit/package.json b/node_modules/capture-exit/package.json deleted file mode 100644 index ff419985..00000000 --- a/node_modules/capture-exit/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_args": [ - [ - "capture-exit@2.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "capture-exit@2.0.0", - "_id": "capture-exit@2.0.0", - "_inBundle": false, - "_integrity": "sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==", - "_location": "/capture-exit", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "capture-exit@2.0.0", - "name": "capture-exit", - "escapedName": "capture-exit", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/sane" - ], - "_resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Stefan Penner", - "email": "stefan.penner@gmail.com" - }, - "bugs": { - "url": "https://github.com/stefanpenner/capture-exit/issues" - }, - "dependencies": { - "rsvp": "^4.8.4" - }, - "description": "safely cleanup in signal handlers", - "devDependencies": { - "chai": "^4.2.0", - "execa": "1.0.0", - "mocha": "^5.2.0", - "ora": "^3.0.0" - }, - "engines": { - "node": "6.* || 8.* || >= 10.*" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/stefanpenner/capture-exit#readme", - "license": "ISC", - "main": "index.js", - "name": "capture-exit", - "repository": { - "type": "git", - "url": "git+https://github.com/stefanpenner/capture-exit.git" - }, - "scripts": { - "test": "mocha test", - "test:debug": "mocha debug test" - }, - "version": "2.0.0" -} diff --git a/node_modules/caseless/LICENSE b/node_modules/caseless/LICENSE deleted file mode 100644 index 61789f4a..00000000 --- a/node_modules/caseless/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -1. Definitions. -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -You must give any other recipients of the Work or Derivative Works a copy of this License; and -You must cause any modified files to carry prominent notices stating that You changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/caseless/README.md b/node_modules/caseless/README.md deleted file mode 100644 index e5077a21..00000000 --- a/node_modules/caseless/README.md +++ /dev/null @@ -1,45 +0,0 @@ -## Caseless -- wrap an object to set and get property with caseless semantics but also preserve caseing. - -This library is incredibly useful when working with HTTP headers. It allows you to get/set/check for headers in a caseless manner while also preserving the caseing of headers the first time they are set. - -## Usage - -```javascript -var headers = {} - , c = caseless(headers) - ; -c.set('a-Header', 'asdf') -c.get('a-header') === 'asdf' -``` - -## has(key) - -Has takes a name and if it finds a matching header will return that header name with the preserved caseing it was set with. - -```javascript -c.has('a-header') === 'a-Header' -``` - -## set(key, value[, clobber=true]) - -Set is fairly straight forward except that if the header exists and clobber is disabled it will add `','+value` to the existing header. - -```javascript -c.set('a-Header', 'fdas') -c.set('a-HEADER', 'more', false) -c.get('a-header') === 'fdsa,more' -``` - -## swap(key) - -Swaps the casing of a header with the new one that is passed in. - -```javascript -var headers = {} - , c = caseless(headers) - ; -c.set('a-Header', 'fdas') -c.swap('a-HEADER') -c.has('a-header') === 'a-HEADER' -headers === {'a-HEADER': 'fdas'} -``` diff --git a/node_modules/caseless/index.js b/node_modules/caseless/index.js deleted file mode 100644 index b194734e..00000000 --- a/node_modules/caseless/index.js +++ /dev/null @@ -1,67 +0,0 @@ -function Caseless (dict) { - this.dict = dict || {} -} -Caseless.prototype.set = function (name, value, clobber) { - if (typeof name === 'object') { - for (var i in name) { - this.set(i, name[i], value) - } - } else { - if (typeof clobber === 'undefined') clobber = true - var has = this.has(name) - - if (!clobber && has) this.dict[has] = this.dict[has] + ',' + value - else this.dict[has || name] = value - return has - } -} -Caseless.prototype.has = function (name) { - var keys = Object.keys(this.dict) - , name = name.toLowerCase() - ; - for (var i=0;i 0; -} - -function Chalk(options) { - // We check for this.template here since calling `chalk.constructor()` - // by itself will have a `this` of a previously constructed chalk object - if (!this || !(this instanceof Chalk) || this.template) { - const chalk = {}; - applyOptions(chalk, options); - - chalk.template = function () { - const args = [].slice.call(arguments); - return chalkTag.apply(null, [chalk.template].concat(args)); - }; - - Object.setPrototypeOf(chalk, Chalk.prototype); - Object.setPrototypeOf(chalk.template, chalk); - - chalk.template.constructor = Chalk; - - return chalk.template; - } - - applyOptions(this, options); -} - -// Use bright blue on Windows as the normal blue color is illegible -if (isSimpleWindowsTerm) { - ansiStyles.blue.open = '\u001B[94m'; -} - -for (const key of Object.keys(ansiStyles)) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - - styles[key] = { - get() { - const codes = ansiStyles[key]; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); - } - }; -} - -styles.visible = { - get() { - return build.call(this, this._styles || [], true, 'visible'); - } -}; - -ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); -for (const model of Object.keys(ansiStyles.color.ansi)) { - if (skipModels.has(model)) { - continue; - } - - styles[model] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.color.close, - closeRe: ansiStyles.color.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} - -ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); -for (const model of Object.keys(ansiStyles.bgColor.ansi)) { - if (skipModels.has(model)) { - continue; - } - - const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.bgColor.close, - closeRe: ansiStyles.bgColor.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; -} - -const proto = Object.defineProperties(() => {}, styles); - -function build(_styles, _empty, key) { - const builder = function () { - return applyStyle.apply(builder, arguments); - }; - - builder._styles = _styles; - builder._empty = _empty; - - const self = this; - - Object.defineProperty(builder, 'level', { - enumerable: true, - get() { - return self.level; - }, - set(level) { - self.level = level; - } - }); - - Object.defineProperty(builder, 'enabled', { - enumerable: true, - get() { - return self.enabled; - }, - set(enabled) { - self.enabled = enabled; - } - }); - - // See below for fix regarding invisible grey/dim combination on Windows - builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; - - // `__proto__` is used because we must return a function, but there is - // no way to create a function with a different prototype - builder.__proto__ = proto; // eslint-disable-line no-proto - - return builder; -} - -function applyStyle() { - // Support varags, but simply cast to string in case there's only one arg - const args = arguments; - const argsLen = args.length; - let str = String(arguments[0]); - - if (argsLen === 0) { - return ''; - } - - if (argsLen > 1) { - // Don't slice `arguments`, it prevents V8 optimizations - for (let a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } - - if (!this.enabled || this.level <= 0 || !str) { - return this._empty ? '' : str; - } - - // 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. - const originalDim = ansiStyles.dim.open; - if (isSimpleWindowsTerm && this.hasGrey) { - ansiStyles.dim.open = ''; - } - - for (const code of this._styles.slice().reverse()) { - // 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; - - // Close the styling before a linebreak and reopen - // after next line to fix a bleed issue on macOS - // https://github.com/chalk/chalk/pull/92 - str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); - } - - // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue - ansiStyles.dim.open = originalDim; - - return str; -} - -function chalkTag(chalk, strings) { - if (!Array.isArray(strings)) { - // If chalk() was called by itself or with a string, - // return the string itself as a string. - return [].slice.call(arguments, 1).join(' '); - } - - const args = [].slice.call(arguments, 2); - const parts = [strings.raw[0]]; - - for (let i = 1; i < strings.length; i++) { - parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); - parts.push(String(strings.raw[i])); - } - - return template(chalk, parts.join('')); -} - -Object.defineProperties(Chalk.prototype, styles); - -module.exports = Chalk(); // eslint-disable-line new-cap -module.exports.supportsColor = stdoutColor; -module.exports.default = module.exports; // For TypeScript diff --git a/node_modules/chalk/index.js.flow b/node_modules/chalk/index.js.flow deleted file mode 100644 index 622caaa2..00000000 --- a/node_modules/chalk/index.js.flow +++ /dev/null @@ -1,93 +0,0 @@ -// @flow strict - -type TemplateStringsArray = $ReadOnlyArray; - -export type Level = $Values<{ - None: 0, - Basic: 1, - Ansi256: 2, - TrueColor: 3 -}>; - -export type ChalkOptions = {| - enabled?: boolean, - level?: Level -|}; - -export type ColorSupport = {| - level: Level, - hasBasic: boolean, - has256: boolean, - has16m: boolean -|}; - -export interface Chalk { - (...text: string[]): string, - (text: TemplateStringsArray, ...placeholders: string[]): string, - constructor(options?: ChalkOptions): Chalk, - enabled: boolean, - level: Level, - rgb(r: number, g: number, b: number): Chalk, - hsl(h: number, s: number, l: number): Chalk, - hsv(h: number, s: number, v: number): Chalk, - hwb(h: number, w: number, b: number): Chalk, - bgHex(color: string): Chalk, - bgKeyword(color: string): Chalk, - bgRgb(r: number, g: number, b: number): Chalk, - bgHsl(h: number, s: number, l: number): Chalk, - bgHsv(h: number, s: number, v: number): Chalk, - bgHwb(h: number, w: number, b: number): Chalk, - hex(color: string): Chalk, - keyword(color: string): Chalk, - - +reset: Chalk, - +bold: Chalk, - +dim: Chalk, - +italic: Chalk, - +underline: Chalk, - +inverse: Chalk, - +hidden: Chalk, - +strikethrough: Chalk, - - +visible: Chalk, - - +black: Chalk, - +red: Chalk, - +green: Chalk, - +yellow: Chalk, - +blue: Chalk, - +magenta: Chalk, - +cyan: Chalk, - +white: Chalk, - +gray: Chalk, - +grey: Chalk, - +blackBright: Chalk, - +redBright: Chalk, - +greenBright: Chalk, - +yellowBright: Chalk, - +blueBright: Chalk, - +magentaBright: Chalk, - +cyanBright: Chalk, - +whiteBright: Chalk, - - +bgBlack: Chalk, - +bgRed: Chalk, - +bgGreen: Chalk, - +bgYellow: Chalk, - +bgBlue: Chalk, - +bgMagenta: Chalk, - +bgCyan: Chalk, - +bgWhite: Chalk, - +bgBlackBright: Chalk, - +bgRedBright: Chalk, - +bgGreenBright: Chalk, - +bgYellowBright: Chalk, - +bgBlueBright: Chalk, - +bgMagentaBright: Chalk, - +bgCyanBright: Chalk, - +bgWhiteBrigh: Chalk, - - supportsColor: ColorSupport -}; - -declare module.exports: Chalk; diff --git a/node_modules/chalk/license b/node_modules/chalk/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/chalk/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/chalk/package.json b/node_modules/chalk/package.json deleted file mode 100644 index 9cd0790e..00000000 --- a/node_modules/chalk/package.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "_args": [ - [ - "chalk@2.4.2", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "chalk@2.4.2", - "_id": "chalk@2.4.2", - "_inBundle": false, - "_integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "_location": "/chalk", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "chalk@2.4.2", - "name": "chalk", - "escapedName": "chalk", - "rawSpec": "2.4.2", - "saveSpec": null, - "fetchSpec": "2.4.2" - }, - "_requiredBy": [ - "/@babel/highlight", - "/@jest/console", - "/@jest/core", - "/@jest/reporters", - "/@jest/transform", - "/babel-jest", - "/jest-circus", - "/jest-config", - "/jest-diff", - "/jest-each", - "/jest-jasmine2", - "/jest-matcher-utils", - "/jest-message-util", - "/jest-resolve", - "/jest-runner", - "/jest-runtime", - "/jest-snapshot", - "/jest-util", - "/jest-validate", - "/jest-watcher", - "/jest/jest-cli" - ], - "_resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "_spec": "2.4.2", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/chalk/chalk/issues" - }, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "description": "Terminal string styling done right", - "devDependencies": { - "ava": "*", - "coveralls": "^3.0.0", - "execa": "^0.9.0", - "flow-bin": "^0.68.0", - "import-fresh": "^2.0.0", - "matcha": "^0.7.0", - "nyc": "^11.0.2", - "resolve-from": "^4.0.0", - "typescript": "^2.5.3", - "xo": "*" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "index.js", - "templates.js", - "types/index.d.ts", - "index.js.flow" - ], - "homepage": "https://github.com/chalk/chalk#readme", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "str", - "ansi", - "style", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "chalk", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/chalk.git" - }, - "scripts": { - "bench": "matcha benchmark.js", - "coveralls": "nyc report --reporter=text-lcov | coveralls", - "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava" - }, - "types": "types/index.d.ts", - "version": "2.4.2", - "xo": { - "envs": [ - "node", - "mocha" - ], - "ignores": [ - "test/_flow.js" - ] - } -} diff --git a/node_modules/chalk/readme.md b/node_modules/chalk/readme.md deleted file mode 100644 index d298e2c4..00000000 --- a/node_modules/chalk/readme.md +++ /dev/null @@ -1,314 +0,0 @@ -

-
-
- 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/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) [![Mentioned in Awesome Node.js](https://awesome.re/mentioned-badge.svg)](https://github.com/sindresorhus/awesome-nodejs) - -### [See what's new in Chalk 2](https://github.com/chalk/chalk/releases/tag/v2.0.0) - - - - -## Highlights - -- Expressive API -- Highly performant -- Ability to nest styles -- [256/Truecolor color support](#256-and-truecolor-color-support) -- Auto-detects color support -- Doesn't extend `String.prototype` -- Clean and focused -- Actively maintained -- [Used by ~23,000 packages](https://www.npmjs.com/browse/depended/chalk) as of December 31, 2017 - - -## Install - -```console -$ npm install chalk -``` - - - - - - -## Usage - -```js -const chalk = require('chalk'); - -console.log(chalk.blue('Hello world!')); -``` - -Chalk comes with an easy to use composable API where you just chain and nest the styles you want. - -```js -const chalk = require('chalk'); -const log = console.log; - -// Combine styled and normal strings -log(chalk.blue('Hello') + ' World' + chalk.red('!')); - -// Compose multiple styles using the chainable API -log(chalk.blue.bgRed.bold('Hello world!')); - -// Pass in multiple arguments -log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz')); - -// Nest styles -log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!')); - -// Nest styles of the same type even (color, underline, background) -log(chalk.green( - 'I am a green line ' + - chalk.blue.underline.bold('with a blue substring') + - ' that becomes green again!' -)); - -// ES2015 template literal -log(` -CPU: ${chalk.red('90%')} -RAM: ${chalk.green('40%')} -DISK: ${chalk.yellow('70%')} -`); - -// ES2015 tagged template literal -log(chalk` -CPU: {red ${cpu.totalPercent}%} -RAM: {green ${ram.used / ram.total * 100}%} -DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%} -`); - -// Use RGB colors in terminal emulators that support it. -log(chalk.keyword('orange')('Yay for orange colored text!')); -log(chalk.rgb(123, 45, 67).underline('Underlined reddish color')); -log(chalk.hex('#DEADED').bold('Bold gray!')); -``` - -Easily define your own themes: - -```js -const chalk = require('chalk'); - -const error = chalk.bold.red; -const warning = chalk.keyword('orange'); - -console.log(error('Error!')); -console.log(warning('Warning!')); -``` - -Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args): - -```js -const name = 'Sindre'; -console.log(chalk.green('Hello %s'), name); -//=> 'Hello Sindre' -``` - - -## API - -### chalk.` - - -
-
-

- {{{pathHtml}}} -

-
- {{#with metrics.statements}} -
- {{pct}}% - Statements - {{covered}}/{{total}} -
- {{/with}} - {{#with metrics.branches}} -
- {{pct}}% - Branches - {{covered}}/{{total}} -
- {{/with}} - {{#with metrics.functions}} -
- {{pct}}% - Functions - {{covered}}/{{total}} -
- {{/with}} - {{#with metrics.lines}} -
- {{pct}}% - Lines - {{covered}}/{{total}} -
- {{/with}} - {{#if_has_ignores metrics}} -
- {{#show_ignores metrics}}{{/show_ignores}} - Ignored      -
- {{/if_has_ignores}} -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

-
-
diff --git a/node_modules/istanbul-reports/lib/json-summary/index.js b/node_modules/istanbul-reports/lib/json-summary/index.js deleted file mode 100644 index 54486436..00000000 --- a/node_modules/istanbul-reports/lib/json-summary/index.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright 2012-2015, Yahoo Inc. - Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. - */ -'use strict'; - -function JsonSummaryReport(opts) { - this.file = opts.file || 'coverage-summary.json'; - this.contentWriter = null; - this.first = true; -} - -JsonSummaryReport.prototype.onStart = function(root, context) { - this.contentWriter = context.writer.writeFile(this.file); - this.contentWriter.write('{'); -}; - -JsonSummaryReport.prototype.writeSummary = function(filePath, sc) { - const cw = this.contentWriter; - if (this.first) { - this.first = false; - } else { - cw.write(','); - } - cw.write(JSON.stringify(filePath)); - cw.write(': '); - cw.write(JSON.stringify(sc)); - cw.println(''); -}; - -JsonSummaryReport.prototype.onSummary = function(node) { - if (!node.isRoot()) { - return; - } - this.writeSummary('total', node.getCoverageSummary()); -}; - -JsonSummaryReport.prototype.onDetail = function(node) { - this.writeSummary(node.getFileCoverage().path, node.getCoverageSummary()); -}; - -JsonSummaryReport.prototype.onEnd = function() { - const cw = this.contentWriter; - cw.println('}'); - cw.close(); -}; - -module.exports = JsonSummaryReport; diff --git a/node_modules/istanbul-reports/lib/json/index.js b/node_modules/istanbul-reports/lib/json/index.js deleted file mode 100644 index 23bc8e9f..00000000 --- a/node_modules/istanbul-reports/lib/json/index.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright 2012-2015, Yahoo Inc. - Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. - */ -'use strict'; - -function JsonReport(opts) { - this.file = opts.file || 'coverage-final.json'; - this.first = true; -} - -JsonReport.prototype.onStart = function(root, context) { - this.contentWriter = context.writer.writeFile(this.file); - this.contentWriter.write('{'); -}; - -JsonReport.prototype.onDetail = function(node) { - const fc = node.getFileCoverage(); - const key = fc.path; - const cw = this.contentWriter; - - if (this.first) { - this.first = false; - } else { - cw.write(','); - } - cw.write(JSON.stringify(key)); - cw.write(': '); - cw.write(JSON.stringify(fc)); - cw.println(''); -}; - -JsonReport.prototype.onEnd = function() { - const cw = this.contentWriter; - cw.println('}'); - cw.close(); -}; - -module.exports = JsonReport; diff --git a/node_modules/istanbul-reports/lib/lcov/index.js b/node_modules/istanbul-reports/lib/lcov/index.js deleted file mode 100644 index e5312da4..00000000 --- a/node_modules/istanbul-reports/lib/lcov/index.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright 2012-2015, Yahoo Inc. - Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. - */ -const LcovOnlyReport = require('../lcovonly'); -const HtmlReport = require('../html'); - -function LcovReport() { - this.lcov = new LcovOnlyReport({ file: 'lcov.info' }); - this.html = new HtmlReport({ subdir: 'lcov-report' }); -} - -['Start', 'End', 'Summary', 'SummaryEnd', 'Detail'].forEach(what => { - const meth = 'on' + what; - LcovReport.prototype[meth] = function(...args) { - const lcov = this.lcov; - const html = this.html; - - if (lcov[meth]) { - lcov[meth](...args); - } - if (html[meth]) { - html[meth](...args); - } - }; -}); - -module.exports = LcovReport; diff --git a/node_modules/istanbul-reports/lib/lcovonly/index.js b/node_modules/istanbul-reports/lib/lcovonly/index.js deleted file mode 100644 index 2d0356d5..00000000 --- a/node_modules/istanbul-reports/lib/lcovonly/index.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - Copyright 2012-2015, Yahoo Inc. - Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. - */ -'use strict'; - -function LcovOnlyReport(opts) { - this.file = opts.file || 'lcov.info'; - this.contentWriter = null; -} - -LcovOnlyReport.prototype.onStart = function(root, context) { - this.contentWriter = context.writer.writeFile(this.file); -}; - -LcovOnlyReport.prototype.onDetail = function(node) { - const fc = node.getFileCoverage(); - const writer = this.contentWriter; - const functions = fc.f; - const functionMap = fc.fnMap; - const lines = fc.getLineCoverage(); - const branches = fc.b; - const branchMap = fc.branchMap; - const summary = node.getCoverageSummary(); - - writer.println('TN:'); //no test name - writer.println('SF:' + fc.path); - - Object.keys(functionMap).forEach(key => { - const meta = functionMap[key]; - writer.println('FN:' + [meta.decl.start.line, meta.name].join(',')); - }); - writer.println('FNF:' + summary.functions.total); - writer.println('FNH:' + summary.functions.covered); - - Object.keys(functionMap).forEach(key => { - const stats = functions[key]; - const meta = functionMap[key]; - writer.println('FNDA:' + [stats, meta.name].join(',')); - }); - - Object.keys(lines).forEach(key => { - const stat = lines[key]; - writer.println('DA:' + [key, stat].join(',')); - }); - writer.println('LF:' + summary.lines.total); - writer.println('LH:' + summary.lines.covered); - - Object.keys(branches).forEach(key => { - const branchArray = branches[key]; - const meta = branchMap[key]; - const line = meta.loc.start.line; - let i = 0; - branchArray.forEach(b => { - writer.println('BRDA:' + [line, key, i, b].join(',')); - i += 1; - }); - }); - writer.println('BRF:' + summary.branches.total); - writer.println('BRH:' + summary.branches.covered); - writer.println('end_of_record'); -}; - -LcovOnlyReport.prototype.onEnd = function() { - this.contentWriter.close(); -}; - -module.exports = LcovOnlyReport; diff --git a/node_modules/istanbul-reports/lib/none/index.js b/node_modules/istanbul-reports/lib/none/index.js deleted file mode 100644 index 2da3af61..00000000 --- a/node_modules/istanbul-reports/lib/none/index.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - Copyright 2012-2015, Yahoo Inc. - Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. - */ -function NoneReport() {} - -module.exports = NoneReport; diff --git a/node_modules/istanbul-reports/lib/teamcity/index.js b/node_modules/istanbul-reports/lib/teamcity/index.js deleted file mode 100644 index 02adacd1..00000000 --- a/node_modules/istanbul-reports/lib/teamcity/index.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - Copyright 2012-2015, Yahoo Inc. - Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. - */ -'use strict'; - -function TeamcityReport(opts) { - opts = opts || {}; - this.file = opts.file || null; - this.blockName = opts.blockName || 'Code Coverage Summary'; -} - -function lineForKey(value, teamcityVar) { - return ( - "##teamcity[buildStatisticValue key='" + - teamcityVar + - "' value='" + - value + - "']" - ); -} - -TeamcityReport.prototype.onStart = function(node, context) { - const metrics = node.getCoverageSummary(); - const cw = context.writer.writeFile(this.file); - - cw.println(''); - cw.println("##teamcity[blockOpened name='" + this.blockName + "']"); - - //Statements Covered - cw.println( - lineForKey(metrics.statements.covered, 'CodeCoverageAbsBCovered') - ); - cw.println(lineForKey(metrics.statements.total, 'CodeCoverageAbsBTotal')); - - //Branches Covered - cw.println(lineForKey(metrics.branches.covered, 'CodeCoverageAbsRCovered')); - cw.println(lineForKey(metrics.branches.total, 'CodeCoverageAbsRTotal')); - - //Functions Covered - cw.println( - lineForKey(metrics.functions.covered, 'CodeCoverageAbsMCovered') - ); - cw.println(lineForKey(metrics.functions.total, 'CodeCoverageAbsMTotal')); - - //Lines Covered - cw.println(lineForKey(metrics.lines.covered, 'CodeCoverageAbsLCovered')); - cw.println(lineForKey(metrics.lines.total, 'CodeCoverageAbsLTotal')); - - cw.println("##teamcity[blockClosed name='" + this.blockName + "']"); - cw.close(); -}; - -module.exports = TeamcityReport; diff --git a/node_modules/istanbul-reports/lib/text-lcov/index.js b/node_modules/istanbul-reports/lib/text-lcov/index.js deleted file mode 100644 index a27e0e91..00000000 --- a/node_modules/istanbul-reports/lib/text-lcov/index.js +++ /dev/null @@ -1,14 +0,0 @@ -/* - Copyright 2012-2015, Yahoo Inc. - Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. - */ -const util = require('util'); -const LcovOnly = require('../lcovonly'); - -function TextLcov(opts) { - opts.file = '-'; - LcovOnly.call(this, opts); -} - -util.inherits(TextLcov, LcovOnly); -module.exports = TextLcov; diff --git a/node_modules/istanbul-reports/lib/text-summary/index.js b/node_modules/istanbul-reports/lib/text-summary/index.js deleted file mode 100644 index 8a7f1c33..00000000 --- a/node_modules/istanbul-reports/lib/text-summary/index.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright 2012-2015, Yahoo Inc. - Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. - */ -'use strict'; - -function TextSummaryReport(opts) { - opts = opts || {}; - this.file = opts.file || null; -} - -function lineForKey(summary, key) { - const metrics = summary[key]; - - key = key.substring(0, 1).toUpperCase() + key.substring(1); - if (key.length < 12) { - key += ' '.substring(0, 12 - key.length); - } - const result = [ - key, - ':', - metrics.pct + '%', - '(', - metrics.covered + '/' + metrics.total, - ')' - ].join(' '); - const skipped = metrics.skipped; - if (skipped > 0) { - return result + ', ' + skipped + ' ignored'; - } - return result; -} - -TextSummaryReport.prototype.onStart = function(node, context) { - const summary = node.getCoverageSummary(); - const cw = context.writer.writeFile(this.file); - const printLine = function(key) { - const str = lineForKey(summary, key); - const clazz = context.classForPercent(key, summary[key].pct); - cw.println(cw.colorize(str, clazz)); - }; - - cw.println(''); - cw.println( - '=============================== Coverage summary ===============================' - ); - printLine('statements'); - printLine('branches'); - printLine('functions'); - printLine('lines'); - cw.println( - '================================================================================' - ); - cw.close(); -}; - -module.exports = TextSummaryReport; diff --git a/node_modules/istanbul-reports/lib/text/index.js b/node_modules/istanbul-reports/lib/text/index.js deleted file mode 100644 index 538242a2..00000000 --- a/node_modules/istanbul-reports/lib/text/index.js +++ /dev/null @@ -1,239 +0,0 @@ -/* - Copyright 2012-2015, Yahoo Inc. - Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. - */ -'use strict'; - -const PCT_COLS = 9; -const MISSING_COL = 18; -const TAB_SIZE = 1; -const DELIM = ' |'; -const COL_DELIM = '-|'; - -function padding(num, ch) { - let str = ''; - let i; - ch = ch || ' '; - for (i = 0; i < num; i += 1) { - str += ch; - } - return str; -} - -function fill(str, width, right, tabs) { - tabs = tabs || 0; - str = String(str); - - const leadingSpaces = tabs * TAB_SIZE; - const remaining = width - leadingSpaces; - const leader = padding(leadingSpaces); - let fmtStr = ''; - let fillStr; - const strlen = str.length; - - if (remaining > 0) { - if (remaining >= strlen) { - fillStr = padding(remaining - strlen); - fmtStr = right ? fillStr + str : str + fillStr; - } else { - fmtStr = str.substring(strlen - remaining); - fmtStr = '... ' + fmtStr.substring(4); - } - } - - return leader + fmtStr; -} - -function formatName(name, maxCols, level) { - return fill(name, maxCols, false, level); -} - -function formatPct(pct, width) { - return fill(pct, width || PCT_COLS, true, 0); -} - -function nodeName(node) { - return node.getRelativeName() || 'All files'; -} - -function depthFor(node) { - let ret = 0; - node = node.getParent(); - while (node) { - ret += 1; - node = node.getParent(); - } - return ret; -} - -function findNameWidth(node, context) { - let last = 0; - const compareWidth = function(node) { - const depth = depthFor(node); - const idealWidth = TAB_SIZE * depth + nodeName(node).length; - if (idealWidth > last) { - last = idealWidth; - } - }; - const visitor = { - onSummary(node) { - compareWidth(node); - }, - onDetail(node) { - compareWidth(node); - } - }; - node.visit(context.getVisitor(visitor)); - return last; -} - -function makeLine(nameWidth) { - const name = padding(nameWidth, '-'); - const pct = padding(PCT_COLS, '-'); - const elements = []; - - elements.push(name); - elements.push(pct); - elements.push(pct); - elements.push(pct); - elements.push(pct); - elements.push(padding(MISSING_COL, '-')); - return elements.join(COL_DELIM) + COL_DELIM; -} - -function tableHeader(maxNameCols) { - const elements = []; - elements.push(formatName('File', maxNameCols, 0)); - elements.push(formatPct('% Stmts')); - elements.push(formatPct('% Branch')); - elements.push(formatPct('% Funcs')); - elements.push(formatPct('% Lines')); - elements.push(formatPct('Uncovered Line #s', MISSING_COL)); - return elements.join(' |') + ' |'; -} - -function missingLines(node, colorizer) { - const missingLines = node.isSummary() - ? [] - : node.getFileCoverage().getUncoveredLines(); - return colorizer(formatPct(missingLines.join(','), MISSING_COL), 'low'); -} - -function missingBranches(node, colorizer) { - const branches = node.isSummary() - ? {} - : node.getFileCoverage().getBranchCoverageByLine(); - const missingLines = Object.keys(branches) - .filter(key => branches[key].coverage < 100) - .map(key => key); - return colorizer(formatPct(missingLines.join(','), MISSING_COL), 'medium'); -} - -function isFull(metrics) { - return ( - metrics.statements.pct === 100 && - metrics.branches.pct === 100 && - metrics.functions.pct === 100 && - metrics.lines.pct === 100 - ); -} - -function tableRow( - node, - context, - colorizer, - maxNameCols, - level, - skipEmpty, - skipFull -) { - const name = nodeName(node); - const metrics = node.getCoverageSummary(); - const isEmpty = metrics.isEmpty(); - if (skipEmpty && isEmpty) { - return ''; - } - if (skipFull && isFull(metrics)) { - return ''; - } - - const mm = { - statements: isEmpty ? 0 : metrics.statements.pct, - branches: isEmpty ? 0 : metrics.branches.pct, - functions: isEmpty ? 0 : metrics.functions.pct, - lines: isEmpty ? 0 : metrics.lines.pct - }; - const colorize = isEmpty - ? function(str) { - return str; - } - : function(str, key) { - return colorizer(str, context.classForPercent(key, mm[key])); - }; - const elements = []; - - elements.push(colorize(formatName(name, maxNameCols, level), 'statements')); - elements.push(colorize(formatPct(mm.statements), 'statements')); - elements.push(colorize(formatPct(mm.branches), 'branches')); - elements.push(colorize(formatPct(mm.functions), 'functions')); - elements.push(colorize(formatPct(mm.lines), 'lines')); - if (mm.lines === 100) { - elements.push(missingBranches(node, colorizer)); - } else { - elements.push(missingLines(node, colorizer)); - } - return elements.join(DELIM) + DELIM; -} - -function TextReport(opts) { - opts = opts || {}; - this.file = opts.file || null; - this.maxCols = opts.maxCols || 0; - this.cw = null; - this.skipEmpty = opts.skipEmpty; - this.skipFull = opts.skipFull; -} - -TextReport.prototype.onStart = function(root, context) { - const statsWidth = 4 * (PCT_COLS + 2) + MISSING_COL; - - this.cw = context.writer.writeFile(this.file); - this.nameWidth = findNameWidth(root, context); - if (this.maxCols > 0) { - const maxRemaining = this.maxCols - statsWidth - 2; - if (this.nameWidth > maxRemaining) { - this.nameWidth = maxRemaining; - } - } - const line = makeLine(this.nameWidth); - this.cw.println(line); - this.cw.println(tableHeader(this.nameWidth)); - this.cw.println(line); -}; - -TextReport.prototype.onSummary = function(node, context) { - const nodeDepth = depthFor(node); - const row = tableRow( - node, - context, - this.cw.colorize.bind(this.cw), - this.nameWidth, - nodeDepth, - this.skipEmpty, - this.skipFull - ); - if (row) { - this.cw.println(row); - } -}; - -TextReport.prototype.onDetail = function(node, context) { - return this.onSummary(node, context); -}; - -TextReport.prototype.onEnd = function() { - this.cw.println(makeLine(this.nameWidth)); - this.cw.close(); -}; - -module.exports = TextReport; diff --git a/node_modules/istanbul-reports/package.json b/node_modules/istanbul-reports/package.json deleted file mode 100644 index 379ae753..00000000 --- a/node_modules/istanbul-reports/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "istanbul-reports@2.2.6", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "istanbul-reports@2.2.6", - "_id": "istanbul-reports@2.2.6", - "_inBundle": false, - "_integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", - "_location": "/istanbul-reports", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "istanbul-reports@2.2.6", - "name": "istanbul-reports", - "escapedName": "istanbul-reports", - "rawSpec": "2.2.6", - "saveSpec": null, - "fetchSpec": "2.2.6" - }, - "_requiredBy": [ - "/@jest/reporters" - ], - "_resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", - "_spec": "2.2.6", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Krishnan Anantheswaran", - "email": "kananthmail-github@yahoo.com" - }, - "bugs": { - "url": "https://github.com/istanbuljs/istanbuljs/issues" - }, - "dependencies": { - "handlebars": "^4.1.2" - }, - "description": "istanbul reports", - "devDependencies": { - "istanbul-lib-coverage": "^2.0.5", - "istanbul-lib-report": "^2.0.8" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "lib" - ], - "gitHead": "90e60cc47833bb780680f916488ca24f0be36ca2", - "homepage": "https://istanbul.js.org/", - "keywords": [ - "istanbul", - "reports" - ], - "license": "BSD-3-Clause", - "main": "index.js", - "name": "istanbul-reports", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/istanbuljs/istanbuljs.git" - }, - "scripts": { - "test": "mocha --recursive" - }, - "version": "2.2.6" -} diff --git a/node_modules/jest-changed-files/LICENSE b/node_modules/jest-changed-files/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-changed-files/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-changed-files/README.md b/node_modules/jest-changed-files/README.md deleted file mode 100644 index 795ebe73..00000000 --- a/node_modules/jest-changed-files/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# jest-changed-files - -A module used internally by Jest to check which files have changed since you last committed in git or hg. - -## Install - -```sh -$ npm install --save jest-changed-files -``` - -## API - -### `getChangedFilesForRoots(roots: >, options: ?object): Promise` - -Get the list of files and repos that have changed since the last commit. - -#### Parameters - -roots: Array of string paths gathered from [jest roots](https://jestjs.io/docs/configuration.html#roots-array-string). - -options: Object literal with keys - -- lastCommit: boolean -- withAncestor: boolean - -### findRepos(roots: >): Promise - -Get a set of git and hg repositories. - -#### Parameters - -roots: Array of string paths gathered from [jest roots](https://jestjs.io/docs/configuration.html#roots-array-string). - -## Usage - -```javascript -import {getChangedFilesForRoots} from 'jest-changed-files'; - -getChangedFilesForRoots(['/path/to/test'], { - lastCommit: true, - withAncestor: true, -}).then(files => { - /* - { - repos: [], - changedFiles: [] - } - */ -}); -``` - -```javascript -import {findRepos} from 'jest-changed-files'; - -findRepos(['/path/to/test']).then(repos => { - /* - { - git: Set, - hg: Set - } - */ -}); -``` diff --git a/node_modules/jest-changed-files/build/git.d.ts b/node_modules/jest-changed-files/build/git.d.ts deleted file mode 100644 index e1663343..00000000 --- a/node_modules/jest-changed-files/build/git.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { SCMAdapter } from './types'; -declare const adapter: SCMAdapter; -export default adapter; -//# sourceMappingURL=git.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-changed-files/build/git.d.ts.map b/node_modules/jest-changed-files/build/git.d.ts.map deleted file mode 100644 index 8e04a798..00000000 --- a/node_modules/jest-changed-files/build/git.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../src/git.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;AAcnC,QAAA,MAAM,OAAO,EAAE,UA4Dd,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-changed-files/build/git.js b/node_modules/jest-changed-files/build/git.js deleted file mode 100644 index 0eb50cdd..00000000 --- a/node_modules/jest-changed-files/build/git.js +++ /dev/null @@ -1,159 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _execa() { - const data = _interopRequireDefault(require('execa')); - - _execa = function _execa() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -const findChangedFilesUsingCommand = - /*#__PURE__*/ - (function() { - var _ref = _asyncToGenerator(function*(args, cwd) { - const result = yield (0, _execa().default)('git', args, { - cwd - }); - return result.stdout - .split('\n') - .filter(s => s !== '') - .map(changedPath => _path().default.resolve(cwd, changedPath)); - }); - - return function findChangedFilesUsingCommand(_x, _x2) { - return _ref.apply(this, arguments); - }; - })(); - -const adapter = { - findChangedFiles: (function() { - var _findChangedFiles = _asyncToGenerator(function*(cwd, options) { - const changedSince = - options && (options.withAncestor ? 'HEAD^' : options.changedSince); - const includePaths = ((options && options.includePaths) || []).map( - absoluteRoot => - _path().default.normalize(_path().default.relative(cwd, absoluteRoot)) - ); - - if (options && options.lastCommit) { - return findChangedFilesUsingCommand( - ['show', '--name-only', '--pretty=format:', 'HEAD'].concat( - includePaths - ), - cwd - ); - } else if (changedSince) { - const committed = yield findChangedFilesUsingCommand( - [ - 'log', - '--name-only', - '--pretty=format:', - 'HEAD', - `^${changedSince}` - ].concat(includePaths), - cwd - ); - const staged = yield findChangedFilesUsingCommand( - ['diff', '--cached', '--name-only'].concat(includePaths), - cwd - ); - const unstaged = yield findChangedFilesUsingCommand( - ['ls-files', '--other', '--modified', '--exclude-standard'].concat( - includePaths - ), - cwd - ); - return [...committed, ...staged, ...unstaged]; - } else { - return findChangedFilesUsingCommand( - ['ls-files', '--other', '--modified', '--exclude-standard'].concat( - includePaths - ), - cwd - ); - } - }); - - function findChangedFiles(_x3, _x4) { - return _findChangedFiles.apply(this, arguments); - } - - return findChangedFiles; - })(), - getRoot: (function() { - var _getRoot = _asyncToGenerator(function*(cwd) { - const options = ['rev-parse', '--show-cdup']; - - try { - const result = yield (0, _execa().default)('git', options, { - cwd - }); - return _path().default.resolve(cwd, result.stdout); - } catch (e) { - return null; - } - }); - - function getRoot(_x5) { - return _getRoot.apply(this, arguments); - } - - return getRoot; - })() -}; -var _default = adapter; -exports.default = _default; diff --git a/node_modules/jest-changed-files/build/hg.d.ts b/node_modules/jest-changed-files/build/hg.d.ts deleted file mode 100644 index c62e37d4..00000000 --- a/node_modules/jest-changed-files/build/hg.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { SCMAdapter } from './types'; -declare const adapter: SCMAdapter; -export default adapter; -//# sourceMappingURL=hg.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-changed-files/build/hg.d.ts.map b/node_modules/jest-changed-files/build/hg.d.ts.map deleted file mode 100644 index 73565f14..00000000 --- a/node_modules/jest-changed-files/build/hg.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"hg.d.ts","sourceRoot":"","sources":["../src/hg.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;AAInC,QAAA,MAAM,OAAO,EAAE,UAgCd,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-changed-files/build/hg.js b/node_modules/jest-changed-files/build/hg.js deleted file mode 100644 index 62a51f16..00000000 --- a/node_modules/jest-changed-files/build/hg.js +++ /dev/null @@ -1,152 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _execa() { - const data = _interopRequireDefault(require('execa')); - - _execa = function _execa() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const env = _objectSpread({}, process.env, { - HGPLAIN: '1' -}); - -const adapter = { - findChangedFiles: (function() { - var _findChangedFiles = _asyncToGenerator(function*(cwd, options) { - const includePaths = (options && options.includePaths) || []; - const args = ['status', '-amnu']; - - if (options && options.withAncestor) { - args.push('--rev', `min((!public() & ::.)+.)^`); - } else if (options && options.changedSince) { - args.push('--rev', `ancestor(., ${options.changedSince})`); - } else if (options && options.lastCommit === true) { - args.push('--change', '.'); - } - - args.push(...includePaths); - const result = yield (0, _execa().default)('hg', args, { - cwd, - env - }); - return result.stdout - .split('\n') - .filter(s => s !== '') - .map(changedPath => _path().default.resolve(cwd, changedPath)); - }); - - function findChangedFiles(_x, _x2) { - return _findChangedFiles.apply(this, arguments); - } - - return findChangedFiles; - })(), - getRoot: (function() { - var _getRoot = _asyncToGenerator(function*(cwd) { - try { - const result = yield (0, _execa().default)('hg', ['root'], { - cwd, - env - }); - return result.stdout; - } catch (e) { - return null; - } - }); - - function getRoot(_x3) { - return _getRoot.apply(this, arguments); - } - - return getRoot; - })() -}; -var _default = adapter; -exports.default = _default; diff --git a/node_modules/jest-changed-files/build/index.d.ts b/node_modules/jest-changed-files/build/index.d.ts deleted file mode 100644 index 802cb5a2..00000000 --- a/node_modules/jest-changed-files/build/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { Options, Repos } from './types'; -export { ChangedFiles, ChangedFilesPromise } from './types'; -export declare const getChangedFilesForRoots: (roots: string[], options: Options) => Promise; -export declare const findRepos: (roots: string[]) => Promise; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-changed-files/build/index.d.ts.map b/node_modules/jest-changed-files/build/index.d.ts.map deleted file mode 100644 index 9062904f..00000000 --- a/node_modules/jest-changed-files/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAsB,OAAO,EAAE,KAAK,EAAa,MAAM,SAAS,CAAC;AAMxE,OAAO,EAAC,YAAY,EAAE,mBAAmB,EAAC,MAAM,SAAS,CAAC;AAa1D,eAAO,MAAM,uBAAuB,gFA2BnC,CAAC;AAEF,eAAO,MAAM,SAAS,qCAkBrB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-changed-files/build/index.js b/node_modules/jest-changed-files/build/index.js deleted file mode 100644 index 63cad3ae..00000000 --- a/node_modules/jest-changed-files/build/index.js +++ /dev/null @@ -1,201 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -Object.defineProperty(exports, 'ChangedFiles', { - enumerable: true, - get: function get() { - return _types.ChangedFiles; - } -}); -Object.defineProperty(exports, 'ChangedFilesPromise', { - enumerable: true, - get: function get() { - return _types.ChangedFilesPromise; - } -}); -exports.findRepos = exports.getChangedFilesForRoots = void 0; - -function _throat() { - const data = _interopRequireDefault(require('throat')); - - _throat = function _throat() { - return data; - }; - - return data; -} - -var _types = require('./types'); - -var _git = _interopRequireDefault(require('./git')); - -var _hg = _interopRequireDefault(require('./hg')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -function notEmpty(value) { - return value != null; -} // This is an arbitrary number. The main goal is to prevent projects with -// many roots (50+) from spawning too many processes at once. - -const mutex = (0, _throat().default)(5); - -const findGitRoot = dir => mutex(() => _git.default.getRoot(dir)); - -const findHgRoot = dir => mutex(() => _hg.default.getRoot(dir)); - -const getChangedFilesForRoots = - /*#__PURE__*/ - (function() { - var _ref = _asyncToGenerator(function*(roots, options) { - const repos = yield findRepos(roots); - - const changedFilesOptions = _objectSpread( - { - includePaths: roots - }, - options - ); - - const gitPromises = Array.from(repos.git).map(repo => - _git.default.findChangedFiles(repo, changedFilesOptions) - ); - const hgPromises = Array.from(repos.hg).map(repo => - _hg.default.findChangedFiles(repo, changedFilesOptions) - ); - const changedFiles = (yield Promise.all( - gitPromises.concat(hgPromises) - )).reduce((allFiles, changedFilesInTheRepo) => { - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = changedFilesInTheRepo[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const file = _step.value; - allFiles.add(file); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - return allFiles; - }, new Set()); - return { - changedFiles, - repos - }; - }); - - return function getChangedFilesForRoots(_x, _x2) { - return _ref.apply(this, arguments); - }; - })(); - -exports.getChangedFilesForRoots = getChangedFilesForRoots; - -const findRepos = - /*#__PURE__*/ - (function() { - var _ref2 = _asyncToGenerator(function*(roots) { - const gitRepos = yield Promise.all( - roots.reduce((promises, root) => promises.concat(findGitRoot(root)), []) - ); - const hgRepos = yield Promise.all( - roots.reduce((promises, root) => promises.concat(findHgRoot(root)), []) - ); - return { - git: new Set(gitRepos.filter(notEmpty)), - hg: new Set(hgRepos.filter(notEmpty)) - }; - }); - - return function findRepos(_x3) { - return _ref2.apply(this, arguments); - }; - })(); - -exports.findRepos = findRepos; diff --git a/node_modules/jest-changed-files/build/types.d.ts b/node_modules/jest-changed-files/build/types.d.ts deleted file mode 100644 index 4c4771d9..00000000 --- a/node_modules/jest-changed-files/build/types.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export declare type Options = { - lastCommit?: boolean; - withAncestor?: boolean; - changedSince?: string; - includePaths?: Array; -}; -declare type Paths = Set; -export declare type Repos = { - git: Paths; - hg: Paths; -}; -export declare type ChangedFiles = { - repos: Repos; - changedFiles: Paths; -}; -export declare type ChangedFilesPromise = Promise; -export declare type SCMAdapter = { - findChangedFiles: (cwd: Config.Path, options: Options) => Promise>; - getRoot: (cwd: Config.Path) => Promise; -}; -export {}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-changed-files/build/types.d.ts.map b/node_modules/jest-changed-files/build/types.d.ts.map deleted file mode 100644 index 285f48fb..00000000 --- a/node_modules/jest-changed-files/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,oBAAY,OAAO,GAAG;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CACnC,CAAC;AAEF,aAAK,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC9B,oBAAY,KAAK,GAAG;IAAC,GAAG,EAAE,KAAK,CAAC;IAAC,EAAE,EAAE,KAAK,CAAA;CAAC,CAAC;AAC5C,oBAAY,YAAY,GAAG;IAAC,KAAK,EAAE,KAAK,CAAC;IAAC,YAAY,EAAE,KAAK,CAAA;CAAC,CAAC;AAC/D,oBAAY,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAExD,oBAAY,UAAU,GAAG;IACvB,gBAAgB,EAAE,CAChB,GAAG,EAAE,MAAM,CAAC,IAAI,EAChB,OAAO,EAAE,OAAO,KACb,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACjC,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;CAC5D,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-changed-files/build/types.js b/node_modules/jest-changed-files/build/types.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/jest-changed-files/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/jest-changed-files/package.json b/node_modules/jest-changed-files/package.json deleted file mode 100644 index 29406203..00000000 --- a/node_modules/jest-changed-files/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_args": [ - [ - "jest-changed-files@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-changed-files@24.9.0", - "_id": "jest-changed-files@24.9.0", - "_inBundle": false, - "_integrity": "sha512-6aTWpe2mHF0DhL28WjdkO8LyGjs3zItPET4bMSeXU6T3ub4FPMw+mcOcbdGXQOAfmLcxofD23/5Bl9Z4AkFwqg==", - "_location": "/jest-changed-files", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-changed-files@24.9.0", - "name": "jest-changed-files", - "escapedName": "jest-changed-files", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core" - ], - "_resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/types": "^24.9.0", - "execa": "^1.0.0", - "throat": "^4.0.0" - }, - "description": "A module used internally by Jest to check which files have changed since you last committed in git or hg.", - "devDependencies": { - "@types/execa": "^0.9.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-changed-files", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-changed-files" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-circus/README.md b/node_modules/jest-circus/README.md deleted file mode 100644 index 0c5e282f..00000000 --- a/node_modules/jest-circus/README.md +++ /dev/null @@ -1,59 +0,0 @@ -

- - -

jest-circus

-

The next-gen test runner for Jest

-

- -## Overview - -Circus is a flux-based test runner for Jest that is fast, easy to maintain, and simple to extend. - -Circus allows you to bind to events via an optional event handler on any [custom environment](https://jestjs.io/docs/en/configuration#testenvironment-string). See the [type definitions](https://github.com/facebook/jest/blob/master/packages/jest-circus/src/types.ts) for more information on the events and state data currently available. - -```js -import {NodeEnvironment} from 'jest-environment-node'; -import {Event, State} from 'jest-circus'; - -class MyCustomEnvironment extends NodeEnvironment { - //... - - handleTestEvent(event: Event, state: State) { - if (event.name === 'test_start') { - // ... - } - } -} -``` - -Mutating event or state data is currently unsupported and may cause unexpected behavior or break in a future release without warning. New events, event data, and/or state data will not be considered a breaking change and may be added in any minor release. - -## Installation - -Install `jest-circus` using yarn: - -```bash -yarn add --dev jest-circus -``` - -Or via npm: - -```bash -npm install --save-dev jest-circus -``` - -## Configure - -Configure Jest to use `jest-circus` via the [`testRunner`](https://jestjs.io/docs/en/configuration#testrunner-string) option: - -```json -{ - "testRunner": "jest-circus/runner" -} -``` - -Or via CLI: - -```bash -jest --testRunner='jest-circus/runner' -``` diff --git a/node_modules/jest-circus/build/eventHandler.d.ts b/node_modules/jest-circus/build/eventHandler.d.ts deleted file mode 100644 index b2c93bd3..00000000 --- a/node_modules/jest-circus/build/eventHandler.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Circus } from '@jest/types'; -declare const eventHandler: Circus.EventHandler; -export default eventHandler; -//# sourceMappingURL=eventHandler.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-circus/build/eventHandler.d.ts.map b/node_modules/jest-circus/build/eventHandler.d.ts.map deleted file mode 100644 index b99a142d..00000000 --- a/node_modules/jest-circus/build/eventHandler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"eventHandler.d.ts","sourceRoot":"","sources":["../src/eventHandler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAgBnC,QAAA,MAAM,YAAY,EAAE,MAAM,CAAC,YAgL1B,CAAC;AAEF,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-circus/build/eventHandler.js b/node_modules/jest-circus/build/eventHandler.js deleted file mode 100644 index 1d8df517..00000000 --- a/node_modules/jest-circus/build/eventHandler.js +++ /dev/null @@ -1,245 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _types = require('./types'); - -var _utils = require('./utils'); - -var _globalErrorHandlers = require('./globalErrorHandlers'); - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var jestNow = global[Symbol.for('jest-native-now')] || global.Date.now; - -const eventHandler = (event, state) => { - switch (event.name) { - case 'include_test_location_in_result': { - state.includeTestLocationInResult = true; - break; - } - - case 'hook_start': { - break; - } - - case 'start_describe_definition': { - const blockName = event.blockName, - mode = event.mode; - const currentDescribeBlock = state.currentDescribeBlock; - const describeBlock = (0, _utils.makeDescribe)( - blockName, - currentDescribeBlock, - mode - ); - currentDescribeBlock.children.push(describeBlock); - state.currentDescribeBlock = describeBlock; - break; - } - - case 'finish_describe_definition': { - const currentDescribeBlock = state.currentDescribeBlock; - (0, _utils.invariant)( - currentDescribeBlock, - `currentDescribeBlock must be there` - ); - - if (!(0, _utils.describeBlockHasTests)(currentDescribeBlock)) { - currentDescribeBlock.hooks.forEach(hook => { - hook.asyncError.message = `Invalid: ${hook.type}() may not be used in a describe block containing no tests.`; - state.unhandledErrors.push(hook.asyncError); - }); - } // inherit mode from its parent describe but - // do not inherit "only" mode when there is already tests with "only" mode - - const shouldInheritMode = !( - currentDescribeBlock.mode === 'only' && - currentDescribeBlock.tests.find(test => test.mode === 'only') - ); - - if (shouldInheritMode) { - currentDescribeBlock.tests.forEach(test => { - if (!test.mode) { - test.mode = currentDescribeBlock.mode; - } - }); - } - - if ( - !state.hasFocusedTests && - currentDescribeBlock.tests.some(test => test.mode === 'only') - ) { - state.hasFocusedTests = true; - } - - if (currentDescribeBlock.parent) { - state.currentDescribeBlock = currentDescribeBlock.parent; - } - - break; - } - - case 'add_hook': { - const currentDescribeBlock = state.currentDescribeBlock; - const asyncError = event.asyncError, - fn = event.fn, - type = event.hookType, - timeout = event.timeout; - const parent = currentDescribeBlock; - currentDescribeBlock.hooks.push({ - asyncError, - fn, - parent, - timeout, - type - }); - break; - } - - case 'add_test': { - const currentDescribeBlock = state.currentDescribeBlock; - const asyncError = event.asyncError, - fn = event.fn, - mode = event.mode, - name = event.testName, - timeout = event.timeout; - const test = (0, _utils.makeTest)( - fn, - mode, - name, - currentDescribeBlock, - timeout, - asyncError - ); - - if (test.mode === 'only') { - state.hasFocusedTests = true; - } - - currentDescribeBlock.tests.push(test); - break; - } - - case 'hook_failure': { - const test = event.test, - describeBlock = event.describeBlock, - error = event.error, - hook = event.hook; - const asyncError = hook.asyncError, - type = hook.type; - - if (type === 'beforeAll') { - (0, _utils.invariant)(describeBlock, 'always present for `*All` hooks'); - (0, _utils.addErrorToEachTestUnderDescribe)( - describeBlock, - error, - asyncError - ); - } else if (type === 'afterAll') { - // Attaching `afterAll` errors to each test makes execution flow - // too complicated, so we'll consider them to be global. - state.unhandledErrors.push([error, asyncError]); - } else { - (0, _utils.invariant)(test, 'always present for `*Each` hooks'); - test.errors.push([error, asyncError]); - } - - break; - } - - case 'test_skip': { - event.test.status = 'skip'; - break; - } - - case 'test_todo': { - event.test.status = 'todo'; - break; - } - - case 'test_done': { - event.test.duration = (0, _utils.getTestDuration)(event.test); - event.test.status = 'done'; - state.currentlyRunningTest = null; - break; - } - - case 'test_start': { - state.currentlyRunningTest = event.test; - event.test.startedAt = jestNow(); - event.test.invocations += 1; - break; - } - - case 'test_fn_failure': { - const error = event.error, - asyncError = event.test.asyncError; - event.test.errors.push([error, asyncError]); - break; - } - - case 'test_retry': { - event.test.errors = []; - break; - } - - case 'run_start': { - global[_types.TEST_TIMEOUT_SYMBOL] && - (state.testTimeout = global[_types.TEST_TIMEOUT_SYMBOL]); - break; - } - - case 'run_finish': { - break; - } - - case 'setup': { - // Uncaught exception handlers should be defined on the parent process - // object. If defined on the VM's process object they just no op and let - // the parent process crash. It might make sense to return a `dispatch` - // function to the parent process and register handlers there instead, but - // i'm not sure if this is works. For now i just replicated whatever - // jasmine was doing -- dabramov - state.parentProcess = event.parentProcess; - (0, _utils.invariant)(state.parentProcess); - state.originalGlobalErrorHandlers = (0, - _globalErrorHandlers.injectGlobalErrorHandlers)(state.parentProcess); - - if (event.testNamePattern) { - state.testNamePattern = new RegExp(event.testNamePattern, 'i'); - } - - break; - } - - case 'teardown': { - (0, _utils.invariant)(state.originalGlobalErrorHandlers); - (0, _utils.invariant)(state.parentProcess); - (0, _globalErrorHandlers.restoreGlobalErrorHandlers)( - state.parentProcess, - state.originalGlobalErrorHandlers - ); - break; - } - - case 'error': { - // It's very likely for long-running async tests to throw errors. In this - // case we want to catch them and fail the current test. At the same time - // there's a possibility that one test sets a long timeout, that will - // eventually throw after this test finishes but during some other test - // execution, which will result in one test's error failing another test. - // In any way, it should be possible to track where the error was thrown - // from. - state.currentlyRunningTest - ? state.currentlyRunningTest.errors.push(event.error) - : state.unhandledErrors.push(event.error); - break; - } - } -}; - -var _default = eventHandler; -exports.default = _default; diff --git a/node_modules/jest-circus/build/formatNodeAssertErrors.d.ts b/node_modules/jest-circus/build/formatNodeAssertErrors.d.ts deleted file mode 100644 index 96d7a410..00000000 --- a/node_modules/jest-circus/build/formatNodeAssertErrors.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Circus } from '@jest/types'; -declare const formatNodeAssertErrors: (event: Circus.Event, state: Circus.State) => void; -export default formatNodeAssertErrors; -//# sourceMappingURL=formatNodeAssertErrors.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-circus/build/formatNodeAssertErrors.d.ts.map b/node_modules/jest-circus/build/formatNodeAssertErrors.d.ts.map deleted file mode 100644 index d1e5ee17..00000000 --- a/node_modules/jest-circus/build/formatNodeAssertErrors.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"formatNodeAssertErrors.d.ts","sourceRoot":"","sources":["../src/formatNodeAssertErrors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAgCnC,QAAA,MAAM,sBAAsB,oDA4B3B,CAAC;AAsHF,eAAe,sBAAsB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-circus/build/formatNodeAssertErrors.js b/node_modules/jest-circus/build/formatNodeAssertErrors.js deleted file mode 100644 index 4bf59196..00000000 --- a/node_modules/jest-circus/build/formatNodeAssertErrors.js +++ /dev/null @@ -1,238 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _assert = require('assert'); - -var _jestMatcherUtils = require('jest-matcher-utils'); - -var _chalk = _interopRequireDefault(require('chalk')); - -var _prettyFormat = _interopRequireDefault(require('pretty-format')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest() - ); -} - -function _nonIterableRest() { - throw new TypeError('Invalid attempt to destructure non-iterable instance'); -} - -function _iterableToArrayLimit(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - try { - for ( - var _i = arr[Symbol.iterator](), _s; - !(_n = (_s = _i.next()).done); - _n = true - ) { - _arr.push(_s.value); - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i['return'] != null) _i['return'](); - } finally { - if (_d) throw _e; - } - } - return _arr; -} - -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} - -const assertOperatorsMap = { - '!=': 'notEqual', - '!==': 'notStrictEqual', - '==': 'equal', - '===': 'strictEqual' -}; -const humanReadableOperators = { - deepEqual: 'to deeply equal', - deepStrictEqual: 'to deeply and strictly equal', - equal: 'to be equal', - notDeepEqual: 'not to deeply equal', - notDeepStrictEqual: 'not to deeply and strictly equal', - notEqual: 'to not be equal', - notStrictEqual: 'not be strictly equal', - strictEqual: 'to strictly be equal' -}; - -const formatNodeAssertErrors = (event, state) => { - switch (event.name) { - case 'test_done': { - event.test.errors = event.test.errors.map(errors => { - let error; - - if (Array.isArray(errors)) { - const _errors = _slicedToArray(errors, 2), - originalError = _errors[0], - asyncError = _errors[1]; - - if (originalError == null) { - error = asyncError; - } else if (!originalError.stack) { - error = asyncError; - error.message = originalError.message - ? originalError.message - : `thrown: ${(0, _prettyFormat.default)(originalError, { - maxDepth: 3 - })}`; - } else { - error = originalError; - } - } else { - error = errors; - } - - return isAssertionError(error) - ? { - message: assertionErrorMessage(error, { - expand: state.expand - }) - } - : errors; - }); - } - } -}; - -const getOperatorName = (operator, stack) => { - if (typeof operator === 'string') { - return assertOperatorsMap[operator] || operator; - } - - if (stack.match('.doesNotThrow')) { - return 'doesNotThrow'; - } - - if (stack.match('.throws')) { - return 'throws'; - } - - return ''; -}; - -const operatorMessage = operator => { - const niceOperatorName = getOperatorName(operator, ''); - const humanReadableOperator = humanReadableOperators[niceOperatorName]; - return typeof operator === 'string' - ? `${humanReadableOperator || niceOperatorName} to:\n` - : ''; -}; - -const assertThrowingMatcherHint = operatorName => - operatorName - ? _chalk.default.dim('assert') + - _chalk.default.dim('.' + operatorName + '(') + - _chalk.default.red('function') + - _chalk.default.dim(')') - : ''; - -const assertMatcherHint = (operator, operatorName, expected) => { - let message = ''; - - if (operator === '==' && expected === true) { - message = - _chalk.default.dim('assert') + - _chalk.default.dim('(') + - _chalk.default.red('received') + - _chalk.default.dim(')'); - } else if (operatorName) { - message = - _chalk.default.dim('assert') + - _chalk.default.dim('.' + operatorName + '(') + - _chalk.default.red('received') + - _chalk.default.dim(', ') + - _chalk.default.green('expected') + - _chalk.default.dim(')'); - } - - return message; -}; - -function assertionErrorMessage(error, options) { - const expected = error.expected, - actual = error.actual, - generatedMessage = error.generatedMessage, - message = error.message, - operator = error.operator, - stack = error.stack; - const diffString = (0, _jestMatcherUtils.diff)(expected, actual, options); - const hasCustomMessage = !generatedMessage; - const operatorName = getOperatorName(operator, stack); - const trimmedStack = stack - .replace(message, '') - .replace(/AssertionError(.*)/g, ''); - - if (operatorName === 'doesNotThrow') { - return ( - buildHintString(assertThrowingMatcherHint(operatorName)) + - _chalk.default.reset(`Expected the function not to throw an error.\n`) + - _chalk.default.reset(`Instead, it threw:\n`) + - ` ${(0, _jestMatcherUtils.printReceived)(actual)}` + - _chalk.default.reset( - hasCustomMessage ? '\n\nMessage:\n ' + message : '' - ) + - trimmedStack - ); - } - - if (operatorName === 'throws') { - return ( - buildHintString(assertThrowingMatcherHint(operatorName)) + - _chalk.default.reset(`Expected the function to throw an error.\n`) + - _chalk.default.reset(`But it didn't throw anything.`) + - _chalk.default.reset( - hasCustomMessage ? '\n\nMessage:\n ' + message : '' - ) + - trimmedStack - ); - } - - return ( - buildHintString(assertMatcherHint(operator, operatorName, expected)) + - _chalk.default.reset(`Expected value ${operatorMessage(operator)}`) + - ` ${(0, _jestMatcherUtils.printExpected)(expected)}\n` + - _chalk.default.reset(`Received:\n`) + - ` ${(0, _jestMatcherUtils.printReceived)(actual)}` + - _chalk.default.reset(hasCustomMessage ? '\n\nMessage:\n ' + message : '') + - (diffString ? `\n\nDifference:\n\n${diffString}` : '') + - trimmedStack - ); -} - -function isAssertionError(error) { - return ( - error && - (error instanceof _assert.AssertionError || - error.name === _assert.AssertionError.name || - error.code === 'ERR_ASSERTION') - ); -} - -function buildHintString(hint) { - return hint ? hint + '\n\n' : ''; -} - -var _default = formatNodeAssertErrors; -exports.default = _default; diff --git a/node_modules/jest-circus/build/globalErrorHandlers.d.ts b/node_modules/jest-circus/build/globalErrorHandlers.d.ts deleted file mode 100644 index 9d2ad6b1..00000000 --- a/node_modules/jest-circus/build/globalErrorHandlers.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Circus } from '@jest/types'; -export declare const injectGlobalErrorHandlers: (parentProcess: NodeJS.Process) => Circus.GlobalErrorHandlers; -export declare const restoreGlobalErrorHandlers: (parentProcess: NodeJS.Process, originalErrorHandlers: Circus.GlobalErrorHandlers) => void; -//# sourceMappingURL=globalErrorHandlers.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-circus/build/globalErrorHandlers.d.ts.map b/node_modules/jest-circus/build/globalErrorHandlers.d.ts.map deleted file mode 100644 index 5a8d0214..00000000 --- a/node_modules/jest-circus/build/globalErrorHandlers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"globalErrorHandlers.d.ts","sourceRoot":"","sources":["../src/globalErrorHandlers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAQnC,eAAO,MAAM,yBAAyB,+DAUrC,CAAC;AAEF,eAAO,MAAM,0BAA0B,4FAatC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-circus/build/globalErrorHandlers.js b/node_modules/jest-circus/build/globalErrorHandlers.js deleted file mode 100644 index 0e8d0046..00000000 --- a/node_modules/jest-circus/build/globalErrorHandlers.js +++ /dev/null @@ -1,100 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.restoreGlobalErrorHandlers = exports.injectGlobalErrorHandlers = void 0; - -var _state = require('./state'); - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; - -const uncaught = error => { - (0, _state.dispatch)({ - error, - name: 'error' - }); -}; - -const injectGlobalErrorHandlers = parentProcess => { - const uncaughtException = process.listeners('uncaughtException').slice(); - const unhandledRejection = process.listeners('unhandledRejection').slice(); - parentProcess.removeAllListeners('uncaughtException'); - parentProcess.removeAllListeners('unhandledRejection'); - parentProcess.on('uncaughtException', uncaught); - parentProcess.on('unhandledRejection', uncaught); - return { - uncaughtException, - unhandledRejection - }; -}; - -exports.injectGlobalErrorHandlers = injectGlobalErrorHandlers; - -const restoreGlobalErrorHandlers = (parentProcess, originalErrorHandlers) => { - parentProcess.removeListener('uncaughtException', uncaught); - parentProcess.removeListener('unhandledRejection', uncaught); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = originalErrorHandlers.uncaughtException[ - Symbol.iterator - ](), - _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const listener = _step.value; - parentProcess.on('uncaughtException', listener); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for ( - var _iterator2 = originalErrorHandlers.unhandledRejection[ - Symbol.iterator - ](), - _step2; - !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); - _iteratorNormalCompletion2 = true - ) { - const listener = _step2.value; - parentProcess.on('unhandledRejection', listener); - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } -}; - -exports.restoreGlobalErrorHandlers = restoreGlobalErrorHandlers; diff --git a/node_modules/jest-circus/build/index.d.ts b/node_modules/jest-circus/build/index.d.ts deleted file mode 100644 index 07743d30..00000000 --- a/node_modules/jest-circus/build/index.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Circus, Global } from '@jest/types'; -declare type THook = (fn: Circus.HookFn, timeout?: number) => void; -declare const describe: { - (blockName: string, blockFn: Global.BlockFn): void; - each: (table: Global.EachTable, ...taggedTemplateData: unknown[]) => (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - only: { - (blockName: string, blockFn: Global.BlockFn): void; - each: (table: Global.EachTable, ...taggedTemplateData: unknown[]) => (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - }; - skip: { - (blockName: string, blockFn: Global.BlockFn): void; - each: (table: Global.EachTable, ...taggedTemplateData: unknown[]) => (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - }; -}; -declare const beforeEach: THook; -declare const beforeAll: THook; -declare const afterEach: THook; -declare const afterAll: THook; -declare const test: Global.It; -declare const it: Global.It; -export declare type Event = Circus.Event; -export declare type State = Circus.State; -export { afterAll, afterEach, beforeAll, beforeEach, describe, it, test }; -declare const _default: { - afterAll: THook; - afterEach: THook; - beforeAll: THook; - beforeEach: THook; - describe: { - (blockName: string, blockFn: Global.BlockFn): void; - each: (table: Global.EachTable, ...taggedTemplateData: unknown[]) => (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - only: { - (blockName: string, blockFn: Global.BlockFn): void; - each: (table: Global.EachTable, ...taggedTemplateData: unknown[]) => (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - }; - skip: { - (blockName: string, blockFn: Global.BlockFn): void; - each: (table: Global.EachTable, ...taggedTemplateData: unknown[]) => (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - }; - }; - it: Global.It; - test: Global.It; -}; -export default _default; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-circus/build/index.d.ts.map b/node_modules/jest-circus/build/index.d.ts.map deleted file mode 100644 index c7a0aefa..00000000 --- a/node_modules/jest-circus/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,aAAa,CAAC;AAG3C,aAAK,KAAK,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AAM3D,QAAA,MAAM,QAAQ;;;;;;;;;;;CAiBV,CAAC;AA8EL,QAAA,MAAM,UAAU,EAAE,KAC+B,CAAC;AAClD,QAAA,MAAM,SAAS,EAAE,KAC8B,CAAC;AAChD,QAAA,MAAM,SAAS,EAAE,KAC8B,CAAC;AAChD,QAAA,MAAM,QAAQ,EAAE,KAC6B,CAAC;AAE9C,QAAA,MAAM,IAAI,EAAE,MAAM,CAAC,EA2Ef,CAAC;AAEL,QAAA,MAAM,EAAE,EAAE,MAAM,CAAC,EAAS,CAAC;AAE3B,oBAAY,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AACjC,oBAAY,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AACjC,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAC,CAAC;;;;;;;;;;;;;;;;;;;;;AACxE,wBAQE"} \ No newline at end of file diff --git a/node_modules/jest-circus/build/index.js b/node_modules/jest-circus/build/index.js deleted file mode 100644 index 389c55db..00000000 --- a/node_modules/jest-circus/build/index.js +++ /dev/null @@ -1,223 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = exports.test = exports.it = exports.describe = exports.beforeEach = exports.beforeAll = exports.afterEach = exports.afterAll = void 0; - -var _chalk = _interopRequireDefault(require('chalk')); - -var _jestEach = require('jest-each'); - -var _jestMessageUtil = require('jest-message-util'); - -var _jestUtil = require('jest-util'); - -var _state = require('./state'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const describe = (() => { - const describe = (blockName, blockFn) => - _dispatchDescribe(blockFn, blockName, describe); - - const only = (blockName, blockFn) => - _dispatchDescribe(blockFn, blockName, only, 'only'); - - const skip = (blockName, blockFn) => - _dispatchDescribe(blockFn, blockName, skip, 'skip'); - - describe.each = (0, _jestEach.bind)(describe, false); - only.each = (0, _jestEach.bind)(only, false); - skip.each = (0, _jestEach.bind)(skip, false); - describe.only = only; - describe.skip = skip; - return describe; -})(); - -exports.describe = describe; - -const _dispatchDescribe = (blockFn, blockName, describeFn, mode) => { - const asyncError = new _jestUtil.ErrorWithStack(undefined, describeFn); - - if (blockFn === undefined) { - asyncError.message = `Missing second argument. It must be a callback function.`; - throw asyncError; - } - - if (typeof blockFn !== 'function') { - asyncError.message = `Invalid second argument, ${blockFn}. It must be a callback function.`; - throw asyncError; - } - - (0, _state.dispatch)({ - asyncError, - blockName, - mode, - name: 'start_describe_definition' - }); - const describeReturn = blockFn(); // TODO throw in Jest 25 - - if ((0, _jestUtil.isPromise)(describeReturn)) { - console.log( - (0, _jestMessageUtil.formatExecError)( - new _jestUtil.ErrorWithStack( - _chalk.default.yellow( - 'Returning a Promise from "describe" is not supported. Tests must be defined synchronously.\n' + - 'Returning a value from "describe" will fail the test in a future version of Jest.' - ), - describeFn - ), - { - rootDir: '', - testMatch: [] - }, - { - noStackTrace: false - } - ) - ); - } else if (describeReturn !== undefined) { - console.log( - (0, _jestMessageUtil.formatExecError)( - new _jestUtil.ErrorWithStack( - _chalk.default.yellow( - 'A "describe" callback must not return a value.\n' + - 'Returning a value from "describe" will fail the test in a future version of Jest.' - ), - describeFn - ), - { - rootDir: '', - testMatch: [] - }, - { - noStackTrace: false - } - ) - ); - } - - (0, _state.dispatch)({ - blockName, - mode, - name: 'finish_describe_definition' - }); -}; - -const _addHook = (fn, hookType, hookFn, timeout) => { - const asyncError = new _jestUtil.ErrorWithStack(undefined, hookFn); - - if (typeof fn !== 'function') { - asyncError.message = - 'Invalid first argument. It must be a callback function.'; - throw asyncError; - } - - (0, _state.dispatch)({ - asyncError, - fn, - hookType, - name: 'add_hook', - timeout - }); -}; // Hooks have to pass themselves to the HOF in order for us to trim stack traces. - -const beforeEach = (fn, timeout) => - _addHook(fn, 'beforeEach', beforeEach, timeout); - -exports.beforeEach = beforeEach; - -const beforeAll = (fn, timeout) => - _addHook(fn, 'beforeAll', beforeAll, timeout); - -exports.beforeAll = beforeAll; - -const afterEach = (fn, timeout) => - _addHook(fn, 'afterEach', afterEach, timeout); - -exports.afterEach = afterEach; - -const afterAll = (fn, timeout) => _addHook(fn, 'afterAll', afterAll, timeout); - -exports.afterAll = afterAll; - -const test = (() => { - const test = (testName, fn, timeout) => - _addTest(testName, undefined, fn, test, timeout); - - const skip = (testName, fn, timeout) => - _addTest(testName, 'skip', fn, skip, timeout); - - const only = (testName, fn, timeout) => - _addTest(testName, 'only', fn, test.only, timeout); - - test.todo = (testName, ...rest) => { - if (rest.length > 0 || typeof testName !== 'string') { - throw new _jestUtil.ErrorWithStack( - 'Todo must be called with only a description.', - test.todo - ); - } - - return _addTest(testName, 'todo', () => {}, test.todo); - }; - - const _addTest = (testName, mode, fn, testFn, timeout) => { - const asyncError = new _jestUtil.ErrorWithStack(undefined, testFn); - - if (typeof testName !== 'string') { - asyncError.message = `Invalid first argument, ${testName}. It must be a string.`; - throw asyncError; - } - - if (fn === undefined) { - asyncError.message = - 'Missing second argument. It must be a callback function. Perhaps you want to use `test.todo` for a test placeholder.'; - throw asyncError; - } - - if (typeof fn !== 'function') { - asyncError.message = `Invalid second argument, ${fn}. It must be a callback function.`; - throw asyncError; - } - - return (0, _state.dispatch)({ - asyncError, - fn, - mode, - name: 'add_test', - testName, - timeout - }); - }; - - test.each = (0, _jestEach.bind)(test); - only.each = (0, _jestEach.bind)(only); - skip.each = (0, _jestEach.bind)(skip); - test.only = only; - test.skip = skip; - return test; -})(); - -exports.test = test; -const it = test; -exports.it = it; -var _default = { - afterAll, - afterEach, - beforeAll, - beforeEach, - describe, - it, - test -}; -exports.default = _default; diff --git a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.d.ts b/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.d.ts deleted file mode 100644 index a90f9291..00000000 --- a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { JestEnvironment } from '@jest/environment'; -import { TestResult } from '@jest/test-result'; -import Runtime from 'jest-runtime'; -declare const jestAdapter: (globalConfig: Config.GlobalConfig, config: Config.ProjectConfig, environment: JestEnvironment, runtime: Runtime, testPath: string) => Promise; -export = jestAdapter; -//# sourceMappingURL=jestAdapter.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.d.ts.map b/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.d.ts.map deleted file mode 100644 index 43f94439..00000000 --- a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jestAdapter.d.ts","sourceRoot":"","sources":["../../src/legacy-code-todo-rewrite/jestAdapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE7C,OAAO,OAAO,MAAM,cAAc,CAAC;AAKnC,QAAA,MAAM,WAAW,4JAsEhB,CAAC;AAgCF,SAAS,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js b/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js deleted file mode 100644 index aa5d9053..00000000 --- a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js +++ /dev/null @@ -1,159 +0,0 @@ -'use strict'; - -var _path = _interopRequireDefault(require('path')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -const FRAMEWORK_INITIALIZER = require.resolve('./jestAdapterInit'); - -const jestAdapter = - /*#__PURE__*/ - (function() { - var _ref = _asyncToGenerator(function*( - globalConfig, - config, - environment, - runtime, - testPath - ) { - const _runtime$requireInter = runtime.requireInternalModule( - FRAMEWORK_INITIALIZER - ), - initialize = _runtime$requireInter.initialize, - runAndTransformResultsToJestFormat = - _runtime$requireInter.runAndTransformResultsToJestFormat; - - runtime - .requireInternalModule( - _path.default.resolve(__dirname, './jestExpect.js') - ) - .default({ - expand: globalConfig.expand - }); - - const getPrettier = () => - config.prettierPath ? require(config.prettierPath) : null; - - const getBabelTraverse = () => require('@babel/traverse').default; - - const _initialize = initialize({ - config, - environment, - getBabelTraverse, - getPrettier, - globalConfig, - localRequire: runtime.requireModule.bind(runtime), - parentProcess: process, - testPath - }), - globals = _initialize.globals, - snapshotState = _initialize.snapshotState; - - if (config.timers === 'fake') { - // during setup, this cannot be null (and it's fine to explode if it is) - environment.fakeTimers.useFakeTimers(); - } - - globals.beforeEach(() => { - if (config.resetModules) { - runtime.resetModules(); - } - - if (config.clearMocks) { - runtime.clearAllMocks(); - } - - if (config.resetMocks) { - runtime.resetAllMocks(); - - if (config.timers === 'fake') { - // during setup, this cannot be null (and it's fine to explode if it is) - environment.fakeTimers.useFakeTimers(); - } - } - - if (config.restoreMocks) { - runtime.restoreAllMocks(); - } - }); - config.setupFilesAfterEnv.forEach(path => runtime.requireModule(path)); - runtime.requireModule(testPath); - const results = yield runAndTransformResultsToJestFormat({ - config, - globalConfig, - testPath - }); - return _addSnapshotData(results, snapshotState); - }); - - return function jestAdapter(_x, _x2, _x3, _x4, _x5) { - return _ref.apply(this, arguments); - }; - })(); - -const _addSnapshotData = (results, snapshotState) => { - results.testResults.forEach(({fullName, status}) => { - if (status === 'pending' || status === 'failed') { - // if test is skipped or failed, we don't want to mark - // its snapshots as obsolete. - snapshotState.markSnapshotsAsCheckedForTest(fullName); - } - }); - const uncheckedCount = snapshotState.getUncheckedCount(); - const uncheckedKeys = snapshotState.getUncheckedKeys(); - - if (uncheckedCount) { - snapshotState.removeUncheckedKeys(); - } - - const status = snapshotState.save(); - results.snapshot.fileDeleted = status.deleted; - results.snapshot.added = snapshotState.added; - results.snapshot.matched = snapshotState.matched; - results.snapshot.unmatched = snapshotState.unmatched; - results.snapshot.updated = snapshotState.updated; - results.snapshot.unchecked = !status.deleted ? uncheckedCount : 0; // Copy the array to prevent memory leaks - - results.snapshot.uncheckedKeys = Array.from(uncheckedKeys); - return results; -}; - -module.exports = jestAdapter; diff --git a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.d.ts b/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.d.ts deleted file mode 100644 index 7a900fdf..00000000 --- a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Circus, Config, Global } from '@jest/types'; -import { JestEnvironment } from '@jest/environment'; -import { TestResult } from '@jest/test-result'; -export declare const initialize: ({ config, environment, getPrettier, getBabelTraverse, globalConfig, localRequire, parentProcess, testPath, }: { - config: Config.ProjectConfig; - environment: JestEnvironment; - getPrettier: () => any; - getBabelTraverse: () => Function; - globalConfig: Config.GlobalConfig; - localRequire: (path: string) => any; - testPath: string; - parentProcess: NodeJS.Process; -}) => { - globals: { - afterAll: (fn: Circus.HookFn, timeout?: number | undefined) => void; - afterEach: (fn: Circus.HookFn, timeout?: number | undefined) => void; - beforeAll: (fn: Circus.HookFn, timeout?: number | undefined) => void; - beforeEach: (fn: Circus.HookFn, timeout?: number | undefined) => void; - describe: { - (blockName: string, blockFn: Global.BlockFn): void; - each: (table: Global.EachTable, ...taggedTemplateData: unknown[]) => (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - only: { - (blockName: string, blockFn: Global.BlockFn): void; - each: (table: Global.EachTable, ...taggedTemplateData: unknown[]) => (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - }; - skip: { - (blockName: string, blockFn: Global.BlockFn): void; - each: (table: Global.EachTable, ...taggedTemplateData: unknown[]) => (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - }; - }; - it: Global.It; - test: Global.It; - }; - snapshotState: import("jest-snapshot/build/State").default; -}; -export declare const runAndTransformResultsToJestFormat: ({ config, globalConfig, testPath, }: { - config: Config.ProjectConfig; - globalConfig: Config.GlobalConfig; - testPath: string; -}) => Promise; -//# sourceMappingURL=jestAdapterInit.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.d.ts.map b/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.d.ts.map deleted file mode 100644 index d89b8773..00000000 --- a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jestAdapterInit.d.ts","sourceRoot":"","sources":["../../src/legacy-code-todo-rewrite/jestAdapterInit.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAC,MAAM,aAAa,CAAC;AACnD,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAA0B,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAsBtE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2GtB,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;yBA0G9C,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js b/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js deleted file mode 100644 index 3c9cf3e3..00000000 --- a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js +++ /dev/null @@ -1,315 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.runAndTransformResultsToJestFormat = exports.initialize = void 0; - -var _expect = require('expect'); - -var _jestMessageUtil = require('jest-message-util'); - -var _jestSnapshot = require('jest-snapshot'); - -var _throat = _interopRequireDefault(require('throat')); - -var _state = require('../state'); - -var _utils = require('../utils'); - -var _run = _interopRequireDefault(require('../run')); - -var _ = _interopRequireDefault(require('..')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -const initialize = ({ - config, - environment, - getPrettier, - getBabelTraverse, - globalConfig, - localRequire, - parentProcess, - testPath -}) => { - if (globalConfig.testTimeout) { - (0, _state.getState)().testTimeout = globalConfig.testTimeout; - } - - const mutex = (0, _throat.default)(globalConfig.maxConcurrency); - const nodeGlobal = global; - Object.assign(nodeGlobal, _.default); - nodeGlobal.xit = nodeGlobal.it.skip; - nodeGlobal.xtest = nodeGlobal.it.skip; - nodeGlobal.xdescribe = nodeGlobal.describe.skip; - nodeGlobal.fit = nodeGlobal.it.only; - nodeGlobal.fdescribe = nodeGlobal.describe.only; - - nodeGlobal.test.concurrent = (test => { - const concurrent = (testName, testFn, timeout) => { - // For concurrent tests we first run the function that returns promise, and then register a - // nomral test that will be waiting on the returned promise (when we start the test, the promise - // will already be in the process of execution). - // Unfortunately at this stage there's no way to know if there are any `.only` tests in the suite - // that will result in this test to be skipped, so we'll be executing the promise function anyway, - // even if it ends up being skipped. - const promise = mutex(() => testFn()); - nodeGlobal.test(testName, () => promise, timeout); - }; - - concurrent.only = (testName, testFn, timeout) => { - const promise = mutex(() => testFn()); // eslint-disable-next-line jest/no-focused-tests - - test.only(testName, () => promise, timeout); - }; - - concurrent.skip = test.skip; - return concurrent; - })(nodeGlobal.test); - - (0, _state.addEventHandler)(eventHandler); - - if (environment.handleTestEvent) { - (0, _state.addEventHandler)(environment.handleTestEvent.bind(environment)); - } - - (0, _state.dispatch)({ - name: 'setup', - parentProcess, - testNamePattern: globalConfig.testNamePattern - }); - - if (config.testLocationInResults) { - (0, _state.dispatch)({ - name: 'include_test_location_in_result' - }); - } // Jest tests snapshotSerializers in order preceding built-in serializers. - // Therefore, add in reverse because the last added is the first tested. - - config.snapshotSerializers - .concat() - .reverse() - .forEach(path => { - (0, _jestSnapshot.addSerializer)(localRequire(path)); - }); - const expand = globalConfig.expand, - updateSnapshot = globalConfig.updateSnapshot; - const snapshotResolver = (0, _jestSnapshot.buildSnapshotResolver)(config); - const snapshotPath = snapshotResolver.resolveSnapshotPath(testPath); - const snapshotState = new _jestSnapshot.SnapshotState(snapshotPath, { - expand, - getBabelTraverse, - getPrettier, - updateSnapshot - }); - (0, _expect.setState)({ - snapshotState, - testPath - }); - (0, _state.addEventHandler)(handleSnapshotStateAfterRetry(snapshotState)); // Return it back to the outer scope (test runner outside the VM). - - return { - globals: _.default, - snapshotState - }; -}; - -exports.initialize = initialize; - -const runAndTransformResultsToJestFormat = - /*#__PURE__*/ - (function() { - var _ref = _asyncToGenerator(function*({config, globalConfig, testPath}) { - const runResult = yield (0, _run.default)(); - let numFailingTests = 0; - let numPassingTests = 0; - let numPendingTests = 0; - let numTodoTests = 0; - const assertionResults = runResult.testResults.map(testResult => { - let status; - - if (testResult.status === 'skip') { - status = 'pending'; - numPendingTests += 1; - } else if (testResult.status === 'todo') { - status = 'todo'; - numTodoTests += 1; - } else if (testResult.errors.length) { - status = 'failed'; - numFailingTests += 1; - } else { - status = 'passed'; - numPassingTests += 1; - } - - const ancestorTitles = testResult.testPath.filter( - name => name !== _state.ROOT_DESCRIBE_BLOCK_NAME - ); - const title = ancestorTitles.pop(); - return { - ancestorTitles, - duration: testResult.duration, - failureMessages: testResult.errors, - fullName: title - ? ancestorTitles.concat(title).join(' ') - : ancestorTitles.join(' '), - invocations: testResult.invocations, - location: testResult.location, - numPassingAsserts: 0, - status, - title: testResult.testPath[testResult.testPath.length - 1] - }; - }); - let failureMessage = (0, _jestMessageUtil.formatResultsErrors)( - assertionResults, - config, - globalConfig, - testPath - ); - let testExecError; - - if (runResult.unhandledErrors.length) { - testExecError = { - message: '', - stack: runResult.unhandledErrors.join('\n') - }; - failureMessage = - (failureMessage || '') + - '\n\n' + - runResult.unhandledErrors - .map(err => - (0, _jestMessageUtil.formatExecError)(err, config, globalConfig) - ) - .join('\n'); - } - - (0, _state.dispatch)({ - name: 'teardown' - }); - return { - console: undefined, - displayName: config.displayName, - failureMessage, - leaks: false, - // That's legacy code, just adding it so Flow is happy. - numFailingTests, - numPassingTests, - numPendingTests, - numTodoTests, - openHandles: [], - perfStats: { - // populated outside - end: 0, - start: 0 - }, - skipped: false, - snapshot: { - added: 0, - fileDeleted: false, - matched: 0, - unchecked: 0, - uncheckedKeys: [], - unmatched: 0, - updated: 0 - }, - sourceMaps: {}, - testExecError, - testFilePath: testPath, - testResults: assertionResults - }; - }); - - return function runAndTransformResultsToJestFormat(_x) { - return _ref.apply(this, arguments); - }; - })(); - -exports.runAndTransformResultsToJestFormat = runAndTransformResultsToJestFormat; - -const handleSnapshotStateAfterRetry = snapshotState => event => { - switch (event.name) { - case 'test_retry': { - // Clear any snapshot data that occurred in previous test run - snapshotState.clear(); - } - } -}; - -const eventHandler = event => { - switch (event.name) { - case 'test_start': { - (0, _expect.setState)({ - currentTestName: (0, _utils.getTestID)(event.test) - }); - break; - } - - case 'test_done': { - _addSuppressedErrors(event.test); - - _addExpectedAssertionErrors(event.test); - - break; - } - } -}; - -const _addExpectedAssertionErrors = test => { - const failures = (0, _expect.extractExpectedAssertionsErrors)(); - const errors = failures.map(failure => failure.error); - test.errors = test.errors.concat(errors); -}; // Get suppressed errors from ``jest-matchers`` that weren't throw during -// test execution and add them to the test result, potentially failing -// a passing test. - -const _addSuppressedErrors = test => { - const _getState = (0, _expect.getState)(), - suppressedErrors = _getState.suppressedErrors; - - (0, _expect.setState)({ - suppressedErrors: [] - }); - - if (suppressedErrors.length) { - test.errors = test.errors.concat(suppressedErrors); - } -}; diff --git a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestExpect.d.ts b/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestExpect.d.ts deleted file mode 100644 index 82e61a15..00000000 --- a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestExpect.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare const _default: (config: { - expand: boolean; -}) => void; -export default _default; -//# sourceMappingURL=jestExpect.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestExpect.d.ts.map b/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestExpect.d.ts.map deleted file mode 100644 index 018d8586..00000000 --- a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestExpect.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jestExpect.d.ts","sourceRoot":"","sources":["../../src/legacy-code-todo-rewrite/jestExpect.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;AAYH,wBAaE"} \ No newline at end of file diff --git a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestExpect.js b/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestExpect.js deleted file mode 100644 index eb7a48fe..00000000 --- a/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestExpect.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _expect = _interopRequireDefault(require('expect')); - -var _jestSnapshot = require('jest-snapshot'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var _default = config => { - global.expect = _expect.default; - - _expect.default.setState({ - expand: config.expand - }); - - _expect.default.extend({ - toMatchInlineSnapshot: _jestSnapshot.toMatchInlineSnapshot, - toMatchSnapshot: _jestSnapshot.toMatchSnapshot, - toThrowErrorMatchingInlineSnapshot: - _jestSnapshot.toThrowErrorMatchingInlineSnapshot, - toThrowErrorMatchingSnapshot: _jestSnapshot.toThrowErrorMatchingSnapshot - }); - - _expect.default.addSnapshotSerializer = _jestSnapshot.addSerializer; -}; - -exports.default = _default; diff --git a/node_modules/jest-circus/build/run.d.ts b/node_modules/jest-circus/build/run.d.ts deleted file mode 100644 index 6099fd76..00000000 --- a/node_modules/jest-circus/build/run.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Circus } from '@jest/types'; -declare const run: () => Promise; -export default run; -//# sourceMappingURL=run.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-circus/build/run.d.ts.map b/node_modules/jest-circus/build/run.d.ts.map deleted file mode 100644 index 013522a3..00000000 --- a/node_modules/jest-circus/build/run.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAanC,QAAA,MAAM,GAAG,iCASR,CAAC;AAqIF,eAAe,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-circus/build/run.js b/node_modules/jest-circus/build/run.js deleted file mode 100644 index e34971d4..00000000 --- a/node_modules/jest-circus/build/run.js +++ /dev/null @@ -1,432 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _types = require('./types'); - -var _state = require('./state'); - -var _utils = require('./utils'); - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -const run = - /*#__PURE__*/ - (function() { - var _ref = _asyncToGenerator(function*() { - const _getState = (0, _state.getState)(), - rootDescribeBlock = _getState.rootDescribeBlock; - - (0, _state.dispatch)({ - name: 'run_start' - }); - yield _runTestsForDescribeBlock(rootDescribeBlock); - (0, _state.dispatch)({ - name: 'run_finish' - }); - return (0, - _utils.makeRunResult)((0, _state.getState)().rootDescribeBlock, (0, _state.getState)().unhandledErrors); - }); - - return function run() { - return _ref.apply(this, arguments); - }; - })(); - -const _runTestsForDescribeBlock = - /*#__PURE__*/ - (function() { - var _ref2 = _asyncToGenerator(function*(describeBlock) { - (0, _state.dispatch)({ - describeBlock, - name: 'run_describe_start' - }); - - const _getAllHooksForDescri = (0, _utils.getAllHooksForDescribe)( - describeBlock - ), - beforeAll = _getAllHooksForDescri.beforeAll, - afterAll = _getAllHooksForDescri.afterAll; - - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = beforeAll[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const hook = _step.value; - yield _callCircusHook({ - describeBlock, - hook - }); - } // Tests that fail and are retried we run after other tests - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - const retryTimes = parseInt(global[_types.RETRY_TIMES], 10) || 0; - const deferredRetryTests = []; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for ( - var _iterator2 = describeBlock.tests[Symbol.iterator](), _step2; - !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); - _iteratorNormalCompletion2 = true - ) { - const test = _step2.value; - const hasErrorsBeforeTestRun = test.errors.length > 0; - yield _runTest(test); - - if ( - hasErrorsBeforeTestRun === false && - retryTimes > 0 && - test.errors.length > 0 - ) { - deferredRetryTests.push(test); - } - } // Re-run failed tests n-times if configured - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - for (var _i = 0; _i < deferredRetryTests.length; _i++) { - const test = deferredRetryTests[_i]; - let numRetriesAvailable = retryTimes; - - while (numRetriesAvailable > 0 && test.errors.length > 0) { - // Clear errors so retries occur - (0, _state.dispatch)({ - name: 'test_retry', - test - }); - yield _runTest(test); - numRetriesAvailable--; - } - } - - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for ( - var _iterator3 = describeBlock.children[Symbol.iterator](), _step3; - !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); - _iteratorNormalCompletion3 = true - ) { - const child = _step3.value; - yield _runTestsForDescribeBlock(child); - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return != null) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - - var _iteratorNormalCompletion4 = true; - var _didIteratorError4 = false; - var _iteratorError4 = undefined; - - try { - for ( - var _iterator4 = afterAll[Symbol.iterator](), _step4; - !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); - _iteratorNormalCompletion4 = true - ) { - const hook = _step4.value; - yield _callCircusHook({ - describeBlock, - hook - }); - } - } catch (err) { - _didIteratorError4 = true; - _iteratorError4 = err; - } finally { - try { - if (!_iteratorNormalCompletion4 && _iterator4.return != null) { - _iterator4.return(); - } - } finally { - if (_didIteratorError4) { - throw _iteratorError4; - } - } - } - - (0, _state.dispatch)({ - describeBlock, - name: 'run_describe_finish' - }); - }); - - return function _runTestsForDescribeBlock(_x) { - return _ref2.apply(this, arguments); - }; - })(); - -const _runTest = - /*#__PURE__*/ - (function() { - var _ref3 = _asyncToGenerator(function*(test) { - (0, _state.dispatch)({ - name: 'test_start', - test - }); - const testContext = Object.create(null); - - const _getState2 = (0, _state.getState)(), - hasFocusedTests = _getState2.hasFocusedTests, - testNamePattern = _getState2.testNamePattern; - - const isSkipped = - test.mode === 'skip' || - (hasFocusedTests && test.mode !== 'only') || - (testNamePattern && !testNamePattern.test((0, _utils.getTestID)(test))); - - if (isSkipped) { - (0, _state.dispatch)({ - name: 'test_skip', - test - }); - return; - } - - if (test.mode === 'todo') { - (0, _state.dispatch)({ - name: 'test_todo', - test - }); - return; - } - - const _getEachHooksForTest = (0, _utils.getEachHooksForTest)(test), - afterEach = _getEachHooksForTest.afterEach, - beforeEach = _getEachHooksForTest.beforeEach; - - var _iteratorNormalCompletion5 = true; - var _didIteratorError5 = false; - var _iteratorError5 = undefined; - - try { - for ( - var _iterator5 = beforeEach[Symbol.iterator](), _step5; - !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); - _iteratorNormalCompletion5 = true - ) { - const hook = _step5.value; - - if (test.errors.length) { - // If any of the before hooks failed already, we don't run any - // hooks after that. - break; - } - - yield _callCircusHook({ - hook, - test, - testContext - }); - } - } catch (err) { - _didIteratorError5 = true; - _iteratorError5 = err; - } finally { - try { - if (!_iteratorNormalCompletion5 && _iterator5.return != null) { - _iterator5.return(); - } - } finally { - if (_didIteratorError5) { - throw _iteratorError5; - } - } - } - - yield _callCircusTest(test, testContext); - var _iteratorNormalCompletion6 = true; - var _didIteratorError6 = false; - var _iteratorError6 = undefined; - - try { - for ( - var _iterator6 = afterEach[Symbol.iterator](), _step6; - !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); - _iteratorNormalCompletion6 = true - ) { - const hook = _step6.value; - yield _callCircusHook({ - hook, - test, - testContext - }); - } // `afterAll` hooks should not affect test status (pass or fail), because if - // we had a global `afterAll` hook it would block all existing tests until - // this hook is executed. So we dispatch `test_done` right away. - } catch (err) { - _didIteratorError6 = true; - _iteratorError6 = err; - } finally { - try { - if (!_iteratorNormalCompletion6 && _iterator6.return != null) { - _iterator6.return(); - } - } finally { - if (_didIteratorError6) { - throw _iteratorError6; - } - } - } - - (0, _state.dispatch)({ - name: 'test_done', - test - }); - }); - - return function _runTest(_x2) { - return _ref3.apply(this, arguments); - }; - })(); - -const _callCircusHook = ({hook, test, describeBlock, testContext}) => { - (0, _state.dispatch)({ - hook, - name: 'hook_start' - }); - const timeout = hook.timeout || (0, _state.getState)().testTimeout; - return (0, _utils.callAsyncCircusFn)(hook.fn, testContext, { - isHook: true, - timeout - }) - .then(() => - (0, _state.dispatch)({ - describeBlock, - hook, - name: 'hook_success', - test - }) - ) - .catch(error => - (0, _state.dispatch)({ - describeBlock, - error, - hook, - name: 'hook_failure', - test - }) - ); -}; - -const _callCircusTest = (test, testContext) => { - (0, _state.dispatch)({ - name: 'test_fn_start', - test - }); - const timeout = test.timeout || (0, _state.getState)().testTimeout; - (0, _utils.invariant)( - test.fn, - `Tests with no 'fn' should have 'mode' set to 'skipped'` - ); - - if (test.errors.length) { - // We don't run the test if there's already an error in before hooks. - return Promise.resolve(); - } - - return (0, _utils.callAsyncCircusFn)(test.fn, testContext, { - isHook: false, - timeout - }) - .then(() => - (0, _state.dispatch)({ - name: 'test_fn_success', - test - }) - ) - .catch(error => - (0, _state.dispatch)({ - error, - name: 'test_fn_failure', - test - }) - ); -}; - -var _default = run; -exports.default = _default; diff --git a/node_modules/jest-circus/build/state.d.ts b/node_modules/jest-circus/build/state.d.ts deleted file mode 100644 index b264a49e..00000000 --- a/node_modules/jest-circus/build/state.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Circus } from '@jest/types'; -export declare const ROOT_DESCRIBE_BLOCK_NAME = "ROOT_DESCRIBE_BLOCK"; -export declare const getState: () => Circus.State; -export declare const setState: (state: Circus.State) => Circus.State; -export declare const dispatch: (event: Circus.Event) => void; -export declare const addEventHandler: (handler: Circus.EventHandler) => void; -//# sourceMappingURL=state.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-circus/build/state.d.ts.map b/node_modules/jest-circus/build/state.d.ts.map deleted file mode 100644 index eb7fd974..00000000 --- a/node_modules/jest-circus/build/state.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAYnC,eAAO,MAAM,wBAAwB,wBAAwB,CAAC;AAkB9D,eAAO,MAAM,QAAQ,oBAAwC,CAAC;AAC9D,eAAO,MAAM,QAAQ,uCACQ,CAAC;AAE9B,eAAO,MAAM,QAAQ,+BAIpB,CAAC;AAEF,eAAO,MAAM,eAAe,wCAE3B,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-circus/build/state.js b/node_modules/jest-circus/build/state.js deleted file mode 100644 index 1c84084c..00000000 --- a/node_modules/jest-circus/build/state.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.addEventHandler = exports.dispatch = exports.setState = exports.getState = exports.ROOT_DESCRIBE_BLOCK_NAME = void 0; - -var _types = require('./types'); - -var _utils = require('./utils'); - -var _eventHandler = _interopRequireDefault(require('./eventHandler')); - -var _formatNodeAssertErrors = _interopRequireDefault( - require('./formatNodeAssertErrors') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const eventHandlers = [_eventHandler.default, _formatNodeAssertErrors.default]; -const ROOT_DESCRIBE_BLOCK_NAME = 'ROOT_DESCRIBE_BLOCK'; -exports.ROOT_DESCRIBE_BLOCK_NAME = ROOT_DESCRIBE_BLOCK_NAME; -const ROOT_DESCRIBE_BLOCK = (0, _utils.makeDescribe)(ROOT_DESCRIBE_BLOCK_NAME); -const INITIAL_STATE = { - currentDescribeBlock: ROOT_DESCRIBE_BLOCK, - currentlyRunningTest: null, - expand: undefined, - hasFocusedTests: false, - // whether .only has been used on any test/describe - includeTestLocationInResult: false, - parentProcess: null, - rootDescribeBlock: ROOT_DESCRIBE_BLOCK, - testNamePattern: null, - testTimeout: 5000, - unhandledErrors: [] -}; -global[_types.STATE_SYM] = INITIAL_STATE; - -const getState = () => global[_types.STATE_SYM]; - -exports.getState = getState; - -const setState = state => (global[_types.STATE_SYM] = state); - -exports.setState = setState; - -const dispatch = event => { - for (var _i = 0; _i < eventHandlers.length; _i++) { - const handler = eventHandlers[_i]; - handler(event, getState()); - } -}; - -exports.dispatch = dispatch; - -const addEventHandler = handler => { - eventHandlers.push(handler); -}; - -exports.addEventHandler = addEventHandler; diff --git a/node_modules/jest-circus/build/types.d.ts b/node_modules/jest-circus/build/types.d.ts deleted file mode 100644 index 80aed3ff..00000000 --- a/node_modules/jest-circus/build/types.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import expect from 'expect'; -import { Circus } from '@jest/types'; -export declare const STATE_SYM: "STATE_SYM_SYMBOL"; -export declare const RETRY_TIMES: "RETRY_TIMES_SYMBOL"; -export declare const TEST_TIMEOUT_SYMBOL: "TEST_TIMEOUT_SYMBOL"; -declare global { - module NodeJS { - interface Global { - STATE_SYM_SYMBOL: Circus.State; - RETRY_TIMES_SYMBOL: string; - TEST_TIMEOUT_SYMBOL: number; - expect: typeof expect; - } - } -} -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-circus/build/types.d.ts.map b/node_modules/jest-circus/build/types.d.ts.map deleted file mode 100644 index 864604c6..00000000 --- a/node_modules/jest-circus/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,eAAO,MAAM,SAAS,oBAEa,CAAC;AACpC,eAAO,MAAM,WAAW,sBAEa,CAAC;AAEtC,eAAO,MAAM,mBAAmB,uBAEM,CAAC;AAEvC,OAAO,CAAC,MAAM,CAAC;IACb,OAAO,MAAM,CAAC;QACZ,UAAU,MAAM;YACd,gBAAgB,EAAE,MAAM,CAAC,KAAK,CAAC;YAC/B,kBAAkB,EAAE,MAAM,CAAC;YAC3B,mBAAmB,EAAE,MAAM,CAAC;YAC5B,MAAM,EAAE,OAAO,MAAM,CAAC;SACvB;KACF;CACF"} \ No newline at end of file diff --git a/node_modules/jest-circus/build/types.js b/node_modules/jest-circus/build/types.js deleted file mode 100644 index 74def721..00000000 --- a/node_modules/jest-circus/build/types.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.TEST_TIMEOUT_SYMBOL = exports.RETRY_TIMES = exports.STATE_SYM = void 0; - -var _expect = _interopRequireDefault(require('expect')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -const STATE_SYM = Symbol('JEST_STATE_SYMBOL'); -exports.STATE_SYM = STATE_SYM; -const RETRY_TIMES = Symbol.for('RETRY_TIMES'); // To pass this value from Runtime object to state we need to use global[sym] - -exports.RETRY_TIMES = RETRY_TIMES; -const TEST_TIMEOUT_SYMBOL = Symbol.for('TEST_TIMEOUT_SYMBOL'); -exports.TEST_TIMEOUT_SYMBOL = TEST_TIMEOUT_SYMBOL; diff --git a/node_modules/jest-circus/build/utils.d.ts b/node_modules/jest-circus/build/utils.d.ts deleted file mode 100644 index 30f9ccff..00000000 --- a/node_modules/jest-circus/build/utils.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Circus } from '@jest/types'; -export declare const makeDescribe: (name: string, parent?: Circus.DescribeBlock | undefined, mode?: void | "skip" | "only" | "todo" | undefined) => Circus.DescribeBlock; -export declare const makeTest: (fn: import("@jest/types/build/Global").TestFn | undefined, mode: Circus.BlockMode, name: string, parent: Circus.DescribeBlock, timeout: number | undefined, asyncError: any) => Circus.TestEntry; -export declare const getAllHooksForDescribe: (describe: Circus.DescribeBlock) => { - beforeAll: Circus.Hook[]; - afterAll: Circus.Hook[]; -}; -export declare const getEachHooksForTest: (test: Circus.TestEntry) => { - beforeEach: Circus.Hook[]; - afterEach: Circus.Hook[]; -}; -export declare const describeBlockHasTests: (describe: Circus.DescribeBlock) => boolean; -export declare const callAsyncCircusFn: (fn: Circus.AsyncFn, testContext: Record | undefined, { isHook, timeout }: { - isHook?: boolean | null | undefined; - timeout: number; -}) => Promise; -export declare const getTestDuration: (test: Circus.TestEntry) => number | null; -export declare const makeRunResult: (describeBlock: Circus.DescribeBlock, unhandledErrors: Error[]) => Circus.RunResult; -export declare const getTestID: (test: Circus.TestEntry) => string; -export declare const addErrorToEachTestUnderDescribe: (describeBlock: Circus.DescribeBlock, error: any, asyncError: any) => void; -export declare const invariant: (condition: unknown, message?: string | undefined) => void; -//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-circus/build/utils.d.ts.map b/node_modules/jest-circus/build/utils.d.ts.map deleted file mode 100644 index c9933c90..00000000 --- a/node_modules/jest-circus/build/utils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAUnC,eAAO,MAAM,YAAY,uIAmBxB,CAAC;AAEF,eAAO,MAAM,QAAQ,mMAmBnB,CAAC;AAkBH,eAAO,MAAM,sBAAsB;;;CAuBlC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;CAwB/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,6CAG0C,CAAC;AAe7E,eAAO,MAAM,iBAAiB;;;kBAsF7B,CAAC;AAEF,eAAO,MAAM,eAAe,2CAG3B,CAAC;AAEF,eAAO,MAAM,aAAa,qFAMxB,CAAC;AAuDH,eAAO,MAAM,SAAS,oCASrB,CAAC;AA8BF,eAAO,MAAM,+BAA+B,4EAY3C,CAAC;AAEF,eAAO,MAAM,SAAS,4DAIrB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-circus/build/utils.js b/node_modules/jest-circus/build/utils.js deleted file mode 100644 index d3b3e532..00000000 --- a/node_modules/jest-circus/build/utils.js +++ /dev/null @@ -1,519 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.invariant = exports.addErrorToEachTestUnderDescribe = exports.getTestID = exports.makeRunResult = exports.getTestDuration = exports.callAsyncCircusFn = exports.describeBlockHasTests = exports.getEachHooksForTest = exports.getAllHooksForDescribe = exports.makeTest = exports.makeDescribe = void 0; - -var _jestUtil = require('jest-util'); - -var _isGeneratorFn = _interopRequireDefault(require('is-generator-fn')); - -var _co = _interopRequireDefault(require('co')); - -var _stackUtils = _interopRequireDefault(require('stack-utils')); - -var _prettyFormat = _interopRequireDefault(require('pretty-format')); - -var _state = require('./state'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var jestNow = global[Symbol.for('jest-native-now')] || global.Date.now; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -const stackUtils = new _stackUtils.default({ - cwd: 'A path that does not exist' -}); - -const makeDescribe = (name, parent, mode) => { - let _mode = mode; - - if (parent && !mode) { - // If not set explicitly, inherit from the parent describe. - _mode = parent.mode; - } - - return { - children: [], - hooks: [], - mode: _mode, - name: (0, _jestUtil.convertDescriptorToString)(name), - parent, - tests: [] - }; -}; - -exports.makeDescribe = makeDescribe; - -const makeTest = (fn, mode, name, parent, timeout, asyncError) => ({ - asyncError, - duration: null, - errors: [], - fn, - invocations: 0, - mode, - name: (0, _jestUtil.convertDescriptorToString)(name), - parent, - startedAt: null, - status: null, - timeout -}); // Traverse the tree of describe blocks and return true if at least one describe -// block has an enabled test. - -exports.makeTest = makeTest; - -const hasEnabledTest = describeBlock => { - const _getState = (0, _state.getState)(), - hasFocusedTests = _getState.hasFocusedTests, - testNamePattern = _getState.testNamePattern; - - const hasOwnEnabledTests = describeBlock.tests.some( - test => - !( - test.mode === 'skip' || - (hasFocusedTests && test.mode !== 'only') || - (testNamePattern && !testNamePattern.test(getTestID(test))) - ) - ); - return hasOwnEnabledTests || describeBlock.children.some(hasEnabledTest); -}; - -const getAllHooksForDescribe = describe => { - const result = { - afterAll: [], - beforeAll: [] - }; - - if (hasEnabledTest(describe)) { - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = describe.hooks[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const hook = _step.value; - - switch (hook.type) { - case 'beforeAll': - result.beforeAll.push(hook); - break; - - case 'afterAll': - result.afterAll.push(hook); - break; - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - } - - return result; -}; - -exports.getAllHooksForDescribe = getAllHooksForDescribe; - -const getEachHooksForTest = test => { - const result = { - afterEach: [], - beforeEach: [] - }; - let block = test.parent; - - do { - const beforeEachForCurrentBlock = []; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for ( - var _iterator2 = block.hooks[Symbol.iterator](), _step2; - !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); - _iteratorNormalCompletion2 = true - ) { - const hook = _step2.value; - - switch (hook.type) { - case 'beforeEach': - beforeEachForCurrentBlock.push(hook); - break; - - case 'afterEach': - result.afterEach.push(hook); - break; - } - } // 'beforeEach' hooks are executed from top to bottom, the opposite of the - // way we traversed it. - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - result.beforeEach = [...beforeEachForCurrentBlock, ...result.beforeEach]; - } while ((block = block.parent)); - - return result; -}; - -exports.getEachHooksForTest = getEachHooksForTest; - -const describeBlockHasTests = describe => - describe.tests.length > 0 || describe.children.some(describeBlockHasTests); - -exports.describeBlockHasTests = describeBlockHasTests; - -const _makeTimeoutMessage = (timeout, isHook) => - `Exceeded timeout of ${timeout}ms for a ${ - isHook ? 'hook' : 'test' - }.\nUse jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test.`; // Global values can be overwritten by mocks or tests. We'll capture -// the original values in the variables before we require any files. - -const _global = global, - setTimeout = _global.setTimeout, - clearTimeout = _global.clearTimeout; - -function checkIsError(error) { - return !!(error && error.message && error.stack); -} - -const callAsyncCircusFn = (fn, testContext, {isHook, timeout}) => { - let timeoutID; - let completed = false; - return new Promise((resolve, reject) => { - timeoutID = setTimeout( - () => reject(_makeTimeoutMessage(timeout, !!isHook)), - timeout - ); // If this fn accepts `done` callback we return a promise that fulfills as - // soon as `done` called. - - if (fn.length) { - const done = reason => { - const errorAsErrorObject = checkIsError(reason) - ? reason - : new Error( - `Failed: ${(0, _prettyFormat.default)(reason, { - maxDepth: 3 - })}` - ); // Consider always throwing, regardless if `reason` is set or not - - if (completed && reason) { - errorAsErrorObject.message = - 'Caught error after test environment was torn down\n\n' + - errorAsErrorObject.message; - throw errorAsErrorObject; - } - - return reason ? reject(errorAsErrorObject) : resolve(); - }; - - return fn.call(testContext, done); - } - - let returnedValue; - - if ((0, _isGeneratorFn.default)(fn)) { - returnedValue = _co.default.wrap(fn).call({}); - } else { - try { - returnedValue = fn.call(testContext); - } catch (error) { - return reject(error); - } - } // If it's a Promise, return it. Test for an object with a `then` function - // to support custom Promise implementations. - - if ( - typeof returnedValue === 'object' && - returnedValue !== null && - typeof returnedValue.then === 'function' - ) { - return returnedValue.then(resolve, reject); - } - - if (!isHook && returnedValue !== void 0) { - return reject( - new Error(` - test functions can only return Promise or undefined. - Returned value: ${String(returnedValue)} - `) - ); - } // Otherwise this test is synchronous, and if it didn't throw it means - // it passed. - - return resolve(); - }) - .then(() => { - completed = true; // If timeout is not cleared/unrefed the node process won't exit until - // it's resolved. - - timeoutID.unref && timeoutID.unref(); - clearTimeout(timeoutID); - }) - .catch(error => { - completed = true; - timeoutID.unref && timeoutID.unref(); - clearTimeout(timeoutID); - throw error; - }); -}; - -exports.callAsyncCircusFn = callAsyncCircusFn; - -const getTestDuration = test => { - const startedAt = test.startedAt; - return typeof startedAt === 'number' ? jestNow() - startedAt : null; -}; - -exports.getTestDuration = getTestDuration; - -const makeRunResult = (describeBlock, unhandledErrors) => ({ - testResults: makeTestResults(describeBlock), - unhandledErrors: unhandledErrors.map(_formatError) -}); - -exports.makeRunResult = makeRunResult; - -const makeTestResults = describeBlock => { - const _getState2 = (0, _state.getState)(), - includeTestLocationInResult = _getState2.includeTestLocationInResult; - - let testResults = []; - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for ( - var _iterator3 = describeBlock.tests[Symbol.iterator](), _step3; - !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); - _iteratorNormalCompletion3 = true - ) { - const test = _step3.value; - const testPath = []; - let parent = test; - - do { - testPath.unshift(parent.name); - } while ((parent = parent.parent)); - - const status = test.status; - - if (!status) { - throw new Error('Status should be present after tests are run.'); - } - - let location = null; - - if (includeTestLocationInResult) { - const stackLine = test.asyncError.stack.split('\n')[1]; - const parsedLine = stackUtils.parseLine(stackLine); - - if ( - parsedLine && - typeof parsedLine.column === 'number' && - typeof parsedLine.line === 'number' - ) { - location = { - column: parsedLine.column, - line: parsedLine.line - }; - } - } - - testResults.push({ - duration: test.duration, - errors: test.errors.map(_formatError), - invocations: test.invocations, - location, - status, - testPath - }); - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return != null) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - - var _iteratorNormalCompletion4 = true; - var _didIteratorError4 = false; - var _iteratorError4 = undefined; - - try { - for ( - var _iterator4 = describeBlock.children[Symbol.iterator](), _step4; - !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); - _iteratorNormalCompletion4 = true - ) { - const child = _step4.value; - testResults = testResults.concat(makeTestResults(child)); - } - } catch (err) { - _didIteratorError4 = true; - _iteratorError4 = err; - } finally { - try { - if (!_iteratorNormalCompletion4 && _iterator4.return != null) { - _iterator4.return(); - } - } finally { - if (_didIteratorError4) { - throw _iteratorError4; - } - } - } - - return testResults; -}; // Return a string that identifies the test (concat of parent describe block -// names + test title) - -const getTestID = test => { - const titles = []; - let parent = test; - - do { - titles.unshift(parent.name); - } while ((parent = parent.parent)); - - titles.shift(); // remove TOP_DESCRIBE_BLOCK_NAME - - return titles.join(' '); -}; - -exports.getTestID = getTestID; - -const _formatError = errors => { - let error; - let asyncError; - - if (Array.isArray(errors)) { - error = errors[0]; - asyncError = errors[1]; - } else { - error = errors; - asyncError = new Error(); - } - - if (error) { - if (error.stack) { - return error.stack; - } - - if (error.message) { - return error.message; - } - } - - asyncError.message = `thrown: ${(0, _prettyFormat.default)(error, { - maxDepth: 3 - })}`; - return asyncError.stack; -}; - -const addErrorToEachTestUnderDescribe = (describeBlock, error, asyncError) => { - var _iteratorNormalCompletion5 = true; - var _didIteratorError5 = false; - var _iteratorError5 = undefined; - - try { - for ( - var _iterator5 = describeBlock.tests[Symbol.iterator](), _step5; - !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); - _iteratorNormalCompletion5 = true - ) { - const test = _step5.value; - test.errors.push([error, asyncError]); - } - } catch (err) { - _didIteratorError5 = true; - _iteratorError5 = err; - } finally { - try { - if (!_iteratorNormalCompletion5 && _iterator5.return != null) { - _iterator5.return(); - } - } finally { - if (_didIteratorError5) { - throw _iteratorError5; - } - } - } - - var _iteratorNormalCompletion6 = true; - var _didIteratorError6 = false; - var _iteratorError6 = undefined; - - try { - for ( - var _iterator6 = describeBlock.children[Symbol.iterator](), _step6; - !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); - _iteratorNormalCompletion6 = true - ) { - const child = _step6.value; - addErrorToEachTestUnderDescribe(child, error, asyncError); - } - } catch (err) { - _didIteratorError6 = true; - _iteratorError6 = err; - } finally { - try { - if (!_iteratorNormalCompletion6 && _iterator6.return != null) { - _iterator6.return(); - } - } finally { - if (_didIteratorError6) { - throw _iteratorError6; - } - } - } -}; - -exports.addErrorToEachTestUnderDescribe = addErrorToEachTestUnderDescribe; - -const invariant = (condition, message) => { - if (!condition) { - throw new Error(message); - } -}; - -exports.invariant = invariant; diff --git a/node_modules/jest-circus/package.json b/node_modules/jest-circus/package.json deleted file mode 100644 index dd5daebc..00000000 --- a/node_modules/jest-circus/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "_args": [ - [ - "jest-circus@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-circus@24.9.0", - "_id": "jest-circus@24.9.0", - "_inBundle": false, - "_integrity": "sha512-dwkvwFtRc9Anmk1XTc+bonVL8rVMZ3CeGMoFWmv1oaQThdAgvfI9bwaFlZp+gLVphNVz6ZLfCWo3ERhS5CeVvA==", - "_location": "/jest-circus", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-circus@24.9.0", - "name": "jest-circus", - "escapedName": "jest-circus", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "#DEV:/" - ], - "_resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@babel/traverse": "^7.1.0", - "@jest/environment": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "chalk": "^2.0.1", - "co": "^4.6.0", - "expect": "^24.9.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^24.9.0", - "jest-matcher-utils": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-snapshot": "^24.9.0", - "jest-util": "^24.9.0", - "pretty-format": "^24.9.0", - "stack-utils": "^1.0.1", - "throat": "^4.0.0" - }, - "description": "

jest-circus

The next-gen test runner for Jest

", - "devDependencies": { - "@jest/test-utils": "^24.4.0", - "@types/babel__traverse": "^7.0.4", - "@types/co": "^4.6.0", - "@types/stack-utils": "^1.0.1", - "execa": "^1.0.0", - "jest-runtime": "^24.9.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-circus", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-circus" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-circus/runner.js b/node_modules/jest-circus/runner.js deleted file mode 100644 index cb1360da..00000000 --- a/node_modules/jest-circus/runner.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -// Allow people to use `jest-circus/runner` as a runner. -const runner = require('./build/legacy-code-todo-rewrite/jestAdapter'); -module.exports = runner; diff --git a/node_modules/jest-config/build/Defaults.d.ts b/node_modules/jest-config/build/Defaults.d.ts deleted file mode 100644 index 58cf331f..00000000 --- a/node_modules/jest-config/build/Defaults.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -declare const defaultOptions: Config.DefaultOptions; -export default defaultOptions; -//# sourceMappingURL=Defaults.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-config/build/Defaults.d.ts.map b/node_modules/jest-config/build/Defaults.d.ts.map deleted file mode 100644 index 824b2509..00000000 --- a/node_modules/jest-config/build/Defaults.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Defaults.d.ts","sourceRoot":"","sources":["../src/Defaults.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAOnC,QAAA,MAAM,cAAc,EAAE,MAAM,CAAC,cAsE5B,CAAC;AAEF,eAAe,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-config/build/Defaults.js b/node_modules/jest-config/build/Defaults.js deleted file mode 100644 index 46e5f766..00000000 --- a/node_modules/jest-config/build/Defaults.js +++ /dev/null @@ -1,107 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestRegexUtil() { - const data = require('jest-regex-util'); - - _jestRegexUtil = function _jestRegexUtil() { - return data; - }; - - return data; -} - -var _constants = require('./constants'); - -var _getCacheDirectory = _interopRequireDefault(require('./getCacheDirectory')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const NODE_MODULES_REGEXP = (0, _jestRegexUtil().replacePathSepForRegex)( - _constants.NODE_MODULES -); -const defaultOptions = { - automock: false, - bail: 0, - browser: false, - cache: true, - cacheDirectory: (0, _getCacheDirectory.default)(), - changedFilesWithAncestor: false, - clearMocks: false, - collectCoverage: false, - collectCoverageFrom: null, - coverageDirectory: null, - coveragePathIgnorePatterns: [NODE_MODULES_REGEXP], - coverageReporters: ['json', 'text', 'lcov', 'clover'], - coverageThreshold: null, - dependencyExtractor: null, - errorOnDeprecated: false, - expand: false, - filter: null, - forceCoverageMatch: [], - globalSetup: null, - globalTeardown: null, - globals: {}, - haste: { - computeSha1: false, - providesModuleNodeModules: [], - throwOnModuleCollision: false - }, - maxConcurrency: 5, - maxWorkers: '50%', - moduleDirectories: ['node_modules'], - moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node'], - moduleNameMapper: {}, - modulePathIgnorePatterns: [], - noStackTrace: false, - notify: false, - notifyMode: 'failure-change', - preset: null, - prettierPath: 'prettier', - projects: null, - resetMocks: false, - resetModules: false, - resolver: null, - restoreMocks: false, - rootDir: null, - roots: [''], - runTestsByPath: false, - runner: 'jest-runner', - setupFiles: [], - setupFilesAfterEnv: [], - skipFilter: false, - snapshotSerializers: [], - testEnvironment: 'jest-environment-jsdom', - testEnvironmentOptions: {}, - testFailureExitCode: 1, - testLocationInResults: false, - testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)'], - testPathIgnorePatterns: [NODE_MODULES_REGEXP], - testRegex: [], - testResultsProcessor: null, - testRunner: 'jasmine2', - testSequencer: '@jest/test-sequencer', - testURL: 'http://localhost', - timers: 'real', - transform: null, - transformIgnorePatterns: [NODE_MODULES_REGEXP], - useStderr: false, - verbose: null, - watch: false, - watchPathIgnorePatterns: [], - watchman: true -}; -var _default = defaultOptions; -exports.default = _default; diff --git a/node_modules/jest-config/build/Deprecated.d.ts b/node_modules/jest-config/build/Deprecated.d.ts deleted file mode 100644 index 37d97d3b..00000000 --- a/node_modules/jest-config/build/Deprecated.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare const _default: Record; -export default _default; -//# sourceMappingURL=Deprecated.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-config/build/Deprecated.d.ts.map b/node_modules/jest-config/build/Deprecated.d.ts.map deleted file mode 100644 index bd1ed207..00000000 --- a/node_modules/jest-config/build/Deprecated.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Deprecated.d.ts","sourceRoot":"","sources":["../src/Deprecated.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAOH,wBAgE8B"} \ No newline at end of file diff --git a/node_modules/jest-config/build/Deprecated.js b/node_modules/jest-config/build/Deprecated.js deleted file mode 100644 index d582923c..00000000 --- a/node_modules/jest-config/build/Deprecated.js +++ /dev/null @@ -1,146 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _prettyFormat() { - const data = _interopRequireDefault(require('pretty-format')); - - _prettyFormat = function _prettyFormat() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const format = value => - (0, _prettyFormat().default)(value, { - min: true - }); - -var _default = { - mapCoverage: () => ` Option ${_chalk().default.bold( - '"mapCoverage"' - )} has been removed, as it's no longer necessary. - - Please update your configuration.`, - preprocessorIgnorePatterns: (function(_preprocessorIgnorePatterns) { - function preprocessorIgnorePatterns(_x) { - return _preprocessorIgnorePatterns.apply(this, arguments); - } - - preprocessorIgnorePatterns.toString = function() { - return _preprocessorIgnorePatterns.toString(); - }; - - return preprocessorIgnorePatterns; - })( - options => ` Option ${_chalk().default.bold( - '"preprocessorIgnorePatterns"' - )} was replaced by ${_chalk().default.bold( - '"transformIgnorePatterns"' - )}, which support multiple preprocessors. - - Jest now treats your current configuration as: - { - ${_chalk().default.bold( - '"transformIgnorePatterns"' - )}: ${_chalk().default.bold(format(options.preprocessorIgnorePatterns))} - } - - Please update your configuration.` - ), - scriptPreprocessor: (function(_scriptPreprocessor) { - function scriptPreprocessor(_x2) { - return _scriptPreprocessor.apply(this, arguments); - } - - scriptPreprocessor.toString = function() { - return _scriptPreprocessor.toString(); - }; - - return scriptPreprocessor; - })( - options => ` Option ${_chalk().default.bold( - '"scriptPreprocessor"' - )} was replaced by ${_chalk().default.bold( - '"transform"' - )}, which support multiple preprocessors. - - Jest now treats your current configuration as: - { - ${_chalk().default.bold('"transform"')}: ${_chalk().default.bold( - `{".*": ${format(options.scriptPreprocessor)}}` - )} - } - - Please update your configuration.` - ), - setupTestFrameworkScriptFile: (function(_setupTestFrameworkScriptFile) { - function setupTestFrameworkScriptFile(_x3) { - return _setupTestFrameworkScriptFile.apply(this, arguments); - } - - setupTestFrameworkScriptFile.toString = function() { - return _setupTestFrameworkScriptFile.toString(); - }; - - return setupTestFrameworkScriptFile; - })( - _options => ` Option ${_chalk().default.bold( - '"setupTestFrameworkScriptFile"' - )} was replaced by configuration ${_chalk().default.bold( - '"setupFilesAfterEnv"' - )}, which supports multiple paths. - - Please update your configuration.` - ), - testPathDirs: (function(_testPathDirs) { - function testPathDirs(_x4) { - return _testPathDirs.apply(this, arguments); - } - - testPathDirs.toString = function() { - return _testPathDirs.toString(); - }; - - return testPathDirs; - })( - options => ` Option ${_chalk().default.bold( - '"testPathDirs"' - )} was replaced by ${_chalk().default.bold('"roots"')}. - - Jest now treats your current configuration as: - { - ${_chalk().default.bold('"roots"')}: ${_chalk().default.bold( - format(options.testPathDirs) - )} - } - - Please update your configuration. - ` - ) -}; -exports.default = _default; diff --git a/node_modules/jest-config/build/Descriptions.d.ts b/node_modules/jest-config/build/Descriptions.d.ts deleted file mode 100644 index 57d73fae..00000000 --- a/node_modules/jest-config/build/Descriptions.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -declare const descriptions: { - [key in keyof Config.InitialOptions]: string; -}; -export default descriptions; -//# sourceMappingURL=Descriptions.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-config/build/Descriptions.d.ts.map b/node_modules/jest-config/build/Descriptions.d.ts.map deleted file mode 100644 index 959825fa..00000000 --- a/node_modules/jest-config/build/Descriptions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Descriptions.d.ts","sourceRoot":"","sources":["../src/Descriptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,QAAA,MAAM,YAAY,EAAE;KAAE,GAAG,IAAI,MAAM,MAAM,CAAC,cAAc,GAAG,MAAM;CAsFhE,CAAC;AAEF,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-config/build/Descriptions.js b/node_modules/jest-config/build/Descriptions.js deleted file mode 100644 index b24cfe8a..00000000 --- a/node_modules/jest-config/build/Descriptions.js +++ /dev/null @@ -1,102 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const descriptions = { - automock: 'All imported modules in your tests should be mocked automatically', - bail: 'Stop running tests after `n` failures', - browser: 'Respect "browser" field in package.json when resolving modules', - cacheDirectory: - 'The directory where Jest should store its cached dependency information', - clearMocks: 'Automatically clear mock calls and instances between every test', - collectCoverage: - 'Indicates whether the coverage information should be collected while executing the test', - collectCoverageFrom: - 'An array of glob patterns indicating a set of files for which coverage information should be collected', - coverageDirectory: - 'The directory where Jest should output its coverage files', - coveragePathIgnorePatterns: - 'An array of regexp pattern strings used to skip coverage collection', - coverageReporters: - 'A list of reporter names that Jest uses when writing coverage reports', - coverageThreshold: - 'An object that configures minimum threshold enforcement for coverage results', - dependencyExtractor: 'A path to a custom dependency extractor', - errorOnDeprecated: - 'Make calling deprecated APIs throw helpful error messages', - forceCoverageMatch: - 'Force coverage collection from ignored files using an array of glob patterns', - globalSetup: - 'A path to a module which exports an async function that is triggered once before all test suites', - globalTeardown: - 'A path to a module which exports an async function that is triggered once after all test suites', - globals: - 'A set of global variables that need to be available in all test environments', - maxWorkers: - 'The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.', - moduleDirectories: - "An array of directory names to be searched recursively up from the requiring module's location", - moduleFileExtensions: 'An array of file extensions your modules use', - moduleNameMapper: - 'A map from regular expressions to module names that allow to stub out resources with a single module', - modulePathIgnorePatterns: - "An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader", - notify: 'Activates notifications for test results', - notifyMode: - 'An enum that specifies notification mode. Requires { notify: true }', - preset: "A preset that is used as a base for Jest's configuration", - projects: 'Run tests from one or more projects', - reporters: 'Use this configuration option to add custom reporters to Jest', - resetMocks: 'Automatically reset mock state between every test', - resetModules: 'Reset the module registry before running each individual test', - resolver: 'A path to a custom resolver', - restoreMocks: 'Automatically restore mock state between every test', - rootDir: - 'The root directory that Jest should scan for tests and modules within', - roots: - 'A list of paths to directories that Jest should use to search for files in', - runner: - "Allows you to use a custom runner instead of Jest's default test runner", - setupFiles: - 'The paths to modules that run some code to configure or set up the testing environment before each test', - setupFilesAfterEnv: - 'A list of paths to modules that run some code to configure or set up the testing framework before each test', - snapshotSerializers: - 'A list of paths to snapshot serializer modules Jest should use for snapshot testing', - testEnvironment: 'The test environment that will be used for testing', - testEnvironmentOptions: 'Options that will be passed to the testEnvironment', - testLocationInResults: 'Adds a location field to test results', - testMatch: 'The glob patterns Jest uses to detect test files', - testPathIgnorePatterns: - 'An array of regexp pattern strings that are matched against all test paths, matched tests are skipped', - testRegex: - 'The regexp pattern or array of patterns that Jest uses to detect test files', - testResultsProcessor: - 'This option allows the use of a custom results processor', - testRunner: 'This option allows use of a custom test runner', - testURL: - 'This option sets the URL for the jsdom environment. It is reflected in properties such as location.href', - timers: - 'Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"', - transform: 'A map from regular expressions to paths to transformers', - transformIgnorePatterns: - 'An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation', - unmockedModulePathPatterns: - 'An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them', - verbose: - 'Indicates whether each individual test should be reported during the run', - watchPathIgnorePatterns: - 'An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode', - watchman: 'Whether to use watchman for file crawling' -}; -var _default = descriptions; -exports.default = _default; diff --git a/node_modules/jest-config/build/ReporterValidationErrors.d.ts b/node_modules/jest-config/build/ReporterValidationErrors.d.ts deleted file mode 100644 index 943473e6..00000000 --- a/node_modules/jest-config/build/ReporterValidationErrors.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -/** - * Reporter Validation Error is thrown if the given arguments - * within the reporter are not valid. - * - * This is a highly specific reporter error and in the future will be - * merged with jest-validate. Till then, we can make use of it. It works - * and that's what counts most at this time. - */ -export declare function createReporterError(reporterIndex: number, reporterValue: Array | string): import("jest-validate/build/utils").ValidationError; -export declare function createArrayReporterError(arrayReporter: Config.ReporterConfig, reporterIndex: number, valueIndex: number, value: string | Record, expectedType: string, valueName: string): import("jest-validate/build/utils").ValidationError; -export declare function validateReporters(reporterConfig: Array): boolean; -//# sourceMappingURL=ReporterValidationErrors.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-config/build/ReporterValidationErrors.d.ts.map b/node_modules/jest-config/build/ReporterValidationErrors.d.ts.map deleted file mode 100644 index 1b74e982..00000000 --- a/node_modules/jest-config/build/ReporterValidationErrors.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ReporterValidationErrors.d.ts","sourceRoot":"","sources":["../src/ReporterValidationErrors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AASnC;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,MAAM,uDASrD;AAED,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,MAAM,CAAC,cAAc,EACpC,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACnC,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,uDAiBlB;AAED,wBAAgB,iBAAiB,CAC/B,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,GACpD,OAAO,CAUT"} \ No newline at end of file diff --git a/node_modules/jest-config/build/ReporterValidationErrors.js b/node_modules/jest-config/build/ReporterValidationErrors.js deleted file mode 100644 index 2d2aaa56..00000000 --- a/node_modules/jest-config/build/ReporterValidationErrors.js +++ /dev/null @@ -1,177 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.createReporterError = createReporterError; -exports.createArrayReporterError = createArrayReporterError; -exports.validateReporters = validateReporters; - -function _jestValidate() { - const data = require('jest-validate'); - - _jestValidate = function _jestValidate() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _jestGetType() { - const data = _interopRequireDefault(require('jest-get-type')); - - _jestGetType = function _jestGetType() { - return data; - }; - - return data; -} - -var _utils = require('./utils'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest() - ); -} - -function _nonIterableRest() { - throw new TypeError('Invalid attempt to destructure non-iterable instance'); -} - -function _iterableToArrayLimit(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - try { - for ( - var _i = arr[Symbol.iterator](), _s; - !(_n = (_s = _i.next()).done); - _n = true - ) { - _arr.push(_s.value); - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i['return'] != null) _i['return'](); - } finally { - if (_d) throw _e; - } - } - return _arr; -} - -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} - -const validReporterTypes = ['array', 'string']; -const ERROR = `${_utils.BULLET}Reporter Validation Error`; -/** - * Reporter Validation Error is thrown if the given arguments - * within the reporter are not valid. - * - * This is a highly specific reporter error and in the future will be - * merged with jest-validate. Till then, we can make use of it. It works - * and that's what counts most at this time. - */ - -function createReporterError(reporterIndex, reporterValue) { - const errorMessage = - ` Reporter at index ${reporterIndex} must be of type:\n` + - ` ${_chalk().default.bold.green(validReporterTypes.join(' or '))}\n` + - ` but instead received:\n` + - ` ${_chalk().default.bold.red( - (0, _jestGetType().default)(reporterValue) - )}`; - return new (_jestValidate()).ValidationError( - ERROR, - errorMessage, - _utils.DOCUMENTATION_NOTE - ); -} - -function createArrayReporterError( - arrayReporter, - reporterIndex, - valueIndex, - value, - expectedType, - valueName -) { - const errorMessage = - ` Unexpected value for ${valueName} ` + - `at index ${valueIndex} of reporter at index ${reporterIndex}\n` + - ' Expected:\n' + - ` ${_chalk().default.bold.red(expectedType)}\n` + - ' Got:\n' + - ` ${_chalk().default.bold.green((0, _jestGetType().default)(value))}\n` + - ` Reporter configuration:\n` + - ` ${_chalk().default.bold.green( - JSON.stringify(arrayReporter, null, 2) - .split('\n') - .join('\n ') - )}`; - return new (_jestValidate()).ValidationError( - ERROR, - errorMessage, - _utils.DOCUMENTATION_NOTE - ); -} - -function validateReporters(reporterConfig) { - return reporterConfig.every((reporter, index) => { - if (Array.isArray(reporter)) { - validateArrayReporter(reporter, index); - } else if (typeof reporter !== 'string') { - throw createReporterError(index, reporter); - } - - return true; - }); -} - -function validateArrayReporter(arrayReporter, reporterIndex) { - const _arrayReporter = _slicedToArray(arrayReporter, 2), - path = _arrayReporter[0], - options = _arrayReporter[1]; - - if (typeof path !== 'string') { - throw createArrayReporterError( - arrayReporter, - reporterIndex, - 0, - path, - 'string', - 'Path' - ); - } else if (typeof options !== 'object') { - throw createArrayReporterError( - arrayReporter, - reporterIndex, - 1, - options, - 'object', - 'Reporter Configuration' - ); - } -} diff --git a/node_modules/jest-config/build/ValidConfig.d.ts b/node_modules/jest-config/build/ValidConfig.d.ts deleted file mode 100644 index e793575c..00000000 --- a/node_modules/jest-config/build/ValidConfig.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -declare const initialOptions: Config.InitialOptions; -export default initialOptions; -//# sourceMappingURL=ValidConfig.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-config/build/ValidConfig.d.ts.map b/node_modules/jest-config/build/ValidConfig.d.ts.map deleted file mode 100644 index c60c8f98..00000000 --- a/node_modules/jest-config/build/ValidConfig.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ValidConfig.d.ts","sourceRoot":"","sources":["../src/ValidConfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAOnC,QAAA,MAAM,cAAc,EAAE,MAAM,CAAC,cA8H5B,CAAC;AAEF,eAAe,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-config/build/ValidConfig.js b/node_modules/jest-config/build/ValidConfig.js deleted file mode 100644 index c9d83051..00000000 --- a/node_modules/jest-config/build/ValidConfig.js +++ /dev/null @@ -1,176 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestRegexUtil() { - const data = require('jest-regex-util'); - - _jestRegexUtil = function _jestRegexUtil() { - return data; - }; - - return data; -} - -function _jestValidate() { - const data = require('jest-validate'); - - _jestValidate = function _jestValidate() { - return data; - }; - - return data; -} - -var _constants = require('./constants'); - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const NODE_MODULES_REGEXP = (0, _jestRegexUtil().replacePathSepForRegex)( - _constants.NODE_MODULES -); -const initialOptions = { - automock: false, - bail: (0, _jestValidate().multipleValidOptions)(false, 0), - browser: false, - cache: true, - cacheDirectory: '/tmp/user/jest', - changedFilesWithAncestor: false, - changedSince: 'master', - clearMocks: false, - collectCoverage: true, - collectCoverageFrom: ['src', '!public'], - collectCoverageOnlyFrom: { - '/this-directory-is-covered/Covered.js': true - }, - coverageDirectory: 'coverage', - coveragePathIgnorePatterns: [NODE_MODULES_REGEXP], - coverageReporters: ['json', 'text', 'lcov', 'clover'], - coverageThreshold: { - global: { - branches: 50, - functions: 100, - lines: 100, - statements: 100 - } - }, - dependencyExtractor: '/dependencyExtractor.js', - displayName: (0, _jestValidate().multipleValidOptions)('test-config', { - color: 'blue', - name: 'test-config' - }), - errorOnDeprecated: false, - expand: false, - extraGlobals: [], - filter: '/filter.js', - forceCoverageMatch: ['**/*.t.js'], - forceExit: false, - globalSetup: 'setup.js', - globalTeardown: 'teardown.js', - globals: { - __DEV__: true - }, - haste: { - computeSha1: true, - defaultPlatform: 'ios', - hasteImplModulePath: '/haste_impl.js', - platforms: ['ios', 'android'], - providesModuleNodeModules: ['react', 'react-native'], - throwOnModuleCollision: false - }, - json: false, - lastCommit: false, - logHeapUsage: true, - maxConcurrency: 5, - maxWorkers: '50%', - moduleDirectories: ['node_modules'], - moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node'], - moduleLoader: '', - moduleNameMapper: { - '^React$': '/node_modules/react' - }, - modulePathIgnorePatterns: ['/build/'], - modulePaths: ['/shared/vendor/modules'], - name: 'string', - noStackTrace: false, - notify: false, - notifyMode: 'failure-change', - onlyChanged: false, - preset: 'react-native', - prettierPath: '/node_modules/prettier', - projects: ['project-a', 'project-b/'], - reporters: [ - 'default', - 'custom-reporter-1', - [ - 'custom-reporter-2', - { - configValue: true - } - ] - ], - resetMocks: false, - resetModules: false, - resolver: '/resolver.js', - restoreMocks: false, - rootDir: '/', - roots: [''], - runTestsByPath: false, - runner: 'jest-runner', - setupFiles: ['/setup.js'], - setupFilesAfterEnv: ['/testSetupFile.js'], - silent: true, - skipFilter: false, - skipNodeResolution: false, - snapshotResolver: '/snapshotResolver.js', - snapshotSerializers: ['my-serializer-module'], - testEnvironment: 'jest-environment-jsdom', - testEnvironmentOptions: { - userAgent: 'Agent/007' - }, - testFailureExitCode: 1, - testLocationInResults: false, - testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'], - testNamePattern: 'test signature', - testPathIgnorePatterns: [NODE_MODULES_REGEXP], - testRegex: (0, _jestValidate().multipleValidOptions)( - '(/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$', - ['/__tests__/\\.test\\.[jt]sx?$', '/__tests__/\\.spec\\.[jt]sx?$'] - ), - testResultsProcessor: 'processor-node-module', - testRunner: 'jasmine2', - testSequencer: '@jest/test-sequencer', - testTimeout: 5000, - testURL: 'http://localhost', - timers: 'real', - transform: { - '^.+\\.js$': '/preprocessor.js' - }, - transformIgnorePatterns: [NODE_MODULES_REGEXP], - unmockedModulePathPatterns: ['mock'], - updateSnapshot: true, - useStderr: false, - verbose: false, - watch: false, - watchPathIgnorePatterns: ['/e2e/'], - watchPlugins: [ - 'path/to/yourWatchPlugin', - [ - 'jest-watch-typeahead/filename', - { - key: 'k', - prompt: 'do something with my custom prompt' - } - ] - ], - watchman: true -}; -var _default = initialOptions; -exports.default = _default; diff --git a/node_modules/jest-config/build/constants.d.ts b/node_modules/jest-config/build/constants.d.ts deleted file mode 100644 index b762afdc..00000000 --- a/node_modules/jest-config/build/constants.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare const NODE_MODULES: string; -export declare const DEFAULT_JS_PATTERN = "^.+\\.[jt]sx?$"; -export declare const DEFAULT_REPORTER_LABEL = "default"; -export declare const PACKAGE_JSON = "package.json"; -export declare const JEST_CONFIG = "jest.config.js"; -//# sourceMappingURL=constants.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-config/build/constants.d.ts.map b/node_modules/jest-config/build/constants.d.ts.map deleted file mode 100644 index 6f45e59a..00000000 --- a/node_modules/jest-config/build/constants.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,eAAO,MAAM,YAAY,QAAuC,CAAC;AACjE,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AACnD,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAChD,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,WAAW,mBAAmB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-config/build/constants.js b/node_modules/jest-config/build/constants.js deleted file mode 100644 index 0670a105..00000000 --- a/node_modules/jest-config/build/constants.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.JEST_CONFIG = exports.PACKAGE_JSON = exports.DEFAULT_REPORTER_LABEL = exports.DEFAULT_JS_PATTERN = exports.NODE_MODULES = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const NODE_MODULES = _path().default.sep + 'node_modules' + _path().default.sep; - -exports.NODE_MODULES = NODE_MODULES; -const DEFAULT_JS_PATTERN = '^.+\\.[jt]sx?$'; -exports.DEFAULT_JS_PATTERN = DEFAULT_JS_PATTERN; -const DEFAULT_REPORTER_LABEL = 'default'; -exports.DEFAULT_REPORTER_LABEL = DEFAULT_REPORTER_LABEL; -const PACKAGE_JSON = 'package.json'; -exports.PACKAGE_JSON = PACKAGE_JSON; -const JEST_CONFIG = 'jest.config.js'; -exports.JEST_CONFIG = JEST_CONFIG; diff --git a/node_modules/jest-config/build/getCacheDirectory.d.ts b/node_modules/jest-config/build/getCacheDirectory.d.ts deleted file mode 100644 index bd7f7222..00000000 --- a/node_modules/jest-config/build/getCacheDirectory.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare const getCacheDirectory: () => string; -export default getCacheDirectory; -//# sourceMappingURL=getCacheDirectory.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-config/build/getCacheDirectory.d.ts.map b/node_modules/jest-config/build/getCacheDirectory.d.ts.map deleted file mode 100644 index 3efd3f1e..00000000 --- a/node_modules/jest-config/build/getCacheDirectory.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getCacheDirectory.d.ts","sourceRoot":"","sources":["../src/getCacheDirectory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,QAAA,MAAM,iBAAiB,cAWtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-config/build/getCacheDirectory.js b/node_modules/jest-config/build/getCacheDirectory.js deleted file mode 100644 index 7e64ba60..00000000 --- a/node_modules/jest-config/build/getCacheDirectory.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _os() { - const data = _interopRequireDefault(require('os')); - - _os = function _os() { - return data; - }; - - return data; -} - -function _realpathNative() { - const data = require('realpath-native'); - - _realpathNative = function _realpathNative() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const getCacheDirectory = () => { - const _process = process, - getuid = _process.getuid; - - const tmpdir = _path().default.join( - (0, _realpathNative().sync)(_os().default.tmpdir()), - 'jest' - ); - - if (getuid == null) { - return tmpdir; - } else { - // On some platforms tmpdir() is `/tmp`, causing conflicts between different - // users and permission issues. Adding an additional subdivision by UID can - // help. - return `${tmpdir}_${getuid.call(process).toString(36)}`; - } -}; - -var _default = getCacheDirectory; -exports.default = _default; diff --git a/node_modules/jest-config/build/getMaxWorkers.d.ts b/node_modules/jest-config/build/getMaxWorkers.d.ts deleted file mode 100644 index f176876d..00000000 --- a/node_modules/jest-config/build/getMaxWorkers.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export default function getMaxWorkers(argv: Partial>, defaultOptions?: Partial>): number; -//# sourceMappingURL=getMaxWorkers.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-config/build/getMaxWorkers.d.ts.map b/node_modules/jest-config/build/getMaxWorkers.d.ts.map deleted file mode 100644 index af1a7bf7..00000000 --- a/node_modules/jest-config/build/getMaxWorkers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getMaxWorkers.d.ts","sourceRoot":"","sources":["../src/getMaxWorkers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,WAAW,GAAG,OAAO,CAAC,CAAC,EACtE,cAAc,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,GACxD,MAAM,CAYR"} \ No newline at end of file diff --git a/node_modules/jest-config/build/getMaxWorkers.js b/node_modules/jest-config/build/getMaxWorkers.js deleted file mode 100644 index aeb1dbcd..00000000 --- a/node_modules/jest-config/build/getMaxWorkers.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = getMaxWorkers; - -function _os() { - const data = _interopRequireDefault(require('os')); - - _os = function _os() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function getMaxWorkers(argv, defaultOptions) { - if (argv.runInBand) { - return 1; - } else if (argv.maxWorkers) { - return parseWorkers(argv.maxWorkers); - } else if (defaultOptions && defaultOptions.maxWorkers) { - return parseWorkers(defaultOptions.maxWorkers); - } else { - // In watch mode, Jest should be unobtrusive and not use all available CPUs. - const cpus = _os().default.cpus() ? _os().default.cpus().length : 1; - return Math.max(argv.watch ? Math.floor(cpus / 2) : cpus - 1, 1); - } -} - -const parseWorkers = maxWorkers => { - const parsed = parseInt(maxWorkers.toString(), 10); - - if ( - typeof maxWorkers === 'string' && - maxWorkers.trim().endsWith('%') && - parsed > 0 && - parsed <= 100 - ) { - const cpus = _os().default.cpus().length; - - const workers = Math.floor((parsed / 100) * cpus); - return workers >= 1 ? workers : 1; - } - - return parsed > 0 ? parsed : 1; -}; diff --git a/node_modules/jest-config/build/index.d.ts b/node_modules/jest-config/build/index.d.ts deleted file mode 100644 index 044c901f..00000000 --- a/node_modules/jest-config/build/index.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export { getTestEnvironment, isJSONString } from './utils'; -export { default as normalize } from './normalize'; -export { default as deprecationEntries } from './Deprecated'; -export { replaceRootDirInPath } from './utils'; -export { default as defaults } from './Defaults'; -export { default as descriptions } from './Descriptions'; -declare type ReadConfig = { - configPath: Config.Path | null | undefined; - globalConfig: Config.GlobalConfig; - hasDeprecationWarnings: boolean; - projectConfig: Config.ProjectConfig; -}; -export declare function readConfig(argv: Config.Argv, packageRootOrConfig: Config.Path | Config.InitialOptions, skipArgvConfigOption?: boolean, parentConfigPath?: Config.Path | null, projectIndex?: number): ReadConfig; -export declare function readConfigs(argv: Config.Argv, projectPaths: Array): { - globalConfig: Config.GlobalConfig; - configs: Array; - hasDeprecationWarnings: boolean; -}; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-config/build/index.d.ts.map b/node_modules/jest-config/build/index.d.ts.map deleted file mode 100644 index 31768077..00000000 --- a/node_modules/jest-config/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAMnC,OAAO,EAAC,kBAAkB,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;AACzD,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAC,oBAAoB,EAAC,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAEvD,aAAK,UAAU,GAAG;IAChB,UAAU,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC;IAClC,sBAAsB,EAAE,OAAO,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC;CACrC,CAAC;AAEF,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,mBAAmB,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,cAAc,EAKxD,oBAAoB,CAAC,EAAE,OAAO,EAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,EACrC,YAAY,GAAE,MAAiB,GAC9B,UAAU,CAwDZ;AAuKD,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAC/B;IACD,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC;IAClC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IACrC,sBAAsB,EAAE,OAAO,CAAC;CACjC,CAwEA"} \ No newline at end of file diff --git a/node_modules/jest-config/build/index.js b/node_modules/jest-config/build/index.js deleted file mode 100644 index e0b6c59c..00000000 --- a/node_modules/jest-config/build/index.js +++ /dev/null @@ -1,440 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.readConfig = readConfig; -exports.readConfigs = readConfigs; -Object.defineProperty(exports, 'getTestEnvironment', { - enumerable: true, - get: function get() { - return _utils.getTestEnvironment; - } -}); -Object.defineProperty(exports, 'isJSONString', { - enumerable: true, - get: function get() { - return _utils.isJSONString; - } -}); -Object.defineProperty(exports, 'replaceRootDirInPath', { - enumerable: true, - get: function get() { - return _utils.replaceRootDirInPath; - } -}); -Object.defineProperty(exports, 'normalize', { - enumerable: true, - get: function get() { - return _normalize2.default; - } -}); -Object.defineProperty(exports, 'deprecationEntries', { - enumerable: true, - get: function get() { - return _Deprecated.default; - } -}); -Object.defineProperty(exports, 'defaults', { - enumerable: true, - get: function get() { - return _Defaults.default; - } -}); -Object.defineProperty(exports, 'descriptions', { - enumerable: true, - get: function get() { - return _Descriptions.default; - } -}); - -function _fs() { - const data = _interopRequireDefault(require('fs')); - - _fs = function _fs() { - return data; - }; - - return data; -} - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -var _utils = require('./utils'); - -var _normalize2 = _interopRequireDefault(require('./normalize')); - -var _resolveConfigPath = _interopRequireDefault(require('./resolveConfigPath')); - -var _readConfigFileAndSetRootDir = _interopRequireDefault( - require('./readConfigFileAndSetRootDir') -); - -var _Deprecated = _interopRequireDefault(require('./Deprecated')); - -var _Defaults = _interopRequireDefault(require('./Defaults')); - -var _Descriptions = _interopRequireDefault(require('./Descriptions')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function readConfig( - argv, - packageRootOrConfig, // Whether it needs to look into `--config` arg passed to CLI. - // It only used to read initial config. If the initial config contains - // `project` property, we don't want to read `--config` value and rather - skipArgvConfigOption, - parentConfigPath, - projectIndex = Infinity -) { - let rawOptions; - let configPath = null; - - if (typeof packageRootOrConfig !== 'string') { - if (parentConfigPath) { - const parentConfigDirname = _path().default.dirname(parentConfigPath); - - rawOptions = packageRootOrConfig; - rawOptions.rootDir = rawOptions.rootDir - ? (0, _utils.replaceRootDirInPath)( - parentConfigDirname, - rawOptions.rootDir - ) - : parentConfigDirname; - } else { - throw new Error( - 'Jest: Cannot use configuration as an object without a file path.' - ); - } - } else if ((0, _utils.isJSONString)(argv.config)) { - // A JSON string was passed to `--config` argument and we can parse it - // and use as is. - let config; - - try { - config = JSON.parse(argv.config); - } catch (e) { - throw new Error( - 'There was an error while parsing the `--config` argument as a JSON string.' - ); - } // NOTE: we might need to resolve this dir to an absolute path in the future - - config.rootDir = config.rootDir || packageRootOrConfig; - rawOptions = config; // A string passed to `--config`, which is either a direct path to the config - // or a path to directory containing `package.json` or `jest.config.js` - } else if (!skipArgvConfigOption && typeof argv.config == 'string') { - configPath = (0, _resolveConfigPath.default)(argv.config, process.cwd()); - rawOptions = (0, _readConfigFileAndSetRootDir.default)(configPath); - } else { - // Otherwise just try to find config in the current rootDir. - configPath = (0, _resolveConfigPath.default)( - packageRootOrConfig, - process.cwd() - ); - rawOptions = (0, _readConfigFileAndSetRootDir.default)(configPath); - } - - const _normalize = (0, _normalize2.default)( - rawOptions, - argv, - configPath, - projectIndex - ), - options = _normalize.options, - hasDeprecationWarnings = _normalize.hasDeprecationWarnings; - - const _groupOptions = groupOptions(options), - globalConfig = _groupOptions.globalConfig, - projectConfig = _groupOptions.projectConfig; - - return { - configPath, - globalConfig, - hasDeprecationWarnings, - projectConfig - }; -} - -const groupOptions = options => ({ - globalConfig: Object.freeze({ - bail: options.bail, - changedFilesWithAncestor: options.changedFilesWithAncestor, - changedSince: options.changedSince, - collectCoverage: options.collectCoverage, - collectCoverageFrom: options.collectCoverageFrom, - collectCoverageOnlyFrom: options.collectCoverageOnlyFrom, - coverageDirectory: options.coverageDirectory, - coverageReporters: options.coverageReporters, - coverageThreshold: options.coverageThreshold, - detectLeaks: options.detectLeaks, - detectOpenHandles: options.detectOpenHandles, - enabledTestsMap: options.enabledTestsMap, - errorOnDeprecated: options.errorOnDeprecated, - expand: options.expand, - extraGlobals: options.extraGlobals, - filter: options.filter, - findRelatedTests: options.findRelatedTests, - forceExit: options.forceExit, - globalSetup: options.globalSetup, - globalTeardown: options.globalTeardown, - json: options.json, - lastCommit: options.lastCommit, - listTests: options.listTests, - logHeapUsage: options.logHeapUsage, - maxConcurrency: options.maxConcurrency, - maxWorkers: options.maxWorkers, - noSCM: undefined, - noStackTrace: options.noStackTrace, - nonFlagArgs: options.nonFlagArgs, - notify: options.notify, - notifyMode: options.notifyMode, - onlyChanged: options.onlyChanged, - onlyFailures: options.onlyFailures, - outputFile: options.outputFile, - passWithNoTests: options.passWithNoTests, - projects: options.projects, - replname: options.replname, - reporters: options.reporters, - rootDir: options.rootDir, - runTestsByPath: options.runTestsByPath, - silent: options.silent, - skipFilter: options.skipFilter, - testFailureExitCode: options.testFailureExitCode, - testNamePattern: options.testNamePattern, - testPathPattern: options.testPathPattern, - testResultsProcessor: options.testResultsProcessor, - testSequencer: options.testSequencer, - testTimeout: options.testTimeout, - updateSnapshot: options.updateSnapshot, - useStderr: options.useStderr, - verbose: options.verbose, - watch: options.watch, - watchAll: options.watchAll, - watchPlugins: options.watchPlugins, - watchman: options.watchman - }), - projectConfig: Object.freeze({ - automock: options.automock, - browser: options.browser, - cache: options.cache, - cacheDirectory: options.cacheDirectory, - clearMocks: options.clearMocks, - coveragePathIgnorePatterns: options.coveragePathIgnorePatterns, - cwd: options.cwd, - dependencyExtractor: options.dependencyExtractor, - detectLeaks: options.detectLeaks, - detectOpenHandles: options.detectOpenHandles, - displayName: options.displayName, - errorOnDeprecated: options.errorOnDeprecated, - extraGlobals: options.extraGlobals, - filter: options.filter, - forceCoverageMatch: options.forceCoverageMatch, - globalSetup: options.globalSetup, - globalTeardown: options.globalTeardown, - globals: options.globals, - haste: options.haste, - moduleDirectories: options.moduleDirectories, - moduleFileExtensions: options.moduleFileExtensions, - moduleLoader: options.moduleLoader, - moduleNameMapper: options.moduleNameMapper, - modulePathIgnorePatterns: options.modulePathIgnorePatterns, - modulePaths: options.modulePaths, - name: options.name, - prettierPath: options.prettierPath, - resetMocks: options.resetMocks, - resetModules: options.resetModules, - resolver: options.resolver, - restoreMocks: options.restoreMocks, - rootDir: options.rootDir, - roots: options.roots, - runner: options.runner, - setupFiles: options.setupFiles, - setupFilesAfterEnv: options.setupFilesAfterEnv, - skipFilter: options.skipFilter, - skipNodeResolution: options.skipNodeResolution, - snapshotResolver: options.snapshotResolver, - snapshotSerializers: options.snapshotSerializers, - testEnvironment: options.testEnvironment, - testEnvironmentOptions: options.testEnvironmentOptions, - testLocationInResults: options.testLocationInResults, - testMatch: options.testMatch, - testPathIgnorePatterns: options.testPathIgnorePatterns, - testRegex: options.testRegex, - testRunner: options.testRunner, - testURL: options.testURL, - timers: options.timers, - transform: options.transform, - transformIgnorePatterns: options.transformIgnorePatterns, - unmockedModulePathPatterns: options.unmockedModulePathPatterns, - watchPathIgnorePatterns: options.watchPathIgnorePatterns - }) -}); - -const ensureNoDuplicateConfigs = (parsedConfigs, projects) => { - if (projects.length <= 1) { - return; - } - - const configPathMap = new Map(); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = parsedConfigs[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const config = _step.value; - const configPath = config.configPath; - - if (configPathMap.has(configPath)) { - const message = `Whoops! Two projects resolved to the same config path: ${_chalk().default.bold( - String(configPath) - )}: - - Project 1: ${_chalk().default.bold( - projects[parsedConfigs.findIndex(x => x === config)] - )} - Project 2: ${_chalk().default.bold( - projects[parsedConfigs.findIndex(x => x === configPathMap.get(configPath))] - )} - -This usually means that your ${_chalk().default.bold( - '"projects"' - )} config includes a directory that doesn't have any configuration recognizable by Jest. Please fix it. -`; - throw new Error(message); - } - - if (configPath !== null) { - configPathMap.set(configPath, config); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } -}; // Possible scenarios: -// 1. jest --config config.json -// 2. jest --projects p1 p2 -// 3. jest --projects p1 p2 --config config.json -// 4. jest --projects p1 -// 5. jest -// -// If no projects are specified, process.cwd() will be used as the default -// (and only) project. - -function readConfigs(argv, projectPaths) { - let globalConfig; - let hasDeprecationWarnings; - let configs = []; - let projects = projectPaths; - let configPath; - - if (projectPaths.length === 1) { - const parsedConfig = readConfig(argv, projects[0]); - configPath = parsedConfig.configPath; - - if (parsedConfig.globalConfig.projects) { - // If this was a single project, and its config has `projects` - // settings, use that value instead. - projects = parsedConfig.globalConfig.projects; - } - - hasDeprecationWarnings = parsedConfig.hasDeprecationWarnings; - globalConfig = parsedConfig.globalConfig; - configs = [parsedConfig.projectConfig]; - - if (globalConfig.projects && globalConfig.projects.length) { - // Even though we had one project in CLI args, there might be more - // projects defined in the config. - projects = globalConfig.projects; - } - } - - if ( - projects.length > 1 || - (projects.length && typeof projects[0] === 'object') - ) { - const parsedConfigs = projects - .filter(root => { - // Ignore globbed files that cannot be `require`d. - if ( - typeof root === 'string' && - _fs().default.existsSync(root) && - !_fs() - .default.lstatSync(root) - .isDirectory() && - !root.endsWith('.js') && - !root.endsWith('.json') - ) { - return false; - } - - return true; - }) - .map((root, projectIndex) => - readConfig(argv, root, true, configPath, projectIndex) - ); - ensureNoDuplicateConfigs(parsedConfigs, projects); - configs = parsedConfigs.map(({projectConfig}) => projectConfig); - - if (!hasDeprecationWarnings) { - hasDeprecationWarnings = parsedConfigs.some( - ({hasDeprecationWarnings}) => !!hasDeprecationWarnings - ); - } // If no config was passed initially, use the one from the first project - - if (!globalConfig) { - globalConfig = parsedConfigs[0].globalConfig; - } - } - - if (!globalConfig || !configs.length) { - throw new Error('jest: No configuration found for any project.'); - } - - return { - configs, - globalConfig, - hasDeprecationWarnings: !!hasDeprecationWarnings - }; -} diff --git a/node_modules/jest-config/build/normalize.d.ts b/node_modules/jest-config/build/normalize.d.ts deleted file mode 100644 index bd9d4f5b..00000000 --- a/node_modules/jest-config/build/normalize.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -declare type AllOptions = Config.ProjectConfig & Config.GlobalConfig; -export default function normalize(options: Config.InitialOptions, argv: Config.Argv, configPath?: Config.Path | null, projectIndex?: number): { - hasDeprecationWarnings: boolean; - options: AllOptions; -}; -export {}; -//# sourceMappingURL=normalize.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-config/build/normalize.d.ts.map b/node_modules/jest-config/build/normalize.d.ts.map deleted file mode 100644 index d12e7130..00000000 --- a/node_modules/jest-config/build/normalize.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../src/normalize.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAiCnC,aAAK,UAAU,GAAG,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC;AAiX7D,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,OAAO,EAAE,MAAM,CAAC,cAAc,EAC9B,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,UAAU,CAAC,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,EAC/B,YAAY,GAAE,MAAiB,GAC9B;IACD,sBAAsB,EAAE,OAAO,CAAC;IAChC,OAAO,EAAE,UAAU,CAAC;CACrB,CAukBA"} \ No newline at end of file diff --git a/node_modules/jest-config/build/normalize.js b/node_modules/jest-config/build/normalize.js deleted file mode 100644 index a3ed4905..00000000 --- a/node_modules/jest-config/build/normalize.js +++ /dev/null @@ -1,1131 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = normalize; - -function _crypto() { - const data = _interopRequireDefault(require('crypto')); - - _crypto = function _crypto() { - return data; - }; - - return data; -} - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _glob() { - const data = _interopRequireDefault(require('glob')); - - _glob = function _glob() { - return data; - }; - - return data; -} - -function _jestValidate() { - const data = require('jest-validate'); - - _jestValidate = function _jestValidate() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _micromatch() { - const data = _interopRequireDefault(require('micromatch')); - - _micromatch = function _micromatch() { - return data; - }; - - return data; -} - -function _realpathNative() { - const data = require('realpath-native'); - - _realpathNative = function _realpathNative() { - return data; - }; - - return data; -} - -function _jestResolve() { - const data = _interopRequireDefault(require('jest-resolve')); - - _jestResolve = function _jestResolve() { - return data; - }; - - return data; -} - -function _jestRegexUtil() { - const data = require('jest-regex-util'); - - _jestRegexUtil = function _jestRegexUtil() { - return data; - }; - - return data; -} - -function _jestGetType() { - const data = _interopRequireDefault(require('jest-get-type')); - - _jestGetType = function _jestGetType() { - return data; - }; - - return data; -} - -var _validatePattern = _interopRequireDefault(require('./validatePattern')); - -var _getMaxWorkers = _interopRequireDefault(require('./getMaxWorkers')); - -var _utils = require('./utils'); - -var _constants = require('./constants'); - -var _ReporterValidationErrors = require('./ReporterValidationErrors'); - -var _Defaults = _interopRequireDefault(require('./Defaults')); - -var _Deprecated = _interopRequireDefault(require('./Deprecated')); - -var _setFromArgv = _interopRequireDefault(require('./setFromArgv')); - -var _ValidConfig = _interopRequireDefault(require('./ValidConfig')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const ERROR = `${_utils.BULLET}Validation Error`; -const PRESET_EXTENSIONS = ['.json', '.js']; -const PRESET_NAME = 'jest-preset'; - -const createConfigError = message => - new (_jestValidate()).ValidationError( - ERROR, - message, - _utils.DOCUMENTATION_NOTE - ); // TS 3.5 forces us to split these into 2 - -const mergeModuleNameMapperWithPreset = (options, preset) => { - if (options['moduleNameMapper'] && preset['moduleNameMapper']) { - options['moduleNameMapper'] = _objectSpread( - {}, - options['moduleNameMapper'], - preset['moduleNameMapper'], - options['moduleNameMapper'] - ); - } -}; - -const mergeTransformWithPreset = (options, preset) => { - if (options['transform'] && preset['transform']) { - options['transform'] = _objectSpread( - {}, - options['transform'], - preset['transform'], - options['transform'] - ); - } -}; - -const setupPreset = (options, optionsPreset) => { - let preset; - const presetPath = (0, _utils.replaceRootDirInPath)( - options.rootDir, - optionsPreset - ); - - const presetModule = _jestResolve().default.findNodeModule( - presetPath.startsWith('.') - ? presetPath - : _path().default.join(presetPath, PRESET_NAME), - { - basedir: options.rootDir, - extensions: PRESET_EXTENSIONS - } - ); - - try { - // Force re-evaluation to support multiple projects - try { - if (presetModule) { - delete require.cache[require.resolve(presetModule)]; - } - } catch (e) {} // @ts-ignore: `presetModule` can be null? - - preset = require(presetModule); - } catch (error) { - if (error instanceof SyntaxError || error instanceof TypeError) { - throw createConfigError( - ` Preset ${_chalk().default.bold(presetPath)} is invalid:\n\n ${ - error.message - }\n ${error.stack}` - ); - } - - const preset = _jestResolve().default.findNodeModule(presetPath, { - basedir: options.rootDir - }); - - if (preset) { - throw createConfigError( - ` Module ${_chalk().default.bold( - presetPath - )} should have "jest-preset.js" or "jest-preset.json" file at the root.` - ); - } - - throw createConfigError( - ` Preset ${_chalk().default.bold(presetPath)} not found.` - ); - } - - if (options.setupFiles) { - options.setupFiles = (preset.setupFiles || []).concat(options.setupFiles); - } - - if (options.modulePathIgnorePatterns && preset.modulePathIgnorePatterns) { - options.modulePathIgnorePatterns = preset.modulePathIgnorePatterns.concat( - options.modulePathIgnorePatterns - ); - } - - mergeModuleNameMapperWithPreset(options, preset); - mergeTransformWithPreset(options, preset); - return _objectSpread({}, preset, options); -}; - -const setupBabelJest = options => { - const transform = options.transform; - let babelJest; - - if (transform) { - const customJSPattern = Object.keys(transform).find(pattern => { - const regex = new RegExp(pattern); - return regex.test('a.js') || regex.test('a.jsx'); - }); - const customTSPattern = Object.keys(transform).find(pattern => { - const regex = new RegExp(pattern); - return regex.test('a.ts') || regex.test('a.tsx'); - }); - [customJSPattern, customTSPattern].forEach(pattern => { - if (pattern) { - const customTransformer = transform[pattern]; - - if (Array.isArray(customTransformer)) { - if (customTransformer[0] === 'babel-jest') { - babelJest = require.resolve('babel-jest'); - customTransformer[0] = babelJest; - } else if (customTransformer[0].includes('babel-jest')) { - babelJest = customTransformer[0]; - } - } else { - if (customTransformer === 'babel-jest') { - babelJest = require.resolve('babel-jest'); - transform[pattern] = babelJest; - } else if (customTransformer.includes('babel-jest')) { - babelJest = customTransformer; - } - } - } - }); - } else { - babelJest = require.resolve('babel-jest'); - options.transform = { - [_constants.DEFAULT_JS_PATTERN]: babelJest - }; - } -}; - -const normalizeCollectCoverageOnlyFrom = (options, key) => { - const initialCollectCoverageFrom = options[key]; - const collectCoverageOnlyFrom = Array.isArray(initialCollectCoverageFrom) - ? initialCollectCoverageFrom // passed from argv - : Object.keys(initialCollectCoverageFrom); // passed from options - - return collectCoverageOnlyFrom.reduce((map, filePath) => { - filePath = _path().default.resolve( - options.rootDir, - (0, _utils.replaceRootDirInPath)(options.rootDir, filePath) - ); - map[filePath] = true; - return map; - }, Object.create(null)); -}; - -const normalizeCollectCoverageFrom = (options, key) => { - const initialCollectCoverageFrom = options[key]; - let value; - - if (!initialCollectCoverageFrom) { - value = []; - } - - if (!Array.isArray(initialCollectCoverageFrom)) { - try { - value = JSON.parse(initialCollectCoverageFrom); - } catch (e) {} - - if (options[key] && !Array.isArray(value)) { - value = [initialCollectCoverageFrom]; - } - } else { - value = initialCollectCoverageFrom; - } - - if (value) { - value = value.map(filePath => - filePath.replace(/^(!?)(\/)(.*)/, '$1$3') - ); - } - - return value; -}; - -const normalizeUnmockedModulePathPatterns = ( - options, - key // _replaceRootDirTags is specifically well-suited for substituting - // in paths (it deals with properly interpreting relative path - // separators, etc). - // - // For patterns, direct global substitution is far more ideal, so we - // special case substitutions for patterns here. -) => - options[key].map(pattern => - (0, _jestRegexUtil().replacePathSepForRegex)( - pattern.replace(//g, options.rootDir) - ) - ); - -const normalizePreprocessor = options => { - if (options.scriptPreprocessor && options.transform) { - throw createConfigError(` Options: ${_chalk().default.bold( - 'scriptPreprocessor' - )} and ${_chalk().default.bold('transform')} cannot be used together. - Please change your configuration to only use ${_chalk().default.bold( - 'transform' - )}.`); - } - - if (options.preprocessorIgnorePatterns && options.transformIgnorePatterns) { - throw createConfigError(` Options ${_chalk().default.bold( - 'preprocessorIgnorePatterns' - )} and ${_chalk().default.bold( - 'transformIgnorePatterns' - )} cannot be used together. - Please change your configuration to only use ${_chalk().default.bold( - 'transformIgnorePatterns' - )}.`); - } - - if (options.scriptPreprocessor) { - options.transform = { - '.*': options.scriptPreprocessor - }; - } - - if (options.preprocessorIgnorePatterns) { - options.transformIgnorePatterns = options.preprocessorIgnorePatterns; - } - - delete options.scriptPreprocessor; - delete options.preprocessorIgnorePatterns; - return options; -}; - -const normalizeMissingOptions = (options, configPath, projectIndex) => { - if (!options.name) { - options.name = _crypto() - .default.createHash('md5') - .update(options.rootDir) // In case we load config from some path that has the same root dir - .update(configPath || '') - .update(String(projectIndex)) - .digest('hex'); - } - - if (!options.setupFiles) { - options.setupFiles = []; - } - - return options; -}; - -const normalizeRootDir = options => { - // Assert that there *is* a rootDir - if (!options.hasOwnProperty('rootDir')) { - throw createConfigError( - ` Configuration option ${_chalk().default.bold( - 'rootDir' - )} must be specified.` - ); - } - - options.rootDir = _path().default.normalize(options.rootDir); - - try { - // try to resolve windows short paths, ignoring errors (permission errors, mostly) - options.rootDir = (0, _realpathNative().sync)(options.rootDir); - } catch (e) { - // ignored - } - - return options; -}; - -const normalizeReporters = options => { - const reporters = options.reporters; - - if (!reporters || !Array.isArray(reporters)) { - return options; - } - - (0, _ReporterValidationErrors.validateReporters)(reporters); - options.reporters = reporters.map(reporterConfig => { - const normalizedReporterConfig = - typeof reporterConfig === 'string' // if reporter config is a string, we wrap it in an array - ? // and pass an empty object for options argument, to normalize - [reporterConfig, {}] - : reporterConfig; - const reporterPath = (0, _utils.replaceRootDirInPath)( - options.rootDir, - normalizedReporterConfig[0] - ); - - if (reporterPath !== _constants.DEFAULT_REPORTER_LABEL) { - const reporter = _jestResolve().default.findNodeModule(reporterPath, { - basedir: options.rootDir - }); - - if (!reporter) { - throw new Error( - `Could not resolve a module for a custom reporter.\n` + - ` Module name: ${reporterPath}` - ); - } - - normalizedReporterConfig[0] = reporter; - } - - return normalizedReporterConfig; - }); - return options; -}; - -const buildTestPathPattern = argv => { - const patterns = []; - - if (argv._) { - patterns.push(...argv._); - } - - if (argv.testPathPattern) { - patterns.push(...argv.testPathPattern); - } - - const replacePosixSep = pattern => { - if (_path().default.sep === '/') { - return pattern; - } - - return pattern.replace(/\//g, '\\\\'); - }; - - const testPathPattern = patterns.map(replacePosixSep).join('|'); - - if ((0, _validatePattern.default)(testPathPattern)) { - return testPathPattern; - } else { - showTestPathPatternError(testPathPattern); - return ''; - } -}; - -const showTestPathPatternError = testPathPattern => { - (0, _jestUtil().clearLine)(process.stdout); - console.log( - _chalk().default.red( - ` Invalid testPattern ${testPathPattern} supplied. ` + - `Running all tests instead.` - ) - ); -}; - -function normalize(options, argv, configPath, projectIndex = Infinity) { - const _validate = (0, _jestValidate().validate)(options, { - comment: _utils.DOCUMENTATION_NOTE, - deprecatedConfig: _Deprecated.default, - exampleConfig: _ValidConfig.default, - recursiveBlacklist: [ - 'collectCoverageOnlyFrom', // 'coverageThreshold' allows to use 'global' and glob strings on the same - 'coverageThreshold', - 'globals', - 'moduleNameMapper', - 'testEnvironmentOptions', - 'transform' - ] - }), - hasDeprecationWarnings = _validate.hasDeprecationWarnings; - - options = normalizePreprocessor( - normalizeReporters( - normalizeMissingOptions( - normalizeRootDir((0, _setFromArgv.default)(options, argv)), - configPath, - projectIndex - ) - ) - ); - - if (options.preset) { - options = setupPreset(options, options.preset); - } - - if (!options.setupFilesAfterEnv) { - options.setupFilesAfterEnv = []; - } - - if ( - options.setupTestFrameworkScriptFile && - options.setupFilesAfterEnv.length > 0 - ) { - throw createConfigError(` Options: ${_chalk().default.bold( - 'setupTestFrameworkScriptFile' - )} and ${_chalk().default.bold( - 'setupFilesAfterEnv' - )} cannot be used together. - Please change your configuration to only use ${_chalk().default.bold( - 'setupFilesAfterEnv' - )}.`); - } - - if (options.setupTestFrameworkScriptFile) { - options.setupFilesAfterEnv.push(options.setupTestFrameworkScriptFile); - } - - options.testEnvironment = (0, _utils.getTestEnvironment)({ - rootDir: options.rootDir, - testEnvironment: - options.testEnvironment || _Defaults.default.testEnvironment - }); - - if (!options.roots && options.testPathDirs) { - options.roots = options.testPathDirs; - delete options.testPathDirs; - } - - if (!options.roots) { - options.roots = [options.rootDir]; - } - - if (!options.testRunner || options.testRunner === 'jasmine2') { - options.testRunner = require.resolve('jest-jasmine2'); - } - - if (!options.coverageDirectory) { - options.coverageDirectory = _path().default.resolve( - options.rootDir, - 'coverage' - ); - } - - setupBabelJest(options); // TODO: Type this properly - - const newOptions = _objectSpread({}, _Defaults.default); - - if (options.resolver) { - newOptions.resolver = (0, _utils.resolve)(null, { - filePath: options.resolver, - key: 'resolver', - rootDir: options.rootDir - }); - } - - const optionKeys = Object.keys(options); - optionKeys.reduce((newOptions, key) => { - // The resolver has been resolved separately; skip it - if (key === 'resolver') { - return newOptions; - } // This is cheating, because it claims that all keys of InitialOptions are Required. - // We only really know it's Required for oldOptions[key], not for oldOptions.someOtherKey, - // so oldOptions[key] is the only way it should be used. - - const oldOptions = options; - let value; - - switch (key) { - case 'collectCoverageOnlyFrom': - value = normalizeCollectCoverageOnlyFrom(oldOptions, key); - break; - - case 'setupFiles': - case 'setupFilesAfterEnv': - case 'snapshotSerializers': - { - const option = oldOptions[key]; - value = - option && - option.map(filePath => - (0, _utils.resolve)(newOptions.resolver, { - filePath, - key, - rootDir: options.rootDir - }) - ); - } - break; - - case 'modulePaths': - case 'roots': - { - const option = oldOptions[key]; - value = - option && - option.map(filePath => - _path().default.resolve( - options.rootDir, - (0, _utils.replaceRootDirInPath)(options.rootDir, filePath) - ) - ); - } - break; - - case 'collectCoverageFrom': - value = normalizeCollectCoverageFrom(oldOptions, key); - break; - - case 'cacheDirectory': - case 'coverageDirectory': - { - const option = oldOptions[key]; - value = - option && - _path().default.resolve( - options.rootDir, - (0, _utils.replaceRootDirInPath)(options.rootDir, option) - ); - } - break; - - case 'dependencyExtractor': - case 'globalSetup': - case 'globalTeardown': - case 'moduleLoader': - case 'snapshotResolver': - case 'testResultsProcessor': - case 'testRunner': - case 'filter': - { - const option = oldOptions[key]; - value = - option && - (0, _utils.resolve)(newOptions.resolver, { - filePath: option, - key, - rootDir: options.rootDir - }); - } - break; - - case 'runner': - { - const option = oldOptions[key]; - value = - option && - (0, _utils.getRunner)(newOptions.resolver, { - filePath: option, - rootDir: options.rootDir - }); - } - break; - - case 'prettierPath': - { - // We only want this to throw if "prettierPath" is explicitly passed - // from config or CLI, and the requested path isn't found. Otherwise we - // set it to null and throw an error lazily when it is used. - const option = oldOptions[key]; - value = - option && - (0, _utils.resolve)(newOptions.resolver, { - filePath: option, - key, - optional: option === _Defaults.default[key], - rootDir: options.rootDir - }); - } - break; - - case 'moduleNameMapper': - const moduleNameMapper = oldOptions[key]; - value = - moduleNameMapper && - Object.keys(moduleNameMapper).map(regex => { - const item = moduleNameMapper && moduleNameMapper[regex]; - return ( - item && [ - regex, - (0, _utils._replaceRootDirTags)(options.rootDir, item) - ] - ); - }); - break; - - case 'transform': - const transform = oldOptions[key]; - value = - transform && - Object.keys(transform).map(regex => { - const transformElement = transform[regex]; - return [ - regex, - (0, _utils.resolve)(newOptions.resolver, { - filePath: Array.isArray(transformElement) - ? transformElement[0] - : transformElement, - key, - rootDir: options.rootDir - }), - ...(Array.isArray(transformElement) ? [transformElement[1]] : []) - ]; - }); - break; - - case 'coveragePathIgnorePatterns': - case 'modulePathIgnorePatterns': - case 'testPathIgnorePatterns': - case 'transformIgnorePatterns': - case 'watchPathIgnorePatterns': - case 'unmockedModulePathPatterns': - value = normalizeUnmockedModulePathPatterns(oldOptions, key); - break; - - case 'haste': - value = _objectSpread({}, oldOptions[key]); - - if (value.hasteImplModulePath != null) { - const resolvedHasteImpl = (0, _utils.resolve)(newOptions.resolver, { - filePath: (0, _utils.replaceRootDirInPath)( - options.rootDir, - value.hasteImplModulePath - ), - key: 'haste.hasteImplModulePath', - rootDir: options.rootDir - }); - value.hasteImplModulePath = resolvedHasteImpl || undefined; - } - - break; - - case 'projects': - value = (oldOptions[key] || []) - .map(project => - typeof project === 'string' - ? (0, _utils._replaceRootDirTags)(options.rootDir, project) - : project - ) - .reduce((projects, project) => { - // Project can be specified as globs. If a glob matches any files, - // We expand it to these paths. If not, we keep the original path - // for the future resolution. - const globMatches = - typeof project === 'string' ? _glob().default.sync(project) : []; - return projects.concat(globMatches.length ? globMatches : project); - }, []); - break; - - case 'moduleDirectories': - case 'testMatch': - { - const replacedRootDirTags = (0, _utils._replaceRootDirTags)( - (0, _utils.escapeGlobCharacters)(options.rootDir), - oldOptions[key] - ); - - if (replacedRootDirTags) { - value = Array.isArray(replacedRootDirTags) - ? replacedRootDirTags.map(_jestUtil().replacePathSepForGlob) - : (0, _jestUtil().replacePathSepForGlob)(replacedRootDirTags); - } else { - value = replacedRootDirTags; - } - } - break; - - case 'testRegex': - { - const option = oldOptions[key]; - value = option - ? (Array.isArray(option) ? option : [option]).map( - _jestRegexUtil().replacePathSepForRegex - ) - : []; - } - break; - - case 'moduleFileExtensions': { - value = oldOptions[key]; - - if ( - Array.isArray(value) && // If it's the wrong type, it can throw at a later time - (options.runner === undefined || - options.runner === _Defaults.default.runner) && // Only require 'js' for the default jest-runner - !value.includes('js') - ) { - const errorMessage = - ` moduleFileExtensions must include 'js':\n` + - ` but instead received:\n` + - ` ${_chalk().default.bold.red(JSON.stringify(value))}`; // If `js` is not included, any dependency Jest itself injects into - // the environment, like jasmine or sourcemap-support, will need to - // `require` its modules with a file extension. This is not plausible - // in the long run, so it's way easier to just fail hard early. - // We might consider throwing if `json` is missing as well, as it's a - // fair assumption from modules that they can do - // `require('some-package/package') without the trailing `.json` as it - // works in Node normally. - - throw createConfigError( - errorMessage + - "\n Please change your configuration to include 'js'." - ); - } - - break; - } - - case 'bail': { - const bail = oldOptions[key]; - - if (typeof bail === 'boolean') { - value = bail ? 1 : 0; - } else if (typeof bail === 'string') { - value = 1; // If Jest is invoked as `jest --bail someTestPattern` then need to - // move the pattern from the `bail` configuration and into `argv._` - // to be processed as an extra parameter - - argv._.push(bail); - } else { - value = oldOptions[key]; - } - - break; - } - - case 'displayName': { - const displayName = oldOptions[key]; - - if (typeof displayName === 'string') { - value = displayName; - break; - } - /** - * Ensuring that displayName shape is correct here so that the - * reporters can trust the shape of the data - * TODO: Normalize "displayName" such that given a config option - * { - * "displayName": "Test" - * } - * becomes - * { - * displayName: { - * name: "Test", - * color: "white" - * } - * } - * - * This can't be done now since this will be a breaking change - * for custom reporters - */ - - if ((0, _jestGetType().default)(displayName) === 'object') { - const errorMessage = - ` Option "${_chalk().default.bold( - 'displayName' - )}" must be of type:\n\n` + - ' {\n' + - ' name: string;\n' + - ' color: string;\n' + - ' }\n'; - const name = displayName.name, - color = displayName.color; - - if ( - !name || - !color || - typeof name !== 'string' || - typeof color !== 'string' - ) { - throw createConfigError(errorMessage); - } - } - - value = oldOptions[key]; - break; - } - - case 'testTimeout': { - if (oldOptions[key] < 0) { - throw createConfigError( - ` Option "${_chalk().default.bold( - 'testTimeout' - )}" must be a natural number.` - ); - } - - value = oldOptions[key]; - break; - } - - case 'automock': - case 'browser': - case 'cache': - case 'changedSince': - case 'changedFilesWithAncestor': - case 'clearMocks': - case 'collectCoverage': - case 'coverageReporters': - case 'coverageThreshold': - case 'detectLeaks': - case 'detectOpenHandles': - case 'errorOnDeprecated': - case 'expand': - case 'extraGlobals': - case 'globals': - case 'findRelatedTests': - case 'forceCoverageMatch': - case 'forceExit': - case 'lastCommit': - case 'listTests': - case 'logHeapUsage': - case 'maxConcurrency': - case 'mapCoverage': - case 'name': - case 'noStackTrace': - case 'notify': - case 'notifyMode': - case 'onlyChanged': - case 'outputFile': - case 'passWithNoTests': - case 'replname': - case 'reporters': - case 'resetMocks': - case 'resetModules': - case 'restoreMocks': - case 'rootDir': - case 'runTestsByPath': - case 'silent': - case 'skipFilter': - case 'skipNodeResolution': - case 'testEnvironment': - case 'testEnvironmentOptions': - case 'testFailureExitCode': - case 'testLocationInResults': - case 'testNamePattern': - case 'testURL': - case 'timers': - case 'useStderr': - case 'verbose': - case 'watch': - case 'watchAll': - case 'watchman': - value = oldOptions[key]; - break; - - case 'watchPlugins': - value = (oldOptions[key] || []).map(watchPlugin => { - if (typeof watchPlugin === 'string') { - return { - config: {}, - path: (0, _utils.getWatchPlugin)(newOptions.resolver, { - filePath: watchPlugin, - rootDir: options.rootDir - }) - }; - } else { - return { - config: watchPlugin[1] || {}, - path: (0, _utils.getWatchPlugin)(newOptions.resolver, { - filePath: watchPlugin[0], - rootDir: options.rootDir - }) - }; - } - }); - break; - } // @ts-ignore: automock is missing in GlobalConfig, so what - - newOptions[key] = value; - return newOptions; - }, newOptions); - - try { - // try to resolve windows short paths, ignoring errors (permission errors, mostly) - newOptions.cwd = (0, _realpathNative().sync)(process.cwd()); - } catch (e) { - // ignored - } - - newOptions.testSequencer = (0, _utils.getSequencer)(newOptions.resolver, { - filePath: options.testSequencer || _Defaults.default.testSequencer, - rootDir: options.rootDir - }); - newOptions.nonFlagArgs = argv._; - newOptions.testPathPattern = buildTestPathPattern(argv); - newOptions.json = !!argv.json; - newOptions.testFailureExitCode = parseInt(newOptions.testFailureExitCode, 10); - - if ( - newOptions.lastCommit || - newOptions.changedFilesWithAncestor || - newOptions.changedSince - ) { - newOptions.onlyChanged = true; - } - - if (argv.all) { - newOptions.onlyChanged = false; - } else if (newOptions.testPathPattern) { - // When passing a test path pattern we don't want to only monitor changed - // files unless `--watch` is also passed. - newOptions.onlyChanged = newOptions.watch; - } - - newOptions.updateSnapshot = - argv.ci && !argv.updateSnapshot - ? 'none' - : argv.updateSnapshot - ? 'all' - : 'new'; - newOptions.maxConcurrency = parseInt(newOptions.maxConcurrency, 10); - newOptions.maxWorkers = (0, _getMaxWorkers.default)(argv, options); - - if (newOptions.testRegex.length && options.testMatch) { - throw createConfigError( - ` Configuration options ${_chalk().default.bold('testMatch')} and` + - ` ${_chalk().default.bold('testRegex')} cannot be used together.` - ); - } - - if (newOptions.testRegex.length && !options.testMatch) { - // Prevent the default testMatch conflicting with any explicitly - // configured `testRegex` value - newOptions.testMatch = []; - } // If argv.json is set, coverageReporters shouldn't print a text report. - - if (argv.json) { - newOptions.coverageReporters = (newOptions.coverageReporters || []).filter( - reporter => reporter !== 'text' - ); - } // If collectCoverage is enabled while using --findRelatedTests we need to - // avoid having false negatives in the generated coverage report. - // The following: `--findRelatedTests '/rootDir/file1.js' --coverage` - // Is transformed to: `--findRelatedTests '/rootDir/file1.js' --coverage --collectCoverageFrom 'file1.js'` - // where arguments to `--collectCoverageFrom` should be globs (or relative - // paths to the rootDir) - - if (newOptions.collectCoverage && argv.findRelatedTests) { - let collectCoverageFrom = argv._.map(filename => { - filename = (0, _utils.replaceRootDirInPath)(options.rootDir, filename); - return _path().default.isAbsolute(filename) - ? _path().default.relative(options.rootDir, filename) - : filename; - }); // Don't override existing collectCoverageFrom options - - if (newOptions.collectCoverageFrom) { - collectCoverageFrom = collectCoverageFrom.reduce((patterns, filename) => { - if ( - !_micromatch().default.some( - (0, _jestUtil().replacePathSepForGlob)( - _path().default.relative(options.rootDir, filename) - ), - newOptions.collectCoverageFrom - ) - ) { - return patterns; - } - - return [...patterns, filename]; - }, newOptions.collectCoverageFrom); - } - - newOptions.collectCoverageFrom = collectCoverageFrom; - } - - return { - hasDeprecationWarnings, - options: newOptions - }; -} diff --git a/node_modules/jest-config/build/readConfigFileAndSetRootDir.d.ts b/node_modules/jest-config/build/readConfigFileAndSetRootDir.d.ts deleted file mode 100644 index 5b234dea..00000000 --- a/node_modules/jest-config/build/readConfigFileAndSetRootDir.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -declare const _default: (configPath: string) => Config.InitialOptions; -export default _default; -//# sourceMappingURL=readConfigFileAndSetRootDir.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-config/build/readConfigFileAndSetRootDir.d.ts.map b/node_modules/jest-config/build/readConfigFileAndSetRootDir.d.ts.map deleted file mode 100644 index aaa3fccf..00000000 --- a/node_modules/jest-config/build/readConfigFileAndSetRootDir.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"readConfigFileAndSetRootDir.d.ts","sourceRoot":"","sources":["../src/readConfigFileAndSetRootDir.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;;AAQnC,wBAsCE"} \ No newline at end of file diff --git a/node_modules/jest-config/build/readConfigFileAndSetRootDir.js b/node_modules/jest-config/build/readConfigFileAndSetRootDir.js deleted file mode 100644 index 939f92e9..00000000 --- a/node_modules/jest-config/build/readConfigFileAndSetRootDir.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _fs() { - const data = _interopRequireDefault(require('fs')); - - _fs = function _fs() { - return data; - }; - - return data; -} - -var _jsonlint = _interopRequireDefault(require('./vendor/jsonlint')); - -var _constants = require('./constants'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// @ts-ignore: vendored -// Read the configuration and set its `rootDir` -// 1. If it's a `package.json` file, we look into its "jest" property -// 2. For any other file, we just require it. -var _default = configPath => { - const isJSON = configPath.endsWith('.json'); - let configObject; - - try { - configObject = require(configPath); - } catch (error) { - if (isJSON) { - throw new Error( - `Jest: Failed to parse config file ${configPath}\n` + - ` ${_jsonlint.default.errors( - _fs().default.readFileSync(configPath, 'utf8') - )}` - ); - } else { - throw error; - } - } - - if (configPath.endsWith(_constants.PACKAGE_JSON)) { - // Event if there's no "jest" property in package.json we will still use - // an empty object. - configObject = configObject.jest || {}; - } - - if (configObject.rootDir) { - // We don't touch it if it has an absolute path specified - if (!_path().default.isAbsolute(configObject.rootDir)) { - // otherwise, we'll resolve it relative to the file's __dirname - configObject.rootDir = _path().default.resolve( - _path().default.dirname(configPath), - configObject.rootDir - ); - } - } else { - // If rootDir is not there, we'll set it to this file's __dirname - configObject.rootDir = _path().default.dirname(configPath); - } - - return configObject; -}; - -exports.default = _default; diff --git a/node_modules/jest-config/build/resolveConfigPath.d.ts b/node_modules/jest-config/build/resolveConfigPath.d.ts deleted file mode 100644 index 8fae01c1..00000000 --- a/node_modules/jest-config/build/resolveConfigPath.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare const _default: (pathToResolve: string, cwd: string) => string; -export default _default; -//# sourceMappingURL=resolveConfigPath.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-config/build/resolveConfigPath.d.ts.map b/node_modules/jest-config/build/resolveConfigPath.d.ts.map deleted file mode 100644 index 661cc841..00000000 --- a/node_modules/jest-config/build/resolveConfigPath.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolveConfigPath.d.ts","sourceRoot":"","sources":["../src/resolveConfigPath.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAUH,wBA+BE"} \ No newline at end of file diff --git a/node_modules/jest-config/build/resolveConfigPath.js b/node_modules/jest-config/build/resolveConfigPath.js deleted file mode 100644 index d6d41221..00000000 --- a/node_modules/jest-config/build/resolveConfigPath.js +++ /dev/null @@ -1,119 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _fs() { - const data = _interopRequireDefault(require('fs')); - - _fs = function _fs() { - return data; - }; - - return data; -} - -var _constants = require('./constants'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const isFile = filePath => - _fs().default.existsSync(filePath) && - !_fs() - .default.lstatSync(filePath) - .isDirectory(); - -var _default = (pathToResolve, cwd) => { - if (!_path().default.isAbsolute(cwd)) { - throw new Error(`"cwd" must be an absolute path. cwd: ${cwd}`); - } - - const absolutePath = _path().default.isAbsolute(pathToResolve) - ? pathToResolve - : _path().default.resolve(cwd, pathToResolve); - - if (isFile(absolutePath)) { - return absolutePath; - } // This is a guard against passing non existing path as a project/config, - // that will otherwise result in a very confusing situation. - // e.g. - // With a directory structure like this: - // my_project/ - // packcage.json - // - // Passing a `my_project/some_directory_that_doesnt_exist` as a project - // name will resolve into a (possibly empty) `my_project/package.json` and - // try to run all tests it finds under `my_project` directory. - - if (!_fs().default.existsSync(absolutePath)) { - throw new Error( - `Can't find a root directory while resolving a config file path.\n` + - `Provided path to resolve: ${pathToResolve}\n` + - `cwd: ${cwd}` - ); - } - - return resolveConfigPathByTraversing(absolutePath, pathToResolve, cwd); -}; - -exports.default = _default; - -const resolveConfigPathByTraversing = (pathToResolve, initialPath, cwd) => { - const jestConfig = _path().default.resolve( - pathToResolve, - _constants.JEST_CONFIG - ); - - if (isFile(jestConfig)) { - return jestConfig; - } - - const packageJson = _path().default.resolve( - pathToResolve, - _constants.PACKAGE_JSON - ); - - if (isFile(packageJson)) { - return packageJson; - } // This is the system root. - // We tried everything, config is nowhere to be found ¯\_(ツ)_/¯ - - if (pathToResolve === _path().default.dirname(pathToResolve)) { - throw new Error(makeResolutionErrorMessage(initialPath, cwd)); - } // go up a level and try it again - - return resolveConfigPathByTraversing( - _path().default.dirname(pathToResolve), - initialPath, - cwd - ); -}; - -const makeResolutionErrorMessage = (initialPath, cwd) => - 'Could not find a config file based on provided values:\n' + - `path: "${initialPath}"\n` + - `cwd: "${cwd}"\n` + - 'Config paths must be specified by either a direct path to a config\n' + - 'file, or a path to a directory. If directory is given, Jest will try to\n' + - `traverse directory tree up, until it finds either "${_constants.JEST_CONFIG}" or\n` + - `"${_constants.PACKAGE_JSON}".`; diff --git a/node_modules/jest-config/build/setFromArgv.d.ts b/node_modules/jest-config/build/setFromArgv.d.ts deleted file mode 100644 index 9f6ce66e..00000000 --- a/node_modules/jest-config/build/setFromArgv.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export default function setFromArgv(options: Config.InitialOptions, argv: Config.Argv): Config.InitialOptions; -//# sourceMappingURL=setFromArgv.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-config/build/setFromArgv.d.ts.map b/node_modules/jest-config/build/setFromArgv.d.ts.map deleted file mode 100644 index cee1e5d4..00000000 --- a/node_modules/jest-config/build/setFromArgv.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"setFromArgv.d.ts","sourceRoot":"","sources":["../src/setFromArgv.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAKnC,MAAM,CAAC,OAAO,UAAU,WAAW,CACjC,OAAO,EAAE,MAAM,CAAC,cAAc,EAC9B,IAAI,EAAE,MAAM,CAAC,IAAI,GAChB,MAAM,CAAC,cAAc,CAyCvB"} \ No newline at end of file diff --git a/node_modules/jest-config/build/setFromArgv.js b/node_modules/jest-config/build/setFromArgv.js deleted file mode 100644 index f57c4759..00000000 --- a/node_modules/jest-config/build/setFromArgv.js +++ /dev/null @@ -1,100 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = setFromArgv; - -var _utils = require('./utils'); - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const specialArgs = ['_', '$0', 'h', 'help', 'config']; - -function setFromArgv(options, argv) { - const argvToOptions = Object.keys(argv) - .filter(key => argv[key] !== undefined && specialArgs.indexOf(key) === -1) - .reduce((options, key) => { - switch (key) { - case 'coverage': - options.collectCoverage = argv[key]; - break; - - case 'json': - options.useStderr = argv[key]; - break; - - case 'watchAll': - options.watch = false; - options.watchAll = argv[key]; - break; - - case 'env': - options.testEnvironment = argv[key]; - break; - - case 'config': - break; - - case 'coverageThreshold': - case 'globals': - case 'moduleNameMapper': - case 'transform': - case 'haste': - const str = argv[key]; - - if ((0, _utils.isJSONString)(str)) { - options[key] = JSON.parse(str); - } - - break; - - default: - options[key] = argv[key]; - } - - return options; - }, {}); - return _objectSpread( - {}, - options, - (0, _utils.isJSONString)(argv.config) ? JSON.parse(argv.config) : null, - argvToOptions - ); -} diff --git a/node_modules/jest-config/build/utils.d.ts b/node_modules/jest-config/build/utils.d.ts deleted file mode 100644 index 1eb48019..00000000 --- a/node_modules/jest-config/build/utils.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -declare type ResolveOptions = { - rootDir: Config.Path; - key: string; - filePath: Config.Path; - optional?: boolean; -}; -export declare const BULLET: string; -export declare const DOCUMENTATION_NOTE: string; -export declare const resolve: (resolver: string | null | undefined, { key, filePath, rootDir, optional }: ResolveOptions) => string; -export declare const escapeGlobCharacters: (path: string) => string; -export declare const replaceRootDirInPath: (rootDir: string, filePath: string) => string; -declare type OrArray = T | Array; -declare type ReplaceRootDirConfigObj = Record; -declare type ReplaceRootDirConfigValues = OrArray | OrArray | OrArray; -export declare const _replaceRootDirTags: (rootDir: string, config: T) => T; -export declare const resolveWithPrefix: (resolver: string | null | undefined, { filePath, humanOptionName, optionName, prefix, rootDir, }: { - filePath: string; - humanOptionName: string; - optionName: string; - prefix: string; - rootDir: string; -}) => string; -/** - * Finds the test environment to use: - * - * 1. looks for jest-environment- relative to project. - * 1. looks for jest-environment- relative to Jest. - * 1. looks for relative to project. - * 1. looks for relative to Jest. - */ -export declare const getTestEnvironment: ({ rootDir, testEnvironment: filePath, }: { - rootDir: string; - testEnvironment: string; -}) => string; -/** - * Finds the watch plugins to use: - * - * 1. looks for jest-watch- relative to project. - * 1. looks for jest-watch- relative to Jest. - * 1. looks for relative to project. - * 1. looks for relative to Jest. - */ -export declare const getWatchPlugin: (resolver: string | null | undefined, { filePath, rootDir }: { - filePath: string; - rootDir: string; -}) => string; -/** - * Finds the runner to use: - * - * 1. looks for jest-runner- relative to project. - * 1. looks for jest-runner- relative to Jest. - * 1. looks for relative to project. - * 1. looks for relative to Jest. - */ -export declare const getRunner: (resolver: string | null | undefined, { filePath, rootDir }: { - filePath: string; - rootDir: string; -}) => string; -declare type JSONString = string & { - readonly $$type: never; -}; -export declare const isJSONString: (text?: string | JSONString | undefined) => text is JSONString; -export declare const getSequencer: (resolver: string | null | undefined, { filePath, rootDir }: { - filePath: string; - rootDir: string; -}) => string; -export {}; -//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-config/build/utils.d.ts.map b/node_modules/jest-config/build/utils.d.ts.map deleted file mode 100644 index 7ae7d292..00000000 --- a/node_modules/jest-config/build/utils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAKnC,aAAK,cAAc,GAAG;IACpB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,MAA8B,CAAC;AACpD,eAAO,MAAM,kBAAkB,QAI9B,CAAC;AAKF,eAAO,MAAM,OAAO,uGAsBnB,CAAC;AAEF,eAAO,MAAM,oBAAoB,0BACW,CAAC;AAE7C,eAAO,MAAM,oBAAoB,+CAYhC,CAAC;AAgBF,aAAK,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;AAC/B,aAAK,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;AAC3D,aAAK,0BAA0B,GAC3B,OAAO,CAAC,uBAAuB,CAAC,GAChC,OAAO,CAAC,MAAM,CAAC,GACf,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAEzB,eAAO,MAAM,mBAAmB,yEAyB/B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;YAgD7B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;;;YAa3B,CAAC;AAEL;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;;YAUvB,CAAC;AAEL;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS;;;YAUlB,CAAC;AAEL,aAAK,UAAU,GAAG,MAAM,GAAG;IAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAA;CAAC,CAAC;AACpD,eAAO,MAAM,YAAY,gEAIL,CAAC;AAErB,eAAO,MAAM,YAAY;;;YAUrB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-config/build/utils.js b/node_modules/jest-config/build/utils.js deleted file mode 100644 index f59b8b9b..00000000 --- a/node_modules/jest-config/build/utils.js +++ /dev/null @@ -1,271 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.getSequencer = exports.isJSONString = exports.getRunner = exports.getWatchPlugin = exports.getTestEnvironment = exports.resolveWithPrefix = exports._replaceRootDirTags = exports.replaceRootDirInPath = exports.escapeGlobCharacters = exports.resolve = exports.DOCUMENTATION_NOTE = exports.BULLET = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _jestValidate() { - const data = require('jest-validate'); - - _jestValidate = function _jestValidate() { - return data; - }; - - return data; -} - -function _jestResolve() { - const data = _interopRequireDefault(require('jest-resolve')); - - _jestResolve = function _jestResolve() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const BULLET = _chalk().default.bold('\u25cf '); - -exports.BULLET = BULLET; -const DOCUMENTATION_NOTE = ` ${_chalk().default.bold( - 'Configuration Documentation:' -)} - https://jestjs.io/docs/configuration.html -`; -exports.DOCUMENTATION_NOTE = DOCUMENTATION_NOTE; - -const createValidationError = message => - new (_jestValidate()).ValidationError( - `${BULLET}Validation Error`, - message, - DOCUMENTATION_NOTE - ); - -const resolve = (resolver, {key, filePath, rootDir, optional}) => { - const module = _jestResolve().default.findNodeModule( - replaceRootDirInPath(rootDir, filePath), - { - basedir: rootDir, - resolver: resolver || undefined - } - ); - - if (!module && !optional) { - throw createValidationError(` Module ${_chalk().default.bold( - filePath - )} in the ${_chalk().default.bold(key)} option was not found. - ${_chalk().default.bold('')} is: ${rootDir}`); - } /// can cast as string since nulls will be thrown - - return module; -}; - -exports.resolve = resolve; - -const escapeGlobCharacters = path => path.replace(/([()*{}\[\]!?\\])/g, '\\$1'); - -exports.escapeGlobCharacters = escapeGlobCharacters; - -const replaceRootDirInPath = (rootDir, filePath) => { - if (!/^/.test(filePath)) { - return filePath; - } - - return _path().default.resolve( - rootDir, - _path().default.normalize('./' + filePath.substr(''.length)) - ); -}; - -exports.replaceRootDirInPath = replaceRootDirInPath; - -const _replaceRootDirInObject = (rootDir, config) => { - const newConfig = {}; - - for (const configKey in config) { - newConfig[configKey] = - configKey === 'rootDir' - ? config[configKey] - : _replaceRootDirTags(rootDir, config[configKey]); - } - - return newConfig; -}; - -const _replaceRootDirTags = (rootDir, config) => { - if (config == null) { - return config; - } - - switch (typeof config) { - case 'object': - if (Array.isArray(config)) { - /// can be string[] or {}[] - return config.map(item => _replaceRootDirTags(rootDir, item)); - } - - if (config instanceof RegExp) { - return config; - } - - return _replaceRootDirInObject(rootDir, config); - - case 'string': - return replaceRootDirInPath(rootDir, config); - } - - return config; -}; - -exports._replaceRootDirTags = _replaceRootDirTags; - -const resolveWithPrefix = ( - resolver, - {filePath, humanOptionName, optionName, prefix, rootDir} -) => { - const fileName = replaceRootDirInPath(rootDir, filePath); - - let module = _jestResolve().default.findNodeModule(`${prefix}${fileName}`, { - basedir: rootDir, - resolver: resolver || undefined - }); - - if (module) { - return module; - } - - try { - return require.resolve(`${prefix}${fileName}`); - } catch (e) {} - - module = _jestResolve().default.findNodeModule(fileName, { - basedir: rootDir, - resolver: resolver || undefined - }); - - if (module) { - return module; - } - - try { - return require.resolve(fileName); - } catch (e) {} - - throw createValidationError( - ` ${humanOptionName} ${_chalk().default.bold( - fileName - )} cannot be found. Make sure the ${_chalk().default.bold( - optionName - )} configuration option points to an existing node module.` - ); -}; -/** - * Finds the test environment to use: - * - * 1. looks for jest-environment- relative to project. - * 1. looks for jest-environment- relative to Jest. - * 1. looks for relative to project. - * 1. looks for relative to Jest. - */ - -exports.resolveWithPrefix = resolveWithPrefix; - -const getTestEnvironment = ({rootDir, testEnvironment: filePath}) => - resolveWithPrefix(undefined, { - filePath, - humanOptionName: 'Test environment', - optionName: 'testEnvironment', - prefix: 'jest-environment-', - rootDir - }); -/** - * Finds the watch plugins to use: - * - * 1. looks for jest-watch- relative to project. - * 1. looks for jest-watch- relative to Jest. - * 1. looks for relative to project. - * 1. looks for relative to Jest. - */ - -exports.getTestEnvironment = getTestEnvironment; - -const getWatchPlugin = (resolver, {filePath, rootDir}) => - resolveWithPrefix(resolver, { - filePath, - humanOptionName: 'Watch plugin', - optionName: 'watchPlugins', - prefix: 'jest-watch-', - rootDir - }); -/** - * Finds the runner to use: - * - * 1. looks for jest-runner- relative to project. - * 1. looks for jest-runner- relative to Jest. - * 1. looks for relative to project. - * 1. looks for relative to Jest. - */ - -exports.getWatchPlugin = getWatchPlugin; - -const getRunner = (resolver, {filePath, rootDir}) => - resolveWithPrefix(resolver, { - filePath, - humanOptionName: 'Jest Runner', - optionName: 'runner', - prefix: 'jest-runner-', - rootDir - }); - -exports.getRunner = getRunner; - -// newtype -const isJSONString = text => - text != null && - typeof text === 'string' && - text.startsWith('{') && - text.endsWith('}'); - -exports.isJSONString = isJSONString; - -const getSequencer = (resolver, {filePath, rootDir}) => - resolveWithPrefix(resolver, { - filePath, - humanOptionName: 'Jest Sequencer', - optionName: 'testSequencer', - prefix: 'jest-sequencer-', - rootDir - }); - -exports.getSequencer = getSequencer; diff --git a/node_modules/jest-config/build/validatePattern.d.ts b/node_modules/jest-config/build/validatePattern.d.ts deleted file mode 100644 index 92bc7f13..00000000 --- a/node_modules/jest-config/build/validatePattern.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default function validatePattern(pattern?: string): boolean; -//# sourceMappingURL=validatePattern.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-config/build/validatePattern.d.ts.map b/node_modules/jest-config/build/validatePattern.d.ts.map deleted file mode 100644 index b87c5190..00000000 --- a/node_modules/jest-config/build/validatePattern.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"validatePattern.d.ts","sourceRoot":"","sources":["../src/validatePattern.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,OAAO,CAAC,EAAE,MAAM,WAWvD"} \ No newline at end of file diff --git a/node_modules/jest-config/build/validatePattern.js b/node_modules/jest-config/build/validatePattern.js deleted file mode 100644 index 36ef2a0c..00000000 --- a/node_modules/jest-config/build/validatePattern.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = validatePattern; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function validatePattern(pattern) { - if (pattern) { - try { - // eslint-disable-next-line no-new - new RegExp(pattern, 'i'); - } catch (e) { - return false; - } - } - - return true; -} diff --git a/node_modules/jest-config/build/vendor/jsonlint.js b/node_modules/jest-config/build/vendor/jsonlint.js deleted file mode 100644 index 94e63267..00000000 --- a/node_modules/jest-config/build/vendor/jsonlint.js +++ /dev/null @@ -1,917 +0,0 @@ -'use strict'; - -// From: https://github.com/zaach/jsonlint -// Vendored in Jest to avoid jsonlint's transitive dependencies. - -/* eslint-disable */ -var jsonlint = (function() { - var parser = { - trace: function trace() {}, - yy: {}, - symbols_: { - error: 2, - JSONString: 3, - STRING: 4, - JSONNumber: 5, - NUMBER: 6, - JSONNullLiteral: 7, - NULL: 8, - JSONBooleanLiteral: 9, - TRUE: 10, - FALSE: 11, - JSONText: 12, - JSONValue: 13, - EOF: 14, - JSONObject: 15, - JSONArray: 16, - '{': 17, - '}': 18, - JSONMemberList: 19, - JSONMember: 20, - ':': 21, - ',': 22, - '[': 23, - ']': 24, - JSONElementList: 25, - $accept: 0, - $end: 1 - }, - terminals_: { - 2: 'error', - 4: 'STRING', - 6: 'NUMBER', - 8: 'NULL', - 10: 'TRUE', - 11: 'FALSE', - 14: 'EOF', - 17: '{', - 18: '}', - 21: ':', - 22: ',', - 23: '[', - 24: ']' - }, - productions_: [ - 0, - [3, 1], - [5, 1], - [7, 1], - [9, 1], - [9, 1], - [12, 2], - [13, 1], - [13, 1], - [13, 1], - [13, 1], - [13, 1], - [13, 1], - [15, 2], - [15, 3], - [20, 3], - [19, 1], - [19, 3], - [16, 2], - [16, 3], - [25, 1], - [25, 3] - ], - performAction: function anonymous( - yytext, - yyleng, - yylineno, - yy, - yystate, - $$, - _$ - ) { - var $0 = $$.length - 1; - - switch (yystate) { - case 1: - // replace escaped characters with actual character - this.$ = yytext - .replace(/\\(\\|")/g, '$' + '1') - .replace(/\\n/g, '\n') - .replace(/\\r/g, '\r') - .replace(/\\t/g, '\t') - .replace(/\\v/g, '\v') - .replace(/\\f/g, '\f') - .replace(/\\b/g, '\b'); - break; - - case 2: - this.$ = Number(yytext); - break; - - case 3: - this.$ = null; - break; - - case 4: - this.$ = true; - break; - - case 5: - this.$ = false; - break; - - case 6: - return (this.$ = $$[$0 - 1]); - break; - - case 13: - this.$ = {}; - break; - - case 14: - this.$ = $$[$0 - 1]; - break; - - case 15: - this.$ = [$$[$0 - 2], $$[$0]]; - break; - - case 16: - this.$ = {}; - this.$[$$[$0][0]] = $$[$0][1]; - break; - - case 17: - this.$ = $$[$0 - 2]; - $$[$0 - 2][$$[$0][0]] = $$[$0][1]; - break; - - case 18: - this.$ = []; - break; - - case 19: - this.$ = $$[$0 - 1]; - break; - - case 20: - this.$ = [$$[$0]]; - break; - - case 21: - this.$ = $$[$0 - 2]; - $$[$0 - 2].push($$[$0]); - break; - } - }, - table: [ - { - 3: 5, - 4: [1, 12], - 5: 6, - 6: [1, 13], - 7: 3, - 8: [1, 9], - 9: 4, - 10: [1, 10], - 11: [1, 11], - 12: 1, - 13: 2, - 15: 7, - 16: 8, - 17: [1, 14], - 23: [1, 15] - }, - { - 1: [3] - }, - { - 14: [1, 16] - }, - { - 14: [2, 7], - 18: [2, 7], - 22: [2, 7], - 24: [2, 7] - }, - { - 14: [2, 8], - 18: [2, 8], - 22: [2, 8], - 24: [2, 8] - }, - { - 14: [2, 9], - 18: [2, 9], - 22: [2, 9], - 24: [2, 9] - }, - { - 14: [2, 10], - 18: [2, 10], - 22: [2, 10], - 24: [2, 10] - }, - { - 14: [2, 11], - 18: [2, 11], - 22: [2, 11], - 24: [2, 11] - }, - { - 14: [2, 12], - 18: [2, 12], - 22: [2, 12], - 24: [2, 12] - }, - { - 14: [2, 3], - 18: [2, 3], - 22: [2, 3], - 24: [2, 3] - }, - { - 14: [2, 4], - 18: [2, 4], - 22: [2, 4], - 24: [2, 4] - }, - { - 14: [2, 5], - 18: [2, 5], - 22: [2, 5], - 24: [2, 5] - }, - { - 14: [2, 1], - 18: [2, 1], - 21: [2, 1], - 22: [2, 1], - 24: [2, 1] - }, - { - 14: [2, 2], - 18: [2, 2], - 22: [2, 2], - 24: [2, 2] - }, - { - 3: 20, - 4: [1, 12], - 18: [1, 17], - 19: 18, - 20: 19 - }, - { - 3: 5, - 4: [1, 12], - 5: 6, - 6: [1, 13], - 7: 3, - 8: [1, 9], - 9: 4, - 10: [1, 10], - 11: [1, 11], - 13: 23, - 15: 7, - 16: 8, - 17: [1, 14], - 23: [1, 15], - 24: [1, 21], - 25: 22 - }, - { - 1: [2, 6] - }, - { - 14: [2, 13], - 18: [2, 13], - 22: [2, 13], - 24: [2, 13] - }, - { - 18: [1, 24], - 22: [1, 25] - }, - { - 18: [2, 16], - 22: [2, 16] - }, - { - 21: [1, 26] - }, - { - 14: [2, 18], - 18: [2, 18], - 22: [2, 18], - 24: [2, 18] - }, - { - 22: [1, 28], - 24: [1, 27] - }, - { - 22: [2, 20], - 24: [2, 20] - }, - { - 14: [2, 14], - 18: [2, 14], - 22: [2, 14], - 24: [2, 14] - }, - { - 3: 20, - 4: [1, 12], - 20: 29 - }, - { - 3: 5, - 4: [1, 12], - 5: 6, - 6: [1, 13], - 7: 3, - 8: [1, 9], - 9: 4, - 10: [1, 10], - 11: [1, 11], - 13: 30, - 15: 7, - 16: 8, - 17: [1, 14], - 23: [1, 15] - }, - { - 14: [2, 19], - 18: [2, 19], - 22: [2, 19], - 24: [2, 19] - }, - { - 3: 5, - 4: [1, 12], - 5: 6, - 6: [1, 13], - 7: 3, - 8: [1, 9], - 9: 4, - 10: [1, 10], - 11: [1, 11], - 13: 31, - 15: 7, - 16: 8, - 17: [1, 14], - 23: [1, 15] - }, - { - 18: [2, 17], - 22: [2, 17] - }, - { - 18: [2, 15], - 22: [2, 15] - }, - { - 22: [2, 21], - 24: [2, 21] - } - ], - defaultActions: { - 16: [2, 6] - }, - parseError: function parseError(str, hash) { - throw new Error(str); - }, - parse: function parse(input) { - var self = this, - stack = [0], - vstack = [null], - // semantic value stack - lstack = [], - // location stack - table = this.table, - yytext = '', - yylineno = 0, - yyleng = 0, - recovering = 0, - TERROR = 2, - EOF = 1; //this.reductionCount = this.shiftCount = 0; - - this.lexer.setInput(input); - this.lexer.yy = this.yy; - this.yy.lexer = this.lexer; - if (typeof this.lexer.yylloc == 'undefined') this.lexer.yylloc = {}; - var yyloc = this.lexer.yylloc; - lstack.push(yyloc); - if (typeof this.yy.parseError === 'function') - this.parseError = this.yy.parseError; - - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - - function lex() { - var token; - token = self.lexer.lex() || 1; // $end = 1 - // if token isn't its numeric value, convert - - if (typeof token !== 'number') { - token = self.symbols_[token] || token; - } - - return token; - } - - var symbol, - preErrorSymbol, - state, - action, - a, - r, - yyval = {}, - p, - len, - newState, - expected; - - while (true) { - // retrieve state number from top of stack - state = stack[stack.length - 1]; // use default actions if available - - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol == null) symbol = lex(); // read action for current state and first input - - action = table[state] && table[state][symbol]; - } // handle parse error - - _handle_error: if ( - typeof action === 'undefined' || - !action.length || - !action[0] - ) { - if (!recovering) { - // Report error - expected = []; - - for (p in table[state]) - if (this.terminals_[p] && p > 2) { - expected.push("'" + this.terminals_[p] + "'"); - } - - var errStr = ''; - - if (this.lexer.showPosition) { - errStr = - 'Parse error on line ' + - (yylineno + 1) + - ':\n' + - this.lexer.showPosition() + - '\nExpecting ' + - expected.join(', ') + - ", got '" + - this.terminals_[symbol] + - "'"; - } else { - errStr = - 'Parse error on line ' + - (yylineno + 1) + - ': Unexpected ' + - (symbol == 1 - ? /*EOF*/ - 'end of input' - : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - - this.parseError(errStr, { - text: this.lexer.match, - token: this.terminals_[symbol] || symbol, - line: this.lexer.yylineno, - loc: yyloc, - expected: expected - }); - } // just recovered from another error - - if (recovering == 3) { - if (symbol == EOF) { - throw new Error(errStr || 'Parsing halted.'); - } // discard current lookahead and grab another - - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - symbol = lex(); - } // try to recover from error - - while (1) { - // check for error recovery rule in this state - if (TERROR.toString() in table[state]) { - break; - } - - if (state == 0) { - throw new Error(errStr || 'Parsing halted.'); - } - - popStack(1); - state = stack[stack.length - 1]; - } - - preErrorSymbol = symbol; // save the lookahead token - - symbol = TERROR; // insert generic error symbol as new lookahead - - state = stack[stack.length - 1]; - action = table[state] && table[state][TERROR]; - recovering = 3; // allow 3 real symbols to be shifted before reporting a new error - } // this shouldn't happen, unless resolve defaults are off - - if (action[0] instanceof Array && action.length > 1) { - throw new Error( - 'Parse Error: multiple actions possible at state: ' + - state + - ', token: ' + - symbol - ); - } - - switch (action[0]) { - case 1: - // shift - //this.shiftCount++; - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); // push state - - symbol = null; - - if (!preErrorSymbol) { - // normal execution/no error - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) recovering--; - } else { - // error just occurred, resume old lookahead f/ before error - symbol = preErrorSymbol; - preErrorSymbol = null; - } - - break; - - case 2: - // reduce - //this.reductionCount++; - len = this.productions_[action[1]][1]; // perform semantic action - - yyval.$ = vstack[vstack.length - len]; // default to $$ = $1 - // default location, uses first token for firsts, last for lasts - - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - r = this.performAction.call( - yyval, - yytext, - yyleng, - yylineno, - this.yy, - action[1], - vstack, - lstack - ); - - if (typeof r !== 'undefined') { - return r; - } // pop off stack - - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - - stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce) - - vstack.push(yyval.$); - lstack.push(yyval._$); // goto new state = table[STATE][NONTERMINAL] - - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - - case 3: - // accept - return true; - } - } - - return true; - } - }; - /* Jison generated lexer */ - - var lexer = (function() { - var lexer = { - EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parseError) { - this.yy.parseError(str, hash); - } else { - throw new Error(str); - } - }, - setInput: function setInput(input) { - this._input = input; - this._more = this._less = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }; - return this; - }, - input: function input() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/\n/); - if (lines) this.yylineno++; - this._input = this._input.slice(1); - return ch; - }, - unput: function unput(ch) { - this._input = ch + this._input; - return this; - }, - more: function more() { - this._more = true; - return this; - }, - less: function less(n) { - this._input = this.match.slice(n) + this._input; - }, - pastInput: function pastInput() { - var past = this.matched.substr( - 0, - this.matched.length - this.match.length - ); - return ( - (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, '') - ); - }, - upcomingInput: function upcomingInput() { - var next = this.match; - - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - - return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace( - /\n/g, - '' - ); - }, - showPosition: function showPosition() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join('-'); - return pre + this.upcomingInput() + '\n' + c + '^'; - }, - next: function next() { - if (this.done) { - return this.EOF; - } - - if (!this._input) this.done = true; - var token, match, tempMatch, index, col, lines; - - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - - var rules = this._currentRules(); - - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (!this.options.flex) break; - } - } - - if (match) { - lines = match[0].match(/\n.*/g); - if (lines) this.yylineno += lines.length; - this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines - ? lines[lines.length - 1].length - 1 - : this.yylloc.last_column + match[0].length - }; - this.yytext += match[0]; - this.match += match[0]; - this.yyleng = this.yytext.length; - this._more = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call( - this, - this.yy, - this, - rules[index], - this.conditionStack[this.conditionStack.length - 1] - ); - if (this.done && this._input) this.done = false; - if (token) return token; - else return; - } - - if (this._input === '') { - return this.EOF; - } else { - this.parseError( - 'Lexical error on line ' + - (this.yylineno + 1) + - '. Unrecognized text.\n' + - this.showPosition(), - { - text: '', - token: null, - line: this.yylineno - } - ); - } - }, - lex: function lex() { - var r = this.next(); - - if (typeof r !== 'undefined') { - return r; - } else { - return this.lex(); - } - }, - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - popState: function popState() { - return this.conditionStack.pop(); - }, - _currentRules: function _currentRules() { - return this.conditions[ - this.conditionStack[this.conditionStack.length - 1] - ].rules; - }, - topState: function topState() { - return this.conditionStack[this.conditionStack.length - 2]; - }, - pushState: function begin(condition) { - this.begin(condition); - } - }; - lexer.options = {}; - - lexer.performAction = function anonymous( - yy, - yy_, - $avoiding_name_collisions, - YY_START - ) { - var YYSTATE = YY_START; - - switch ($avoiding_name_collisions) { - case 0: - /* skip whitespace */ - break; - - case 1: - return 6; - break; - - case 2: - yy_.yytext = yy_.yytext.substr(1, yy_.yyleng - 2); - return 4; - break; - - case 3: - return 17; - break; - - case 4: - return 18; - break; - - case 5: - return 23; - break; - - case 6: - return 24; - break; - - case 7: - return 22; - break; - - case 8: - return 21; - break; - - case 9: - return 10; - break; - - case 10: - return 11; - break; - - case 11: - return 8; - break; - - case 12: - return 14; - break; - - case 13: - return 'INVALID'; - break; - } - }; - - lexer.rules = [ - /^(?:\s+)/, - /^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/, - /^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/, - /^(?:\{)/, - /^(?:\})/, - /^(?:\[)/, - /^(?:\])/, - /^(?:,)/, - /^(?::)/, - /^(?:true\b)/, - /^(?:false\b)/, - /^(?:null\b)/, - /^(?:$)/, - /^(?:.)/ - ]; - lexer.conditions = { - INITIAL: { - rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], - inclusive: true - } - }; - return lexer; - })(); - - parser.lexer = lexer; - return parser; -})(); - -exports.parser = jsonlint; - -exports.errors = function(input) { - try { - this.parse(input); - } catch (e) { - return e.stack; - } -}; - -exports.parse = function() { - return jsonlint.parse.apply(jsonlint, arguments); -}; - -exports.main = function commonjsMain(args) { - if (!args[1]) throw new Error('Usage: ' + args[0] + ' FILE'); - - if (typeof process !== 'undefined') { - var source = require('fs').readFileSync( - require('path').join(process.cwd(), args[1]), - 'utf8' - ); - } else { - var cwd = require('file').path(require('file').cwd()); - - var source = cwd.join(args[1]).read({ - charset: 'utf-8' - }); - } - - return exports.parser.parse(source); -}; diff --git a/node_modules/jest-config/package.json b/node_modules/jest-config/package.json deleted file mode 100644 index b1789988..00000000 --- a/node_modules/jest-config/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "_args": [ - [ - "jest-config@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-config@24.9.0", - "_id": "jest-config@24.9.0", - "_inBundle": false, - "_integrity": "sha512-RATtQJtVYQrp7fvWg6f5y3pEFj9I+H8sWw4aKxnDZ96mob5i5SD6ZEGWgMLXQ4LE8UurrjbdlLWdUeo+28QpfQ==", - "_location": "/jest-config", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-config@24.9.0", - "name": "jest-config", - "escapedName": "jest-config", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core", - "/jest-runner", - "/jest-runtime", - "/jest/jest-cli" - ], - "_resolved": "https://registry.npmjs.org/jest-config/-/jest-config-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^24.9.0", - "@jest/types": "^24.9.0", - "babel-jest": "^24.9.0", - "chalk": "^2.0.1", - "glob": "^7.1.1", - "jest-environment-jsdom": "^24.9.0", - "jest-environment-node": "^24.9.0", - "jest-get-type": "^24.9.0", - "jest-jasmine2": "^24.9.0", - "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.9.0", - "jest-util": "^24.9.0", - "jest-validate": "^24.9.0", - "micromatch": "^3.1.10", - "pretty-format": "^24.9.0", - "realpath-native": "^1.1.0" - }, - "devDependencies": { - "@types/babel__core": "^7.0.4", - "@types/glob": "^7.1.1", - "@types/micromatch": "^3.1.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-config", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-config" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-diff/LICENSE b/node_modules/jest-diff/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-diff/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-diff/build/cleanupSemantic.d.ts b/node_modules/jest-diff/build/cleanupSemantic.d.ts deleted file mode 100644 index 044d795b..00000000 --- a/node_modules/jest-diff/build/cleanupSemantic.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Diff Match and Patch - * Copyright 2018 The diff-match-patch Authors. - * https://github.com/google/diff-match-patch - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @fileoverview Computes the difference between two texts to create a patch. - * Applies the patch onto another text, allowing for errors. - * @author fraser@google.com (Neil Fraser) - */ -/** - * CHANGES by pedrottimark to diff_match_patch_uncompressed.ts file: - * - * 1. Delete anything not needed to use diff_cleanupSemantic method - * 2. Convert from prototype properties to var declarations - * 3. Convert Diff to class from constructor and prototype - * 4. Add type annotations for arguments and return values - * 5. Add exports - */ -/** - * The data structure representing a diff is an array of tuples: - * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']] - * which means: delete 'Hello', add 'Goodbye' and keep ' world.' - */ -declare var DIFF_DELETE: number; -declare var DIFF_INSERT: number; -declare var DIFF_EQUAL: number; -/** - * Class representing one diff tuple. - * Attempts to look like a two-element array (which is what this used to be). - * @param {number} op Operation, one of: DIFF_DELETE, DIFF_INSERT, DIFF_EQUAL. - * @param {string} text Text to be deleted, inserted, or retained. - * @constructor - */ -declare class Diff { - 0: number; - 1: string; - constructor(op: number, text: string); -} -/** - * Reduce the number of edits by eliminating semantically trivial equalities. - * @param {!Array.} diffs Array of diff tuples. - */ -declare var diff_cleanupSemantic: (diffs: Diff[]) => void; -export { Diff, DIFF_EQUAL, DIFF_DELETE, DIFF_INSERT, diff_cleanupSemantic as cleanupSemantic, }; -//# sourceMappingURL=cleanupSemantic.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-diff/build/cleanupSemantic.d.ts.map b/node_modules/jest-diff/build/cleanupSemantic.d.ts.map deleted file mode 100644 index 23f9811b..00000000 --- a/node_modules/jest-diff/build/cleanupSemantic.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"cleanupSemantic.d.ts","sourceRoot":"","sources":["../src/cleanupSemantic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;GAIG;AAEH;;;;;;;;GAQG;AAEH;;;;GAIG;AACH,QAAA,IAAI,WAAW,QAAK,CAAC;AACrB,QAAA,IAAI,WAAW,QAAI,CAAC;AACpB,QAAA,IAAI,UAAU,QAAI,CAAC;AAEnB;;;;;;GAMG;AACH,cAAM,IAAI;IACR,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;gBAEE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;CAIrC;AAoHD;;;GAGG;AACF,QAAA,IAAI,oBAAoB,yBA0GxB,CAAC;AAyQF,OAAO,EACL,IAAI,EACJ,UAAU,EACV,WAAW,EACX,WAAW,EACX,oBAAoB,IAAI,eAAe,GACxC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-diff/build/cleanupSemantic.js b/node_modules/jest-diff/build/cleanupSemantic.js deleted file mode 100644 index 6fc0cc26..00000000 --- a/node_modules/jest-diff/build/cleanupSemantic.js +++ /dev/null @@ -1,653 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.cleanupSemantic = exports.DIFF_INSERT = exports.DIFF_DELETE = exports.DIFF_EQUAL = exports.Diff = void 0; - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * Diff Match and Patch - * Copyright 2018 The diff-match-patch Authors. - * https://github.com/google/diff-match-patch - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview Computes the difference between two texts to create a patch. - * Applies the patch onto another text, allowing for errors. - * @author fraser@google.com (Neil Fraser) - */ - -/** - * CHANGES by pedrottimark to diff_match_patch_uncompressed.ts file: - * - * 1. Delete anything not needed to use diff_cleanupSemantic method - * 2. Convert from prototype properties to var declarations - * 3. Convert Diff to class from constructor and prototype - * 4. Add type annotations for arguments and return values - * 5. Add exports - */ - -/** - * The data structure representing a diff is an array of tuples: - * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']] - * which means: delete 'Hello', add 'Goodbye' and keep ' world.' - */ -var DIFF_DELETE = -1; -exports.DIFF_DELETE = DIFF_DELETE; -var DIFF_INSERT = 1; -exports.DIFF_INSERT = DIFF_INSERT; -var DIFF_EQUAL = 0; -/** - * Class representing one diff tuple. - * Attempts to look like a two-element array (which is what this used to be). - * @param {number} op Operation, one of: DIFF_DELETE, DIFF_INSERT, DIFF_EQUAL. - * @param {string} text Text to be deleted, inserted, or retained. - * @constructor - */ - -exports.DIFF_EQUAL = DIFF_EQUAL; - -class Diff { - constructor(op, text) { - _defineProperty(this, 0, void 0); - - _defineProperty(this, 1, void 0); - - this[0] = op; - this[1] = text; - } -} -/** - * Determine the common prefix of two strings. - * @param {string} text1 First string. - * @param {string} text2 Second string. - * @return {number} The number of characters common to the start of each - * string. - */ - -exports.Diff = Diff; - -var diff_commonPrefix = function diff_commonPrefix(text1, text2) { - // Quick check for common null cases. - if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) { - return 0; - } // Binary search. - // Performance analysis: https://neil.fraser.name/news/2007/10/09/ - - var pointermin = 0; - var pointermax = Math.min(text1.length, text2.length); - var pointermid = pointermax; - var pointerstart = 0; - - while (pointermin < pointermid) { - if ( - text1.substring(pointerstart, pointermid) == - text2.substring(pointerstart, pointermid) - ) { - pointermin = pointermid; - pointerstart = pointermin; - } else { - pointermax = pointermid; - } - - pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin); - } - - return pointermid; -}; -/** - * Determine the common suffix of two strings. - * @param {string} text1 First string. - * @param {string} text2 Second string. - * @return {number} The number of characters common to the end of each string. - */ - -var diff_commonSuffix = function diff_commonSuffix(text1, text2) { - // Quick check for common null cases. - if ( - !text1 || - !text2 || - text1.charAt(text1.length - 1) != text2.charAt(text2.length - 1) - ) { - return 0; - } // Binary search. - // Performance analysis: https://neil.fraser.name/news/2007/10/09/ - - var pointermin = 0; - var pointermax = Math.min(text1.length, text2.length); - var pointermid = pointermax; - var pointerend = 0; - - while (pointermin < pointermid) { - if ( - text1.substring(text1.length - pointermid, text1.length - pointerend) == - text2.substring(text2.length - pointermid, text2.length - pointerend) - ) { - pointermin = pointermid; - pointerend = pointermin; - } else { - pointermax = pointermid; - } - - pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin); - } - - return pointermid; -}; -/** - * Determine if the suffix of one string is the prefix of another. - * @param {string} text1 First string. - * @param {string} text2 Second string. - * @return {number} The number of characters common to the end of the first - * string and the start of the second string. - * @private - */ - -var diff_commonOverlap_ = function diff_commonOverlap_(text1, text2) { - // Cache the text lengths to prevent multiple calls. - var text1_length = text1.length; - var text2_length = text2.length; // Eliminate the null case. - - if (text1_length == 0 || text2_length == 0) { - return 0; - } // Truncate the longer string. - - if (text1_length > text2_length) { - text1 = text1.substring(text1_length - text2_length); - } else if (text1_length < text2_length) { - text2 = text2.substring(0, text1_length); - } - - var text_length = Math.min(text1_length, text2_length); // Quick check for the worst case. - - if (text1 == text2) { - return text_length; - } // Start by looking for a single character match - // and increase length until no match is found. - // Performance analysis: https://neil.fraser.name/news/2010/11/04/ - - var best = 0; - var length = 1; - - while (true) { - var pattern = text1.substring(text_length - length); - var found = text2.indexOf(pattern); - - if (found == -1) { - return best; - } - - length += found; - - if ( - found == 0 || - text1.substring(text_length - length) == text2.substring(0, length) - ) { - best = length; - length++; - } - } -}; -/** - * Reduce the number of edits by eliminating semantically trivial equalities. - * @param {!Array.} diffs Array of diff tuples. - */ - -var diff_cleanupSemantic = function diff_cleanupSemantic(diffs) { - var changes = false; - var equalities = []; // Stack of indices where equalities are found. - - var equalitiesLength = 0; // Keeping our own length var is faster in JS. - - /** @type {?string} */ - - var lastEquality = null; // Always equal to diffs[equalities[equalitiesLength - 1]][1] - - var pointer = 0; // Index of current position. - // Number of characters that changed prior to the equality. - - var length_insertions1 = 0; - var length_deletions1 = 0; // Number of characters that changed after the equality. - - var length_insertions2 = 0; - var length_deletions2 = 0; - - while (pointer < diffs.length) { - if (diffs[pointer][0] == DIFF_EQUAL) { - // Equality found. - equalities[equalitiesLength++] = pointer; - length_insertions1 = length_insertions2; - length_deletions1 = length_deletions2; - length_insertions2 = 0; - length_deletions2 = 0; - lastEquality = diffs[pointer][1]; - } else { - // An insertion or deletion. - if (diffs[pointer][0] == DIFF_INSERT) { - length_insertions2 += diffs[pointer][1].length; - } else { - length_deletions2 += diffs[pointer][1].length; - } // Eliminate an equality that is smaller or equal to the edits on both - // sides of it. - - if ( - lastEquality && - lastEquality.length <= - Math.max(length_insertions1, length_deletions1) && - lastEquality.length <= Math.max(length_insertions2, length_deletions2) - ) { - // Duplicate record. - diffs.splice( - equalities[equalitiesLength - 1], - 0, - new Diff(DIFF_DELETE, lastEquality) - ); // Change second copy to insert. - - diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT; // Throw away the equality we just deleted. - - equalitiesLength--; // Throw away the previous equality (it needs to be reevaluated). - - equalitiesLength--; - pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1; - length_insertions1 = 0; // Reset the counters. - - length_deletions1 = 0; - length_insertions2 = 0; - length_deletions2 = 0; - lastEquality = null; - changes = true; - } - } - - pointer++; - } // Normalize the diff. - - if (changes) { - diff_cleanupMerge(diffs); - } - - diff_cleanupSemanticLossless(diffs); // Find any overlaps between deletions and insertions. - // e.g: abcxxxxxxdef - // -> abcxxxdef - // e.g: xxxabcdefxxx - // -> defxxxabc - // Only extract an overlap if it is as big as the edit ahead or behind it. - - pointer = 1; - - while (pointer < diffs.length) { - if ( - diffs[pointer - 1][0] == DIFF_DELETE && - diffs[pointer][0] == DIFF_INSERT - ) { - var deletion = diffs[pointer - 1][1]; - var insertion = diffs[pointer][1]; - var overlap_length1 = diff_commonOverlap_(deletion, insertion); - var overlap_length2 = diff_commonOverlap_(insertion, deletion); - - if (overlap_length1 >= overlap_length2) { - if ( - overlap_length1 >= deletion.length / 2 || - overlap_length1 >= insertion.length / 2 - ) { - // Overlap found. Insert an equality and trim the surrounding edits. - diffs.splice( - pointer, - 0, - new Diff(DIFF_EQUAL, insertion.substring(0, overlap_length1)) - ); - diffs[pointer - 1][1] = deletion.substring( - 0, - deletion.length - overlap_length1 - ); - diffs[pointer + 1][1] = insertion.substring(overlap_length1); - pointer++; - } - } else { - if ( - overlap_length2 >= deletion.length / 2 || - overlap_length2 >= insertion.length / 2 - ) { - // Reverse overlap found. - // Insert an equality and swap and trim the surrounding edits. - diffs.splice( - pointer, - 0, - new Diff(DIFF_EQUAL, deletion.substring(0, overlap_length2)) - ); - diffs[pointer - 1][0] = DIFF_INSERT; - diffs[pointer - 1][1] = insertion.substring( - 0, - insertion.length - overlap_length2 - ); - diffs[pointer + 1][0] = DIFF_DELETE; - diffs[pointer + 1][1] = deletion.substring(overlap_length2); - pointer++; - } - } - - pointer++; - } - - pointer++; - } -}; -/** - * Look for single edits surrounded on both sides by equalities - * which can be shifted sideways to align the edit to a word boundary. - * e.g: The cat came. -> The cat came. - * @param {!Array.} diffs Array of diff tuples. - */ - -exports.cleanupSemantic = diff_cleanupSemantic; - -var diff_cleanupSemanticLossless = function diff_cleanupSemanticLossless( - diffs -) { - /** - * Given two strings, compute a score representing whether the internal - * boundary falls on logical boundaries. - * Scores range from 6 (best) to 0 (worst). - * Closure, but does not reference any external variables. - * @param {string} one First string. - * @param {string} two Second string. - * @return {number} The score. - * @private - */ - function diff_cleanupSemanticScore_(one, two) { - if (!one || !two) { - // Edges are the best. - return 6; - } // Each port of this function behaves slightly differently due to - // subtle differences in each language's definition of things like - // 'whitespace'. Since this function's purpose is largely cosmetic, - // the choice has been made to use each language's native features - // rather than force total conformity. - - var char1 = one.charAt(one.length - 1); - var char2 = two.charAt(0); - var nonAlphaNumeric1 = char1.match(nonAlphaNumericRegex_); - var nonAlphaNumeric2 = char2.match(nonAlphaNumericRegex_); - var whitespace1 = nonAlphaNumeric1 && char1.match(whitespaceRegex_); - var whitespace2 = nonAlphaNumeric2 && char2.match(whitespaceRegex_); - var lineBreak1 = whitespace1 && char1.match(linebreakRegex_); - var lineBreak2 = whitespace2 && char2.match(linebreakRegex_); - var blankLine1 = lineBreak1 && one.match(blanklineEndRegex_); - var blankLine2 = lineBreak2 && two.match(blanklineStartRegex_); - - if (blankLine1 || blankLine2) { - // Five points for blank lines. - return 5; - } else if (lineBreak1 || lineBreak2) { - // Four points for line breaks. - return 4; - } else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) { - // Three points for end of sentences. - return 3; - } else if (whitespace1 || whitespace2) { - // Two points for whitespace. - return 2; - } else if (nonAlphaNumeric1 || nonAlphaNumeric2) { - // One point for non-alphanumeric. - return 1; - } - - return 0; - } - - var pointer = 1; // Intentionally ignore the first and last element (don't need checking). - - while (pointer < diffs.length - 1) { - if ( - diffs[pointer - 1][0] == DIFF_EQUAL && - diffs[pointer + 1][0] == DIFF_EQUAL - ) { - // This is a single edit surrounded by equalities. - var equality1 = diffs[pointer - 1][1]; - var edit = diffs[pointer][1]; - var equality2 = diffs[pointer + 1][1]; // First, shift the edit as far left as possible. - - var commonOffset = diff_commonSuffix(equality1, edit); - - if (commonOffset) { - var commonString = edit.substring(edit.length - commonOffset); - equality1 = equality1.substring(0, equality1.length - commonOffset); - edit = commonString + edit.substring(0, edit.length - commonOffset); - equality2 = commonString + equality2; - } // Second, step character by character right, looking for the best fit. - - var bestEquality1 = equality1; - var bestEdit = edit; - var bestEquality2 = equality2; - var bestScore = - diff_cleanupSemanticScore_(equality1, edit) + - diff_cleanupSemanticScore_(edit, equality2); - - while (edit.charAt(0) === equality2.charAt(0)) { - equality1 += edit.charAt(0); - edit = edit.substring(1) + equality2.charAt(0); - equality2 = equality2.substring(1); - var score = - diff_cleanupSemanticScore_(equality1, edit) + - diff_cleanupSemanticScore_(edit, equality2); // The >= encourages trailing rather than leading whitespace on edits. - - if (score >= bestScore) { - bestScore = score; - bestEquality1 = equality1; - bestEdit = edit; - bestEquality2 = equality2; - } - } - - if (diffs[pointer - 1][1] != bestEquality1) { - // We have an improvement, save it back to the diff. - if (bestEquality1) { - diffs[pointer - 1][1] = bestEquality1; - } else { - diffs.splice(pointer - 1, 1); - pointer--; - } - - diffs[pointer][1] = bestEdit; - - if (bestEquality2) { - diffs[pointer + 1][1] = bestEquality2; - } else { - diffs.splice(pointer + 1, 1); - pointer--; - } - } - } - - pointer++; - } -}; // Define some regex patterns for matching boundaries. - -var nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/; -var whitespaceRegex_ = /\s/; -var linebreakRegex_ = /[\r\n]/; -var blanklineEndRegex_ = /\n\r?\n$/; -var blanklineStartRegex_ = /^\r?\n\r?\n/; -/** - * Reorder and merge like edit sections. Merge equalities. - * Any edit section can move as long as it doesn't cross an equality. - * @param {!Array.} diffs Array of diff tuples. - */ - -var diff_cleanupMerge = function diff_cleanupMerge(diffs) { - // Add a dummy entry at the end. - diffs.push(new Diff(DIFF_EQUAL, '')); - var pointer = 0; - var count_delete = 0; - var count_insert = 0; - var text_delete = ''; - var text_insert = ''; - var commonlength; - - while (pointer < diffs.length) { - switch (diffs[pointer][0]) { - case DIFF_INSERT: - count_insert++; - text_insert += diffs[pointer][1]; - pointer++; - break; - - case DIFF_DELETE: - count_delete++; - text_delete += diffs[pointer][1]; - pointer++; - break; - - case DIFF_EQUAL: - // Upon reaching an equality, check for prior redundancies. - if (count_delete + count_insert > 1) { - if (count_delete !== 0 && count_insert !== 0) { - // Factor out any common prefixies. - commonlength = diff_commonPrefix(text_insert, text_delete); - - if (commonlength !== 0) { - if ( - pointer - count_delete - count_insert > 0 && - diffs[pointer - count_delete - count_insert - 1][0] == - DIFF_EQUAL - ) { - diffs[ - pointer - count_delete - count_insert - 1 - ][1] += text_insert.substring(0, commonlength); - } else { - diffs.splice( - 0, - 0, - new Diff(DIFF_EQUAL, text_insert.substring(0, commonlength)) - ); - pointer++; - } - - text_insert = text_insert.substring(commonlength); - text_delete = text_delete.substring(commonlength); - } // Factor out any common suffixies. - - commonlength = diff_commonSuffix(text_insert, text_delete); - - if (commonlength !== 0) { - diffs[pointer][1] = - text_insert.substring(text_insert.length - commonlength) + - diffs[pointer][1]; - text_insert = text_insert.substring( - 0, - text_insert.length - commonlength - ); - text_delete = text_delete.substring( - 0, - text_delete.length - commonlength - ); - } - } // Delete the offending records and add the merged ones. - - pointer -= count_delete + count_insert; - diffs.splice(pointer, count_delete + count_insert); - - if (text_delete.length) { - diffs.splice(pointer, 0, new Diff(DIFF_DELETE, text_delete)); - pointer++; - } - - if (text_insert.length) { - diffs.splice(pointer, 0, new Diff(DIFF_INSERT, text_insert)); - pointer++; - } - - pointer++; - } else if (pointer !== 0 && diffs[pointer - 1][0] == DIFF_EQUAL) { - // Merge this equality with the previous one. - diffs[pointer - 1][1] += diffs[pointer][1]; - diffs.splice(pointer, 1); - } else { - pointer++; - } - - count_insert = 0; - count_delete = 0; - text_delete = ''; - text_insert = ''; - break; - } - } - - if (diffs[diffs.length - 1][1] === '') { - diffs.pop(); // Remove the dummy entry at the end. - } // Second pass: look for single edits surrounded on both sides by equalities - // which can be shifted sideways to eliminate an equality. - // e.g: ABAC -> ABAC - - var changes = false; - pointer = 1; // Intentionally ignore the first and last element (don't need checking). - - while (pointer < diffs.length - 1) { - if ( - diffs[pointer - 1][0] == DIFF_EQUAL && - diffs[pointer + 1][0] == DIFF_EQUAL - ) { - // This is a single edit surrounded by equalities. - if ( - diffs[pointer][1].substring( - diffs[pointer][1].length - diffs[pointer - 1][1].length - ) == diffs[pointer - 1][1] - ) { - // Shift the edit over the previous equality. - diffs[pointer][1] = - diffs[pointer - 1][1] + - diffs[pointer][1].substring( - 0, - diffs[pointer][1].length - diffs[pointer - 1][1].length - ); - diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1]; - diffs.splice(pointer - 1, 1); - changes = true; - } else if ( - diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) == - diffs[pointer + 1][1] - ) { - // Shift the edit over the next equality. - diffs[pointer - 1][1] += diffs[pointer + 1][1]; - diffs[pointer][1] = - diffs[pointer][1].substring(diffs[pointer + 1][1].length) + - diffs[pointer + 1][1]; - diffs.splice(pointer + 1, 1); - changes = true; - } - } - - pointer++; - } // If shifts were made, the diff needs reordering and another shift sweep. - - if (changes) { - diff_cleanupMerge(diffs); - } -}; diff --git a/node_modules/jest-diff/build/constants.d.ts b/node_modules/jest-diff/build/constants.d.ts deleted file mode 100644 index af1c50cd..00000000 --- a/node_modules/jest-diff/build/constants.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare const NO_DIFF_MESSAGE: string; -export declare const SIMILAR_MESSAGE: string; -//# sourceMappingURL=constants.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-diff/build/constants.d.ts.map b/node_modules/jest-diff/build/constants.d.ts.map deleted file mode 100644 index 7c2c7a67..00000000 --- a/node_modules/jest-diff/build/constants.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,eAAO,MAAM,eAAe,QAE3B,CAAC;AAEF,eAAO,MAAM,eAAe,QAG3B,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-diff/build/constants.js b/node_modules/jest-diff/build/constants.js deleted file mode 100644 index 2a0d2cd3..00000000 --- a/node_modules/jest-diff/build/constants.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.SIMILAR_MESSAGE = exports.NO_DIFF_MESSAGE = void 0; - -var _chalk = _interopRequireDefault(require('chalk')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const NO_DIFF_MESSAGE = _chalk.default.dim( - 'Compared values have no visual difference.' -); - -exports.NO_DIFF_MESSAGE = NO_DIFF_MESSAGE; - -const SIMILAR_MESSAGE = _chalk.default.dim( - 'Compared values serialize to the same structure.\n' + - 'Printing internal object structure without calling `toJSON` instead.' -); - -exports.SIMILAR_MESSAGE = SIMILAR_MESSAGE; diff --git a/node_modules/jest-diff/build/diffLines.d.ts b/node_modules/jest-diff/build/diffLines.d.ts deleted file mode 100644 index a1bc0d4f..00000000 --- a/node_modules/jest-diff/build/diffLines.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { DiffOptions } from './types'; -declare type Original = { - a: string; - b: string; -}; -declare const _default: (a: string, b: string, options?: DiffOptions | undefined, original?: Original | undefined) => string; -export default _default; -//# sourceMappingURL=diffLines.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-diff/build/diffLines.d.ts.map b/node_modules/jest-diff/build/diffLines.d.ts.map deleted file mode 100644 index 61b910a0..00000000 --- a/node_modules/jest-diff/build/diffLines.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"diffLines.d.ts","sourceRoot":"","sources":["../src/diffLines.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAIpC,aAAK,QAAQ,GAAG;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;;AAmQF,wBA6CE"} \ No newline at end of file diff --git a/node_modules/jest-diff/build/diffLines.js b/node_modules/jest-diff/build/diffLines.js deleted file mode 100644 index 7c9f5ac6..00000000 --- a/node_modules/jest-diff/build/diffLines.js +++ /dev/null @@ -1,290 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _chalk = _interopRequireDefault(require('chalk')); - -var _diffSequences = _interopRequireDefault(require('diff-sequences')); - -var _constants = require('./constants'); - -var _printDiffs = require('./printDiffs'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const DIFF_CONTEXT_DEFAULT = 5; -const fgDelete = _chalk.default.green; -const fgInsert = _chalk.default.red; -const fgCommon = _chalk.default.dim; // common lines (even indentation same) - -const fgIndent = _chalk.default.cyan; // common lines (only indentation different) - -const bgCommon = _chalk.default.bgYellow; // edge spaces in common line (even indentation same) - -const bgInverse = _chalk.default.inverse; // edge spaces in any other lines -// ONLY trailing if expected value is snapshot or multiline string. - -const highlightTrailingSpaces = (line, bgColor) => - line.replace(/\s+$/, bgColor('$&')); // BOTH leading AND trailing if expected value is data structure. - -const highlightLeadingTrailingSpaces = ( - line, - bgColor // If line consists of ALL spaces: highlight all of them. -) => - highlightTrailingSpaces(line, bgColor).replace( - // If line has an ODD length of leading spaces: highlight only the LAST. - /^(\s\s)*(\s)(?=[^\s])/, - '$1' + bgColor('$2') - ); - -const getHighlightSpaces = bothEdges => - bothEdges ? highlightLeadingTrailingSpaces : highlightTrailingSpaces; - -// Given index interval in expected lines, put formatted delete lines. -const formatDelete = (aStart, aEnd, aLinesUn, aLinesIn, put) => { - const highlightSpaces = getHighlightSpaces(aLinesUn !== aLinesIn); - - for (let aIndex = aStart; aIndex !== aEnd; aIndex += 1) { - const aLineUn = aLinesUn[aIndex]; - const aLineIn = aLinesIn[aIndex]; - const indentation = aLineIn.slice(0, aLineIn.length - aLineUn.length); - put(fgDelete('- ' + indentation + highlightSpaces(aLineUn, bgInverse))); - } -}; // Given index interval in received lines, put formatted insert lines. - -const formatInsert = (bStart, bEnd, bLinesUn, bLinesIn, put) => { - const highlightSpaces = getHighlightSpaces(bLinesUn !== bLinesIn); - - for (let bIndex = bStart; bIndex !== bEnd; bIndex += 1) { - const bLineUn = bLinesUn[bIndex]; - const bLineIn = bLinesIn[bIndex]; - const indentation = bLineIn.slice(0, bLineIn.length - bLineUn.length); - put(fgInsert('+ ' + indentation + highlightSpaces(bLineUn, bgInverse))); - } -}; // Given the number of items and starting indexes of a common subsequence, -// put formatted common lines. - -const formatCommon = ( - nCommon, - aCommon, - bCommon, - aLinesIn, - bLinesUn, - bLinesIn, - put -) => { - const highlightSpaces = getHighlightSpaces(bLinesUn !== bLinesIn); - - for (; nCommon !== 0; nCommon -= 1, aCommon += 1, bCommon += 1) { - const bLineUn = bLinesUn[bCommon]; - const bLineIn = bLinesIn[bCommon]; - const bLineInLength = bLineIn.length; // For common lines, received indentation seems more intuitive. - - const indentation = bLineIn.slice(0, bLineInLength - bLineUn.length); // Color shows whether expected and received line has same indentation. - - const hasSameIndentation = aLinesIn[aCommon].length === bLineInLength; - const fg = hasSameIndentation ? fgCommon : fgIndent; - const bg = hasSameIndentation ? bgCommon : bgInverse; - put(fg(' ' + indentation + highlightSpaces(bLineUn, bg))); - } -}; // jest --expand -// Return formatted diff as joined string of all lines. - -const diffExpand = (aLinesUn, bLinesUn, aLinesIn, bLinesIn) => { - const isCommon = (aIndex, bIndex) => aLinesUn[aIndex] === bLinesUn[bIndex]; - - const array = []; - - const put = line => { - array.push(line); - }; - - let aStart = 0; - let bStart = 0; - - const foundSubsequence = (nCommon, aCommon, bCommon) => { - formatDelete(aStart, aCommon, aLinesUn, aLinesIn, put); - formatInsert(bStart, bCommon, bLinesUn, bLinesIn, put); - formatCommon(nCommon, aCommon, bCommon, aLinesIn, bLinesUn, bLinesIn, put); - aStart = aCommon + nCommon; - bStart = bCommon + nCommon; - }; - - const aLength = aLinesUn.length; - const bLength = bLinesUn.length; - (0, _diffSequences.default)(aLength, bLength, isCommon, foundSubsequence); // After the last common subsequence, format remaining change lines. - - formatDelete(aStart, aLength, aLinesUn, aLinesIn, put); - formatInsert(bStart, bLength, bLinesUn, bLinesIn, put); - return array.join('\n'); -}; - -const getContextLines = options => - options && - typeof options.contextLines === 'number' && - options.contextLines >= 0 - ? options.contextLines - : DIFF_CONTEXT_DEFAULT; // jest --no-expand -// Return joined string of formatted diff for all change lines, -// but if some common lines are omitted because there are more than the context, -// then a “patch mark” precedes each set of adjacent changed and common lines. - -const diffNoExpand = ( - aLinesUn, - bLinesUn, - aLinesIn, - bLinesIn, - nContextLines -) => { - const isCommon = (aIndex, bIndex) => aLinesUn[aIndex] === bLinesUn[bIndex]; - - let iPatchMark = 0; // index of placeholder line for patch mark - - const array = ['']; - - const put = line => { - array.push(line); - }; - - let isAtEnd = false; - const aLength = aLinesUn.length; - const bLength = bLinesUn.length; - const nContextLines2 = nContextLines + nContextLines; // Initialize the first patch for changes at the start, - // especially for edge case in which there is no common subsequence. - - let aStart = 0; - let aEnd = 0; - let bStart = 0; - let bEnd = 0; // Given the number of items and starting indexes of each common subsequence, - // format any preceding change lines, and then common context lines. - - const foundSubsequence = (nCommon, aStartCommon, bStartCommon) => { - const aEndCommon = aStartCommon + nCommon; - const bEndCommon = bStartCommon + nCommon; - isAtEnd = aEndCommon === aLength && bEndCommon === bLength; // If common subsequence is at start, re-initialize the first patch. - - if (aStartCommon === 0 && bStartCommon === 0) { - const nLines = nContextLines < nCommon ? nContextLines : nCommon; - aStart = aEndCommon - nLines; - bStart = bEndCommon - nLines; - formatCommon(nLines, aStart, bStart, aLinesIn, bLinesUn, bLinesIn, put); - aEnd = aEndCommon; - bEnd = bEndCommon; - return; - } // Format preceding change lines. - - formatDelete(aEnd, aStartCommon, aLinesUn, aLinesIn, put); - formatInsert(bEnd, bStartCommon, bLinesUn, bLinesIn, put); - aEnd = aStartCommon; - bEnd = bStartCommon; // If common subsequence is at end, then context follows preceding changes; - // else context follows preceding changes AND precedes following changes. - - const maxContextLines = isAtEnd ? nContextLines : nContextLines2; - - if (nCommon <= maxContextLines) { - // The patch includes all lines in the common subsequence. - formatCommon(nCommon, aEnd, bEnd, aLinesIn, bLinesUn, bLinesIn, put); - aEnd += nCommon; - bEnd += nCommon; - return; - } // The patch ends because context is less than number of common lines. - - formatCommon(nContextLines, aEnd, bEnd, aLinesIn, bLinesUn, bLinesIn, put); - aEnd += nContextLines; - bEnd += nContextLines; - array[iPatchMark] = (0, _printDiffs.createPatchMark)( - aStart, - aEnd, - bStart, - bEnd - ); // If common subsequence is not at end, another patch follows it. - - if (!isAtEnd) { - iPatchMark = array.length; // index of placeholder line - - array[iPatchMark] = ''; - const nLines = nContextLines < nCommon ? nContextLines : nCommon; - aStart = aEndCommon - nLines; - bStart = bEndCommon - nLines; - formatCommon(nLines, aStart, bStart, aLinesIn, bLinesUn, bLinesIn, put); - aEnd = aEndCommon; - bEnd = bEndCommon; - } - }; - - (0, _diffSequences.default)(aLength, bLength, isCommon, foundSubsequence); // If no common subsequence or last was not at end, format remaining change lines. - - if (!isAtEnd) { - formatDelete(aEnd, aLength, aLinesUn, aLinesIn, put); - formatInsert(bEnd, bLength, bLinesUn, bLinesIn, put); - aEnd = aLength; - bEnd = bLength; - } - - if (aStart === 0 && aEnd === aLength && bStart === 0 && bEnd === bLength) { - array.splice(0, 1); // delete placeholder line for patch mark - } else { - array[iPatchMark] = (0, _printDiffs.createPatchMark)( - aStart, - aEnd, - bStart, - bEnd - ); - } - - return array.join('\n'); -}; - -var _default = (a, b, options, original) => { - if (a === b) { - return _constants.NO_DIFF_MESSAGE; - } - - let aLinesUn = a.split('\n'); - let bLinesUn = b.split('\n'); // Indentation is unknown if expected value is snapshot or multiline string. - - let aLinesIn = aLinesUn; - let bLinesIn = bLinesUn; - - if (original) { - // Indentation is known if expected value is data structure: - // Compare lines without indentation and format lines with indentation. - aLinesIn = original.a.split('\n'); - bLinesIn = original.b.split('\n'); - - if ( - aLinesUn.length !== aLinesIn.length || - bLinesUn.length !== bLinesIn.length - ) { - // Fall back if unindented and indented lines are inconsistent. - aLinesUn = aLinesIn; - bLinesUn = bLinesIn; - } - } - - return ( - (0, _printDiffs.printAnnotation)(options) + - (options && options.expand === false - ? diffNoExpand( - aLinesUn, - bLinesUn, - aLinesIn, - bLinesIn, - getContextLines(options) - ) - : diffExpand(aLinesUn, bLinesUn, aLinesIn, bLinesIn)) - ); -}; - -exports.default = _default; diff --git a/node_modules/jest-diff/build/diffStrings.d.ts b/node_modules/jest-diff/build/diffStrings.d.ts deleted file mode 100644 index ef09a73a..00000000 --- a/node_modules/jest-diff/build/diffStrings.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Diff } from './cleanupSemantic'; -declare const diffStrings: (a: string, b: string) => Diff[]; -export default diffStrings; -//# sourceMappingURL=diffStrings.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-diff/build/diffStrings.d.ts.map b/node_modules/jest-diff/build/diffStrings.d.ts.map deleted file mode 100644 index 9d3f9018..00000000 --- a/node_modules/jest-diff/build/diffStrings.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"diffStrings.d.ts","sourceRoot":"","sources":["../src/diffStrings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAC,IAAI,EAAuC,MAAM,mBAAmB,CAAC;AAE7E,QAAA,MAAM,WAAW,kCAmChB,CAAC;AAEF,eAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-diff/build/diffStrings.js b/node_modules/jest-diff/build/diffStrings.js deleted file mode 100644 index 3ad4f1a5..00000000 --- a/node_modules/jest-diff/build/diffStrings.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _diffSequences = _interopRequireDefault(require('diff-sequences')); - -var _cleanupSemantic = require('./cleanupSemantic'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const diffStrings = (a, b) => { - const isCommon = (aIndex, bIndex) => a[aIndex] === b[bIndex]; - - let aIndex = 0; - let bIndex = 0; - const diffs = []; - - const foundSubsequence = (nCommon, aCommon, bCommon) => { - if (aIndex !== aCommon) { - diffs.push( - new _cleanupSemantic.Diff( - _cleanupSemantic.DIFF_DELETE, - a.slice(aIndex, aCommon) - ) - ); - } - - if (bIndex !== bCommon) { - diffs.push( - new _cleanupSemantic.Diff( - _cleanupSemantic.DIFF_INSERT, - b.slice(bIndex, bCommon) - ) - ); - } - - aIndex = aCommon + nCommon; // number of characters compared in a - - bIndex = bCommon + nCommon; // number of characters compared in b - - diffs.push( - new _cleanupSemantic.Diff( - _cleanupSemantic.DIFF_EQUAL, - b.slice(bCommon, bIndex) - ) - ); - }; - - (0, _diffSequences.default)(a.length, b.length, isCommon, foundSubsequence); // After the last common subsequence, push remaining change items. - - if (aIndex !== a.length) { - diffs.push( - new _cleanupSemantic.Diff(_cleanupSemantic.DIFF_DELETE, a.slice(aIndex)) - ); - } - - if (bIndex !== b.length) { - diffs.push( - new _cleanupSemantic.Diff(_cleanupSemantic.DIFF_INSERT, b.slice(bIndex)) - ); - } - - return diffs; -}; - -var _default = diffStrings; -exports.default = _default; diff --git a/node_modules/jest-diff/build/getAlignedDiffs.d.ts b/node_modules/jest-diff/build/getAlignedDiffs.d.ts deleted file mode 100644 index 39001fb8..00000000 --- a/node_modules/jest-diff/build/getAlignedDiffs.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Diff } from './cleanupSemantic'; -declare const getAlignedDiffs: (diffs: Diff[]) => Diff[]; -export default getAlignedDiffs; -//# sourceMappingURL=getAlignedDiffs.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-diff/build/getAlignedDiffs.d.ts.map b/node_modules/jest-diff/build/getAlignedDiffs.d.ts.map deleted file mode 100644 index 21b66592..00000000 --- a/node_modules/jest-diff/build/getAlignedDiffs.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getAlignedDiffs.d.ts","sourceRoot":"","sources":["../src/getAlignedDiffs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,IAAI,EAA2B,MAAM,mBAAmB,CAAC;AAuKjE,QAAA,MAAM,eAAe,2BAqBpB,CAAC;AAEF,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-diff/build/getAlignedDiffs.js b/node_modules/jest-diff/build/getAlignedDiffs.js deleted file mode 100644 index af5dc400..00000000 --- a/node_modules/jest-diff/build/getAlignedDiffs.js +++ /dev/null @@ -1,215 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _cleanupSemantic = require('./cleanupSemantic'); - -var _printDiffs = require('./printDiffs'); - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -// Encapsulate change lines until either a common newline or the end. -class ChangeBuffer { - // incomplete line - // complete lines - constructor(op) { - _defineProperty(this, 'op', void 0); - - _defineProperty(this, 'line', void 0); - - _defineProperty(this, 'lines', void 0); - - this.op = op; - this.line = []; - this.lines = []; - } - - pushSubstring(substring) { - this.pushDiff(new _cleanupSemantic.Diff(this.op, substring)); - } - - pushLine() { - // Assume call only if line has at least one diff, - // therefore an empty line must have a diff which has an empty string. - this.lines.push( - new _cleanupSemantic.Diff( - this.op, - (0, _printDiffs.getHighlightedString)(this.op, this.line) - ) - ); - this.line.length = 0; - } - - isLineEmpty() { - return this.line.length === 0; - } // Minor input to buffer. - - pushDiff(diff) { - this.line.push(diff); - } // Main input to buffer. - - align(diff) { - const string = diff[1]; - - if (_printDiffs.MULTILINE_REGEXP.test(string)) { - const substrings = string.split('\n'); - const iLast = substrings.length - 1; - substrings.forEach((substring, i) => { - if (i < iLast) { - // The first substring completes the current change line. - // A middle substring is a change line. - this.pushSubstring(substring); - this.pushLine(); - } else if (substring.length !== 0) { - // The last substring starts a change line, if it is not empty. - // Important: This non-empty condition also automatically omits - // the newline appended to the end of expected and received strings. - this.pushSubstring(substring); - } - }); - } else { - // Append non-multiline string to current change line. - this.pushDiff(diff); - } - } // Output from buffer. - - moveLinesTo(lines) { - if (!this.isLineEmpty()) { - this.pushLine(); - } - - lines.push(...this.lines); - this.lines.length = 0; - } -} // Encapsulate common and change lines. - -class CommonBuffer { - constructor(deleteBuffer, insertBuffer) { - _defineProperty(this, 'deleteBuffer', void 0); - - _defineProperty(this, 'insertBuffer', void 0); - - _defineProperty(this, 'lines', void 0); - - this.deleteBuffer = deleteBuffer; - this.insertBuffer = insertBuffer; - this.lines = []; - } - - pushDiffCommonLine(diff) { - this.lines.push(diff); - } - - pushDiffChangeLines(diff) { - const isDiffEmpty = diff[1].length === 0; // An empty diff string is redundant, unless a change line is empty. - - if (!isDiffEmpty || this.deleteBuffer.isLineEmpty()) { - this.deleteBuffer.pushDiff(diff); - } - - if (!isDiffEmpty || this.insertBuffer.isLineEmpty()) { - this.insertBuffer.pushDiff(diff); - } - } - - flushChangeLines() { - this.deleteBuffer.moveLinesTo(this.lines); - this.insertBuffer.moveLinesTo(this.lines); - } // Input to buffer. - - align(diff) { - const op = diff[0]; - const string = diff[1]; - - if (_printDiffs.MULTILINE_REGEXP.test(string)) { - const substrings = string.split('\n'); - const iLast = substrings.length - 1; - substrings.forEach((substring, i) => { - if (i === 0) { - const subdiff = new _cleanupSemantic.Diff(op, substring); - - if ( - this.deleteBuffer.isLineEmpty() && - this.insertBuffer.isLineEmpty() - ) { - // If both current change lines are empty, - // then the first substring is a common line. - this.flushChangeLines(); - this.pushDiffCommonLine(subdiff); - } else { - // If either current change line is non-empty, - // then the first substring completes the change lines. - this.pushDiffChangeLines(subdiff); - this.flushChangeLines(); - } - } else if (i < iLast) { - // A middle substring is a common line. - this.pushDiffCommonLine(new _cleanupSemantic.Diff(op, substring)); - } else if (substring.length !== 0) { - // The last substring starts a change line, if it is not empty. - // Important: This non-empty condition also automatically omits - // the newline appended to the end of expected and received strings. - this.pushDiffChangeLines(new _cleanupSemantic.Diff(op, substring)); - } - }); - } else { - // Append non-multiline string to current change lines. - // Important: It cannot be at the end following empty change lines, - // because newline appended to the end of expected and received strings. - this.pushDiffChangeLines(diff); - } - } // Output from buffer. - - getLines() { - this.flushChangeLines(); - return this.lines; - } -} // Given diffs from expected and received strings, -// return new array of diffs split or joined into lines. -// -// To correctly align a change line at the end, the algorithm: -// * assumes that a newline was appended to the strings -// * omits the last newline from the output array -// -// Assume the function is not called: -// * if either expected or received is empty string -// * if neither expected nor received is multiline string - -const getAlignedDiffs = diffs => { - const deleteBuffer = new ChangeBuffer(_cleanupSemantic.DIFF_DELETE); - const insertBuffer = new ChangeBuffer(_cleanupSemantic.DIFF_INSERT); - const commonBuffer = new CommonBuffer(deleteBuffer, insertBuffer); - diffs.forEach(diff => { - switch (diff[0]) { - case _cleanupSemantic.DIFF_DELETE: - deleteBuffer.align(diff); - break; - - case _cleanupSemantic.DIFF_INSERT: - insertBuffer.align(diff); - break; - - default: - commonBuffer.align(diff); - } - }); - return commonBuffer.getLines(); -}; - -var _default = getAlignedDiffs; -exports.default = _default; diff --git a/node_modules/jest-diff/build/index.d.ts b/node_modules/jest-diff/build/index.d.ts deleted file mode 100644 index 321bdd6c..00000000 --- a/node_modules/jest-diff/build/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { DiffOptions as JestDiffOptions } from './types'; -declare function diff(a: any, b: any, options?: JestDiffOptions): string | null; -declare namespace diff { - var getStringDiff: (expected: string, received: string, options?: JestDiffOptions | undefined) => { - isMultiline: true; - annotatedDiff: string; - } | { - isMultiline: false; - a: string; - b: string; - } | null; -} -declare namespace diff { - type DiffOptions = JestDiffOptions; -} -export = diff; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-diff/build/index.d.ts.map b/node_modules/jest-diff/build/index.d.ts.map deleted file mode 100644 index dfaa9a2c..00000000 --- a/node_modules/jest-diff/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,OAAO,EAAC,WAAW,IAAI,eAAe,EAAC,MAAM,SAAS,CAAC;AAgCvD,iBAAS,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CAgDtE;kBAhDQ,IAAI;;;;;;;;;;AAiHb,kBAAU,IAAI,CAAC;IACb,KAAY,WAAW,GAAG,eAAe,CAAC;CAC3C;AAID,SAAS,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-diff/build/index.js b/node_modules/jest-diff/build/index.js deleted file mode 100644 index 37d53166..00000000 --- a/node_modules/jest-diff/build/index.js +++ /dev/null @@ -1,199 +0,0 @@ -'use strict'; - -var _prettyFormat = _interopRequireDefault(require('pretty-format')); - -var _chalk = _interopRequireDefault(require('chalk')); - -var _jestGetType = _interopRequireDefault(require('jest-get-type')); - -var _diffLines = _interopRequireDefault(require('./diffLines')); - -var _printDiffs = require('./printDiffs'); - -var _constants = require('./constants'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const _prettyFormat$plugins = _prettyFormat.default.plugins, - AsymmetricMatcher = _prettyFormat$plugins.AsymmetricMatcher, - DOMCollection = _prettyFormat$plugins.DOMCollection, - DOMElement = _prettyFormat$plugins.DOMElement, - Immutable = _prettyFormat$plugins.Immutable, - ReactElement = _prettyFormat$plugins.ReactElement, - ReactTestComponent = _prettyFormat$plugins.ReactTestComponent; -const PLUGINS = [ - ReactTestComponent, - ReactElement, - DOMElement, - DOMCollection, - Immutable, - AsymmetricMatcher -]; -const FORMAT_OPTIONS = { - plugins: PLUGINS -}; - -const FORMAT_OPTIONS_0 = _objectSpread({}, FORMAT_OPTIONS, { - indent: 0 -}); - -const FALLBACK_FORMAT_OPTIONS = { - callToJSON: false, - maxDepth: 10, - plugins: PLUGINS -}; - -const FALLBACK_FORMAT_OPTIONS_0 = _objectSpread({}, FALLBACK_FORMAT_OPTIONS, { - indent: 0 -}); // Generate a string that will highlight the difference between two values -// with green and red. (similar to how github does code diffing) - -function diff(a, b, options) { - if (Object.is(a, b)) { - return _constants.NO_DIFF_MESSAGE; - } - - const aType = (0, _jestGetType.default)(a); - let expectedType = aType; - let omitDifference = false; - - if (aType === 'object' && typeof a.asymmetricMatch === 'function') { - if (a.$$typeof !== Symbol.for('jest.asymmetricMatcher')) { - // Do not know expected type of user-defined asymmetric matcher. - return null; - } - - if (typeof a.getExpectedType !== 'function') { - // For example, expect.anything() matches either null or undefined - return null; - } - - expectedType = a.getExpectedType(); // Primitive types boolean and number omit difference below. - // For example, omit difference for expect.stringMatching(regexp) - - omitDifference = expectedType === 'string'; - } - - if (expectedType !== (0, _jestGetType.default)(b)) { - return ( - ' Comparing two different types of values.' + - ` Expected ${_chalk.default.green(expectedType)} but ` + - `received ${_chalk.default.red((0, _jestGetType.default)(b))}.` - ); - } - - if (omitDifference) { - return null; - } - - switch (aType) { - case 'string': - return (0, _diffLines.default)(a, b, options); - - case 'boolean': - case 'number': - return comparePrimitive(a, b, options); - - case 'map': - return compareObjects(sortMap(a), sortMap(b), options); - - case 'set': - return compareObjects(sortSet(a), sortSet(b), options); - - default: - return compareObjects(a, b, options); - } -} - -function comparePrimitive(a, b, options) { - return (0, _diffLines.default)( - (0, _prettyFormat.default)(a, FORMAT_OPTIONS), - (0, _prettyFormat.default)(b, FORMAT_OPTIONS), - options - ); -} - -function sortMap(map) { - return new Map(Array.from(map.entries()).sort()); -} - -function sortSet(set) { - return new Set(Array.from(set.values()).sort()); -} - -function compareObjects(a, b, options) { - let diffMessage; - let hasThrown = false; - - try { - diffMessage = (0, _diffLines.default)( - (0, _prettyFormat.default)(a, FORMAT_OPTIONS_0), - (0, _prettyFormat.default)(b, FORMAT_OPTIONS_0), - options, - { - a: (0, _prettyFormat.default)(a, FORMAT_OPTIONS), - b: (0, _prettyFormat.default)(b, FORMAT_OPTIONS) - } - ); - } catch (e) { - hasThrown = true; - } // If the comparison yields no results, compare again but this time - // without calling `toJSON`. It's also possible that toJSON might throw. - - if (!diffMessage || diffMessage === _constants.NO_DIFF_MESSAGE) { - diffMessage = (0, _diffLines.default)( - (0, _prettyFormat.default)(a, FALLBACK_FORMAT_OPTIONS_0), - (0, _prettyFormat.default)(b, FALLBACK_FORMAT_OPTIONS_0), - options, - { - a: (0, _prettyFormat.default)(a, FALLBACK_FORMAT_OPTIONS), - b: (0, _prettyFormat.default)(b, FALLBACK_FORMAT_OPTIONS) - } - ); - - if (diffMessage !== _constants.NO_DIFF_MESSAGE && !hasThrown) { - diffMessage = _constants.SIMILAR_MESSAGE + '\n\n' + diffMessage; - } - } - - return diffMessage; -} // eslint-disable-next-line no-redeclare - -diff.getStringDiff = _printDiffs.getStringDiff; -module.exports = diff; diff --git a/node_modules/jest-diff/build/joinAlignedDiffs.d.ts b/node_modules/jest-diff/build/joinAlignedDiffs.d.ts deleted file mode 100644 index 475956a2..00000000 --- a/node_modules/jest-diff/build/joinAlignedDiffs.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Diff } from './cleanupSemantic'; -export declare const joinAlignedDiffsNoExpand: (diffs: Diff[], nContextLines?: number) => string; -export declare const joinAlignedDiffsExpand: (diffs: Diff[]) => string; -//# sourceMappingURL=joinAlignedDiffs.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-diff/build/joinAlignedDiffs.d.ts.map b/node_modules/jest-diff/build/joinAlignedDiffs.d.ts.map deleted file mode 100644 index ebc0b8fe..00000000 --- a/node_modules/jest-diff/build/joinAlignedDiffs.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"joinAlignedDiffs.d.ts","sourceRoot":"","sources":["../src/joinAlignedDiffs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAuC,IAAI,EAAC,MAAM,mBAAmB,CAAC;AAc7E,eAAO,MAAM,wBAAwB,mDAkKpC,CAAC;AAMF,eAAO,MAAM,sBAAsB,2BAgBpB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-diff/build/joinAlignedDiffs.js b/node_modules/jest-diff/build/joinAlignedDiffs.js deleted file mode 100644 index 44eda3be..00000000 --- a/node_modules/jest-diff/build/joinAlignedDiffs.js +++ /dev/null @@ -1,231 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.joinAlignedDiffsExpand = exports.joinAlignedDiffsNoExpand = void 0; - -var _cleanupSemantic = require('./cleanupSemantic'); - -var _printDiffs = require('./printDiffs'); - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const DIFF_CONTEXT_DEFAULT = 5; // same as diffLines -// jest --no-expand -// -// Given array of aligned strings with inverse highlight formatting, -// return joined lines with diff formatting (and patch marks, if needed). - -const joinAlignedDiffsNoExpand = ( - diffs, - nContextLines = DIFF_CONTEXT_DEFAULT -) => { - const iLength = diffs.length; - const nContextLines2 = nContextLines + nContextLines; // First pass: count output lines and see if it has patches. - - let jLength = iLength; - let hasExcessAtStartOrEnd = false; - let nExcessesBetweenChanges = 0; - let i = 0; - - while (i !== iLength) { - const iStart = i; - - while (i !== iLength && diffs[i][0] === _cleanupSemantic.DIFF_EQUAL) { - i += 1; - } - - if (iStart !== i) { - if (iStart === 0) { - // at start - if (i > nContextLines) { - jLength -= i - nContextLines; // subtract excess common lines - - hasExcessAtStartOrEnd = true; - } - } else if (i === iLength) { - // at end - const n = i - iStart; - - if (n > nContextLines) { - jLength -= n - nContextLines; // subtract excess common lines - - hasExcessAtStartOrEnd = true; - } - } else { - // between changes - const n = i - iStart; - - if (n > nContextLines2) { - jLength -= n - nContextLines2; // subtract excess common lines - - nExcessesBetweenChanges += 1; - } - } - } - - while (i !== iLength && diffs[i][0] !== _cleanupSemantic.DIFF_EQUAL) { - i += 1; - } - } - - const hasPatch = nExcessesBetweenChanges !== 0 || hasExcessAtStartOrEnd; - - if (nExcessesBetweenChanges !== 0) { - jLength += nExcessesBetweenChanges + 1; // add patch lines - } else if (hasExcessAtStartOrEnd) { - jLength += 1; // add patch line - } - - const jLast = jLength - 1; - const lines = []; - let jPatchMark = 0; // index of placeholder line for current patch mark - - if (hasPatch) { - lines.push(''); // placeholder line for first patch mark - } // Indexes of expected or received lines in current patch: - - let aStart = 0; - let bStart = 0; - let aEnd = 0; - let bEnd = 0; - - const pushCommonLine = line => { - const j = lines.length; - lines.push((0, _printDiffs.printCommonLine)(line, j === 0 || j === jLast)); - aEnd += 1; - bEnd += 1; - }; - - const pushDeleteLine = line => { - lines.push((0, _printDiffs.printDeleteLine)(line)); - aEnd += 1; - }; - - const pushInsertLine = line => { - lines.push((0, _printDiffs.printInsertLine)(line)); - bEnd += 1; - }; // Second pass: push lines with diff formatting (and patch marks, if needed). - - i = 0; - - while (i !== iLength) { - let iStart = i; - - while (i !== iLength && diffs[i][0] === _cleanupSemantic.DIFF_EQUAL) { - i += 1; - } - - if (iStart !== i) { - if (iStart === 0) { - // at beginning - if (i > nContextLines) { - iStart = i - nContextLines; - aStart = iStart; - bStart = iStart; - aEnd = aStart; - bEnd = bStart; - } - - for (let iCommon = iStart; iCommon !== i; iCommon += 1) { - pushCommonLine(diffs[iCommon][1]); - } - } else if (i === iLength) { - // at end - const iEnd = i - iStart > nContextLines ? iStart + nContextLines : i; - - for (let iCommon = iStart; iCommon !== iEnd; iCommon += 1) { - pushCommonLine(diffs[iCommon][1]); - } - } else { - // between changes - const nCommon = i - iStart; - - if (nCommon > nContextLines2) { - const iEnd = iStart + nContextLines; - - for (let iCommon = iStart; iCommon !== iEnd; iCommon += 1) { - pushCommonLine(diffs[iCommon][1]); - } - - lines[jPatchMark] = (0, _printDiffs.createPatchMark)( - aStart, - aEnd, - bStart, - bEnd - ); - jPatchMark = lines.length; - lines.push(''); // placeholder line for next patch mark - - const nOmit = nCommon - nContextLines2; - aStart = aEnd + nOmit; - bStart = bEnd + nOmit; - aEnd = aStart; - bEnd = bStart; - - for (let iCommon = i - nContextLines; iCommon !== i; iCommon += 1) { - pushCommonLine(diffs[iCommon][1]); - } - } else { - for (let iCommon = iStart; iCommon !== i; iCommon += 1) { - pushCommonLine(diffs[iCommon][1]); - } - } - } - } - - while (i !== iLength && diffs[i][0] === _cleanupSemantic.DIFF_DELETE) { - pushDeleteLine(diffs[i][1]); - i += 1; - } - - while (i !== iLength && diffs[i][0] === _cleanupSemantic.DIFF_INSERT) { - pushInsertLine(diffs[i][1]); - i += 1; - } - } - - if (hasPatch) { - lines[jPatchMark] = (0, _printDiffs.createPatchMark)( - aStart, - aEnd, - bStart, - bEnd - ); - } - - return lines.join('\n'); -}; // jest --expand -// -// Given array of aligned strings with inverse highlight formatting, -// return joined lines with diff formatting. - -exports.joinAlignedDiffsNoExpand = joinAlignedDiffsNoExpand; - -const joinAlignedDiffsExpand = diffs => - diffs - .map((diff, i, diffs) => { - const line = diff[1]; - - switch (diff[0]) { - case _cleanupSemantic.DIFF_DELETE: - return (0, _printDiffs.printDeleteLine)(line); - - case _cleanupSemantic.DIFF_INSERT: - return (0, _printDiffs.printInsertLine)(line); - - default: - return (0, _printDiffs.printCommonLine)( - line, - i === 0 || i === diffs.length - 1 - ); - } - }) - .join('\n'); - -exports.joinAlignedDiffsExpand = joinAlignedDiffsExpand; diff --git a/node_modules/jest-diff/build/printDiffs.d.ts b/node_modules/jest-diff/build/printDiffs.d.ts deleted file mode 100644 index 40bd8dfa..00000000 --- a/node_modules/jest-diff/build/printDiffs.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Diff } from './cleanupSemantic'; -import { DiffOptions } from './types'; -export declare const DIM_COLOR: import("chalk").Chalk & { - supportsColor: import("chalk").ColorSupport; -}; -export declare const EXPECTED_COLOR: import("chalk").Chalk & { - supportsColor: import("chalk").ColorSupport; -}; -export declare const INVERTED_COLOR: import("chalk").Chalk & { - supportsColor: import("chalk").ColorSupport; -}; -export declare const RECEIVED_COLOR: import("chalk").Chalk & { - supportsColor: import("chalk").ColorSupport; -}; -export declare const getHighlightedString: (op: number, diffs: Diff[]) => string; -export declare const getExpectedString: (diffs: Diff[]) => string; -export declare const getReceivedString: (diffs: Diff[]) => string; -export declare const MULTILINE_REGEXP: RegExp; -export declare const printDeleteLine: (line: string) => string; -export declare const printInsertLine: (line: string) => string; -export declare const printCommonLine: (line: string, isFirstOrLast?: boolean) => string; -export declare const computeStringDiffs: (expected: string, received: string) => { - diffs: Diff[]; - isMultiline: boolean; -}; -export declare const hasCommonDiff: (diffs: Diff[], isMultiline: boolean) => boolean; -export declare const printAnnotation: (options?: DiffOptions | undefined) => string; -export declare const createPatchMark: (aStart: number, aEnd: number, bStart: number, bEnd: number) => string; -export declare const printMultilineStringDiffs: (diffs: Diff[], expand: boolean) => string; -declare type StringDiffResult = { - isMultiline: true; - annotatedDiff: string; -} | { - isMultiline: false; - a: string; - b: string; -} | null; -export declare const getStringDiff: (expected: string, received: string, options?: DiffOptions | undefined) => StringDiffResult; -export {}; -//# sourceMappingURL=printDiffs.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-diff/build/printDiffs.d.ts.map b/node_modules/jest-diff/build/printDiffs.d.ts.map deleted file mode 100644 index 535fef59..00000000 --- a/node_modules/jest-diff/build/printDiffs.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"printDiffs.d.ts","sourceRoot":"","sources":["../src/printDiffs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAKL,IAAI,EACL,MAAM,mBAAmB,CAAC;AAO3B,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAEpC,eAAO,MAAM,SAAS;;CAAY,CAAC;AACnC,eAAO,MAAM,cAAc;;CAAc,CAAC;AAC1C,eAAO,MAAM,cAAc;;CAAgB,CAAC;AAC5C,eAAO,MAAM,cAAc;;CAAY,CAAC;AAOxC,eAAO,MAAM,oBAAoB,uCAU9B,CAAC;AAEJ,eAAO,MAAM,iBAAiB,2BACY,CAAC;AAE3C,eAAO,MAAM,iBAAiB,2BACY,CAAC;AAE3C,eAAO,MAAM,gBAAgB,QAAO,CAAC;AAUrC,eAAO,MAAM,eAAe,0BAC+C,CAAC;AAE5E,eAAO,MAAM,eAAe,0BAC+C,CAAC;AAG5E,eAAO,MAAM,eAAe,mDAKpB,CAAC;AAET,eAAO,MAAM,kBAAkB;;;CAc9B,CAAC;AAEF,eAAO,MAAM,aAAa,kDAUzB,CAAC;AAEF,eAAO,MAAM,eAAe,+CAIpB,CAAC;AAGT,eAAO,MAAM,eAAe,wEAQzB,CAAC;AAGJ,eAAO,MAAM,yBAAyB,4CAQrC,CAAC;AAIF,aAAK,gBAAgB,GACjB;IAAC,WAAW,EAAE,IAAI,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAC,GAC1C;IAAC,WAAW,EAAE,KAAK,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,GAC1C,IAAI,CAAC;AAOT,eAAO,MAAM,aAAa,6FAoCzB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-diff/build/printDiffs.js b/node_modules/jest-diff/build/printDiffs.js deleted file mode 100644 index 65477ec5..00000000 --- a/node_modules/jest-diff/build/printDiffs.js +++ /dev/null @@ -1,196 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.getStringDiff = exports.printMultilineStringDiffs = exports.createPatchMark = exports.printAnnotation = exports.hasCommonDiff = exports.computeStringDiffs = exports.printCommonLine = exports.printInsertLine = exports.printDeleteLine = exports.MULTILINE_REGEXP = exports.getReceivedString = exports.getExpectedString = exports.getHighlightedString = exports.RECEIVED_COLOR = exports.INVERTED_COLOR = exports.EXPECTED_COLOR = exports.DIM_COLOR = void 0; - -var _chalk = _interopRequireDefault(require('chalk')); - -var _cleanupSemantic = require('./cleanupSemantic'); - -var _diffStrings = _interopRequireDefault(require('./diffStrings')); - -var _getAlignedDiffs = _interopRequireDefault(require('./getAlignedDiffs')); - -var _joinAlignedDiffs = require('./joinAlignedDiffs'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const DIM_COLOR = _chalk.default.dim; -exports.DIM_COLOR = DIM_COLOR; -const EXPECTED_COLOR = _chalk.default.green; -exports.EXPECTED_COLOR = EXPECTED_COLOR; -const INVERTED_COLOR = _chalk.default.inverse; -exports.INVERTED_COLOR = INVERTED_COLOR; -const RECEIVED_COLOR = _chalk.default.red; -exports.RECEIVED_COLOR = RECEIVED_COLOR; -const PATCH_COLOR = _chalk.default.yellow; // Given change op and array of diffs, return concatenated string: -// * include common strings -// * include change strings which have argument op (inverse highlight) -// * exclude change strings which have opposite op - -const getHighlightedString = (op, diffs) => - diffs.reduce( - (reduced, diff) => - reduced + - (diff[0] === _cleanupSemantic.DIFF_EQUAL - ? diff[1] - : diff[0] === op - ? INVERTED_COLOR(diff[1]) - : ''), - '' - ); - -exports.getHighlightedString = getHighlightedString; - -const getExpectedString = diffs => - getHighlightedString(_cleanupSemantic.DIFF_DELETE, diffs); - -exports.getExpectedString = getExpectedString; - -const getReceivedString = diffs => - getHighlightedString(_cleanupSemantic.DIFF_INSERT, diffs); - -exports.getReceivedString = getReceivedString; -const MULTILINE_REGEXP = /\n/; -exports.MULTILINE_REGEXP = MULTILINE_REGEXP; -const NEWLINE_SYMBOL = '\u{21B5}'; // downwards arrow with corner leftwards - -const SPACE_SYMBOL = '\u{00B7}'; // middle dot -// Instead of inverse highlight which now implies a change, -// replace common spaces with middle dot at the end of the line. - -const replaceSpacesAtEnd = line => - line.replace(/\s+$/, spaces => SPACE_SYMBOL.repeat(spaces.length)); - -const printDeleteLine = line => - EXPECTED_COLOR(line.length !== 0 ? '- ' + replaceSpacesAtEnd(line) : '-'); - -exports.printDeleteLine = printDeleteLine; - -const printInsertLine = line => - RECEIVED_COLOR(line.length !== 0 ? '+ ' + replaceSpacesAtEnd(line) : '+'); // Prevent visually ambiguous empty line as the first or the last. - -exports.printInsertLine = printInsertLine; - -const printCommonLine = (line, isFirstOrLast = false) => - line.length !== 0 - ? DIM_COLOR(' ' + replaceSpacesAtEnd(line)) - : isFirstOrLast - ? DIM_COLOR(' ' + NEWLINE_SYMBOL) - : ''; - -exports.printCommonLine = printCommonLine; - -const computeStringDiffs = (expected, received) => { - const isMultiline = - MULTILINE_REGEXP.test(expected) || MULTILINE_REGEXP.test(received); // getAlignedDiffs assumes that a newline was appended to the strings. - - if (isMultiline) { - expected += '\n'; - received += '\n'; - } - - const diffs = (0, _diffStrings.default)(expected, received); - (0, _cleanupSemantic.cleanupSemantic)(diffs); // impure function - - return { - diffs, - isMultiline - }; -}; - -exports.computeStringDiffs = computeStringDiffs; - -const hasCommonDiff = (diffs, isMultiline) => { - if (isMultiline) { - // Important: Ignore common newline that was appended to multiline strings! - const iLast = diffs.length - 1; - return diffs.some( - (diff, i) => - diff[0] === _cleanupSemantic.DIFF_EQUAL && - (i !== iLast || diff[1] !== '\n') - ); - } - - return diffs.some(diff => diff[0] === _cleanupSemantic.DIFF_EQUAL); -}; - -exports.hasCommonDiff = hasCommonDiff; - -const printAnnotation = options => - EXPECTED_COLOR('- ' + ((options && options.aAnnotation) || 'Expected')) + - '\n' + - RECEIVED_COLOR('+ ' + ((options && options.bAnnotation) || 'Received')) + - '\n\n'; // In GNU diff format, indexes are one-based instead of zero-based. - -exports.printAnnotation = printAnnotation; - -const createPatchMark = (aStart, aEnd, bStart, bEnd) => - PATCH_COLOR( - `@@ -${aStart + 1},${aEnd - aStart} +${bStart + 1},${bEnd - bStart} @@` - ); // Return formatted diff lines without labels. - -exports.createPatchMark = createPatchMark; - -const printMultilineStringDiffs = (diffs, expand) => { - const lines = (0, _getAlignedDiffs.default)(diffs); - return expand - ? (0, _joinAlignedDiffs.joinAlignedDiffsExpand)(lines) - : (0, _joinAlignedDiffs.joinAlignedDiffsNoExpand)(lines); -}; - -exports.printMultilineStringDiffs = printMultilineStringDiffs; -const MAX_DIFF_STRING_LENGTH = 20000; - -// Print specific substring diff for strings only: -// * if strings are not equal -// * if neither string is empty -// * if neither string is too long -// * if there is a common string after semantic cleanup -const getStringDiff = (expected, received, options) => { - if ( - expected === received || - expected.length === 0 || - received.length === 0 || - expected.length > MAX_DIFF_STRING_LENGTH || - received.length > MAX_DIFF_STRING_LENGTH - ) { - return null; - } - - const _computeStringDiffs = computeStringDiffs(expected, received), - diffs = _computeStringDiffs.diffs, - isMultiline = _computeStringDiffs.isMultiline; - - if (!hasCommonDiff(diffs, isMultiline)) { - return null; - } - - return isMultiline - ? { - annotatedDiff: - printAnnotation(options) + - printMultilineStringDiffs( - diffs, - options === undefined || options.expand !== false - ), - isMultiline - } - : { - a: getExpectedString(diffs), - b: getReceivedString(diffs), - isMultiline - }; -}; - -exports.getStringDiff = getStringDiff; diff --git a/node_modules/jest-diff/build/types.d.ts b/node_modules/jest-diff/build/types.d.ts deleted file mode 100644 index f5035c60..00000000 --- a/node_modules/jest-diff/build/types.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare type DiffOptions = { - aAnnotation?: string; - bAnnotation?: string; - expand?: boolean; - contextLines?: number; -}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-diff/build/types.d.ts.map b/node_modules/jest-diff/build/types.d.ts.map deleted file mode 100644 index b53fcad4..00000000 --- a/node_modules/jest-diff/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oBAAY,WAAW,GAAG;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-diff/build/types.js b/node_modules/jest-diff/build/types.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/jest-diff/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/jest-diff/package.json b/node_modules/jest-diff/package.json deleted file mode 100644 index bdf5afb1..00000000 --- a/node_modules/jest-diff/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_args": [ - [ - "jest-diff@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-diff@24.9.0", - "_id": "jest-diff@24.9.0", - "_inBundle": false, - "_integrity": "sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==", - "_location": "/jest-diff", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-diff@24.9.0", - "name": "jest-diff", - "escapedName": "jest-diff", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/jest-matcher-utils", - "/jest-snapshot" - ], - "_resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "chalk": "^2.0.1", - "diff-sequences": "^24.9.0", - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" - }, - "devDependencies": { - "@types/strip-ansi": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-diff", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-diff" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-docblock/LICENSE b/node_modules/jest-docblock/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-docblock/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-docblock/README.md b/node_modules/jest-docblock/README.md deleted file mode 100644 index ba3fc7b6..00000000 --- a/node_modules/jest-docblock/README.md +++ /dev/null @@ -1,108 +0,0 @@ -# jest-docblock - -`jest-docblock` is a package that can extract and parse a specially-formatted comment called a "docblock" at the top of a file. - -A docblock looks like this: - -```js -/** - * Stuff goes here! - */ -``` - -Docblocks can contain pragmas, which are words prefixed by `@`: - -```js -/** - * Pragma incoming! - * - * @flow - */ -``` - -Pragmas can also take arguments: - -```js -/** - * Check this out: - * - * @myPragma it is so cool - */ -``` - -`jest-docblock` can: - -- extract the docblock from some code as a string -- parse a docblock string's pragmas into an object -- print an object and some comments back to a string - -## Installation - -```sh -# with yarn -$ yarn add jest-docblock -# with npm -$ npm install jest-docblock -``` - -## Usage - -```js -const code = ` -/** - * Everything is awesome! - * - * @everything is:awesome - * @flow - */ - - export const everything = Object.create(null); - export default function isAwesome(something) { - return something === everything; - } -`; - -const { - extract, - strip, - parse, - parseWithComments, - print, -} = require('jest-docblock'); - -const docblock = extract(code); -console.log(docblock); // "/**\n * Everything is awesome!\n * \n * @everything is:awesome\n * @flow\n */" - -const stripped = strip(code); -console.log(stripped); // "export const everything = Object.create(null);\n export default function isAwesome(something) {\n return something === everything;\n }" - -const pragmas = parse(docblock); -console.log(pragmas); // { everything: "is:awesome", flow: "" } - -const parsed = parseWithComments(docblock); -console.log(parsed); // { comments: "Everything is awesome!", pragmas: { everything: "is:awesome", flow: "" } } - -console.log(print({pragmas, comments: 'hi!'})); // /**\n * hi!\n *\n * @everything is:awesome\n * @flow\n */; -``` - -## API Documentation - -### `extract(contents: string): string` - -Extracts a docblock from some file contents. Returns the docblock contained in `contents`. If `contents` did not contain a docblock, it will return the empty string (`""`). - -### `strip(contents: string): string` - -Strips the top docblock from a file and return the result. If a file does not have a docblock at the top, then return the file unchanged. - -### `parse(docblock: string): {[key: string]: string | string[] }` - -Parses the pragmas in a docblock string into an object whose keys are the pragma tags and whose values are the arguments to those pragmas. - -### `parseWithComments(docblock: string): { comments: string, pragmas: {[key: string]: string | string[]} }` - -Similar to `parse` except this method also returns the comments from the docblock. Useful when used with `print()`. - -### `print({ comments?: string, pragmas?: {[key: string]: string | string[]} }): string` - -Prints an object of key-value pairs back into a docblock. If `comments` are provided, they will be positioned on the top of the docblock. diff --git a/node_modules/jest-docblock/build/index.d.ts b/node_modules/jest-docblock/build/index.d.ts deleted file mode 100644 index fe88c94e..00000000 --- a/node_modules/jest-docblock/build/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare type Pragmas = Record>; -export declare function extract(contents: string): string; -export declare function strip(contents: string): string; -export declare function parse(docblock: string): Pragmas; -export declare function parseWithComments(docblock: string): { - comments: string; - pragmas: Pragmas; -}; -export declare function print({ comments, pragmas, }: { - comments?: string; - pragmas?: Pragmas; -}): string; -export {}; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-docblock/build/index.d.ts.map b/node_modules/jest-docblock/build/index.d.ts.map deleted file mode 100644 index 2194b039..00000000 --- a/node_modules/jest-docblock/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,aAAK,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AAWtD,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,UAGrC;AAED,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,GACf;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC,CAuCtC;AAED,wBAAgB,KAAK,CAAC,EACpB,QAAa,EACb,OAAY,GACb,EAAE;IACD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,MAAM,CAsCT"} \ No newline at end of file diff --git a/node_modules/jest-docblock/build/index.js b/node_modules/jest-docblock/build/index.js deleted file mode 100644 index 24f2b052..00000000 --- a/node_modules/jest-docblock/build/index.js +++ /dev/null @@ -1,149 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.extract = extract; -exports.strip = strip; -exports.parse = parse; -exports.parseWithComments = parseWithComments; -exports.print = print; - -function _os() { - const data = require('os'); - - _os = function _os() { - return data; - }; - - return data; -} - -function _detectNewline() { - const data = _interopRequireDefault(require('detect-newline')); - - _detectNewline = function _detectNewline() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const commentEndRe = /\*\/$/; -const commentStartRe = /^\/\*\*/; -const docblockRe = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/; -const lineCommentRe = /(^|\s+)\/\/([^\r\n]*)/g; -const ltrimNewlineRe = /^(\r?\n)+/; -const multilineRe = /(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g; -const propertyRe = /(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g; -const stringStartRe = /(\r?\n|^) *\* ?/g; - -function extract(contents) { - const match = contents.match(docblockRe); - return match ? match[0].trimLeft() : ''; -} - -function strip(contents) { - const match = contents.match(docblockRe); - return match && match[0] ? contents.substring(match[0].length) : contents; -} - -function parse(docblock) { - return parseWithComments(docblock).pragmas; -} - -function parseWithComments(docblock) { - const line = (0, _detectNewline().default)(docblock) || _os().EOL; - - docblock = docblock - .replace(commentStartRe, '') - .replace(commentEndRe, '') - .replace(stringStartRe, '$1'); // Normalize multi-line directives - - let prev = ''; - - while (prev !== docblock) { - prev = docblock; - docblock = docblock.replace(multilineRe, `${line}$1 $2${line}`); - } - - docblock = docblock.replace(ltrimNewlineRe, '').trimRight(); - const result = Object.create(null); - const comments = docblock - .replace(propertyRe, '') - .replace(ltrimNewlineRe, '') - .trimRight(); - let match; - - while ((match = propertyRe.exec(docblock))) { - // strip linecomments from pragmas - const nextPragma = match[2].replace(lineCommentRe, ''); - - if ( - typeof result[match[1]] === 'string' || - Array.isArray(result[match[1]]) - ) { - result[match[1]] = [].concat(result[match[1]], nextPragma); - } else { - result[match[1]] = nextPragma; - } - } - - return { - comments, - pragmas: result - }; -} - -function print({comments = '', pragmas = {}}) { - const line = (0, _detectNewline().default)(comments) || _os().EOL; - - const head = '/**'; - const start = ' *'; - const tail = ' */'; - const keys = Object.keys(pragmas); - const printedObject = keys - .map(key => printKeyValues(key, pragmas[key])) - .reduce((arr, next) => arr.concat(next), []) - .map(keyValue => start + ' ' + keyValue + line) - .join(''); - - if (!comments) { - if (keys.length === 0) { - return ''; - } - - if (keys.length === 1 && !Array.isArray(pragmas[keys[0]])) { - const value = pragmas[keys[0]]; - return `${head} ${printKeyValues(keys[0], value)[0]}${tail}`; - } - } - - const printedComments = - comments - .split(line) - .map(textLine => `${start} ${textLine}`) - .join(line) + line; - return ( - head + - line + - (comments ? printedComments : '') + - (comments && keys.length ? start + line : '') + - printedObject + - tail - ); -} - -function printKeyValues(key, valueOrArray) { - return [].concat(valueOrArray).map(value => `@${key} ${value}`.trim()); -} diff --git a/node_modules/jest-docblock/package.json b/node_modules/jest-docblock/package.json deleted file mode 100644 index 393b9883..00000000 --- a/node_modules/jest-docblock/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "_args": [ - [ - "jest-docblock@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-docblock@24.9.0", - "_id": "jest-docblock@24.9.0", - "_inBundle": false, - "_integrity": "sha512-F1DjdpDMJMA1cN6He0FNYNZlo3yYmOtRUnktrT9Q37njYzC5WEaDdmbynIgy0L/IvXvvgsG8OsqhLPXTpfmZAA==", - "_location": "/jest-docblock", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-docblock@24.9.0", - "name": "jest-docblock", - "escapedName": "jest-docblock", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/jest-runner" - ], - "_resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "detect-newline": "^2.1.0" - }, - "description": "`jest-docblock` is a package that can extract and parse a specially-formatted comment called a \"docblock\" at the top of a file.", - "devDependencies": { - "@types/detect-newline": "^2.1.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-docblock", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-docblock" - }, - "version": "24.9.0" -} diff --git a/node_modules/jest-each/LICENSE b/node_modules/jest-each/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-each/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-each/README.md b/node_modules/jest-each/README.md deleted file mode 100644 index 4ed8fc56..00000000 --- a/node_modules/jest-each/README.md +++ /dev/null @@ -1,443 +0,0 @@ -
-

jest-each

- Jest Parameterised Testing -
- -
- -[![version](https://img.shields.io/npm/v/jest-each.svg?style=flat-square)](https://www.npmjs.com/package/jest-each) [![downloads](https://img.shields.io/npm/dm/jest-each.svg?style=flat-square)](http://npm-stat.com/charts.html?package=jest-each&from=2017-03-21) [![MIT License](https://img.shields.io/npm/l/jest-each.svg?style=flat-square)](https://github.com/facebook/jest/blob/master/LICENSE) - -A parameterised testing library for [Jest](https://jestjs.io/) inspired by [mocha-each](https://github.com/ryym/mocha-each). - -jest-each allows you to provide multiple arguments to your `test`/`describe` which results in the test/suite being run once per row of parameters. - -## Features - -- `.test` to runs multiple tests with parameterised data - - Also under the alias: `.it` -- `.test.only` to only run the parameterised tests - - Also under the aliases: `.it.only` or `.fit` -- `.test.skip` to skip the parameterised tests - - Also under the aliases: `.it.skip` or `.xit` or `.xtest` -- `.describe` to runs test suites with parameterised data -- `.describe.only` to only run the parameterised suite of tests - - Also under the aliases: `.fdescribe` -- `.describe.skip` to skip the parameterised suite of tests - - Also under the aliases: `.xdescribe` -- Asynchronous tests with `done` -- Unique test titles with [`printf` formatting](https://nodejs.org/api/util.html#util_util_format_format_args): - - `%p` - [pretty-format](https://www.npmjs.com/package/pretty-format). - - `%s`- String. - - `%d`- Number. - - `%i` - Integer. - - `%f` - Floating point value. - - `%j` - JSON. - - `%o` - Object. - - `%#` - Index of the test case. - - `%%` - single percent sign ('%'). This does not consume an argument. -- 🖖 Spock like data tables with [Tagged Template Literals](#tagged-template-literal-of-rows) - ---- - -- [Demo](#demo) -- [Installation](#installation) -- [Importing](#importing) -- APIs - - [Array of Rows](#array-of-rows) - - [Usage](#usage) - - [Tagged Template Literal of rows](#tagged-template-literal-of-rows) - - [Usage](#usage-1) - -## Demo - -#### Tests without jest-each - -![Current jest tests](assets/default-demo.gif) - -#### Tests can be re-written with jest-each to: - -**`.test`** - -![Current jest tests](assets/test-demo.gif) - -**`.test` with Tagged Template Literals** - -![Current jest tests](assets/tagged-template-literal.gif) - -**`.describe`** - -![Current jest tests](assets/describe-demo.gif) - -## Installation - -`npm i --save-dev jest-each` - -`yarn add -D jest-each` - -## Importing - -jest-each is a default export so it can be imported with whatever name you like. - -```js -// es6 -import each from 'jest-each'; -``` - -```js -// es5 -const each = require('jest-each').default; -``` - -## Array of rows - -### API - -#### `each([parameters]).test(name, testFn)` - -##### `each`: - -- parameters: `Array` of Arrays with the arguments that are passed into the `testFn` for each row - - _Note_ If you pass in a 1D array of primitives, internally it will be mapped to a table i.e. `[1, 2, 3] -> [[1], [2], [3]]` - -##### `.test`: - -- name: `String` the title of the `test`. - - Generate unique test titles by positionally injecting parameters with [`printf` formatting](https://nodejs.org/api/util.html#util_util_format_format_args): - - `%p` - [pretty-format](https://www.npmjs.com/package/pretty-format). - - `%s`- String. - - `%d`- Number. - - `%i` - Integer. - - `%f` - Floating point value. - - `%j` - JSON. - - `%o` - Object. - - `%#` - Index of the test case. - - `%%` - single percent sign ('%'). This does not consume an argument. -- testFn: `Function` the test logic, this is the function that will receive the parameters of each row as function arguments - -#### `each([parameters]).describe(name, suiteFn)` - -##### `each`: - -- parameters: `Array` of Arrays with the arguments that are passed into the `suiteFn` for each row - - _Note_ If you pass in a 1D array of primitives, internally it will be mapped to a table i.e. `[1, 2, 3] -> [[1], [2], [3]]` - -##### `.describe`: - -- name: `String` the title of the `describe` - - Generate unique test titles by positionally injecting parameters with [`printf` formatting](https://nodejs.org/api/util.html#util_util_format_format_args): - - `%p` - [pretty-format](https://www.npmjs.com/package/pretty-format). - - `%s`- String. - - `%d`- Number. - - `%i` - Integer. - - `%f` - Floating point value. - - `%j` - JSON. - - `%o` - Object. - - `%#` - Index of the test case. - - `%%` - single percent sign ('%'). This does not consume an argument. -- suiteFn: `Function` the suite of `test`/`it`s to be ran, this is the function that will receive the parameters in each row as function arguments - -### Usage - -#### `.test(name, fn)` - -Alias: `.it(name, fn)` - -```js -each([[1, 1, 2], [1, 2, 3], [2, 1, 3]]).test( - 'returns the result of adding %d to %d', - (a, b, expected) => { - expect(a + b).toBe(expected); - }, -); -``` - -#### `.test.only(name, fn)` - -Aliases: `.it.only(name, fn)` or `.fit(name, fn)` - -```js -each([[1, 1, 2], [1, 2, 3], [2, 1, 3]]).test.only( - 'returns the result of adding %d to %d', - (a, b, expected) => { - expect(a + b).toBe(expected); - }, -); -``` - -#### `.test.skip(name, fn)` - -Aliases: `.it.skip(name, fn)` or `.xit(name, fn)` or `.xtest(name, fn)` - -```js -each([[1, 1, 2], [1, 2, 3], [2, 1, 3]]).test.skip( - 'returns the result of adding %d to %d', - (a, b, expected) => { - expect(a + b).toBe(expected); - }, -); -``` - -#### Asynchronous `.test(name, fn(done))` - -Alias: `.it(name, fn(done))` - -```js -each([['hello'], ['mr'], ['spy']]).test( - 'gives 007 secret message: %s', - (str, done) => { - const asynchronousSpy = message => { - expect(message).toBe(str); - done(); - }; - callSomeAsynchronousFunction(asynchronousSpy)(str); - }, -); -``` - -#### `.describe(name, fn)` - -```js -each([[1, 1, 2], [1, 2, 3], [2, 1, 3]]).describe( - '.add(%d, %d)', - (a, b, expected) => { - test(`returns ${expected}`, () => { - expect(a + b).toBe(expected); - }); - - test('does not mutate first arg', () => { - a + b; - expect(a).toBe(a); - }); - - test('does not mutate second arg', () => { - a + b; - expect(b).toBe(b); - }); - }, -); -``` - -#### `.describe.only(name, fn)` - -Aliases: `.fdescribe(name, fn)` - -```js -each([[1, 1, 2], [1, 2, 3], [2, 1, 3]]).describe.only( - '.add(%d, %d)', - (a, b, expected) => { - test(`returns ${expected}`, () => { - expect(a + b).toBe(expected); - }); - }, -); -``` - -#### `.describe.skip(name, fn)` - -Aliases: `.xdescribe(name, fn)` - -```js -each([[1, 1, 2], [1, 2, 3], [2, 1, 3]]).describe.skip( - '.add(%d, %d)', - (a, b, expected) => { - test(`returns ${expected}`, () => { - expect(a + b).toBe(expected); - }); - }, -); -``` - ---- - -## Tagged Template Literal of rows - -### API - -#### `each[tagged template].test(name, suiteFn)` - -```js -each` - a | b | expected - ${1} | ${1} | ${2} - ${1} | ${2} | ${3} - ${2} | ${1} | ${3} -`.test('returns $expected when adding $a to $b', ({a, b, expected}) => { - expect(a + b).toBe(expected); -}); -``` - -##### `each` takes a tagged template string with: - -- First row of variable name column headings seperated with `|` -- One or more subsequent rows of data supplied as template literal expressions using `${value}` syntax. - -##### `.test`: - -- name: `String` the title of the `test`, use `$variable` in the name string to inject test values into the test title from the tagged template expressions - - To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` -- testFn: `Function` the test logic, this is the function that will receive the parameters of each row as function arguments - -#### `each[tagged template].describe(name, suiteFn)` - -```js -each` - a | b | expected - ${1} | ${1} | ${2} - ${1} | ${2} | ${3} - ${2} | ${1} | ${3} -`.describe('$a + $b', ({a, b, expected}) => { - test(`returns ${expected}`, () => { - expect(a + b).toBe(expected); - }); - - test('does not mutate first arg', () => { - a + b; - expect(a).toBe(a); - }); - - test('does not mutate second arg', () => { - a + b; - expect(b).toBe(b); - }); -}); -``` - -##### `each` takes a tagged template string with: - -- First row of variable name column headings seperated with `|` -- One or more subsequent rows of data supplied as template literal expressions using `${value}` syntax. - -##### `.describe`: - -- name: `String` the title of the `test`, use `$variable` in the name string to inject test values into the test title from the tagged template expressions - - To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` -- suiteFn: `Function` the suite of `test`/`it`s to be ran, this is the function that will receive the parameters in each row as function arguments - -### Usage - -#### `.test(name, fn)` - -Alias: `.it(name, fn)` - -```js -each` - a | b | expected - ${1} | ${1} | ${2} - ${1} | ${2} | ${3} - ${2} | ${1} | ${3} -`.test('returns $expected when adding $a to $b', ({a, b, expected}) => { - expect(a + b).toBe(expected); -}); -``` - -#### `.test.only(name, fn)` - -Aliases: `.it.only(name, fn)` or `.fit(name, fn)` - -```js -each` - a | b | expected - ${1} | ${1} | ${2} - ${1} | ${2} | ${3} - ${2} | ${1} | ${3} -`.test.only('returns $expected when adding $a to $b', ({a, b, expected}) => { - expect(a + b).toBe(expected); -}); -``` - -#### `.test.skip(name, fn)` - -Aliases: `.it.skip(name, fn)` or `.xit(name, fn)` or `.xtest(name, fn)` - -```js -each` - a | b | expected - ${1} | ${1} | ${2} - ${1} | ${2} | ${3} - ${2} | ${1} | ${3} -`.test.skip('returns $expected when adding $a to $b', ({a, b, expected}) => { - expect(a + b).toBe(expected); -}); -``` - -#### Asynchronous `.test(name, fn(done))` - -Alias: `.it(name, fn(done))` - -```js -each` - str - ${'hello'} - ${'mr'} - ${'spy'} -`.test('gives 007 secret message: $str', ({str}, done) => { - const asynchronousSpy = message => { - expect(message).toBe(str); - done(); - }; - callSomeAsynchronousFunction(asynchronousSpy)(str); -}); -``` - -#### `.describe(name, fn)` - -```js -each` - a | b | expected - ${1} | ${1} | ${2} - ${1} | ${2} | ${3} - ${2} | ${1} | ${3} -`.describe('$a + $b', ({a, b, expected}) => { - test(`returns ${expected}`, () => { - expect(a + b).toBe(expected); - }); - - test('does not mutate first arg', () => { - a + b; - expect(a).toBe(a); - }); - - test('does not mutate second arg', () => { - a + b; - expect(b).toBe(b); - }); -}); -``` - -#### `.describe.only(name, fn)` - -Aliases: `.fdescribe(name, fn)` - -```js -each` - a | b | expected - ${1} | ${1} | ${2} - ${1} | ${2} | ${3} - ${2} | ${1} | ${3} -`.describe.only('$a + $b', ({a, b, expected}) => { - test(`returns ${expected}`, () => { - expect(a + b).toBe(expected); - }); -}); -``` - -#### `.describe.skip(name, fn)` - -Aliases: `.xdescribe(name, fn)` - -```js -each` - a | b | expected - ${1} | ${1} | ${2} - ${1} | ${2} | ${3} - ${2} | ${1} | ${3} -`.describe.skip('$a + $b', ({a, b, expected}) => { - test(`returns ${expected}`, () => { - expect(a + b).toBe(expected); - }); -}); -``` - -## License - -MIT diff --git a/node_modules/jest-each/build/bind.d.ts b/node_modules/jest-each/build/bind.d.ts deleted file mode 100644 index b87c345f..00000000 --- a/node_modules/jest-each/build/bind.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { Global } from '@jest/types'; -export declare type EachTests = Array<{ - title: string; - arguments: Array; -}>; -declare type TestFn = (done?: Global.DoneFn) => Promise | void | undefined; -declare type GlobalCallback = (testName: string, fn: TestFn, timeout?: number) => void; -declare const _default: (cb: GlobalCallback, supportsDone?: boolean) => (table: Global.EachTable, ...taggedTemplateData: unknown[]) => (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; -export default _default; -//# sourceMappingURL=bind.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-each/build/bind.d.ts.map b/node_modules/jest-each/build/bind.d.ts.map deleted file mode 100644 index cc4bf815..00000000 --- a/node_modules/jest-each/build/bind.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bind.d.ts","sourceRoot":"","sources":["../src/bind.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAOnC,oBAAY,SAAS,GAAG,KAAK,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;CAC3B,CAAC,CAAC;AAEH,aAAK,MAAM,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AACxE,aAAK,cAAc,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;;AAE/E,wBA2BI"} \ No newline at end of file diff --git a/node_modules/jest-each/build/bind.js b/node_modules/jest-each/build/bind.js deleted file mode 100644 index 8f247ff9..00000000 --- a/node_modules/jest-each/build/bind.js +++ /dev/null @@ -1,76 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -var _array = _interopRequireDefault(require('./table/array')); - -var _template = _interopRequireDefault(require('./table/template')); - -var _validation = require('./validation'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -var _default = (cb, supportsDone = true) => (table, ...taggedTemplateData) => - function eachBind(title, test, timeout) { - try { - const tests = isArrayTable(taggedTemplateData) - ? buildArrayTests(title, table) - : buildTemplateTests(title, table, taggedTemplateData); - return tests.forEach(row => - cb( - row.title, - applyArguments(supportsDone, row.arguments, test), - timeout - ) - ); - } catch (e) { - const error = new (_jestUtil()).ErrorWithStack(e.message, eachBind); - return cb(title, () => { - throw error; - }); - } - }; - -exports.default = _default; - -const isArrayTable = data => data.length === 0; - -const buildArrayTests = (title, table) => { - (0, _validation.validateArrayTable)(table); - return (0, _array.default)(title, table); -}; - -const buildTemplateTests = (title, table, taggedTemplateData) => { - const headings = getHeadingKeys(table[0]); - (0, _validation.validateTemplateTableHeadings)(headings, taggedTemplateData); - return (0, _template.default)(title, headings, taggedTemplateData); -}; - -const getHeadingKeys = headings => headings.replace(/\s/g, '').split('|'); - -const applyArguments = (supportsDone, params, test) => - supportsDone && params.length < test.length - ? done => test(...params, done) - : () => test(...params); diff --git a/node_modules/jest-each/build/index.d.ts b/node_modules/jest-each/build/index.d.ts deleted file mode 100644 index c2774ad5..00000000 --- a/node_modules/jest-each/build/index.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { Global } from '@jest/types'; -import bind from './bind'; -declare type Global = Global.Global; -declare const each: { - (table: Global.EachTable, ...data: unknown[]): { - describe: { - (title: string, suite: Global.EachTestFn, timeout?: number | undefined): void; - skip: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - only: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - }; - fdescribe: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - fit: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - it: { - (title: string, test: Global.EachTestFn, timeout?: number | undefined): void; - skip: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - only: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - }; - test: { - (title: string, test: Global.EachTestFn, timeout?: number | undefined): void; - skip: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - only: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - }; - xdescribe: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - xit: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - xtest: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - }; - withGlobal(g: Global.Global): (table: Global.EachTable, ...data: unknown[]) => { - describe: { - (title: string, suite: Global.EachTestFn, timeout?: number | undefined): void; - skip: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - only: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - }; - fdescribe: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - fit: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - it: { - (title: string, test: Global.EachTestFn, timeout?: number | undefined): void; - skip: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - only: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - }; - test: { - (title: string, test: Global.EachTestFn, timeout?: number | undefined): void; - skip: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - only: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - }; - xdescribe: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - xit: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - xtest: (title: string, test: Global.EachTestFn, timeout?: number | undefined) => void; - }; -}; -export { bind }; -export default each; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-each/build/index.d.ts.map b/node_modules/jest-each/build/index.d.ts.map deleted file mode 100644 index ad9a4fc7..00000000 --- a/node_modules/jest-each/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,aAAK,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAiC5B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACiC,CAAC;AAO5C,OAAO,EAAC,IAAI,EAAC,CAAC;AAEd,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-each/build/index.js b/node_modules/jest-each/build/index.js deleted file mode 100644 index b9ef8310..00000000 --- a/node_modules/jest-each/build/index.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -Object.defineProperty(exports, 'bind', { - enumerable: true, - get: function get() { - return _bind.default; - } -}); -exports.default = void 0; - -function _types() { - const data = require('@jest/types'); - - _types = function _types() { - return data; - }; - - return data; -} - -var _bind = _interopRequireDefault(require('./bind')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -const install = (g, table, ...data) => { - const test = (title, test, timeout) => - (0, _bind.default)(g.test)(table, ...data)(title, test, timeout); - - test.skip = (0, _bind.default)(g.test.skip)(table, ...data); - test.only = (0, _bind.default)(g.test.only)(table, ...data); - - const it = (title, test, timeout) => - (0, _bind.default)(g.it)(table, ...data)(title, test, timeout); - - it.skip = (0, _bind.default)(g.it.skip)(table, ...data); - it.only = (0, _bind.default)(g.it.only)(table, ...data); - const xit = (0, _bind.default)(g.xit)(table, ...data); - const fit = (0, _bind.default)(g.fit)(table, ...data); - const xtest = (0, _bind.default)(g.xtest)(table, ...data); - - const describe = (title, suite, timeout) => - (0, _bind.default)(g.describe, false)(table, ...data)( - title, - suite, - timeout - ); - - describe.skip = (0, _bind.default)(g.describe.skip, false)(table, ...data); - describe.only = (0, _bind.default)(g.describe.only, false)(table, ...data); - const fdescribe = (0, _bind.default)(g.fdescribe, false)(table, ...data); - const xdescribe = (0, _bind.default)(g.xdescribe, false)(table, ...data); - return { - describe, - fdescribe, - fit, - it, - test, - xdescribe, - xit, - xtest - }; -}; - -const each = (table, ...data) => install(global, table, ...data); - -each.withGlobal = g => (table, ...data) => install(g, table, ...data); - -var _default = each; -exports.default = _default; diff --git a/node_modules/jest-each/build/table/array.d.ts b/node_modules/jest-each/build/table/array.d.ts deleted file mode 100644 index 2232ac7a..00000000 --- a/node_modules/jest-each/build/table/array.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { Global } from '@jest/types'; -declare const _default: (title: string, arrayTable: Global.ArrayTable) => { - title: string; - arguments: unknown[]; -}[]; -export default _default; -//# sourceMappingURL=array.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-each/build/table/array.d.ts.map b/node_modules/jest-each/build/table/array.d.ts.map deleted file mode 100644 index bd92a226..00000000 --- a/node_modules/jest-each/build/table/array.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/table/array.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;;;;;AASnC,wBAIM"} \ No newline at end of file diff --git a/node_modules/jest-each/build/table/array.js b/node_modules/jest-each/build/table/array.js deleted file mode 100644 index 0f33b082..00000000 --- a/node_modules/jest-each/build/table/array.js +++ /dev/null @@ -1,126 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _util() { - const data = _interopRequireDefault(require('util')); - - _util = function _util() { - return data; - }; - - return data; -} - -function _prettyFormat() { - const data = _interopRequireDefault(require('pretty-format')); - - _prettyFormat = function _prettyFormat() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest() - ); -} - -function _nonIterableRest() { - throw new TypeError('Invalid attempt to destructure non-iterable instance'); -} - -function _iterableToArrayLimit(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - try { - for ( - var _i = arr[Symbol.iterator](), _s; - !(_n = (_s = _i.next()).done); - _n = true - ) { - _arr.push(_s.value); - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i['return'] != null) _i['return'](); - } finally { - if (_d) throw _e; - } - } - return _arr; -} - -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} - -const SUPPORTED_PLACEHOLDERS = /%[sdifjoOp%]/g; -const PRETTY_PLACEHOLDER = '%p'; -const INDEX_PLACEHOLDER = '%#'; -const PLACEHOLDER_PREFIX = '%'; -const JEST_EACH_PLACEHOLDER_ESCAPE = '@@__JEST_EACH_PLACEHOLDER_ESCAPE__@@'; - -var _default = (title, arrayTable) => - normaliseTable(arrayTable).map((row, index) => ({ - arguments: row, - title: formatTitle(title, row, index) - })); - -exports.default = _default; - -const normaliseTable = table => (isTable(table) ? table : table.map(colToRow)); - -const isTable = table => table.every(Array.isArray); - -const colToRow = col => [col]; - -const formatTitle = (title, row, rowIndex) => - row - .reduce((formattedTitle, value) => { - const _getMatchingPlacehold = getMatchingPlaceholders(formattedTitle), - _getMatchingPlacehold2 = _slicedToArray(_getMatchingPlacehold, 1), - placeholder = _getMatchingPlacehold2[0]; - - const normalisedValue = normalisePlaceholderValue(value); - if (!placeholder) return formattedTitle; - if (placeholder === PRETTY_PLACEHOLDER) - return interpolatePrettyPlaceholder(formattedTitle, normalisedValue); - return _util().default.format(formattedTitle, normalisedValue); - }, interpolateTitleIndex(title, rowIndex)) - .replace(new RegExp(JEST_EACH_PLACEHOLDER_ESCAPE, 'g'), PLACEHOLDER_PREFIX); - -const normalisePlaceholderValue = value => - typeof value === 'string' && SUPPORTED_PLACEHOLDERS.test(value) - ? value.replace(PLACEHOLDER_PREFIX, JEST_EACH_PLACEHOLDER_ESCAPE) - : value; - -const getMatchingPlaceholders = title => - title.match(SUPPORTED_PLACEHOLDERS) || []; - -const interpolateTitleIndex = (title, index) => - title.replace(INDEX_PLACEHOLDER, index.toString()); - -const interpolatePrettyPlaceholder = (title, value) => - title.replace( - PRETTY_PLACEHOLDER, - (0, _prettyFormat().default)(value, { - maxDepth: 1, - min: true - }) - ); diff --git a/node_modules/jest-each/build/table/template.d.ts b/node_modules/jest-each/build/table/template.d.ts deleted file mode 100644 index 320f4afa..00000000 --- a/node_modules/jest-each/build/table/template.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -declare type Template = Record; -declare const _default: (title: string, headings: string[], row: unknown[]) => { - title: string; - arguments: unknown[]; -}[]; -export default _default; -export declare function getPath(obj: Obj, path: [A, B, C, D, E]): Obj[A][B][C][D][E]; -export declare function getPath(obj: Obj, path: [A, B, C, D]): Obj[A][B][C][D]; -export declare function getPath(obj: Obj, path: [A, B, C]): Obj[A][B][C]; -export declare function getPath(obj: Obj, path: [A, B]): Obj[A][B]; -export declare function getPath(obj: Obj, path: [A]): Obj[A]; -export declare function getPath(obj: Obj, path: Array): unknown; -//# sourceMappingURL=template.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-each/build/table/template.d.ts.map b/node_modules/jest-each/build/table/template.d.ts.map deleted file mode 100644 index 345b2b61..00000000 --- a/node_modules/jest-each/build/table/template.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/table/template.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,aAAK,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;;;;;AAIxC,wBAWE;AA6CF,wBAAgB,OAAO,CACrB,GAAG,SAAS,QAAQ,EACpB,CAAC,SAAS,MAAM,GAAG,EACnB,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,EACtB,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACzB,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAC5B,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAC/B,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACvD,wBAAgB,OAAO,CACrB,GAAG,SAAS,QAAQ,EACpB,CAAC,SAAS,MAAM,GAAG,EACnB,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,EACtB,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACzB,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAC5B,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD,wBAAgB,OAAO,CACrB,GAAG,SAAS,QAAQ,EACpB,CAAC,SAAS,MAAM,GAAG,EACnB,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,EACtB,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACzB,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,wBAAgB,OAAO,CACrB,GAAG,SAAS,QAAQ,EACpB,CAAC,SAAS,MAAM,GAAG,EACnB,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC,CAAC,EACtB,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACrC,wBAAgB,OAAO,CAAC,GAAG,SAAS,QAAQ,EAAE,CAAC,SAAS,MAAM,GAAG,EAC/D,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,CAAC,CAAC,CAAC,GACR,GAAG,CAAC,CAAC,CAAC,CAAC;AACV,wBAAgB,OAAO,CAAC,GAAG,SAAS,QAAQ,EAC1C,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,GAClB,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-each/build/table/template.js b/node_modules/jest-each/build/table/template.js deleted file mode 100644 index 25af91cb..00000000 --- a/node_modules/jest-each/build/table/template.js +++ /dev/null @@ -1,102 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.getPath = getPath; -exports.default = void 0; - -function _prettyFormat() { - const data = _interopRequireDefault(require('pretty-format')); - - _prettyFormat = function _prettyFormat() { - return data; - }; - - return data; -} - -function _jestGetType() { - const data = require('jest-get-type'); - - _jestGetType = function _jestGetType() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -var _default = (title, headings, row) => { - const table = convertRowToTable(row, headings); - const templates = convertTableToTemplates(table, headings); - return templates.map(template => ({ - arguments: [template], - title: interpolate(title, template) - })); -}; - -exports.default = _default; - -const convertRowToTable = (row, headings) => - Array.from({ - length: row.length / headings.length - }).map((_, index) => - row.slice( - index * headings.length, - index * headings.length + headings.length - ) - ); - -const convertTableToTemplates = (table, headings) => - table.map(row => - row.reduce( - (acc, value, index) => - Object.assign(acc, { - [headings[index]]: value - }), - {} - ) - ); - -const interpolate = (title, template) => - Object.keys(template) - .reduce(getMatchingKeyPaths(title), []) // aka flatMap - .reduce(replaceKeyPathWithValue(template), title); - -const getMatchingKeyPaths = title => (matches, key) => - matches.concat(title.match(new RegExp(`\\$${key}[\\.\\w]*`, 'g')) || []); - -const replaceKeyPathWithValue = template => (title, match) => { - const keyPath = match.replace('$', '').split('.'); - const value = getPath(template, keyPath); - - if ((0, _jestGetType().isPrimitive)(value)) { - return title.replace(match, String(value)); - } - - return title.replace( - match, - (0, _prettyFormat().default)(value, { - maxDepth: 1, - min: true - }) - ); -}; -/* eslint import/export: 0*/ - -function getPath(template, [head, ...tail]) { - if (!head || !template.hasOwnProperty || !template.hasOwnProperty(head)) - return template; - return getPath(template[head], tail); -} diff --git a/node_modules/jest-each/build/validation.d.ts b/node_modules/jest-each/build/validation.d.ts deleted file mode 100644 index e60abab5..00000000 --- a/node_modules/jest-each/build/validation.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -export declare const validateArrayTable: (table: any) => void; -export declare const validateTemplateTableHeadings: (headings: string[], data: unknown[]) => void; -//# sourceMappingURL=validation.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-each/build/validation.d.ts.map b/node_modules/jest-each/build/validation.d.ts.map deleted file mode 100644 index 50f2c51b..00000000 --- a/node_modules/jest-each/build/validation.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAWH,eAAO,MAAM,kBAAkB,sBA4B9B,CAAC;AAOF,eAAO,MAAM,6BAA6B,+CAoBzC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-each/build/validation.js b/node_modules/jest-each/build/validation.js deleted file mode 100644 index e32fa4f9..00000000 --- a/node_modules/jest-each/build/validation.js +++ /dev/null @@ -1,102 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.validateTemplateTableHeadings = exports.validateArrayTable = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _prettyFormat() { - const data = _interopRequireDefault(require('pretty-format')); - - _prettyFormat = function _prettyFormat() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -const EXPECTED_COLOR = _chalk().default.green; - -const RECEIVED_COLOR = _chalk().default.red; - -const validateArrayTable = table => { - if (!Array.isArray(table)) { - throw new Error( - '`.each` must be called with an Array or Tagged Template Literal.\n\n' + - `Instead was called with: ${(0, _prettyFormat().default)(table, { - maxDepth: 1, - min: true - })}\n` - ); - } - - if (isTaggedTemplateLiteral(table)) { - if (isEmptyString(table[0])) { - throw new Error( - 'Error: `.each` called with an empty Tagged Template Literal of table data.\n' - ); - } - - throw new Error( - 'Error: `.each` called with a Tagged Template Literal with no data, remember to interpolate with ${expression} syntax.\n' - ); - } - - if (isEmptyTable(table)) { - throw new Error( - 'Error: `.each` called with an empty Array of table data.\n' - ); - } -}; - -exports.validateArrayTable = validateArrayTable; - -const isTaggedTemplateLiteral = array => array.raw !== undefined; - -const isEmptyTable = table => table.length === 0; - -const isEmptyString = str => typeof str === 'string' && str.trim() === ''; - -const validateTemplateTableHeadings = (headings, data) => { - const missingData = data.length % headings.length; - - if (missingData > 0) { - throw new Error( - 'Not enough arguments supplied for given headings:\n' + - EXPECTED_COLOR(headings.join(' | ')) + - '\n\n' + - 'Received:\n' + - RECEIVED_COLOR((0, _prettyFormat().default)(data)) + - '\n\n' + - `Missing ${RECEIVED_COLOR(missingData.toString())} ${pluralize( - 'argument', - missingData - )}` - ); - } -}; - -exports.validateTemplateTableHeadings = validateTemplateTableHeadings; - -const pluralize = (word, count) => word + (count === 1 ? '' : 's'); diff --git a/node_modules/jest-each/package.json b/node_modules/jest-each/package.json deleted file mode 100644 index d1b9b83a..00000000 --- a/node_modules/jest-each/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_args": [ - [ - "jest-each@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-each@24.9.0", - "_id": "jest-each@24.9.0", - "_inBundle": false, - "_integrity": "sha512-ONi0R4BvW45cw8s2Lrx8YgbeXL1oCQ/wIDwmsM3CqM/nlblNCPmnC3IPQlMbRFZu3wKdQ2U8BqM6lh3LJ5Bsog==", - "_location": "/jest-each", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-each@24.9.0", - "name": "jest-each", - "escapedName": "jest-each", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/jest-circus", - "/jest-jasmine2" - ], - "_resolved": "https://registry.npmjs.org/jest-each/-/jest-each-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Matt Phillips", - "url": "mattphillips" - }, - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/types": "^24.9.0", - "chalk": "^2.0.1", - "jest-get-type": "^24.9.0", - "jest-util": "^24.9.0", - "pretty-format": "^24.9.0" - }, - "description": "Parameterised tests for Jest", - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "keywords": [ - "jest", - "parameterised", - "test", - "each" - ], - "license": "MIT", - "main": "build/index.js", - "name": "jest-each", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-each" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-environment-jsdom/build/index.d.ts b/node_modules/jest-environment-jsdom/build/index.d.ts deleted file mode 100644 index d71bc8bc..00000000 --- a/node_modules/jest-environment-jsdom/build/index.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Script } from 'vm'; -import { Global, Config } from '@jest/types'; -import { ModuleMocker } from 'jest-mock'; -import { JestFakeTimers as FakeTimers } from '@jest/fake-timers'; -import { JestEnvironment, EnvironmentContext } from '@jest/environment'; -import { JSDOM } from 'jsdom'; -declare type Win = Window & Global.Global & { - Error: { - stackTraceLimit: number; - }; -}; -declare class JSDOMEnvironment implements JestEnvironment { - dom: JSDOM | null; - fakeTimers: FakeTimers | null; - global: Win; - errorEventListener: ((event: Event & { - error: Error; - }) => void) | null; - moduleMocker: ModuleMocker | null; - constructor(config: Config.ProjectConfig, options?: EnvironmentContext); - setup(): Promise; - teardown(): Promise; - runScript(script: Script): any; -} -export = JSDOMEnvironment; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-environment-jsdom/build/index.d.ts.map b/node_modules/jest-environment-jsdom/build/index.d.ts.map deleted file mode 100644 index 3eeb5f95..00000000 --- a/node_modules/jest-environment-jsdom/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,aAAa,CAAC;AAE3C,OAAa,EAAC,YAAY,EAAC,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAC,cAAc,IAAI,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,eAAe,EAAE,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAC,KAAK,EAAiB,MAAM,OAAO,CAAC;AAI5C,aAAK,GAAG,GAAG,MAAM,GACf,MAAM,CAAC,MAAM,GAAG;IACd,KAAK,EAAE;QACL,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;CACH,CAAC;AAEJ,cAAM,gBAAiB,YAAW,eAAe;IAC/C,GAAG,EAAE,KAAK,GAAG,IAAI,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IACtC,MAAM,EAAE,GAAG,CAAC;IACZ,kBAAkB,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,GAAG;QAAC,KAAK,EAAE,KAAK,CAAA;KAAC,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IACrE,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;gBAEtB,MAAM,EAAE,MAAM,CAAC,aAAa,EAAE,OAAO,GAAE,kBAAuB;IAgE1E,KAAK;IAIL,QAAQ;IAoBR,SAAS,CAAC,MAAM,EAAE,MAAM;CAMzB;AAED,SAAS,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-environment-jsdom/build/index.js b/node_modules/jest-environment-jsdom/build/index.js deleted file mode 100644 index 229c0ae7..00000000 --- a/node_modules/jest-environment-jsdom/build/index.js +++ /dev/null @@ -1,194 +0,0 @@ -'use strict'; - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _jestMock() { - const data = _interopRequireDefault(require('jest-mock')); - - _jestMock = function _jestMock() { - return data; - }; - - return data; -} - -function _fakeTimers() { - const data = require('@jest/fake-timers'); - - _fakeTimers = function _fakeTimers() { - return data; - }; - - return data; -} - -function _jsdom() { - const data = require('jsdom'); - - _jsdom = function _jsdom() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class JSDOMEnvironment { - constructor(config, options = {}) { - _defineProperty(this, 'dom', void 0); - - _defineProperty(this, 'fakeTimers', void 0); - - _defineProperty(this, 'global', void 0); - - _defineProperty(this, 'errorEventListener', void 0); - - _defineProperty(this, 'moduleMocker', void 0); - - this.dom = new (_jsdom()).JSDOM( - '', - _objectSpread( - { - pretendToBeVisual: true, - runScripts: 'dangerously', - url: config.testURL, - virtualConsole: new (_jsdom()).VirtualConsole().sendTo( - options.console || console - ) - }, - config.testEnvironmentOptions - ) - ); - const global = (this.global = this.dom.window.document.defaultView); - - if (!global) { - throw new Error('JSDOM did not return a Window object'); - } // Node's error-message stack size is limited at 10, but it's pretty useful - // to see more than that when a test fails. - - this.global.Error.stackTraceLimit = 100; - (0, _jestUtil().installCommonGlobals)(global, config.globals); // Report uncaught errors. - - this.errorEventListener = event => { - if (userErrorListenerCount === 0 && event.error) { - process.emit('uncaughtException', event.error); - } - }; - - global.addEventListener('error', this.errorEventListener); // However, don't report them as uncaught if the user listens to 'error' event. - // In that case, we assume the might have custom error handling logic. - - const originalAddListener = global.addEventListener; - const originalRemoveListener = global.removeEventListener; - let userErrorListenerCount = 0; - - global.addEventListener = function(...args) { - if (args[0] === 'error') { - userErrorListenerCount++; - } - - return originalAddListener.apply(this, args); - }; - - global.removeEventListener = function(...args) { - if (args[0] === 'error') { - userErrorListenerCount--; - } - - return originalRemoveListener.apply(this, args); - }; - - this.moduleMocker = new (_jestMock()).default.ModuleMocker(global); - const timerConfig = { - idToRef: id => id, - refToId: ref => ref - }; - this.fakeTimers = new (_fakeTimers()).JestFakeTimers({ - config, - global: global, - moduleMocker: this.moduleMocker, - timerConfig - }); - } - - setup() { - return Promise.resolve(); - } - - teardown() { - if (this.fakeTimers) { - this.fakeTimers.dispose(); - } - - if (this.global) { - if (this.errorEventListener) { - this.global.removeEventListener('error', this.errorEventListener); - } // Dispose "document" to prevent "load" event from triggering. - - Object.defineProperty(this.global, 'document', { - value: null - }); - this.global.close(); - } - - this.errorEventListener = null; // @ts-ignore - - this.global = null; - this.dom = null; - this.fakeTimers = null; - return Promise.resolve(); - } - - runScript(script) { - if (this.dom) { - return this.dom.runVMScript(script); - } - - return null; - } -} - -module.exports = JSDOMEnvironment; diff --git a/node_modules/jest-environment-jsdom/package.json b/node_modules/jest-environment-jsdom/package.json deleted file mode 100644 index 70397eee..00000000 --- a/node_modules/jest-environment-jsdom/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_args": [ - [ - "jest-environment-jsdom@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-environment-jsdom@24.9.0", - "_id": "jest-environment-jsdom@24.9.0", - "_inBundle": false, - "_integrity": "sha512-Zv9FV9NBRzLuALXjvRijO2351DRQeLYXtpD4xNvfoVFw21IOKNhZAEUKcbiEtjTkm2GsJ3boMVgkaR7rN8qetA==", - "_location": "/jest-environment-jsdom", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-environment-jsdom@24.9.0", - "name": "jest-environment-jsdom", - "escapedName": "jest-environment-jsdom", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/jest-config" - ], - "_resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/environment": "^24.9.0", - "@jest/fake-timers": "^24.9.0", - "@jest/types": "^24.9.0", - "jest-mock": "^24.9.0", - "jest-util": "^24.9.0", - "jsdom": "^11.5.1" - }, - "devDependencies": { - "@types/jsdom": "^11.12.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-environment-jsdom", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-environment-jsdom" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-environment-node/build/index.d.ts b/node_modules/jest-environment-node/build/index.d.ts deleted file mode 100644 index e053368e..00000000 --- a/node_modules/jest-environment-node/build/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Script, Context } from 'vm'; -import { Global, Config } from '@jest/types'; -import { ModuleMocker } from 'jest-mock'; -import { JestFakeTimers as FakeTimers } from '@jest/fake-timers'; -import { JestEnvironment } from '@jest/environment'; -declare type Timer = { - id: number; - ref: () => Timer; - unref: () => Timer; -}; -declare class NodeEnvironment implements JestEnvironment { - context: Context | null; - fakeTimers: FakeTimers | null; - global: Global.Global; - moduleMocker: ModuleMocker | null; - constructor(config: Config.ProjectConfig); - setup(): Promise; - teardown(): Promise; - runScript(script: Script): any; -} -export = NodeEnvironment; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-environment-node/build/index.d.ts.map b/node_modules/jest-environment-node/build/index.d.ts.map deleted file mode 100644 index 0eb4fb2d..00000000 --- a/node_modules/jest-environment-node/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAW,EAAC,MAAM,EAAE,OAAO,EAAC,MAAM,IAAI,CAAC;AACvC,OAAO,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAC,YAAY,EAAC,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAC,cAAc,IAAI,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,aAAK,KAAK,GAAG;IACX,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,KAAK,CAAC;IACjB,KAAK,EAAE,MAAM,KAAK,CAAC;CACpB,CAAC;AAEF,cAAM,eAAgB,YAAW,eAAe;IAC9C,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;IACtB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;gBAEtB,MAAM,EAAE,MAAM,CAAC,aAAa;IAwDxC,KAAK;IAIL,QAAQ;IAWR,SAAS,CAAC,MAAM,EAAE,MAAM;CAMzB;AAED,SAAS,eAAe,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-environment-node/build/index.js b/node_modules/jest-environment-node/build/index.js deleted file mode 100644 index 876b172b..00000000 --- a/node_modules/jest-environment-node/build/index.js +++ /dev/null @@ -1,153 +0,0 @@ -'use strict'; - -function _vm() { - const data = _interopRequireDefault(require('vm')); - - _vm = function _vm() { - return data; - }; - - return data; -} - -function _jestMock() { - const data = require('jest-mock'); - - _jestMock = function _jestMock() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _fakeTimers() { - const data = require('@jest/fake-timers'); - - _fakeTimers = function _fakeTimers() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class NodeEnvironment { - constructor(config) { - _defineProperty(this, 'context', void 0); - - _defineProperty(this, 'fakeTimers', void 0); - - _defineProperty(this, 'global', void 0); - - _defineProperty(this, 'moduleMocker', void 0); - - this.context = _vm().default.createContext(); - - const global = (this.global = _vm().default.runInContext( - 'this', - Object.assign(this.context, config.testEnvironmentOptions) - )); - - global.global = global; - global.clearInterval = clearInterval; - global.clearTimeout = clearTimeout; - global.setInterval = setInterval; - global.setTimeout = setTimeout; - global.ArrayBuffer = ArrayBuffer; // URL and URLSearchParams are global in Node >= 10 - - if (typeof URL !== 'undefined' && typeof URLSearchParams !== 'undefined') { - /* global URL, URLSearchParams */ - global.URL = URL; - global.URLSearchParams = URLSearchParams; - } // TextDecoder and TextDecoder are global in Node >= 11 - - if ( - typeof TextEncoder !== 'undefined' && - typeof TextDecoder !== 'undefined' - ) { - /* global TextEncoder, TextDecoder */ - global.TextEncoder = TextEncoder; - global.TextDecoder = TextDecoder; - } - - (0, _jestUtil().installCommonGlobals)(global, config.globals); - this.moduleMocker = new (_jestMock()).ModuleMocker(global); - - const timerIdToRef = id => ({ - id, - - ref() { - return this; - }, - - unref() { - return this; - } - }); - - const timerRefToId = timer => (timer && timer.id) || undefined; - - const timerConfig = { - idToRef: timerIdToRef, - refToId: timerRefToId - }; - this.fakeTimers = new (_fakeTimers()).JestFakeTimers({ - config, - global, - moduleMocker: this.moduleMocker, - timerConfig - }); - } - - setup() { - return Promise.resolve(); - } - - teardown() { - if (this.fakeTimers) { - this.fakeTimers.dispose(); - } - - this.context = null; - this.fakeTimers = null; - return Promise.resolve(); - } // TS infers the return type to be `any`, since that's what `runInContext` - // returns. - - runScript(script) { - if (this.context) { - return script.runInContext(this.context); - } - - return null; - } -} - -module.exports = NodeEnvironment; diff --git a/node_modules/jest-environment-node/package.json b/node_modules/jest-environment-node/package.json deleted file mode 100644 index 1d65e349..00000000 --- a/node_modules/jest-environment-node/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_args": [ - [ - "jest-environment-node@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-environment-node@24.9.0", - "_id": "jest-environment-node@24.9.0", - "_inBundle": false, - "_integrity": "sha512-6d4V2f4nxzIzwendo27Tr0aFm+IXWa0XEUnaH6nU0FMaozxovt+sfRvh4J47wL1OvF83I3SSTu0XK+i4Bqe7uA==", - "_location": "/jest-environment-node", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-environment-node@24.9.0", - "name": "jest-environment-node", - "escapedName": "jest-environment-node", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/jest-config" - ], - "_resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/environment": "^24.9.0", - "@jest/fake-timers": "^24.9.0", - "@jest/types": "^24.9.0", - "jest-mock": "^24.9.0", - "jest-util": "^24.9.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-environment-node", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-environment-node" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-get-type/LICENSE b/node_modules/jest-get-type/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-get-type/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-get-type/build/index.d.ts b/node_modules/jest-get-type/build/index.d.ts deleted file mode 100644 index 0b535b48..00000000 --- a/node_modules/jest-get-type/build/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare type ValueType = 'array' | 'boolean' | 'function' | 'null' | 'number' | 'object' | 'regexp' | 'map' | 'set' | 'date' | 'string' | 'symbol' | 'undefined'; -declare function getType(value: unknown): ValueType; -declare namespace getType { - var isPrimitive: (value: unknown) => boolean; -} -export = getType; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-get-type/build/index.d.ts.map b/node_modules/jest-get-type/build/index.d.ts.map deleted file mode 100644 index c52c866a..00000000 --- a/node_modules/jest-get-type/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,aAAK,SAAS,GACV,OAAO,GACP,SAAS,GACT,UAAU,GACV,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,KAAK,GACL,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,WAAW,CAAC;AAIhB,iBAAS,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CAiC1C;kBAjCQ,OAAO;;;AAqChB,SAAS,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-get-type/build/index.js b/node_modules/jest-get-type/build/index.js deleted file mode 100644 index 756e7c01..00000000 --- a/node_modules/jest-get-type/build/index.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// get the type of a value with handling the edge cases like `typeof []` -// and `typeof null` -function getType(value) { - if (value === undefined) { - return 'undefined'; - } else if (value === null) { - return 'null'; - } else if (Array.isArray(value)) { - return 'array'; - } else if (typeof value === 'boolean') { - return 'boolean'; - } else if (typeof value === 'function') { - return 'function'; - } else if (typeof value === 'number') { - return 'number'; - } else if (typeof value === 'string') { - return 'string'; - } else if (typeof value === 'object') { - if (value != null) { - if (value.constructor === RegExp) { - return 'regexp'; - } else if (value.constructor === Map) { - return 'map'; - } else if (value.constructor === Set) { - return 'set'; - } else if (value.constructor === Date) { - return 'date'; - } - } - - return 'object'; - } else if (typeof value === 'symbol') { - return 'symbol'; - } - - throw new Error(`value of unknown type: ${value}`); -} - -getType.isPrimitive = value => Object(value) !== value; - -module.exports = getType; diff --git a/node_modules/jest-get-type/package.json b/node_modules/jest-get-type/package.json deleted file mode 100644 index 765e9c8a..00000000 --- a/node_modules/jest-get-type/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "_args": [ - [ - "jest-get-type@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-get-type@24.9.0", - "_id": "jest-get-type@24.9.0", - "_inBundle": false, - "_integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", - "_location": "/jest-get-type", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-get-type@24.9.0", - "name": "jest-get-type", - "escapedName": "jest-get-type", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/expect", - "/jest-config", - "/jest-diff", - "/jest-each", - "/jest-leak-detector", - "/jest-matcher-utils", - "/jest-snapshot", - "/jest-validate" - ], - "_resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "description": "A utility function to get the type of a value", - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-get-type", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-get-type" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-haste-map/LICENSE b/node_modules/jest-haste-map/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-haste-map/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-haste-map/build/HasteFS.d.ts b/node_modules/jest-haste-map/build/HasteFS.d.ts deleted file mode 100644 index 567dd20b..00000000 --- a/node_modules/jest-haste-map/build/HasteFS.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { FileData } from './types'; -export default class HasteFS { - private readonly _rootDir; - private readonly _files; - constructor({ rootDir, files }: { - rootDir: Config.Path; - files: FileData; - }); - getModuleName(file: Config.Path): string | null; - getSize(file: Config.Path): number | null; - getDependencies(file: Config.Path): Array | null; - getSha1(file: Config.Path): string | null; - exists(file: Config.Path): boolean; - getAllFiles(): Array; - getFileIterator(): Iterable; - getAbsoluteFileIterator(): Iterable; - matchFiles(pattern: RegExp | string): Array; - matchFilesWithGlob(globs: Array, root: Config.Path | null): Set; - private _getFileData; -} -//# sourceMappingURL=HasteFS.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/HasteFS.d.ts.map b/node_modules/jest-haste-map/build/HasteFS.d.ts.map deleted file mode 100644 index 28d6e7b6..00000000 --- a/node_modules/jest-haste-map/build/HasteFS.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HasteFS.d.ts","sourceRoot":"","sources":["../src/HasteFS.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAIjC,MAAM,CAAC,OAAO,OAAO,OAAO;IAC1B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAc;IACvC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAW;gBAEtB,EAAC,OAAO,EAAE,KAAK,EAAC,EAAE;QAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC;QAAC,KAAK,EAAE,QAAQ,CAAA;KAAC;IAKrE,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,GAAG,IAAI;IAK/C,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,GAAG,IAAI;IAKzC,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI;IAYxD,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,GAAG,IAAI;IAKzC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO;IAIlC,WAAW,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;IAIjC,eAAe,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;IAIvC,uBAAuB,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;IAMjD,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;IAaxD,kBAAkB,CAChB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EACzB,IAAI,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,GACvB,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;IAWnB,OAAO,CAAC,YAAY;CAIrB"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/HasteFS.js b/node_modules/jest-haste-map/build/HasteFS.js deleted file mode 100644 index f0d8c457..00000000 --- a/node_modules/jest-haste-map/build/HasteFS.js +++ /dev/null @@ -1,249 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _micromatch() { - const data = _interopRequireDefault(require('micromatch')); - - _micromatch = function _micromatch() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -var fastPath = _interopRequireWildcard(require('./lib/fast_path')); - -var _constants = _interopRequireDefault(require('./constants')); - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class HasteFS { - constructor({rootDir, files}) { - _defineProperty(this, '_rootDir', void 0); - - _defineProperty(this, '_files', void 0); - - this._rootDir = rootDir; - this._files = files; - } - - getModuleName(file) { - const fileMetadata = this._getFileData(file); - - return (fileMetadata && fileMetadata[_constants.default.ID]) || null; - } - - getSize(file) { - const fileMetadata = this._getFileData(file); - - return (fileMetadata && fileMetadata[_constants.default.SIZE]) || null; - } - - getDependencies(file) { - const fileMetadata = this._getFileData(file); - - if (fileMetadata) { - return fileMetadata[_constants.default.DEPENDENCIES] - ? fileMetadata[_constants.default.DEPENDENCIES].split( - _constants.default.DEPENDENCY_DELIM - ) - : []; - } else { - return null; - } - } - - getSha1(file) { - const fileMetadata = this._getFileData(file); - - return (fileMetadata && fileMetadata[_constants.default.SHA1]) || null; - } - - exists(file) { - return this._getFileData(file) != null; - } - - getAllFiles() { - return Array.from(this.getAbsoluteFileIterator()); - } - - getFileIterator() { - return this._files.keys(); - } - - *getAbsoluteFileIterator() { - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = this.getFileIterator()[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const file = _step.value; - yield fastPath.resolve(this._rootDir, file); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - } - - matchFiles(pattern) { - if (!(pattern instanceof RegExp)) { - pattern = new RegExp(pattern); - } - - const files = []; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for ( - var _iterator2 = this.getAbsoluteFileIterator()[Symbol.iterator](), - _step2; - !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); - _iteratorNormalCompletion2 = true - ) { - const file = _step2.value; - - if (pattern.test(file)) { - files.push(file); - } - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - return files; - } - - matchFilesWithGlob(globs, root) { - const files = new Set(); - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for ( - var _iterator3 = this.getAbsoluteFileIterator()[Symbol.iterator](), - _step3; - !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); - _iteratorNormalCompletion3 = true - ) { - const file = _step3.value; - const filePath = root ? fastPath.relative(root, file) : file; - - if ( - _micromatch().default.some( - (0, _jestUtil().replacePathSepForGlob)(filePath), - globs - ) - ) { - files.add(file); - } - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return != null) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - - return files; - } - - _getFileData(file) { - const relativePath = fastPath.relative(this._rootDir, file); - return this._files.get(relativePath); - } -} - -exports.default = HasteFS; diff --git a/node_modules/jest-haste-map/build/ModuleMap.d.ts b/node_modules/jest-haste-map/build/ModuleMap.d.ts deleted file mode 100644 index 8d4e95e2..00000000 --- a/node_modules/jest-haste-map/build/ModuleMap.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { DuplicatesSet, HTypeValue, RawModuleMap, ModuleMapData, MockData } from './types'; -declare type ValueType = T extends Map ? V : never; -export declare type SerializableModuleMap = { - duplicates: ReadonlyArray<[string, [string, [string, [string, number]]]]>; - map: ReadonlyArray<[string, ValueType]>; - mocks: ReadonlyArray<[string, ValueType]>; - rootDir: Config.Path; -}; -export default class ModuleMap { - static DuplicateHasteCandidatesError: typeof DuplicateHasteCandidatesError; - private readonly _raw; - private json; - private static mapToArrayRecursive; - private static mapFromArrayRecursive; - constructor(raw: RawModuleMap); - getModule(name: string, platform?: string | null, supportsNativePlatform?: boolean | null, type?: HTypeValue | null): Config.Path | null; - getPackage(name: string, platform: string | null | undefined, _supportsNativePlatform: boolean | null): Config.Path | null; - getMockModule(name: string): Config.Path | undefined; - getRawModuleMap(): RawModuleMap; - toJSON(): SerializableModuleMap; - static fromJSON(serializableModuleMap: SerializableModuleMap): ModuleMap; - /** - * When looking up a module's data, we walk through each eligible platform for - * the query. For each platform, we want to check if there are known - * duplicates for that name+platform pair. The duplication logic normally - * removes elements from the `map` object, but we want to check upfront to be - * extra sure. If metadata exists both in the `duplicates` object and the - * `map`, this would be a bug. - */ - private _getModuleMetadata; - private _assertNoDuplicates; - static create(rootDir: Config.Path): ModuleMap; -} -declare class DuplicateHasteCandidatesError extends Error { - hasteName: string; - platform: string | null; - supportsNativePlatform: boolean; - duplicatesSet: DuplicatesSet; - constructor(name: string, platform: string, supportsNativePlatform: boolean, duplicatesSet: DuplicatesSet); -} -export {}; -//# sourceMappingURL=ModuleMap.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/ModuleMap.d.ts.map b/node_modules/jest-haste-map/build/ModuleMap.d.ts.map deleted file mode 100644 index 743b8284..00000000 --- a/node_modules/jest-haste-map/build/ModuleMap.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ModuleMap.d.ts","sourceRoot":"","sources":["../src/ModuleMap.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EACL,aAAa,EACb,UAAU,EAEV,YAAY,EACZ,aAAa,EACb,QAAQ,EACT,MAAM,SAAS,CAAC;AAQjB,aAAK,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAE/D,oBAAY,qBAAqB,GAAG;IAClC,UAAU,EAAE,aAAa,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1E,GAAG,EAAE,aAAa,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IACvD,KAAK,EAAE,aAAa,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACpD,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,SAAS;IAC5B,MAAM,CAAC,6BAA6B,EAAE,OAAO,6BAA6B,CAAC;IAC3E,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAe;IACpC,OAAO,CAAC,IAAI,CAAoC;IAEhD,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAYlC,OAAO,CAAC,MAAM,CAAC,qBAAqB;gBAYxB,GAAG,EAAE,YAAY;IAI7B,SAAS,CACP,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,EACxB,sBAAsB,CAAC,EAAE,OAAO,GAAG,IAAI,EACvC,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI,GACvB,MAAM,CAAC,IAAI,GAAG,IAAI;IAgBrB,UAAU,CACR,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,uBAAuB,EAAE,OAAO,GAAG,IAAI,GACtC,MAAM,CAAC,IAAI,GAAG,IAAI;IAIrB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,IAAI,GAAG,SAAS;IAMpD,eAAe,IAAI,YAAY;IAS/B,MAAM,IAAI,qBAAqB;IAc/B,MAAM,CAAC,QAAQ,CAAC,qBAAqB,EAAE,qBAAqB;IAW5D;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IAyC1B,OAAO,CAAC,mBAAmB;IA0B3B,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI;CAQnC;AAED,cAAM,6BAA8B,SAAQ,KAAK;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,sBAAsB,EAAE,OAAO,CAAC;IAChC,aAAa,EAAE,aAAa,CAAC;gBAG3B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,sBAAsB,EAAE,OAAO,EAC/B,aAAa,EAAE,aAAa;CAsB/B"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/ModuleMap.js b/node_modules/jest-haste-map/build/ModuleMap.js deleted file mode 100644 index 46272b71..00000000 --- a/node_modules/jest-haste-map/build/ModuleMap.js +++ /dev/null @@ -1,355 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var fastPath = _interopRequireWildcard(require('./lib/fast_path')); - -var _constants = _interopRequireDefault(require('./constants')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest() - ); -} - -function _nonIterableRest() { - throw new TypeError('Invalid attempt to destructure non-iterable instance'); -} - -function _iterableToArrayLimit(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - try { - for ( - var _i = arr[Symbol.iterator](), _s; - !(_n = (_s = _i.next()).done); - _n = true - ) { - _arr.push(_s.value); - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i['return'] != null) _i['return'](); - } finally { - if (_d) throw _e; - } - } - return _arr; -} - -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const EMPTY_OBJ = {}; -const EMPTY_MAP = new Map(); - -class ModuleMap { - static mapToArrayRecursive(map) { - let arr = Array.from(map); - - if (arr[0] && arr[0][1] instanceof Map) { - arr = arr.map(el => [el[0], this.mapToArrayRecursive(el[1])]); - } - - return arr; - } - - static mapFromArrayRecursive(arr) { - if (arr[0] && Array.isArray(arr[1])) { - arr = arr.map(el => [el[0], this.mapFromArrayRecursive(el[1])]); - } - - return new Map(arr); - } - - constructor(raw) { - _defineProperty(this, '_raw', void 0); - - _defineProperty(this, 'json', void 0); - - this._raw = raw; - } - - getModule(name, platform, supportsNativePlatform, type) { - if (type == null) { - type = _constants.default.MODULE; - } - - const module = this._getModuleMetadata( - name, - platform, - !!supportsNativePlatform - ); - - if (module && module[_constants.default.TYPE] === type) { - const modulePath = module[_constants.default.PATH]; - return modulePath && fastPath.resolve(this._raw.rootDir, modulePath); - } - - return null; - } - - getPackage(name, platform, _supportsNativePlatform) { - return this.getModule(name, platform, null, _constants.default.PACKAGE); - } - - getMockModule(name) { - const mockPath = - this._raw.mocks.get(name) || this._raw.mocks.get(name + '/index'); - - return mockPath && fastPath.resolve(this._raw.rootDir, mockPath); - } - - getRawModuleMap() { - return { - duplicates: this._raw.duplicates, - map: this._raw.map, - mocks: this._raw.mocks, - rootDir: this._raw.rootDir - }; - } - - toJSON() { - if (!this.json) { - this.json = { - duplicates: ModuleMap.mapToArrayRecursive(this._raw.duplicates), - map: Array.from(this._raw.map), - mocks: Array.from(this._raw.mocks), - rootDir: this._raw.rootDir - }; - } - - return this.json; - } - - static fromJSON(serializableModuleMap) { - return new ModuleMap({ - duplicates: ModuleMap.mapFromArrayRecursive( - serializableModuleMap.duplicates - ), - map: new Map(serializableModuleMap.map), - mocks: new Map(serializableModuleMap.mocks), - rootDir: serializableModuleMap.rootDir - }); - } - /** - * When looking up a module's data, we walk through each eligible platform for - * the query. For each platform, we want to check if there are known - * duplicates for that name+platform pair. The duplication logic normally - * removes elements from the `map` object, but we want to check upfront to be - * extra sure. If metadata exists both in the `duplicates` object and the - * `map`, this would be a bug. - */ - - _getModuleMetadata(name, platform, supportsNativePlatform) { - const map = this._raw.map.get(name) || EMPTY_OBJ; - const dupMap = this._raw.duplicates.get(name) || EMPTY_MAP; - - if (platform != null) { - this._assertNoDuplicates( - name, - platform, - supportsNativePlatform, - dupMap.get(platform) - ); - - if (map[platform] != null) { - return map[platform]; - } - } - - if (supportsNativePlatform) { - this._assertNoDuplicates( - name, - _constants.default.NATIVE_PLATFORM, - supportsNativePlatform, - dupMap.get(_constants.default.NATIVE_PLATFORM) - ); - - if (map[_constants.default.NATIVE_PLATFORM]) { - return map[_constants.default.NATIVE_PLATFORM]; - } - } - - this._assertNoDuplicates( - name, - _constants.default.GENERIC_PLATFORM, - supportsNativePlatform, - dupMap.get(_constants.default.GENERIC_PLATFORM) - ); - - if (map[_constants.default.GENERIC_PLATFORM]) { - return map[_constants.default.GENERIC_PLATFORM]; - } - - return null; - } - - _assertNoDuplicates(name, platform, supportsNativePlatform, relativePathSet) { - if (relativePathSet == null) { - return; - } // Force flow refinement - - const previousSet = relativePathSet; - const duplicates = new Map(); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = previousSet[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const _step$value = _slicedToArray(_step.value, 2), - relativePath = _step$value[0], - type = _step$value[1]; - - const duplicatePath = fastPath.resolve(this._raw.rootDir, relativePath); - duplicates.set(duplicatePath, type); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - throw new DuplicateHasteCandidatesError( - name, - platform, - supportsNativePlatform, - duplicates - ); - } - - static create(rootDir) { - return new ModuleMap({ - duplicates: new Map(), - map: new Map(), - mocks: new Map(), - rootDir - }); - } -} - -exports.default = ModuleMap; - -_defineProperty(ModuleMap, 'DuplicateHasteCandidatesError', void 0); - -class DuplicateHasteCandidatesError extends Error { - constructor(name, platform, supportsNativePlatform, duplicatesSet) { - const platformMessage = getPlatformMessage(platform); - super( - `The name \`${name}\` was looked up in the Haste module map. It ` + - `cannot be resolved, because there exists several different ` + - `files, or packages, that provide a module for ` + - `that particular name and platform. ${platformMessage} You must ` + - `delete or blacklist files until there remains only one of these:\n\n` + - Array.from(duplicatesSet) - .map( - ([dupFilePath, dupFileType]) => - ` * \`${dupFilePath}\` (${getTypeMessage(dupFileType)})\n` - ) - .sort() - .join('') - ); - - _defineProperty(this, 'hasteName', void 0); - - _defineProperty(this, 'platform', void 0); - - _defineProperty(this, 'supportsNativePlatform', void 0); - - _defineProperty(this, 'duplicatesSet', void 0); - - this.hasteName = name; - this.platform = platform; - this.supportsNativePlatform = supportsNativePlatform; - this.duplicatesSet = duplicatesSet; - } -} - -function getPlatformMessage(platform) { - if (platform === _constants.default.GENERIC_PLATFORM) { - return 'The platform is generic (no extension).'; - } - - return `The platform extension is \`${platform}\`.`; -} - -function getTypeMessage(type) { - switch (type) { - case _constants.default.MODULE: - return 'module'; - - case _constants.default.PACKAGE: - return 'package'; - } - - return 'unknown'; -} - -ModuleMap.DuplicateHasteCandidatesError = DuplicateHasteCandidatesError; diff --git a/node_modules/jest-haste-map/build/blacklist.d.ts b/node_modules/jest-haste-map/build/blacklist.d.ts deleted file mode 100644 index 661c2f9f..00000000 --- a/node_modules/jest-haste-map/build/blacklist.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare const extensions: Set; -export default extensions; -//# sourceMappingURL=blacklist.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/blacklist.d.ts.map b/node_modules/jest-haste-map/build/blacklist.d.ts.map deleted file mode 100644 index 8b681498..00000000 --- a/node_modules/jest-haste-map/build/blacklist.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"blacklist.d.ts","sourceRoot":"","sources":["../src/blacklist.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH,QAAA,MAAM,UAAU,EAAE,GAAG,CAAC,MAAM,CA0C1B,CAAC;AAEH,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/blacklist.js b/node_modules/jest-haste-map/build/blacklist.js deleted file mode 100644 index 32a1dba3..00000000 --- a/node_modules/jest-haste-map/build/blacklist.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// This list is compiled after the MDN list of the most common MIME types (see -// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/ -// Complete_list_of_MIME_types). -// -// Only MIME types starting with "image/", "video/", "audio/" and "font/" are -// reflected in the list. Adding "application/" is too risky since some text -// file formats (like ".js" and ".json") have an "application/" MIME type. -// -const extensions = new Set([ - // JSONs are never haste modules, except for "package.json", which is handled. - '.json', // Image extensions. - '.bmp', - '.gif', - '.ico', - '.jpeg', - '.jpg', - '.png', - '.svg', - '.tiff', - '.tif', - '.webp', // Video extensions. - '.avi', - '.mp4', - '.mpeg', - '.mpg', - '.ogv', - '.webm', - '.3gp', - '.3g2', // Audio extensions. - '.aac', - '.midi', - '.mid', - '.mp3', - '.oga', - '.wav', - '.3gp', - '.3g2', // Font extensions. - '.eot', - '.otf', - '.ttf', - '.woff', - '.woff2' -]); -var _default = extensions; -exports.default = _default; diff --git a/node_modules/jest-haste-map/build/constants.d.ts b/node_modules/jest-haste-map/build/constants.d.ts deleted file mode 100644 index 3f095411..00000000 --- a/node_modules/jest-haste-map/build/constants.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { HType } from './types'; -declare const constants: HType; -export default constants; -//# sourceMappingURL=constants.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/constants.d.ts.map b/node_modules/jest-haste-map/build/constants.d.ts.map deleted file mode 100644 index 09f1894c..00000000 --- a/node_modules/jest-haste-map/build/constants.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAE9B,QAAA,MAAM,SAAS,EAAE,KAuBhB,CAAC;AAEF,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/constants.js b/node_modules/jest-haste-map/build/constants.js deleted file mode 100644 index e666fa25..00000000 --- a/node_modules/jest-haste-map/build/constants.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -/* eslint-disable sort-keys */ - -/* - * This file exports a set of constants that are used for Jest's haste map - * serialization. On very large repositories, the haste map cache becomes very - * large to the point where it is the largest overhead in starting up Jest. - * - * This constant key map allows to keep the map smaller without having to build - * a custom serialization library. - */ -const constants = { - /* dependency serialization */ - DEPENDENCY_DELIM: '\0', - - /* file map attributes */ - ID: 0, - MTIME: 1, - SIZE: 2, - VISITED: 3, - DEPENDENCIES: 4, - SHA1: 5, - - /* module map attributes */ - PATH: 0, - TYPE: 1, - - /* module types */ - MODULE: 0, - PACKAGE: 1, - - /* platforms */ - GENERIC_PLATFORM: 'g', - NATIVE_PLATFORM: 'native' -}; -var _default = constants; -exports.default = _default; diff --git a/node_modules/jest-haste-map/build/crawlers/node.d.ts b/node_modules/jest-haste-map/build/crawlers/node.d.ts deleted file mode 100644 index d485553a..00000000 --- a/node_modules/jest-haste-map/build/crawlers/node.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { InternalHasteMap, CrawlerOptions } from '../types'; -declare const _default: (options: CrawlerOptions) => Promise<{ - removedFiles: Map; - hasteMap: InternalHasteMap; -}>; -export = _default; -//# sourceMappingURL=node.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/crawlers/node.d.ts.map b/node_modules/jest-haste-map/build/crawlers/node.d.ts.map deleted file mode 100644 index f6dc216e..00000000 --- a/node_modules/jest-haste-map/build/crawlers/node.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/crawlers/node.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EAEL,gBAAgB,EAChB,cAAc,EAEf,MAAM,UAAU,CAAC;;;;;AAsHlB,kBA6CE"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/crawlers/node.js b/node_modules/jest-haste-map/build/crawlers/node.js deleted file mode 100644 index 23985ae8..00000000 --- a/node_modules/jest-haste-map/build/crawlers/node.js +++ /dev/null @@ -1,267 +0,0 @@ -'use strict'; - -function _fs() { - const data = _interopRequireDefault(require('fs')); - - _fs = function _fs() { - return data; - }; - - return data; -} - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _child_process() { - const data = require('child_process'); - - _child_process = function _child_process() { - return data; - }; - - return data; -} - -var _constants = _interopRequireDefault(require('../constants')); - -var fastPath = _interopRequireWildcard(require('../lib/fast_path')); - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest() - ); -} - -function _nonIterableRest() { - throw new TypeError('Invalid attempt to destructure non-iterable instance'); -} - -function _iterableToArrayLimit(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - try { - for ( - var _i = arr[Symbol.iterator](), _s; - !(_n = (_s = _i.next()).done); - _n = true - ) { - _arr.push(_s.value); - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i['return'] != null) _i['return'](); - } finally { - if (_d) throw _e; - } - } - return _arr; -} - -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} - -function find(roots, extensions, ignore, callback) { - const result = []; - let activeCalls = 0; - - function search(directory) { - activeCalls++; - - _fs().default.readdir(directory, (err, names) => { - activeCalls--; - - if (err) { - callback(result); - return; - } - - names.forEach(file => { - file = _path().default.join(directory, file); - - if (ignore(file)) { - return; - } - - activeCalls++; - - _fs().default.lstat(file, (err, stat) => { - activeCalls--; - - if (!err && stat && !stat.isSymbolicLink()) { - if (stat.isDirectory()) { - search(file); - } else { - const ext = _path() - .default.extname(file) - .substr(1); - - if (extensions.indexOf(ext) !== -1) { - result.push([file, stat.mtime.getTime(), stat.size]); - } - } - } - - if (activeCalls === 0) { - callback(result); - } - }); - }); - - if (activeCalls === 0) { - callback(result); - } - }); - } - - if (roots.length > 0) { - roots.forEach(search); - } else { - callback(result); - } -} - -function findNative(roots, extensions, ignore, callback) { - const args = Array.from(roots); - args.push('-type', 'f'); - - if (extensions.length) { - args.push('('); - } - - extensions.forEach((ext, index) => { - if (index) { - args.push('-o'); - } - - args.push('-iname'); - args.push('*.' + ext); - }); - - if (extensions.length) { - args.push(')'); - } - - const child = (0, _child_process().spawn)('find', args); - let stdout = ''; - - if (child.stdout === null) { - throw new Error( - 'stdout is null - this should never happen. Please open up an issue at https://github.com/facebook/jest' - ); - } - - child.stdout.setEncoding('utf-8'); - child.stdout.on('data', data => (stdout += data)); - child.stdout.on('close', () => { - const lines = stdout - .trim() - .split('\n') - .filter(x => !ignore(x)); - const result = []; - let count = lines.length; - - if (!count) { - callback([]); - } else { - lines.forEach(path => { - _fs().default.stat(path, (err, stat) => { - if (!err && stat) { - result.push([path, stat.mtime.getTime(), stat.size]); - } - - if (--count === 0) { - callback(result); - } - }); - }); - } - }); -} - -module.exports = function nodeCrawl(options) { - const data = options.data, - extensions = options.extensions, - forceNodeFilesystemAPI = options.forceNodeFilesystemAPI, - ignore = options.ignore, - rootDir = options.rootDir, - roots = options.roots; - return new Promise(resolve => { - const callback = list => { - const files = new Map(); - const removedFiles = new Map(data.files); - list.forEach(fileData => { - const _fileData = _slicedToArray(fileData, 3), - filePath = _fileData[0], - mtime = _fileData[1], - size = _fileData[2]; - - const relativeFilePath = fastPath.relative(rootDir, filePath); - const existingFile = data.files.get(relativeFilePath); - - if (existingFile && existingFile[_constants.default.MTIME] === mtime) { - files.set(relativeFilePath, existingFile); - } else { - // See ../constants.js; SHA-1 will always be null and fulfilled later. - files.set(relativeFilePath, ['', mtime, size, 0, '', null]); - } - - removedFiles.delete(relativeFilePath); - }); - data.files = files; - resolve({ - hasteMap: data, - removedFiles - }); - }; - - if (forceNodeFilesystemAPI || process.platform === 'win32') { - find(roots, extensions, ignore, callback); - } else { - findNative(roots, extensions, ignore, callback); - } - }); -}; diff --git a/node_modules/jest-haste-map/build/crawlers/watchman.d.ts b/node_modules/jest-haste-map/build/crawlers/watchman.d.ts deleted file mode 100644 index aa5153f9..00000000 --- a/node_modules/jest-haste-map/build/crawlers/watchman.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { InternalHasteMap, CrawlerOptions } from '../types'; -declare const _default: (options: CrawlerOptions) => Promise<{ - changedFiles?: Map | undefined; - removedFiles: Map; - hasteMap: InternalHasteMap; -}>; -export = _default; -//# sourceMappingURL=watchman.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/crawlers/watchman.d.ts.map b/node_modules/jest-haste-map/build/crawlers/watchman.d.ts.map deleted file mode 100644 index 8b1bac56..00000000 --- a/node_modules/jest-haste-map/build/crawlers/watchman.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"watchman.d.ts","sourceRoot":"","sources":["../../src/crawlers/watchman.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,OAAO,EACL,gBAAgB,EAChB,cAAc,EAGf,MAAM,UAAU,CAAC;;;;;;AAclB,kBAwOE"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/crawlers/watchman.js b/node_modules/jest-haste-map/build/crawlers/watchman.js deleted file mode 100644 index dc7c62ad..00000000 --- a/node_modules/jest-haste-map/build/crawlers/watchman.js +++ /dev/null @@ -1,588 +0,0 @@ -'use strict'; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _fbWatchman() { - const data = _interopRequireDefault(require('fb-watchman')); - - _fbWatchman = function _fbWatchman() { - return data; - }; - - return data; -} - -var fastPath = _interopRequireWildcard(require('../lib/fast_path')); - -var _normalizePathSep = _interopRequireDefault( - require('../lib/normalizePathSep') -); - -var _constants = _interopRequireDefault(require('../constants')); - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest() - ); -} - -function _nonIterableRest() { - throw new TypeError('Invalid attempt to destructure non-iterable instance'); -} - -function _iterableToArrayLimit(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - try { - for ( - var _i = arr[Symbol.iterator](), _s; - !(_n = (_s = _i.next()).done); - _n = true - ) { - _arr.push(_s.value); - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i['return'] != null) _i['return'](); - } finally { - if (_d) throw _e; - } - } - return _arr; -} - -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -const watchmanURL = - 'https://facebook.github.io/watchman/docs/troubleshooting.html'; - -function WatchmanError(error) { - error.message = - `Watchman error: ${error.message.trim()}. Make sure watchman ` + - `is running for this project. See ${watchmanURL}.`; - return error; -} - -module.exports = - /*#__PURE__*/ - (function() { - var _watchmanCrawl = _asyncToGenerator(function*(options) { - const fields = ['name', 'exists', 'mtime_ms', 'size']; - const data = options.data, - extensions = options.extensions, - ignore = options.ignore, - rootDir = options.rootDir, - roots = options.roots; - const defaultWatchExpression = [ - 'allof', - ['type', 'f'], - ['anyof', ...extensions.map(extension => ['suffix', extension])] - ]; - const clocks = data.clocks; - const client = new (_fbWatchman()).default.Client(); - let clientError; - client.on('error', error => (clientError = WatchmanError(error))); // TODO: type better than `any` - - const cmd = (...args) => - new Promise((resolve, reject) => - client.command(args, (error, result) => - error ? reject(WatchmanError(error)) : resolve(result) - ) - ); - - if (options.computeSha1) { - const _ref = yield cmd('list-capabilities'), - capabilities = _ref.capabilities; - - if (capabilities.indexOf('field-content.sha1hex') !== -1) { - fields.push('content.sha1hex'); - } - } - - function getWatchmanRoots(_x2) { - return _getWatchmanRoots.apply(this, arguments); - } - - function _getWatchmanRoots() { - _getWatchmanRoots = _asyncToGenerator(function*(roots) { - const watchmanRoots = new Map(); - yield Promise.all( - roots.map( - /*#__PURE__*/ - (function() { - var _ref2 = _asyncToGenerator(function*(root) { - const response = yield cmd('watch-project', root); - const existing = watchmanRoots.get(response.watch); // A root can only be filtered if it was never seen with a - // relative_path before. - - const canBeFiltered = !existing || existing.length > 0; - - if (canBeFiltered) { - if (response.relative_path) { - watchmanRoots.set( - response.watch, - (existing || []).concat(response.relative_path) - ); - } else { - // Make the filter directories an empty array to signal that this - // root was already seen and needs to be watched for all files or - // directories. - watchmanRoots.set(response.watch, []); - } - } - }); - - return function(_x4) { - return _ref2.apply(this, arguments); - }; - })() - ) - ); - return watchmanRoots; - }); - return _getWatchmanRoots.apply(this, arguments); - } - - function queryWatchmanForDirs(_x3) { - return _queryWatchmanForDirs.apply(this, arguments); - } - - function _queryWatchmanForDirs() { - _queryWatchmanForDirs = _asyncToGenerator(function*( - rootProjectDirMappings - ) { - const files = new Map(); - let isFresh = false; - yield Promise.all( - Array.from(rootProjectDirMappings).map( - /*#__PURE__*/ - (function() { - var _ref3 = _asyncToGenerator(function*([ - root, - directoryFilters - ]) { - const expression = Array.from(defaultWatchExpression); - const glob = []; - - if (directoryFilters.length > 0) { - expression.push([ - 'anyof', - ...directoryFilters.map(dir => ['dirname', dir]) - ]); - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for ( - var _iterator2 = directoryFilters[Symbol.iterator](), - _step2; - !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()) - .done); - _iteratorNormalCompletion2 = true - ) { - const directory = _step2.value; - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for ( - var _iterator3 = extensions[Symbol.iterator](), - _step3; - !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()) - .done); - _iteratorNormalCompletion3 = true - ) { - const extension = _step3.value; - glob.push(`${directory}/**/*.${extension}`); - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if ( - !_iteratorNormalCompletion3 && - _iterator3.return != null - ) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if ( - !_iteratorNormalCompletion2 && - _iterator2.return != null - ) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - } else { - var _iteratorNormalCompletion4 = true; - var _didIteratorError4 = false; - var _iteratorError4 = undefined; - - try { - for ( - var _iterator4 = extensions[Symbol.iterator](), _step4; - !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()) - .done); - _iteratorNormalCompletion4 = true - ) { - const extension = _step4.value; - glob.push(`**/*.${extension}`); - } - } catch (err) { - _didIteratorError4 = true; - _iteratorError4 = err; - } finally { - try { - if ( - !_iteratorNormalCompletion4 && - _iterator4.return != null - ) { - _iterator4.return(); - } - } finally { - if (_didIteratorError4) { - throw _iteratorError4; - } - } - } - } - - const relativeRoot = fastPath.relative(rootDir, root); - const query = clocks.has(relativeRoot) // Use the `since` generator if we have a clock available - ? { - expression, - fields, - since: clocks.get(relativeRoot) - } // Otherwise use the `glob` filter - : { - expression, - fields, - glob - }; - const response = yield cmd('query', root, query); - - if ('warning' in response) { - console.warn('watchman warning: ', response.warning); - } - - isFresh = isFresh || response.is_fresh_instance; - files.set(root, response); - }); - - return function(_x5) { - return _ref3.apply(this, arguments); - }; - })() - ) - ); - return { - files, - isFresh - }; - }); - return _queryWatchmanForDirs.apply(this, arguments); - } - - let files = data.files; - let removedFiles = new Map(); - const changedFiles = new Map(); - let watchmanFiles; - let isFresh = false; - - try { - const watchmanRoots = yield getWatchmanRoots(roots); - const watchmanFileResults = yield queryWatchmanForDirs(watchmanRoots); // Reset the file map if watchman was restarted and sends us a list of - // files. - - if (watchmanFileResults.isFresh) { - files = new Map(); - removedFiles = new Map(data.files); - isFresh = true; - } - - watchmanFiles = watchmanFileResults.files; - } finally { - client.end(); - } - - if (clientError) { - throw clientError; - } // TODO: remove non-null - - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = watchmanFiles[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const _step$value = _slicedToArray(_step.value, 2), - watchRoot = _step$value[0], - response = _step$value[1]; - - const fsRoot = (0, _normalizePathSep.default)(watchRoot); - const relativeFsRoot = fastPath.relative(rootDir, fsRoot); - clocks.set(relativeFsRoot, response.clock); - var _iteratorNormalCompletion5 = true; - var _didIteratorError5 = false; - var _iteratorError5 = undefined; - - try { - for ( - var _iterator5 = response.files[Symbol.iterator](), _step5; - !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); - _iteratorNormalCompletion5 = true - ) { - const fileData = _step5.value; - const filePath = - fsRoot + - _path().default.sep + - (0, _normalizePathSep.default)(fileData.name); - const relativeFilePath = fastPath.relative(rootDir, filePath); - const existingFileData = data.files.get(relativeFilePath); // If watchman is fresh, the removed files map starts with all files - // and we remove them as we verify they still exist. - - if (isFresh && existingFileData && fileData.exists) { - removedFiles.delete(relativeFilePath); - } - - if (!fileData.exists) { - // No need to act on files that do not exist and were not tracked. - if (existingFileData) { - files.delete(relativeFilePath); // If watchman is not fresh, we will know what specific files were - // deleted since we last ran and can track only those files. - - if (!isFresh) { - removedFiles.set(relativeFilePath, existingFileData); - } - } - } else if (!ignore(filePath)) { - const mtime = - typeof fileData.mtime_ms === 'number' - ? fileData.mtime_ms - : fileData.mtime_ms.toNumber(); - const size = fileData.size; - let sha1hex = fileData['content.sha1hex']; - - if (typeof sha1hex !== 'string' || sha1hex.length !== 40) { - sha1hex = null; - } - - let nextData; - - if ( - existingFileData && - existingFileData[_constants.default.MTIME] === mtime - ) { - nextData = existingFileData; - } else if ( - existingFileData && - sha1hex && - existingFileData[_constants.default.SHA1] === sha1hex - ) { - nextData = [ - existingFileData[0], - mtime, - existingFileData[2], - existingFileData[3], - existingFileData[4], - existingFileData[5] - ]; - } else { - // See ../constants.ts - nextData = ['', mtime, size, 0, '', sha1hex]; - } - - const mappings = options.mapper - ? options.mapper(filePath) - : null; - - if (mappings) { - var _iteratorNormalCompletion6 = true; - var _didIteratorError6 = false; - var _iteratorError6 = undefined; - - try { - for ( - var _iterator6 = mappings[Symbol.iterator](), _step6; - !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()) - .done); - _iteratorNormalCompletion6 = true - ) { - const absoluteVirtualFilePath = _step6.value; - - if (!ignore(absoluteVirtualFilePath)) { - const relativeVirtualFilePath = fastPath.relative( - rootDir, - absoluteVirtualFilePath - ); - files.set(relativeVirtualFilePath, nextData); - changedFiles.set(relativeVirtualFilePath, nextData); - } - } - } catch (err) { - _didIteratorError6 = true; - _iteratorError6 = err; - } finally { - try { - if ( - !_iteratorNormalCompletion6 && - _iterator6.return != null - ) { - _iterator6.return(); - } - } finally { - if (_didIteratorError6) { - throw _iteratorError6; - } - } - } - } else { - files.set(relativeFilePath, nextData); - changedFiles.set(relativeFilePath, nextData); - } - } - } - } catch (err) { - _didIteratorError5 = true; - _iteratorError5 = err; - } finally { - try { - if (!_iteratorNormalCompletion5 && _iterator5.return != null) { - _iterator5.return(); - } - } finally { - if (_didIteratorError5) { - throw _iteratorError5; - } - } - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - data.files = files; - return { - changedFiles: isFresh ? undefined : changedFiles, - hasteMap: data, - removedFiles - }; - }); - - function watchmanCrawl(_x) { - return _watchmanCrawl.apply(this, arguments); - } - - return watchmanCrawl; - })(); diff --git a/node_modules/jest-haste-map/build/getMockName.d.ts b/node_modules/jest-haste-map/build/getMockName.d.ts deleted file mode 100644 index 3f1c4801..00000000 --- a/node_modules/jest-haste-map/build/getMockName.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare const getMockName: (filePath: string) => string; -export default getMockName; -//# sourceMappingURL=getMockName.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/getMockName.d.ts.map b/node_modules/jest-haste-map/build/getMockName.d.ts.map deleted file mode 100644 index ec0cff9e..00000000 --- a/node_modules/jest-haste-map/build/getMockName.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getMockName.d.ts","sourceRoot":"","sources":["../src/getMockName.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,QAAA,MAAM,WAAW,8BAKhB,CAAC;AAEF,eAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/getMockName.js b/node_modules/jest-haste-map/build/getMockName.js deleted file mode 100644 index 29e0f998..00000000 --- a/node_modules/jest-haste-map/build/getMockName.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const MOCKS_PATTERN = _path().default.sep + '__mocks__' + _path().default.sep; - -const getMockName = filePath => { - const mockPath = filePath.split(MOCKS_PATTERN)[1]; - return mockPath - .substring(0, mockPath.lastIndexOf(_path().default.extname(mockPath))) - .replace(/\\/g, '/'); -}; - -var _default = getMockName; -exports.default = _default; diff --git a/node_modules/jest-haste-map/build/index.d.ts b/node_modules/jest-haste-map/build/index.d.ts deleted file mode 100644 index ab108ca7..00000000 --- a/node_modules/jest-haste-map/build/index.d.ts +++ /dev/null @@ -1,192 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import EventEmitter from 'events'; -import { Config } from '@jest/types'; -import H from './constants'; -import HasteFS from './HasteFS'; -import HasteModuleMap, { SerializableModuleMap as HasteSerializableModuleMap } from './ModuleMap'; -import { ChangeEvent, HasteMap as InternalHasteMapObject, HasteRegExp, InternalHasteMap, Mapper } from './types'; -declare type HType = typeof H; -declare type Options = { - cacheDirectory?: string; - computeDependencies?: boolean; - computeSha1?: boolean; - console?: Console; - dependencyExtractor?: string; - extensions: Array; - forceNodeFilesystemAPI?: boolean; - hasteImplModulePath?: string; - ignorePattern?: HasteRegExp; - mapper?: Mapper; - maxWorkers: number; - mocksPattern?: string; - name: string; - platforms: Array; - providesModuleNodeModules?: Array; - resetCache?: boolean; - retainAllFiles: boolean; - rootDir: string; - roots: Array; - skipPackageJson?: boolean; - throwOnModuleCollision?: boolean; - useWatchman?: boolean; - watch?: boolean; -}; -declare namespace HasteMap { - type ModuleMap = HasteModuleMap; - type SerializableModuleMap = HasteSerializableModuleMap; - type FS = HasteFS; - type HasteMapObject = InternalHasteMapObject; - type HasteChangeEvent = ChangeEvent; -} -/** - * HasteMap is a JavaScript implementation of Facebook's haste module system. - * - * This implementation is inspired by https://github.com/facebook/node-haste - * and was built with for high-performance in large code repositories with - * hundreds of thousands of files. This implementation is scalable and provides - * predictable performance. - * - * Because the haste map creation and synchronization is critical to startup - * performance and most tasks are blocked by I/O this class makes heavy use of - * synchronous operations. It uses worker processes for parallelizing file - * access and metadata extraction. - * - * The data structures created by `jest-haste-map` can be used directly from the - * cache without further processing. The metadata objects in the `files` and - * `map` objects contain cross-references: a metadata object from one can look - * up the corresponding metadata object in the other map. Note that in most - * projects, the number of files will be greater than the number of haste - * modules one module can refer to many files based on platform extensions. - * - * type HasteMap = { - * clocks: WatchmanClocks, - * files: {[filepath: string]: FileMetaData}, - * map: {[id: string]: ModuleMapItem}, - * mocks: {[id: string]: string}, - * } - * - * // Watchman clocks are used for query synchronization and file system deltas. - * type WatchmanClocks = {[filepath: string]: string}; - * - * type FileMetaData = { - * id: ?string, // used to look up module metadata objects in `map`. - * mtime: number, // check for outdated files. - * size: number, // size of the file in bytes. - * visited: boolean, // whether the file has been parsed or not. - * dependencies: Array, // all relative dependencies of this file. - * sha1: ?string, // SHA-1 of the file, if requested via options. - * }; - * - * // Modules can be targeted to a specific platform based on the file name. - * // Example: platform.ios.js and Platform.android.js will both map to the same - * // `Platform` module. The platform should be specified during resolution. - * type ModuleMapItem = {[platform: string]: ModuleMetaData}; - * - * // - * type ModuleMetaData = { - * path: string, // the path to look up the file object in `files`. - * type: string, // the module type (either `package` or `module`). - * }; - * - * Note that the data structures described above are conceptual only. The actual - * implementation uses arrays and constant keys for metadata storage. Instead of - * `{id: 'flatMap', mtime: 3421, size: 42, visited: true, dependencies: []}` the real - * representation is similar to `['flatMap', 3421, 42, 1, []]` to save storage space - * and reduce parse and write time of a big JSON blob. - * - * The HasteMap is created as follows: - * 1. read data from the cache or create an empty structure. - * - * 2. crawl the file system. - * * empty cache: crawl the entire file system. - * * cache available: - * * if watchman is available: get file system delta changes. - * * if watchman is unavailable: crawl the entire file system. - * * build metadata objects for every file. This builds the `files` part of - * the `HasteMap`. - * - * 3. parse and extract metadata from changed files. - * * this is done in parallel over worker processes to improve performance. - * * the worst case is to parse all files. - * * the best case is no file system access and retrieving all data from - * the cache. - * * the average case is a small number of changed files. - * - * 4. serialize the new `HasteMap` in a cache file. - * Worker processes can directly access the cache through `HasteMap.read()`. - * - */ -declare class HasteMap extends EventEmitter { - private _buildPromise; - private _cachePath; - private _changeInterval?; - private _console; - private _options; - private _watchers; - private _whitelist; - private _worker; - constructor(options: Options); - static getCacheFilePath(tmpdir: Config.Path, name: string, ...extra: Array): string; - getCacheFilePath(): string; - build(): Promise; - /** - * 1. read data from the cache or create an empty structure. - */ - read(): InternalHasteMap; - readModuleMap(): HasteModuleMap; - /** - * 2. crawl the file system. - */ - private _buildFileMap; - /** - * 3. parse and extract metadata from changed files. - */ - private _processFile; - private _buildHasteMap; - private _cleanup; - /** - * 4. serialize the new `HasteMap` in a cache file. - */ - private _persist; - /** - * Creates workers or parses files and extracts metadata in-process. - */ - private _getWorker; - private _crawl; - /** - * Watch mode - */ - private _watch; - /** - * This function should be called when the file under `filePath` is removed - * or changed. When that happens, we want to figure out if that file was - * part of a group of files that had the same ID. If it was, we want to - * remove it from the group. Furthermore, if there is only one file - * remaining in the group, then we want to restore that single file as the - * correct resolution for its ID, and cleanup the duplicates index. - */ - private _recoverDuplicates; - end(): Promise; - /** - * Helpers - */ - private _ignore; - private _isNodeModulesDir; - private _createEmptyMap; - static H: HType; - static DuplicateError: typeof DuplicateError; - static ModuleMap: typeof HasteModuleMap; -} -declare class DuplicateError extends Error { - mockPath1: string; - mockPath2: string; - constructor(mockPath1: string, mockPath2: string); -} -export = HasteMap; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/index.d.ts.map b/node_modules/jest-haste-map/build/index.d.ts.map deleted file mode 100644 index db7828a8..00000000 --- a/node_modules/jest-haste-map/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAIH,OAAO,YAAY,MAAM,QAAQ,CAAC;AAMlC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAMnC,OAAO,CAAC,MAAM,aAAa,CAAC;AAC5B,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,cAAc,EAAE,EACrB,qBAAqB,IAAI,0BAA0B,EACpD,MAAM,aAAa,CAAC;AAQrB,OAAO,EACL,WAAW,EAGX,QAAQ,IAAI,sBAAsB,EAClC,WAAW,EACX,gBAAgB,EAChB,MAAM,EAOP,MAAM,SAAS,CAAC;AAEjB,aAAK,KAAK,GAAG,OAAO,CAAC,CAAC;AAEtB,aAAK,OAAO,GAAG;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,yBAAyB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAiCF,kBAAU,QAAQ,CAAC;IACjB,KAAY,SAAS,GAAG,cAAc,CAAC;IACvC,KAAY,qBAAqB,GAAG,0BAA0B,CAAC;IAC/D,KAAY,EAAE,GAAG,OAAO,CAAC;IACzB,KAAY,cAAc,GAAG,sBAAsB,CAAC;IACpD,KAAY,gBAAgB,GAAG,WAAW,CAAC;CAC5C;AAyCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AAEH,cAAM,QAAS,SAAQ,YAAY;IACjC,OAAO,CAAC,aAAa,CAAyC;IAC9D,OAAO,CAAC,UAAU,CAAc;IAChC,OAAO,CAAC,eAAe,CAAC,CAAiB;IACzC,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,UAAU,CAAgB;IAClC,OAAO,CAAC,OAAO,CAAyB;gBAE5B,OAAO,EAAE,OAAO;IAiF5B,MAAM,CAAC,gBAAgB,CACrB,MAAM,EAAE,MAAM,CAAC,IAAI,EACnB,IAAI,EAAE,MAAM,EACZ,GAAG,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,GACtB,MAAM;IAQT,gBAAgB,IAAI,MAAM;IAI1B,KAAK,IAAI,OAAO,CAAC,sBAAsB,CAAC;IA2CxC;;OAEG;IACH,IAAI,IAAI,gBAAgB;IAYxB,aAAa,IAAI,cAAc;IAU/B;;OAEG;YACW,aAAa;IAe3B;;OAEG;IACH,OAAO,CAAC,YAAY;IAsNpB,OAAO,CAAC,cAAc;IA2DtB,OAAO,CAAC,QAAQ;IAYhB;;OAEG;IACH,OAAO,CAAC,QAAQ;IAIhB;;OAEG;IACH,OAAO,CAAC,UAAU;IAiBlB,OAAO,CAAC,MAAM;IA8Cd;;OAEG;IACH,OAAO,CAAC,MAAM;IA6Md;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IAgD1B,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBpB;;OAEG;IACH,OAAO,CAAC,OAAO;IAaf,OAAO,CAAC,iBAAiB;IAsBzB,OAAO,CAAC,eAAe;IAUvB,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC;IAChB,MAAM,CAAC,cAAc,EAAE,OAAO,cAAc,CAAC;IAC7C,MAAM,CAAC,SAAS,EAAE,OAAO,cAAc,CAAC;CACzC;AAED,cAAM,cAAe,SAAQ,KAAK;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;gBAEN,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;CAMjD;AAcD,SAAS,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/index.js b/node_modules/jest-haste-map/build/index.js deleted file mode 100644 index 7943a9ba..00000000 --- a/node_modules/jest-haste-map/build/index.js +++ /dev/null @@ -1,1390 +0,0 @@ -'use strict'; - -function _child_process() { - const data = require('child_process'); - - _child_process = function _child_process() { - return data; - }; - - return data; -} - -function _crypto() { - const data = _interopRequireDefault(require('crypto')); - - _crypto = function _crypto() { - return data; - }; - - return data; -} - -function _events() { - const data = _interopRequireDefault(require('events')); - - _events = function _events() { - return data; - }; - - return data; -} - -function _os() { - const data = _interopRequireDefault(require('os')); - - _os = function _os() { - return data; - }; - - return data; -} - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _sane() { - const data = _interopRequireDefault(require('sane')); - - _sane = function _sane() { - return data; - }; - - return data; -} - -function _invariant() { - const data = _interopRequireDefault(require('invariant')); - - _invariant = function _invariant() { - return data; - }; - - return data; -} - -function _jestSerializer() { - const data = _interopRequireDefault(require('jest-serializer')); - - _jestSerializer = function _jestSerializer() { - return data; - }; - - return data; -} - -function _jestWorker() { - const data = _interopRequireDefault(require('jest-worker')); - - _jestWorker = function _jestWorker() { - return data; - }; - - return data; -} - -var _worker = require('./worker'); - -var _getMockName = _interopRequireDefault(require('./getMockName')); - -var _getPlatformExtension = _interopRequireDefault( - require('./lib/getPlatformExtension') -); - -var _constants = _interopRequireDefault(require('./constants')); - -var _HasteFS = _interopRequireDefault(require('./HasteFS')); - -var _ModuleMap = _interopRequireDefault(require('./ModuleMap')); - -var _node = _interopRequireDefault(require('./crawlers/node')); - -var _normalizePathSep = _interopRequireDefault( - require('./lib/normalizePathSep') -); - -var _watchman = _interopRequireDefault(require('./crawlers/watchman')); - -var _WatchmanWatcher = _interopRequireDefault(require('./lib/WatchmanWatcher')); - -var _FSEventsWatcher = _interopRequireDefault(require('./lib/FSEventsWatcher')); - -var fastPath = _interopRequireWildcard(require('./lib/fast_path')); - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _slicedToArray(arr, i) { - return ( - _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest() - ); -} - -function _nonIterableRest() { - throw new TypeError('Invalid attempt to destructure non-iterable instance'); -} - -function _iterableToArrayLimit(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - try { - for ( - var _i = arr[Symbol.iterator](), _s; - !(_n = (_s = _i.next()).done); - _n = true - ) { - _arr.push(_s.value); - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i['return'] != null) _i['return'](); - } finally { - if (_d) throw _e; - } - } - return _arr; -} - -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const CHANGE_INTERVAL = 30; -const MAX_WAIT_TIME = 240000; - -const NODE_MODULES = _path().default.sep + 'node_modules' + _path().default.sep; - -const PACKAGE_JSON = _path().default.sep + 'package.json'; // TypeScript doesn't like us importing from outside `rootDir`, but it doesn't -// understand `require`. - -const _require = require('../package.json'), - VERSION = _require.version; - -const canUseWatchman = (() => { - try { - (0, _child_process().execSync)('watchman --version', { - stdio: ['ignore'] - }); - return true; - } catch (e) {} - - return false; -})(); - -const escapePathSeparator = string => - _path().default.sep === '\\' ? string.replace(/(\/|\\)/g, '\\\\') : string; - -const getWhiteList = list => { - if (list && list.length) { - const newList = list.map(item => - escapePathSeparator(item.replace(/(\/)/g, _path().default.sep)) - ); - return new RegExp( - '(' + - escapePathSeparator(NODE_MODULES) + - '(?:' + - newList.join('|') + - ')(?=$|' + - escapePathSeparator(_path().default.sep) + - '))', - 'g' - ); - } - - return null; -}; -/** - * HasteMap is a JavaScript implementation of Facebook's haste module system. - * - * This implementation is inspired by https://github.com/facebook/node-haste - * and was built with for high-performance in large code repositories with - * hundreds of thousands of files. This implementation is scalable and provides - * predictable performance. - * - * Because the haste map creation and synchronization is critical to startup - * performance and most tasks are blocked by I/O this class makes heavy use of - * synchronous operations. It uses worker processes for parallelizing file - * access and metadata extraction. - * - * The data structures created by `jest-haste-map` can be used directly from the - * cache without further processing. The metadata objects in the `files` and - * `map` objects contain cross-references: a metadata object from one can look - * up the corresponding metadata object in the other map. Note that in most - * projects, the number of files will be greater than the number of haste - * modules one module can refer to many files based on platform extensions. - * - * type HasteMap = { - * clocks: WatchmanClocks, - * files: {[filepath: string]: FileMetaData}, - * map: {[id: string]: ModuleMapItem}, - * mocks: {[id: string]: string}, - * } - * - * // Watchman clocks are used for query synchronization and file system deltas. - * type WatchmanClocks = {[filepath: string]: string}; - * - * type FileMetaData = { - * id: ?string, // used to look up module metadata objects in `map`. - * mtime: number, // check for outdated files. - * size: number, // size of the file in bytes. - * visited: boolean, // whether the file has been parsed or not. - * dependencies: Array, // all relative dependencies of this file. - * sha1: ?string, // SHA-1 of the file, if requested via options. - * }; - * - * // Modules can be targeted to a specific platform based on the file name. - * // Example: platform.ios.js and Platform.android.js will both map to the same - * // `Platform` module. The platform should be specified during resolution. - * type ModuleMapItem = {[platform: string]: ModuleMetaData}; - * - * // - * type ModuleMetaData = { - * path: string, // the path to look up the file object in `files`. - * type: string, // the module type (either `package` or `module`). - * }; - * - * Note that the data structures described above are conceptual only. The actual - * implementation uses arrays and constant keys for metadata storage. Instead of - * `{id: 'flatMap', mtime: 3421, size: 42, visited: true, dependencies: []}` the real - * representation is similar to `['flatMap', 3421, 42, 1, []]` to save storage space - * and reduce parse and write time of a big JSON blob. - * - * The HasteMap is created as follows: - * 1. read data from the cache or create an empty structure. - * - * 2. crawl the file system. - * * empty cache: crawl the entire file system. - * * cache available: - * * if watchman is available: get file system delta changes. - * * if watchman is unavailable: crawl the entire file system. - * * build metadata objects for every file. This builds the `files` part of - * the `HasteMap`. - * - * 3. parse and extract metadata from changed files. - * * this is done in parallel over worker processes to improve performance. - * * the worst case is to parse all files. - * * the best case is no file system access and retrieving all data from - * the cache. - * * the average case is a small number of changed files. - * - * 4. serialize the new `HasteMap` in a cache file. - * Worker processes can directly access the cache through `HasteMap.read()`. - * - */ - -/* eslint-disable-next-line no-redeclare */ - -class HasteMap extends _events().default { - constructor(options) { - super(); - - _defineProperty(this, '_buildPromise', void 0); - - _defineProperty(this, '_cachePath', void 0); - - _defineProperty(this, '_changeInterval', void 0); - - _defineProperty(this, '_console', void 0); - - _defineProperty(this, '_options', void 0); - - _defineProperty(this, '_watchers', void 0); - - _defineProperty(this, '_whitelist', void 0); - - _defineProperty(this, '_worker', void 0); - - this._options = { - cacheDirectory: options.cacheDirectory || _os().default.tmpdir(), - computeDependencies: - options.computeDependencies === undefined - ? true - : options.computeDependencies, - computeSha1: options.computeSha1 || false, - dependencyExtractor: options.dependencyExtractor, - extensions: options.extensions, - forceNodeFilesystemAPI: !!options.forceNodeFilesystemAPI, - hasteImplModulePath: options.hasteImplModulePath, - ignorePattern: options.ignorePattern, - mapper: options.mapper, - maxWorkers: options.maxWorkers, - mocksPattern: options.mocksPattern - ? new RegExp(options.mocksPattern) - : null, - name: options.name, - platforms: options.platforms, - resetCache: options.resetCache, - retainAllFiles: options.retainAllFiles, - rootDir: options.rootDir, - roots: Array.from(new Set(options.roots)), - skipPackageJson: !!options.skipPackageJson, - throwOnModuleCollision: !!options.throwOnModuleCollision, - useWatchman: options.useWatchman == null ? true : options.useWatchman, - watch: !!options.watch - }; - this._console = options.console || global.console; - - if (options.ignorePattern && !(options.ignorePattern instanceof RegExp)) { - this._console.warn( - 'jest-haste-map: the `ignorePattern` options as a function is being ' + - 'deprecated. Provide a RegExp instead. See https://github.com/facebook/jest/pull/4063.' - ); - } - - const rootDirHash = _crypto() - .default.createHash('md5') - .update(options.rootDir) - .digest('hex'); - - let hasteImplHash = ''; - let dependencyExtractorHash = ''; - - if (options.hasteImplModulePath) { - const hasteImpl = require(options.hasteImplModulePath); - - if (hasteImpl.getCacheKey) { - hasteImplHash = String(hasteImpl.getCacheKey()); - } - } - - if (options.dependencyExtractor) { - const dependencyExtractor = require(options.dependencyExtractor); - - if (dependencyExtractor.getCacheKey) { - dependencyExtractorHash = String(dependencyExtractor.getCacheKey()); - } - } - - this._cachePath = HasteMap.getCacheFilePath( - this._options.cacheDirectory, - `haste-map-${this._options.name}-${rootDirHash}`, - VERSION, - this._options.name, - this._options.roots - .map(root => fastPath.relative(options.rootDir, root)) - .join(':'), - this._options.extensions.join(':'), - this._options.platforms.join(':'), - this._options.computeSha1.toString(), - options.mocksPattern || '', - (options.ignorePattern || '').toString(), - hasteImplHash, - dependencyExtractorHash - ); - this._whitelist = getWhiteList(options.providesModuleNodeModules); - this._buildPromise = null; - this._watchers = []; - this._worker = null; - } - - static getCacheFilePath(tmpdir, name, ...extra) { - const hash = _crypto() - .default.createHash('md5') - .update(extra.join('')); - - return _path().default.join( - tmpdir, - name.replace(/\W/g, '-') + '-' + hash.digest('hex') - ); - } - - getCacheFilePath() { - return this._cachePath; - } - - build() { - var _this = this; - - if (!this._buildPromise) { - this._buildPromise = _asyncToGenerator(function*() { - const data = yield _this._buildFileMap(); // Persist when we don't know if files changed (changedFiles undefined) - // or when we know a file was changed or deleted. - - let hasteMap; - - if ( - data.changedFiles === undefined || - data.changedFiles.size > 0 || - data.removedFiles.size > 0 - ) { - hasteMap = yield _this._buildHasteMap(data); - - _this._persist(hasteMap); - } else { - hasteMap = data.hasteMap; - } - - const rootDir = _this._options.rootDir; - const hasteFS = new _HasteFS.default({ - files: hasteMap.files, - rootDir - }); - const moduleMap = new _ModuleMap.default({ - duplicates: hasteMap.duplicates, - map: hasteMap.map, - mocks: hasteMap.mocks, - rootDir - }); - - const __hasteMapForTest = - (process.env.NODE_ENV === 'test' && hasteMap) || null; - - yield _this._watch(hasteMap); - return { - __hasteMapForTest, - hasteFS, - moduleMap - }; - })(); - } - - return this._buildPromise; - } - /** - * 1. read data from the cache or create an empty structure. - */ - - read() { - let hasteMap; - - try { - hasteMap = _jestSerializer().default.readFileSync(this._cachePath); - } catch (err) { - hasteMap = this._createEmptyMap(); - } - - return hasteMap; - } - - readModuleMap() { - const data = this.read(); - return new _ModuleMap.default({ - duplicates: data.duplicates, - map: data.map, - mocks: data.mocks, - rootDir: this._options.rootDir - }); - } - /** - * 2. crawl the file system. - */ - - _buildFileMap() { - var _this2 = this; - - return _asyncToGenerator(function*() { - let hasteMap; - - try { - const read = _this2._options.resetCache - ? _this2._createEmptyMap - : _this2.read; - hasteMap = yield read.call(_this2); - } catch (_unused) { - hasteMap = _this2._createEmptyMap(); - } - - return _this2._crawl(hasteMap); - })(); - } - /** - * 3. parse and extract metadata from changed files. - */ - - _processFile(hasteMap, map, mocks, filePath, workerOptions) { - const rootDir = this._options.rootDir; - - const setModule = (id, module) => { - let moduleMap = map.get(id); - - if (!moduleMap) { - moduleMap = Object.create(null); - map.set(id, moduleMap); - } - - const platform = - (0, _getPlatformExtension.default)( - module[_constants.default.PATH], - this._options.platforms - ) || _constants.default.GENERIC_PLATFORM; - - const existingModule = moduleMap[platform]; - - if ( - existingModule && - existingModule[_constants.default.PATH] !== - module[_constants.default.PATH] - ) { - const method = this._options.throwOnModuleCollision ? 'error' : 'warn'; - - this._console[method]( - [ - 'jest-haste-map: Haste module naming collision: ' + id, - ' The following files share their name; please adjust your hasteImpl:', - ' * ' + - _path().default.sep + - existingModule[_constants.default.PATH], - ' * ' + - _path().default.sep + - module[_constants.default.PATH], - '' - ].join('\n') - ); - - if (this._options.throwOnModuleCollision) { - throw new DuplicateError( - existingModule[_constants.default.PATH], - module[_constants.default.PATH] - ); - } // We do NOT want consumers to use a module that is ambiguous. - - delete moduleMap[platform]; - - if (Object.keys(moduleMap).length === 1) { - map.delete(id); - } - - let dupsByPlatform = hasteMap.duplicates.get(id); - - if (dupsByPlatform == null) { - dupsByPlatform = new Map(); - hasteMap.duplicates.set(id, dupsByPlatform); - } - - const dups = new Map([ - [module[_constants.default.PATH], module[_constants.default.TYPE]], - [ - existingModule[_constants.default.PATH], - existingModule[_constants.default.TYPE] - ] - ]); - dupsByPlatform.set(platform, dups); - return; - } - - const dupsByPlatform = hasteMap.duplicates.get(id); - - if (dupsByPlatform != null) { - const dups = dupsByPlatform.get(platform); - - if (dups != null) { - dups.set( - module[_constants.default.PATH], - module[_constants.default.TYPE] - ); - } - - return; - } - - moduleMap[platform] = module; - }; - - const relativeFilePath = fastPath.relative(rootDir, filePath); - const fileMetadata = hasteMap.files.get(relativeFilePath); - - if (!fileMetadata) { - throw new Error( - 'jest-haste-map: File to process was not found in the haste map.' - ); - } - - const moduleMetadata = hasteMap.map.get( - fileMetadata[_constants.default.ID] - ); - const computeSha1 = - this._options.computeSha1 && !fileMetadata[_constants.default.SHA1]; // Callback called when the response from the worker is successful. - - const workerReply = metadata => { - // `1` for truthy values instead of `true` to save cache space. - fileMetadata[_constants.default.VISITED] = 1; - const metadataId = metadata.id; - const metadataModule = metadata.module; - - if (metadataId && metadataModule) { - fileMetadata[_constants.default.ID] = metadataId; - setModule(metadataId, metadataModule); - } - - fileMetadata[_constants.default.DEPENDENCIES] = metadata.dependencies - ? metadata.dependencies.join(_constants.default.DEPENDENCY_DELIM) - : ''; - - if (computeSha1) { - fileMetadata[_constants.default.SHA1] = metadata.sha1; - } - }; // Callback called when the response from the worker is an error. - - const workerError = error => { - if (typeof error !== 'object' || !error.message || !error.stack) { - error = new Error(error); - error.stack = ''; // Remove stack for stack-less errors. - } // @ts-ignore: checking error code is OK if error comes from "fs". - - if (!['ENOENT', 'EACCES'].includes(error.code)) { - throw error; - } // If a file cannot be read we remove it from the file list and - // ignore the failure silently. - - hasteMap.files.delete(relativeFilePath); - }; // If we retain all files in the virtual HasteFS representation, we avoid - // reading them if they aren't important (node_modules). - - if (this._options.retainAllFiles && this._isNodeModulesDir(filePath)) { - if (computeSha1) { - return this._getWorker(workerOptions) - .getSha1({ - computeDependencies: this._options.computeDependencies, - computeSha1, - dependencyExtractor: this._options.dependencyExtractor, - filePath, - hasteImplModulePath: this._options.hasteImplModulePath, - rootDir - }) - .then(workerReply, workerError); - } - - return null; - } - - if ( - this._options.mocksPattern && - this._options.mocksPattern.test(filePath) - ) { - const mockPath = (0, _getMockName.default)(filePath); - const existingMockPath = mocks.get(mockPath); - - if (existingMockPath) { - const secondMockPath = fastPath.relative(rootDir, filePath); - - if (existingMockPath !== secondMockPath) { - const method = this._options.throwOnModuleCollision - ? 'error' - : 'warn'; - - this._console[method]( - [ - 'jest-haste-map: duplicate manual mock found: ' + mockPath, - ' The following files share their name; please delete one of them:', - ' * ' + _path().default.sep + existingMockPath, - ' * ' + _path().default.sep + secondMockPath, - '' - ].join('\n') - ); - - if (this._options.throwOnModuleCollision) { - throw new DuplicateError(existingMockPath, secondMockPath); - } - } - } - - mocks.set(mockPath, relativeFilePath); - } - - if (fileMetadata[_constants.default.VISITED]) { - if (!fileMetadata[_constants.default.ID]) { - return null; - } - - if (moduleMetadata != null) { - const platform = - (0, _getPlatformExtension.default)( - filePath, - this._options.platforms - ) || _constants.default.GENERIC_PLATFORM; - - const module = moduleMetadata[platform]; - - if (module == null) { - return null; - } - - const moduleId = fileMetadata[_constants.default.ID]; - let modulesByPlatform = map.get(moduleId); - - if (!modulesByPlatform) { - modulesByPlatform = Object.create(null); - map.set(moduleId, modulesByPlatform); - } - - modulesByPlatform[platform] = module; - return null; - } - } - - return this._getWorker(workerOptions) - .worker({ - computeDependencies: this._options.computeDependencies, - computeSha1, - dependencyExtractor: this._options.dependencyExtractor, - filePath, - hasteImplModulePath: this._options.hasteImplModulePath, - rootDir - }) - .then(workerReply, workerError); - } - - _buildHasteMap(data) { - const removedFiles = data.removedFiles, - changedFiles = data.changedFiles, - hasteMap = data.hasteMap; // If any files were removed or we did not track what files changed, process - // every file looking for changes. Otherwise, process only changed files. - - let map; - let mocks; - let filesToProcess; - - if (changedFiles === undefined || removedFiles.size) { - map = new Map(); - mocks = new Map(); - filesToProcess = hasteMap.files; - } else { - map = hasteMap.map; - mocks = hasteMap.mocks; - filesToProcess = changedFiles; - } - - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = removedFiles[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const _step$value = _slicedToArray(_step.value, 2), - relativeFilePath = _step$value[0], - fileMetadata = _step$value[1]; - - this._recoverDuplicates( - hasteMap, - relativeFilePath, - fileMetadata[_constants.default.ID] - ); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - const promises = []; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for ( - var _iterator2 = filesToProcess.keys()[Symbol.iterator](), _step2; - !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); - _iteratorNormalCompletion2 = true - ) { - const relativeFilePath = _step2.value; - - if ( - this._options.skipPackageJson && - relativeFilePath.endsWith(PACKAGE_JSON) - ) { - continue; - } // SHA-1, if requested, should already be present thanks to the crawler. - - const filePath = fastPath.resolve( - this._options.rootDir, - relativeFilePath - ); - - const promise = this._processFile(hasteMap, map, mocks, filePath); - - if (promise) { - promises.push(promise); - } - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - return Promise.all(promises).then( - () => { - this._cleanup(); - - hasteMap.map = map; - hasteMap.mocks = mocks; - return hasteMap; - }, - error => { - this._cleanup(); - - throw error; - } - ); - } - - _cleanup() { - const worker = this._worker; // @ts-ignore - - if (worker && typeof worker.end === 'function') { - // @ts-ignore - worker.end(); - } - - this._worker = null; - } - /** - * 4. serialize the new `HasteMap` in a cache file. - */ - - _persist(hasteMap) { - _jestSerializer().default.writeFileSync(this._cachePath, hasteMap); - } - /** - * Creates workers or parses files and extracts metadata in-process. - */ - - _getWorker(options) { - if (!this._worker) { - if ((options && options.forceInBand) || this._options.maxWorkers <= 1) { - this._worker = { - getSha1: _worker.getSha1, - worker: _worker.worker - }; - } else { - // @ts-ignore: assignment of a worker with custom properties. - this._worker = new (_jestWorker()).default( - require.resolve('./worker'), - { - exposedMethods: ['getSha1', 'worker'], - maxRetries: 3, - numWorkers: this._options.maxWorkers - } - ); - } - } - - return this._worker; - } - - _crawl(hasteMap) { - const options = this._options; - - const ignore = this._ignore.bind(this); - - const crawl = - canUseWatchman && this._options.useWatchman - ? _watchman.default - : _node.default; - const crawlerOptions = { - computeSha1: options.computeSha1, - data: hasteMap, - extensions: options.extensions, - forceNodeFilesystemAPI: options.forceNodeFilesystemAPI, - ignore, - mapper: options.mapper, - rootDir: options.rootDir, - roots: options.roots - }; - - const retry = error => { - if (crawl === _watchman.default) { - this._console.warn( - `jest-haste-map: Watchman crawl failed. Retrying once with node ` + - `crawler.\n` + - ` Usually this happens when watchman isn't running. Create an ` + - `empty \`.watchmanconfig\` file in your project's root folder or ` + - `initialize a git or hg repository in your project.\n` + - ` ` + - error - ); - - return (0, _node.default)(crawlerOptions).catch(e => { - throw new Error( - `Crawler retry failed:\n` + - ` Original error: ${error.message}\n` + - ` Retry error: ${e.message}\n` - ); - }); - } - - throw error; - }; - - try { - return crawl(crawlerOptions).catch(retry); - } catch (error) { - return retry(error); - } - } - /** - * Watch mode - */ - - _watch(hasteMap) { - if (!this._options.watch) { - return Promise.resolve(); - } // In watch mode, we'll only warn about module collisions and we'll retain - // all files, even changes to node_modules. - - this._options.throwOnModuleCollision = false; - this._options.retainAllFiles = true; // WatchmanWatcher > FSEventsWatcher > sane.NodeWatcher - - const Watcher = - canUseWatchman && this._options.useWatchman - ? _WatchmanWatcher.default - : _FSEventsWatcher.default.isSupported() - ? _FSEventsWatcher.default - : _sane().default.NodeWatcher; - const extensions = this._options.extensions; - const ignorePattern = this._options.ignorePattern; - const rootDir = this._options.rootDir; - let changeQueue = Promise.resolve(); - let eventsQueue = []; // We only need to copy the entire haste map once on every "frame". - - let mustCopy = true; - - const createWatcher = root => { - // @ts-ignore: TODO how? "Cannot use 'new' with an expression whose type lacks a call or construct signature." - const watcher = new Watcher(root, { - dot: false, - glob: extensions.map(extension => '**/*.' + extension), - ignored: ignorePattern - }); - return new Promise((resolve, reject) => { - const rejectTimeout = setTimeout( - () => reject(new Error('Failed to start watch mode.')), - MAX_WAIT_TIME - ); - watcher.once('ready', () => { - clearTimeout(rejectTimeout); - watcher.on('all', onChange); - resolve(watcher); - }); - }); - }; - - const emitChange = () => { - if (eventsQueue.length) { - mustCopy = true; - const changeEvent = { - eventsQueue, - hasteFS: new _HasteFS.default({ - files: hasteMap.files, - rootDir - }), - moduleMap: new _ModuleMap.default({ - duplicates: hasteMap.duplicates, - map: hasteMap.map, - mocks: hasteMap.mocks, - rootDir - }) - }; - this.emit('change', changeEvent); - eventsQueue = []; - } - }; - - const onChange = (type, filePath, root, stat) => { - filePath = _path().default.join( - root, - (0, _normalizePathSep.default)(filePath) - ); - - if ( - (stat && stat.isDirectory()) || - this._ignore(filePath) || - !extensions.some(extension => filePath.endsWith(extension)) - ) { - return; - } - - changeQueue = changeQueue - .then(() => { - // If we get duplicate events for the same file, ignore them. - if ( - eventsQueue.find( - event => - event.type === type && - event.filePath === filePath && - ((!event.stat && !stat) || - (!!event.stat && - !!stat && - event.stat.mtime.getTime() === stat.mtime.getTime())) - ) - ) { - return null; - } - - if (mustCopy) { - mustCopy = false; - hasteMap = { - clocks: new Map(hasteMap.clocks), - duplicates: new Map(hasteMap.duplicates), - files: new Map(hasteMap.files), - map: new Map(hasteMap.map), - mocks: new Map(hasteMap.mocks) - }; - } - - const add = () => { - eventsQueue.push({ - filePath, - stat, - type - }); - return null; - }; - - const relativeFilePath = fastPath.relative(rootDir, filePath); - const fileMetadata = hasteMap.files.get(relativeFilePath); // If it's not an addition, delete the file and all its metadata - - if (fileMetadata != null) { - const moduleName = fileMetadata[_constants.default.ID]; - - const platform = - (0, _getPlatformExtension.default)( - filePath, - this._options.platforms - ) || _constants.default.GENERIC_PLATFORM; - - hasteMap.files.delete(relativeFilePath); - let moduleMap = hasteMap.map.get(moduleName); - - if (moduleMap != null) { - // We are forced to copy the object because jest-haste-map exposes - // the map as an immutable entity. - moduleMap = copy(moduleMap); - delete moduleMap[platform]; - - if (Object.keys(moduleMap).length === 0) { - hasteMap.map.delete(moduleName); - } else { - hasteMap.map.set(moduleName, moduleMap); - } - } - - if ( - this._options.mocksPattern && - this._options.mocksPattern.test(filePath) - ) { - const mockName = (0, _getMockName.default)(filePath); - hasteMap.mocks.delete(mockName); - } - - this._recoverDuplicates(hasteMap, relativeFilePath, moduleName); - } // If the file was added or changed, - // parse it and update the haste map. - - if (type === 'add' || type === 'change') { - (0, _invariant().default)( - stat, - 'since the file exists or changed, it should have stats' - ); - const fileMetadata = [ - '', - stat ? stat.mtime.getTime() : -1, - stat ? stat.size : 0, - 0, - '', - null - ]; - hasteMap.files.set(relativeFilePath, fileMetadata); - - const promise = this._processFile( - hasteMap, - hasteMap.map, - hasteMap.mocks, - filePath, - { - forceInBand: true - } - ); // Cleanup - - this._cleanup(); - - if (promise) { - return promise.then(add); - } else { - // If a file in node_modules has changed, - // emit an event regardless. - add(); - } - } else { - add(); - } - - return null; - }) - .catch(error => { - this._console.error( - `jest-haste-map: watch error:\n ${error.stack}\n` - ); - }); - }; - - this._changeInterval = setInterval(emitChange, CHANGE_INTERVAL); - return Promise.all(this._options.roots.map(createWatcher)).then( - watchers => { - this._watchers = watchers; - } - ); - } - /** - * This function should be called when the file under `filePath` is removed - * or changed. When that happens, we want to figure out if that file was - * part of a group of files that had the same ID. If it was, we want to - * remove it from the group. Furthermore, if there is only one file - * remaining in the group, then we want to restore that single file as the - * correct resolution for its ID, and cleanup the duplicates index. - */ - - _recoverDuplicates(hasteMap, relativeFilePath, moduleName) { - let dupsByPlatform = hasteMap.duplicates.get(moduleName); - - if (dupsByPlatform == null) { - return; - } - - const platform = - (0, _getPlatformExtension.default)( - relativeFilePath, - this._options.platforms - ) || _constants.default.GENERIC_PLATFORM; - - let dups = dupsByPlatform.get(platform); - - if (dups == null) { - return; - } - - dupsByPlatform = copyMap(dupsByPlatform); - hasteMap.duplicates.set(moduleName, dupsByPlatform); - dups = copyMap(dups); - dupsByPlatform.set(platform, dups); - dups.delete(relativeFilePath); - - if (dups.size !== 1) { - return; - } - - const uniqueModule = dups.entries().next().value; - - if (!uniqueModule) { - return; - } - - let dedupMap = hasteMap.map.get(moduleName); - - if (dedupMap == null) { - dedupMap = Object.create(null); - hasteMap.map.set(moduleName, dedupMap); - } - - dedupMap[platform] = uniqueModule; - dupsByPlatform.delete(platform); - - if (dupsByPlatform.size === 0) { - hasteMap.duplicates.delete(moduleName); - } - } - - end() { - // @ts-ignore: TODO TS cannot decide if `setInterval` and `clearInterval` comes from NodeJS or the DOM - clearInterval(this._changeInterval); - - if (!this._watchers.length) { - return Promise.resolve(); - } - - return Promise.all( - this._watchers.map( - watcher => new Promise(resolve => watcher.close(resolve)) - ) - ).then(() => { - this._watchers = []; - }); - } - /** - * Helpers - */ - - _ignore(filePath) { - const ignorePattern = this._options.ignorePattern; - const ignoreMatched = - ignorePattern instanceof RegExp - ? ignorePattern.test(filePath) - : ignorePattern && ignorePattern(filePath); - return ( - ignoreMatched || - (!this._options.retainAllFiles && this._isNodeModulesDir(filePath)) - ); - } - - _isNodeModulesDir(filePath) { - if (!filePath.includes(NODE_MODULES)) { - return false; - } - - if (this._whitelist) { - const whitelist = this._whitelist; - const match = whitelist.exec(filePath); - const matchEndIndex = whitelist.lastIndex; - whitelist.lastIndex = 0; - - if (!match) { - return true; - } - - const filePathInPackage = filePath.substr(matchEndIndex); - return filePathInPackage.startsWith(NODE_MODULES); - } - - return true; - } - - _createEmptyMap() { - return { - clocks: new Map(), - duplicates: new Map(), - files: new Map(), - map: new Map(), - mocks: new Map() - }; - } -} - -_defineProperty(HasteMap, 'H', void 0); - -_defineProperty(HasteMap, 'DuplicateError', void 0); - -_defineProperty(HasteMap, 'ModuleMap', void 0); - -class DuplicateError extends Error { - constructor(mockPath1, mockPath2) { - super('Duplicated files or mocks. Please check the console for more info'); - - _defineProperty(this, 'mockPath1', void 0); - - _defineProperty(this, 'mockPath2', void 0); - - this.mockPath1 = mockPath1; - this.mockPath2 = mockPath2; - } -} - -function copy(object) { - return Object.assign(Object.create(null), object); -} - -function copyMap(input) { - return new Map(input); -} - -HasteMap.H = _constants.default; -HasteMap.DuplicateError = DuplicateError; -HasteMap.ModuleMap = _ModuleMap.default; -module.exports = HasteMap; diff --git a/node_modules/jest-haste-map/build/lib/FSEventsWatcher.d.ts b/node_modules/jest-haste-map/build/lib/FSEventsWatcher.d.ts deleted file mode 100644 index 5bc3a0ae..00000000 --- a/node_modules/jest-haste-map/build/lib/FSEventsWatcher.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -/// -import { EventEmitter } from 'events'; -import anymatch from 'anymatch'; -import { Watcher } from 'fsevents'; -/** - * Export `FSEventsWatcher` class. - * Watches `dir`. - */ -declare class FSEventsWatcher extends EventEmitter { - readonly root: string; - readonly ignored?: anymatch.Matcher; - readonly glob: Array; - readonly dot: boolean; - readonly hasIgnore: boolean; - readonly doIgnore: (path: string) => boolean; - readonly watcher: Watcher; - private _tracked; - static isSupported(): boolean; - private static normalizeProxy; - private static recReaddir; - constructor(dir: string, opts: { - root: string; - ignored?: anymatch.Matcher; - glob: string | Array; - dot: boolean; - }); - /** - * End watching. - */ - close(callback?: () => void): void; - private isFileIncluded; - private handleEvent; - /** - * Emit events. - */ - private _emit; -} -export = FSEventsWatcher; -//# sourceMappingURL=FSEventsWatcher.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/lib/FSEventsWatcher.d.ts.map b/node_modules/jest-haste-map/build/lib/FSEventsWatcher.d.ts.map deleted file mode 100644 index e45f026f..00000000 --- a/node_modules/jest-haste-map/build/lib/FSEventsWatcher.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"FSEventsWatcher.d.ts","sourceRoot":"","sources":["../../src/lib/FSEventsWatcher.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAGhC,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAsBjC;;;GAGG;AACH,cAAM,eAAgB,SAAQ,YAAY;IACxC,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC;IAC3C,SAAgB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,SAAgB,GAAG,EAAE,OAAO,CAAC;IAC7B,SAAgB,SAAS,EAAE,OAAO,CAAC;IACnC,SAAgB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACpD,SAAgB,OAAO,EAAE,OAAO,CAAC;IACjC,OAAO,CAAC,QAAQ,CAAc;IAE9B,MAAM,CAAC,WAAW;IAIlB,OAAO,CAAC,MAAM,CAAC,cAAc;IAO7B,OAAO,CAAC,MAAM,CAAC,UAAU;gBAqBvB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC;QAC3B,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7B,GAAG,EAAE,OAAO,CAAC;KACd;IAqCH;;OAEG;IACH,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI;IAQ3B,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,WAAW;IAgCnB;;OAEG;IACH,OAAO,CAAC,KAAK;CAId;AAED,SAAS,eAAe,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/lib/FSEventsWatcher.js b/node_modules/jest-haste-map/build/lib/FSEventsWatcher.js deleted file mode 100644 index f7c0af8d..00000000 --- a/node_modules/jest-haste-map/build/lib/FSEventsWatcher.js +++ /dev/null @@ -1,248 +0,0 @@ -'use strict'; - -function _fs() { - const data = _interopRequireDefault(require('fs')); - - _fs = function _fs() { - return data; - }; - - return data; -} - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _events() { - const data = require('events'); - - _events = function _events() { - return data; - }; - - return data; -} - -function _anymatch() { - const data = _interopRequireDefault(require('anymatch')); - - _anymatch = function _anymatch() { - return data; - }; - - return data; -} - -function _micromatch() { - const data = _interopRequireDefault(require('micromatch')); - - _micromatch = function _micromatch() { - return data; - }; - - return data; -} - -function _walker() { - const data = _interopRequireDefault(require('walker')); - - _walker = function _walker() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -let fsevents; - -try { - fsevents = require('fsevents'); -} catch (e) { - // Optional dependency, only supported on Darwin. -} - -const CHANGE_EVENT = 'change'; -const DELETE_EVENT = 'delete'; -const ADD_EVENT = 'add'; -const ALL_EVENT = 'all'; - -/** - * Export `FSEventsWatcher` class. - * Watches `dir`. - */ -class FSEventsWatcher extends _events().EventEmitter { - static isSupported() { - return fsevents !== undefined; - } - - static normalizeProxy(callback) { - return (filepath, stats) => - callback(_path().default.normalize(filepath), stats); - } - - static recReaddir( - dir, - dirCallback, - fileCallback, - endCallback, - errorCallback, - ignored - ) { - (0, _walker().default)(dir) - .filterDir( - currentDir => !ignored || !(0, _anymatch().default)(ignored, currentDir) - ) - .on('dir', FSEventsWatcher.normalizeProxy(dirCallback)) - .on('file', FSEventsWatcher.normalizeProxy(fileCallback)) - .on('error', errorCallback) - .on('end', () => { - endCallback(); - }); - } - - constructor(dir, opts) { - if (!fsevents) { - throw new Error( - '`fsevents` unavailable (this watcher can only be used on Darwin)' - ); - } - - super(); - - _defineProperty(this, 'root', void 0); - - _defineProperty(this, 'ignored', void 0); - - _defineProperty(this, 'glob', void 0); - - _defineProperty(this, 'dot', void 0); - - _defineProperty(this, 'hasIgnore', void 0); - - _defineProperty(this, 'doIgnore', void 0); - - _defineProperty(this, 'watcher', void 0); - - _defineProperty(this, '_tracked', void 0); - - this.dot = opts.dot || false; - this.ignored = opts.ignored; - this.glob = Array.isArray(opts.glob) ? opts.glob : [opts.glob]; - this.hasIgnore = - Boolean(opts.ignored) && !(Array.isArray(opts) && opts.length > 0); - this.doIgnore = opts.ignored - ? (0, _anymatch().default)(opts.ignored) - : () => false; - this.root = _path().default.resolve(dir); - this.watcher = fsevents(this.root); - this.watcher.start().on('change', this.handleEvent.bind(this)); - this._tracked = new Set(); - FSEventsWatcher.recReaddir( - this.root, - filepath => { - this._tracked.add(filepath); - }, - filepath => { - this._tracked.add(filepath); - }, - this.emit.bind(this, 'ready'), - this.emit.bind(this, 'error'), - this.ignored - ); - } - /** - * End watching. - */ - - close(callback) { - this.watcher.stop(); - this.removeAllListeners(); - - if (typeof callback === 'function') { - process.nextTick(callback.bind(null, null, true)); - } - } - - isFileIncluded(relativePath) { - if (this.doIgnore(relativePath)) { - return false; - } - - return this.glob.length - ? _micromatch().default.some(relativePath, this.glob, { - dot: this.dot - }) - : this.dot || _micromatch().default.some(relativePath, '**/*'); - } - - handleEvent(filepath) { - const relativePath = _path().default.relative(this.root, filepath); - - if (!this.isFileIncluded(relativePath)) { - return; - } - - _fs().default.lstat(filepath, (error, stat) => { - if (error && error.code !== 'ENOENT') { - this.emit('error', error); - return; - } - - if (error) { - // Ignore files that aren't tracked and don't exist. - if (!this._tracked.has(filepath)) { - return; - } - - this._emit(DELETE_EVENT, relativePath); - - this._tracked.delete(filepath); - - return; - } - - if (this._tracked.has(filepath)) { - this._emit(CHANGE_EVENT, relativePath, stat); - } else { - this._tracked.add(filepath); - - this._emit(ADD_EVENT, relativePath, stat); - } - }); - } - /** - * Emit events. - */ - - _emit(type, file, stat) { - this.emit(type, file, this.root, stat); - this.emit(ALL_EVENT, type, file, this.root, stat); - } -} - -module.exports = FSEventsWatcher; diff --git a/node_modules/jest-haste-map/build/lib/WatchmanWatcher.js b/node_modules/jest-haste-map/build/lib/WatchmanWatcher.js deleted file mode 100644 index f6d5eed3..00000000 --- a/node_modules/jest-haste-map/build/lib/WatchmanWatcher.js +++ /dev/null @@ -1,400 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = WatchmanWatcher; - -function _fs() { - const data = _interopRequireDefault(require('fs')); - - _fs = function _fs() { - return data; - }; - - return data; -} - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _assert() { - const data = _interopRequireDefault(require('assert')); - - _assert = function _assert() { - return data; - }; - - return data; -} - -function _events() { - const data = require('events'); - - _events = function _events() { - return data; - }; - - return data; -} - -function _fbWatchman() { - const data = _interopRequireDefault(require('fb-watchman')); - - _fbWatchman = function _fbWatchman() { - return data; - }; - - return data; -} - -function _common() { - const data = _interopRequireDefault(require('sane/src/common')); - - _common = function _common() { - return data; - }; - - return data; -} - -function _recrawlWarningDedupe() { - const data = _interopRequireDefault( - require('sane/src/utils/recrawl-warning-dedupe') - ); - - _recrawlWarningDedupe = function _recrawlWarningDedupe() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const CHANGE_EVENT = _common().default.CHANGE_EVENT; - -const DELETE_EVENT = _common().default.DELETE_EVENT; - -const ADD_EVENT = _common().default.ADD_EVENT; - -const ALL_EVENT = _common().default.ALL_EVENT; - -const SUB_NAME = 'sane-sub'; -/** - * Watches `dir`. - * - * @class PollWatcher - * @param String dir - * @param {Object} opts - * @public - */ - -function WatchmanWatcher(dir, opts) { - _common().default.assignOptions(this, opts); - - this.root = _path().default.resolve(dir); - this.init(); -} // eslint-disable-next-line no-proto - -WatchmanWatcher.prototype.__proto__ = _events().EventEmitter.prototype; -/** - * Run the watchman `watch` command on the root and subscribe to changes. - * - * @private - */ - -WatchmanWatcher.prototype.init = function() { - if (this.client) { - this.client.removeAllListeners(); - } - - const self = this; - this.client = new (_fbWatchman()).default.Client(); - this.client.on('error', error => { - self.emit('error', error); - }); - this.client.on('subscription', this.handleChangeEvent.bind(this)); - this.client.on('end', () => { - console.warn('[sane] Warning: Lost connection to watchman, reconnecting..'); - self.init(); - }); - this.watchProjectInfo = null; - - function getWatchRoot() { - return self.watchProjectInfo ? self.watchProjectInfo.root : self.root; - } - - function onCapability(error, resp) { - if (handleError(self, error)) { - // The Watchman watcher is unusable on this system, we cannot continue - return; - } - - handleWarning(resp); - self.capabilities = resp.capabilities; - - if (self.capabilities.relative_root) { - self.client.command(['watch-project', getWatchRoot()], onWatchProject); - } else { - self.client.command(['watch', getWatchRoot()], onWatch); - } - } - - function onWatchProject(error, resp) { - if (handleError(self, error)) { - return; - } - - handleWarning(resp); - self.watchProjectInfo = { - relativePath: resp.relative_path ? resp.relative_path : '', - root: resp.watch - }; - self.client.command(['clock', getWatchRoot()], onClock); - } - - function onWatch(error, resp) { - if (handleError(self, error)) { - return; - } - - handleWarning(resp); - self.client.command(['clock', getWatchRoot()], onClock); - } - - function onClock(error, resp) { - if (handleError(self, error)) { - return; - } - - handleWarning(resp); - const options = { - fields: ['name', 'exists', 'new'], - since: resp.clock - }; // If the server has the wildmatch capability available it supports - // the recursive **/*.foo style match and we can offload our globs - // to the watchman server. This saves both on data size to be - // communicated back to us and compute for evaluating the globs - // in our node process. - - if (self.capabilities.wildmatch) { - if (self.globs.length === 0) { - if (!self.dot) { - // Make sure we honor the dot option if even we're not using globs. - options.expression = [ - 'match', - '**', - 'wholename', - { - includedotfiles: false - } - ]; - } - } else { - options.expression = ['anyof']; - - for (const i in self.globs) { - options.expression.push([ - 'match', - self.globs[i], - 'wholename', - { - includedotfiles: self.dot - } - ]); - } - } - } - - if (self.capabilities.relative_root) { - options.relative_root = self.watchProjectInfo.relativePath; - } - - self.client.command( - ['subscribe', getWatchRoot(), SUB_NAME, options], - onSubscribe - ); - } - - function onSubscribe(error, resp) { - if (handleError(self, error)) { - return; - } - - handleWarning(resp); - self.emit('ready'); - } - - self.client.capabilityCheck( - { - optional: ['wildmatch', 'relative_root'] - }, - onCapability - ); -}; -/** - * Handles a change event coming from the subscription. - * - * @param {Object} resp - * @private - */ - -WatchmanWatcher.prototype.handleChangeEvent = function(resp) { - _assert().default.equal( - resp.subscription, - SUB_NAME, - 'Invalid subscription event.' - ); - - if (resp.is_fresh_instance) { - this.emit('fresh_instance'); - } - - if (resp.is_fresh_instance) { - this.emit('fresh_instance'); - } - - if (Array.isArray(resp.files)) { - resp.files.forEach(this.handleFileChange, this); - } -}; -/** - * Handles a single change event record. - * - * @param {Object} changeDescriptor - * @private - */ - -WatchmanWatcher.prototype.handleFileChange = function(changeDescriptor) { - const self = this; - let absPath; - let relativePath; - - if (this.capabilities.relative_root) { - relativePath = changeDescriptor.name; - absPath = _path().default.join( - this.watchProjectInfo.root, - this.watchProjectInfo.relativePath, - relativePath - ); - } else { - absPath = _path().default.join(this.root, changeDescriptor.name); - relativePath = changeDescriptor.name; - } - - if ( - !(self.capabilities.wildmatch && !this.hasIgnore) && - !_common().default.isFileIncluded( - this.globs, - this.dot, - this.doIgnore, - relativePath - ) - ) { - return; - } - - if (!changeDescriptor.exists) { - self.emitEvent(DELETE_EVENT, relativePath, self.root); - } else { - _fs().default.lstat(absPath, (error, stat) => { - // Files can be deleted between the event and the lstat call - // the most reliable thing to do here is to ignore the event. - if (error && error.code === 'ENOENT') { - return; - } - - if (handleError(self, error)) { - return; - } - - const eventType = changeDescriptor.new ? ADD_EVENT : CHANGE_EVENT; // Change event on dirs are mostly useless. - - if (!(eventType === CHANGE_EVENT && stat.isDirectory())) { - self.emitEvent(eventType, relativePath, self.root, stat); - } - }); - } -}; -/** - * Dispatches the event. - * - * @param {string} eventType - * @param {string} filepath - * @param {string} root - * @param {fs.Stat} stat - * @private - */ - -WatchmanWatcher.prototype.emitEvent = function( - eventType, - filepath, - root, - stat -) { - this.emit(eventType, filepath, root, stat); - this.emit(ALL_EVENT, eventType, filepath, root, stat); -}; -/** - * Closes the watcher. - * - * @param {function} callback - * @private - */ - -WatchmanWatcher.prototype.close = function(callback) { - this.client.removeAllListeners(); - this.client.end(); - callback && callback(null, true); -}; -/** - * Handles an error and returns true if exists. - * - * @param {WatchmanWatcher} self - * @param {Error} error - * @private - */ - -function handleError(self, error) { - if (error != null) { - self.emit('error', error); - return true; - } else { - return false; - } -} -/** - * Handles a warning in the watchman resp object. - * - * @param {object} resp - * @private - */ - -function handleWarning(resp) { - if ('warning' in resp) { - if (_recrawlWarningDedupe().default.isRecrawlWarningDupe(resp.warning)) { - return true; - } - - console.warn(resp.warning); - return true; - } else { - return false; - } -} diff --git a/node_modules/jest-haste-map/build/lib/dependencyExtractor.d.ts b/node_modules/jest-haste-map/build/lib/dependencyExtractor.d.ts deleted file mode 100644 index 8e8ed290..00000000 --- a/node_modules/jest-haste-map/build/lib/dependencyExtractor.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare function extract(code: string): Set; -//# sourceMappingURL=dependencyExtractor.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/lib/dependencyExtractor.d.ts.map b/node_modules/jest-haste-map/build/lib/dependencyExtractor.d.ts.map deleted file mode 100644 index 9379f857..00000000 --- a/node_modules/jest-haste-map/build/lib/dependencyExtractor.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dependencyExtractor.d.ts","sourceRoot":"","sources":["../../src/lib/dependencyExtractor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAuEH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAgBjD"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/lib/dependencyExtractor.js b/node_modules/jest-haste-map/build/lib/dependencyExtractor.js deleted file mode 100644 index 40914323..00000000 --- a/node_modules/jest-haste-map/build/lib/dependencyExtractor.js +++ /dev/null @@ -1,100 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.extract = extract; - -var _isRegExpSupported = _interopRequireDefault(require('./isRegExpSupported')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// Negative look behind is only supported in Node 9+ -const NOT_A_DOT = (0, _isRegExpSupported.default)('(? `([\`'"])([^'"\`]*?)(?:\\${pos})`; - -const WORD_SEPARATOR = '\\b'; -const LEFT_PARENTHESIS = '\\('; -const RIGHT_PARENTHESIS = '\\)'; -const WHITESPACE = '\\s*'; -const OPTIONAL_COMMA = '(:?,\\s*)?'; - -function createRegExp(parts, flags) { - return new RegExp(parts.join(''), flags); -} - -function alternatives(...parts) { - return `(?:${parts.join('|')})`; -} - -function functionCallStart(...names) { - return [ - NOT_A_DOT, - WORD_SEPARATOR, - alternatives(...names), - WHITESPACE, - LEFT_PARENTHESIS, - WHITESPACE - ]; -} - -const BLOCK_COMMENT_RE = /\/\*[^]*?\*\//g; -const LINE_COMMENT_RE = /\/\/.*/g; -const REQUIRE_OR_DYNAMIC_IMPORT_RE = createRegExp( - [ - ...functionCallStart('require', 'import'), - CAPTURE_STRING_LITERAL(1), - WHITESPACE, - OPTIONAL_COMMA, - RIGHT_PARENTHESIS - ], - 'g' -); -const IMPORT_OR_EXPORT_RE = createRegExp( - [ - '\\b(?:import|export)\\s+(?!type(?:of)?\\s+)(?:[^\'"]+\\s+from\\s+)?', - CAPTURE_STRING_LITERAL(1) - ], - 'g' -); -const JEST_EXTENSIONS_RE = createRegExp( - [ - ...functionCallStart( - 'require\\s*\\.\\s*(?:requireActual|requireMock)', - 'jest\\s*\\.\\s*(?:requireActual|requireMock|genMockFromModule)' - ), - CAPTURE_STRING_LITERAL(1), - WHITESPACE, - OPTIONAL_COMMA, - RIGHT_PARENTHESIS - ], - 'g' -); - -function extract(code) { - const dependencies = new Set(); - - const addDependency = (match, _, dep) => { - dependencies.add(dep); - return match; - }; - - code - .replace(BLOCK_COMMENT_RE, '') - .replace(LINE_COMMENT_RE, '') - .replace(IMPORT_OR_EXPORT_RE, addDependency) - .replace(REQUIRE_OR_DYNAMIC_IMPORT_RE, addDependency) - .replace(JEST_EXTENSIONS_RE, addDependency); - return dependencies; -} diff --git a/node_modules/jest-haste-map/build/lib/fast_path.d.ts b/node_modules/jest-haste-map/build/lib/fast_path.d.ts deleted file mode 100644 index 880ce4c9..00000000 --- a/node_modules/jest-haste-map/build/lib/fast_path.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare function relative(rootDir: string, filename: string): string; -export declare function resolve(rootDir: string, relativeFilename: string): string; -//# sourceMappingURL=fast_path.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/lib/fast_path.d.ts.map b/node_modules/jest-haste-map/build/lib/fast_path.d.ts.map deleted file mode 100644 index 7c54520b..00000000 --- a/node_modules/jest-haste-map/build/lib/fast_path.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fast_path.d.ts","sourceRoot":"","sources":["../../src/lib/fast_path.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIlE;AAMD,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAIzE"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/lib/fast_path.js b/node_modules/jest-haste-map/build/lib/fast_path.js deleted file mode 100644 index 31b5bbb7..00000000 --- a/node_modules/jest-haste-map/build/lib/fast_path.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.relative = relative; -exports.resolve = resolve; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// rootDir and filename must be absolute paths (resolved) -function relative(rootDir, filename) { - return filename.indexOf(rootDir + _path().default.sep) === 0 - ? filename.substr(rootDir.length + 1) - : _path().default.relative(rootDir, filename); -} - -const INDIRECTION_FRAGMENT = '..' + _path().default.sep; // rootDir must be an absolute path and relativeFilename must be simple -// (e.g.: foo/bar or ../foo/bar, but never ./foo or foo/../bar) - -function resolve(rootDir, relativeFilename) { - return relativeFilename.indexOf(INDIRECTION_FRAGMENT) === 0 - ? _path().default.resolve(rootDir, relativeFilename) - : rootDir + _path().default.sep + relativeFilename; -} diff --git a/node_modules/jest-haste-map/build/lib/getPlatformExtension.d.ts b/node_modules/jest-haste-map/build/lib/getPlatformExtension.d.ts deleted file mode 100644 index ab69cab8..00000000 --- a/node_modules/jest-haste-map/build/lib/getPlatformExtension.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default function getPlatformExtension(file: string, platforms?: Array): string | null; -//# sourceMappingURL=getPlatformExtension.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/lib/getPlatformExtension.d.ts.map b/node_modules/jest-haste-map/build/lib/getPlatformExtension.d.ts.map deleted file mode 100644 index 4f0a5a94..00000000 --- a/node_modules/jest-haste-map/build/lib/getPlatformExtension.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getPlatformExtension.d.ts","sourceRoot":"","sources":["../../src/lib/getPlatformExtension.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GACxB,MAAM,GAAG,IAAI,CAaf"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/lib/getPlatformExtension.js b/node_modules/jest-haste-map/build/lib/getPlatformExtension.js deleted file mode 100644 index 6b9e564f..00000000 --- a/node_modules/jest-haste-map/build/lib/getPlatformExtension.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = getPlatformExtension; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const SUPPORTED_PLATFORM_EXTS = new Set(['android', 'ios', 'native', 'web']); // Extract platform extension: index.ios.js -> ios - -function getPlatformExtension(file, platforms) { - const last = file.lastIndexOf('.'); - const secondToLast = file.lastIndexOf('.', last - 1); - - if (secondToLast === -1) { - return null; - } - - const platform = file.substring(secondToLast + 1, last); // If an overriding platform array is passed, check that first - - if (platforms && platforms.indexOf(platform) !== -1) { - return platform; - } - - return SUPPORTED_PLATFORM_EXTS.has(platform) ? platform : null; -} diff --git a/node_modules/jest-haste-map/build/lib/isRegExpSupported.d.ts b/node_modules/jest-haste-map/build/lib/isRegExpSupported.d.ts deleted file mode 100644 index 16745e0c..00000000 --- a/node_modules/jest-haste-map/build/lib/isRegExpSupported.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default function isRegExpSupported(value: string): boolean; -//# sourceMappingURL=isRegExpSupported.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/lib/isRegExpSupported.d.ts.map b/node_modules/jest-haste-map/build/lib/isRegExpSupported.d.ts.map deleted file mode 100644 index 66d6d734..00000000 --- a/node_modules/jest-haste-map/build/lib/isRegExpSupported.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isRegExpSupported.d.ts","sourceRoot":"","sources":["../../src/lib/isRegExpSupported.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAQhE"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/lib/isRegExpSupported.js b/node_modules/jest-haste-map/build/lib/isRegExpSupported.js deleted file mode 100644 index 44de4e11..00000000 --- a/node_modules/jest-haste-map/build/lib/isRegExpSupported.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = isRegExpSupported; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function isRegExpSupported(value) { - try { - // eslint-disable-next-line no-new - new RegExp(value); - return true; - } catch (e) { - return false; - } -} diff --git a/node_modules/jest-haste-map/build/lib/normalizePathSep.d.ts b/node_modules/jest-haste-map/build/lib/normalizePathSep.d.ts deleted file mode 100644 index 44d91fb0..00000000 --- a/node_modules/jest-haste-map/build/lib/normalizePathSep.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare let normalizePathSep: (string: string) => string; -export default normalizePathSep; -//# sourceMappingURL=normalizePathSep.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/lib/normalizePathSep.d.ts.map b/node_modules/jest-haste-map/build/lib/normalizePathSep.d.ts.map deleted file mode 100644 index 24a4c9cd..00000000 --- a/node_modules/jest-haste-map/build/lib/normalizePathSep.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"normalizePathSep.d.ts","sourceRoot":"","sources":["../../src/lib/normalizePathSep.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,QAAA,IAAI,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;AAOjD,eAAe,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/lib/normalizePathSep.js b/node_modules/jest-haste-map/build/lib/normalizePathSep.js deleted file mode 100644 index 23c7782b..00000000 --- a/node_modules/jest-haste-map/build/lib/normalizePathSep.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -let normalizePathSep; - -if (_path().default.sep === '/') { - normalizePathSep = filePath => filePath; -} else { - normalizePathSep = filePath => filePath.replace(/\//g, _path().default.sep); -} - -var _default = normalizePathSep; -exports.default = _default; diff --git a/node_modules/jest-haste-map/build/types.d.ts b/node_modules/jest-haste-map/build/types.d.ts deleted file mode 100644 index 0cbdccba..00000000 --- a/node_modules/jest-haste-map/build/types.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import fs from 'fs'; -import { Config } from '@jest/types'; -import ModuleMap from './ModuleMap'; -import HasteFS from './HasteFS'; -export declare type IgnoreMatcher = (item: string) => boolean; -export declare type Mapper = (item: string) => Array | null; -export declare type WorkerMessage = { - computeDependencies: boolean; - computeSha1: boolean; - dependencyExtractor?: string; - rootDir: string; - filePath: string; - hasteImplModulePath?: string; -}; -export declare type WorkerMetadata = { - dependencies: Array | undefined | null; - id: string | undefined | null; - module: ModuleMetaData | undefined | null; - sha1: string | undefined | null; -}; -export declare type CrawlerOptions = { - computeSha1: boolean; - data: InternalHasteMap; - extensions: Array; - forceNodeFilesystemAPI: boolean; - ignore: IgnoreMatcher; - mapper?: Mapper | null; - rootDir: string; - roots: Array; -}; -export declare type HasteImpl = { - getHasteName(filePath: Config.Path): string | undefined; -}; -export declare type FileData = Map; -export declare type FileMetaData = [string, number, number, 0 | 1, string, string | null | undefined]; -export declare type MockData = Map; -export declare type ModuleMapData = Map; -export declare type WatchmanClocks = Map; -export declare type HasteRegExp = RegExp | ((str: string) => boolean); -export declare type DuplicatesSet = Map; -export declare type DuplicatesIndex = Map>; -export declare type InternalHasteMap = { - clocks: WatchmanClocks; - duplicates: DuplicatesIndex; - files: FileData; - map: ModuleMapData; - mocks: MockData; -}; -export declare type HasteMap = { - hasteFS: HasteFS; - moduleMap: ModuleMap; - __hasteMapForTest?: InternalHasteMap | null; -}; -export declare type RawModuleMap = { - rootDir: Config.Path; - duplicates: DuplicatesIndex; - map: ModuleMapData; - mocks: MockData; -}; -declare type ModuleMapItem = { - [platform: string]: ModuleMetaData; -}; -export declare type ModuleMetaData = [Config.Path, /* type */ number]; -export declare type HType = { - ID: 0; - MTIME: 1; - SIZE: 2; - VISITED: 3; - DEPENDENCIES: 4; - SHA1: 5; - PATH: 0; - TYPE: 1; - MODULE: 0; - PACKAGE: 1; - GENERIC_PLATFORM: 'g'; - NATIVE_PLATFORM: 'native'; - DEPENDENCY_DELIM: '\0'; -}; -export declare type HTypeValue = HType[keyof HType]; -export declare type EventsQueue = Array<{ - filePath: Config.Path; - stat: fs.Stats | undefined; - type: string; -}>; -export declare type ChangeEvent = { - eventsQueue: EventsQueue; - hasteFS: HasteFS; - moduleMap: ModuleMap; -}; -export {}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/types.d.ts.map b/node_modules/jest-haste-map/build/types.d.ts.map deleted file mode 100644 index 86b7a809..00000000 --- a/node_modules/jest-haste-map/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,oBAAY,aAAa,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;AACtD,oBAAY,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5D,oBAAY,aAAa,GAAG;IAC1B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,oBAAY,cAAc,GAAG;IAC3B,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;IAC/C,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,cAAc,GAAG,SAAS,GAAG,IAAI,CAAC;IAC1C,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;CACjC,CAAC;AAEF,oBAAY,cAAc,GAAG;IAC3B,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,gBAAgB,CAAC;IACvB,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,sBAAsB,EAAE,OAAO,CAAC;IAChC,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACtB,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;CACzD,CAAC;AAEF,oBAAY,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AAEtD,oBAAY,YAAY,GAAG,CAChB,MAAM,EACH,MAAM,EACP,MAAM,EACH,CAAC,GAAG,CAAC,EACA,MAAM,EACd,MAAM,GAAG,IAAI,GAAG,SAAS,CACrC,CAAC;AAEF,oBAAY,QAAQ,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;AAChD,oBAAY,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AACvD,oBAAY,cAAc,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACtD,oBAAY,WAAW,GAAG,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;AAE9D,oBAAY,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;AAC3D,oBAAY,eAAe,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;AAEtE,oBAAY,gBAAgB,GAAG;IAC7B,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,EAAE,eAAe,CAAC;IAC5B,KAAK,EAAE,QAAQ,CAAC;IAChB,GAAG,EAAE,aAAa,CAAC;IACnB,KAAK,EAAE,QAAQ,CAAC;CACjB,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,iBAAiB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAC7C,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC;IACrB,UAAU,EAAE,eAAe,CAAC;IAC5B,GAAG,EAAE,aAAa,CAAC;IACnB,KAAK,EAAE,QAAQ,CAAC;CACjB,CAAC;AAEF,aAAK,aAAa,GAAG;IAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAAA;CAAC,CAAC;AAC1D,oBAAY,cAAc,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;AAE9D,oBAAY,KAAK,GAAG;IAClB,EAAE,EAAE,CAAC,CAAC;IACN,KAAK,EAAE,CAAC,CAAC;IACT,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,EAAE,CAAC,CAAC;IACX,YAAY,EAAE,CAAC,CAAC;IAChB,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,CAAC,CAAC;IACV,OAAO,EAAE,CAAC,CAAC;IACX,gBAAgB,EAAE,GAAG,CAAC;IACtB,eAAe,EAAE,QAAQ,CAAC;IAC1B,gBAAgB,EAAE,IAAI,CAAC;CACxB,CAAC;AAEF,oBAAY,UAAU,GAAG,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;AAE5C,oBAAY,WAAW,GAAG,KAAK,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;IACtB,IAAI,EAAE,EAAE,CAAC,KAAK,GAAG,SAAS,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,CAAC;AAEH,oBAAY,WAAW,GAAG;IACxB,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;CACtB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/types.js b/node_modules/jest-haste-map/build/types.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/jest-haste-map/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/jest-haste-map/build/worker.d.ts b/node_modules/jest-haste-map/build/worker.d.ts deleted file mode 100644 index 3b4eecad..00000000 --- a/node_modules/jest-haste-map/build/worker.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { WorkerMessage, WorkerMetadata } from './types'; -export declare function worker(data: WorkerMessage): Promise; -export declare function getSha1(data: WorkerMessage): Promise; -//# sourceMappingURL=worker.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/worker.d.ts.map b/node_modules/jest-haste-map/build/worker.d.ts.map deleted file mode 100644 index 146d0f2d..00000000 --- a/node_modules/jest-haste-map/build/worker.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAY,aAAa,EAAE,cAAc,EAAC,MAAM,SAAS,CAAC;AAiBjE,wBAAsB,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAwEzE;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAW1E"} \ No newline at end of file diff --git a/node_modules/jest-haste-map/build/worker.js b/node_modules/jest-haste-map/build/worker.js deleted file mode 100644 index 1996d4a8..00000000 --- a/node_modules/jest-haste-map/build/worker.js +++ /dev/null @@ -1,230 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.worker = worker; -exports.getSha1 = getSha1; - -function _crypto() { - const data = _interopRequireDefault(require('crypto')); - - _crypto = function _crypto() { - return data; - }; - - return data; -} - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _gracefulFs() { - const data = _interopRequireDefault(require('graceful-fs')); - - _gracefulFs = function _gracefulFs() { - return data; - }; - - return data; -} - -var _blacklist = _interopRequireDefault(require('./blacklist')); - -var _constants = _interopRequireDefault(require('./constants')); - -var dependencyExtractor = _interopRequireWildcard( - require('./lib/dependencyExtractor') -); - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -const PACKAGE_JSON = _path().default.sep + 'package.json'; -let hasteImpl = null; -let hasteImplModulePath = null; - -function sha1hex(content) { - return _crypto() - .default.createHash('sha1') - .update(content) - .digest('hex'); -} - -function worker(_x) { - return _worker.apply(this, arguments); -} - -function _worker() { - _worker = _asyncToGenerator(function*(data) { - if ( - data.hasteImplModulePath && - data.hasteImplModulePath !== hasteImplModulePath - ) { - if (hasteImpl) { - throw new Error('jest-haste-map: hasteImplModulePath changed'); - } - - hasteImplModulePath = data.hasteImplModulePath; - hasteImpl = require(hasteImplModulePath); - } - - let content; - let dependencies; - let id; - let module; - let sha1; - const computeDependencies = data.computeDependencies, - computeSha1 = data.computeSha1, - rootDir = data.rootDir, - filePath = data.filePath; - - const getContent = () => { - if (content === undefined) { - content = _gracefulFs().default.readFileSync(filePath, 'utf8'); - } - - return content; - }; - - if (filePath.endsWith(PACKAGE_JSON)) { - // Process a package.json that is returned as a PACKAGE type with its name. - try { - const fileData = JSON.parse(getContent()); - - if (fileData.name) { - const relativeFilePath = _path().default.relative(rootDir, filePath); - - id = fileData.name; - module = [relativeFilePath, _constants.default.PACKAGE]; - } - } catch (err) { - throw new Error(`Cannot parse ${filePath} as JSON: ${err.message}`); - } - } else if ( - !_blacklist.default.has(filePath.substr(filePath.lastIndexOf('.'))) - ) { - // Process a random file that is returned as a MODULE. - if (hasteImpl) { - id = hasteImpl.getHasteName(filePath); - } - - if (computeDependencies) { - const content = getContent(); - dependencies = Array.from( - data.dependencyExtractor - ? require(data.dependencyExtractor).extract( - content, - filePath, - dependencyExtractor.extract - ) - : dependencyExtractor.extract(content) - ); - } - - if (id) { - const relativeFilePath = _path().default.relative(rootDir, filePath); - - module = [relativeFilePath, _constants.default.MODULE]; - } - } // If a SHA-1 is requested on update, compute it. - - if (computeSha1) { - sha1 = sha1hex( - getContent() || _gracefulFs().default.readFileSync(filePath) - ); - } - - return { - dependencies, - id, - module, - sha1 - }; - }); - return _worker.apply(this, arguments); -} - -function getSha1(_x2) { - return _getSha.apply(this, arguments); -} - -function _getSha() { - _getSha = _asyncToGenerator(function*(data) { - const sha1 = data.computeSha1 - ? sha1hex(_gracefulFs().default.readFileSync(data.filePath)) - : null; - return { - dependencies: undefined, - id: undefined, - module: undefined, - sha1 - }; - }); - return _getSha.apply(this, arguments); -} diff --git a/node_modules/jest-haste-map/package.json b/node_modules/jest-haste-map/package.json deleted file mode 100644 index 4e71f671..00000000 --- a/node_modules/jest-haste-map/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_args": [ - [ - "jest-haste-map@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-haste-map@24.9.0", - "_id": "jest-haste-map@24.9.0", - "_inBundle": false, - "_integrity": "sha512-kfVFmsuWui2Sj1Rp1AJ4D9HqJwE4uwTlS/vO+eRUaMmd54BFpli2XhMQnPC2k4cHFVbB2Q2C+jtI1AGLgEnCjQ==", - "_location": "/jest-haste-map", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-haste-map@24.9.0", - "name": "jest-haste-map", - "escapedName": "jest-haste-map", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core", - "/@jest/reporters", - "/@jest/test-sequencer", - "/@jest/transform", - "/jest-runner", - "/jest-runtime" - ], - "_resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/types": "^24.9.0", - "anymatch": "^2.0.0", - "fb-watchman": "^2.0.0", - "fsevents": "^1.2.7", - "graceful-fs": "^4.1.15", - "invariant": "^2.2.4", - "jest-serializer": "^24.9.0", - "jest-util": "^24.9.0", - "jest-worker": "^24.9.0", - "micromatch": "^3.1.10", - "sane": "^4.0.3", - "walker": "^1.0.7" - }, - "devDependencies": { - "@types/anymatch": "^1.3.1", - "@types/fb-watchman": "^2.0.0", - "@types/fsevents": "^1.1.0", - "@types/graceful-fs": "^4.1.2", - "@types/invariant": "^2.2.29", - "@types/micromatch": "^3.1.0", - "@types/sane": "^2.0.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-haste-map", - "optionalDependencies": { - "fsevents": "^1.2.7" - }, - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-haste-map" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-jasmine2/build/ExpectationFailed.d.ts b/node_modules/jest-jasmine2/build/ExpectationFailed.d.ts deleted file mode 100644 index fa106325..00000000 --- a/node_modules/jest-jasmine2/build/ExpectationFailed.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default class ExpectationFailed extends Error { -} -//# sourceMappingURL=ExpectationFailed.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/ExpectationFailed.d.ts.map b/node_modules/jest-jasmine2/build/ExpectationFailed.d.ts.map deleted file mode 100644 index 3973d524..00000000 --- a/node_modules/jest-jasmine2/build/ExpectationFailed.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ExpectationFailed.d.ts","sourceRoot":"","sources":["../src/ExpectationFailed.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,KAAK;CAAG"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/ExpectationFailed.js b/node_modules/jest-jasmine2/build/ExpectationFailed.js deleted file mode 100644 index cca6c96f..00000000 --- a/node_modules/jest-jasmine2/build/ExpectationFailed.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -class ExpectationFailed extends Error {} - -exports.default = ExpectationFailed; diff --git a/node_modules/jest-jasmine2/build/PCancelable.js b/node_modules/jest-jasmine2/build/PCancelable.js deleted file mode 100644 index 73559bd8..00000000 --- a/node_modules/jest-jasmine2/build/PCancelable.js +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -'use strict'; - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; - -class CancelError extends Error { - constructor() { - super('Promise was canceled'); - this.name = 'CancelError'; - } -} - -class PCancelable { - static fn(fn) { - return function() { - const args = [].slice.apply(arguments); - return new PCancelable((onCancel, resolve, reject) => { - args.unshift(onCancel); - fn.apply(null, args).then(resolve, reject); - }); - }; - } - - constructor(executor) { - this._pending = true; - this._canceled = false; - this._promise = new Promise((resolve, reject) => { - this._reject = reject; - return executor( - fn => { - this._cancel = fn; - }, - val => { - this._pending = false; - resolve(val); - }, - err => { - this._pending = false; - reject(err); - } - ); - }); - } - - then() { - return this._promise.then.apply(this._promise, arguments); - } - - catch() { - return this._promise.catch.apply(this._promise, arguments); - } - - cancel() { - if (!this._pending || this._canceled) { - return; - } - - if (typeof this._cancel === 'function') { - try { - this._cancel(); - } catch (err) { - this._reject(err); - } - } - - this._canceled = true; - - this._reject(new CancelError()); - } - - get canceled() { - return this._canceled; - } -} - -Object.setPrototypeOf(PCancelable.prototype, Promise.prototype); -module.exports = PCancelable; -module.exports.CancelError = CancelError; diff --git a/node_modules/jest-jasmine2/build/assertionErrorMessage.d.ts b/node_modules/jest-jasmine2/build/assertionErrorMessage.d.ts deleted file mode 100644 index 853be10c..00000000 --- a/node_modules/jest-jasmine2/build/assertionErrorMessage.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { DiffOptions } from 'jest-matcher-utils'; -import { AssertionErrorWithStack } from './types'; -declare function assertionErrorMessage(error: AssertionErrorWithStack, options: DiffOptions): string; -export default assertionErrorMessage; -//# sourceMappingURL=assertionErrorMessage.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/assertionErrorMessage.d.ts.map b/node_modules/jest-jasmine2/build/assertionErrorMessage.d.ts.map deleted file mode 100644 index ec12be92..00000000 --- a/node_modules/jest-jasmine2/build/assertionErrorMessage.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"assertionErrorMessage.d.ts","sourceRoot":"","sources":["../src/assertionErrorMessage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAIL,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAC,uBAAuB,EAAC,MAAM,SAAS,CAAC;AA4EhD,iBAAS,qBAAqB,CAC5B,KAAK,EAAE,uBAAuB,EAC9B,OAAO,EAAE,WAAW,UAyCrB;AAMD,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/assertionErrorMessage.js b/node_modules/jest-jasmine2/build/assertionErrorMessage.js deleted file mode 100644 index 4dccf74b..00000000 --- a/node_modules/jest-jasmine2/build/assertionErrorMessage.js +++ /dev/null @@ -1,149 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _jestMatcherUtils = require('jest-matcher-utils'); - -var _chalk = _interopRequireDefault(require('chalk')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const assertOperatorsMap = { - '!=': 'notEqual', - '!==': 'notStrictEqual', - '==': 'equal', - '===': 'strictEqual' -}; -const humanReadableOperators = { - deepEqual: 'to deeply equal', - deepStrictEqual: 'to deeply and strictly equal', - equal: 'to be equal', - notDeepEqual: 'not to deeply equal', - notDeepStrictEqual: 'not to deeply and strictly equal', - notEqual: 'to not be equal', - notStrictEqual: 'not be strictly equal', - strictEqual: 'to strictly be equal' -}; - -const getOperatorName = (operator, stack) => { - if (typeof operator === 'string') { - return assertOperatorsMap[operator] || operator; - } - - if (stack.match('.doesNotThrow')) { - return 'doesNotThrow'; - } - - if (stack.match('.throws')) { - return 'throws'; - } - - return ''; -}; - -const operatorMessage = operator => { - const niceOperatorName = getOperatorName(operator, ''); - const humanReadableOperator = humanReadableOperators[niceOperatorName]; - return typeof operator === 'string' - ? `${humanReadableOperator || niceOperatorName} to:\n` - : ''; -}; - -const assertThrowingMatcherHint = operatorName => - operatorName - ? _chalk.default.dim('assert') + - _chalk.default.dim('.' + operatorName + '(') + - _chalk.default.red('function') + - _chalk.default.dim(')') - : ''; - -const assertMatcherHint = (operator, operatorName, expected) => { - let message = ''; - - if (operator === '==' && expected === true) { - message = - _chalk.default.dim('assert') + - _chalk.default.dim('(') + - _chalk.default.red('received') + - _chalk.default.dim(')'); - } else if (operatorName) { - message = - _chalk.default.dim('assert') + - _chalk.default.dim('.' + operatorName + '(') + - _chalk.default.red('received') + - _chalk.default.dim(', ') + - _chalk.default.green('expected') + - _chalk.default.dim(')'); - } - - return message; -}; - -function assertionErrorMessage(error, options) { - const expected = error.expected, - actual = error.actual, - generatedMessage = error.generatedMessage, - message = error.message, - operator = error.operator, - stack = error.stack; - const diffString = (0, _jestMatcherUtils.diff)(expected, actual, options); - const hasCustomMessage = !generatedMessage; - const operatorName = getOperatorName(operator, stack); - const trimmedStack = stack - .replace(message, '') - .replace(/AssertionError(.*)/g, ''); - - if (operatorName === 'doesNotThrow') { - return ( - buildHintString(assertThrowingMatcherHint(operatorName)) + - _chalk.default.reset(`Expected the function not to throw an error.\n`) + - _chalk.default.reset(`Instead, it threw:\n`) + - ` ${(0, _jestMatcherUtils.printReceived)(actual)}` + - _chalk.default.reset( - hasCustomMessage ? '\n\nMessage:\n ' + message : '' - ) + - trimmedStack - ); - } - - if (operatorName === 'throws') { - return ( - buildHintString(assertThrowingMatcherHint(operatorName)) + - _chalk.default.reset(`Expected the function to throw an error.\n`) + - _chalk.default.reset(`But it didn't throw anything.`) + - _chalk.default.reset( - hasCustomMessage ? '\n\nMessage:\n ' + message : '' - ) + - trimmedStack - ); - } - - return ( - buildHintString(assertMatcherHint(operator, operatorName, expected)) + - _chalk.default.reset(`Expected value ${operatorMessage(operator)}`) + - ` ${(0, _jestMatcherUtils.printExpected)(expected)}\n` + - _chalk.default.reset(`Received:\n`) + - ` ${(0, _jestMatcherUtils.printReceived)(actual)}` + - _chalk.default.reset(hasCustomMessage ? '\n\nMessage:\n ' + message : '') + - (diffString ? `\n\nDifference:\n\n${diffString}` : '') + - trimmedStack - ); -} - -function buildHintString(hint) { - return hint ? hint + '\n\n' : ''; -} - -var _default = assertionErrorMessage; -exports.default = _default; diff --git a/node_modules/jest-jasmine2/build/each.d.ts b/node_modules/jest-jasmine2/build/each.d.ts deleted file mode 100644 index fefb7d83..00000000 --- a/node_modules/jest-jasmine2/build/each.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { JestEnvironment } from '@jest/environment'; -declare const _default: (environment: JestEnvironment) => void; -export default _default; -//# sourceMappingURL=each.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/each.d.ts.map b/node_modules/jest-jasmine2/build/each.d.ts.map deleted file mode 100644 index 9102ad71..00000000 --- a/node_modules/jest-jasmine2/build/each.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"each.d.ts","sourceRoot":"","sources":["../src/each.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;;AAGlD,wBAgBE"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/each.js b/node_modules/jest-jasmine2/build/each.js deleted file mode 100644 index 0f93bb35..00000000 --- a/node_modules/jest-jasmine2/build/each.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _jestEach = require('jest-each'); - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var _default = environment => { - environment.global.it.each = (0, _jestEach.bind)(environment.global.it); - environment.global.fit.each = (0, _jestEach.bind)(environment.global.fit); - environment.global.xit.each = (0, _jestEach.bind)(environment.global.xit); - environment.global.describe.each = (0, _jestEach.bind)( - environment.global.describe, - false - ); - environment.global.xdescribe.each = (0, _jestEach.bind)( - environment.global.xdescribe, - false - ); - environment.global.fdescribe.each = (0, _jestEach.bind)( - environment.global.fdescribe, - false - ); -}; - -exports.default = _default; diff --git a/node_modules/jest-jasmine2/build/errorOnPrivate.d.ts b/node_modules/jest-jasmine2/build/errorOnPrivate.d.ts deleted file mode 100644 index 4e01f231..00000000 --- a/node_modules/jest-jasmine2/build/errorOnPrivate.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Global } from '@jest/types'; -export declare function installErrorOnPrivate(global: Global.Global): void; -//# sourceMappingURL=errorOnPrivate.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/errorOnPrivate.d.ts.map b/node_modules/jest-jasmine2/build/errorOnPrivate.d.ts.map deleted file mode 100644 index 7b9974ce..00000000 --- a/node_modules/jest-jasmine2/build/errorOnPrivate.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errorOnPrivate.d.ts","sourceRoot":"","sources":["../src/errorOnPrivate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAkCnC,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,IAAI,CAmCjE"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/errorOnPrivate.js b/node_modules/jest-jasmine2/build/errorOnPrivate.js deleted file mode 100644 index 5b734251..00000000 --- a/node_modules/jest-jasmine2/build/errorOnPrivate.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.installErrorOnPrivate = installErrorOnPrivate; - -var _jestUtil = require('jest-util'); - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// prettier-ignore -const disabledGlobals = { - fail: 'Illegal usage of global `fail`, prefer throwing an error, or the `done.fail` callback.', - pending: 'Illegal usage of global `pending`, prefer explicitly skipping a test using `test.skip`', - spyOn: 'Illegal usage of global `spyOn`, prefer `jest.spyOn`.', - spyOnProperty: 'Illegal usage of global `spyOnProperty`, prefer `jest.spyOn`.' -}; -// prettier-ignore -const disabledJasmineMethods = { - addMatchers: 'Illegal usage of `jasmine.addMatchers`, prefer `expect.extends`.', - any: 'Illegal usage of `jasmine.any`, prefer `expect.any`.', - anything: 'Illegal usage of `jasmine.anything`, prefer `expect.anything`.', - arrayContaining: 'Illegal usage of `jasmine.arrayContaining`, prefer `expect.arrayContaining`.', - createSpy: 'Illegal usage of `jasmine.createSpy`, prefer `jest.fn`.', - objectContaining: 'Illegal usage of `jasmine.objectContaining`, prefer `expect.objectContaining`.', - stringMatching: 'Illegal usage of `jasmine.stringMatching`, prefer `expect.stringMatching`.' -}; - -function installErrorOnPrivate(global) { - const jasmine = global.jasmine; - Object.keys(disabledGlobals).forEach(functionName => { - global[functionName] = () => { - throwAtFunction(disabledGlobals[functionName], global[functionName]); - }; - }); - Object.keys(disabledJasmineMethods).forEach(methodName => { - // @ts-ignore - jasmine[methodName] = () => { - throwAtFunction(disabledJasmineMethods[methodName], jasmine[methodName]); - }; - }); - - function set() { - throwAtFunction( - 'Illegal usage of `jasmine.DEFAULT_TIMEOUT_INTERVAL`, prefer `jest.setTimeout`.', - set - ); - } - - const original = jasmine.DEFAULT_TIMEOUT_INTERVAL; - Object.defineProperty(jasmine, 'DEFAULT_TIMEOUT_INTERVAL', { - configurable: true, - enumerable: true, - get: () => original, - set - }); -} - -function throwAtFunction(message, fn) { - throw new _jestUtil.ErrorWithStack(message, fn); -} diff --git a/node_modules/jest-jasmine2/build/expectationResultFactory.d.ts b/node_modules/jest-jasmine2/build/expectationResultFactory.d.ts deleted file mode 100644 index 4a4c57eb..00000000 --- a/node_modules/jest-jasmine2/build/expectationResultFactory.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { FailedAssertion } from '@jest/test-result'; -export declare type Options = { - matcherName: string; - passed: boolean; - actual?: any; - error?: any; - expected?: any; - message?: string | null; -}; -export default function expectationResultFactory(options: Options, initError?: Error): FailedAssertion; -//# sourceMappingURL=expectationResultFactory.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/expectationResultFactory.d.ts.map b/node_modules/jest-jasmine2/build/expectationResultFactory.d.ts.map deleted file mode 100644 index a4a11c83..00000000 --- a/node_modules/jest-jasmine2/build/expectationResultFactory.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"expectationResultFactory.d.ts","sourceRoot":"","sources":["../src/expectationResultFactory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAkDlD,oBAAY,OAAO,GAAG;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAC9C,OAAO,EAAE,OAAO,EAChB,SAAS,CAAC,EAAE,KAAK,GAChB,eAAe,CAuBjB"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/expectationResultFactory.js b/node_modules/jest-jasmine2/build/expectationResultFactory.js deleted file mode 100644 index 90761f78..00000000 --- a/node_modules/jest-jasmine2/build/expectationResultFactory.js +++ /dev/null @@ -1,93 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = expectationResultFactory; - -var _prettyFormat = _interopRequireDefault(require('pretty-format')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function messageFormatter({error, message, passed}) { - if (passed) { - return 'Passed.'; - } - - if (message) { - return message; - } - - if (typeof error === 'string') { - return error; - } - - if ( - // duck-type Error, see #2549 - error && - typeof error === 'object' && - typeof error.message === 'string' && - typeof error.name === 'string' - ) { - return `${error.name}: ${error.message}`; - } - - return `thrown: ${(0, _prettyFormat.default)(error, { - maxDepth: 3 - })}`; -} - -function stackFormatter(options, initError, errorMessage) { - if (options.passed) { - return ''; - } - - if (options.error) { - if (options.error.stack) { - return options.error.stack; - } - - if (options.error === errorMessage) { - return errorMessage; - } - } - - if (initError) { - return errorMessage.trimRight() + '\n\n' + initError.stack; - } - - return new Error(errorMessage).stack; -} - -function expectationResultFactory(options, initError) { - const message = messageFormatter(options); - const stack = stackFormatter(options, initError, message); - - if (options.passed) { - return { - error: options.error, - matcherName: options.matcherName, - message, - passed: options.passed, - stack - }; - } - - return { - actual: options.actual, - error: options.error, - expected: options.expected, - matcherName: options.matcherName, - message, - passed: options.passed, - stack - }; -} diff --git a/node_modules/jest-jasmine2/build/index.d.ts b/node_modules/jest-jasmine2/build/index.d.ts deleted file mode 100644 index 16b8c6fb..00000000 --- a/node_modules/jest-jasmine2/build/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { TestResult } from '@jest/test-result'; -import { JestEnvironment } from '@jest/environment'; -import Runtime from 'jest-runtime'; -import { Jasmine as JestJasmine } from './types'; -declare function jasmine2(globalConfig: Config.GlobalConfig, config: Config.ProjectConfig, environment: JestEnvironment, runtime: Runtime, testPath: string): Promise; -declare namespace jasmine2 { - type Jasmine = JestJasmine; -} -export = jasmine2; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/index.d.ts.map b/node_modules/jest-jasmine2/build/index.d.ts.map deleted file mode 100644 index 65c7c62c..00000000 --- a/node_modules/jest-jasmine2/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAS,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAkB,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,OAAO,OAAO,MAAM,cAAc,CAAC;AAQnC,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,SAAS,CAAC;AAI/C,iBAAe,QAAQ,CACrB,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,UAAU,CAAC,CA+IrB;AAmCD,kBAAU,QAAQ,CAAC;IACjB,KAAY,OAAO,GAAG,WAAW,CAAC;CACnC;AAED,SAAS,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/index.js b/node_modules/jest-jasmine2/build/index.js deleted file mode 100644 index 188b70e1..00000000 --- a/node_modules/jest-jasmine2/build/index.js +++ /dev/null @@ -1,237 +0,0 @@ -'use strict'; - -var _path = _interopRequireDefault(require('path')); - -var _jestUtil = require('jest-util'); - -var _each = _interopRequireDefault(require('./each')); - -var _errorOnPrivate = require('./errorOnPrivate'); - -var _reporter = _interopRequireDefault(require('./reporter')); - -var _jasmineAsyncInstall = _interopRequireDefault( - require('./jasmineAsyncInstall') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -const JASMINE = require.resolve('./jasmine/jasmineLight'); - -function jasmine2(_x, _x2, _x3, _x4, _x5) { - return _jasmine.apply(this, arguments); -} - -function _jasmine() { - _jasmine = _asyncToGenerator(function*( - globalConfig, - config, - environment, - runtime, - testPath - ) { - const reporter = new _reporter.default(globalConfig, config, testPath); - const jasmineFactory = runtime.requireInternalModule(JASMINE); - const jasmine = jasmineFactory.create({ - process, - testPath, - testTimeout: globalConfig.testTimeout - }); - const env = jasmine.getEnv(); - const jasmineInterface = jasmineFactory.interface(jasmine, env); - Object.assign(environment.global, jasmineInterface); - env.addReporter(jasmineInterface.jsApiReporter); // TODO: Remove config option if V8 exposes some way of getting location of caller - // in a future version - - if (config.testLocationInResults === true) { - const originalIt = environment.global.it; - - environment.global.it = (...args) => { - const stack = (0, _jestUtil.getCallsite)(1, runtime.getSourceMaps()); - const it = originalIt(...args); // @ts-ignore - - it.result.__callsite = stack; - return it; - }; - - const originalXit = environment.global.xit; - - environment.global.xit = (...args) => { - const stack = (0, _jestUtil.getCallsite)(1, runtime.getSourceMaps()); - const xit = originalXit(...args); // @ts-ignore - - xit.result.__callsite = stack; - return xit; - }; - - const originalFit = environment.global.fit; - - environment.global.fit = (...args) => { - const stack = (0, _jestUtil.getCallsite)(1, runtime.getSourceMaps()); - const fit = originalFit(...args); // @ts-ignore - - fit.result.__callsite = stack; - return fit; - }; - } - - (0, _jasmineAsyncInstall.default)(globalConfig, environment.global); - (0, _each.default)(environment); - environment.global.test = environment.global.it; - environment.global.it.only = environment.global.fit; - environment.global.it.todo = env.todo; - environment.global.it.skip = environment.global.xit; - environment.global.xtest = environment.global.xit; - environment.global.describe.skip = environment.global.xdescribe; - environment.global.describe.only = environment.global.fdescribe; - - if (config.timers === 'fake') { - environment.fakeTimers.useFakeTimers(); - } - - env.beforeEach(() => { - if (config.resetModules) { - runtime.resetModules(); - } - - if (config.clearMocks) { - runtime.clearAllMocks(); - } - - if (config.resetMocks) { - runtime.resetAllMocks(); - - if (config.timers === 'fake') { - environment.fakeTimers.useFakeTimers(); - } - } - - if (config.restoreMocks) { - runtime.restoreAllMocks(); - } - }); - env.addReporter(reporter); - runtime - .requireInternalModule( - _path.default.resolve(__dirname, './jestExpect.js') - ) - .default({ - expand: globalConfig.expand - }); - - if (globalConfig.errorOnDeprecated) { - (0, _errorOnPrivate.installErrorOnPrivate)(environment.global); - } else { - Object.defineProperty(jasmine, 'DEFAULT_TIMEOUT_INTERVAL', { - configurable: true, - enumerable: true, - - get() { - return this._DEFAULT_TIMEOUT_INTERVAL; - }, - - set(value) { - this._DEFAULT_TIMEOUT_INTERVAL = value; - } - }); - } - - const snapshotState = runtime - .requireInternalModule( - _path.default.resolve(__dirname, './setup_jest_globals.js') - ) - .default({ - config, - globalConfig, - localRequire: runtime.requireModule.bind(runtime), - testPath - }); - config.setupFilesAfterEnv.forEach(path => runtime.requireModule(path)); - - if (globalConfig.enabledTestsMap) { - env.specFilter = spec => { - const suiteMap = - globalConfig.enabledTestsMap && - globalConfig.enabledTestsMap[spec.result.testPath]; - return suiteMap && suiteMap[spec.result.fullName]; - }; - } else if (globalConfig.testNamePattern) { - const testNameRegex = new RegExp(globalConfig.testNamePattern, 'i'); - - env.specFilter = spec => testNameRegex.test(spec.getFullName()); - } - - runtime.requireModule(testPath); - yield env.execute(); - const results = yield reporter.getResults(); - return addSnapshotData(results, snapshotState); - }); - return _jasmine.apply(this, arguments); -} - -const addSnapshotData = (results, snapshotState) => { - results.testResults.forEach(({fullName, status}) => { - if (status === 'pending' || status === 'failed') { - // if test is skipped or failed, we don't want to mark - // its snapshots as obsolete. - snapshotState.markSnapshotsAsCheckedForTest(fullName); - } - }); - const uncheckedCount = snapshotState.getUncheckedCount(); - const uncheckedKeys = snapshotState.getUncheckedKeys(); - - if (uncheckedCount) { - snapshotState.removeUncheckedKeys(); - } - - const status = snapshotState.save(); - results.snapshot.fileDeleted = status.deleted; - results.snapshot.added = snapshotState.added; - results.snapshot.matched = snapshotState.matched; - results.snapshot.unmatched = snapshotState.unmatched; - results.snapshot.updated = snapshotState.updated; - results.snapshot.unchecked = !status.deleted ? uncheckedCount : 0; // Copy the array to prevent memory leaks - - results.snapshot.uncheckedKeys = Array.from(uncheckedKeys); - return results; -}; // eslint-disable-next-line no-redeclare - -module.exports = jasmine2; diff --git a/node_modules/jest-jasmine2/build/isError.d.ts b/node_modules/jest-jasmine2/build/isError.d.ts deleted file mode 100644 index fe5a8f9a..00000000 --- a/node_modules/jest-jasmine2/build/isError.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default function isError(potentialError: any): { - isError: boolean; - message: string | null; -}; -//# sourceMappingURL=isError.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/isError.d.ts.map b/node_modules/jest-jasmine2/build/isError.d.ts.map deleted file mode 100644 index 529101fc..00000000 --- a/node_modules/jest-jasmine2/build/isError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isError.d.ts","sourceRoot":"","sources":["../src/isError.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,cAAc,EAAE,GAAG;;;EAalD"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/isError.js b/node_modules/jest-jasmine2/build/isError.js deleted file mode 100644 index d5bec40e..00000000 --- a/node_modules/jest-jasmine2/build/isError.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = isError; - -var _prettyFormat = _interopRequireDefault(require('pretty-format')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function isError(potentialError) { - // duck-type Error, see #2549 - const isError = - potentialError !== null && - typeof potentialError === 'object' && - typeof potentialError.message === 'string' && - typeof potentialError.name === 'string'; - const message = isError - ? null - : `Failed: ${(0, _prettyFormat.default)(potentialError, { - maxDepth: 3 - })}`; - return { - isError, - message - }; -} diff --git a/node_modules/jest-jasmine2/build/jasmine/CallTracker.d.ts b/node_modules/jest-jasmine2/build/jasmine/CallTracker.d.ts deleted file mode 100644 index 1b4495a8..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/CallTracker.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -export declare type Context = { - object: unknown; - args: Array; - returnValue?: unknown; -}; -declare class CallTracker { - track: (context: Context) => void; - any: () => boolean; - count: () => number; - argsFor: (index: number) => Array; - all: () => Array; - allArgs: () => Array; - first: () => Context; - mostRecent: () => Context; - reset: () => void; - constructor(); -} -export default CallTracker; -//# sourceMappingURL=CallTracker.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/CallTracker.d.ts.map b/node_modules/jest-jasmine2/build/jasmine/CallTracker.d.ts.map deleted file mode 100644 index f4f8d82d..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/CallTracker.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CallTracker.d.ts","sourceRoot":"","sources":["../../src/jasmine/CallTracker.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,oBAAY,OAAO,GAAG;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,cAAM,WAAW;IACf,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAClC,GAAG,EAAE,MAAM,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,MAAM,CAAC;IACpB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3C,GAAG,EAAE,MAAM,KAAK,CAAC,OAAO,CAAC,CAAC;IAC1B,OAAO,EAAE,MAAM,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,OAAO,CAAC;IAC1B,KAAK,EAAE,MAAM,IAAI,CAAC;;CA+CnB;AAED,eAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/CallTracker.js b/node_modules/jest-jasmine2/build/jasmine/CallTracker.js deleted file mode 100644 index 4c76a069..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/CallTracker.js +++ /dev/null @@ -1,121 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -// This file is a heavily modified fork of Jasmine. Original license: - -/* -Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - -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. -*/ -class CallTracker { - constructor() { - _defineProperty(this, 'track', void 0); - - _defineProperty(this, 'any', void 0); - - _defineProperty(this, 'count', void 0); - - _defineProperty(this, 'argsFor', void 0); - - _defineProperty(this, 'all', void 0); - - _defineProperty(this, 'allArgs', void 0); - - _defineProperty(this, 'first', void 0); - - _defineProperty(this, 'mostRecent', void 0); - - _defineProperty(this, 'reset', void 0); - - let calls = []; - - this.track = function(context) { - calls.push(context); - }; - - this.any = function() { - return !!calls.length; - }; - - this.count = function() { - return calls.length; - }; - - this.argsFor = function(index) { - const call = calls[index]; - return call ? call.args : []; - }; - - this.all = function() { - return calls; - }; - - this.allArgs = function() { - const callArgs = []; - - for (let i = 0; i < calls.length; i++) { - callArgs.push(calls[i].args); - } - - return callArgs; - }; - - this.first = function() { - return calls[0]; - }; - - this.mostRecent = function() { - return calls[calls.length - 1]; - }; - - this.reset = function() { - calls = []; - }; - } -} - -var _default = CallTracker; -exports.default = _default; diff --git a/node_modules/jest-jasmine2/build/jasmine/Env.d.ts b/node_modules/jest-jasmine2/build/jasmine/Env.d.ts deleted file mode 100644 index cb74acb5..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/Env.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { Jasmine, AssertionErrorWithStack, Reporter, Spy } from '../types'; -import Spec from './Spec'; -import Suite from './Suite'; -export default function (j$: Jasmine): { - new (_options?: object | undefined): { - specFilter: (spec: Spec) => boolean; - catchExceptions: (value: unknown) => boolean; - throwOnExpectationFailure: (value: unknown) => void; - catchingExceptions: () => boolean; - topSuite: () => Suite; - fail: (error: Error | AssertionErrorWithStack) => void; - pending: (message: string) => void; - afterAll: (afterAllFunction: (done: (error?: any) => void) => void, timeout?: number | undefined) => void; - fit: (description: string, fn: (done: (error?: any) => void) => void, timeout?: number | undefined) => void; - throwingExpectationFailures: () => boolean; - randomizeTests: (value: unknown) => void; - randomTests: () => boolean; - seed: (value: unknown) => unknown; - execute: (runnablesToRun: string[], suiteTree?: Suite | undefined) => Promise; - fdescribe: (description: string, specDefinitions: Function) => Suite; - spyOn: (obj: Record, methodName: string, accessType?: "configurable" | "enumerable" | "value" | "writable" | "get" | "set" | undefined) => Spy; - beforeEach: (beforeEachFunction: (done: (error?: any) => void) => void, timeout?: number | undefined) => void; - afterEach: (afterEachFunction: (done: (error?: any) => void) => void, timeout?: number | undefined) => void; - clearReporters: () => void; - addReporter: (reporterToAdd: Reporter) => void; - it: (description: string, fn: (done: (error?: any) => void) => void, timeout?: number | undefined) => Spec; - xdescribe: (description: string, specDefinitions: Function) => Suite; - xit: (description: string, fn: (done: (error?: any) => void) => void, timeout?: number | undefined) => any; - beforeAll: (beforeAllFunction: (done: (error?: any) => void) => void, timeout?: number | undefined) => void; - todo: () => Spec; - provideFallbackReporter: (reporterToAdd: Reporter) => void; - allowRespy: (allow: boolean) => void; - describe: (description: string, specDefinitions: Function) => Suite; - }; -}; -//# sourceMappingURL=Env.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/Env.d.ts.map b/node_modules/jest-jasmine2/build/jasmine/Env.d.ts.map deleted file mode 100644 index c052577f..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/Env.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Env.d.ts","sourceRoot":"","sources":["../../src/jasmine/Env.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqCH,OAAO,EAAC,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,GAAG,EAAC,MAAM,UAAU,CAAC;AACzE,OAAO,IAAkB,MAAM,QAAQ,CAAC;AACxC,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,MAAM,CAAC,OAAO,WAAU,EAAE,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6oBlC"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/Env.js b/node_modules/jest-jasmine2/build/jasmine/Env.js deleted file mode 100644 index c66688b0..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/Env.js +++ /dev/null @@ -1,801 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = _default; - -var _assert = require('assert'); - -var _chalk = _interopRequireDefault(require('chalk')); - -var _jestMessageUtil = require('jest-message-util'); - -var _jestUtil = require('jest-util'); - -var _queueRunner = _interopRequireDefault(require('../queueRunner')); - -var _treeProcessor = _interopRequireDefault(require('../treeProcessor')); - -var _isError = _interopRequireDefault(require('../isError')); - -var _assertionErrorMessage = _interopRequireDefault( - require('../assertionErrorMessage') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -function _default(j$) { - var _temp; - - return ( - (_temp = class Env { - constructor(_options) { - _defineProperty(this, 'specFilter', void 0); - - _defineProperty(this, 'catchExceptions', void 0); - - _defineProperty(this, 'throwOnExpectationFailure', void 0); - - _defineProperty(this, 'catchingExceptions', void 0); - - _defineProperty(this, 'topSuite', void 0); - - _defineProperty(this, 'fail', void 0); - - _defineProperty(this, 'pending', void 0); - - _defineProperty(this, 'afterAll', void 0); - - _defineProperty(this, 'fit', void 0); - - _defineProperty(this, 'throwingExpectationFailures', void 0); - - _defineProperty(this, 'randomizeTests', void 0); - - _defineProperty(this, 'randomTests', void 0); - - _defineProperty(this, 'seed', void 0); - - _defineProperty(this, 'execute', void 0); - - _defineProperty(this, 'fdescribe', void 0); - - _defineProperty(this, 'spyOn', void 0); - - _defineProperty(this, 'beforeEach', void 0); - - _defineProperty(this, 'afterEach', void 0); - - _defineProperty(this, 'clearReporters', void 0); - - _defineProperty(this, 'addReporter', void 0); - - _defineProperty(this, 'it', void 0); - - _defineProperty(this, 'xdescribe', void 0); - - _defineProperty(this, 'xit', void 0); - - _defineProperty(this, 'beforeAll', void 0); - - _defineProperty(this, 'todo', void 0); - - _defineProperty(this, 'provideFallbackReporter', void 0); - - _defineProperty(this, 'allowRespy', void 0); - - _defineProperty(this, 'describe', void 0); - - let totalSpecsDefined = 0; - let catchExceptions = true; - const realSetTimeout = global.setTimeout; - const realClearTimeout = global.clearTimeout; - const runnableResources = {}; - const currentlyExecutingSuites = []; - let currentSpec = null; - let throwOnExpectationFailure = false; - let random = false; - let seed = null; - let nextSpecId = 0; - let nextSuiteId = 0; - - const getNextSpecId = function getNextSpecId() { - return 'spec' + nextSpecId++; - }; - - const getNextSuiteId = function getNextSuiteId() { - return 'suite' + nextSuiteId++; - }; - - const topSuite = new j$.Suite({ - id: getNextSuiteId(), - description: '', - - getTestPath() { - return j$.testPath; - } - }); - let currentDeclarationSuite = topSuite; - - const currentSuite = function currentSuite() { - return currentlyExecutingSuites[currentlyExecutingSuites.length - 1]; - }; - - const currentRunnable = function currentRunnable() { - return currentSpec || currentSuite(); - }; - - const reporter = new j$.ReportDispatcher([ - 'jasmineStarted', - 'jasmineDone', - 'suiteStarted', - 'suiteDone', - 'specStarted', - 'specDone' - ]); - - this.specFilter = function() { - return true; - }; - - const defaultResourcesForRunnable = function defaultResourcesForRunnable( - id, - _parentRunnableId - ) { - const resources = { - spies: [] - }; - runnableResources[id] = resources; - }; - - const clearResourcesForRunnable = function clearResourcesForRunnable( - id - ) { - spyRegistry.clearSpies(); - delete runnableResources[id]; - }; - - const beforeAndAfterFns = function beforeAndAfterFns(suite) { - return function() { - let afters = []; - let befores = []; - - while (suite) { - befores = befores.concat(suite.beforeFns); - afters = afters.concat(suite.afterFns); - suite = suite.parentSuite; - } - - return { - befores: befores.reverse(), - afters - }; - }; - }; - - const getSpecName = function getSpecName(spec, suite) { - const fullName = [spec.description]; - const suiteFullName = suite.getFullName(); - - if (suiteFullName !== '') { - fullName.unshift(suiteFullName); - } - - return fullName.join(' '); - }; - - this.catchExceptions = function(value) { - catchExceptions = !!value; - return catchExceptions; - }; - - this.catchingExceptions = function() { - return catchExceptions; - }; - - this.throwOnExpectationFailure = function(value) { - throwOnExpectationFailure = !!value; - }; - - this.throwingExpectationFailures = function() { - return throwOnExpectationFailure; - }; - - this.randomizeTests = function(value) { - random = !!value; - }; - - this.randomTests = function() { - return random; - }; - - this.seed = function(value) { - if (value) { - seed = value; - } - - return seed; - }; - - const queueRunnerFactory = options => { - options.clearTimeout = realClearTimeout; - options.fail = this.fail; - options.setTimeout = realSetTimeout; - return (0, _queueRunner.default)(options); - }; - - this.topSuite = function() { - return topSuite; - }; - - const uncaught = err => { - if (currentSpec) { - currentSpec.onException(err); - currentSpec.cancel(); - } else { - console.error('Unhandled error'); - console.error(err.stack); - } - }; - - let oldListenersException; - let oldListenersRejection; - - const executionSetup = function executionSetup() { - // Need to ensure we are the only ones handling these exceptions. - oldListenersException = process - .listeners('uncaughtException') - .slice(); - oldListenersRejection = process - .listeners('unhandledRejection') - .slice(); - j$.process.removeAllListeners('uncaughtException'); - j$.process.removeAllListeners('unhandledRejection'); - j$.process.on('uncaughtException', uncaught); - j$.process.on('unhandledRejection', uncaught); - }; - - const executionTeardown = function executionTeardown() { - j$.process.removeListener('uncaughtException', uncaught); - j$.process.removeListener('unhandledRejection', uncaught); // restore previous exception handlers - - oldListenersException.forEach(listener => { - j$.process.on('uncaughtException', listener); - }); - oldListenersRejection.forEach(listener => { - j$.process.on('unhandledRejection', listener); - }); - }; - - this.execute = - /*#__PURE__*/ - (function() { - var _ref = _asyncToGenerator(function*( - runnablesToRun, - suiteTree = topSuite - ) { - if (!runnablesToRun) { - if (focusedRunnables.length) { - runnablesToRun = focusedRunnables; - } else { - runnablesToRun = [suiteTree.id]; - } - } - - if (currentlyExecutingSuites.length === 0) { - executionSetup(); - } - - const lastDeclarationSuite = currentDeclarationSuite; - yield (0, _treeProcessor.default)({ - nodeComplete(suite) { - if (!suite.disabled) { - clearResourcesForRunnable(suite.id); - } - - currentlyExecutingSuites.pop(); - - if (suite === topSuite) { - reporter.jasmineDone({ - failedExpectations: topSuite.result.failedExpectations - }); - } else { - reporter.suiteDone(suite.getResult()); - } - }, - - nodeStart(suite) { - currentlyExecutingSuites.push(suite); - defaultResourcesForRunnable( - suite.id, - suite.parentSuite && suite.parentSuite.id - ); - - if (suite === topSuite) { - reporter.jasmineStarted({ - totalSpecsDefined - }); - } else { - reporter.suiteStarted(suite.result); - } - }, - - queueRunnerFactory, - runnableIds: runnablesToRun, - tree: suiteTree - }); - currentDeclarationSuite = lastDeclarationSuite; - - if (currentlyExecutingSuites.length === 0) { - executionTeardown(); - } - }); - - return function(_x) { - return _ref.apply(this, arguments); - }; - })(); - - this.addReporter = function(reporterToAdd) { - reporter.addReporter(reporterToAdd); - }; - - this.provideFallbackReporter = function(reporterToAdd) { - reporter.provideFallbackReporter(reporterToAdd); - }; - - this.clearReporters = function() { - reporter.clearReporters(); - }; - - const spyRegistry = new j$.SpyRegistry({ - currentSpies() { - if (!currentRunnable()) { - throw new Error( - 'Spies must be created in a before function or a spec' - ); - } - - return runnableResources[currentRunnable().id].spies; - } - }); - - this.allowRespy = function(allow) { - spyRegistry.allowRespy(allow); - }; - - this.spyOn = function(...args) { - return spyRegistry.spyOn.apply(spyRegistry, args); - }; - - const suiteFactory = function suiteFactory(description) { - const suite = new j$.Suite({ - id: getNextSuiteId(), - description, - parentSuite: currentDeclarationSuite, - throwOnExpectationFailure, - - getTestPath() { - return j$.testPath; - } - }); - return suite; - }; - - this.describe = function(description, specDefinitions) { - const suite = suiteFactory(description); - - if (specDefinitions === undefined) { - throw new Error( - `Missing second argument. It must be a callback function.` - ); - } - - if (typeof specDefinitions !== 'function') { - throw new Error( - `Invalid second argument, ${specDefinitions}. It must be a callback function.` - ); - } - - if (specDefinitions.length > 0) { - throw new Error('describe does not expect any arguments'); - } - - if (currentDeclarationSuite.markedPending) { - suite.pend(); - } - - if (currentDeclarationSuite.markedTodo) { - // @ts-ignore TODO Possible error: Suite does not have todo method - suite.todo(); - } - - addSpecsToSuite(suite, specDefinitions); - return suite; - }; - - this.xdescribe = function(description, specDefinitions) { - const suite = suiteFactory(description); - suite.pend(); - addSpecsToSuite(suite, specDefinitions); - return suite; - }; - - const focusedRunnables = []; - - this.fdescribe = function(description, specDefinitions) { - const suite = suiteFactory(description); - suite.isFocused = true; - focusedRunnables.push(suite.id); - unfocusAncestor(); - addSpecsToSuite(suite, specDefinitions); - return suite; - }; - - const addSpecsToSuite = (suite, specDefinitions) => { - const parentSuite = currentDeclarationSuite; - parentSuite.addChild(suite); - currentDeclarationSuite = suite; - let declarationError = undefined; - let describeReturnValue = undefined; - - try { - describeReturnValue = specDefinitions.call(suite); - } catch (e) { - declarationError = e; - } // TODO throw in Jest 25: declarationError = new Error - - if ((0, _jestUtil.isPromise)(describeReturnValue)) { - console.log( - (0, _jestMessageUtil.formatExecError)( - new Error( - _chalk.default.yellow( - 'Returning a Promise from "describe" is not supported. Tests must be defined synchronously.\n' + - 'Returning a value from "describe" will fail the test in a future version of Jest.' - ) - ), - { - rootDir: '', - testMatch: [] - }, - { - noStackTrace: false - } - ) - ); - } else if (describeReturnValue !== undefined) { - console.log( - (0, _jestMessageUtil.formatExecError)( - new Error( - _chalk.default.yellow( - 'A "describe" callback must not return a value.\n' + - 'Returning a value from "describe" will fail the test in a future version of Jest.' - ) - ), - { - rootDir: '', - testMatch: [] - }, - { - noStackTrace: false - } - ) - ); - } - - if (declarationError) { - this.it('encountered a declaration exception', () => { - throw declarationError; - }); - } - - currentDeclarationSuite = parentSuite; - }; - - function findFocusedAncestor(suite) { - while (suite) { - if (suite.isFocused) { - return suite.id; - } - - suite = suite.parentSuite; - } - - return null; - } - - function unfocusAncestor() { - const focusedAncestor = findFocusedAncestor(currentDeclarationSuite); - - if (focusedAncestor) { - for (let i = 0; i < focusedRunnables.length; i++) { - if (focusedRunnables[i] === focusedAncestor) { - focusedRunnables.splice(i, 1); - break; - } - } - } - } - - const specFactory = (description, fn, suite, timeout) => { - totalSpecsDefined++; - const spec = new j$.Spec({ - id: getNextSpecId(), - beforeAndAfterFns: beforeAndAfterFns(suite), - resultCallback: specResultCallback, - - getSpecName(spec) { - return getSpecName(spec, suite); - }, - - getTestPath() { - return j$.testPath; - }, - - onStart: specStarted, - description, - queueRunnerFactory, - - userContext() { - return suite.clonedSharedUserContext(); - }, - - queueableFn: { - fn, - - timeout() { - return timeout || j$._DEFAULT_TIMEOUT_INTERVAL; - } - }, - throwOnExpectationFailure - }); - - if (!this.specFilter(spec)) { - spec.disable(); - } - - return spec; - - function specResultCallback(result) { - clearResourcesForRunnable(spec.id); - currentSpec = null; - reporter.specDone(result); - } - - function specStarted(spec) { - currentSpec = spec; - defaultResourcesForRunnable(spec.id, suite.id); - reporter.specStarted(spec.result); - } - }; - - this.it = function(description, fn, timeout) { - if (typeof description !== 'string') { - throw new Error( - `Invalid first argument, ${description}. It must be a string.` - ); - } - - if (fn === undefined) { - throw new Error( - 'Missing second argument. It must be a callback function. Perhaps you want to use `test.todo` for a test placeholder.' - ); - } - - if (typeof fn !== 'function') { - throw new Error( - `Invalid second argument, ${fn}. It must be a callback function.` - ); - } - - const spec = specFactory( - description, - fn, - currentDeclarationSuite, - timeout - ); - - if (currentDeclarationSuite.markedPending) { - spec.pend(); - } // When a test is defined inside another, jasmine will not run it. - // This check throws an error to warn the user about the edge-case. - - if (currentSpec !== null) { - throw new Error( - 'Tests cannot be nested. Test `' + - spec.description + - '` cannot run because it is nested within `' + - currentSpec.description + - '`.' - ); - } - - currentDeclarationSuite.addChild(spec); - return spec; - }; - - this.xit = function(...args) { - const spec = this.it.apply(this, args); - spec.pend('Temporarily disabled with xit'); - return spec; - }; - - this.todo = function() { - const description = arguments[0]; - - if (arguments.length !== 1 || typeof description !== 'string') { - throw new _jestUtil.ErrorWithStack( - 'Todo must be called with only a description.', - test.todo - ); - } - - const spec = specFactory( - description, - () => {}, - currentDeclarationSuite - ); - spec.todo(); - currentDeclarationSuite.addChild(spec); - return spec; - }; - - this.fit = function(description, fn, timeout) { - const spec = specFactory( - description, - fn, - currentDeclarationSuite, - timeout - ); - currentDeclarationSuite.addChild(spec); - focusedRunnables.push(spec.id); - unfocusAncestor(); - return spec; - }; - - this.beforeEach = function(beforeEachFunction, timeout) { - currentDeclarationSuite.beforeEach({ - fn: beforeEachFunction, - - timeout() { - return timeout || j$._DEFAULT_TIMEOUT_INTERVAL; - } - }); - }; - - this.beforeAll = function(beforeAllFunction, timeout) { - currentDeclarationSuite.beforeAll({ - fn: beforeAllFunction, - - timeout() { - return timeout || j$._DEFAULT_TIMEOUT_INTERVAL; - } - }); - }; - - this.afterEach = function(afterEachFunction, timeout) { - currentDeclarationSuite.afterEach({ - fn: afterEachFunction, - - timeout() { - return timeout || j$._DEFAULT_TIMEOUT_INTERVAL; - } - }); - }; - - this.afterAll = function(afterAllFunction, timeout) { - currentDeclarationSuite.afterAll({ - fn: afterAllFunction, - - timeout() { - return timeout || j$._DEFAULT_TIMEOUT_INTERVAL; - } - }); - }; - - this.pending = function(message) { - let fullMessage = j$.Spec.pendingSpecExceptionMessage; - - if (message) { - fullMessage += message; - } - - throw fullMessage; - }; - - this.fail = function(error) { - let checkIsError; - let message; - - if ( - error instanceof _assert.AssertionError || - (error && error.name === _assert.AssertionError.name) - ) { - checkIsError = false; // @ts-ignore TODO Possible error: j$.Spec does not have expand property - - message = (0, _assertionErrorMessage.default)(error, { - expand: j$.Spec.expand - }); - } else { - const check = (0, _isError.default)(error); - checkIsError = check.isError; - message = check.message; - } - - const errorAsErrorObject = checkIsError ? error : new Error(message); - const runnable = currentRunnable(); - - if (!runnable) { - errorAsErrorObject.message = - 'Caught error after test environment was torn down\n\n' + - errorAsErrorObject.message; - throw errorAsErrorObject; - } - - runnable.addExpectationResult(false, { - matcherName: '', - passed: false, - expected: '', - actual: '', - message, - error: errorAsErrorObject - }); - }; - } - }), - _temp - ); -} diff --git a/node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts b/node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts deleted file mode 100644 index 5f83b0a7..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { Reporter, RunDetails } from '../types'; -import { SpecResult } from './Spec'; -import { SuiteResult } from './Suite'; -import Timer from './Timer'; -export default class JsApiReporter implements Reporter { - started: boolean; - finished: boolean; - runDetails: RunDetails; - jasmineStarted: (runDetails: RunDetails) => void; - jasmineDone: (runDetails: RunDetails) => void; - status: () => unknown; - executionTime: () => unknown; - suiteStarted: (result: SuiteResult) => void; - suiteDone: (result: SuiteResult) => void; - suiteResults: (index: number, length: number) => Array; - suites: () => Record; - specResults: (index: number, length: number) => Array; - specDone: (result: SpecResult) => void; - specs: () => Array; - specStarted: (spec: SpecResult) => void; - constructor(options: { - timer?: Timer; - }); -} -//# sourceMappingURL=JsApiReporter.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts.map b/node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts.map deleted file mode 100644 index 81978708..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"JsApiReporter.d.ts","sourceRoot":"","sources":["../../src/jasmine/JsApiReporter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAC,UAAU,EAAC,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,MAAM,SAAS,CAAC;AAS5B,MAAM,CAAC,OAAO,OAAO,aAAc,YAAW,QAAQ;IACpD,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,cAAc,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IACjD,WAAW,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAC9C,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,aAAa,EAAE,MAAM,OAAO,CAAC;IAE7B,YAAY,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5C,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,KAAK,CAAC,WAAW,CAAC,CAAC;IACpE,MAAM,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAE1C,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,KAAK,CAAC,UAAU,CAAC,CAAC;IAClE,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACvC,KAAK,EAAE,MAAM,KAAK,CAAC,UAAU,CAAC,CAAC;IAC/B,WAAW,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;gBAE5B,OAAO,EAAE;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAC;CA8ErC"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/JsApiReporter.js b/node_modules/jest-jasmine2/build/jasmine/JsApiReporter.js deleted file mode 100644 index d2db77b9..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/JsApiReporter.js +++ /dev/null @@ -1,173 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -// This file is a heavily modified fork of Jasmine. Original license: - -/* -Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - -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. -*/ - -/* eslint-disable sort-keys */ -const noopTimer = { - start() {}, - - elapsed() { - return 0; - } -}; - -class JsApiReporter { - constructor(options) { - _defineProperty(this, 'started', void 0); - - _defineProperty(this, 'finished', void 0); - - _defineProperty(this, 'runDetails', void 0); - - _defineProperty(this, 'jasmineStarted', void 0); - - _defineProperty(this, 'jasmineDone', void 0); - - _defineProperty(this, 'status', void 0); - - _defineProperty(this, 'executionTime', void 0); - - _defineProperty(this, 'suiteStarted', void 0); - - _defineProperty(this, 'suiteDone', void 0); - - _defineProperty(this, 'suiteResults', void 0); - - _defineProperty(this, 'suites', void 0); - - _defineProperty(this, 'specResults', void 0); - - _defineProperty(this, 'specDone', void 0); - - _defineProperty(this, 'specs', void 0); - - _defineProperty(this, 'specStarted', void 0); - - const timer = options.timer || noopTimer; - let status = 'loaded'; - this.started = false; - this.finished = false; - this.runDetails = {}; - - this.jasmineStarted = () => { - this.started = true; - status = 'started'; - timer.start(); - }; - - let executionTime; - - function validateAfterAllExceptions({failedExpectations}) { - if (failedExpectations && failedExpectations.length > 0) { - throw failedExpectations[0]; - } - } - - this.jasmineDone = function(runDetails) { - validateAfterAllExceptions(runDetails); - this.finished = true; - this.runDetails = runDetails; - executionTime = timer.elapsed(); - status = 'done'; - }; - - this.status = function() { - return status; - }; - - const suites = []; - const suites_hash = {}; - - this.specStarted = function() {}; - - this.suiteStarted = function(result) { - suites_hash[result.id] = result; - }; - - this.suiteDone = function(result) { - storeSuite(result); - }; - - this.suiteResults = function(index, length) { - return suites.slice(index, index + length); - }; - - function storeSuite(result) { - suites.push(result); - suites_hash[result.id] = result; - } - - this.suites = function() { - return suites_hash; - }; - - const specs = []; - - this.specDone = function(result) { - specs.push(result); - }; - - this.specResults = function(index, length) { - return specs.slice(index, index + length); - }; - - this.specs = function() { - return specs; - }; - - this.executionTime = function() { - return executionTime; - }; - } -} - -exports.default = JsApiReporter; diff --git a/node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.d.ts b/node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.d.ts deleted file mode 100644 index 693372ac..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { Reporter, RunDetails } from '../types'; -import { SpecResult } from './Spec'; -import { SuiteResult } from './Suite'; -export default class ReportDispatcher implements Reporter { - addReporter: (reporter: Reporter) => void; - provideFallbackReporter: (reporter: Reporter) => void; - clearReporters: () => void; - jasmineDone: (runDetails: RunDetails) => void; - jasmineStarted: (runDetails: RunDetails) => void; - specDone: (result: SpecResult) => void; - specStarted: (spec: SpecResult) => void; - suiteDone: (result: SuiteResult) => void; - suiteStarted: (result: SuiteResult) => void; - constructor(methods: Array); -} -//# sourceMappingURL=ReportDispatcher.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.d.ts.map b/node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.d.ts.map deleted file mode 100644 index 2b4e754d..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ReportDispatcher.d.ts","sourceRoot":"","sources":["../../src/jasmine/ReportDispatcher.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAwBH,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAC,UAAU,EAAC,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAEpC,MAAM,CAAC,OAAO,OAAO,gBAAiB,YAAW,QAAQ;IACvD,WAAW,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC1C,uBAAuB,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;IACtD,cAAc,EAAE,MAAM,IAAI,CAAC;IAG3B,WAAW,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAE9C,cAAc,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAEjD,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAEvC,WAAW,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IAExC,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAEzC,YAAY,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;gBAEhC,OAAO,EAAE,KAAK,CAAC,MAAM,QAAQ,CAAC;CA0C3C"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.js b/node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.js deleted file mode 100644 index 6aec3bdf..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.js +++ /dev/null @@ -1,125 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -// This file is a heavily modified fork of Jasmine. Original license: - -/* -Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - -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. -*/ -class ReportDispatcher { - // @ts-ignore - // @ts-ignore - // @ts-ignore - // @ts-ignore - // @ts-ignore - // @ts-ignore - constructor(methods) { - _defineProperty(this, 'addReporter', void 0); - - _defineProperty(this, 'provideFallbackReporter', void 0); - - _defineProperty(this, 'clearReporters', void 0); - - _defineProperty(this, 'jasmineDone', void 0); - - _defineProperty(this, 'jasmineStarted', void 0); - - _defineProperty(this, 'specDone', void 0); - - _defineProperty(this, 'specStarted', void 0); - - _defineProperty(this, 'suiteDone', void 0); - - _defineProperty(this, 'suiteStarted', void 0); - - const dispatchedMethods = methods || []; - - for (let i = 0; i < dispatchedMethods.length; i++) { - const method = dispatchedMethods[i]; - - this[method] = (function(m) { - return function() { - dispatch(m, arguments); - }; - })(method); - } - - let reporters = []; - let fallbackReporter = null; - - this.addReporter = function(reporter) { - reporters.push(reporter); - }; - - this.provideFallbackReporter = function(reporter) { - fallbackReporter = reporter; - }; - - this.clearReporters = function() { - reporters = []; - }; - - return this; - - function dispatch(method, args) { - if (reporters.length === 0 && fallbackReporter !== null) { - reporters.push(fallbackReporter); - } - - for (let i = 0; i < reporters.length; i++) { - const reporter = reporters[i]; - - if (reporter[method]) { - // @ts-ignore - reporter[method].apply(reporter, args); - } - } - } - } -} - -exports.default = ReportDispatcher; diff --git a/node_modules/jest-jasmine2/build/jasmine/Spec.d.ts b/node_modules/jest-jasmine2/build/jasmine/Spec.d.ts deleted file mode 100644 index 19f89606..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/Spec.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { Config } from '@jest/types'; -import { FailedAssertion, Milliseconds, Status } from '@jest/test-result'; -import ExpectationFailed from '../ExpectationFailed'; -import expectationResultFactory, { Options as ExpectationResultFactoryOptions } from '../expectationResultFactory'; -import queueRunner, { QueueableFn } from '../queueRunner'; -import { AssertionErrorWithStack } from '../types'; -export declare type Attributes = { - id: string; - resultCallback: (result: Spec['result']) => void; - description: string; - throwOnExpectationFailure: unknown; - getTestPath: () => Config.Path; - queueableFn: QueueableFn; - beforeAndAfterFns: () => { - befores: Array; - afters: Array; - }; - userContext: () => unknown; - onStart: (context: Spec) => void; - getSpecName: (spec: Spec) => string; - queueRunnerFactory: typeof queueRunner; -}; -export declare type SpecResult = { - id: string; - description: string; - fullName: string; - duration?: Milliseconds; - failedExpectations: Array; - testPath: Config.Path; - passedExpectations: Array>; - pendingReason: string; - status: Status; - __callsite?: { - getColumnNumber: () => number; - getLineNumber: () => number; - }; -}; -export default class Spec { - id: string; - description: string; - resultCallback: (result: SpecResult) => void; - queueableFn: QueueableFn; - beforeAndAfterFns: () => { - befores: Array; - afters: Array; - }; - userContext: () => unknown; - onStart: (spec: Spec) => void; - getSpecName: (spec: Spec) => string; - queueRunnerFactory: typeof queueRunner; - throwOnExpectationFailure: boolean; - initError: Error; - result: SpecResult; - disabled?: boolean; - currentRun?: ReturnType; - markedTodo?: boolean; - markedPending?: boolean; - expand?: boolean; - static pendingSpecExceptionMessage: string; - static isPendingSpecException(e: Error): boolean; - constructor(attrs: Attributes); - addExpectationResult(passed: boolean, data: ExpectationResultFactoryOptions, isError?: boolean): void; - execute(onComplete: Function, enabled: boolean): void; - cancel(): void; - onException(error: ExpectationFailed | AssertionErrorWithStack): void; - disable(): void; - pend(message?: string): void; - todo(): void; - getResult(): SpecResult; - status(enabled?: boolean): "disabled" | "pending" | "failed" | "passed" | "todo"; - isExecutable(): boolean; - getFullName(): string; - isAssertionError(error: Error): boolean; -} -//# sourceMappingURL=Spec.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/Spec.d.ts.map b/node_modules/jest-jasmine2/build/jasmine/Spec.d.ts.map deleted file mode 100644 index 8f2f3168..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/Spec.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Spec.d.ts","sourceRoot":"","sources":["../../src/jasmine/Spec.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA2BH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,eAAe,EAAE,YAAY,EAAE,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAExE,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,wBAAwB,EAAE,EAC/B,OAAO,IAAI,+BAA+B,EAC3C,MAAM,6BAA6B,CAAC;AAErC,OAAO,WAAW,EAAE,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAC,uBAAuB,EAAC,MAAM,UAAU,CAAC;AAEjD,oBAAY,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,EAAE,OAAO,CAAC;IACnC,WAAW,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC;IAC/B,WAAW,EAAE,WAAW,CAAC;IACzB,iBAAiB,EAAE,MAAM;QACvB,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;QAC5B,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;KAC5B,CAAC;IACF,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC;IACjC,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IACpC,kBAAkB,EAAE,OAAO,WAAW,CAAC;CACxC,CAAC;AAEF,oBAAY,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,kBAAkB,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IAC3C,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;IACtB,kBAAkB,EAAE,KAAK,CAAC,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC;IACvE,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE;QACX,eAAe,EAAE,MAAM,MAAM,CAAC;QAC9B,aAAa,EAAE,MAAM,MAAM,CAAC;KAC7B,CAAC;CACH,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,IAAI;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC7C,WAAW,EAAE,WAAW,CAAC;IACzB,iBAAiB,EAAE,MAAM;QACvB,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;QAC5B,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;KAC5B,CAAC;IACF,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IACpC,kBAAkB,EAAE,OAAO,WAAW,CAAC;IACvC,yBAAyB,EAAE,OAAO,CAAC;IACnC,SAAS,EAAE,KAAK,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;IAC5C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,MAAM,CAAC,2BAA2B,EAAE,MAAM,CAAC;IAE3C,MAAM,CAAC,sBAAsB,CAAC,CAAC,EAAE,KAAK;gBAQ1B,KAAK,EAAE,UAAU;IA+C7B,oBAAoB,CAClB,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,+BAA+B,EACrC,OAAO,CAAC,EAAE,OAAO;IAcnB,OAAO,CAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO;IA0C9C,MAAM;IAMN,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,uBAAuB;IAyB9D,OAAO;IAIP,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM;IAOrB,IAAI;IAIJ,SAAS;IAKT,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO;IAoBxB,YAAY;IAIZ,WAAW;IAIX,gBAAgB,CAAC,KAAK,EAAE,KAAK;CAM9B"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/Spec.js b/node_modules/jest-jasmine2/build/jasmine/Spec.js deleted file mode 100644 index ba489663..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/Spec.js +++ /dev/null @@ -1,298 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _assert = require('assert'); - -var _ExpectationFailed = _interopRequireDefault( - require('../ExpectationFailed') -); - -var _expectationResultFactory = _interopRequireDefault( - require('../expectationResultFactory') -); - -var _assertionErrorMessage = _interopRequireDefault( - require('../assertionErrorMessage') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class Spec { - static isPendingSpecException(e) { - return !!( - e && - e.toString && - e.toString().indexOf(Spec.pendingSpecExceptionMessage) !== -1 - ); - } - - constructor(attrs) { - _defineProperty(this, 'id', void 0); - - _defineProperty(this, 'description', void 0); - - _defineProperty(this, 'resultCallback', void 0); - - _defineProperty(this, 'queueableFn', void 0); - - _defineProperty(this, 'beforeAndAfterFns', void 0); - - _defineProperty(this, 'userContext', void 0); - - _defineProperty(this, 'onStart', void 0); - - _defineProperty(this, 'getSpecName', void 0); - - _defineProperty(this, 'queueRunnerFactory', void 0); - - _defineProperty(this, 'throwOnExpectationFailure', void 0); - - _defineProperty(this, 'initError', void 0); - - _defineProperty(this, 'result', void 0); - - _defineProperty(this, 'disabled', void 0); - - _defineProperty(this, 'currentRun', void 0); - - _defineProperty(this, 'markedTodo', void 0); - - _defineProperty(this, 'markedPending', void 0); - - _defineProperty(this, 'expand', void 0); - - this.resultCallback = attrs.resultCallback || function() {}; - - this.id = attrs.id; - this.description = attrs.description || ''; - this.queueableFn = attrs.queueableFn; - - this.beforeAndAfterFns = - attrs.beforeAndAfterFns || - function() { - return { - befores: [], - afters: [] - }; - }; - - this.userContext = - attrs.userContext || - function() { - return {}; - }; - - this.onStart = attrs.onStart || function() {}; - - this.getSpecName = - attrs.getSpecName || - function() { - return ''; - }; - - this.queueRunnerFactory = attrs.queueRunnerFactory || function() {}; - - this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure; - this.initError = new Error(); - this.initError.name = ''; // Without this line v8 stores references to all closures - // in the stack in the Error object. This line stringifies the stack - // property to allow garbage-collecting objects on the stack - // https://crbug.com/v8/7142 - - this.initError.stack = this.initError.stack; - this.queueableFn.initError = this.initError; // @ts-ignore - - this.result = { - id: this.id, - description: this.description, - fullName: this.getFullName(), - failedExpectations: [], - passedExpectations: [], - pendingReason: '', - testPath: attrs.getTestPath() - }; - } - - addExpectationResult(passed, data, isError) { - const expectationResult = (0, _expectationResultFactory.default)( - data, - this.initError - ); - - if (passed) { - this.result.passedExpectations.push(expectationResult); - } else { - this.result.failedExpectations.push(expectationResult); - - if (this.throwOnExpectationFailure && !isError) { - throw new _ExpectationFailed.default(); - } - } - } - - execute(onComplete, enabled) { - const self = this; - this.onStart(this); - - if ( - !this.isExecutable() || - this.markedPending || - this.markedTodo || - enabled === false - ) { - complete(enabled); - return; - } - - const fns = this.beforeAndAfterFns(); - const allFns = fns.befores.concat(this.queueableFn).concat(fns.afters); - this.currentRun = this.queueRunnerFactory({ - queueableFns: allFns, - - onException() { - // @ts-ignore - self.onException.apply(self, arguments); - }, - - userContext: this.userContext(), - setTimeout, - clearTimeout, - fail: () => {} - }); - this.currentRun.then(() => complete(true)); - - function complete(enabledAgain) { - self.result.status = self.status(enabledAgain); - self.resultCallback(self.result); - - if (onComplete) { - onComplete(); - } - } - } - - cancel() { - if (this.currentRun) { - this.currentRun.cancel(); - } - } - - onException(error) { - if (Spec.isPendingSpecException(error)) { - this.pend(extractCustomPendingMessage(error)); - return; - } - - if (error instanceof _ExpectationFailed.default) { - return; - } - - this.addExpectationResult( - false, - { - matcherName: '', - passed: false, - expected: '', - actual: '', - error: this.isAssertionError(error) - ? (0, _assertionErrorMessage.default)(error, { - expand: this.expand - }) - : error - }, - true - ); - } - - disable() { - this.disabled = true; - } - - pend(message) { - this.markedPending = true; - - if (message) { - this.result.pendingReason = message; - } - } - - todo() { - this.markedTodo = true; - } - - getResult() { - this.result.status = this.status(); - return this.result; - } - - status(enabled) { - if (this.disabled || enabled === false) { - return 'disabled'; - } - - if (this.markedTodo) { - return 'todo'; - } - - if (this.markedPending) { - return 'pending'; - } - - if (this.result.failedExpectations.length > 0) { - return 'failed'; - } else { - return 'passed'; - } - } - - isExecutable() { - return !this.disabled; - } - - getFullName() { - return this.getSpecName(this); - } - - isAssertionError(error) { - return ( - error instanceof _assert.AssertionError || - (error && error.name === _assert.AssertionError.name) - ); - } -} - -exports.default = Spec; - -_defineProperty(Spec, 'pendingSpecExceptionMessage', void 0); - -Spec.pendingSpecExceptionMessage = '=> marked Pending'; - -const extractCustomPendingMessage = function extractCustomPendingMessage(e) { - const fullMessage = e.toString(); - const boilerplateStart = fullMessage.indexOf( - Spec.pendingSpecExceptionMessage - ); - const boilerplateEnd = - boilerplateStart + Spec.pendingSpecExceptionMessage.length; - return fullMessage.substr(boilerplateEnd); -}; diff --git a/node_modules/jest-jasmine2/build/jasmine/SpyStrategy.d.ts b/node_modules/jest-jasmine2/build/jasmine/SpyStrategy.d.ts deleted file mode 100644 index bcb67d96..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/SpyStrategy.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -export default class SpyStrategy { - identity: () => string; - exec: (...args: Array) => unknown; - callThrough: () => unknown; - returnValue: (value: unknown) => unknown; - returnValues: () => unknown; - throwError: (something: string | Error) => unknown; - callFake: (fn: Function) => unknown; - stub: (fn: Function) => unknown; - constructor({ name, fn, getSpy, }?: { - name?: string; - fn?: Function; - getSpy?: () => unknown; - }); -} -//# sourceMappingURL=SpyStrategy.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/SpyStrategy.d.ts.map b/node_modules/jest-jasmine2/build/jasmine/SpyStrategy.d.ts.map deleted file mode 100644 index 8ebb678c..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/SpyStrategy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SpyStrategy.d.ts","sourceRoot":"","sources":["../../src/jasmine/SpyStrategy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC;IACvC,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,WAAW,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IACzC,YAAY,EAAE,MAAM,OAAO,CAAC;IAC5B,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK,KAAK,OAAO,CAAC;IACnD,QAAQ,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAK,OAAO,CAAC;IACpC,IAAI,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAK,OAAO,CAAC;gBAEpB,EACV,IAAgB,EAChB,EAAkB,EAClB,MAAsB,GACvB,GAAE;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,QAAQ,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,OAAO,CAAA;KAAM;CAyD/D"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/SpyStrategy.js b/node_modules/jest-jasmine2/build/jasmine/SpyStrategy.js deleted file mode 100644 index e8ac7d96..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/SpyStrategy.js +++ /dev/null @@ -1,141 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -// This file is a heavily modified fork of Jasmine. Original license: - -/* -Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - -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. -*/ -class SpyStrategy { - constructor({ - name = 'unknown', - fn = function() {}, - getSpy = function() {} - } = {}) { - _defineProperty(this, 'identity', void 0); - - _defineProperty(this, 'exec', void 0); - - _defineProperty(this, 'callThrough', void 0); - - _defineProperty(this, 'returnValue', void 0); - - _defineProperty(this, 'returnValues', void 0); - - _defineProperty(this, 'throwError', void 0); - - _defineProperty(this, 'callFake', void 0); - - _defineProperty(this, 'stub', void 0); - - const identity = name; - const originalFn = fn; - - let plan = function plan() {}; - - this.identity = function() { - return identity; - }; - - this.exec = function() { - return plan.apply(this, arguments); - }; - - this.callThrough = function() { - plan = originalFn; - return getSpy(); - }; - - this.returnValue = function(value) { - plan = function plan() { - return value; - }; - - return getSpy(); - }; - - this.returnValues = function() { - const values = Array.prototype.slice.call(arguments); - - plan = function plan() { - return values.shift(); - }; - - return getSpy(); - }; - - this.throwError = function(something) { - const error = - something instanceof Error ? something : new Error(something); - - plan = function plan() { - throw error; - }; - - return getSpy(); - }; - - this.callFake = function(fn) { - if (typeof fn !== 'function') { - throw new Error( - 'Argument passed to callFake should be a function, got ' + fn - ); - } - - plan = fn; - return getSpy(); - }; - - this.stub = function(_fn) { - plan = function plan() {}; - - return getSpy(); - }; - } -} - -exports.default = SpyStrategy; diff --git a/node_modules/jest-jasmine2/build/jasmine/Suite.d.ts b/node_modules/jest-jasmine2/build/jasmine/Suite.d.ts deleted file mode 100644 index a6bcdba5..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/Suite.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { Config } from '@jest/types'; -import expectationResultFactory from '../expectationResultFactory'; -import { QueueableFn } from '../queueRunner'; -import Spec from './Spec'; -export declare type SuiteResult = { - id: string; - description: string; - fullName: string; - failedExpectations: Array>; - testPath: Config.Path; - status?: string; -}; -export declare type Attributes = { - id: string; - parentSuite?: Suite; - description: string; - throwOnExpectationFailure?: boolean; - getTestPath: () => Config.Path; -}; -export default class Suite { - id: string; - parentSuite?: Suite; - description: string; - throwOnExpectationFailure: boolean; - beforeFns: Array; - afterFns: Array; - beforeAllFns: Array; - afterAllFns: Array; - disabled: boolean; - children: Array; - result: SuiteResult; - sharedContext?: object; - markedPending: boolean; - markedTodo: boolean; - isFocused: boolean; - constructor(attrs: Attributes); - getFullName(): string; - disable(): void; - pend(_message?: string): void; - beforeEach(fn: QueueableFn): void; - beforeAll(fn: QueueableFn): void; - afterEach(fn: QueueableFn): void; - afterAll(fn: QueueableFn): void; - addChild(child: Suite | Spec): void; - status(): "disabled" | "pending" | "failed" | "finished"; - isExecutable(): boolean; - canBeReentered(): boolean; - getResult(): SuiteResult; - sharedUserContext(): object; - clonedSharedUserContext(): object; - onException(...args: Parameters): void; - addExpectationResult(...args: Parameters): void; - execute(..._args: Array): void; -} -//# sourceMappingURL=Suite.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/Suite.d.ts.map b/node_modules/jest-jasmine2/build/jasmine/Suite.d.ts.map deleted file mode 100644 index 8a969c48..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/Suite.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Suite.d.ts","sourceRoot":"","sources":["../../src/jasmine/Suite.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA2BH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,oBAAY,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,KAAK,CAAC,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC;IACvE,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,WAAW,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC;CAChC,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,KAAK;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,EAAE,OAAO,CAAC;IACnC,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC9B,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC7B,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IACjC,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;gBAEP,KAAK,EAAE,UAAU;IAyB7B,WAAW;IAaX,OAAO;IAGP,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM;IAGtB,UAAU,CAAC,EAAE,EAAE,WAAW;IAG1B,SAAS,CAAC,EAAE,EAAE,WAAW;IAGzB,SAAS,CAAC,EAAE,EAAE,WAAW;IAGzB,QAAQ,CAAC,EAAE,EAAE,WAAW;IAIxB,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAI5B,MAAM;IAgBN,YAAY;IAIZ,cAAc;IAId,SAAS;IAKT,iBAAiB;IAQjB,uBAAuB;IAIvB,WAAW,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAsBpD,oBAAoB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IAmBtE,OAAO,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC;CAC7B"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/Suite.js b/node_modules/jest-jasmine2/build/jasmine/Suite.js deleted file mode 100644 index f1a50512..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/Suite.js +++ /dev/null @@ -1,235 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _jestUtil = require('jest-util'); - -var _ExpectationFailed = _interopRequireDefault( - require('../ExpectationFailed') -); - -var _expectationResultFactory = _interopRequireDefault( - require('../expectationResultFactory') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class Suite { - constructor(attrs) { - _defineProperty(this, 'id', void 0); - - _defineProperty(this, 'parentSuite', void 0); - - _defineProperty(this, 'description', void 0); - - _defineProperty(this, 'throwOnExpectationFailure', void 0); - - _defineProperty(this, 'beforeFns', void 0); - - _defineProperty(this, 'afterFns', void 0); - - _defineProperty(this, 'beforeAllFns', void 0); - - _defineProperty(this, 'afterAllFns', void 0); - - _defineProperty(this, 'disabled', void 0); - - _defineProperty(this, 'children', void 0); - - _defineProperty(this, 'result', void 0); - - _defineProperty(this, 'sharedContext', void 0); - - _defineProperty(this, 'markedPending', void 0); - - _defineProperty(this, 'markedTodo', void 0); - - _defineProperty(this, 'isFocused', void 0); - - this.markedPending = false; - this.markedTodo = false; - this.isFocused = false; - this.id = attrs.id; - this.parentSuite = attrs.parentSuite; - this.description = (0, _jestUtil.convertDescriptorToString)( - attrs.description - ); - this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure; - this.beforeFns = []; - this.afterFns = []; - this.beforeAllFns = []; - this.afterAllFns = []; - this.disabled = false; - this.children = []; - this.result = { - id: this.id, - description: this.description, - fullName: this.getFullName(), - failedExpectations: [], - testPath: attrs.getTestPath() - }; - } - - getFullName() { - const fullName = []; - - for ( - let parentSuite = this; - parentSuite; - parentSuite = parentSuite.parentSuite - ) { - if (parentSuite.parentSuite) { - fullName.unshift(parentSuite.description); - } - } - - return fullName.join(' '); - } - - disable() { - this.disabled = true; - } - - pend(_message) { - this.markedPending = true; - } - - beforeEach(fn) { - this.beforeFns.unshift(fn); - } - - beforeAll(fn) { - this.beforeAllFns.push(fn); - } - - afterEach(fn) { - this.afterFns.unshift(fn); - } - - afterAll(fn) { - this.afterAllFns.unshift(fn); - } - - addChild(child) { - this.children.push(child); - } - - status() { - if (this.disabled) { - return 'disabled'; - } - - if (this.markedPending) { - return 'pending'; - } - - if (this.result.failedExpectations.length > 0) { - return 'failed'; - } else { - return 'finished'; - } - } - - isExecutable() { - return !this.disabled; - } - - canBeReentered() { - return this.beforeAllFns.length === 0 && this.afterAllFns.length === 0; - } - - getResult() { - this.result.status = this.status(); - return this.result; - } - - sharedUserContext() { - if (!this.sharedContext) { - this.sharedContext = {}; - } - - return this.sharedContext; - } - - clonedSharedUserContext() { - return this.sharedUserContext(); - } - - onException(...args) { - if (args[0] instanceof _ExpectationFailed.default) { - return; - } - - if (isAfterAll(this.children)) { - const data = { - matcherName: '', - passed: false, - expected: '', - actual: '', - error: arguments[0] - }; - this.result.failedExpectations.push( - (0, _expectationResultFactory.default)(data) - ); - } else { - for (let i = 0; i < this.children.length; i++) { - const child = this.children[i]; - child.onException.apply(child, args); - } - } - } - - addExpectationResult(...args) { - if (isAfterAll(this.children) && isFailure(args)) { - const data = args[1]; - this.result.failedExpectations.push( - (0, _expectationResultFactory.default)(data) - ); - - if (this.throwOnExpectationFailure) { - throw new _ExpectationFailed.default(); - } - } else { - for (let i = 0; i < this.children.length; i++) { - const child = this.children[i]; - - try { - child.addExpectationResult.apply(child, args); - } catch (e) { - // keep going - } - } - } - } - - execute(..._args) {} -} - -exports.default = Suite; - -function isAfterAll(children) { - return children && children[0] && children[0].result.status; -} - -function isFailure(args) { - return !args[0]; -} diff --git a/node_modules/jest-jasmine2/build/jasmine/Timer.d.ts b/node_modules/jest-jasmine2/build/jasmine/Timer.d.ts deleted file mode 100644 index 26d2d897..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/Timer.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -export default class Timer { - start: () => void; - elapsed: () => number; - constructor(options?: { - now?: () => number; - }); -} -//# sourceMappingURL=Timer.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/Timer.d.ts.map b/node_modules/jest-jasmine2/build/jasmine/Timer.d.ts.map deleted file mode 100644 index 8e494ffd..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/Timer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Timer.d.ts","sourceRoot":"","sources":["../../src/jasmine/Timer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA+BH,MAAM,CAAC,OAAO,OAAO,KAAK;IACxB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,OAAO,EAAE,MAAM,MAAM,CAAC;gBAEV,OAAO,CAAC,EAAE;QAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;KAAC;CAc3C"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/Timer.js b/node_modules/jest-jasmine2/build/jasmine/Timer.js deleted file mode 100644 index 7aafc980..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/Timer.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -// This file is a heavily modified fork of Jasmine. Original license: - -/* -Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - -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. -*/ -const defaultNow = (function(Date) { - return function() { - return new Date().getTime(); - }; -})(Date); - -class Timer { - constructor(options) { - _defineProperty(this, 'start', void 0); - - _defineProperty(this, 'elapsed', void 0); - - options = options || {}; - const now = options.now || defaultNow; - let startTime; - - this.start = function() { - startTime = now(); - }; - - this.elapsed = function() { - return now() - startTime; - }; - } -} - -exports.default = Timer; diff --git a/node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts b/node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts deleted file mode 100644 index ebb6e8eb..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { Spy } from '../types'; -interface Fn extends Record { - (): any; -} -declare function createSpy(name: string, originalFn: Fn): Spy; -export default createSpy; -//# sourceMappingURL=createSpy.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts.map b/node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts.map deleted file mode 100644 index a5d04667..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"createSpy.d.ts","sourceRoot":"","sources":["../../src/jasmine/createSpy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0BH,OAAO,EAAC,GAAG,EAAC,MAAM,UAAU,CAAC;AAI7B,UAAU,EAAG,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACtC,IAAI,GAAG,CAAC;CACT;AAED,iBAAS,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,GAAG,GAAG,CAqCpD;AAED,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/createSpy.js b/node_modules/jest-jasmine2/build/jasmine/createSpy.js deleted file mode 100644 index 1141bd0b..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/createSpy.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _CallTracker = _interopRequireDefault(require('./CallTracker')); - -var _SpyStrategy = _interopRequireDefault(require('./SpyStrategy')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -// This file is a heavily modified fork of Jasmine. Original license: - -/* -Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - -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. -*/ - -/* eslint-disable sort-keys */ -function createSpy(name, originalFn) { - const spyStrategy = new _SpyStrategy.default({ - name, - fn: originalFn, - - getSpy() { - return spy; - } - }); - const callTracker = new _CallTracker.default(); - - const spy = function spy(...args) { - const callData = { - object: this, - args: Array.prototype.slice.apply(arguments) - }; - callTracker.track(callData); - const returnValue = spyStrategy.exec.apply(this, args); - callData.returnValue = returnValue; - return returnValue; - }; - - for (const prop in originalFn) { - if (prop === 'and' || prop === 'calls') { - throw new Error( - "Jasmine spies would overwrite the 'and' and 'calls' properties " + - 'on the object being spied upon' - ); - } - - spy[prop] = originalFn[prop]; - } - - spy.and = spyStrategy; - spy.calls = callTracker; - return spy; -} - -var _default = createSpy; -exports.default = _default; diff --git a/node_modules/jest-jasmine2/build/jasmine/jasmineLight.d.ts b/node_modules/jest-jasmine2/build/jasmine/jasmineLight.d.ts deleted file mode 100644 index e8a48747..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/jasmineLight.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { Jasmine } from '../types'; -import JsApiReporter from './JsApiReporter'; -declare const _default: { - create: (createOptions: Record) => Jasmine; - interface: (jasmine: Jasmine, env: any) => { - describe(description: string, specDefinitions: Function): any; - xdescribe(description: string, specDefinitions: Function): any; - fdescribe(description: string, specDefinitions: Function): any; - it(): any; - xit(): any; - fit(): any; - beforeEach(): any; - afterEach(): any; - beforeAll(): any; - afterAll(): any; - pending(): any; - fail(): any; - spyOn(obj: Record, methodName: string, accessType?: string | undefined): any; - jsApiReporter: JsApiReporter; - jasmine: Jasmine; - }; -}; -export = _default; -//# sourceMappingURL=jasmineLight.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/jasmineLight.d.ts.map b/node_modules/jest-jasmine2/build/jasmine/jasmineLight.d.ts.map deleted file mode 100644 index 3bdda5c3..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/jasmineLight.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jasmineLight.d.ts","sourceRoot":"","sources":["../../src/jasmine/jasmineLight.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0BH,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAGjC,OAAO,aAAa,MAAM,iBAAiB,CAAC;;;;;;;;;;;;;;;;;;;;;AAmH5C,kBAAyC"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/jasmineLight.js b/node_modules/jest-jasmine2/build/jasmine/jasmineLight.js deleted file mode 100644 index 4ae1907c..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/jasmineLight.js +++ /dev/null @@ -1,167 +0,0 @@ -'use strict'; - -var _createSpy = _interopRequireDefault(require('./createSpy')); - -var _Env = _interopRequireDefault(require('./Env')); - -var _JsApiReporter = _interopRequireDefault(require('./JsApiReporter')); - -var _ReportDispatcher = _interopRequireDefault(require('./ReportDispatcher')); - -var _Spec = _interopRequireDefault(require('./Spec')); - -var _spyRegistry = _interopRequireDefault(require('./spyRegistry')); - -var _Suite = _interopRequireDefault(require('./Suite')); - -var _Timer = _interopRequireDefault(require('./Timer')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const create = function create(createOptions) { - const j$ = _objectSpread({}, createOptions); - - j$._DEFAULT_TIMEOUT_INTERVAL = createOptions.testTimeout || 5000; - - j$.getEnv = function(options) { - const env = (j$.currentEnv_ = j$.currentEnv_ || new j$.Env(options)); //jasmine. singletons in here (setTimeout blah blah). - - return env; - }; - - j$.createSpy = _createSpy.default; - j$.Env = (0, _Env.default)(j$); - j$.JsApiReporter = _JsApiReporter.default; - j$.ReportDispatcher = _ReportDispatcher.default; - j$.Spec = _Spec.default; - j$.SpyRegistry = _spyRegistry.default; - j$.Suite = _Suite.default; - j$.Timer = _Timer.default; - j$.version = '2.5.2-light'; - return j$; -}; - -const _interface = function _interface(jasmine, env) { - const jasmineInterface = { - describe(description, specDefinitions) { - return env.describe(description, specDefinitions); - }, - - xdescribe(description, specDefinitions) { - return env.xdescribe(description, specDefinitions); - }, - - fdescribe(description, specDefinitions) { - return env.fdescribe(description, specDefinitions); - }, - - it() { - return env.it.apply(env, arguments); - }, - - xit() { - return env.xit.apply(env, arguments); - }, - - fit() { - return env.fit.apply(env, arguments); - }, - - beforeEach() { - if (typeof arguments[0] !== 'function') { - throw new Error( - 'Invalid first argument. It must be a callback function.' - ); - } - - return env.beforeEach.apply(env, arguments); - }, - - afterEach() { - if (typeof arguments[0] !== 'function') { - throw new Error( - 'Invalid first argument. It must be a callback function.' - ); - } - - return env.afterEach.apply(env, arguments); - }, - - beforeAll() { - if (typeof arguments[0] !== 'function') { - throw new Error( - 'Invalid first argument. It must be a callback function.' - ); - } - - return env.beforeAll.apply(env, arguments); - }, - - afterAll() { - if (typeof arguments[0] !== 'function') { - throw new Error( - 'Invalid first argument. It must be a callback function.' - ); - } - - return env.afterAll.apply(env, arguments); - }, - - pending() { - return env.pending.apply(env, arguments); - }, - - fail() { - return env.fail.apply(env, arguments); - }, - - spyOn(obj, methodName, accessType) { - return env.spyOn(obj, methodName, accessType); - }, - - jsApiReporter: new jasmine.JsApiReporter({ - timer: new jasmine.Timer() - }), - jasmine - }; - return jasmineInterface; -}; // Interface is a reserved word in strict mode, so can't export it as ESM - -module.exports = { - create, - interface: _interface -}; diff --git a/node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts b/node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts deleted file mode 100644 index db3c9e31..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { Spy } from '../types'; -export default class SpyRegistry { - allowRespy: (allow: unknown) => void; - spyOn: (obj: Record, methodName: string, accessType?: keyof PropertyDescriptor) => Spy; - clearSpies: () => void; - respy: unknown; - private _spyOnProperty; - constructor({ currentSpies, }?: { - currentSpies?: () => Array; - }); -} -//# sourceMappingURL=spyRegistry.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts.map b/node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts.map deleted file mode 100644 index 56e30986..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"spyRegistry.d.ts","sourceRoot":"","sources":["../../src/jasmine/spyRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,OAAO,EAAC,GAAG,EAAC,MAAM,UAAU,CAAC;AAsB7B,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,KAAK,EAAE,CACL,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACxB,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,MAAM,kBAAkB,KAClC,GAAG,CAAC;IACT,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IAEf,OAAO,CAAC,cAAc,CAIb;gBAEG,EACV,YAAuB,GACxB,GAAE;QACD,YAAY,CAAC,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;KAC5B;CAgKP"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmine/spyRegistry.js b/node_modules/jest-jasmine2/build/jasmine/spyRegistry.js deleted file mode 100644 index 7ef36059..00000000 --- a/node_modules/jest-jasmine2/build/jasmine/spyRegistry.js +++ /dev/null @@ -1,244 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _CallTracker = _interopRequireDefault(require('./CallTracker')); - -var _createSpy = _interopRequireDefault(require('./createSpy')); - -var _SpyStrategy = _interopRequireDefault(require('./SpyStrategy')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const formatErrorMsg = (domain, usage) => { - const usageDefinition = usage ? '\nUsage: ' + usage : ''; - return msg => domain + ' : ' + msg + usageDefinition; -}; - -function isSpy(putativeSpy) { - if (!putativeSpy) { - return false; - } - - return ( - putativeSpy.and instanceof _SpyStrategy.default && - putativeSpy.calls instanceof _CallTracker.default - ); -} - -const getErrorMsg = formatErrorMsg('', 'spyOn(, )'); - -class SpyRegistry { - constructor({currentSpies = () => []} = {}) { - _defineProperty(this, 'allowRespy', void 0); - - _defineProperty(this, 'spyOn', void 0); - - _defineProperty(this, 'clearSpies', void 0); - - _defineProperty(this, 'respy', void 0); - - _defineProperty(this, '_spyOnProperty', void 0); - - this.allowRespy = function(allow) { - this.respy = allow; - }; - - this.spyOn = (obj, methodName, accessType) => { - if (accessType) { - return this._spyOnProperty(obj, methodName, accessType); - } - - if (obj === void 0) { - throw new Error( - getErrorMsg( - 'could not find an object to spy upon for ' + methodName + '()' - ) - ); - } - - if (methodName === void 0) { - throw new Error(getErrorMsg('No method name supplied')); - } - - if (obj[methodName] === void 0) { - throw new Error(getErrorMsg(methodName + '() method does not exist')); - } - - if (obj[methodName] && isSpy(obj[methodName])) { - if (this.respy) { - return obj[methodName]; - } else { - throw new Error( - getErrorMsg(methodName + ' has already been spied upon') - ); - } - } - - let descriptor; - - try { - descriptor = Object.getOwnPropertyDescriptor(obj, methodName); - } catch (e) { - // IE 8 doesn't support `definePropery` on non-DOM nodes - } - - if (descriptor && !(descriptor.writable || descriptor.set)) { - throw new Error( - getErrorMsg(methodName + ' is not declared writable or has no setter') - ); - } - - const originalMethod = obj[methodName]; - const spiedMethod = (0, _createSpy.default)(methodName, originalMethod); - let restoreStrategy; - - if (Object.prototype.hasOwnProperty.call(obj, methodName)) { - restoreStrategy = function restoreStrategy() { - obj[methodName] = originalMethod; - }; - } else { - restoreStrategy = function restoreStrategy() { - if (!delete obj[methodName]) { - obj[methodName] = originalMethod; - } - }; - } - - currentSpies().push({ - restoreObjectToOriginalState: restoreStrategy - }); - obj[methodName] = spiedMethod; - return spiedMethod; - }; - - this._spyOnProperty = function(obj, propertyName, accessType = 'get') { - if (!obj) { - throw new Error( - getErrorMsg( - 'could not find an object to spy upon for ' + propertyName - ) - ); - } - - if (!propertyName) { - throw new Error(getErrorMsg('No property name supplied')); - } - - let descriptor; - - try { - descriptor = Object.getOwnPropertyDescriptor(obj, propertyName); - } catch (e) { - // IE 8 doesn't support `definePropery` on non-DOM nodes - } - - if (!descriptor) { - throw new Error(getErrorMsg(propertyName + ' property does not exist')); - } - - if (!descriptor.configurable) { - throw new Error( - getErrorMsg(propertyName + ' is not declared configurable') - ); - } - - if (!descriptor[accessType]) { - throw new Error( - getErrorMsg( - 'Property ' + - propertyName + - ' does not have access type ' + - accessType - ) - ); - } - - if (obj[propertyName] && isSpy(obj[propertyName])) { - if (this.respy) { - return obj[propertyName]; - } else { - throw new Error( - getErrorMsg(propertyName + ' has already been spied upon') - ); - } - } - - const originalDescriptor = descriptor; - const spiedProperty = (0, _createSpy.default)( - propertyName, - descriptor[accessType] - ); - let restoreStrategy; - - if (Object.prototype.hasOwnProperty.call(obj, propertyName)) { - restoreStrategy = function restoreStrategy() { - Object.defineProperty(obj, propertyName, originalDescriptor); - }; - } else { - restoreStrategy = function restoreStrategy() { - delete obj[propertyName]; - }; - } - - currentSpies().push({ - restoreObjectToOriginalState: restoreStrategy - }); - - const spiedDescriptor = _objectSpread({}, descriptor, { - [accessType]: spiedProperty - }); - - Object.defineProperty(obj, propertyName, spiedDescriptor); - return spiedProperty; - }; - - this.clearSpies = function() { - const spies = currentSpies(); - - for (let i = spies.length - 1; i >= 0; i--) { - const spyEntry = spies[i]; - spyEntry.restoreObjectToOriginalState(); - } - }; - } -} - -exports.default = SpyRegistry; diff --git a/node_modules/jest-jasmine2/build/jasmineAsyncInstall.d.ts b/node_modules/jest-jasmine2/build/jasmineAsyncInstall.d.ts deleted file mode 100644 index 5075c745..00000000 --- a/node_modules/jest-jasmine2/build/jasmineAsyncInstall.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** - * This module adds ability to test async promise code with jasmine by - * returning a promise from `it/test` and `before/afterEach/All` blocks. - */ -import { Global, Config } from '@jest/types'; -export default function jasmineAsyncInstall(globalConfig: Config.GlobalConfig, global: Global.Global): void; -//# sourceMappingURL=jasmineAsyncInstall.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmineAsyncInstall.d.ts.map b/node_modules/jest-jasmine2/build/jasmineAsyncInstall.d.ts.map deleted file mode 100644 index 8af3b70b..00000000 --- a/node_modules/jest-jasmine2/build/jasmineAsyncInstall.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jasmineAsyncInstall.d.ts","sourceRoot":"","sources":["../src/jasmineAsyncInstall.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AAEH,OAAO,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,aAAa,CAAC;AAkK3C,MAAM,CAAC,OAAO,UAAU,mBAAmB,CACzC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,MAAM,EAAE,MAAM,CAAC,MAAM,QAuBtB"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jasmineAsyncInstall.js b/node_modules/jest-jasmine2/build/jasmineAsyncInstall.js deleted file mode 100644 index a0a26e94..00000000 --- a/node_modules/jest-jasmine2/build/jasmineAsyncInstall.js +++ /dev/null @@ -1,188 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = jasmineAsyncInstall; - -var _co = _interopRequireDefault(require('co')); - -var _isGeneratorFn = _interopRequireDefault(require('is-generator-fn')); - -var _throat = _interopRequireDefault(require('throat')); - -var _isError3 = _interopRequireDefault(require('./isError')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; - -function isPromise(obj) { - return obj && typeof obj.then === 'function'; -} - -function promisifyLifeCycleFunction(originalFn, env) { - return function(fn, timeout) { - if (!fn) { - return originalFn.call(env); - } - - const hasDoneCallback = typeof fn === 'function' && fn.length > 0; - - if (hasDoneCallback) { - // Jasmine will handle it - return originalFn.call(env, fn, timeout); - } - - const extraError = new Error(); // Without this line v8 stores references to all closures - // in the stack in the Error object. This line stringifies the stack - // property to allow garbage-collecting objects on the stack - // https://crbug.com/v8/7142 - - extraError.stack = extraError.stack; // We make *all* functions async and run `done` right away if they - // didn't return a promise. - - const asyncJestLifecycle = function asyncJestLifecycle(done) { - const wrappedFn = (0, _isGeneratorFn.default)(fn) - ? _co.default.wrap(fn) - : fn; - const returnValue = wrappedFn.call({}); - - if (isPromise(returnValue)) { - returnValue.then(done.bind(null, null), error => { - const _isError = (0, _isError3.default)(error), - checkIsError = _isError.isError, - message = _isError.message; - - if (message) { - extraError.message = message; - } - - done.fail(checkIsError ? error : extraError); - }); - } else { - done(); - } - }; - - return originalFn.call(env, asyncJestLifecycle, timeout); - }; -} // Similar to promisifyLifeCycleFunction but throws an error -// when the return value is neither a Promise nor `undefined` - -function promisifyIt(originalFn, env, jasmine) { - return function(specName, fn, timeout) { - if (!fn) { - const spec = originalFn.call(env, specName); - spec.pend('not implemented'); - return spec; - } - - const hasDoneCallback = fn.length > 0; - - if (hasDoneCallback) { - return originalFn.call(env, specName, fn, timeout); - } - - const extraError = new Error(); // Without this line v8 stores references to all closures - // in the stack in the Error object. This line stringifies the stack - // property to allow garbage-collecting objects on the stack - // https://crbug.com/v8/7142 - - extraError.stack = extraError.stack; - - const asyncJestTest = function asyncJestTest(done) { - const wrappedFn = (0, _isGeneratorFn.default)(fn) - ? _co.default.wrap(fn) - : fn; - const returnValue = wrappedFn.call({}); - - if (isPromise(returnValue)) { - returnValue.then(done.bind(null, null), error => { - const _isError2 = (0, _isError3.default)(error), - checkIsError = _isError2.isError, - message = _isError2.message; - - if (message) { - extraError.message = message; - } - - if (jasmine.Spec.isPendingSpecException(error)) { - env.pending(message); - done(); - } else { - done.fail(checkIsError ? error : extraError); - } - }); - } else if (returnValue === undefined) { - done(); - } else { - done.fail( - new Error( - 'Jest: `it` and `test` must return either a Promise or undefined.' - ) - ); - } - }; - - return originalFn.call(env, specName, asyncJestTest, timeout); - }; -} - -function makeConcurrent(originalFn, env, mutex) { - return function(specName, fn, timeout) { - if ( - env != null && - !env.specFilter({ - getFullName: () => specName || '' - }) - ) { - return originalFn.call(env, specName, () => Promise.resolve(), timeout); - } - - let promise; - - try { - promise = mutex(() => { - const promise = fn(); - - if (isPromise(promise)) { - return promise; - } - - throw new Error( - `Jest: concurrent test "${specName}" must return a Promise.` - ); - }); - } catch (error) { - return originalFn.call(env, specName, () => Promise.reject(error)); - } - - return originalFn.call(env, specName, () => promise, timeout); - }; -} - -function jasmineAsyncInstall(globalConfig, global) { - const jasmine = global.jasmine; - const mutex = (0, _throat.default)(globalConfig.maxConcurrency); - const env = jasmine.getEnv(); - env.it = promisifyIt(env.it, env, jasmine); - env.fit = promisifyIt(env.fit, env, jasmine); - - global.it.concurrent = (env => { - const concurrent = makeConcurrent(env.it, env, mutex); - concurrent.only = makeConcurrent(env.fit, env, mutex); - concurrent.skip = makeConcurrent(env.xit, env, mutex); - return concurrent; - })(env); - - global.fit.concurrent = makeConcurrent(env.fit, env, mutex); - env.afterAll = promisifyLifeCycleFunction(env.afterAll, env); - env.afterEach = promisifyLifeCycleFunction(env.afterEach, env); - env.beforeAll = promisifyLifeCycleFunction(env.beforeAll, env); - env.beforeEach = promisifyLifeCycleFunction(env.beforeEach, env); -} diff --git a/node_modules/jest-jasmine2/build/jestExpect.d.ts b/node_modules/jest-jasmine2/build/jestExpect.d.ts deleted file mode 100644 index 82e61a15..00000000 --- a/node_modules/jest-jasmine2/build/jestExpect.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare const _default: (config: { - expand: boolean; -}) => void; -export default _default; -//# sourceMappingURL=jestExpect.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jestExpect.d.ts.map b/node_modules/jest-jasmine2/build/jestExpect.d.ts.map deleted file mode 100644 index 9cfd01cb..00000000 --- a/node_modules/jest-jasmine2/build/jestExpect.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jestExpect.d.ts","sourceRoot":"","sources":["../src/jestExpect.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;AAuBH,wBA+CE"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/jestExpect.js b/node_modules/jest-jasmine2/build/jestExpect.js deleted file mode 100644 index c0676e6c..00000000 --- a/node_modules/jest-jasmine2/build/jestExpect.js +++ /dev/null @@ -1,69 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _expect = _interopRequireDefault(require('expect')); - -var _jestSnapshot = require('jest-snapshot'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var _default = config => { - global.expect = _expect.default; - - _expect.default.setState({ - expand: config.expand - }); - - _expect.default.extend({ - toMatchInlineSnapshot: _jestSnapshot.toMatchInlineSnapshot, - toMatchSnapshot: _jestSnapshot.toMatchSnapshot, - toThrowErrorMatchingInlineSnapshot: - _jestSnapshot.toThrowErrorMatchingInlineSnapshot, - toThrowErrorMatchingSnapshot: _jestSnapshot.toThrowErrorMatchingSnapshot - }); - - _expect.default.addSnapshotSerializer = _jestSnapshot.addSerializer; - const jasmine = global.jasmine; - jasmine.anything = _expect.default.anything; - jasmine.any = _expect.default.any; - jasmine.objectContaining = _expect.default.objectContaining; - jasmine.arrayContaining = _expect.default.arrayContaining; - jasmine.stringMatching = _expect.default.stringMatching; - - jasmine.addMatchers = jasmineMatchersObject => { - const jestMatchersObject = Object.create(null); - Object.keys(jasmineMatchersObject).forEach(name => { - jestMatchersObject[name] = function(...args) { - // use "expect.extend" if you need to use equality testers (via this.equal) - const result = jasmineMatchersObject[name](null, null); // if there is no 'negativeCompare', both should be handled by `compare` - - const negativeCompare = result.negativeCompare || result.compare; - return this.isNot - ? negativeCompare.apply( - null, // @ts-ignore - args - ) - : result.compare.apply( - null, // @ts-ignore - args - ); - }; - }); - const expect = global.expect; - expect.extend(jestMatchersObject); - }; -}; - -exports.default = _default; diff --git a/node_modules/jest-jasmine2/build/pTimeout.d.ts b/node_modules/jest-jasmine2/build/pTimeout.d.ts deleted file mode 100644 index 8dce4437..00000000 --- a/node_modules/jest-jasmine2/build/pTimeout.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default function pTimeout(promise: Promise, ms: number, clearTimeout: NodeJS.Global['clearTimeout'], setTimeout: NodeJS.Global['setTimeout'], onTimeout: () => any): Promise; -//# sourceMappingURL=pTimeout.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/pTimeout.d.ts.map b/node_modules/jest-jasmine2/build/pTimeout.d.ts.map deleted file mode 100644 index 3ebe8c6b..00000000 --- a/node_modules/jest-jasmine2/build/pTimeout.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pTimeout.d.ts","sourceRoot":"","sources":["../src/pTimeout.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC9B,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EACrB,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,EAC3C,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,EACvC,SAAS,EAAE,MAAM,GAAG,GACnB,OAAO,CAAC,GAAG,CAAC,CAcd"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/pTimeout.js b/node_modules/jest-jasmine2/build/pTimeout.js deleted file mode 100644 index 4f878955..00000000 --- a/node_modules/jest-jasmine2/build/pTimeout.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = pTimeout; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// A specialized version of `p-timeout` that does not touch globals. -// It does not throw on timeout. -function pTimeout(promise, ms, clearTimeout, setTimeout, onTimeout) { - return new Promise((resolve, reject) => { - const timer = setTimeout(() => resolve(onTimeout()), ms); - promise.then( - val => { - clearTimeout(timer); - resolve(val); - }, - err => { - clearTimeout(timer); - reject(err); - } - ); - }); -} diff --git a/node_modules/jest-jasmine2/build/queueRunner.d.ts b/node_modules/jest-jasmine2/build/queueRunner.d.ts deleted file mode 100644 index c210577e..00000000 --- a/node_modules/jest-jasmine2/build/queueRunner.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare type Global = NodeJS.Global; -export declare type Options = { - clearTimeout: Global['clearTimeout']; - fail: (error: Error) => void; - onException: (error: Error) => void; - queueableFns: Array; - setTimeout: Global['setTimeout']; - userContext: any; -}; -export declare type QueueableFn = { - fn: (done: (error?: any) => void) => void; - timeout?: () => number; - initError?: Error; -}; -export default function queueRunner(options: Options): { - cancel: any; - catch: (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise; - then: (onfulfilled?: ((value: void) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise; -}; -export {}; -//# sourceMappingURL=queueRunner.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/queueRunner.d.ts.map b/node_modules/jest-jasmine2/build/queueRunner.d.ts.map deleted file mode 100644 index 8d6aa257..00000000 --- a/node_modules/jest-jasmine2/build/queueRunner.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queueRunner.d.ts","sourceRoot":"","sources":["../src/queueRunner.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,aAAK,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAE5B,oBAAY,OAAO,GAAG;IACpB,YAAY,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC7B,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACpC,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;IACjC,WAAW,EAAE,GAAG,CAAC;CAClB,CAAC;AAEF,oBAAY,WAAW,GAAG;IACxB,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,CAAC;IAC1C,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,OAAO,EAAE,OAAO;;;;EA6DnD"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/queueRunner.js b/node_modules/jest-jasmine2/build/queueRunner.js deleted file mode 100644 index 405ccc32..00000000 --- a/node_modules/jest-jasmine2/build/queueRunner.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = queueRunner; - -var _PCancelable = _interopRequireDefault(require('./PCancelable')); - -var _pTimeout = _interopRequireDefault(require('./pTimeout')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; - -function queueRunner(options) { - const token = new _PCancelable.default((onCancel, resolve) => { - onCancel(resolve); - }); - - const mapper = ({fn, timeout, initError = new Error()}) => { - let promise = new Promise(resolve => { - const next = function next(...args) { - const err = args[0]; - - if (err) { - options.fail.apply(null, args); - } - - resolve(); - }; - - next.fail = function(...args) { - options.fail.apply(null, args); - resolve(); - }; - - try { - fn.call(options.userContext, next); - } catch (e) { - options.onException(e); - resolve(); - } - }); - promise = Promise.race([promise, token]); - - if (!timeout) { - return promise; - } - - const timeoutMs = timeout(); - return (0, _pTimeout.default)( - promise, - timeoutMs, - options.clearTimeout, - options.setTimeout, - () => { - initError.message = - 'Timeout - Async callback was not invoked within the ' + - timeoutMs + - 'ms timeout specified by jest.setTimeout.'; - initError.stack = initError.message + initError.stack; - options.onException(initError); - } - ); - }; - - const result = options.queueableFns.reduce( - (promise, fn) => promise.then(() => mapper(fn)), - Promise.resolve() - ); - return { - cancel: token.cancel.bind(token), - catch: result.catch.bind(result), - then: result.then.bind(result) - }; -} diff --git a/node_modules/jest-jasmine2/build/reporter.d.ts b/node_modules/jest-jasmine2/build/reporter.d.ts deleted file mode 100644 index 8df7290a..00000000 --- a/node_modules/jest-jasmine2/build/reporter.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { TestResult } from '@jest/test-result'; -import { SpecResult } from './jasmine/Spec'; -import { SuiteResult } from './jasmine/Suite'; -import { Reporter, RunDetails } from './types'; -export default class Jasmine2Reporter implements Reporter { - private _testResults; - private _globalConfig; - private _config; - private _currentSuites; - private _resolve; - private _resultsPromise; - private _startTimes; - private _testPath; - constructor(globalConfig: Config.GlobalConfig, config: Config.ProjectConfig, testPath: Config.Path); - jasmineStarted(_runDetails: RunDetails): void; - specStarted(spec: SpecResult): void; - specDone(result: SpecResult): void; - suiteStarted(suite: SuiteResult): void; - suiteDone(_result: SuiteResult): void; - jasmineDone(_runDetails: RunDetails): void; - getResults(): Promise; - private _addMissingMessageToStack; - private _extractSpecResults; -} -//# sourceMappingURL=reporter.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/reporter.d.ts.map b/node_modules/jest-jasmine2/build/reporter.d.ts.map deleted file mode 100644 index a607d104..00000000 --- a/node_modules/jest-jasmine2/build/reporter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../src/reporter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAkB,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,SAAS,CAAC;AAI7C,MAAM,CAAC,OAAO,OAAO,gBAAiB,YAAW,QAAQ;IACvD,OAAO,CAAC,YAAY,CAAyB;IAC7C,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,cAAc,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAM;IACtB,OAAO,CAAC,eAAe,CAAsB;IAC7C,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,SAAS,CAAc;gBAG7B,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,QAAQ,EAAE,MAAM,CAAC,IAAI;IAYvB,cAAc,CAAC,WAAW,EAAE,UAAU;IAEtC,WAAW,CAAC,IAAI,EAAE,UAAU;IAI5B,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAMlC,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAItC,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAIrC,WAAW,CAAC,WAAW,EAAE,UAAU,GAAG,IAAI;IAiD1C,UAAU,IAAI,OAAO,CAAC,UAAU,CAAC;IAIjC,OAAO,CAAC,yBAAyB;IAWjC,OAAO,CAAC,mBAAmB;CAmC5B"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/reporter.js b/node_modules/jest-jasmine2/build/reporter.js deleted file mode 100644 index 1177343d..00000000 --- a/node_modules/jest-jasmine2/build/reporter.js +++ /dev/null @@ -1,176 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _jestMessageUtil = require('jest-message-util'); - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var jestNow = global[Symbol.for('jest-native-now')] || global.Date.now; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class Jasmine2Reporter { - constructor(globalConfig, config, testPath) { - _defineProperty(this, '_testResults', void 0); - - _defineProperty(this, '_globalConfig', void 0); - - _defineProperty(this, '_config', void 0); - - _defineProperty(this, '_currentSuites', void 0); - - _defineProperty(this, '_resolve', void 0); - - _defineProperty(this, '_resultsPromise', void 0); - - _defineProperty(this, '_startTimes', void 0); - - _defineProperty(this, '_testPath', void 0); - - this._globalConfig = globalConfig; - this._config = config; - this._testPath = testPath; - this._testResults = []; - this._currentSuites = []; - this._resolve = null; - this._resultsPromise = new Promise(resolve => (this._resolve = resolve)); - this._startTimes = new Map(); - } - - jasmineStarted(_runDetails) {} - - specStarted(spec) { - this._startTimes.set(spec.id, jestNow()); - } - - specDone(result) { - this._testResults.push( - this._extractSpecResults(result, this._currentSuites.slice(0)) - ); - } - - suiteStarted(suite) { - this._currentSuites.push(suite.description); - } - - suiteDone(_result) { - this._currentSuites.pop(); - } - - jasmineDone(_runDetails) { - let numFailingTests = 0; - let numPassingTests = 0; - let numPendingTests = 0; - let numTodoTests = 0; - const testResults = this._testResults; - testResults.forEach(testResult => { - if (testResult.status === 'failed') { - numFailingTests++; - } else if (testResult.status === 'pending') { - numPendingTests++; - } else if (testResult.status === 'todo') { - numTodoTests++; - } else { - numPassingTests++; - } - }); - const testResult = { - console: null, - failureMessage: (0, _jestMessageUtil.formatResultsErrors)( - testResults, - this._config, - this._globalConfig, - this._testPath - ), - numFailingTests, - numPassingTests, - numPendingTests, - numTodoTests, - perfStats: { - end: 0, - start: 0 - }, - snapshot: { - added: 0, - fileDeleted: false, - matched: 0, - unchecked: 0, - unmatched: 0, - updated: 0 - }, - testFilePath: this._testPath, - testResults - }; - - this._resolve(testResult); - } - - getResults() { - return this._resultsPromise; - } - - _addMissingMessageToStack(stack, message) { - // Some errors (e.g. Angular injection error) don't prepend error.message - // to stack, instead the first line of the stack is just plain 'Error' - const ERROR_REGEX = /^Error:?\s*\n/; - - if (stack && message && !stack.includes(message)) { - return message + stack.replace(ERROR_REGEX, '\n'); - } - - return stack; - } - - _extractSpecResults(specResult, ancestorTitles) { - const start = this._startTimes.get(specResult.id); - - const duration = start ? jestNow() - start : undefined; - const status = - specResult.status === 'disabled' ? 'pending' : specResult.status; - const location = specResult.__callsite - ? { - column: specResult.__callsite.getColumnNumber(), - line: specResult.__callsite.getLineNumber() - } - : null; - const results = { - ancestorTitles, - duration, - failureMessages: [], - fullName: specResult.fullName, - location, - numPassingAsserts: 0, - // Jasmine2 only returns an array of failed asserts. - status, - title: specResult.description - }; - specResult.failedExpectations.forEach(failed => { - const message = - !failed.matcherName && failed.stack - ? this._addMissingMessageToStack(failed.stack, failed.message) - : failed.message || ''; - results.failureMessages.push(message); - }); - return results; - } -} - -exports.default = Jasmine2Reporter; diff --git a/node_modules/jest-jasmine2/build/setup_jest_globals.d.ts b/node_modules/jest-jasmine2/build/setup_jest_globals.d.ts deleted file mode 100644 index 85a87f98..00000000 --- a/node_modules/jest-jasmine2/build/setup_jest_globals.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { Plugin } from 'pretty-format'; -export declare type SetupOptions = { - config: Config.ProjectConfig; - globalConfig: Config.GlobalConfig; - localRequire: (moduleName: string) => Plugin; - testPath: Config.Path; -}; -declare const _default: ({ config, globalConfig, localRequire, testPath, }: SetupOptions) => import("jest-snapshot/build/State").default; -export default _default; -//# sourceMappingURL=setup_jest_globals.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/setup_jest_globals.d.ts.map b/node_modules/jest-jasmine2/build/setup_jest_globals.d.ts.map deleted file mode 100644 index 3fba2da1..00000000 --- a/node_modules/jest-jasmine2/build/setup_jest_globals.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"setup_jest_globals.d.ts","sourceRoot":"","sources":["../src/setup_jest_globals.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAS,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AAYrC,oBAAY,YAAY,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC;IAClC,YAAY,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7C,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;CACvB,CAAC;;AA6DF,wBA6BE"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/setup_jest_globals.js b/node_modules/jest-jasmine2/build/setup_jest_globals.js deleted file mode 100644 index 9f074cf3..00000000 --- a/node_modules/jest-jasmine2/build/setup_jest_globals.js +++ /dev/null @@ -1,117 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _expect = require('expect'); - -var _jestSnapshot = require('jest-snapshot'); - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// Get suppressed errors form jest-matchers that weren't throw during -// test execution and add them to the test result, potentially failing -// a passing test. -const addSuppressedErrors = result => { - const _getState = (0, _expect.getState)(), - suppressedErrors = _getState.suppressedErrors; - - (0, _expect.setState)({ - suppressedErrors: [] - }); - - if (suppressedErrors.length) { - result.status = 'failed'; - result.failedExpectations = suppressedErrors.map(error => ({ - actual: '', - // passing error for custom test reporters - error, - expected: '', - matcherName: '', - message: error.message, - passed: false, - stack: error.stack - })); - } -}; - -const addAssertionErrors = result => { - const assertionErrors = (0, _expect.extractExpectedAssertionsErrors)(); - - if (assertionErrors.length) { - const jasmineErrors = assertionErrors.map(({actual, error, expected}) => ({ - actual, - expected, - message: error.stack, - passed: false - })); - result.status = 'failed'; - result.failedExpectations = result.failedExpectations.concat(jasmineErrors); - } -}; - -const patchJasmine = () => { - global.jasmine.Spec = (realSpec => { - class Spec extends realSpec { - constructor(attr) { - const resultCallback = attr.resultCallback; - - attr.resultCallback = function(result) { - addSuppressedErrors(result); - addAssertionErrors(result); - resultCallback.call(attr, result); - }; - - const onStart = attr.onStart; - - attr.onStart = context => { - (0, _expect.setState)({ - currentTestName: context.getFullName() - }); - onStart && onStart.call(attr, context); - }; - - super(attr); - } - } - - return Spec; - })(global.jasmine.Spec); -}; - -var _default = ({config, globalConfig, localRequire, testPath}) => { - // Jest tests snapshotSerializers in order preceding built-in serializers. - // Therefore, add in reverse because the last added is the first tested. - config.snapshotSerializers - .concat() - .reverse() - .forEach(path => { - (0, _jestSnapshot.addSerializer)(localRequire(path)); - }); - patchJasmine(); - const expand = globalConfig.expand, - updateSnapshot = globalConfig.updateSnapshot; - const snapshotResolver = (0, _jestSnapshot.buildSnapshotResolver)(config); - const snapshotPath = snapshotResolver.resolveSnapshotPath(testPath); - const snapshotState = new _jestSnapshot.SnapshotState(snapshotPath, { - expand, - getBabelTraverse: () => require('@babel/traverse').default, - getPrettier: () => - config.prettierPath ? require(config.prettierPath) : null, - updateSnapshot - }); - (0, _expect.setState)({ - snapshotState, - testPath - }); // Return it back to the outer scope (test runner outside the VM). - - return snapshotState; -}; - -exports.default = _default; diff --git a/node_modules/jest-jasmine2/build/treeProcessor.d.ts b/node_modules/jest-jasmine2/build/treeProcessor.d.ts deleted file mode 100644 index c5150acc..00000000 --- a/node_modules/jest-jasmine2/build/treeProcessor.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import Suite from './jasmine/Suite'; -declare type Options = { - nodeComplete: (suite: TreeNode) => void; - nodeStart: (suite: TreeNode) => void; - queueRunnerFactory: any; - runnableIds: Array; - tree: TreeNode; -}; -export declare type TreeNode = { - afterAllFns: Array; - beforeAllFns: Array; - disabled?: boolean; - execute: (onComplete: () => void, enabled: boolean) => void; - id: string; - onException: (error: Error) => void; - sharedUserContext: () => any; - children?: Array; -} & Pick; -export default function treeProcessor(options: Options): void; -export {}; -//# sourceMappingURL=treeProcessor.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/treeProcessor.d.ts.map b/node_modules/jest-jasmine2/build/treeProcessor.d.ts.map deleted file mode 100644 index 7bead82f..00000000 --- a/node_modules/jest-jasmine2/build/treeProcessor.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"treeProcessor.d.ts","sourceRoot":"","sources":["../src/treeProcessor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,MAAM,iBAAiB,CAAC;AAEpC,aAAK,OAAO,GAAG;IACb,YAAY,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IACxC,SAAS,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IACrC,kBAAkB,EAAE,GAAG,CAAC;IACxB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACxB,YAAY,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,IAAI,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACpC,iBAAiB,EAAE,MAAM,GAAG,CAAC;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;CAC5B,GAAG,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,aAAa,GAAG,QAAQ,CAAC,CAAC;AAExD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,OAAO,EAAE,OAAO,QA6DrD"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/treeProcessor.js b/node_modules/jest-jasmine2/build/treeProcessor.js deleted file mode 100644 index b8983fab..00000000 --- a/node_modules/jest-jasmine2/build/treeProcessor.js +++ /dev/null @@ -1,123 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = treeProcessor; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function treeProcessor(options) { - const nodeComplete = options.nodeComplete, - nodeStart = options.nodeStart, - queueRunnerFactory = options.queueRunnerFactory, - runnableIds = options.runnableIds, - tree = options.tree; - - function isEnabled(node, parentEnabled) { - return parentEnabled || runnableIds.indexOf(node.id) !== -1; - } - - function getNodeHandler(node, parentEnabled) { - const enabled = isEnabled(node, parentEnabled); - return node.children - ? getNodeWithChildrenHandler(node, enabled) - : getNodeWithoutChildrenHandler(node, enabled); - } - - function getNodeWithoutChildrenHandler(node, enabled) { - return function fn(done = () => {}) { - node.execute(done, enabled); - }; - } - - function getNodeWithChildrenHandler(node, enabled) { - return ( - /*#__PURE__*/ - (function() { - var _fn = _asyncToGenerator(function*(done = () => {}) { - nodeStart(node); - yield queueRunnerFactory({ - onException: error => node.onException(error), - queueableFns: wrapChildren(node, enabled), - userContext: node.sharedUserContext() - }); - nodeComplete(node); - done(); - }); - - function fn() { - return _fn.apply(this, arguments); - } - - return fn; - })() - ); - } - - function hasEnabledTest(node) { - if (node.children) { - return node.children.some(hasEnabledTest); - } - - return !node.disabled; - } - - function wrapChildren(node, enabled) { - if (!node.children) { - throw new Error('`node.children` is not defined.'); - } - - const children = node.children.map(child => ({ - fn: getNodeHandler(child, enabled) - })); - - if (!hasEnabledTest(node)) { - return children; - } - - return node.beforeAllFns.concat(children).concat(node.afterAllFns); - } - - const treeHandler = getNodeHandler(tree, false); - return treeHandler(); -} diff --git a/node_modules/jest-jasmine2/build/types.d.ts b/node_modules/jest-jasmine2/build/types.d.ts deleted file mode 100644 index 5d0ea5a9..00000000 --- a/node_modules/jest-jasmine2/build/types.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { AssertionError } from 'assert'; -import { Config } from '@jest/types'; -import expect from 'expect'; -import Spec, { SpecResult } from './jasmine/Spec'; -import JsApiReporter from './jasmine/JsApiReporter'; -import Timer from './jasmine/Timer'; -import Env from './jasmine/Env'; -import createSpy from './jasmine/createSpy'; -import ReportDispatcher from './jasmine/ReportDispatcher'; -import SpyRegistry from './jasmine/spyRegistry'; -import Suite, { SuiteResult } from './jasmine/Suite'; -import SpyStrategy from './jasmine/SpyStrategy'; -import CallTracker from './jasmine/CallTracker'; -export interface AssertionErrorWithStack extends AssertionError { - stack: string; -} -export declare type SyncExpectationResult = { - pass: boolean; - message: () => string; -}; -export declare type AsyncExpectationResult = Promise; -export declare type ExpectationResult = SyncExpectationResult | AsyncExpectationResult; -export declare type RawMatcherFn = (expected: any, actual: any, options?: any) => ExpectationResult; -export declare type RunDetails = { - totalSpecsDefined?: number; - failedExpectations?: SuiteResult['failedExpectations']; -}; -export declare type Reporter = { - jasmineDone: (runDetails: RunDetails) => void; - jasmineStarted: (runDetails: RunDetails) => void; - specDone: (result: SpecResult) => void; - specStarted: (spec: SpecResult) => void; - suiteDone: (result: SuiteResult) => void; - suiteStarted: (result: SuiteResult) => void; -}; -export interface Spy extends Record { - (this: Record, ...args: Array): unknown; - and: SpyStrategy; - calls: CallTracker; - restoreObjectToOriginalState?: () => void; -} -export declare type Jasmine = { - _DEFAULT_TIMEOUT_INTERVAL: number; - DEFAULT_TIMEOUT_INTERVAL: number; - currentEnv_: ReturnType['prototype']; - getEnv: (options?: object) => ReturnType['prototype']; - createSpy: typeof createSpy; - Env: ReturnType; - JsApiReporter: typeof JsApiReporter; - ReportDispatcher: typeof ReportDispatcher; - Spec: typeof Spec; - SpyRegistry: typeof SpyRegistry; - Suite: typeof Suite; - Timer: typeof Timer; - version: string; - testPath: Config.Path; - addMatchers: Function; -} & typeof expect & NodeJS.Global; -declare global { - module NodeJS { - interface Global { - expect: typeof expect; - } - } -} -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/types.d.ts.map b/node_modules/jest-jasmine2/build/types.d.ts.map deleted file mode 100644 index 099418a8..00000000 --- a/node_modules/jest-jasmine2/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,cAAc,EAAC,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,IAAI,EAAE,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,aAAa,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAC5C,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAC1D,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,EAAE,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AACnD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAEhD,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC7D,KAAK,EAAE,MAAM,CAAC;CACf;AAKD,oBAAY,qBAAqB,GAAG;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,sBAAsB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAEpE,oBAAY,iBAAiB,GAAG,qBAAqB,GAAG,sBAAsB,CAAC;AAE/E,oBAAY,YAAY,GAAG,CACzB,QAAQ,EAAE,GAAG,EACb,MAAM,EAAE,GAAG,EACX,OAAO,CAAC,EAAE,GAAG,KACV,iBAAiB,CAAC;AAGvB,oBAAY,UAAU,GAAG;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,WAAW,CAAC,oBAAoB,CAAC,CAAC;CACxD,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,WAAW,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAC9C,cAAc,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IACjD,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACvC,WAAW,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACxC,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,YAAY,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,MAAM,WAAW,GAAI,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAC9C,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;IAC9D,GAAG,EAAE,WAAW,CAAC;IACjB,KAAK,EAAE,WAAW,CAAC;IACnB,4BAA4B,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3C;AAED,oBAAY,OAAO,GAAG;IACpB,yBAAyB,EAAE,MAAM,CAAC;IAClC,wBAAwB,EAAE,MAAM,CAAC;IACjC,WAAW,EAAE,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC;IACjD,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC;IAClE,SAAS,EAAE,OAAO,SAAS,CAAC;IAC5B,GAAG,EAAE,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC;IAC5B,aAAa,EAAE,OAAO,aAAa,CAAC;IACpC,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;IAC1C,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,WAAW,EAAE,OAAO,WAAW,CAAC;IAChC,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;IACtB,WAAW,EAAE,QAAQ,CAAC;CACvB,GAAG,OAAO,MAAM,GACf,MAAM,CAAC,MAAM,CAAC;AAEhB,OAAO,CAAC,MAAM,CAAC;IACb,OAAO,MAAM,CAAC;QACZ,UAAU,MAAM;YACd,MAAM,EAAE,OAAO,MAAM,CAAC;SACvB;KACF;CACF"} \ No newline at end of file diff --git a/node_modules/jest-jasmine2/build/types.js b/node_modules/jest-jasmine2/build/types.js deleted file mode 100644 index 72ee1adf..00000000 --- a/node_modules/jest-jasmine2/build/types.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -var _expect = _interopRequireDefault(require('expect')); - -var _Spec = _interopRequireDefault(require('./jasmine/Spec')); - -var _JsApiReporter = _interopRequireDefault(require('./jasmine/JsApiReporter')); - -var _Timer = _interopRequireDefault(require('./jasmine/Timer')); - -var _Env = _interopRequireDefault(require('./jasmine/Env')); - -var _createSpy = _interopRequireDefault(require('./jasmine/createSpy')); - -var _ReportDispatcher = _interopRequireDefault( - require('./jasmine/ReportDispatcher') -); - -var _spyRegistry = _interopRequireDefault(require('./jasmine/spyRegistry')); - -var _Suite = _interopRequireDefault(require('./jasmine/Suite')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} diff --git a/node_modules/jest-jasmine2/package.json b/node_modules/jest-jasmine2/package.json deleted file mode 100644 index f67c43f9..00000000 --- a/node_modules/jest-jasmine2/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_args": [ - [ - "jest-jasmine2@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-jasmine2@24.9.0", - "_id": "jest-jasmine2@24.9.0", - "_inBundle": false, - "_integrity": "sha512-Cq7vkAgaYKp+PsX+2/JbTarrk0DmNhsEtqBXNwUHkdlbrTBLtMJINADf2mf5FkowNsq8evbPc07/qFO0AdKTzw==", - "_location": "/jest-jasmine2", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-jasmine2@24.9.0", - "name": "jest-jasmine2", - "escapedName": "jest-jasmine2", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/jest-config", - "/jest-runner" - ], - "_resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@babel/traverse": "^7.1.0", - "@jest/environment": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "chalk": "^2.0.1", - "co": "^4.6.0", - "expect": "^24.9.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^24.9.0", - "jest-matcher-utils": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-runtime": "^24.9.0", - "jest-snapshot": "^24.9.0", - "jest-util": "^24.9.0", - "pretty-format": "^24.9.0", - "throat": "^4.0.0" - }, - "devDependencies": { - "@types/babel__traverse": "^7.0.4" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-jasmine2", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-jasmine2" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-leak-detector/LICENSE b/node_modules/jest-leak-detector/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-leak-detector/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-leak-detector/README.md b/node_modules/jest-leak-detector/README.md deleted file mode 100644 index 6f14d869..00000000 --- a/node_modules/jest-leak-detector/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# jest-leak-detector - -Module for verifying whether an object has been garbage collected or not. - -Internally creates a weak reference to the object, and forces garbage collection to happen. If the reference is gone, it meant no one else was pointing to the object. - -## Example - -```javascript -let reference = {}; - -const detector = new LeakDetector(reference); - -// Reference is held in memory. -console.log(detector.isLeaking()); // true - -// We destroy the only reference to the object. -reference = null; - -// Reference is gone. -console.log(detector.isLeaking()); // false -``` diff --git a/node_modules/jest-leak-detector/build/index.d.ts b/node_modules/jest-leak-detector/build/index.d.ts deleted file mode 100644 index 7439bdd9..00000000 --- a/node_modules/jest-leak-detector/build/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default class { - private _isReferenceBeingHeld; - constructor(value: unknown); - isLeaking(): boolean; - private _runGarbageCollector; -} -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-leak-detector/build/index.d.ts.map b/node_modules/jest-leak-detector/build/index.d.ts.map deleted file mode 100644 index 6646b843..00000000 --- a/node_modules/jest-leak-detector/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,MAAM,CAAC,OAAO;IACZ,OAAO,CAAC,qBAAqB,CAAU;gBAE3B,KAAK,EAAE,OAAO;IAiC1B,SAAS,IAAI,OAAO;IAMpB,OAAO,CAAC,oBAAoB;CAY7B"} \ No newline at end of file diff --git a/node_modules/jest-leak-detector/build/index.js b/node_modules/jest-leak-detector/build/index.js deleted file mode 100644 index 473d5059..00000000 --- a/node_modules/jest-leak-detector/build/index.js +++ /dev/null @@ -1,124 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _v() { - const data = _interopRequireDefault(require('v8')); - - _v = function _v() { - return data; - }; - - return data; -} - -function _vm() { - const data = _interopRequireDefault(require('vm')); - - _vm = function _vm() { - return data; - }; - - return data; -} - -function _prettyFormat() { - const data = _interopRequireDefault(require('pretty-format')); - - _prettyFormat = function _prettyFormat() { - return data; - }; - - return data; -} - -function _jestGetType() { - const data = require('jest-get-type'); - - _jestGetType = function _jestGetType() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class _default { - constructor(value) { - _defineProperty(this, '_isReferenceBeingHeld', void 0); - - if ((0, _jestGetType().isPrimitive)(value)) { - throw new TypeError( - [ - 'Primitives cannot leak memory.', - 'You passed a ' + - typeof value + - ': <' + - (0, _prettyFormat().default)(value) + - '>' - ].join(' ') - ); - } - - let weak; - - try { - // eslint-disable-next-line import/no-extraneous-dependencies - weak = require('weak'); - } catch (err) { - if (!err || err.code !== 'MODULE_NOT_FOUND') { - throw err; - } - - throw new Error( - 'The leaking detection mechanism requires the "weak" package to be installed and work. ' + - 'Please install it as a dependency on your main project' - ); - } - - weak(value, () => (this._isReferenceBeingHeld = false)); - this._isReferenceBeingHeld = true; // Ensure value is not leaked by the closure created by the "weak" callback. - - value = null; - } - - isLeaking() { - this._runGarbageCollector(); - - return this._isReferenceBeingHeld; - } - - _runGarbageCollector() { - const isGarbageCollectorHidden = !global.gc; // GC is usually hidden, so we have to expose it before running. - - _v().default.setFlagsFromString('--expose-gc'); - - _vm().default.runInNewContext('gc')(); // The GC was not initially exposed, so let's hide it again. - - if (isGarbageCollectorHidden) { - _v().default.setFlagsFromString('--no-expose-gc'); - } - } -} - -exports.default = _default; diff --git a/node_modules/jest-leak-detector/package.json b/node_modules/jest-leak-detector/package.json deleted file mode 100644 index 73aaa637..00000000 --- a/node_modules/jest-leak-detector/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_args": [ - [ - "jest-leak-detector@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-leak-detector@24.9.0", - "_id": "jest-leak-detector@24.9.0", - "_inBundle": false, - "_integrity": "sha512-tYkFIDsiKTGwb2FG1w8hX9V0aUb2ot8zY/2nFg087dUageonw1zrLMP4W6zsRO59dPkTSKie+D4rhMuP9nRmrA==", - "_location": "/jest-leak-detector", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-leak-detector@24.9.0", - "name": "jest-leak-detector", - "escapedName": "jest-leak-detector", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/jest-runner" - ], - "_resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" - }, - "description": "Module for verifying whether an object has been garbage collected or not.", - "devDependencies": { - "@types/weak": "^1.0.0", - "weak": "^1.0.1" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-leak-detector", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-leak-detector" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-matcher-utils/LICENSE b/node_modules/jest-matcher-utils/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-matcher-utils/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-matcher-utils/build/index.d.ts b/node_modules/jest-matcher-utils/build/index.d.ts deleted file mode 100644 index 847b112d..00000000 --- a/node_modules/jest-matcher-utils/build/index.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { DiffOptions } from 'jest-diff'; -declare type MatcherHintColor = (arg: string) => string; -export declare type MatcherHintOptions = { - comment?: string; - expectedColor?: MatcherHintColor; - isDirectExpectCall?: boolean; - isNot?: boolean; - promise?: string; - receivedColor?: MatcherHintColor; - secondArgument?: string; - secondArgumentColor?: MatcherHintColor; -}; -export { DiffOptions }; -export declare const EXPECTED_COLOR: import("chalk").Chalk & { - supportsColor: import("chalk").ColorSupport; -}; -export declare const RECEIVED_COLOR: import("chalk").Chalk & { - supportsColor: import("chalk").ColorSupport; -}; -export declare const INVERTED_COLOR: import("chalk").Chalk & { - supportsColor: import("chalk").ColorSupport; -}; -export declare const BOLD_WEIGHT: import("chalk").Chalk & { - supportsColor: import("chalk").ColorSupport; -}; -export declare const DIM_COLOR: import("chalk").Chalk & { - supportsColor: import("chalk").ColorSupport; -}; -export declare const SUGGEST_TO_CONTAIN_EQUAL: string; -export declare const stringify: (object: unknown, maxDepth?: number) => string; -export declare const highlightTrailingWhitespace: (text: string) => string; -export declare const printReceived: (object: unknown) => string; -export declare const printExpected: (value: unknown) => string; -export declare const printWithType: (name: string, value: unknown, print: (value: unknown) => string) => string; -export declare const ensureNoExpected: (expected: unknown, matcherName: string, options?: MatcherHintOptions | undefined) => void; -export declare const ensureActualIsNumber: (actual: unknown, matcherName: string, options?: MatcherHintOptions | undefined) => void; -export declare const ensureExpectedIsNumber: (expected: unknown, matcherName: string, options?: MatcherHintOptions | undefined) => void; -export declare const ensureNumbers: (actual: unknown, expected: unknown, matcherName: string, options?: MatcherHintOptions | undefined) => void; -export declare const ensureExpectedIsNonNegativeInteger: (expected: unknown, matcherName: string, options?: MatcherHintOptions | undefined) => void; -export declare const printDiffOrStringify: (expected: unknown, received: unknown, expectedLabel: string, receivedLabel: string, expand: boolean) => string; -export declare const diff: (a: any, b: any, options?: import("jest-diff/build/types").DiffOptions | undefined) => string | null; -export declare const pluralize: (word: string, count: number) => string; -declare type PrintLabel = (string: string) => string; -export declare const getLabelPrinter: (...strings: string[]) => PrintLabel; -export declare const matcherErrorMessage: (hint: string, generic: string, specific: string) => string; -export declare const matcherHint: (matcherName: string, received?: string, expected?: string, options?: MatcherHintOptions) => string; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-matcher-utils/build/index.d.ts.map b/node_modules/jest-matcher-utils/build/index.d.ts.map deleted file mode 100644 index 2c11972a..00000000 --- a/node_modules/jest-matcher-utils/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAiB,EAAC,WAAW,EAAgB,MAAM,WAAW,CAAC;AAsB/D,aAAK,gBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;AAEhD,oBAAY,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,gBAAgB,CAAC;CACxC,CAAC;AAEF,OAAO,EAAC,WAAW,EAAC,CAAC;AAErB,eAAO,MAAM,cAAc;;CAAc,CAAC;AAC1C,eAAO,MAAM,cAAc;;CAAY,CAAC;AACxC,eAAO,MAAM,cAAc;;CAAgB,CAAC;AAC5C,eAAO,MAAM,WAAW;;CAAa,CAAC;AACtC,eAAO,MAAM,SAAS;;CAAY,CAAC;AAsBnC,eAAO,MAAM,wBAAwB,QAEpC,CAAC;AAEF,eAAO,MAAM,SAAS,gDAsBrB,CAAC;AAEF,eAAO,MAAM,2BAA2B,0BACK,CAAC;AAO9C,eAAO,MAAM,aAAa,6BACgC,CAAC;AAC3D,eAAO,MAAM,aAAa,4BAC+B,CAAC;AAE1D,eAAO,MAAM,aAAa,6EAYzB,CAAC;AAEF,eAAO,MAAM,gBAAgB,4FAkB5B,CAAC;AAEF,eAAO,MAAM,oBAAoB,0FAgBhC,CAAC;AAEF,eAAO,MAAM,sBAAsB,4FAgBlC,CAAC;AAEF,eAAO,MAAM,aAAa,6GAQzB,CAAC;AAEF,eAAO,MAAM,kCAAkC,4FAoB9C,CAAC;AAoDF,eAAO,MAAM,oBAAoB,iHAoDhC,CAAC;AAeF,eAAO,MAAM,IAAI,sGACuC,CAAC;AAEzD,eAAO,MAAM,SAAS,yCAC6C,CAAC;AAOpE,aAAK,UAAU,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;AAE7C,eAAO,MAAM,eAAe,sCAM3B,CAAC;AAEF,eAAO,MAAM,mBAAmB,6DAI2C,CAAC;AAK5E,eAAO,MAAM,WAAW,qGA+DvB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-matcher-utils/build/index.js b/node_modules/jest-matcher-utils/build/index.js deleted file mode 100644 index dd45776a..00000000 --- a/node_modules/jest-matcher-utils/build/index.js +++ /dev/null @@ -1,477 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -Object.defineProperty(exports, 'DiffOptions', { - enumerable: true, - get: function get() { - return _jestDiff.DiffOptions; - } -}); -exports.matcherHint = exports.matcherErrorMessage = exports.getLabelPrinter = exports.pluralize = exports.diff = exports.printDiffOrStringify = exports.ensureExpectedIsNonNegativeInteger = exports.ensureNumbers = exports.ensureExpectedIsNumber = exports.ensureActualIsNumber = exports.ensureNoExpected = exports.printWithType = exports.printExpected = exports.printReceived = exports.highlightTrailingWhitespace = exports.stringify = exports.SUGGEST_TO_CONTAIN_EQUAL = exports.DIM_COLOR = exports.BOLD_WEIGHT = exports.INVERTED_COLOR = exports.RECEIVED_COLOR = exports.EXPECTED_COLOR = void 0; - -var _chalk = _interopRequireDefault(require('chalk')); - -var _jestDiff = _interopRequireWildcard(require('jest-diff')); - -var _jestGetType = _interopRequireWildcard(require('jest-get-type')); - -var _prettyFormat = _interopRequireDefault(require('pretty-format')); - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const _prettyFormat$plugins = _prettyFormat.default.plugins, - AsymmetricMatcher = _prettyFormat$plugins.AsymmetricMatcher, - DOMCollection = _prettyFormat$plugins.DOMCollection, - DOMElement = _prettyFormat$plugins.DOMElement, - Immutable = _prettyFormat$plugins.Immutable, - ReactElement = _prettyFormat$plugins.ReactElement, - ReactTestComponent = _prettyFormat$plugins.ReactTestComponent; -const PLUGINS = [ - ReactTestComponent, - ReactElement, - DOMElement, - DOMCollection, - Immutable, - AsymmetricMatcher -]; -const EXPECTED_COLOR = _chalk.default.green; -exports.EXPECTED_COLOR = EXPECTED_COLOR; -const RECEIVED_COLOR = _chalk.default.red; -exports.RECEIVED_COLOR = RECEIVED_COLOR; -const INVERTED_COLOR = _chalk.default.inverse; -exports.INVERTED_COLOR = INVERTED_COLOR; -const BOLD_WEIGHT = _chalk.default.bold; -exports.BOLD_WEIGHT = BOLD_WEIGHT; -const DIM_COLOR = _chalk.default.dim; -exports.DIM_COLOR = DIM_COLOR; -const MULTILINE_REGEXP = /\n/; -const SPACE_SYMBOL = '\u{00B7}'; // middle dot - -const NUMBERS = [ - 'zero', - 'one', - 'two', - 'three', - 'four', - 'five', - 'six', - 'seven', - 'eight', - 'nine', - 'ten', - 'eleven', - 'twelve', - 'thirteen' -]; - -const SUGGEST_TO_CONTAIN_EQUAL = _chalk.default.dim( - 'Looks like you wanted to test for object/array equality with the stricter `toContain` matcher. You probably need to use `toContainEqual` instead.' -); - -exports.SUGGEST_TO_CONTAIN_EQUAL = SUGGEST_TO_CONTAIN_EQUAL; - -const stringify = (object, maxDepth = 10) => { - const MAX_LENGTH = 10000; - let result; - - try { - result = (0, _prettyFormat.default)(object, { - maxDepth, - min: true, - plugins: PLUGINS - }); - } catch (e) { - result = (0, _prettyFormat.default)(object, { - callToJSON: false, - maxDepth, - min: true, - plugins: PLUGINS - }); - } - - return result.length >= MAX_LENGTH && maxDepth > 1 - ? stringify(object, Math.floor(maxDepth / 2)) - : result; -}; - -exports.stringify = stringify; - -const highlightTrailingWhitespace = text => - text.replace(/\s+$/gm, _chalk.default.inverse('$&')); // Instead of inverse highlight which now implies a change, -// replace common spaces with middle dot at the end of any line. - -exports.highlightTrailingWhitespace = highlightTrailingWhitespace; - -const replaceTrailingSpaces = text => - text.replace(/\s+$/gm, spaces => SPACE_SYMBOL.repeat(spaces.length)); - -const printReceived = object => - RECEIVED_COLOR(replaceTrailingSpaces(stringify(object))); - -exports.printReceived = printReceived; - -const printExpected = value => - EXPECTED_COLOR(replaceTrailingSpaces(stringify(value))); - -exports.printExpected = printExpected; - -const printWithType = ( - name, - value, - print // printExpected or printReceived -) => { - const type = (0, _jestGetType.default)(value); - const hasType = - type !== 'null' && type !== 'undefined' - ? `${name} has type: ${type}\n` - : ''; - const hasValue = `${name} has value: ${print(value)}`; - return hasType + hasValue; -}; - -exports.printWithType = printWithType; - -const ensureNoExpected = (expected, matcherName, options) => { - if (typeof expected !== 'undefined') { - // Prepend maybe not only for backward compatibility. - const matcherString = (options ? '' : '[.not]') + matcherName; - throw new Error( - matcherErrorMessage( - matcherHint(matcherString, undefined, '', options), // Because expected is omitted in hint above, - 'this matcher must not have an expected argument', - printWithType('Expected', expected, printExpected) - ) - ); - } -}; - -exports.ensureNoExpected = ensureNoExpected; - -const ensureActualIsNumber = (actual, matcherName, options) => { - if (typeof actual !== 'number') { - // Prepend maybe not only for backward compatibility. - const matcherString = (options ? '' : '[.not]') + matcherName; - throw new Error( - matcherErrorMessage( - matcherHint(matcherString, undefined, undefined, options), - `${RECEIVED_COLOR('received')} value must be a number`, - printWithType('Received', actual, printReceived) - ) - ); - } -}; - -exports.ensureActualIsNumber = ensureActualIsNumber; - -const ensureExpectedIsNumber = (expected, matcherName, options) => { - if (typeof expected !== 'number') { - // Prepend maybe not only for backward compatibility. - const matcherString = (options ? '' : '[.not]') + matcherName; - throw new Error( - matcherErrorMessage( - matcherHint(matcherString, undefined, undefined, options), - `${EXPECTED_COLOR('expected')} value must be a number`, - printWithType('Expected', expected, printExpected) - ) - ); - } -}; - -exports.ensureExpectedIsNumber = ensureExpectedIsNumber; - -const ensureNumbers = (actual, expected, matcherName, options) => { - ensureActualIsNumber(actual, matcherName, options); - ensureExpectedIsNumber(expected, matcherName, options); -}; - -exports.ensureNumbers = ensureNumbers; - -const ensureExpectedIsNonNegativeInteger = (expected, matcherName, options) => { - if ( - typeof expected !== 'number' || - !Number.isSafeInteger(expected) || - expected < 0 - ) { - // Prepend maybe not only for backward compatibility. - const matcherString = (options ? '' : '[.not]') + matcherName; - throw new Error( - matcherErrorMessage( - matcherHint(matcherString, undefined, undefined, options), - `${EXPECTED_COLOR('expected')} value must be a non-negative integer`, - printWithType('Expected', expected, printExpected) - ) - ); - } -}; - -exports.ensureExpectedIsNonNegativeInteger = ensureExpectedIsNonNegativeInteger; - -const isLineDiffable = (expected, received) => { - const expectedType = (0, _jestGetType.default)(expected); - const receivedType = (0, _jestGetType.default)(received); - - if (expectedType !== receivedType) { - return false; - } - - if ((0, _jestGetType.isPrimitive)(expected)) { - // Print generic line diff for strings only: - // * if neither string is empty - return ( - typeof expected === 'string' && - typeof received === 'string' && - expected.length !== 0 && - received.length !== 0 && - (MULTILINE_REGEXP.test(expected) || MULTILINE_REGEXP.test(received)) - ); - } - - if ( - expectedType === 'date' || - expectedType === 'function' || - expectedType === 'regexp' - ) { - return false; - } - - if (expected instanceof Error && received instanceof Error) { - return false; - } - - if ( - expectedType === 'object' && - typeof expected.asymmetricMatch === 'function' - ) { - return false; - } - - if ( - receivedType === 'object' && - typeof received.asymmetricMatch === 'function' - ) { - return false; - } - - return true; -}; - -const printDiffOrStringify = ( - expected, - received, - expectedLabel, - receivedLabel, - expand -) => { - if (typeof expected === 'string' && typeof received === 'string') { - const result = (0, _jestDiff.getStringDiff)(expected, received, { - aAnnotation: expectedLabel, - bAnnotation: receivedLabel, - expand - }); - - if (result !== null) { - if (result.isMultiline) { - return result.annotatedDiff; - } - - const printLabel = getLabelPrinter(expectedLabel, receivedLabel); - const expectedLine = printLabel(expectedLabel) + printExpected(result.a); - const receivedLine = printLabel(receivedLabel) + printReceived(result.b); - return expectedLine + '\n' + receivedLine; - } - } - - if (isLineDiffable(expected, received)) { - const difference = (0, _jestDiff.default)(expected, received, { - aAnnotation: expectedLabel, - bAnnotation: receivedLabel, - expand - }); - - if ( - typeof difference === 'string' && - difference.includes('- ' + expectedLabel) && - difference.includes('+ ' + receivedLabel) - ) { - return difference; - } - } - - const printLabel = getLabelPrinter(expectedLabel, receivedLabel); - const expectedLine = printLabel(expectedLabel) + printExpected(expected); - const receivedLine = - printLabel(receivedLabel) + - (stringify(expected) === stringify(received) - ? 'serializes to the same string' - : printReceived(received)); - return expectedLine + '\n' + receivedLine; -}; // Sometimes, e.g. when comparing two numbers, the output from jest-diff -// does not contain more information than the `Expected:` / `Received:` already gives. -// In those cases, we do not print a diff to make the output shorter and not redundant. - -exports.printDiffOrStringify = printDiffOrStringify; - -const shouldPrintDiff = (actual, expected) => { - if (typeof actual === 'number' && typeof expected === 'number') { - return false; - } - - if (typeof actual === 'boolean' && typeof expected === 'boolean') { - return false; - } - - return true; -}; - -const diff = (a, b, options) => - shouldPrintDiff(a, b) ? (0, _jestDiff.default)(a, b, options) : null; - -exports.diff = diff; - -const pluralize = (word, count) => - (NUMBERS[count] || count) + ' ' + word + (count === 1 ? '' : 's'); // To display lines of labeled values as two columns with monospace alignment: -// given the strings which will describe the values, -// return function which given each string, returns the label: -// string, colon, space, and enough padding spaces to align the value. - -exports.pluralize = pluralize; - -const getLabelPrinter = (...strings) => { - const maxLength = strings.reduce( - (max, string) => (string.length > max ? string.length : max), - 0 - ); - return string => `${string}: ${' '.repeat(maxLength - string.length)}`; -}; - -exports.getLabelPrinter = getLabelPrinter; - -const matcherErrorMessage = ( - hint, - generic, - specific // incorrect value returned from call to printWithType -) => - `${hint}\n\n${_chalk.default.bold( - 'Matcher error' - )}: ${generic}\n\n${specific}`; // Display assertion for the report when a test fails. -// New format: rejects/resolves, not, and matcher name have black color -// Old format: matcher name has dim color - -exports.matcherErrorMessage = matcherErrorMessage; - -const matcherHint = ( - matcherName, - received = 'received', - expected = 'expected', - options = {} -) => { - const _options$comment = options.comment, - comment = _options$comment === void 0 ? '' : _options$comment, - _options$expectedColo = options.expectedColor, - expectedColor = - _options$expectedColo === void 0 ? EXPECTED_COLOR : _options$expectedColo, - _options$isDirectExpe = options.isDirectExpectCall, - isDirectExpectCall = - _options$isDirectExpe === void 0 ? false : _options$isDirectExpe, - _options$isNot = options.isNot, - isNot = _options$isNot === void 0 ? false : _options$isNot, - _options$promise = options.promise, - promise = _options$promise === void 0 ? '' : _options$promise, - _options$receivedColo = options.receivedColor, - receivedColor = - _options$receivedColo === void 0 ? RECEIVED_COLOR : _options$receivedColo, - _options$secondArgume = options.secondArgument, - secondArgument = - _options$secondArgume === void 0 ? '' : _options$secondArgume, - _options$secondArgume2 = options.secondArgumentColor, - secondArgumentColor = - _options$secondArgume2 === void 0 - ? EXPECTED_COLOR - : _options$secondArgume2; - let hint = ''; - let dimString = 'expect'; // concatenate adjacent dim substrings - - if (!isDirectExpectCall && received !== '') { - hint += DIM_COLOR(dimString + '(') + receivedColor(received); - dimString = ')'; - } - - if (promise !== '') { - hint += DIM_COLOR(dimString + '.') + promise; - dimString = ''; - } - - if (isNot) { - hint += DIM_COLOR(dimString + '.') + 'not'; - dimString = ''; - } - - if (matcherName.includes('.')) { - // Old format: for backward compatibility, - // especially without promise or isNot options - dimString += matcherName; - } else { - // New format: omit period from matcherName arg - hint += DIM_COLOR(dimString + '.') + matcherName; - dimString = ''; - } - - if (expected === '') { - dimString += '()'; - } else { - hint += DIM_COLOR(dimString + '(') + expectedColor(expected); - - if (secondArgument) { - hint += DIM_COLOR(', ') + secondArgumentColor(secondArgument); - } - - dimString = ')'; - } - - if (comment !== '') { - dimString += ' // ' + comment; - } - - if (dimString !== '') { - hint += DIM_COLOR(dimString); - } - - return hint; -}; - -exports.matcherHint = matcherHint; diff --git a/node_modules/jest-matcher-utils/package.json b/node_modules/jest-matcher-utils/package.json deleted file mode 100644 index 699a0e2f..00000000 --- a/node_modules/jest-matcher-utils/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_args": [ - [ - "jest-matcher-utils@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-matcher-utils@24.9.0", - "_id": "jest-matcher-utils@24.9.0", - "_inBundle": false, - "_integrity": "sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA==", - "_location": "/jest-matcher-utils", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-matcher-utils@24.9.0", - "name": "jest-matcher-utils", - "escapedName": "jest-matcher-utils", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/expect", - "/jest-circus", - "/jest-jasmine2", - "/jest-snapshot" - ], - "_resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "chalk": "^2.0.1", - "jest-diff": "^24.9.0", - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" - }, - "description": "A set of utility functions for expect and related packages", - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-matcher-utils", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-matcher-utils" - }, - "version": "24.9.0" -} diff --git a/node_modules/jest-message-util/LICENSE b/node_modules/jest-message-util/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-message-util/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-message-util/build/index.d.ts b/node_modules/jest-message-util/build/index.d.ts deleted file mode 100644 index cb71d3b7..00000000 --- a/node_modules/jest-message-util/build/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { AssertionResult, SerializableError } from '@jest/test-result'; -import { Frame } from './types'; -export { Frame } from './types'; -export declare type StackTraceConfig = Pick; -export declare type StackTraceOptions = { - noStackTrace: boolean; -}; -export declare const formatExecError: (error: string | Error | SerializableError | undefined, config: Pick, options: StackTraceOptions, testPath?: string | undefined, reuseMessage?: boolean | undefined) => string; -export declare const getStackTraceLines: (stack: string, options?: StackTraceOptions) => string[]; -export declare const getTopFrame: (lines: string[]) => Frame | null; -export declare const formatStackTrace: (stack: string, config: Pick, options: StackTraceOptions, testPath?: string | undefined) => string; -export declare const formatResultsErrors: (testResults: AssertionResult[], config: Pick, options: StackTraceOptions, testPath?: string | undefined) => string | null; -export declare const separateMessageFromStack: (content: string) => { - message: string; - stack: string; -}; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-message-util/build/index.d.ts.map b/node_modules/jest-message-util/build/index.d.ts.map deleted file mode 100644 index 3122da04..00000000 --- a/node_modules/jest-message-util/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,eAAe,EAAE,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAMrE,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAgB9B,oBAAY,gBAAgB,GAAG,IAAI,CACjC,MAAM,CAAC,aAAa,EACpB,SAAS,GAAG,WAAW,CACxB,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAwDF,eAAO,MAAM,eAAe,+NAoD3B,CAAC;AA6EF,eAAO,MAAM,kBAAkB,0DAG4B,CAAC;AAE5D,eAAO,MAAM,WAAW,mCAcvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,mJAsC5B,CAAC;AAEF,eAAO,MAAM,mBAAmB,2KA8C/B,CAAC;AAeF,eAAO,MAAM,wBAAwB;;;CAmBpC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-message-util/build/index.js b/node_modules/jest-message-util/build/index.js deleted file mode 100644 index 9bb3e5e9..00000000 --- a/node_modules/jest-message-util/build/index.js +++ /dev/null @@ -1,401 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -Object.defineProperty(exports, 'Frame', { - enumerable: true, - get: function get() { - return _types.Frame; - } -}); -exports.separateMessageFromStack = exports.formatResultsErrors = exports.formatStackTrace = exports.getTopFrame = exports.getStackTraceLines = exports.formatExecError = void 0; - -var _fs = _interopRequireDefault(require('fs')); - -var _path = _interopRequireDefault(require('path')); - -var _chalk = _interopRequireDefault(require('chalk')); - -var _micromatch = _interopRequireDefault(require('micromatch')); - -var _slash = _interopRequireDefault(require('slash')); - -var _codeFrame = require('@babel/code-frame'); - -var _stackUtils = _interopRequireDefault(require('stack-utils')); - -var _types = require('./types'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; - -var jestReadFile = - global[Symbol.for('jest-native-read-file')] || _fs.default.readFileSync; - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -// stack utils tries to create pretty stack by making paths relative. -const stackUtils = new _stackUtils.default({ - cwd: 'something which does not exist' -}); -let nodeInternals = []; - -try { - nodeInternals = _stackUtils.default.nodeInternals(); -} catch (e) { - // `StackUtils.nodeInternals()` fails in browsers. We don't need to remove - // node internals in the browser though, so no issue. -} - -const PATH_NODE_MODULES = `${_path.default.sep}node_modules${_path.default.sep}`; -const PATH_JEST_PACKAGES = `${_path.default.sep}jest${_path.default.sep}packages${_path.default.sep}`; // filter for noisy stack trace lines - -const JASMINE_IGNORE = /^\s+at(?:(?:.jasmine\-)|\s+jasmine\.buildExpectationResult)/; -const JEST_INTERNALS_IGNORE = /^\s+at.*?jest(-.*?)?(\/|\\)(build|node_modules|packages)(\/|\\)/; -const ANONYMOUS_FN_IGNORE = /^\s+at .*$/; -const ANONYMOUS_PROMISE_IGNORE = /^\s+at (new )?Promise \(\).*$/; -const ANONYMOUS_GENERATOR_IGNORE = /^\s+at Generator.next \(\).*$/; -const NATIVE_NEXT_IGNORE = /^\s+at next \(native\).*$/; -const TITLE_INDENT = ' '; -const MESSAGE_INDENT = ' '; -const STACK_INDENT = ' '; -const ANCESTRY_SEPARATOR = ' \u203A '; - -const TITLE_BULLET = _chalk.default.bold('\u25cf '); - -const STACK_TRACE_COLOR = _chalk.default.dim; -const STACK_PATH_REGEXP = /\s*at.*\(?(\:\d*\:\d*|native)\)?/; -const EXEC_ERROR_MESSAGE = 'Test suite failed to run'; -const NOT_EMPTY_LINE_REGEXP = /^(?!$)/gm; - -const indentAllLines = (lines, indent) => - lines.replace(NOT_EMPTY_LINE_REGEXP, indent); - -const trim = string => (string || '').trim(); // Some errors contain not only line numbers in stack traces -// e.g. SyntaxErrors can contain snippets of code, and we don't -// want to trim those, because they may have pointers to the column/character -// which will get misaligned. - -const trimPaths = string => - string.match(STACK_PATH_REGEXP) ? trim(string) : string; - -const getRenderedCallsite = (fileContent, line, column) => { - let renderedCallsite = (0, _codeFrame.codeFrameColumns)( - fileContent, - { - start: { - column, - line - } - }, - { - highlightCode: true - } - ); - renderedCallsite = indentAllLines(renderedCallsite, MESSAGE_INDENT); - renderedCallsite = `\n${renderedCallsite}\n`; - return renderedCallsite; -}; - -const blankStringRegexp = /^\s*$/; // ExecError is an error thrown outside of the test suite (not inside an `it` or -// `before/after each` hooks). If it's thrown, none of the tests in the file -// are executed. - -const formatExecError = (error, config, options, testPath, reuseMessage) => { - if (!error || typeof error === 'number') { - error = new Error(`Expected an Error, but "${String(error)}" was thrown`); - error.stack = ''; - } - - let message, stack; - - if (typeof error === 'string' || !error) { - error || (error = 'EMPTY ERROR'); - message = ''; - stack = error; - } else { - message = error.message; - stack = error.stack; - } - - const separated = separateMessageFromStack(stack || ''); - stack = separated.stack; - - if (separated.message.includes(trim(message))) { - // Often stack trace already contains the duplicate of the message - message = separated.message; - } - - message = indentAllLines(message, MESSAGE_INDENT); - stack = - stack && !options.noStackTrace - ? '\n' + formatStackTrace(stack, config, options, testPath) - : ''; - - if (blankStringRegexp.test(message) && blankStringRegexp.test(stack)) { - // this can happen if an empty object is thrown. - message = MESSAGE_INDENT + 'Error: No message was provided'; - } - - let messageToUse; - - if (reuseMessage) { - messageToUse = ` ${message.trim()}`; - } else { - messageToUse = `${EXEC_ERROR_MESSAGE}\n\n${message}`; - } - - return TITLE_INDENT + TITLE_BULLET + messageToUse + stack + '\n'; -}; - -exports.formatExecError = formatExecError; - -const removeInternalStackEntries = (lines, options) => { - let pathCounter = 0; - return lines.filter(line => { - if (ANONYMOUS_FN_IGNORE.test(line)) { - return false; - } - - if (ANONYMOUS_PROMISE_IGNORE.test(line)) { - return false; - } - - if (ANONYMOUS_GENERATOR_IGNORE.test(line)) { - return false; - } - - if (NATIVE_NEXT_IGNORE.test(line)) { - return false; - } - - if (nodeInternals.some(internal => internal.test(line))) { - return false; - } - - if (!STACK_PATH_REGEXP.test(line)) { - return true; - } - - if (JASMINE_IGNORE.test(line)) { - return false; - } - - if (++pathCounter === 1) { - return true; // always keep the first line even if it's from Jest - } - - if (options.noStackTrace) { - return false; - } - - if (JEST_INTERNALS_IGNORE.test(line)) { - return false; - } - - return true; - }); -}; - -const formatPaths = (config, relativeTestPath, line) => { - // Extract the file path from the trace line. - const match = line.match(/(^\s*at .*?\(?)([^()]+)(:[0-9]+:[0-9]+\)?.*$)/); - - if (!match) { - return line; - } - - let filePath = (0, _slash.default)( - _path.default.relative(config.rootDir, match[2]) - ); // highlight paths from the current test file - - if ( - (config.testMatch && - config.testMatch.length && - _micromatch.default.some(filePath, config.testMatch)) || - filePath === relativeTestPath - ) { - filePath = _chalk.default.reset.cyan(filePath); - } - - return STACK_TRACE_COLOR(match[1]) + filePath + STACK_TRACE_COLOR(match[3]); -}; - -const getStackTraceLines = ( - stack, - options = { - noStackTrace: false - } -) => removeInternalStackEntries(stack.split(/\n/), options); - -exports.getStackTraceLines = getStackTraceLines; - -const getTopFrame = lines => { - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = lines[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const line = _step.value; - - if ( - line.includes(PATH_NODE_MODULES) || - line.includes(PATH_JEST_PACKAGES) - ) { - continue; - } - - const parsedFrame = stackUtils.parseLine(line.trim()); - - if (parsedFrame && parsedFrame.file) { - return parsedFrame; - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - return null; -}; - -exports.getTopFrame = getTopFrame; - -const formatStackTrace = (stack, config, options, testPath) => { - const lines = getStackTraceLines(stack, options); - const topFrame = getTopFrame(lines); - let renderedCallsite = ''; - const relativeTestPath = testPath - ? (0, _slash.default)(_path.default.relative(config.rootDir, testPath)) - : null; - - if (topFrame) { - const column = topFrame.column, - filename = topFrame.file, - line = topFrame.line; - - if (line && filename && _path.default.isAbsolute(filename)) { - let fileContent; - - try { - // TODO: check & read HasteFS instead of reading the filesystem: - // see: https://github.com/facebook/jest/pull/5405#discussion_r164281696 - fileContent = jestReadFile(filename, 'utf8'); - renderedCallsite = getRenderedCallsite(fileContent, line, column); - } catch (e) { - // the file does not exist or is inaccessible, we ignore - } - } - } - - const stacktrace = lines - .filter(Boolean) - .map( - line => - STACK_INDENT + formatPaths(config, relativeTestPath, trimPaths(line)) - ) - .join('\n'); - return `${renderedCallsite}\n${stacktrace}`; -}; - -exports.formatStackTrace = formatStackTrace; - -const formatResultsErrors = (testResults, config, options, testPath) => { - const failedResults = testResults.reduce((errors, result) => { - result.failureMessages.forEach(content => - errors.push({ - content, - result - }) - ); - return errors; - }, []); - - if (!failedResults.length) { - return null; - } - - return failedResults - .map(({result, content}) => { - let _separateMessageFromS = separateMessageFromStack(content), - message = _separateMessageFromS.message, - stack = _separateMessageFromS.stack; - - stack = options.noStackTrace - ? '' - : STACK_TRACE_COLOR( - formatStackTrace(stack, config, options, testPath) - ) + '\n'; - message = indentAllLines(message, MESSAGE_INDENT); - const title = - _chalk.default.bold.red( - TITLE_INDENT + - TITLE_BULLET + - result.ancestorTitles.join(ANCESTRY_SEPARATOR) + - (result.ancestorTitles.length ? ANCESTRY_SEPARATOR : '') + - result.title - ) + '\n'; - return title + '\n' + message + '\n' + stack; - }) - .join('\n'); -}; - -exports.formatResultsErrors = formatResultsErrors; -const errorRegexp = /^Error:?\s*$/; - -const removeBlankErrorLine = str => - str - .split('\n') // Lines saying just `Error:` are useless - .filter(line => !errorRegexp.test(line)) - .join('\n') - .trimRight(); // jasmine and worker farm sometimes don't give us access to the actual -// Error object, so we have to regexp out the message from the stack string -// to format it. - -const separateMessageFromStack = content => { - if (!content) { - return { - message: '', - stack: '' - }; - } // All lines up to what looks like a stack -- or if nothing looks like a stack - // (maybe it's a code frame instead), just the first non-empty line. - // If the error is a plain "Error:" instead of a SyntaxError or TypeError we - // remove the prefix from the message because it is generally not useful. - - const messageMatch = content.match( - /^(?:Error: )?([\s\S]*?(?=\n\s*at\s.*:\d*:\d*)|\s*.*)([\s\S]*)$/ - ); - - if (!messageMatch) { - // For typescript - throw new Error('If you hit this error, the regex above is buggy.'); - } - - const message = removeBlankErrorLine(messageMatch[1]); - const stack = removeBlankErrorLine(messageMatch[2]); - return { - message, - stack - }; -}; - -exports.separateMessageFromStack = separateMessageFromStack; diff --git a/node_modules/jest-message-util/build/types.d.ts b/node_modules/jest-message-util/build/types.d.ts deleted file mode 100644 index 37e2ca43..00000000 --- a/node_modules/jest-message-util/build/types.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { StackData } from 'stack-utils'; -export interface Frame extends StackData { - file: string; -} -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-message-util/build/types.d.ts.map b/node_modules/jest-message-util/build/types.d.ts.map deleted file mode 100644 index 9a114dc8..00000000 --- a/node_modules/jest-message-util/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,MAAM,WAAW,KAAM,SAAQ,SAAS;IACtC,IAAI,EAAE,MAAM,CAAC;CACd"} \ No newline at end of file diff --git a/node_modules/jest-message-util/build/types.js b/node_modules/jest-message-util/build/types.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/jest-message-util/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/jest-message-util/node_modules/slash/index.js b/node_modules/jest-message-util/node_modules/slash/index.js deleted file mode 100644 index 75d72501..00000000 --- a/node_modules/jest-message-util/node_modules/slash/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -module.exports = input => { - const isExtendedLengthPath = /^\\\\\?\\/.test(input); - const hasNonAscii = /[^\u0000-\u0080]+/.test(input); // eslint-disable-line no-control-regex - - if (isExtendedLengthPath || hasNonAscii) { - return input; - } - - return input.replace(/\\/g, '/'); -}; diff --git a/node_modules/jest-message-util/node_modules/slash/license b/node_modules/jest-message-util/node_modules/slash/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/jest-message-util/node_modules/slash/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/jest-message-util/node_modules/slash/package.json b/node_modules/jest-message-util/node_modules/slash/package.json deleted file mode 100644 index a9bd487a..00000000 --- a/node_modules/jest-message-util/node_modules/slash/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "slash@2.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "slash@2.0.0", - "_id": "slash@2.0.0", - "_inBundle": false, - "_integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "_location": "/jest-message-util/slash", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "slash@2.0.0", - "name": "slash", - "escapedName": "slash", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/jest-message-util" - ], - "_resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/slash/issues" - }, - "description": "Convert Windows backslash paths to slash paths", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/slash#readme", - "keywords": [ - "path", - "seperator", - "sep", - "slash", - "backslash", - "windows", - "win" - ], - "license": "MIT", - "name": "slash", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/slash.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0" -} diff --git a/node_modules/jest-message-util/node_modules/slash/readme.md b/node_modules/jest-message-util/node_modules/slash/readme.md deleted file mode 100644 index 5e2fedbc..00000000 --- a/node_modules/jest-message-util/node_modules/slash/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# slash [![Build Status](https://travis-ci.org/sindresorhus/slash.svg?branch=master)](https://travis-ci.org/sindresorhus/slash) - -> Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar` - -[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters. - -This was created since the `path` methods in Node outputs `\\` paths on Windows. - - -## Install - -``` -$ npm install slash -``` - - -## Usage - -```js -const path = require('path'); -const slash = require('slash'); - -const str = path.join('foo', 'bar'); -// Unix => foo/bar -// Windows => foo\\bar - -slash(str); -// Unix => foo/bar -// Windows => foo/bar -``` - - -## API - -### slash(path) - -Type: `string` - -Accepts a Windows backslash path and returns a slash path. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/jest-message-util/package.json b/node_modules/jest-message-util/package.json deleted file mode 100644 index 5f89f061..00000000 --- a/node_modules/jest-message-util/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_args": [ - [ - "jest-message-util@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-message-util@24.9.0", - "_id": "jest-message-util@24.9.0", - "_inBundle": false, - "_integrity": "sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw==", - "_location": "/jest-message-util", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-message-util@24.9.0", - "name": "jest-message-util", - "escapedName": "jest-message-util", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core", - "/@jest/fake-timers", - "/expect", - "/jest-circus", - "/jest-jasmine2", - "/jest-runner", - "/jest-runtime", - "/jest-snapshot" - ], - "_resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "@types/stack-utils": "^1.0.1", - "chalk": "^2.0.1", - "micromatch": "^3.1.10", - "slash": "^2.0.0", - "stack-utils": "^1.0.1" - }, - "devDependencies": { - "@types/babel__code-frame": "^7.0.0", - "@types/micromatch": "^3.1.0", - "@types/slash": "^2.0.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-message-util", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-message-util" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-mock/LICENSE b/node_modules/jest-mock/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-mock/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-mock/README.md b/node_modules/jest-mock/README.md deleted file mode 100644 index 6ac96ee2..00000000 --- a/node_modules/jest-mock/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# jest-mock - -## API - -### `constructor(global)` - -Creates a new module mocker that generates mocks as if they were created in an environment with the given global object. - -### `generateFromMetadata(metadata)` - -Generates a mock based on the given metadata (Metadata for the mock in the schema returned by the getMetadata method of this module). Mocks treat functions specially, and all mock functions have additional members, described in the documentation for `fn` in this module. - -One important note: function prototypes are handled specially by this mocking framework. For functions with prototypes, when called as a constructor, the mock will install mocked function members on the instance. This allows different instances of the same constructor to have different values for its mocks member and its return values. - -### `getMetadata(component)` - -Inspects the argument and returns its schema in the following recursive format: - -``` -{ - type: ... - members: {} -} -``` - -Where type is one of `array`, `object`, `function`, or `ref`, and members is an optional dictionary where the keys are member names and the values are metadata objects. Function prototypes are defined simply by defining metadata for the `member.prototype` of the function. The type of a function prototype should always be `object`. For instance, a simple class might be defined like this: - -```js -const classDef = { - type: 'function', - members: { - staticMethod: {type: 'function'}, - prototype: { - type: 'object', - members: { - instanceMethod: {type: 'function'}, - }, - }, - }, -}; -``` - -Metadata may also contain references to other objects defined within the same metadata object. The metadata for the referent must be marked with `refID` key and an arbitrary value. The referrer must be marked with a `ref` key that has the same value as object with refID that it refers to. For instance, this metadata blob: - -```js -const refID = { - type: 'object', - refID: 1, - members: { - self: {ref: 1}, - }, -}; -``` - -defines an object with a slot named `self` that refers back to the object. - -### `fn` - -Generates a stand-alone function with members that help drive unit tests or confirm expectations. Specifically, functions returned by this method have the following members: - -##### `.mock` - -An object with three members, `calls`, `instances` and `invocationCallOrder`, which are all lists. The items in the `calls` list are the arguments with which the function was called. The "instances" list stores the value of 'this' for each call to the function. This is useful for retrieving instances from a constructor. The `invocationCallOrder` lists the order in which the mock was called in relation to all mock calls, starting at 1. - -##### `.mockReturnValueOnce(value)` - -Pushes the given value onto a FIFO queue of return values for the function. - -##### `.mockReturnValue(value)` - -Sets the default return value for the function. - -##### `.mockImplementationOnce(function)` - -Pushes the given mock implementation onto a FIFO queue of mock implementations for the function. - -##### `.mockImplementation(function)` - -Sets the default mock implementation for the function. - -##### `.mockReturnThis()` - -Syntactic sugar for .mockImplementation(function() {return this;}) - -In case both `mockImplementationOnce()/mockImplementation()` and `mockReturnValueOnce()/mockReturnValue()` are called. The priority of which to use is based on what is the last call: - -- if the last call is mockReturnValueOnce() or mockReturnValue(), use the specific return value or default return value. If specific return values are used up or no default return value is set, fall back to try mockImplementation(); -- if the last call is mockImplementationOnce() or mockImplementation(), run the specific implementation and return the result or run default implementation and return the result. diff --git a/node_modules/jest-mock/build-es5/index.js b/node_modules/jest-mock/build-es5/index.js deleted file mode 100644 index b795e0da..00000000 --- a/node_modules/jest-mock/build-es5/index.js +++ /dev/null @@ -1,1000 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["jestMock"] = factory(); - else - root["jestMock"] = factory(); -})(window, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = "./packages/jest-mock/src/index.ts"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "./node_modules/webpack/buildin/global.js": -/*!***********************************!*\ - !*** (webpack)/buildin/global.js ***! - \***********************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -var g; // This works in non-strict mode - -g = function () { - return this; -}(); - -try { - // This works if eval is allowed (see CSP) - g = g || new Function("return this")(); -} catch (e) { - // This works if the window reference is available - if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === "object") g = window; -} // g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - - -module.exports = g; - -/***/ }), - -/***/ "./packages/jest-mock/src/index.ts": -/*!*****************************************!*\ - !*** ./packages/jest-mock/src/index.ts ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(global) { - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -/** - * Possible types of a MockFunctionResult. - * 'return': The call completed by returning normally. - * 'throw': The call completed by throwing a value. - * 'incomplete': The call has not completed yet. This is possible if you read - * the mock function result from within the mock function itself - * (or a function called by the mock function). - */ - -/** - * Represents the result of a single call to a mock function. - */ -// see https://github.com/Microsoft/TypeScript/issues/25215 -var MOCK_CONSTRUCTOR_NAME = 'mockConstructor'; -var FUNCTION_NAME_RESERVED_PATTERN = /[\s!-\/:-@\[-`{-~]/; -var FUNCTION_NAME_RESERVED_REPLACE = new RegExp(FUNCTION_NAME_RESERVED_PATTERN.source, 'g'); -var RESERVED_KEYWORDS = new Set(['arguments', 'await', 'break', 'case', 'catch', 'class', 'const', 'continue', 'debugger', 'default', 'delete', 'do', 'else', 'enum', 'eval', 'export', 'extends', 'false', 'finally', 'for', 'function', 'if', 'implements', 'import', 'in', 'instanceof', 'interface', 'let', 'new', 'null', 'package', 'private', 'protected', 'public', 'return', 'static', 'super', 'switch', 'this', 'throw', 'true', 'try', 'typeof', 'var', 'void', 'while', 'with', 'yield']); - -function matchArity(fn, length) { - var mockConstructor; - - switch (length) { - case 1: - mockConstructor = function mockConstructor(_a) { - return fn.apply(this, arguments); - }; - - break; - - case 2: - mockConstructor = function mockConstructor(_a, _b) { - return fn.apply(this, arguments); - }; - - break; - - case 3: - mockConstructor = function mockConstructor(_a, _b, _c) { - return fn.apply(this, arguments); - }; - - break; - - case 4: - mockConstructor = function mockConstructor(_a, _b, _c, _d) { - return fn.apply(this, arguments); - }; - - break; - - case 5: - mockConstructor = function mockConstructor(_a, _b, _c, _d, _e) { - return fn.apply(this, arguments); - }; - - break; - - case 6: - mockConstructor = function mockConstructor(_a, _b, _c, _d, _e, _f) { - return fn.apply(this, arguments); - }; - - break; - - case 7: - mockConstructor = function mockConstructor(_a, _b, _c, _d, _e, _f, _g) { - return fn.apply(this, arguments); - }; - - break; - - case 8: - mockConstructor = function mockConstructor(_a, _b, _c, _d, _e, _f, _g, _h) { - return fn.apply(this, arguments); - }; - - break; - - case 9: - mockConstructor = function mockConstructor(_a, _b, _c, _d, _e, _f, _g, _h, _i) { - return fn.apply(this, arguments); - }; - - break; - - default: - mockConstructor = function mockConstructor() { - return fn.apply(this, arguments); - }; - - break; - } - - return mockConstructor; -} - -function getObjectType(value) { - return Object.prototype.toString.apply(value).slice(8, -1); -} - -function getType(ref) { - var typeName = getObjectType(ref); - - if (typeName === 'Function' || typeName === 'AsyncFunction' || typeName === 'GeneratorFunction') { - return 'function'; - } else if (Array.isArray(ref)) { - return 'array'; - } else if (typeName === 'Object') { - return 'object'; - } else if (typeName === 'Number' || typeName === 'String' || typeName === 'Boolean' || typeName === 'Symbol') { - return 'constant'; - } else if (typeName === 'Map' || typeName === 'WeakMap' || typeName === 'Set') { - return 'collection'; - } else if (typeName === 'RegExp') { - return 'regexp'; - } else if (ref === undefined) { - return 'undefined'; - } else if (ref === null) { - return 'null'; - } else { - return null; - } -} - -function isReadonlyProp(object, prop) { - if (prop === 'arguments' || prop === 'caller' || prop === 'callee' || prop === 'name' || prop === 'length') { - var typeName = getObjectType(object); - return typeName === 'Function' || typeName === 'AsyncFunction' || typeName === 'GeneratorFunction'; - } - - if (prop === 'source' || prop === 'global' || prop === 'ignoreCase' || prop === 'multiline') { - return getObjectType(object) === 'RegExp'; - } - - return false; -} - -var ModuleMockerClass = -/*#__PURE__*/ -function () { - /** - * @see README.md - * @param global Global object of the test environment, used to create - * mocks - */ - function ModuleMockerClass(global) { - _classCallCheck(this, ModuleMockerClass); - - this._environmentGlobal = global; - this._mockState = new WeakMap(); - this._mockConfigRegistry = new WeakMap(); - this._spyState = new Set(); - this.ModuleMocker = ModuleMockerClass; - this._invocationCallCounter = 1; - } - - _createClass(ModuleMockerClass, [{ - key: "_getSlots", - value: function _getSlots(object) { - if (!object) { - return []; - } - - var slots = new Set(); - var EnvObjectProto = this._environmentGlobal.Object.prototype; - var EnvFunctionProto = this._environmentGlobal.Function.prototype; - var EnvRegExpProto = this._environmentGlobal.RegExp.prototype; // Also check the builtins in the current context as they leak through - // core node modules. - - var ObjectProto = Object.prototype; - var FunctionProto = Function.prototype; - var RegExpProto = RegExp.prototype; // Properties of Object.prototype, Function.prototype and RegExp.prototype - // are never reported as slots - - while (object != null && object !== EnvObjectProto && object !== EnvFunctionProto && object !== EnvRegExpProto && object !== ObjectProto && object !== FunctionProto && object !== RegExpProto) { - var ownNames = Object.getOwnPropertyNames(object); - - for (var i = 0; i < ownNames.length; i++) { - var prop = ownNames[i]; - - if (!isReadonlyProp(object, prop)) { - var propDesc = Object.getOwnPropertyDescriptor(object, prop); // @ts-ignore Object.__esModule - - if (propDesc !== undefined && !propDesc.get || object.__esModule) { - slots.add(prop); - } - } - } - - object = Object.getPrototypeOf(object); - } - - return Array.from(slots); - } - }, { - key: "_ensureMockConfig", - value: function _ensureMockConfig(f) { - var config = this._mockConfigRegistry.get(f); - - if (!config) { - config = this._defaultMockConfig(); - - this._mockConfigRegistry.set(f, config); - } - - return config; - } - }, { - key: "_ensureMockState", - value: function _ensureMockState(f) { - var state = this._mockState.get(f); - - if (!state) { - state = this._defaultMockState(); - - this._mockState.set(f, state); - } - - return state; - } - }, { - key: "_defaultMockConfig", - value: function _defaultMockConfig() { - return { - defaultReturnValue: undefined, - isReturnValueLastSet: false, - mockImpl: undefined, - mockName: 'jest.fn()', - specificMockImpls: [], - specificReturnValues: [] - }; - } - }, { - key: "_defaultMockState", - value: function _defaultMockState() { - return { - calls: [], - instances: [], - invocationCallOrder: [], - results: [] - }; - } - }, { - key: "_makeComponent", - value: function _makeComponent(metadata, restore) { - var _this2 = this; - - if (metadata.type === 'object') { - return new this._environmentGlobal.Object(); - } else if (metadata.type === 'array') { - return new this._environmentGlobal.Array(); - } else if (metadata.type === 'regexp') { - return new this._environmentGlobal.RegExp(''); - } else if (metadata.type === 'constant' || metadata.type === 'collection' || metadata.type === 'null' || metadata.type === 'undefined') { - return metadata.value; - } else if (metadata.type === 'function') { - var prototype = metadata.members && metadata.members.prototype && metadata.members.prototype.members || {}; - - var prototypeSlots = this._getSlots(prototype); - - var mocker = this; - var mockConstructor = matchArity(function () { - var _this = this, - _arguments = arguments; - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var mockState = mocker._ensureMockState(f); - - var mockConfig = mocker._ensureMockConfig(f); - - mockState.instances.push(this); - mockState.calls.push(args); // Create and record an "incomplete" mock result immediately upon - // calling rather than waiting for the mock to return. This avoids - // issues caused by recursion where results can be recorded in the - // wrong order. - - var mockResult = { - type: 'incomplete', - value: undefined - }; - mockState.results.push(mockResult); - mockState.invocationCallOrder.push(mocker._invocationCallCounter++); // Will be set to the return value of the mock if an error is not thrown - - var finalReturnValue; // Will be set to the error that is thrown by the mock (if it throws) - - var thrownError; // Will be set to true if the mock throws an error. The presence of a - // value in `thrownError` is not a 100% reliable indicator because a - // function could throw a value of undefined. - - var callDidThrowError = false; - - try { - // The bulk of the implementation is wrapped in an immediately - // executed arrow function so the return value of the mock function - // can be easily captured and recorded, despite the many separate - // return points within the logic. - finalReturnValue = function () { - if (_this instanceof f) { - // This is probably being called as a constructor - prototypeSlots.forEach(function (slot) { - // Copy prototype methods to the instance to make - // it easier to interact with mock instance call and - // return values - if (prototype[slot].type === 'function') { - // @ts-ignore no index signature - var protoImpl = _this[slot]; // @ts-ignore no index signature - - _this[slot] = mocker.generateFromMetadata(prototype[slot]); // @ts-ignore no index signature - - _this[slot]._protoImpl = protoImpl; - } - }); // Run the mock constructor implementation - - var _mockImpl = mockConfig.specificMockImpls.length ? mockConfig.specificMockImpls.shift() : mockConfig.mockImpl; - - return _mockImpl && _mockImpl.apply(_this, _arguments); - } - - var returnValue = mockConfig.defaultReturnValue; // If return value is last set, either specific or default, i.e. - // mockReturnValueOnce()/mockReturnValue() is called and no - // mockImplementationOnce()/mockImplementation() is called after - // that. - // use the set return value. - - if (mockConfig.specificReturnValues.length) { - return mockConfig.specificReturnValues.shift(); - } - - if (mockConfig.isReturnValueLastSet) { - return mockConfig.defaultReturnValue; - } // If mockImplementationOnce()/mockImplementation() is last set, - // or specific return values are used up, use the mock - // implementation. - - - var specificMockImpl; - - if (returnValue === undefined) { - specificMockImpl = mockConfig.specificMockImpls.shift(); - - if (specificMockImpl === undefined) { - specificMockImpl = mockConfig.mockImpl; - } - - if (specificMockImpl) { - return specificMockImpl.apply(_this, _arguments); - } - } // Otherwise use prototype implementation - - - if (returnValue === undefined && f._protoImpl) { - return f._protoImpl.apply(_this, _arguments); - } - - return returnValue; - }(); - } catch (error) { - // Store the thrown error so we can record it, then re-throw it. - thrownError = error; - callDidThrowError = true; - throw error; - } finally { - // Record the result of the function. - // NOTE: Intentionally NOT pushing/indexing into the array of mock - // results here to avoid corrupting results data if mockClear() - // is called during the execution of the mock. - mockResult.type = callDidThrowError ? 'throw' : 'return'; - mockResult.value = callDidThrowError ? thrownError : finalReturnValue; - } - - return finalReturnValue; - }, metadata.length || 0); - - var f = this._createMockFunction(metadata, mockConstructor); - - f._isMockFunction = true; - - f.getMockImplementation = function () { - return _this2._ensureMockConfig(f).mockImpl; - }; - - if (typeof restore === 'function') { - this._spyState.add(restore); - } - - this._mockState.set(f, this._defaultMockState()); - - this._mockConfigRegistry.set(f, this._defaultMockConfig()); - - Object.defineProperty(f, 'mock', { - configurable: false, - enumerable: true, - get: function get() { - return _this2._ensureMockState(f); - }, - set: function set(val) { - return _this2._mockState.set(f, val); - } - }); - - f.mockClear = function () { - _this2._mockState.delete(f); - - return f; - }; - - f.mockReset = function () { - f.mockClear(); - - _this2._mockConfigRegistry.delete(f); - - return f; - }; - - f.mockRestore = function () { - f.mockReset(); - return restore ? restore() : undefined; - }; - - f.mockReturnValueOnce = function (value) { - // next function call will return this value or default return value - var mockConfig = _this2._ensureMockConfig(f); - - mockConfig.specificReturnValues.push(value); - return f; - }; - - f.mockResolvedValueOnce = function (value) { - return f.mockImplementationOnce(function () { - return Promise.resolve(value); - }); - }; - - f.mockRejectedValueOnce = function (value) { - return f.mockImplementationOnce(function () { - return Promise.reject(value); - }); - }; - - f.mockReturnValue = function (value) { - // next function call will return specified return value or this one - var mockConfig = _this2._ensureMockConfig(f); - - mockConfig.isReturnValueLastSet = true; - mockConfig.defaultReturnValue = value; - return f; - }; - - f.mockResolvedValue = function (value) { - return f.mockImplementation(function () { - return Promise.resolve(value); - }); - }; - - f.mockRejectedValue = function (value) { - return f.mockImplementation(function () { - return Promise.reject(value); - }); - }; - - f.mockImplementationOnce = function (fn) { - // next function call will use this mock implementation return value - // or default mock implementation return value - var mockConfig = _this2._ensureMockConfig(f); - - mockConfig.isReturnValueLastSet = false; - mockConfig.specificMockImpls.push(fn); - return f; - }; - - f.mockImplementation = function (fn) { - // next function call will use mock implementation return value - var mockConfig = _this2._ensureMockConfig(f); - - mockConfig.isReturnValueLastSet = false; - mockConfig.defaultReturnValue = undefined; - mockConfig.mockImpl = fn; - return f; - }; - - f.mockReturnThis = function () { - return f.mockImplementation(function () { - return this; - }); - }; - - f.mockName = function (name) { - if (name) { - var mockConfig = _this2._ensureMockConfig(f); - - mockConfig.mockName = name; - } - - return f; - }; - - f.getMockName = function () { - var mockConfig = _this2._ensureMockConfig(f); - - return mockConfig.mockName || 'jest.fn()'; - }; - - if (metadata.mockImpl) { - f.mockImplementation(metadata.mockImpl); - } - - return f; - } else { - var unknownType = metadata.type || 'undefined type'; - throw new Error('Unrecognized type ' + unknownType); - } - } - }, { - key: "_createMockFunction", - value: function _createMockFunction(metadata, mockConstructor) { - var name = metadata.name; - - if (!name) { - return mockConstructor; - } // Preserve `name` property of mocked function. - - - var boundFunctionPrefix = 'bound '; - var bindCall = ''; // if-do-while for perf reasons. The common case is for the if to fail. - - if (name && name.startsWith(boundFunctionPrefix)) { - do { - name = name.substring(boundFunctionPrefix.length); // Call bind() just to alter the function name. - - bindCall = '.bind(null)'; - } while (name && name.startsWith(boundFunctionPrefix)); - } // Special case functions named `mockConstructor` to guard for infinite - // loops. - - - if (name === MOCK_CONSTRUCTOR_NAME) { - return mockConstructor; - } - - if ( // It's a syntax error to define functions with a reserved keyword - // as name. - RESERVED_KEYWORDS.has(name) || // It's also a syntax error to define functions with a name that starts with a number - /^\d/.test(name)) { - name = '$' + name; - } // It's also a syntax error to define a function with a reserved character - // as part of it's name. - - - if (FUNCTION_NAME_RESERVED_PATTERN.test(name)) { - name = name.replace(FUNCTION_NAME_RESERVED_REPLACE, '$'); - } - - var body = 'return function ' + name + '() {' + 'return ' + MOCK_CONSTRUCTOR_NAME + '.apply(this,arguments);' + '}' + bindCall; - var createConstructor = new this._environmentGlobal.Function(MOCK_CONSTRUCTOR_NAME, body); - return createConstructor(mockConstructor); - } - }, { - key: "_generateMock", - value: function _generateMock(metadata, callbacks, refs) { - var _this3 = this; - - // metadata not compatible but it's the same type, maybe problem with - // overloading of _makeComponent and not _generateMock? - // @ts-ignore - var mock = this._makeComponent(metadata); - - if (metadata.refID != null) { - refs[metadata.refID] = mock; - } - - this._getSlots(metadata.members).forEach(function (slot) { - var slotMetadata = metadata.members && metadata.members[slot] || {}; - - if (slotMetadata.ref != null) { - callbacks.push(function (ref) { - return function () { - return mock[slot] = refs[ref]; - }; - }(slotMetadata.ref)); - } else { - mock[slot] = _this3._generateMock(slotMetadata, callbacks, refs); - } - }); - - if (metadata.type !== 'undefined' && metadata.type !== 'null' && mock.prototype && _typeof(mock.prototype) === 'object') { - mock.prototype.constructor = mock; - } - - return mock; - } - /** - * @see README.md - * @param _metadata Metadata for the mock in the schema returned by the - * getMetadata method of this module. - */ - - }, { - key: "generateFromMetadata", - value: function generateFromMetadata(_metadata) { - var callbacks = []; - var refs = {}; - - var mock = this._generateMock(_metadata, callbacks, refs); - - callbacks.forEach(function (setter) { - return setter(); - }); - return mock; - } - /** - * @see README.md - * @param component The component for which to retrieve metadata. - */ - - }, { - key: "getMetadata", - value: function getMetadata(component, _refs) { - var _this4 = this; - - var refs = _refs || new Map(); - var ref = refs.get(component); - - if (ref != null) { - return { - ref: ref - }; - } - - var type = getType(component); - - if (!type) { - return null; - } - - var metadata = { - type: type - }; - - if (type === 'constant' || type === 'collection' || type === 'undefined' || type === 'null') { - metadata.value = component; - return metadata; - } else if (type === 'function') { - // @ts-ignore this is a function so it has a name - metadata.name = component.name; // @ts-ignore may be a mock - - if (component._isMockFunction === true) { - // @ts-ignore may be a mock - metadata.mockImpl = component.getMockImplementation(); - } - } - - metadata.refID = refs.size; - refs.set(component, metadata.refID); - var members = null; // Leave arrays alone - - if (type !== 'array') { - this._getSlots(component).forEach(function (slot) { - if (type === 'function' && // @ts-ignore may be a mock - component._isMockFunction === true && slot.match(/^mock/)) { - return; - } // @ts-ignore no index signature - - - var slotMetadata = _this4.getMetadata(component[slot], refs); - - if (slotMetadata) { - if (!members) { - members = {}; - } - - members[slot] = slotMetadata; - } - }); - } - - if (members) { - metadata.members = members; - } - - return metadata; - } - }, { - key: "isMockFunction", - value: function isMockFunction(fn) { - return !!fn && fn._isMockFunction === true; - } - }, { - key: "fn", - value: function fn(implementation) { - var length = implementation ? implementation.length : 0; - - var fn = this._makeComponent({ - length: length, - type: 'function' - }); - - if (implementation) { - fn.mockImplementation(implementation); - } - - return fn; - } - }, { - key: "spyOn", - value: function spyOn(object, methodName, accessType) { - if (accessType) { - return this._spyOnProperty(object, methodName, accessType); - } - - if (_typeof(object) !== 'object' && typeof object !== 'function') { - throw new Error('Cannot spyOn on a primitive value; ' + this._typeOf(object) + ' given'); - } - - var original = object[methodName]; - - if (!this.isMockFunction(original)) { - if (typeof original !== 'function') { - throw new Error('Cannot spy the ' + methodName + ' property because it is not a function; ' + this._typeOf(original) + ' given instead'); - } - - var isMethodOwner = object.hasOwnProperty(methodName); // @ts-ignore overriding original method with a Mock - - object[methodName] = this._makeComponent({ - type: 'function' - }, function () { - if (isMethodOwner) { - object[methodName] = original; - } else { - delete object[methodName]; - } - }); // @ts-ignore original method is now a Mock - - object[methodName].mockImplementation(function () { - return original.apply(this, arguments); - }); - } - - return object[methodName]; - } - }, { - key: "_spyOnProperty", - value: function _spyOnProperty(obj, propertyName) { - var accessType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'get'; - - if (_typeof(obj) !== 'object' && typeof obj !== 'function') { - throw new Error('Cannot spyOn on a primitive value; ' + this._typeOf(obj) + ' given'); - } - - if (!obj) { - throw new Error('spyOn could not find an object to spy upon for ' + propertyName + ''); - } - - if (!propertyName) { - throw new Error('No property name supplied'); - } - - var descriptor = Object.getOwnPropertyDescriptor(obj, propertyName); - var proto = Object.getPrototypeOf(obj); - - while (!descriptor && proto !== null) { - descriptor = Object.getOwnPropertyDescriptor(proto, propertyName); - proto = Object.getPrototypeOf(proto); - } - - if (!descriptor) { - throw new Error(propertyName + ' property does not exist'); - } - - if (!descriptor.configurable) { - throw new Error(propertyName + ' is not declared configurable'); - } - - if (!descriptor[accessType]) { - throw new Error('Property ' + propertyName + ' does not have access type ' + accessType); - } - - var original = descriptor[accessType]; - - if (!this.isMockFunction(original)) { - if (typeof original !== 'function') { - throw new Error('Cannot spy the ' + propertyName + ' property because it is not a function; ' + this._typeOf(original) + ' given instead'); - } // @ts-ignore: mock is assignable - - - descriptor[accessType] = this._makeComponent({ - type: 'function' - }, function () { - // @ts-ignore: mock is assignable - descriptor[accessType] = original; - Object.defineProperty(obj, propertyName, descriptor); - }); - descriptor[accessType].mockImplementation(function () { - // @ts-ignore - return original.apply(this, arguments); - }); - } - - Object.defineProperty(obj, propertyName, descriptor); - return descriptor[accessType]; - } - }, { - key: "clearAllMocks", - value: function clearAllMocks() { - this._mockState = new WeakMap(); - } - }, { - key: "resetAllMocks", - value: function resetAllMocks() { - this._mockConfigRegistry = new WeakMap(); - this._mockState = new WeakMap(); - } - }, { - key: "restoreAllMocks", - value: function restoreAllMocks() { - this._spyState.forEach(function (restore) { - return restore(); - }); - - this._spyState = new Set(); - } - }, { - key: "_typeOf", - value: function _typeOf(value) { - return value == null ? '' + value : _typeof(value); - } - }]); - - return ModuleMockerClass; -}(); -/* eslint-disable-next-line no-redeclare */ - - -var JestMock = new ModuleMockerClass(global); -module.exports = JestMock; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) - -/***/ }) - -/******/ }); -}); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/jest-mock/build-es5/index.js.map b/node_modules/jest-mock/build-es5/index.js.map deleted file mode 100644 index bc1ff9d4..00000000 --- a/node_modules/jest-mock/build-es5/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack://jestMock/webpack/universalModuleDefinition","webpack://jestMock/webpack/bootstrap","webpack://jestMock/(webpack)/buildin/global.js","webpack://jestMock/./packages/jest-mock/src/index.ts"],"names":["g","Function","e","window","module","exports","MOCK_CONSTRUCTOR_NAME","FUNCTION_NAME_RESERVED_PATTERN","FUNCTION_NAME_RESERVED_REPLACE","RegExp","source","RESERVED_KEYWORDS","Set","matchArity","fn","length","mockConstructor","_a","apply","arguments","_b","_c","_d","_e","_f","_g","_h","_i","getObjectType","value","Object","prototype","toString","slice","getType","ref","typeName","Array","isArray","undefined","isReadonlyProp","object","prop","ModuleMockerClass","global","_environmentGlobal","_mockState","WeakMap","_mockConfigRegistry","_spyState","ModuleMocker","_invocationCallCounter","slots","EnvObjectProto","EnvFunctionProto","EnvRegExpProto","ObjectProto","FunctionProto","RegExpProto","ownNames","getOwnPropertyNames","i","propDesc","getOwnPropertyDescriptor","get","__esModule","add","getPrototypeOf","from","f","config","_defaultMockConfig","set","state","_defaultMockState","defaultReturnValue","isReturnValueLastSet","mockImpl","mockName","specificMockImpls","specificReturnValues","calls","instances","invocationCallOrder","results","metadata","restore","type","members","prototypeSlots","_getSlots","mocker","args","mockState","_ensureMockState","mockConfig","_ensureMockConfig","push","mockResult","finalReturnValue","thrownError","callDidThrowError","forEach","slot","protoImpl","generateFromMetadata","_protoImpl","shift","returnValue","specificMockImpl","error","_createMockFunction","_isMockFunction","getMockImplementation","defineProperty","configurable","enumerable","val","mockClear","delete","mockReset","mockRestore","mockReturnValueOnce","mockResolvedValueOnce","mockImplementationOnce","Promise","resolve","mockRejectedValueOnce","reject","mockReturnValue","mockResolvedValue","mockImplementation","mockRejectedValue","mockReturnThis","name","getMockName","unknownType","Error","boundFunctionPrefix","bindCall","startsWith","substring","has","test","replace","body","createConstructor","callbacks","refs","mock","_makeComponent","refID","slotMetadata","_generateMock","constructor","_metadata","setter","component","_refs","Map","size","match","getMetadata","implementation","methodName","accessType","_spyOnProperty","_typeOf","original","isMockFunction","isMethodOwner","hasOwnProperty","obj","propertyName","descriptor","proto","JestMock"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;;;;;AClFA,IAAIA,CAAJ,C,CAEA;;AACAA,CAAC,GAAI,YAAW;AACf,SAAO,IAAP;AACA,CAFG,EAAJ;;AAIA,IAAI;AACH;AACAA,GAAC,GAAGA,CAAC,IAAI,IAAIC,QAAJ,CAAa,aAAb,GAAT;AACA,CAHD,CAGE,OAAOC,CAAP,EAAU;AACX;AACA,MAAI,QAAOC,MAAP,yCAAOA,MAAP,OAAkB,QAAtB,EAAgCH,CAAC,GAAGG,MAAJ;AAChC,C,CAED;AACA;AACA;;;AAEAC,MAAM,CAACC,OAAP,GAAiBL,CAAjB,C;;;;;;;;;;;;;;;;;;;;;;ACnBA;;;;;;;AAqCA;;;;;;;;;AAUA;;;AAkCA;AA0CA,IAAMM,qBAAqB,GAAG,iBAA9B;AAEA,IAAMC,8BAA8B,GAAG,oBAAvC;AACA,IAAMC,8BAA8B,GAAG,IAAIC,MAAJ,CACrCF,8BAA8B,CAACG,MADM,EAErC,GAFqC,CAAvC;AAKA,IAAMC,iBAAiB,GAAG,IAAIC,GAAJ,CAAQ,CAChC,WADgC,EAEhC,OAFgC,EAGhC,OAHgC,EAIhC,MAJgC,EAKhC,OALgC,EAMhC,OANgC,EAOhC,OAPgC,EAQhC,UARgC,EAShC,UATgC,EAUhC,SAVgC,EAWhC,QAXgC,EAYhC,IAZgC,EAahC,MAbgC,EAchC,MAdgC,EAehC,MAfgC,EAgBhC,QAhBgC,EAiBhC,SAjBgC,EAkBhC,OAlBgC,EAmBhC,SAnBgC,EAoBhC,KApBgC,EAqBhC,UArBgC,EAsBhC,IAtBgC,EAuBhC,YAvBgC,EAwBhC,QAxBgC,EAyBhC,IAzBgC,EA0BhC,YA1BgC,EA2BhC,WA3BgC,EA4BhC,KA5BgC,EA6BhC,KA7BgC,EA8BhC,MA9BgC,EA+BhC,SA/BgC,EAgChC,SAhCgC,EAiChC,WAjCgC,EAkChC,QAlCgC,EAmChC,QAnCgC,EAoChC,QApCgC,EAqChC,OArCgC,EAsChC,QAtCgC,EAuChC,MAvCgC,EAwChC,OAxCgC,EAyChC,MAzCgC,EA0ChC,KA1CgC,EA2ChC,QA3CgC,EA4ChC,KA5CgC,EA6ChC,MA7CgC,EA8ChC,OA9CgC,EA+ChC,MA/CgC,EAgDhC,OAhDgC,CAAR,CAA1B;;AAmDA,SAASC,UAAT,CAAoBC,EAApB,EAAkCC,MAAlC,EAA4D;AAC1D,MAAIC,eAAJ;;AAEA,UAAQD,MAAR;AACE,SAAK,CAAL;AACEC,qBAAe,GAAG,yBAAwBC,EAAxB,EAAqC;AACrD,eAAOH,EAAE,CAACI,KAAH,CAAS,IAAT,EAAeC,SAAf,CAAP;AACD,OAFD;;AAGA;;AACF,SAAK,CAAL;AACEH,qBAAe,GAAG,yBAAwBC,EAAxB,EAAqCG,EAArC,EAAkD;AAClE,eAAON,EAAE,CAACI,KAAH,CAAS,IAAT,EAAeC,SAAf,CAAP;AACD,OAFD;;AAGA;;AACF,SAAK,CAAL;AACEH,qBAAe,GAAG,yBAEhBC,EAFgB,EAGhBG,EAHgB,EAIhBC,EAJgB,EAKhB;AACA,eAAOP,EAAE,CAACI,KAAH,CAAS,IAAT,EAAeC,SAAf,CAAP;AACD,OAPD;;AAQA;;AACF,SAAK,CAAL;AACEH,qBAAe,GAAG,yBAEhBC,EAFgB,EAGhBG,EAHgB,EAIhBC,EAJgB,EAKhBC,EALgB,EAMhB;AACA,eAAOR,EAAE,CAACI,KAAH,CAAS,IAAT,EAAeC,SAAf,CAAP;AACD,OARD;;AASA;;AACF,SAAK,CAAL;AACEH,qBAAe,GAAG,yBAEhBC,EAFgB,EAGhBG,EAHgB,EAIhBC,EAJgB,EAKhBC,EALgB,EAMhBC,EANgB,EAOhB;AACA,eAAOT,EAAE,CAACI,KAAH,CAAS,IAAT,EAAeC,SAAf,CAAP;AACD,OATD;;AAUA;;AACF,SAAK,CAAL;AACEH,qBAAe,GAAG,yBAEhBC,EAFgB,EAGhBG,EAHgB,EAIhBC,EAJgB,EAKhBC,EALgB,EAMhBC,EANgB,EAOhBC,EAPgB,EAQhB;AACA,eAAOV,EAAE,CAACI,KAAH,CAAS,IAAT,EAAeC,SAAf,CAAP;AACD,OAVD;;AAWA;;AACF,SAAK,CAAL;AACEH,qBAAe,GAAG,yBAEhBC,EAFgB,EAGhBG,EAHgB,EAIhBC,EAJgB,EAKhBC,EALgB,EAMhBC,EANgB,EAOhBC,EAPgB,EAQhBC,EARgB,EAShB;AACA,eAAOX,EAAE,CAACI,KAAH,CAAS,IAAT,EAAeC,SAAf,CAAP;AACD,OAXD;;AAYA;;AACF,SAAK,CAAL;AACEH,qBAAe,GAAG,yBAEhBC,EAFgB,EAGhBG,EAHgB,EAIhBC,EAJgB,EAKhBC,EALgB,EAMhBC,EANgB,EAOhBC,EAPgB,EAQhBC,EARgB,EAShBC,EATgB,EAUhB;AACA,eAAOZ,EAAE,CAACI,KAAH,CAAS,IAAT,EAAeC,SAAf,CAAP;AACD,OAZD;;AAaA;;AACF,SAAK,CAAL;AACEH,qBAAe,GAAG,yBAEhBC,EAFgB,EAGhBG,EAHgB,EAIhBC,EAJgB,EAKhBC,EALgB,EAMhBC,EANgB,EAOhBC,EAPgB,EAQhBC,EARgB,EAShBC,EATgB,EAUhBC,EAVgB,EAWhB;AACA,eAAOb,EAAE,CAACI,KAAH,CAAS,IAAT,EAAeC,SAAf,CAAP;AACD,OAbD;;AAcA;;AACF;AACEH,qBAAe,GAAG,2BAAwB;AACxC,eAAOF,EAAE,CAACI,KAAH,CAAS,IAAT,EAAeC,SAAf,CAAP;AACD,OAFD;;AAGA;AA1GJ;;AA6GA,SAAOH,eAAP;AACD;;AAED,SAASY,aAAT,CAAuBC,KAAvB,EAA+C;AAC7C,SAAOC,MAAM,CAACC,SAAP,CAAiBC,QAAjB,CAA0Bd,KAA1B,CAAgCW,KAAhC,EAAuCI,KAAvC,CAA6C,CAA7C,EAAgD,CAAC,CAAjD,CAAP;AACD;;AAED,SAASC,OAAT,CAAiBC,GAAjB,EAA0E;AACxE,MAAMC,QAAQ,GAAGR,aAAa,CAACO,GAAD,CAA9B;;AACA,MACEC,QAAQ,KAAK,UAAb,IACAA,QAAQ,KAAK,eADb,IAEAA,QAAQ,KAAK,mBAHf,EAIE;AACA,WAAO,UAAP;AACD,GAND,MAMO,IAAIC,KAAK,CAACC,OAAN,CAAcH,GAAd,CAAJ,EAAwB;AAC7B,WAAO,OAAP;AACD,GAFM,MAEA,IAAIC,QAAQ,KAAK,QAAjB,EAA2B;AAChC,WAAO,QAAP;AACD,GAFM,MAEA,IACLA,QAAQ,KAAK,QAAb,IACAA,QAAQ,KAAK,QADb,IAEAA,QAAQ,KAAK,SAFb,IAGAA,QAAQ,KAAK,QAJR,EAKL;AACA,WAAO,UAAP;AACD,GAPM,MAOA,IACLA,QAAQ,KAAK,KAAb,IACAA,QAAQ,KAAK,SADb,IAEAA,QAAQ,KAAK,KAHR,EAIL;AACA,WAAO,YAAP;AACD,GANM,MAMA,IAAIA,QAAQ,KAAK,QAAjB,EAA2B;AAChC,WAAO,QAAP;AACD,GAFM,MAEA,IAAID,GAAG,KAAKI,SAAZ,EAAuB;AAC5B,WAAO,WAAP;AACD,GAFM,MAEA,IAAIJ,GAAG,KAAK,IAAZ,EAAkB;AACvB,WAAO,MAAP;AACD,GAFM,MAEA;AACL,WAAO,IAAP;AACD;AACF;;AAED,SAASK,cAAT,CAAwBC,MAAxB,EAAqCC,IAArC,EAA4D;AAC1D,MACEA,IAAI,KAAK,WAAT,IACAA,IAAI,KAAK,QADT,IAEAA,IAAI,KAAK,QAFT,IAGAA,IAAI,KAAK,MAHT,IAIAA,IAAI,KAAK,QALX,EAME;AACA,QAAMN,QAAQ,GAAGR,aAAa,CAACa,MAAD,CAA9B;AACA,WACEL,QAAQ,KAAK,UAAb,IACAA,QAAQ,KAAK,eADb,IAEAA,QAAQ,KAAK,mBAHf;AAKD;;AAED,MACEM,IAAI,KAAK,QAAT,IACAA,IAAI,KAAK,QADT,IAEAA,IAAI,KAAK,YAFT,IAGAA,IAAI,KAAK,WAJX,EAKE;AACA,WAAOd,aAAa,CAACa,MAAD,CAAb,KAA0B,QAAjC;AACD;;AAED,SAAO,KAAP;AACD;;IAEKE,iB;;;AAQJ;;;;;AAKA,6BAAYC,MAAZ,EAA4B;AAAA;;AAC1B,SAAKC,kBAAL,GAA0BD,MAA1B;AACA,SAAKE,UAAL,GAAkB,IAAIC,OAAJ,EAAlB;AACA,SAAKC,mBAAL,GAA2B,IAAID,OAAJ,EAA3B;AACA,SAAKE,SAAL,GAAiB,IAAIrC,GAAJ,EAAjB;AACA,SAAKsC,YAAL,GAAoBP,iBAApB;AACA,SAAKQ,sBAAL,GAA8B,CAA9B;AACD;;;;8BAEiBV,M,EAA6C;AAC7D,UAAI,CAACA,MAAL,EAAa;AACX,eAAO,EAAP;AACD;;AAED,UAAMW,KAAK,GAAG,IAAIxC,GAAJ,EAAd;AACA,UAAMyC,cAAc,GAAG,KAAKR,kBAAL,CAAwBf,MAAxB,CAA+BC,SAAtD;AACA,UAAMuB,gBAAgB,GAAG,KAAKT,kBAAL,CAAwB5C,QAAxB,CAAiC8B,SAA1D;AACA,UAAMwB,cAAc,GAAG,KAAKV,kBAAL,CAAwBpC,MAAxB,CAA+BsB,SAAtD,CAR6D,CAU7D;AACA;;AACA,UAAMyB,WAAW,GAAG1B,MAAM,CAACC,SAA3B;AACA,UAAM0B,aAAa,GAAGxD,QAAQ,CAAC8B,SAA/B;AACA,UAAM2B,WAAW,GAAGjD,MAAM,CAACsB,SAA3B,CAd6D,CAgB7D;AACA;;AACA,aACEU,MAAM,IAAI,IAAV,IACAA,MAAM,KAAKY,cADX,IAEAZ,MAAM,KAAKa,gBAFX,IAGAb,MAAM,KAAKc,cAHX,IAIAd,MAAM,KAAKe,WAJX,IAKAf,MAAM,KAAKgB,aALX,IAMAhB,MAAM,KAAKiB,WAPb,EAQE;AACA,YAAMC,QAAQ,GAAG7B,MAAM,CAAC8B,mBAAP,CAA2BnB,MAA3B,CAAjB;;AAEA,aAAK,IAAIoB,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGF,QAAQ,CAAC5C,MAA7B,EAAqC8C,CAAC,EAAtC,EAA0C;AACxC,cAAMnB,IAAI,GAAGiB,QAAQ,CAACE,CAAD,CAArB;;AAEA,cAAI,CAACrB,cAAc,CAACC,MAAD,EAASC,IAAT,CAAnB,EAAmC;AACjC,gBAAMoB,QAAQ,GAAGhC,MAAM,CAACiC,wBAAP,CAAgCtB,MAAhC,EAAwCC,IAAxC,CAAjB,CADiC,CAEjC;;AACA,gBAAKoB,QAAQ,KAAKvB,SAAb,IAA0B,CAACuB,QAAQ,CAACE,GAArC,IAA6CvB,MAAM,CAACwB,UAAxD,EAAoE;AAClEb,mBAAK,CAACc,GAAN,CAAUxB,IAAV;AACD;AACF;AACF;;AAEDD,cAAM,GAAGX,MAAM,CAACqC,cAAP,CAAsB1B,MAAtB,CAAT;AACD;;AAED,aAAOJ,KAAK,CAAC+B,IAAN,CAAWhB,KAAX,CAAP;AACD;;;sCAGCiB,C,EACoB;AACpB,UAAIC,MAAM,GAAG,KAAKtB,mBAAL,CAAyBgB,GAAzB,CAA6BK,CAA7B,CAAb;;AACA,UAAI,CAACC,MAAL,EAAa;AACXA,cAAM,GAAG,KAAKC,kBAAL,EAAT;;AACA,aAAKvB,mBAAL,CAAyBwB,GAAzB,CAA6BH,CAA7B,EAAgCC,MAAhC;AACD;;AACD,aAAOA,MAAP;AACD;;;qCAGCD,C,EACyB;AACzB,UAAII,KAAK,GAAG,KAAK3B,UAAL,CAAgBkB,GAAhB,CAAoBK,CAApB,CAAZ;;AACA,UAAI,CAACI,KAAL,EAAY;AACVA,aAAK,GAAG,KAAKC,iBAAL,EAAR;;AACA,aAAK5B,UAAL,CAAgB0B,GAAhB,CAAoBH,CAApB,EAAuBI,KAAvB;AACD;;AACD,aAAOA,KAAP;AACD;;;yCAEgD;AAC/C,aAAO;AACLE,0BAAkB,EAAEpC,SADf;AAELqC,4BAAoB,EAAE,KAFjB;AAGLC,gBAAQ,EAAEtC,SAHL;AAILuC,gBAAQ,EAAE,WAJL;AAKLC,yBAAiB,EAAE,EALd;AAMLC,4BAAoB,EAAE;AANjB,OAAP;AAQD;;;wCAKC;AACA,aAAO;AACLC,aAAK,EAAE,EADF;AAELC,iBAAS,EAAE,EAFN;AAGLC,2BAAmB,EAAE,EAHhB;AAILC,eAAO,EAAE;AAJJ,OAAP;AAMD;;;mCA2BCC,Q,EACAC,O,EAOa;AAAA;;AACb,UAAID,QAAQ,CAACE,IAAT,KAAkB,QAAtB,EAAgC;AAC9B,eAAO,IAAI,KAAK1C,kBAAL,CAAwBf,MAA5B,EAAP;AACD,OAFD,MAEO,IAAIuD,QAAQ,CAACE,IAAT,KAAkB,OAAtB,EAA+B;AACpC,eAAO,IAAI,KAAK1C,kBAAL,CAAwBR,KAA5B,EAAP;AACD,OAFM,MAEA,IAAIgD,QAAQ,CAACE,IAAT,KAAkB,QAAtB,EAAgC;AACrC,eAAO,IAAI,KAAK1C,kBAAL,CAAwBpC,MAA5B,CAAmC,EAAnC,CAAP;AACD,OAFM,MAEA,IACL4E,QAAQ,CAACE,IAAT,KAAkB,UAAlB,IACAF,QAAQ,CAACE,IAAT,KAAkB,YADlB,IAEAF,QAAQ,CAACE,IAAT,KAAkB,MAFlB,IAGAF,QAAQ,CAACE,IAAT,KAAkB,WAJb,EAKL;AACA,eAAOF,QAAQ,CAACxD,KAAhB;AACD,OAPM,MAOA,IAAIwD,QAAQ,CAACE,IAAT,KAAkB,UAAtB,EAAkC;AACvC,YAAMxD,SAAS,GACZsD,QAAQ,CAACG,OAAT,IACCH,QAAQ,CAACG,OAAT,CAAiBzD,SADlB,IAECsD,QAAQ,CAACG,OAAT,CAAiBzD,SAAjB,CAA2ByD,OAF7B,IAGA,EAJF;;AAKA,YAAMC,cAAc,GAAG,KAAKC,SAAL,CAAe3D,SAAf,CAAvB;;AACA,YAAM4D,MAAM,GAAG,IAAf;AACA,YAAM3E,eAAe,GAAGH,UAAU,CAAC,YAA8B;AAAA;AAAA;;AAAA,4CAAT+E,IAAS;AAATA,gBAAS;AAAA;;AAC/D,cAAMC,SAAS,GAAGF,MAAM,CAACG,gBAAP,CAAwBzB,CAAxB,CAAlB;;AACA,cAAM0B,UAAU,GAAGJ,MAAM,CAACK,iBAAP,CAAyB3B,CAAzB,CAAnB;;AACAwB,mBAAS,CAACX,SAAV,CAAoBe,IAApB,CAAyB,IAAzB;AACAJ,mBAAS,CAACZ,KAAV,CAAgBgB,IAAhB,CAAqBL,IAArB,EAJ+D,CAK/D;AACA;AACA;AACA;;AACA,cAAMM,UAA8B,GAAG;AACrCX,gBAAI,EAAE,YAD+B;AAErC1D,iBAAK,EAAEU;AAF8B,WAAvC;AAIAsD,mBAAS,CAACT,OAAV,CAAkBa,IAAlB,CAAuBC,UAAvB;AACAL,mBAAS,CAACV,mBAAV,CAA8Bc,IAA9B,CAAmCN,MAAM,CAACxC,sBAAP,EAAnC,EAd+D,CAgB/D;;AACA,cAAIgD,gBAAJ,CAjB+D,CAkB/D;;AACA,cAAIC,WAAJ,CAnB+D,CAoB/D;AACA;AACA;;AACA,cAAIC,iBAAiB,GAAG,KAAxB;;AAEA,cAAI;AACF;AACA;AACA;AACA;AACAF,4BAAgB,GAAI,YAAM;AACxB,kBAAI,KAAI,YAAY9B,CAApB,EAAuB;AACrB;AACAoB,8BAAc,CAACa,OAAf,CAAuB,UAAAC,IAAI,EAAI;AAC7B;AACA;AACA;AACA,sBAAIxE,SAAS,CAACwE,IAAD,CAAT,CAAgBhB,IAAhB,KAAyB,UAA7B,EAAyC;AACvC;AACA,wBAAMiB,SAAS,GAAG,KAAI,CAACD,IAAD,CAAtB,CAFuC,CAGvC;;AACA,yBAAI,CAACA,IAAD,CAAJ,GAAaZ,MAAM,CAACc,oBAAP,CAA4B1E,SAAS,CAACwE,IAAD,CAArC,CAAb,CAJuC,CAKvC;;AACA,yBAAI,CAACA,IAAD,CAAJ,CAAWG,UAAX,GAAwBF,SAAxB;AACD;AACF,iBAZD,EAFqB,CAgBrB;;AACA,oBAAM3B,SAAQ,GAAGkB,UAAU,CAAChB,iBAAX,CAA6BhE,MAA7B,GACbgF,UAAU,CAAChB,iBAAX,CAA6B4B,KAA7B,EADa,GAEbZ,UAAU,CAAClB,QAFf;;AAGA,uBAAOA,SAAQ,IAAIA,SAAQ,CAAC3D,KAAT,CAAe,KAAf,EAAqBC,UAArB,CAAnB;AACD;;AAED,kBAAMyF,WAAW,GAAGb,UAAU,CAACpB,kBAA/B,CAxBwB,CAyBxB;AACA;AACA;AACA;AACA;;AACA,kBAAIoB,UAAU,CAACf,oBAAX,CAAgCjE,MAApC,EAA4C;AAC1C,uBAAOgF,UAAU,CAACf,oBAAX,CAAgC2B,KAAhC,EAAP;AACD;;AAED,kBAAIZ,UAAU,CAACnB,oBAAf,EAAqC;AACnC,uBAAOmB,UAAU,CAACpB,kBAAlB;AACD,eApCuB,CAsCxB;AACA;AACA;;;AACA,kBAAIkC,gBAAJ;;AACA,kBAAID,WAAW,KAAKrE,SAApB,EAA+B;AAC7BsE,gCAAgB,GAAGd,UAAU,CAAChB,iBAAX,CAA6B4B,KAA7B,EAAnB;;AACA,oBAAIE,gBAAgB,KAAKtE,SAAzB,EAAoC;AAClCsE,kCAAgB,GAAGd,UAAU,CAAClB,QAA9B;AACD;;AACD,oBAAIgC,gBAAJ,EAAsB;AACpB,yBAAOA,gBAAgB,CAAC3F,KAAjB,CAAuB,KAAvB,EAA6BC,UAA7B,CAAP;AACD;AACF,eAlDuB,CAoDxB;;;AACA,kBAAIyF,WAAW,KAAKrE,SAAhB,IAA6B8B,CAAC,CAACqC,UAAnC,EAA+C;AAC7C,uBAAOrC,CAAC,CAACqC,UAAF,CAAaxF,KAAb,CAAmB,KAAnB,EAAyBC,UAAzB,CAAP;AACD;;AAED,qBAAOyF,WAAP;AACD,aA1DkB,EAAnB;AA2DD,WAhED,CAgEE,OAAOE,KAAP,EAAc;AACd;AACAV,uBAAW,GAAGU,KAAd;AACAT,6BAAiB,GAAG,IAApB;AACA,kBAAMS,KAAN;AACD,WArED,SAqEU;AACR;AACA;AACA;AACA;AACAZ,sBAAU,CAACX,IAAX,GAAkBc,iBAAiB,GAAG,OAAH,GAAa,QAAhD;AACAH,sBAAU,CAACrE,KAAX,GAAmBwE,iBAAiB,GAAGD,WAAH,GAAiBD,gBAArD;AACD;;AAED,iBAAOA,gBAAP;AACD,SAxGiC,EAwG/Bd,QAAQ,CAACtE,MAAT,IAAmB,CAxGY,CAAlC;;AA0GA,YAAMsD,CAAC,GAAI,KAAK0C,mBAAL,CACT1B,QADS,EAETrE,eAFS,CAAX;;AAIAqD,SAAC,CAAC2C,eAAF,GAAoB,IAApB;;AACA3C,SAAC,CAAC4C,qBAAF,GAA0B;AAAA,iBAAM,MAAI,CAACjB,iBAAL,CAAuB3B,CAAvB,EAA0BQ,QAAhC;AAAA,SAA1B;;AAEA,YAAI,OAAOS,OAAP,KAAmB,UAAvB,EAAmC;AACjC,eAAKrC,SAAL,CAAeiB,GAAf,CAAmBoB,OAAnB;AACD;;AAED,aAAKxC,UAAL,CAAgB0B,GAAhB,CAAoBH,CAApB,EAAuB,KAAKK,iBAAL,EAAvB;;AACA,aAAK1B,mBAAL,CAAyBwB,GAAzB,CAA6BH,CAA7B,EAAgC,KAAKE,kBAAL,EAAhC;;AAEAzC,cAAM,CAACoF,cAAP,CAAsB7C,CAAtB,EAAyB,MAAzB,EAAiC;AAC/B8C,sBAAY,EAAE,KADiB;AAE/BC,oBAAU,EAAE,IAFmB;AAG/BpD,aAAG,EAAE;AAAA,mBAAM,MAAI,CAAC8B,gBAAL,CAAsBzB,CAAtB,CAAN;AAAA,WAH0B;AAI/BG,aAAG,EAAE,aAAA6C,GAAG;AAAA,mBAAI,MAAI,CAACvE,UAAL,CAAgB0B,GAAhB,CAAoBH,CAApB,EAAuBgD,GAAvB,CAAJ;AAAA;AAJuB,SAAjC;;AAOAhD,SAAC,CAACiD,SAAF,GAAc,YAAM;AAClB,gBAAI,CAACxE,UAAL,CAAgByE,MAAhB,CAAuBlD,CAAvB;;AACA,iBAAOA,CAAP;AACD,SAHD;;AAKAA,SAAC,CAACmD,SAAF,GAAc,YAAM;AAClBnD,WAAC,CAACiD,SAAF;;AACA,gBAAI,CAACtE,mBAAL,CAAyBuE,MAAzB,CAAgClD,CAAhC;;AACA,iBAAOA,CAAP;AACD,SAJD;;AAMAA,SAAC,CAACoD,WAAF,GAAgB,YAAM;AACpBpD,WAAC,CAACmD,SAAF;AACA,iBAAOlC,OAAO,GAAGA,OAAO,EAAV,GAAe/C,SAA7B;AACD,SAHD;;AAKA8B,SAAC,CAACqD,mBAAF,GAAwB,UAAC7F,KAAD,EAAc;AACpC;AACA,cAAMkE,UAAU,GAAG,MAAI,CAACC,iBAAL,CAAuB3B,CAAvB,CAAnB;;AACA0B,oBAAU,CAACf,oBAAX,CAAgCiB,IAAhC,CAAqCpE,KAArC;AACA,iBAAOwC,CAAP;AACD,SALD;;AAOAA,SAAC,CAACsD,qBAAF,GAA0B,UAAC9F,KAAD;AAAA,iBACxBwC,CAAC,CAACuD,sBAAF,CAAyB;AAAA,mBAAMC,OAAO,CAACC,OAAR,CAAgBjG,KAAhB,CAAN;AAAA,WAAzB,CADwB;AAAA,SAA1B;;AAGAwC,SAAC,CAAC0D,qBAAF,GAA0B,UAAClG,KAAD;AAAA,iBACxBwC,CAAC,CAACuD,sBAAF,CAAyB;AAAA,mBAAMC,OAAO,CAACG,MAAR,CAAenG,KAAf,CAAN;AAAA,WAAzB,CADwB;AAAA,SAA1B;;AAGAwC,SAAC,CAAC4D,eAAF,GAAoB,UAACpG,KAAD,EAAc;AAChC;AACA,cAAMkE,UAAU,GAAG,MAAI,CAACC,iBAAL,CAAuB3B,CAAvB,CAAnB;;AACA0B,oBAAU,CAACnB,oBAAX,GAAkC,IAAlC;AACAmB,oBAAU,CAACpB,kBAAX,GAAgC9C,KAAhC;AACA,iBAAOwC,CAAP;AACD,SAND;;AAQAA,SAAC,CAAC6D,iBAAF,GAAsB,UAACrG,KAAD;AAAA,iBACpBwC,CAAC,CAAC8D,kBAAF,CAAqB;AAAA,mBAAMN,OAAO,CAACC,OAAR,CAAgBjG,KAAhB,CAAN;AAAA,WAArB,CADoB;AAAA,SAAtB;;AAGAwC,SAAC,CAAC+D,iBAAF,GAAsB,UAACvG,KAAD;AAAA,iBACpBwC,CAAC,CAAC8D,kBAAF,CAAqB;AAAA,mBAAMN,OAAO,CAACG,MAAR,CAAenG,KAAf,CAAN;AAAA,WAArB,CADoB;AAAA,SAAtB;;AAGAwC,SAAC,CAACuD,sBAAF,GAA2B,UACzB9G,EADyB,EAEV;AACf;AACA;AACA,cAAMiF,UAAU,GAAG,MAAI,CAACC,iBAAL,CAAuB3B,CAAvB,CAAnB;;AACA0B,oBAAU,CAACnB,oBAAX,GAAkC,KAAlC;AACAmB,oBAAU,CAAChB,iBAAX,CAA6BkB,IAA7B,CAAkCnF,EAAlC;AACA,iBAAOuD,CAAP;AACD,SATD;;AAWAA,SAAC,CAAC8D,kBAAF,GAAuB,UACrBrH,EADqB,EAEN;AACf;AACA,cAAMiF,UAAU,GAAG,MAAI,CAACC,iBAAL,CAAuB3B,CAAvB,CAAnB;;AACA0B,oBAAU,CAACnB,oBAAX,GAAkC,KAAlC;AACAmB,oBAAU,CAACpB,kBAAX,GAAgCpC,SAAhC;AACAwD,oBAAU,CAAClB,QAAX,GAAsB/D,EAAtB;AACA,iBAAOuD,CAAP;AACD,SATD;;AAWAA,SAAC,CAACgE,cAAF,GAAmB;AAAA,iBACjBhE,CAAC,CAAC8D,kBAAF,CAAqB,YAAkB;AACrC,mBAAO,IAAP;AACD,WAFD,CADiB;AAAA,SAAnB;;AAKA9D,SAAC,CAACS,QAAF,GAAa,UAACwD,IAAD,EAAkB;AAC7B,cAAIA,IAAJ,EAAU;AACR,gBAAMvC,UAAU,GAAG,MAAI,CAACC,iBAAL,CAAuB3B,CAAvB,CAAnB;;AACA0B,sBAAU,CAACjB,QAAX,GAAsBwD,IAAtB;AACD;;AACD,iBAAOjE,CAAP;AACD,SAND;;AAQAA,SAAC,CAACkE,WAAF,GAAgB,YAAM;AACpB,cAAMxC,UAAU,GAAG,MAAI,CAACC,iBAAL,CAAuB3B,CAAvB,CAAnB;;AACA,iBAAO0B,UAAU,CAACjB,QAAX,IAAuB,WAA9B;AACD,SAHD;;AAKA,YAAIO,QAAQ,CAACR,QAAb,EAAuB;AACrBR,WAAC,CAAC8D,kBAAF,CAAqB9C,QAAQ,CAACR,QAA9B;AACD;;AAED,eAAOR,CAAP;AACD,OA/NM,MA+NA;AACL,YAAMmE,WAAW,GAAGnD,QAAQ,CAACE,IAAT,IAAiB,gBAArC;AACA,cAAM,IAAIkD,KAAJ,CAAU,uBAAuBD,WAAjC,CAAN;AACD;AACF;;;wCAGCnD,Q,EACArE,e,EACU;AACV,UAAIsH,IAAI,GAAGjD,QAAQ,CAACiD,IAApB;;AACA,UAAI,CAACA,IAAL,EAAW;AACT,eAAOtH,eAAP;AACD,OAJS,CAMV;;;AACA,UAAM0H,mBAAmB,GAAG,QAA5B;AACA,UAAIC,QAAQ,GAAG,EAAf,CARU,CASV;;AACA,UAAIL,IAAI,IAAIA,IAAI,CAACM,UAAL,CAAgBF,mBAAhB,CAAZ,EAAkD;AAChD,WAAG;AACDJ,cAAI,GAAGA,IAAI,CAACO,SAAL,CAAeH,mBAAmB,CAAC3H,MAAnC,CAAP,CADC,CAED;;AACA4H,kBAAQ,GAAG,aAAX;AACD,SAJD,QAISL,IAAI,IAAIA,IAAI,CAACM,UAAL,CAAgBF,mBAAhB,CAJjB;AAKD,OAhBS,CAkBV;AACA;;;AACA,UAAIJ,IAAI,KAAKhI,qBAAb,EAAoC;AAClC,eAAOU,eAAP;AACD;;AAED,WACE;AACA;AACAL,uBAAiB,CAACmI,GAAlB,CAAsBR,IAAtB,KACA;AACA,YAAMS,IAAN,CAAWT,IAAX,CALF,EAME;AACAA,YAAI,GAAG,MAAMA,IAAb;AACD,OAhCS,CAkCV;AACA;;;AACA,UAAI/H,8BAA8B,CAACwI,IAA/B,CAAoCT,IAApC,CAAJ,EAA+C;AAC7CA,YAAI,GAAGA,IAAI,CAACU,OAAL,CAAaxI,8BAAb,EAA6C,GAA7C,CAAP;AACD;;AAED,UAAMyI,IAAI,GACR,qBACAX,IADA,GAEA,MAFA,GAGA,SAHA,GAIAhI,qBAJA,GAKA,yBALA,GAMA,GANA,GAOAqI,QARF;AASA,UAAMO,iBAAiB,GAAG,IAAI,KAAKrG,kBAAL,CAAwB5C,QAA5B,CACxBK,qBADwB,EAExB2I,IAFwB,CAA1B;AAKA,aAAOC,iBAAiB,CAAClI,eAAD,CAAxB;AACD;;;kCAGCqE,Q,EACA8D,S,EACAC,I,EASY;AAAA;;AACZ;AACA;AACA;AACA,UAAMC,IAAI,GAAG,KAAKC,cAAL,CAAoBjE,QAApB,CAAb;;AACA,UAAIA,QAAQ,CAACkE,KAAT,IAAkB,IAAtB,EAA4B;AAC1BH,YAAI,CAAC/D,QAAQ,CAACkE,KAAV,CAAJ,GAAuBF,IAAvB;AACD;;AAED,WAAK3D,SAAL,CAAeL,QAAQ,CAACG,OAAxB,EAAiCc,OAAjC,CAAyC,UAAAC,IAAI,EAAI;AAC/C,YAAMiD,YAAY,GAAInE,QAAQ,CAACG,OAAT,IAAoBH,QAAQ,CAACG,OAAT,CAAiBe,IAAjB,CAArB,IAAgD,EAArE;;AACA,YAAIiD,YAAY,CAACrH,GAAb,IAAoB,IAAxB,EAA8B;AAC5BgH,mBAAS,CAAClD,IAAV,CACG,UAAS9D,GAAT,EAAc;AACb,mBAAO;AAAA,qBAAOkH,IAAI,CAAC9C,IAAD,CAAJ,GAAa6C,IAAI,CAACjH,GAAD,CAAxB;AAAA,aAAP;AACD,WAFD,CAEGqH,YAAY,CAACrH,GAFhB,CADF;AAKD,SAND,MAMO;AACLkH,cAAI,CAAC9C,IAAD,CAAJ,GAAa,MAAI,CAACkD,aAAL,CAAmBD,YAAnB,EAAiCL,SAAjC,EAA4CC,IAA5C,CAAb;AACD;AACF,OAXD;;AAaA,UACE/D,QAAQ,CAACE,IAAT,KAAkB,WAAlB,IACAF,QAAQ,CAACE,IAAT,KAAkB,MADlB,IAEA8D,IAAI,CAACtH,SAFL,IAGA,QAAOsH,IAAI,CAACtH,SAAZ,MAA0B,QAJ5B,EAKE;AACAsH,YAAI,CAACtH,SAAL,CAAe2H,WAAf,GAA6BL,IAA7B;AACD;;AAED,aAAOA,IAAP;AACD;AAED;;;;;;;;yCAMEM,S,EACY;AACZ,UAAMR,SAA0B,GAAG,EAAnC;AACA,UAAMC,IAAI,GAAG,EAAb;;AACA,UAAMC,IAAI,GAAG,KAAKI,aAAL,CAAmBE,SAAnB,EAA8BR,SAA9B,EAAyCC,IAAzC,CAAb;;AACAD,eAAS,CAAC7C,OAAV,CAAkB,UAAAsD,MAAM;AAAA,eAAIA,MAAM,EAAV;AAAA,OAAxB;AACA,aAAOP,IAAP;AACD;AAED;;;;;;;gCAKEQ,S,EACAC,K,EAC4C;AAAA;;AAC5C,UAAMV,IAAI,GAAGU,KAAK,IAAI,IAAIC,GAAJ,EAAtB;AACA,UAAM5H,GAAG,GAAGiH,IAAI,CAACpF,GAAL,CAAS6F,SAAT,CAAZ;;AACA,UAAI1H,GAAG,IAAI,IAAX,EAAiB;AACf,eAAO;AAACA,aAAG,EAAHA;AAAD,SAAP;AACD;;AAED,UAAMoD,IAAI,GAAGrD,OAAO,CAAC2H,SAAD,CAApB;;AACA,UAAI,CAACtE,IAAL,EAAW;AACT,eAAO,IAAP;AACD;;AAED,UAAMF,QAA6C,GAAG;AAACE,YAAI,EAAJA;AAAD,OAAtD;;AACA,UACEA,IAAI,KAAK,UAAT,IACAA,IAAI,KAAK,YADT,IAEAA,IAAI,KAAK,WAFT,IAGAA,IAAI,KAAK,MAJX,EAKE;AACAF,gBAAQ,CAACxD,KAAT,GAAiBgI,SAAjB;AACA,eAAOxE,QAAP;AACD,OARD,MAQO,IAAIE,IAAI,KAAK,UAAb,EAAyB;AAC9B;AACAF,gBAAQ,CAACiD,IAAT,GAAgBuB,SAAS,CAACvB,IAA1B,CAF8B,CAG9B;;AACA,YAAIuB,SAAS,CAAC7C,eAAV,KAA8B,IAAlC,EAAwC;AACtC;AACA3B,kBAAQ,CAACR,QAAT,GAAoBgF,SAAS,CAAC5C,qBAAV,EAApB;AACD;AACF;;AAED5B,cAAQ,CAACkE,KAAT,GAAiBH,IAAI,CAACY,IAAtB;AACAZ,UAAI,CAAC5E,GAAL,CAASqF,SAAT,EAAoBxE,QAAQ,CAACkE,KAA7B;AAEA,UAAI/D,OAEI,GAAG,IAFX,CAlC4C,CAqC5C;;AACA,UAAID,IAAI,KAAK,OAAb,EAAsB;AACpB,aAAKG,SAAL,CAAemE,SAAf,EAA0BvD,OAA1B,CAAkC,UAAAC,IAAI,EAAI;AACxC,cACEhB,IAAI,KAAK,UAAT,IACA;AACAsE,mBAAS,CAAC7C,eAAV,KAA8B,IAF9B,IAGAT,IAAI,CAAC0D,KAAL,CAAW,OAAX,CAJF,EAKE;AACA;AACD,WARuC,CASxC;;;AACA,cAAMT,YAAY,GAAG,MAAI,CAACU,WAAL,CAAuBL,SAAS,CAACtD,IAAD,CAAhC,EAAwC6C,IAAxC,CAArB;;AACA,cAAII,YAAJ,EAAkB;AAChB,gBAAI,CAAChE,OAAL,EAAc;AACZA,qBAAO,GAAG,EAAV;AACD;;AACDA,mBAAO,CAACe,IAAD,CAAP,GAAgBiD,YAAhB;AACD;AACF,SAjBD;AAkBD;;AAED,UAAIhE,OAAJ,EAAa;AACXH,gBAAQ,CAACG,OAAT,GAAmBA,OAAnB;AACD;;AAED,aAAOH,QAAP;AACD;;;mCAEiBvE,E,EAAwB;AACxC,aAAO,CAAC,CAACA,EAAF,IAAQA,EAAE,CAACkG,eAAH,KAAuB,IAAtC;AACD;;;uBAGCmD,c,EACY;AACZ,UAAMpJ,MAAM,GAAGoJ,cAAc,GAAGA,cAAc,CAACpJ,MAAlB,GAA2B,CAAxD;;AACA,UAAMD,EAAE,GAAG,KAAKwI,cAAL,CAA0B;AAACvI,cAAM,EAANA,MAAD;AAASwE,YAAI,EAAE;AAAf,OAA1B,CAAX;;AACA,UAAI4E,cAAJ,EAAoB;AAClBrJ,UAAE,CAACqH,kBAAH,CAAsBgC,cAAtB;AACD;;AACD,aAAOrJ,EAAP;AACD;;;0BAsBC2B,M,EACA2H,U,EACAC,U,EACA;AACA,UAAIA,UAAJ,EAAgB;AACd,eAAO,KAAKC,cAAL,CAAoB7H,MAApB,EAA4B2H,UAA5B,EAAwCC,UAAxC,CAAP;AACD;;AAED,UAAI,QAAO5H,MAAP,MAAkB,QAAlB,IAA8B,OAAOA,MAAP,KAAkB,UAApD,EAAgE;AAC9D,cAAM,IAAIgG,KAAJ,CACJ,wCAAwC,KAAK8B,OAAL,CAAa9H,MAAb,CAAxC,GAA+D,QAD3D,CAAN;AAGD;;AAED,UAAM+H,QAAQ,GAAG/H,MAAM,CAAC2H,UAAD,CAAvB;;AAEA,UAAI,CAAC,KAAKK,cAAL,CAAoBD,QAApB,CAAL,EAAoC;AAClC,YAAI,OAAOA,QAAP,KAAoB,UAAxB,EAAoC;AAClC,gBAAM,IAAI/B,KAAJ,CACJ,oBACE2B,UADF,GAEE,0CAFF,GAGE,KAAKG,OAAL,CAAaC,QAAb,CAHF,GAIE,gBALE,CAAN;AAOD;;AAED,YAAME,aAAa,GAAGjI,MAAM,CAACkI,cAAP,CAAsBP,UAAtB,CAAtB,CAXkC,CAalC;;AACA3H,cAAM,CAAC2H,UAAD,CAAN,GAAqB,KAAKd,cAAL,CAAoB;AAAC/D,cAAI,EAAE;AAAP,SAApB,EAAwC,YAAM;AACjE,cAAImF,aAAJ,EAAmB;AACjBjI,kBAAM,CAAC2H,UAAD,CAAN,GAAqBI,QAArB;AACD,WAFD,MAEO;AACL,mBAAO/H,MAAM,CAAC2H,UAAD,CAAb;AACD;AACF,SANoB,CAArB,CAdkC,CAsBlC;;AACA3H,cAAM,CAAC2H,UAAD,CAAN,CAAmBjC,kBAAnB,CAAsC,YAAwB;AAC5D,iBAAOqC,QAAQ,CAACtJ,KAAT,CAAe,IAAf,EAAqBC,SAArB,CAAP;AACD,SAFD;AAGD;;AAED,aAAOsB,MAAM,CAAC2H,UAAD,CAAb;AACD;;;mCAGCQ,G,EACAC,Y,EAES;AAAA,UADTR,UACS,uEADmB,KACnB;;AACT,UAAI,QAAOO,GAAP,MAAe,QAAf,IAA2B,OAAOA,GAAP,KAAe,UAA9C,EAA0D;AACxD,cAAM,IAAInC,KAAJ,CACJ,wCAAwC,KAAK8B,OAAL,CAAaK,GAAb,CAAxC,GAA4D,QADxD,CAAN;AAGD;;AAED,UAAI,CAACA,GAAL,EAAU;AACR,cAAM,IAAInC,KAAJ,CACJ,oDAAoDoC,YAApD,GAAmE,EAD/D,CAAN;AAGD;;AAED,UAAI,CAACA,YAAL,EAAmB;AACjB,cAAM,IAAIpC,KAAJ,CAAU,2BAAV,CAAN;AACD;;AAED,UAAIqC,UAAU,GAAGhJ,MAAM,CAACiC,wBAAP,CAAgC6G,GAAhC,EAAqCC,YAArC,CAAjB;AACA,UAAIE,KAAK,GAAGjJ,MAAM,CAACqC,cAAP,CAAsByG,GAAtB,CAAZ;;AAEA,aAAO,CAACE,UAAD,IAAeC,KAAK,KAAK,IAAhC,EAAsC;AACpCD,kBAAU,GAAGhJ,MAAM,CAACiC,wBAAP,CAAgCgH,KAAhC,EAAuCF,YAAvC,CAAb;AACAE,aAAK,GAAGjJ,MAAM,CAACqC,cAAP,CAAsB4G,KAAtB,CAAR;AACD;;AAED,UAAI,CAACD,UAAL,EAAiB;AACf,cAAM,IAAIrC,KAAJ,CAAUoC,YAAY,GAAG,0BAAzB,CAAN;AACD;;AAED,UAAI,CAACC,UAAU,CAAC3D,YAAhB,EAA8B;AAC5B,cAAM,IAAIsB,KAAJ,CAAUoC,YAAY,GAAG,+BAAzB,CAAN;AACD;;AAED,UAAI,CAACC,UAAU,CAACT,UAAD,CAAf,EAA6B;AAC3B,cAAM,IAAI5B,KAAJ,CACJ,cAAcoC,YAAd,GAA6B,6BAA7B,GAA6DR,UADzD,CAAN;AAGD;;AAED,UAAMG,QAAQ,GAAGM,UAAU,CAACT,UAAD,CAA3B;;AAEA,UAAI,CAAC,KAAKI,cAAL,CAAoBD,QAApB,CAAL,EAAoC;AAClC,YAAI,OAAOA,QAAP,KAAoB,UAAxB,EAAoC;AAClC,gBAAM,IAAI/B,KAAJ,CACJ,oBACEoC,YADF,GAEE,0CAFF,GAGE,KAAKN,OAAL,CAAaC,QAAb,CAHF,GAIE,gBALE,CAAN;AAOD,SATiC,CAWlC;;;AACAM,kBAAU,CAACT,UAAD,CAAV,GAAyB,KAAKf,cAAL,CAAoB;AAAC/D,cAAI,EAAE;AAAP,SAApB,EAAwC,YAAM;AACrE;AACAuF,oBAAU,CAAET,UAAF,CAAV,GAA0BG,QAA1B;AACA1I,gBAAM,CAACoF,cAAP,CAAsB0D,GAAtB,EAA2BC,YAA3B,EAAyCC,UAAzC;AACD,SAJwB,CAAzB;AAMCA,kBAAU,CAACT,UAAD,CAAX,CAAoClC,kBAApC,CAAuD,YAErD;AACA;AACA,iBAAOqC,QAAQ,CAACtJ,KAAT,CAAe,IAAf,EAAqBC,SAArB,CAAP;AACD,SALD;AAMD;;AAEDW,YAAM,CAACoF,cAAP,CAAsB0D,GAAtB,EAA2BC,YAA3B,EAAyCC,UAAzC;AACA,aAAOA,UAAU,CAACT,UAAD,CAAjB;AACD;;;oCAEe;AACd,WAAKvH,UAAL,GAAkB,IAAIC,OAAJ,EAAlB;AACD;;;oCAEe;AACd,WAAKC,mBAAL,GAA2B,IAAID,OAAJ,EAA3B;AACA,WAAKD,UAAL,GAAkB,IAAIC,OAAJ,EAAlB;AACD;;;sCAEiB;AAChB,WAAKE,SAAL,CAAeqD,OAAf,CAAuB,UAAAhB,OAAO;AAAA,eAAIA,OAAO,EAAX;AAAA,OAA9B;;AACA,WAAKrC,SAAL,GAAiB,IAAIrC,GAAJ,EAAjB;AACD;;;4BAEeiB,K,EAAoB;AAClC,aAAOA,KAAK,IAAI,IAAT,GAAgB,KAAKA,KAArB,WAAoCA,KAApC,CAAP;AACD;;;;;AAGH;;;AACA,IAAMmJ,QAAQ,GAAG,IAAIrI,iBAAJ,CAAsBC,MAAtB,CAAjB;iBACSoI,Q","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"jestMock\"] = factory();\n\telse\n\t\troot[\"jestMock\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./packages/jest-mock/src/index.ts\");\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\ntype Global = NodeJS.Global; // | Window – add once TS improves typings;\n\nnamespace JestMock {\n export type ModuleMocker = ModuleMockerClass;\n export type MockFunctionMetadataType =\n | 'object'\n | 'array'\n | 'regexp'\n | 'function'\n | 'constant'\n | 'collection'\n | 'null'\n | 'undefined';\n\n export type MockFunctionMetadata<\n T,\n Y extends Array,\n Type = MockFunctionMetadataType\n > = {\n ref?: number;\n members?: Record>;\n mockImpl?: (...args: Y) => T;\n name?: string;\n refID?: number;\n type?: Type;\n value?: T;\n length?: number;\n };\n}\n\n/**\n * Possible types of a MockFunctionResult.\n * 'return': The call completed by returning normally.\n * 'throw': The call completed by throwing a value.\n * 'incomplete': The call has not completed yet. This is possible if you read\n * the mock function result from within the mock function itself\n * (or a function called by the mock function).\n */\ntype MockFunctionResultType = 'return' | 'throw' | 'incomplete';\n\n/**\n * Represents the result of a single call to a mock function.\n */\ntype MockFunctionResult = {\n /**\n * Indicates how the call completed.\n */\n type: MockFunctionResultType;\n /**\n * The value that was either thrown or returned by the function.\n * Undefined when type === 'incomplete'.\n */\n value: unknown;\n};\n\ntype MockFunctionState> = {\n calls: Array;\n instances: Array;\n invocationCallOrder: Array;\n /**\n * List of results of calls to the mock function.\n */\n results: Array;\n};\n\ntype MockFunctionConfig = {\n isReturnValueLastSet: boolean;\n defaultReturnValue: unknown;\n mockImpl: Function | undefined;\n mockName: string;\n specificReturnValues: Array;\n specificMockImpls: Array;\n};\n\n// see https://github.com/Microsoft/TypeScript/issues/25215\ntype NonFunctionPropertyNames = {\n [K in keyof T]: T[K] extends (...args: Array) => any ? never : K;\n}[keyof T] &\n string;\ntype FunctionPropertyNames = {\n [K in keyof T]: T[K] extends (...args: Array) => any ? K : never;\n}[keyof T] &\n string;\n\ninterface Mock = Array>\n extends Function,\n MockInstance {\n new (...args: Y): T;\n (...args: Y): T;\n}\n\ninterface SpyInstance> extends MockInstance {}\n\ninterface MockInstance> {\n _isMockFunction: true;\n _protoImpl: Function;\n getMockName(): string;\n getMockImplementation(): Function | undefined;\n mock: MockFunctionState;\n mockClear(): this;\n mockReset(): this;\n mockRestore(): void;\n mockImplementation(fn: (...args: Y) => T): this;\n mockImplementation(fn: () => Promise): this;\n mockImplementationOnce(fn: (...args: Y) => T): this;\n mockImplementationOnce(fn: () => Promise): this;\n mockName(name: string): this;\n mockReturnThis(): this;\n mockReturnValue(value: T): this;\n mockReturnValueOnce(value: T): this;\n mockResolvedValue(value: T): this;\n mockResolvedValueOnce(value: T): this;\n mockRejectedValue(value: T): this;\n mockRejectedValueOnce(value: T): this;\n}\n\nconst MOCK_CONSTRUCTOR_NAME = 'mockConstructor';\n\nconst FUNCTION_NAME_RESERVED_PATTERN = /[\\s!-\\/:-@\\[-`{-~]/;\nconst FUNCTION_NAME_RESERVED_REPLACE = new RegExp(\n FUNCTION_NAME_RESERVED_PATTERN.source,\n 'g',\n);\n\nconst RESERVED_KEYWORDS = new Set([\n 'arguments',\n 'await',\n 'break',\n 'case',\n 'catch',\n 'class',\n 'const',\n 'continue',\n 'debugger',\n 'default',\n 'delete',\n 'do',\n 'else',\n 'enum',\n 'eval',\n 'export',\n 'extends',\n 'false',\n 'finally',\n 'for',\n 'function',\n 'if',\n 'implements',\n 'import',\n 'in',\n 'instanceof',\n 'interface',\n 'let',\n 'new',\n 'null',\n 'package',\n 'private',\n 'protected',\n 'public',\n 'return',\n 'static',\n 'super',\n 'switch',\n 'this',\n 'throw',\n 'true',\n 'try',\n 'typeof',\n 'var',\n 'void',\n 'while',\n 'with',\n 'yield',\n]);\n\nfunction matchArity(fn: Function, length: number): Function {\n let mockConstructor;\n\n switch (length) {\n case 1:\n mockConstructor = function(this: unknown, _a: unknown) {\n return fn.apply(this, arguments);\n };\n break;\n case 2:\n mockConstructor = function(this: unknown, _a: unknown, _b: unknown) {\n return fn.apply(this, arguments);\n };\n break;\n case 3:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 4:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 5:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n _e: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 6:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n _e: unknown,\n _f: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 7:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n _e: unknown,\n _f: unknown,\n _g: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 8:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n _e: unknown,\n _f: unknown,\n _g: unknown,\n _h: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n case 9:\n mockConstructor = function(\n this: unknown,\n _a: unknown,\n _b: unknown,\n _c: unknown,\n _d: unknown,\n _e: unknown,\n _f: unknown,\n _g: unknown,\n _h: unknown,\n _i: unknown,\n ) {\n return fn.apply(this, arguments);\n };\n break;\n default:\n mockConstructor = function(this: unknown) {\n return fn.apply(this, arguments);\n };\n break;\n }\n\n return mockConstructor;\n}\n\nfunction getObjectType(value: unknown): string {\n return Object.prototype.toString.apply(value).slice(8, -1);\n}\n\nfunction getType(ref?: unknown): JestMock.MockFunctionMetadataType | null {\n const typeName = getObjectType(ref);\n if (\n typeName === 'Function' ||\n typeName === 'AsyncFunction' ||\n typeName === 'GeneratorFunction'\n ) {\n return 'function';\n } else if (Array.isArray(ref)) {\n return 'array';\n } else if (typeName === 'Object') {\n return 'object';\n } else if (\n typeName === 'Number' ||\n typeName === 'String' ||\n typeName === 'Boolean' ||\n typeName === 'Symbol'\n ) {\n return 'constant';\n } else if (\n typeName === 'Map' ||\n typeName === 'WeakMap' ||\n typeName === 'Set'\n ) {\n return 'collection';\n } else if (typeName === 'RegExp') {\n return 'regexp';\n } else if (ref === undefined) {\n return 'undefined';\n } else if (ref === null) {\n return 'null';\n } else {\n return null;\n }\n}\n\nfunction isReadonlyProp(object: any, prop: string): boolean {\n if (\n prop === 'arguments' ||\n prop === 'caller' ||\n prop === 'callee' ||\n prop === 'name' ||\n prop === 'length'\n ) {\n const typeName = getObjectType(object);\n return (\n typeName === 'Function' ||\n typeName === 'AsyncFunction' ||\n typeName === 'GeneratorFunction'\n );\n }\n\n if (\n prop === 'source' ||\n prop === 'global' ||\n prop === 'ignoreCase' ||\n prop === 'multiline'\n ) {\n return getObjectType(object) === 'RegExp';\n }\n\n return false;\n}\n\nclass ModuleMockerClass {\n private _environmentGlobal: Global;\n private _mockState: WeakMap, MockFunctionState>;\n private _mockConfigRegistry: WeakMap;\n private _spyState: Set<() => void>;\n private _invocationCallCounter: number;\n ModuleMocker: typeof ModuleMockerClass;\n\n /**\n * @see README.md\n * @param global Global object of the test environment, used to create\n * mocks\n */\n constructor(global: Global) {\n this._environmentGlobal = global;\n this._mockState = new WeakMap();\n this._mockConfigRegistry = new WeakMap();\n this._spyState = new Set();\n this.ModuleMocker = ModuleMockerClass;\n this._invocationCallCounter = 1;\n }\n\n private _getSlots(object?: Record): Array {\n if (!object) {\n return [];\n }\n\n const slots = new Set();\n const EnvObjectProto = this._environmentGlobal.Object.prototype;\n const EnvFunctionProto = this._environmentGlobal.Function.prototype;\n const EnvRegExpProto = this._environmentGlobal.RegExp.prototype;\n\n // Also check the builtins in the current context as they leak through\n // core node modules.\n const ObjectProto = Object.prototype;\n const FunctionProto = Function.prototype;\n const RegExpProto = RegExp.prototype;\n\n // Properties of Object.prototype, Function.prototype and RegExp.prototype\n // are never reported as slots\n while (\n object != null &&\n object !== EnvObjectProto &&\n object !== EnvFunctionProto &&\n object !== EnvRegExpProto &&\n object !== ObjectProto &&\n object !== FunctionProto &&\n object !== RegExpProto\n ) {\n const ownNames = Object.getOwnPropertyNames(object);\n\n for (let i = 0; i < ownNames.length; i++) {\n const prop = ownNames[i];\n\n if (!isReadonlyProp(object, prop)) {\n const propDesc = Object.getOwnPropertyDescriptor(object, prop);\n // @ts-ignore Object.__esModule\n if ((propDesc !== undefined && !propDesc.get) || object.__esModule) {\n slots.add(prop);\n }\n }\n }\n\n object = Object.getPrototypeOf(object);\n }\n\n return Array.from(slots);\n }\n\n private _ensureMockConfig>(\n f: Mock,\n ): MockFunctionConfig {\n let config = this._mockConfigRegistry.get(f);\n if (!config) {\n config = this._defaultMockConfig();\n this._mockConfigRegistry.set(f, config);\n }\n return config;\n }\n\n private _ensureMockState>(\n f: Mock,\n ): MockFunctionState {\n let state = this._mockState.get(f);\n if (!state) {\n state = this._defaultMockState();\n this._mockState.set(f, state);\n }\n return state;\n }\n\n private _defaultMockConfig(): MockFunctionConfig {\n return {\n defaultReturnValue: undefined,\n isReturnValueLastSet: false,\n mockImpl: undefined,\n mockName: 'jest.fn()',\n specificMockImpls: [],\n specificReturnValues: [],\n };\n }\n\n private _defaultMockState>(): MockFunctionState<\n T,\n Y\n > {\n return {\n calls: [],\n instances: [],\n invocationCallOrder: [],\n results: [],\n };\n }\n\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata,\n restore?: () => void,\n ): Record;\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata,\n restore?: () => void,\n ): Array;\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata,\n restore?: () => void,\n ): RegExp;\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata<\n T,\n Y,\n 'constant' | 'collection' | 'null' | 'undefined'\n >,\n restore?: () => void,\n ): T;\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata,\n restore?: () => void,\n ): Mock;\n private _makeComponent>(\n metadata: JestMock.MockFunctionMetadata,\n restore?: () => void,\n ):\n | Record\n | Array\n | RegExp\n | T\n | undefined\n | Mock {\n if (metadata.type === 'object') {\n return new this._environmentGlobal.Object();\n } else if (metadata.type === 'array') {\n return new this._environmentGlobal.Array();\n } else if (metadata.type === 'regexp') {\n return new this._environmentGlobal.RegExp('');\n } else if (\n metadata.type === 'constant' ||\n metadata.type === 'collection' ||\n metadata.type === 'null' ||\n metadata.type === 'undefined'\n ) {\n return metadata.value;\n } else if (metadata.type === 'function') {\n const prototype =\n (metadata.members &&\n metadata.members.prototype &&\n metadata.members.prototype.members) ||\n {};\n const prototypeSlots = this._getSlots(prototype);\n const mocker = this;\n const mockConstructor = matchArity(function(this: T, ...args: Y) {\n const mockState = mocker._ensureMockState(f);\n const mockConfig = mocker._ensureMockConfig(f);\n mockState.instances.push(this);\n mockState.calls.push(args);\n // Create and record an \"incomplete\" mock result immediately upon\n // calling rather than waiting for the mock to return. This avoids\n // issues caused by recursion where results can be recorded in the\n // wrong order.\n const mockResult: MockFunctionResult = {\n type: 'incomplete',\n value: undefined,\n };\n mockState.results.push(mockResult);\n mockState.invocationCallOrder.push(mocker._invocationCallCounter++);\n\n // Will be set to the return value of the mock if an error is not thrown\n let finalReturnValue;\n // Will be set to the error that is thrown by the mock (if it throws)\n let thrownError;\n // Will be set to true if the mock throws an error. The presence of a\n // value in `thrownError` is not a 100% reliable indicator because a\n // function could throw a value of undefined.\n let callDidThrowError = false;\n\n try {\n // The bulk of the implementation is wrapped in an immediately\n // executed arrow function so the return value of the mock function\n // can be easily captured and recorded, despite the many separate\n // return points within the logic.\n finalReturnValue = (() => {\n if (this instanceof f) {\n // This is probably being called as a constructor\n prototypeSlots.forEach(slot => {\n // Copy prototype methods to the instance to make\n // it easier to interact with mock instance call and\n // return values\n if (prototype[slot].type === 'function') {\n // @ts-ignore no index signature\n const protoImpl = this[slot];\n // @ts-ignore no index signature\n this[slot] = mocker.generateFromMetadata(prototype[slot]);\n // @ts-ignore no index signature\n this[slot]._protoImpl = protoImpl;\n }\n });\n\n // Run the mock constructor implementation\n const mockImpl = mockConfig.specificMockImpls.length\n ? mockConfig.specificMockImpls.shift()\n : mockConfig.mockImpl;\n return mockImpl && mockImpl.apply(this, arguments);\n }\n\n const returnValue = mockConfig.defaultReturnValue;\n // If return value is last set, either specific or default, i.e.\n // mockReturnValueOnce()/mockReturnValue() is called and no\n // mockImplementationOnce()/mockImplementation() is called after\n // that.\n // use the set return value.\n if (mockConfig.specificReturnValues.length) {\n return mockConfig.specificReturnValues.shift();\n }\n\n if (mockConfig.isReturnValueLastSet) {\n return mockConfig.defaultReturnValue;\n }\n\n // If mockImplementationOnce()/mockImplementation() is last set,\n // or specific return values are used up, use the mock\n // implementation.\n let specificMockImpl;\n if (returnValue === undefined) {\n specificMockImpl = mockConfig.specificMockImpls.shift();\n if (specificMockImpl === undefined) {\n specificMockImpl = mockConfig.mockImpl;\n }\n if (specificMockImpl) {\n return specificMockImpl.apply(this, arguments);\n }\n }\n\n // Otherwise use prototype implementation\n if (returnValue === undefined && f._protoImpl) {\n return f._protoImpl.apply(this, arguments);\n }\n\n return returnValue;\n })();\n } catch (error) {\n // Store the thrown error so we can record it, then re-throw it.\n thrownError = error;\n callDidThrowError = true;\n throw error;\n } finally {\n // Record the result of the function.\n // NOTE: Intentionally NOT pushing/indexing into the array of mock\n // results here to avoid corrupting results data if mockClear()\n // is called during the execution of the mock.\n mockResult.type = callDidThrowError ? 'throw' : 'return';\n mockResult.value = callDidThrowError ? thrownError : finalReturnValue;\n }\n\n return finalReturnValue;\n }, metadata.length || 0);\n\n const f = (this._createMockFunction(\n metadata,\n mockConstructor,\n ) as unknown) as Mock;\n f._isMockFunction = true;\n f.getMockImplementation = () => this._ensureMockConfig(f).mockImpl;\n\n if (typeof restore === 'function') {\n this._spyState.add(restore);\n }\n\n this._mockState.set(f, this._defaultMockState());\n this._mockConfigRegistry.set(f, this._defaultMockConfig());\n\n Object.defineProperty(f, 'mock', {\n configurable: false,\n enumerable: true,\n get: () => this._ensureMockState(f),\n set: val => this._mockState.set(f, val),\n });\n\n f.mockClear = () => {\n this._mockState.delete(f);\n return f;\n };\n\n f.mockReset = () => {\n f.mockClear();\n this._mockConfigRegistry.delete(f);\n return f;\n };\n\n f.mockRestore = () => {\n f.mockReset();\n return restore ? restore() : undefined;\n };\n\n f.mockReturnValueOnce = (value: T) => {\n // next function call will return this value or default return value\n const mockConfig = this._ensureMockConfig(f);\n mockConfig.specificReturnValues.push(value);\n return f;\n };\n\n f.mockResolvedValueOnce = (value: T) =>\n f.mockImplementationOnce(() => Promise.resolve(value));\n\n f.mockRejectedValueOnce = (value: T) =>\n f.mockImplementationOnce(() => Promise.reject(value));\n\n f.mockReturnValue = (value: T) => {\n // next function call will return specified return value or this one\n const mockConfig = this._ensureMockConfig(f);\n mockConfig.isReturnValueLastSet = true;\n mockConfig.defaultReturnValue = value;\n return f;\n };\n\n f.mockResolvedValue = (value: T) =>\n f.mockImplementation(() => Promise.resolve(value));\n\n f.mockRejectedValue = (value: T) =>\n f.mockImplementation(() => Promise.reject(value));\n\n f.mockImplementationOnce = (\n fn: ((...args: Y) => T) | (() => Promise),\n ): Mock => {\n // next function call will use this mock implementation return value\n // or default mock implementation return value\n const mockConfig = this._ensureMockConfig(f);\n mockConfig.isReturnValueLastSet = false;\n mockConfig.specificMockImpls.push(fn);\n return f;\n };\n\n f.mockImplementation = (\n fn: ((...args: Y) => T) | (() => Promise),\n ): Mock => {\n // next function call will use mock implementation return value\n const mockConfig = this._ensureMockConfig(f);\n mockConfig.isReturnValueLastSet = false;\n mockConfig.defaultReturnValue = undefined;\n mockConfig.mockImpl = fn;\n return f;\n };\n\n f.mockReturnThis = () =>\n f.mockImplementation(function(this: T) {\n return this;\n });\n\n f.mockName = (name: string) => {\n if (name) {\n const mockConfig = this._ensureMockConfig(f);\n mockConfig.mockName = name;\n }\n return f;\n };\n\n f.getMockName = () => {\n const mockConfig = this._ensureMockConfig(f);\n return mockConfig.mockName || 'jest.fn()';\n };\n\n if (metadata.mockImpl) {\n f.mockImplementation(metadata.mockImpl);\n }\n\n return f;\n } else {\n const unknownType = metadata.type || 'undefined type';\n throw new Error('Unrecognized type ' + unknownType);\n }\n }\n\n private _createMockFunction>(\n metadata: JestMock.MockFunctionMetadata,\n mockConstructor: Function,\n ): Function {\n let name = metadata.name;\n if (!name) {\n return mockConstructor;\n }\n\n // Preserve `name` property of mocked function.\n const boundFunctionPrefix = 'bound ';\n let bindCall = '';\n // if-do-while for perf reasons. The common case is for the if to fail.\n if (name && name.startsWith(boundFunctionPrefix)) {\n do {\n name = name.substring(boundFunctionPrefix.length);\n // Call bind() just to alter the function name.\n bindCall = '.bind(null)';\n } while (name && name.startsWith(boundFunctionPrefix));\n }\n\n // Special case functions named `mockConstructor` to guard for infinite\n // loops.\n if (name === MOCK_CONSTRUCTOR_NAME) {\n return mockConstructor;\n }\n\n if (\n // It's a syntax error to define functions with a reserved keyword\n // as name.\n RESERVED_KEYWORDS.has(name) ||\n // It's also a syntax error to define functions with a name that starts with a number\n /^\\d/.test(name)\n ) {\n name = '$' + name;\n }\n\n // It's also a syntax error to define a function with a reserved character\n // as part of it's name.\n if (FUNCTION_NAME_RESERVED_PATTERN.test(name)) {\n name = name.replace(FUNCTION_NAME_RESERVED_REPLACE, '$');\n }\n\n const body =\n 'return function ' +\n name +\n '() {' +\n 'return ' +\n MOCK_CONSTRUCTOR_NAME +\n '.apply(this,arguments);' +\n '}' +\n bindCall;\n const createConstructor = new this._environmentGlobal.Function(\n MOCK_CONSTRUCTOR_NAME,\n body,\n );\n\n return createConstructor(mockConstructor);\n }\n\n private _generateMock>(\n metadata: JestMock.MockFunctionMetadata,\n callbacks: Array,\n refs: {\n [key: string]:\n | Record\n | Array\n | RegExp\n | T\n | undefined\n | Mock;\n },\n ): Mock {\n // metadata not compatible but it's the same type, maybe problem with\n // overloading of _makeComponent and not _generateMock?\n // @ts-ignore\n const mock = this._makeComponent(metadata);\n if (metadata.refID != null) {\n refs[metadata.refID] = mock;\n }\n\n this._getSlots(metadata.members).forEach(slot => {\n const slotMetadata = (metadata.members && metadata.members[slot]) || {};\n if (slotMetadata.ref != null) {\n callbacks.push(\n (function(ref) {\n return () => (mock[slot] = refs[ref]);\n })(slotMetadata.ref),\n );\n } else {\n mock[slot] = this._generateMock(slotMetadata, callbacks, refs);\n }\n });\n\n if (\n metadata.type !== 'undefined' &&\n metadata.type !== 'null' &&\n mock.prototype &&\n typeof mock.prototype === 'object'\n ) {\n mock.prototype.constructor = mock;\n }\n\n return mock;\n }\n\n /**\n * @see README.md\n * @param _metadata Metadata for the mock in the schema returned by the\n * getMetadata method of this module.\n */\n generateFromMetadata>(\n _metadata: JestMock.MockFunctionMetadata,\n ): Mock {\n const callbacks: Array = [];\n const refs = {};\n const mock = this._generateMock(_metadata, callbacks, refs);\n callbacks.forEach(setter => setter());\n return mock;\n }\n\n /**\n * @see README.md\n * @param component The component for which to retrieve metadata.\n */\n getMetadata>(\n component: T,\n _refs?: Map,\n ): JestMock.MockFunctionMetadata | null {\n const refs = _refs || new Map();\n const ref = refs.get(component);\n if (ref != null) {\n return {ref};\n }\n\n const type = getType(component);\n if (!type) {\n return null;\n }\n\n const metadata: JestMock.MockFunctionMetadata = {type};\n if (\n type === 'constant' ||\n type === 'collection' ||\n type === 'undefined' ||\n type === 'null'\n ) {\n metadata.value = component;\n return metadata;\n } else if (type === 'function') {\n // @ts-ignore this is a function so it has a name\n metadata.name = component.name;\n // @ts-ignore may be a mock\n if (component._isMockFunction === true) {\n // @ts-ignore may be a mock\n metadata.mockImpl = component.getMockImplementation();\n }\n }\n\n metadata.refID = refs.size;\n refs.set(component, metadata.refID);\n\n let members: {\n [key: string]: JestMock.MockFunctionMetadata;\n } | null = null;\n // Leave arrays alone\n if (type !== 'array') {\n this._getSlots(component).forEach(slot => {\n if (\n type === 'function' &&\n // @ts-ignore may be a mock\n component._isMockFunction === true &&\n slot.match(/^mock/)\n ) {\n return;\n }\n // @ts-ignore no index signature\n const slotMetadata = this.getMetadata(component[slot], refs);\n if (slotMetadata) {\n if (!members) {\n members = {};\n }\n members[slot] = slotMetadata;\n }\n });\n }\n\n if (members) {\n metadata.members = members;\n }\n\n return metadata;\n }\n\n isMockFunction(fn: any): fn is Mock {\n return !!fn && fn._isMockFunction === true;\n }\n\n fn>(\n implementation?: (...args: Y) => T,\n ): Mock {\n const length = implementation ? implementation.length : 0;\n const fn = this._makeComponent({length, type: 'function'});\n if (implementation) {\n fn.mockImplementation(implementation);\n }\n return fn;\n }\n\n spyOn>(\n object: T,\n methodName: M,\n accessType: 'get',\n ): SpyInstance;\n\n spyOn>(\n object: T,\n methodName: M,\n accessType: 'set',\n ): SpyInstance;\n\n spyOn>(\n object: T,\n methodName: M,\n ): T[M] extends (...args: Array) => any\n ? SpyInstance, Parameters>\n : never;\n\n spyOn>(\n object: T,\n methodName: M,\n accessType?: 'get' | 'set',\n ) {\n if (accessType) {\n return this._spyOnProperty(object, methodName, accessType);\n }\n\n if (typeof object !== 'object' && typeof object !== 'function') {\n throw new Error(\n 'Cannot spyOn on a primitive value; ' + this._typeOf(object) + ' given',\n );\n }\n\n const original = object[methodName];\n\n if (!this.isMockFunction(original)) {\n if (typeof original !== 'function') {\n throw new Error(\n 'Cannot spy the ' +\n methodName +\n ' property because it is not a function; ' +\n this._typeOf(original) +\n ' given instead',\n );\n }\n\n const isMethodOwner = object.hasOwnProperty(methodName);\n\n // @ts-ignore overriding original method with a Mock\n object[methodName] = this._makeComponent({type: 'function'}, () => {\n if (isMethodOwner) {\n object[methodName] = original;\n } else {\n delete object[methodName];\n }\n });\n\n // @ts-ignore original method is now a Mock\n object[methodName].mockImplementation(function(this: unknown) {\n return original.apply(this, arguments);\n });\n }\n\n return object[methodName];\n }\n\n private _spyOnProperty>(\n obj: T,\n propertyName: M,\n accessType: 'get' | 'set' = 'get',\n ): Mock {\n if (typeof obj !== 'object' && typeof obj !== 'function') {\n throw new Error(\n 'Cannot spyOn on a primitive value; ' + this._typeOf(obj) + ' given',\n );\n }\n\n if (!obj) {\n throw new Error(\n 'spyOn could not find an object to spy upon for ' + propertyName + '',\n );\n }\n\n if (!propertyName) {\n throw new Error('No property name supplied');\n }\n\n let descriptor = Object.getOwnPropertyDescriptor(obj, propertyName);\n let proto = Object.getPrototypeOf(obj);\n\n while (!descriptor && proto !== null) {\n descriptor = Object.getOwnPropertyDescriptor(proto, propertyName);\n proto = Object.getPrototypeOf(proto);\n }\n\n if (!descriptor) {\n throw new Error(propertyName + ' property does not exist');\n }\n\n if (!descriptor.configurable) {\n throw new Error(propertyName + ' is not declared configurable');\n }\n\n if (!descriptor[accessType]) {\n throw new Error(\n 'Property ' + propertyName + ' does not have access type ' + accessType,\n );\n }\n\n const original = descriptor[accessType];\n\n if (!this.isMockFunction(original)) {\n if (typeof original !== 'function') {\n throw new Error(\n 'Cannot spy the ' +\n propertyName +\n ' property because it is not a function; ' +\n this._typeOf(original) +\n ' given instead',\n );\n }\n\n // @ts-ignore: mock is assignable\n descriptor[accessType] = this._makeComponent({type: 'function'}, () => {\n // @ts-ignore: mock is assignable\n descriptor![accessType] = original;\n Object.defineProperty(obj, propertyName, descriptor!);\n });\n\n (descriptor[accessType] as Mock).mockImplementation(function(\n this: unknown,\n ) {\n // @ts-ignore\n return original.apply(this, arguments);\n });\n }\n\n Object.defineProperty(obj, propertyName, descriptor);\n return descriptor[accessType] as Mock;\n }\n\n clearAllMocks() {\n this._mockState = new WeakMap();\n }\n\n resetAllMocks() {\n this._mockConfigRegistry = new WeakMap();\n this._mockState = new WeakMap();\n }\n\n restoreAllMocks() {\n this._spyState.forEach(restore => restore());\n this._spyState = new Set();\n }\n\n private _typeOf(value: any): string {\n return value == null ? '' + value : typeof value;\n }\n}\n\n/* eslint-disable-next-line no-redeclare */\nconst JestMock = new ModuleMockerClass(global);\nexport = JestMock;\n"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/jest-mock/build/index.d.ts b/node_modules/jest-mock/build/index.d.ts deleted file mode 100644 index 4d7cfb56..00000000 --- a/node_modules/jest-mock/build/index.d.ts +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -declare type Global = NodeJS.Global; -declare namespace JestMock { - type ModuleMocker = ModuleMockerClass; - type MockFunctionMetadataType = 'object' | 'array' | 'regexp' | 'function' | 'constant' | 'collection' | 'null' | 'undefined'; - type MockFunctionMetadata, Type = MockFunctionMetadataType> = { - ref?: number; - members?: Record>; - mockImpl?: (...args: Y) => T; - name?: string; - refID?: number; - type?: Type; - value?: T; - length?: number; - }; -} -/** - * Possible types of a MockFunctionResult. - * 'return': The call completed by returning normally. - * 'throw': The call completed by throwing a value. - * 'incomplete': The call has not completed yet. This is possible if you read - * the mock function result from within the mock function itself - * (or a function called by the mock function). - */ -declare type MockFunctionResultType = 'return' | 'throw' | 'incomplete'; -/** - * Represents the result of a single call to a mock function. - */ -declare type MockFunctionResult = { - /** - * Indicates how the call completed. - */ - type: MockFunctionResultType; - /** - * The value that was either thrown or returned by the function. - * Undefined when type === 'incomplete'. - */ - value: unknown; -}; -declare type MockFunctionState> = { - calls: Array; - instances: Array; - invocationCallOrder: Array; - /** - * List of results of calls to the mock function. - */ - results: Array; -}; -declare type NonFunctionPropertyNames = { - [K in keyof T]: T[K] extends (...args: Array) => any ? never : K; -}[keyof T] & string; -declare type FunctionPropertyNames = { - [K in keyof T]: T[K] extends (...args: Array) => any ? K : never; -}[keyof T] & string; -interface Mock = Array> extends Function, MockInstance { - new (...args: Y): T; - (...args: Y): T; -} -interface SpyInstance> extends MockInstance { -} -interface MockInstance> { - _isMockFunction: true; - _protoImpl: Function; - getMockName(): string; - getMockImplementation(): Function | undefined; - mock: MockFunctionState; - mockClear(): this; - mockReset(): this; - mockRestore(): void; - mockImplementation(fn: (...args: Y) => T): this; - mockImplementation(fn: () => Promise): this; - mockImplementationOnce(fn: (...args: Y) => T): this; - mockImplementationOnce(fn: () => Promise): this; - mockName(name: string): this; - mockReturnThis(): this; - mockReturnValue(value: T): this; - mockReturnValueOnce(value: T): this; - mockResolvedValue(value: T): this; - mockResolvedValueOnce(value: T): this; - mockRejectedValue(value: T): this; - mockRejectedValueOnce(value: T): this; -} -declare class ModuleMockerClass { - private _environmentGlobal; - private _mockState; - private _mockConfigRegistry; - private _spyState; - private _invocationCallCounter; - ModuleMocker: typeof ModuleMockerClass; - /** - * @see README.md - * @param global Global object of the test environment, used to create - * mocks - */ - constructor(global: Global); - private _getSlots; - private _ensureMockConfig; - private _ensureMockState; - private _defaultMockConfig; - private _defaultMockState; - private _makeComponent; - private _createMockFunction; - private _generateMock; - /** - * @see README.md - * @param _metadata Metadata for the mock in the schema returned by the - * getMetadata method of this module. - */ - generateFromMetadata>(_metadata: JestMock.MockFunctionMetadata): Mock; - /** - * @see README.md - * @param component The component for which to retrieve metadata. - */ - getMetadata>(component: T, _refs?: Map): JestMock.MockFunctionMetadata | null; - isMockFunction(fn: any): fn is Mock; - fn>(implementation?: (...args: Y) => T): Mock; - spyOn>(object: T, methodName: M, accessType: 'get'): SpyInstance; - spyOn>(object: T, methodName: M, accessType: 'set'): SpyInstance; - spyOn>(object: T, methodName: M): T[M] extends (...args: Array) => any ? SpyInstance, Parameters> : never; - private _spyOnProperty; - clearAllMocks(): void; - resetAllMocks(): void; - restoreAllMocks(): void; - private _typeOf; -} -declare const JestMock: ModuleMockerClass; -export = JestMock; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-mock/build/index.d.ts.map b/node_modules/jest-mock/build/index.d.ts.map deleted file mode 100644 index 565ef4c0..00000000 --- a/node_modules/jest-mock/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,aAAK,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAE5B,kBAAU,QAAQ,CAAC;IACjB,KAAY,YAAY,GAAG,iBAAiB,CAAC;IAC7C,KAAY,wBAAwB,GAChC,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,UAAU,GACV,UAAU,GACV,YAAY,GACZ,MAAM,GACN,WAAW,CAAC;IAEhB,KAAY,oBAAoB,CAC9B,CAAC,EACD,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,EACxB,IAAI,GAAG,wBAAwB,IAC7B;QACF,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACrD,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC;QAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,IAAI,CAAC;QACZ,KAAK,CAAC,EAAE,CAAC,CAAC;QACV,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED;;;;;;;GAOG;AACH,aAAK,sBAAsB,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,CAAC;AAEhE;;GAEG;AACH,aAAK,kBAAkB,GAAG;IACxB;;OAEG;IACH,IAAI,EAAE,sBAAsB,CAAC;IAC7B;;;OAGG;IACH,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,aAAK,iBAAiB,CAAC,CAAC,EAAE,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,IAAI;IACpD,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAChB,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IACpB,mBAAmB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;CACpC,CAAC;AAYF,aAAK,wBAAwB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,KAAK,GAAG,CAAC;CACtE,CAAC,MAAM,CAAC,CAAC,GACR,MAAM,CAAC;AACT,aAAK,qBAAqB,CAAC,CAAC,IAAI;KAC7B,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK;CACtE,CAAC,MAAM,CAAC,CAAC,GACR,MAAM,CAAC;AAET,UAAU,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CACzD,SAAQ,QAAQ,EACd,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC;IACpB,KAAK,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC;IACpB,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC;CACjB;AAED,UAAU,WAAW,CAAC,CAAC,EAAE,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,CAAE,SAAQ,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC;CAAG;AAEhF,UAAU,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC;IAChD,eAAe,EAAE,IAAI,CAAC;IACtB,UAAU,EAAE,QAAQ,CAAC;IACrB,WAAW,IAAI,MAAM,CAAC;IACtB,qBAAqB,IAAI,QAAQ,GAAG,SAAS,CAAC;IAC9C,IAAI,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9B,SAAS,IAAI,IAAI,CAAC;IAClB,SAAS,IAAI,IAAI,CAAC;IAClB,WAAW,IAAI,IAAI,CAAC;IACpB,kBAAkB,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAChD,kBAAkB,CAAC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC/C,sBAAsB,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IACpD,sBAAsB,CAAC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IACnD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,IAAI,IAAI,CAAC;IACvB,eAAe,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IAChC,mBAAmB,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IACpC,iBAAiB,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IAClC,qBAAqB,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IACtC,iBAAiB,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IAClC,qBAAqB,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;CACvC;AAoPD,cAAM,iBAAiB;IACrB,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,UAAU,CAAuD;IACzE,OAAO,CAAC,mBAAmB,CAAwC;IACnE,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,sBAAsB,CAAS;IACvC,YAAY,EAAE,OAAO,iBAAiB,CAAC;IAEvC;;;;OAIG;gBACS,MAAM,EAAE,MAAM;IAS1B,OAAO,CAAC,SAAS;IA+CjB,OAAO,CAAC,iBAAiB;IAWzB,OAAO,CAAC,gBAAgB;IAWxB,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,cAAc;IAoRtB,OAAO,CAAC,mBAAmB;IA4D3B,OAAO,CAAC,aAAa;IA8CrB;;;;OAIG;IACH,oBAAoB,CAAC,CAAC,EAAE,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,EAC9C,SAAS,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC7C,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;IAQb;;;OAGG;IACH,WAAW,CAAC,CAAC,EAAE,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,EACrC,SAAS,EAAE,CAAC,EACZ,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,GACrB,QAAQ,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI;IAkE7C,cAAc,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,GAAG,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC;IAIzC,EAAE,CAAC,CAAC,EAAE,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,EAC5B,cAAc,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GACjC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;IASb,KAAK,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,wBAAwB,CAAC,CAAC,CAAC,EACvD,MAAM,EAAE,CAAC,EACT,UAAU,EAAE,CAAC,EACb,UAAU,EAAE,KAAK,GAChB,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAExB,KAAK,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,wBAAwB,CAAC,CAAC,CAAC,EACvD,MAAM,EAAE,CAAC,EACT,UAAU,EAAE,CAAC,EACb,UAAU,EAAE,KAAK,GAChB,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE5B,KAAK,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,qBAAqB,CAAC,CAAC,CAAC,EACpD,MAAM,EAAE,CAAC,EACT,UAAU,EAAE,CAAC,GACZ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,GAAG,GACxC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAC/C,KAAK;IAkDT,OAAO,CAAC,cAAc;IA2EtB,aAAa;IAIb,aAAa;IAKb,eAAe;IAKf,OAAO,CAAC,OAAO;CAGhB;AAGD,QAAA,MAAM,QAAQ,mBAAgC,CAAC;AAC/C,SAAS,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-mock/build/index.js b/node_modules/jest-mock/build/index.js deleted file mode 100644 index 555ed6f0..00000000 --- a/node_modules/jest-mock/build/index.js +++ /dev/null @@ -1,967 +0,0 @@ -'use strict'; - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -/** - * Possible types of a MockFunctionResult. - * 'return': The call completed by returning normally. - * 'throw': The call completed by throwing a value. - * 'incomplete': The call has not completed yet. This is possible if you read - * the mock function result from within the mock function itself - * (or a function called by the mock function). - */ - -/** - * Represents the result of a single call to a mock function. - */ -// see https://github.com/Microsoft/TypeScript/issues/25215 -const MOCK_CONSTRUCTOR_NAME = 'mockConstructor'; -const FUNCTION_NAME_RESERVED_PATTERN = /[\s!-\/:-@\[-`{-~]/; -const FUNCTION_NAME_RESERVED_REPLACE = new RegExp( - FUNCTION_NAME_RESERVED_PATTERN.source, - 'g' -); -const RESERVED_KEYWORDS = new Set([ - 'arguments', - 'await', - 'break', - 'case', - 'catch', - 'class', - 'const', - 'continue', - 'debugger', - 'default', - 'delete', - 'do', - 'else', - 'enum', - 'eval', - 'export', - 'extends', - 'false', - 'finally', - 'for', - 'function', - 'if', - 'implements', - 'import', - 'in', - 'instanceof', - 'interface', - 'let', - 'new', - 'null', - 'package', - 'private', - 'protected', - 'public', - 'return', - 'static', - 'super', - 'switch', - 'this', - 'throw', - 'true', - 'try', - 'typeof', - 'var', - 'void', - 'while', - 'with', - 'yield' -]); - -function matchArity(fn, length) { - let mockConstructor; - - switch (length) { - case 1: - mockConstructor = function mockConstructor(_a) { - return fn.apply(this, arguments); - }; - - break; - - case 2: - mockConstructor = function mockConstructor(_a, _b) { - return fn.apply(this, arguments); - }; - - break; - - case 3: - mockConstructor = function mockConstructor(_a, _b, _c) { - return fn.apply(this, arguments); - }; - - break; - - case 4: - mockConstructor = function mockConstructor(_a, _b, _c, _d) { - return fn.apply(this, arguments); - }; - - break; - - case 5: - mockConstructor = function mockConstructor(_a, _b, _c, _d, _e) { - return fn.apply(this, arguments); - }; - - break; - - case 6: - mockConstructor = function mockConstructor(_a, _b, _c, _d, _e, _f) { - return fn.apply(this, arguments); - }; - - break; - - case 7: - mockConstructor = function mockConstructor(_a, _b, _c, _d, _e, _f, _g) { - return fn.apply(this, arguments); - }; - - break; - - case 8: - mockConstructor = function mockConstructor( - _a, - _b, - _c, - _d, - _e, - _f, - _g, - _h - ) { - return fn.apply(this, arguments); - }; - - break; - - case 9: - mockConstructor = function mockConstructor( - _a, - _b, - _c, - _d, - _e, - _f, - _g, - _h, - _i - ) { - return fn.apply(this, arguments); - }; - - break; - - default: - mockConstructor = function mockConstructor() { - return fn.apply(this, arguments); - }; - - break; - } - - return mockConstructor; -} - -function getObjectType(value) { - return Object.prototype.toString.apply(value).slice(8, -1); -} - -function getType(ref) { - const typeName = getObjectType(ref); - - if ( - typeName === 'Function' || - typeName === 'AsyncFunction' || - typeName === 'GeneratorFunction' - ) { - return 'function'; - } else if (Array.isArray(ref)) { - return 'array'; - } else if (typeName === 'Object') { - return 'object'; - } else if ( - typeName === 'Number' || - typeName === 'String' || - typeName === 'Boolean' || - typeName === 'Symbol' - ) { - return 'constant'; - } else if ( - typeName === 'Map' || - typeName === 'WeakMap' || - typeName === 'Set' - ) { - return 'collection'; - } else if (typeName === 'RegExp') { - return 'regexp'; - } else if (ref === undefined) { - return 'undefined'; - } else if (ref === null) { - return 'null'; - } else { - return null; - } -} - -function isReadonlyProp(object, prop) { - if ( - prop === 'arguments' || - prop === 'caller' || - prop === 'callee' || - prop === 'name' || - prop === 'length' - ) { - const typeName = getObjectType(object); - return ( - typeName === 'Function' || - typeName === 'AsyncFunction' || - typeName === 'GeneratorFunction' - ); - } - - if ( - prop === 'source' || - prop === 'global' || - prop === 'ignoreCase' || - prop === 'multiline' - ) { - return getObjectType(object) === 'RegExp'; - } - - return false; -} - -class ModuleMockerClass { - /** - * @see README.md - * @param global Global object of the test environment, used to create - * mocks - */ - constructor(global) { - _defineProperty(this, '_environmentGlobal', void 0); - - _defineProperty(this, '_mockState', void 0); - - _defineProperty(this, '_mockConfigRegistry', void 0); - - _defineProperty(this, '_spyState', void 0); - - _defineProperty(this, '_invocationCallCounter', void 0); - - _defineProperty(this, 'ModuleMocker', void 0); - - this._environmentGlobal = global; - this._mockState = new WeakMap(); - this._mockConfigRegistry = new WeakMap(); - this._spyState = new Set(); - this.ModuleMocker = ModuleMockerClass; - this._invocationCallCounter = 1; - } - - _getSlots(object) { - if (!object) { - return []; - } - - const slots = new Set(); - const EnvObjectProto = this._environmentGlobal.Object.prototype; - const EnvFunctionProto = this._environmentGlobal.Function.prototype; - const EnvRegExpProto = this._environmentGlobal.RegExp.prototype; // Also check the builtins in the current context as they leak through - // core node modules. - - const ObjectProto = Object.prototype; - const FunctionProto = Function.prototype; - const RegExpProto = RegExp.prototype; // Properties of Object.prototype, Function.prototype and RegExp.prototype - // are never reported as slots - - while ( - object != null && - object !== EnvObjectProto && - object !== EnvFunctionProto && - object !== EnvRegExpProto && - object !== ObjectProto && - object !== FunctionProto && - object !== RegExpProto - ) { - const ownNames = Object.getOwnPropertyNames(object); - - for (let i = 0; i < ownNames.length; i++) { - const prop = ownNames[i]; - - if (!isReadonlyProp(object, prop)) { - const propDesc = Object.getOwnPropertyDescriptor(object, prop); // @ts-ignore Object.__esModule - - if ((propDesc !== undefined && !propDesc.get) || object.__esModule) { - slots.add(prop); - } - } - } - - object = Object.getPrototypeOf(object); - } - - return Array.from(slots); - } - - _ensureMockConfig(f) { - let config = this._mockConfigRegistry.get(f); - - if (!config) { - config = this._defaultMockConfig(); - - this._mockConfigRegistry.set(f, config); - } - - return config; - } - - _ensureMockState(f) { - let state = this._mockState.get(f); - - if (!state) { - state = this._defaultMockState(); - - this._mockState.set(f, state); - } - - return state; - } - - _defaultMockConfig() { - return { - defaultReturnValue: undefined, - isReturnValueLastSet: false, - mockImpl: undefined, - mockName: 'jest.fn()', - specificMockImpls: [], - specificReturnValues: [] - }; - } - - _defaultMockState() { - return { - calls: [], - instances: [], - invocationCallOrder: [], - results: [] - }; - } - - _makeComponent(metadata, restore) { - if (metadata.type === 'object') { - return new this._environmentGlobal.Object(); - } else if (metadata.type === 'array') { - return new this._environmentGlobal.Array(); - } else if (metadata.type === 'regexp') { - return new this._environmentGlobal.RegExp(''); - } else if ( - metadata.type === 'constant' || - metadata.type === 'collection' || - metadata.type === 'null' || - metadata.type === 'undefined' - ) { - return metadata.value; - } else if (metadata.type === 'function') { - const prototype = - (metadata.members && - metadata.members.prototype && - metadata.members.prototype.members) || - {}; - - const prototypeSlots = this._getSlots(prototype); - - const mocker = this; - const mockConstructor = matchArity(function(...args) { - const mockState = mocker._ensureMockState(f); - - const mockConfig = mocker._ensureMockConfig(f); - - mockState.instances.push(this); - mockState.calls.push(args); // Create and record an "incomplete" mock result immediately upon - // calling rather than waiting for the mock to return. This avoids - // issues caused by recursion where results can be recorded in the - // wrong order. - - const mockResult = { - type: 'incomplete', - value: undefined - }; - mockState.results.push(mockResult); - mockState.invocationCallOrder.push(mocker._invocationCallCounter++); // Will be set to the return value of the mock if an error is not thrown - - let finalReturnValue; // Will be set to the error that is thrown by the mock (if it throws) - - let thrownError; // Will be set to true if the mock throws an error. The presence of a - // value in `thrownError` is not a 100% reliable indicator because a - // function could throw a value of undefined. - - let callDidThrowError = false; - - try { - // The bulk of the implementation is wrapped in an immediately - // executed arrow function so the return value of the mock function - // can be easily captured and recorded, despite the many separate - // return points within the logic. - finalReturnValue = (() => { - if (this instanceof f) { - // This is probably being called as a constructor - prototypeSlots.forEach(slot => { - // Copy prototype methods to the instance to make - // it easier to interact with mock instance call and - // return values - if (prototype[slot].type === 'function') { - // @ts-ignore no index signature - const protoImpl = this[slot]; // @ts-ignore no index signature - - this[slot] = mocker.generateFromMetadata(prototype[slot]); // @ts-ignore no index signature - - this[slot]._protoImpl = protoImpl; - } - }); // Run the mock constructor implementation - - const mockImpl = mockConfig.specificMockImpls.length - ? mockConfig.specificMockImpls.shift() - : mockConfig.mockImpl; - return mockImpl && mockImpl.apply(this, arguments); - } - - const returnValue = mockConfig.defaultReturnValue; // If return value is last set, either specific or default, i.e. - // mockReturnValueOnce()/mockReturnValue() is called and no - // mockImplementationOnce()/mockImplementation() is called after - // that. - // use the set return value. - - if (mockConfig.specificReturnValues.length) { - return mockConfig.specificReturnValues.shift(); - } - - if (mockConfig.isReturnValueLastSet) { - return mockConfig.defaultReturnValue; - } // If mockImplementationOnce()/mockImplementation() is last set, - // or specific return values are used up, use the mock - // implementation. - - let specificMockImpl; - - if (returnValue === undefined) { - specificMockImpl = mockConfig.specificMockImpls.shift(); - - if (specificMockImpl === undefined) { - specificMockImpl = mockConfig.mockImpl; - } - - if (specificMockImpl) { - return specificMockImpl.apply(this, arguments); - } - } // Otherwise use prototype implementation - - if (returnValue === undefined && f._protoImpl) { - return f._protoImpl.apply(this, arguments); - } - - return returnValue; - })(); - } catch (error) { - // Store the thrown error so we can record it, then re-throw it. - thrownError = error; - callDidThrowError = true; - throw error; - } finally { - // Record the result of the function. - // NOTE: Intentionally NOT pushing/indexing into the array of mock - // results here to avoid corrupting results data if mockClear() - // is called during the execution of the mock. - mockResult.type = callDidThrowError ? 'throw' : 'return'; - mockResult.value = callDidThrowError ? thrownError : finalReturnValue; - } - - return finalReturnValue; - }, metadata.length || 0); - - const f = this._createMockFunction(metadata, mockConstructor); - - f._isMockFunction = true; - - f.getMockImplementation = () => this._ensureMockConfig(f).mockImpl; - - if (typeof restore === 'function') { - this._spyState.add(restore); - } - - this._mockState.set(f, this._defaultMockState()); - - this._mockConfigRegistry.set(f, this._defaultMockConfig()); - - Object.defineProperty(f, 'mock', { - configurable: false, - enumerable: true, - get: () => this._ensureMockState(f), - set: val => this._mockState.set(f, val) - }); - - f.mockClear = () => { - this._mockState.delete(f); - - return f; - }; - - f.mockReset = () => { - f.mockClear(); - - this._mockConfigRegistry.delete(f); - - return f; - }; - - f.mockRestore = () => { - f.mockReset(); - return restore ? restore() : undefined; - }; - - f.mockReturnValueOnce = value => { - // next function call will return this value or default return value - const mockConfig = this._ensureMockConfig(f); - - mockConfig.specificReturnValues.push(value); - return f; - }; - - f.mockResolvedValueOnce = value => - f.mockImplementationOnce(() => Promise.resolve(value)); - - f.mockRejectedValueOnce = value => - f.mockImplementationOnce(() => Promise.reject(value)); - - f.mockReturnValue = value => { - // next function call will return specified return value or this one - const mockConfig = this._ensureMockConfig(f); - - mockConfig.isReturnValueLastSet = true; - mockConfig.defaultReturnValue = value; - return f; - }; - - f.mockResolvedValue = value => - f.mockImplementation(() => Promise.resolve(value)); - - f.mockRejectedValue = value => - f.mockImplementation(() => Promise.reject(value)); - - f.mockImplementationOnce = fn => { - // next function call will use this mock implementation return value - // or default mock implementation return value - const mockConfig = this._ensureMockConfig(f); - - mockConfig.isReturnValueLastSet = false; - mockConfig.specificMockImpls.push(fn); - return f; - }; - - f.mockImplementation = fn => { - // next function call will use mock implementation return value - const mockConfig = this._ensureMockConfig(f); - - mockConfig.isReturnValueLastSet = false; - mockConfig.defaultReturnValue = undefined; - mockConfig.mockImpl = fn; - return f; - }; - - f.mockReturnThis = () => - f.mockImplementation(function() { - return this; - }); - - f.mockName = name => { - if (name) { - const mockConfig = this._ensureMockConfig(f); - - mockConfig.mockName = name; - } - - return f; - }; - - f.getMockName = () => { - const mockConfig = this._ensureMockConfig(f); - - return mockConfig.mockName || 'jest.fn()'; - }; - - if (metadata.mockImpl) { - f.mockImplementation(metadata.mockImpl); - } - - return f; - } else { - const unknownType = metadata.type || 'undefined type'; - throw new Error('Unrecognized type ' + unknownType); - } - } - - _createMockFunction(metadata, mockConstructor) { - let name = metadata.name; - - if (!name) { - return mockConstructor; - } // Preserve `name` property of mocked function. - - const boundFunctionPrefix = 'bound '; - let bindCall = ''; // if-do-while for perf reasons. The common case is for the if to fail. - - if (name && name.startsWith(boundFunctionPrefix)) { - do { - name = name.substring(boundFunctionPrefix.length); // Call bind() just to alter the function name. - - bindCall = '.bind(null)'; - } while (name && name.startsWith(boundFunctionPrefix)); - } // Special case functions named `mockConstructor` to guard for infinite - // loops. - - if (name === MOCK_CONSTRUCTOR_NAME) { - return mockConstructor; - } - - if ( - // It's a syntax error to define functions with a reserved keyword - // as name. - RESERVED_KEYWORDS.has(name) || // It's also a syntax error to define functions with a name that starts with a number - /^\d/.test(name) - ) { - name = '$' + name; - } // It's also a syntax error to define a function with a reserved character - // as part of it's name. - - if (FUNCTION_NAME_RESERVED_PATTERN.test(name)) { - name = name.replace(FUNCTION_NAME_RESERVED_REPLACE, '$'); - } - - const body = - 'return function ' + - name + - '() {' + - 'return ' + - MOCK_CONSTRUCTOR_NAME + - '.apply(this,arguments);' + - '}' + - bindCall; - const createConstructor = new this._environmentGlobal.Function( - MOCK_CONSTRUCTOR_NAME, - body - ); - return createConstructor(mockConstructor); - } - - _generateMock(metadata, callbacks, refs) { - // metadata not compatible but it's the same type, maybe problem with - // overloading of _makeComponent and not _generateMock? - // @ts-ignore - const mock = this._makeComponent(metadata); - - if (metadata.refID != null) { - refs[metadata.refID] = mock; - } - - this._getSlots(metadata.members).forEach(slot => { - const slotMetadata = (metadata.members && metadata.members[slot]) || {}; - - if (slotMetadata.ref != null) { - callbacks.push( - (function(ref) { - return () => (mock[slot] = refs[ref]); - })(slotMetadata.ref) - ); - } else { - mock[slot] = this._generateMock(slotMetadata, callbacks, refs); - } - }); - - if ( - metadata.type !== 'undefined' && - metadata.type !== 'null' && - mock.prototype && - typeof mock.prototype === 'object' - ) { - mock.prototype.constructor = mock; - } - - return mock; - } - /** - * @see README.md - * @param _metadata Metadata for the mock in the schema returned by the - * getMetadata method of this module. - */ - - generateFromMetadata(_metadata) { - const callbacks = []; - const refs = {}; - - const mock = this._generateMock(_metadata, callbacks, refs); - - callbacks.forEach(setter => setter()); - return mock; - } - /** - * @see README.md - * @param component The component for which to retrieve metadata. - */ - - getMetadata(component, _refs) { - const refs = _refs || new Map(); - const ref = refs.get(component); - - if (ref != null) { - return { - ref - }; - } - - const type = getType(component); - - if (!type) { - return null; - } - - const metadata = { - type - }; - - if ( - type === 'constant' || - type === 'collection' || - type === 'undefined' || - type === 'null' - ) { - metadata.value = component; - return metadata; - } else if (type === 'function') { - // @ts-ignore this is a function so it has a name - metadata.name = component.name; // @ts-ignore may be a mock - - if (component._isMockFunction === true) { - // @ts-ignore may be a mock - metadata.mockImpl = component.getMockImplementation(); - } - } - - metadata.refID = refs.size; - refs.set(component, metadata.refID); - let members = null; // Leave arrays alone - - if (type !== 'array') { - this._getSlots(component).forEach(slot => { - if ( - type === 'function' && // @ts-ignore may be a mock - component._isMockFunction === true && - slot.match(/^mock/) - ) { - return; - } // @ts-ignore no index signature - - const slotMetadata = this.getMetadata(component[slot], refs); - - if (slotMetadata) { - if (!members) { - members = {}; - } - - members[slot] = slotMetadata; - } - }); - } - - if (members) { - metadata.members = members; - } - - return metadata; - } - - isMockFunction(fn) { - return !!fn && fn._isMockFunction === true; - } - - fn(implementation) { - const length = implementation ? implementation.length : 0; - - const fn = this._makeComponent({ - length, - type: 'function' - }); - - if (implementation) { - fn.mockImplementation(implementation); - } - - return fn; - } - - spyOn(object, methodName, accessType) { - if (accessType) { - return this._spyOnProperty(object, methodName, accessType); - } - - if (typeof object !== 'object' && typeof object !== 'function') { - throw new Error( - 'Cannot spyOn on a primitive value; ' + this._typeOf(object) + ' given' - ); - } - - const original = object[methodName]; - - if (!this.isMockFunction(original)) { - if (typeof original !== 'function') { - throw new Error( - 'Cannot spy the ' + - methodName + - ' property because it is not a function; ' + - this._typeOf(original) + - ' given instead' - ); - } - - const isMethodOwner = object.hasOwnProperty(methodName); // @ts-ignore overriding original method with a Mock - - object[methodName] = this._makeComponent( - { - type: 'function' - }, - () => { - if (isMethodOwner) { - object[methodName] = original; - } else { - delete object[methodName]; - } - } - ); // @ts-ignore original method is now a Mock - - object[methodName].mockImplementation(function() { - return original.apply(this, arguments); - }); - } - - return object[methodName]; - } - - _spyOnProperty(obj, propertyName, accessType = 'get') { - if (typeof obj !== 'object' && typeof obj !== 'function') { - throw new Error( - 'Cannot spyOn on a primitive value; ' + this._typeOf(obj) + ' given' - ); - } - - if (!obj) { - throw new Error( - 'spyOn could not find an object to spy upon for ' + propertyName + '' - ); - } - - if (!propertyName) { - throw new Error('No property name supplied'); - } - - let descriptor = Object.getOwnPropertyDescriptor(obj, propertyName); - let proto = Object.getPrototypeOf(obj); - - while (!descriptor && proto !== null) { - descriptor = Object.getOwnPropertyDescriptor(proto, propertyName); - proto = Object.getPrototypeOf(proto); - } - - if (!descriptor) { - throw new Error(propertyName + ' property does not exist'); - } - - if (!descriptor.configurable) { - throw new Error(propertyName + ' is not declared configurable'); - } - - if (!descriptor[accessType]) { - throw new Error( - 'Property ' + propertyName + ' does not have access type ' + accessType - ); - } - - const original = descriptor[accessType]; - - if (!this.isMockFunction(original)) { - if (typeof original !== 'function') { - throw new Error( - 'Cannot spy the ' + - propertyName + - ' property because it is not a function; ' + - this._typeOf(original) + - ' given instead' - ); - } // @ts-ignore: mock is assignable - - descriptor[accessType] = this._makeComponent( - { - type: 'function' - }, - () => { - // @ts-ignore: mock is assignable - descriptor[accessType] = original; - Object.defineProperty(obj, propertyName, descriptor); - } - ); - descriptor[accessType].mockImplementation(function() { - // @ts-ignore - return original.apply(this, arguments); - }); - } - - Object.defineProperty(obj, propertyName, descriptor); - return descriptor[accessType]; - } - - clearAllMocks() { - this._mockState = new WeakMap(); - } - - resetAllMocks() { - this._mockConfigRegistry = new WeakMap(); - this._mockState = new WeakMap(); - } - - restoreAllMocks() { - this._spyState.forEach(restore => restore()); - - this._spyState = new Set(); - } - - _typeOf(value) { - return value == null ? '' + value : typeof value; - } -} -/* eslint-disable-next-line no-redeclare */ - -const JestMock = new ModuleMockerClass(global); -module.exports = JestMock; diff --git a/node_modules/jest-mock/package.json b/node_modules/jest-mock/package.json deleted file mode 100644 index 1429c7f8..00000000 --- a/node_modules/jest-mock/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_args": [ - [ - "jest-mock@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-mock@24.9.0", - "_id": "jest-mock@24.9.0", - "_inBundle": false, - "_integrity": "sha512-3BEYN5WbSq9wd+SyLDES7AHnjH9A/ROBwmz7l2y+ol+NtSFO8DYiEBzoO1CeFc9a8DYy10EO4dDFVv/wN3zl1w==", - "_location": "/jest-mock", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-mock@24.9.0", - "name": "jest-mock", - "escapedName": "jest-mock", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/environment", - "/@jest/fake-timers", - "/jest-environment-jsdom", - "/jest-environment-node", - "/jest-runtime" - ], - "_resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "browser": "build-es5/index.js", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/types": "^24.9.0" - }, - "description": "## API", - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-mock", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-mock" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-pnp-resolver/README.md b/node_modules/jest-pnp-resolver/README.md deleted file mode 100644 index fa545908..00000000 --- a/node_modules/jest-pnp-resolver/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# [Plug'n'Play](https://github.com/yarnpkg/rfcs/pull/101) resolver for Jest - -[![npm version](https://img.shields.io/npm/v/jest-pnp-resolver.svg)](https://www.npmjs.com/package/jest-pnp-resolver) -[![node version](https://img.shields.io/node/v/jest-pnp-resolver.svg)](https://www.npmjs.com/package/jest-pnp-resolver) - -*This plugin is also available for Rollup ([rollup-plugin-pnp-resolve](https://github.com/arcanis/rollup-plugin-pnp-resolve)), TypeScript ([ts-pnp](https://github.com/arcanis/ts-pnp)), and Webpack ([pnp-webpack-plugin](https://github.com/arcanis/pnp-webpack-plugin))* - -## Installation - -``` -yarn add -D jest-pnp-resolver -``` - -## Usage - -Simply add the resolver to your configuration. For example, a minimal `jest.config.js` would be as such: - -```js -module.exports = { - resolver: require.resolve(`jest-pnp-resolver`) -}; -``` - -## License (MIT) - -> **Copyright © 2016 Maël Nison** -> -> 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/jest-pnp-resolver/index.d.ts b/node_modules/jest-pnp-resolver/index.d.ts deleted file mode 100644 index 1acbbac8..00000000 --- a/node_modules/jest-pnp-resolver/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -type JestResolverOptions = { - basedir: string; - defaultResolver: (request: string, opts: any) => string, - extensions?: Array, -}; - -export default function resolve( - request: string, - options: JestResolverOptions, -): string; diff --git a/node_modules/jest-pnp-resolver/index.js b/node_modules/jest-pnp-resolver/index.js deleted file mode 100644 index 4643ff09..00000000 --- a/node_modules/jest-pnp-resolver/index.js +++ /dev/null @@ -1,41 +0,0 @@ - -let pnp; - -try { - pnp = require(`pnpapi`); -} catch (error) { - // not in PnP; not a problem -} - -let defaultResolver; - -function requireDefaultResolver() { - if (!defaultResolver) { - try { - defaultResolver = require(`jest-resolve/build/defaultResolver`).default; - } catch (error) { - defaultResolver = require(`jest-resolve/build/default_resolver`).default; - } - } - - return defaultResolver; -} - -module.exports = (request, options) => { - const {basedir, defaultResolver, extensions} = options; - - if (pnp) { - const resolution = pnp.resolveRequest(request, `${basedir}/`, {extensions}); - - // When the request is a native module, Jest expects to get the string back unmodified, but pnp returns null instead. - if (resolution === null) - return request; - - return resolution; - } else { - if (!defaultResolver) - defaultResolver = requireDefaultResolver(); - - return defaultResolver(request, options); - } -}; diff --git a/node_modules/jest-pnp-resolver/package.json b/node_modules/jest-pnp-resolver/package.json deleted file mode 100644 index 0ef0ccde..00000000 --- a/node_modules/jest-pnp-resolver/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "_args": [ - [ - "jest-pnp-resolver@1.2.1", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-pnp-resolver@1.2.1", - "_id": "jest-pnp-resolver@1.2.1", - "_inBundle": false, - "_integrity": "sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ==", - "_location": "/jest-pnp-resolver", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-pnp-resolver@1.2.1", - "name": "jest-pnp-resolver", - "escapedName": "jest-pnp-resolver", - "rawSpec": "1.2.1", - "saveSpec": null, - "fetchSpec": "1.2.1" - }, - "_requiredBy": [ - "/jest-resolve" - ], - "_resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz", - "_spec": "1.2.1", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/arcanis/jest-pnp-resolver/issues" - }, - "description": "plug'n'play resolver for Webpack", - "engines": { - "node": ">=6" - }, - "homepage": "https://github.com/arcanis/jest-pnp-resolver", - "keywords": [ - "jest", - "yarn", - "plugnplay", - "pnp" - ], - "license": "MIT", - "name": "jest-pnp-resolver", - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - }, - "repository": { - "type": "git", - "url": "git+https://github.com/arcanis/jest-pnp-resolver.git" - }, - "version": "1.2.1" -} diff --git a/node_modules/jest-regex-util/LICENSE b/node_modules/jest-regex-util/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-regex-util/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-regex-util/build/index.d.ts b/node_modules/jest-regex-util/build/index.d.ts deleted file mode 100644 index 46857629..00000000 --- a/node_modules/jest-regex-util/build/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -export declare const escapePathForRegex: (dir: string) => string; -export declare const escapeStrForRegex: (string: string) => string; -export declare const replacePathSepForRegex: (string: string) => string; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-regex-util/build/index.d.ts.map b/node_modules/jest-regex-util/build/index.d.ts.map deleted file mode 100644 index eddb8d22..00000000 --- a/node_modules/jest-regex-util/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,eAAO,MAAM,kBAAkB,yBAO9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,4BACiB,CAAC;AAEhD,eAAO,MAAM,sBAAsB,4BAQlC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-regex-util/build/index.js b/node_modules/jest-regex-util/build/index.js deleted file mode 100644 index f3611a56..00000000 --- a/node_modules/jest-regex-util/build/index.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.replacePathSepForRegex = exports.escapeStrForRegex = exports.escapePathForRegex = void 0; - -var _path = _interopRequireDefault(require('path')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -const escapePathForRegex = dir => { - if (_path.default.sep === '\\') { - // Replace "\" with "/" so it's not escaped by escapeStrForRegex. - // replacePathSepForRegex will convert it back. - dir = dir.replace(/\\/g, '/'); - } - - return replacePathSepForRegex(escapeStrForRegex(dir)); -}; - -exports.escapePathForRegex = escapePathForRegex; - -const escapeStrForRegex = string => - string.replace(/[[\]{}()*+?.\\^$|]/g, '\\$&'); - -exports.escapeStrForRegex = escapeStrForRegex; - -const replacePathSepForRegex = string => { - if (_path.default.sep === '\\') { - return string.replace( - /(\/|(.)?\\(?![[\]{}()*+?.^$|\\]))/g, - (_match, _, p2) => (p2 && p2 !== '\\' ? p2 + '\\\\' : '\\\\') - ); - } - - return string; -}; - -exports.replacePathSepForRegex = replacePathSepForRegex; diff --git a/node_modules/jest-regex-util/package.json b/node_modules/jest-regex-util/package.json deleted file mode 100644 index 3b13c529..00000000 --- a/node_modules/jest-regex-util/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "_args": [ - [ - "jest-regex-util@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-regex-util@24.9.0", - "_id": "jest-regex-util@24.9.0", - "_inBundle": false, - "_integrity": "sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA==", - "_location": "/jest-regex-util", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-regex-util@24.9.0", - "name": "jest-regex-util", - "escapedName": "jest-regex-util", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core", - "/@jest/transform", - "/expect", - "/jest-config", - "/jest-resolve-dependencies", - "/jest-runtime" - ], - "_resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-regex-util", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-regex-util" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-resolve-dependencies/build/index.d.ts b/node_modules/jest-resolve-dependencies/build/index.d.ts deleted file mode 100644 index 6e576bac..00000000 --- a/node_modules/jest-resolve-dependencies/build/index.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { FS as HasteFS } from 'jest-haste-map'; -import Resolver from 'jest-resolve'; -import { SnapshotResolver } from 'jest-snapshot'; -declare namespace DependencyResolver { - type ResolvedModule = { - file: Config.Path; - dependencies: Array; - }; -} -/** - * DependencyResolver is used to resolve the direct dependencies of a module or - * to retrieve a list of all transitive inverse dependencies. - */ -declare class DependencyResolver { - private _hasteFS; - private _resolver; - private _snapshotResolver; - constructor(resolver: Resolver, hasteFS: HasteFS, snapshotResolver: SnapshotResolver); - resolve(file: Config.Path, options?: Resolver.ResolveModuleConfig): Array; - resolveInverseModuleMap(paths: Set, filter: (file: Config.Path) => boolean, options?: Resolver.ResolveModuleConfig): Array; - resolveInverse(paths: Set, filter: (file: Config.Path) => boolean, options?: Resolver.ResolveModuleConfig): Array; -} -export = DependencyResolver; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-resolve-dependencies/build/index.d.ts.map b/node_modules/jest-resolve-dependencies/build/index.d.ts.map deleted file mode 100644 index 4f1eb4ad..00000000 --- a/node_modules/jest-resolve-dependencies/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,EAAE,IAAI,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,QAAQ,MAAM,cAAc,CAAC;AACpC,OAAO,EAAiB,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAE/D,kBAAU,kBAAkB,CAAC;IAC3B,KAAY,cAAc,GAAG;QAC3B,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC;QAClB,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KAClC,CAAC;CACH;AAED;;;GAGG;AAEH,cAAM,kBAAkB;IACtB,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,SAAS,CAAW;IAC5B,OAAO,CAAC,iBAAiB,CAAmB;gBAG1C,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,gBAAgB;IAOpC,OAAO,CACL,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,OAAO,CAAC,EAAE,QAAQ,CAAC,mBAAmB,GACrC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;IA6BrB,uBAAuB,CACrB,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,EACvB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,KAAK,OAAO,EACtC,OAAO,CAAC,EAAE,QAAQ,CAAC,mBAAmB,GACrC,KAAK,CAAC,kBAAkB,CAAC,cAAc,CAAC;IA6D3C,cAAc,CACZ,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,EACvB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,KAAK,OAAO,EACtC,OAAO,CAAC,EAAE,QAAQ,CAAC,mBAAmB,GACrC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;CAKtB;AAED,SAAS,kBAAkB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-resolve-dependencies/build/index.js b/node_modules/jest-resolve-dependencies/build/index.js deleted file mode 100644 index 9cd8b419..00000000 --- a/node_modules/jest-resolve-dependencies/build/index.js +++ /dev/null @@ -1,204 +0,0 @@ -'use strict'; - -function _jestSnapshot() { - const data = require('jest-snapshot'); - - _jestSnapshot = function _jestSnapshot() { - return data; - }; - - return data; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * DependencyResolver is used to resolve the direct dependencies of a module or - * to retrieve a list of all transitive inverse dependencies. - */ - -/* eslint-disable-next-line no-redeclare */ -class DependencyResolver { - constructor(resolver, hasteFS, snapshotResolver) { - _defineProperty(this, '_hasteFS', void 0); - - _defineProperty(this, '_resolver', void 0); - - _defineProperty(this, '_snapshotResolver', void 0); - - this._resolver = resolver; - this._hasteFS = hasteFS; - this._snapshotResolver = snapshotResolver; - } - - resolve(file, options) { - const dependencies = this._hasteFS.getDependencies(file); - - if (!dependencies) { - return []; - } - - return dependencies.reduce((acc, dependency) => { - if (this._resolver.isCoreModule(dependency)) { - return acc; - } - - let resolvedDependency; - - try { - resolvedDependency = this._resolver.resolveModule( - file, - dependency, - options - ); - } catch (e) { - resolvedDependency = this._resolver.getMockModule(file, dependency); - } - - if (resolvedDependency) { - acc.push(resolvedDependency); - } - - return acc; - }, []); - } - - resolveInverseModuleMap(paths, filter, options) { - if (!paths.size) { - return []; - } - - const collectModules = (related, moduleMap, changed) => { - const visitedModules = new Set(); - const result = []; - - while (changed.size) { - changed = new Set( - moduleMap.reduce((acc, module) => { - if ( - visitedModules.has(module.file) || - !module.dependencies.some(dep => changed.has(dep)) - ) { - return acc; - } - - const file = module.file; - - if (filter(file)) { - result.push(module); - related.delete(file); - } - - visitedModules.add(file); - acc.push(file); - return acc; - }, []) - ); - } - - return result.concat( - Array.from(related).map(file => ({ - dependencies: [], - file - })) - ); - }; - - const relatedPaths = new Set(); - const changed = new Set(); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = paths[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const path = _step.value; - - if (this._hasteFS.exists(path)) { - const modulePath = (0, _jestSnapshot().isSnapshotPath)(path) - ? this._snapshotResolver.resolveTestPath(path) - : path; - changed.add(modulePath); - - if (filter(modulePath)) { - relatedPaths.add(modulePath); - } - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - const modules = []; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for ( - var _iterator2 = this._hasteFS - .getAbsoluteFileIterator() - [Symbol.iterator](), - _step2; - !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); - _iteratorNormalCompletion2 = true - ) { - const file = _step2.value; - modules.push({ - dependencies: this.resolve(file, options), - file - }); - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - return collectModules(relatedPaths, modules, changed); - } - - resolveInverse(paths, filter, options) { - return this.resolveInverseModuleMap(paths, filter, options).map( - module => module.file - ); - } -} - -module.exports = DependencyResolver; diff --git a/node_modules/jest-resolve-dependencies/package.json b/node_modules/jest-resolve-dependencies/package.json deleted file mode 100644 index f77ec469..00000000 --- a/node_modules/jest-resolve-dependencies/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_args": [ - [ - "jest-resolve-dependencies@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-resolve-dependencies@24.9.0", - "_id": "jest-resolve-dependencies@24.9.0", - "_inBundle": false, - "_integrity": "sha512-Fm7b6AlWnYhT0BXy4hXpactHIqER7erNgIsIozDXWl5dVm+k8XdGVe1oTg1JyaFnOxarMEbax3wyRJqGP2Pq+g==", - "_location": "/jest-resolve-dependencies", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-resolve-dependencies@24.9.0", - "name": "jest-resolve-dependencies", - "escapedName": "jest-resolve-dependencies", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core" - ], - "_resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/types": "^24.9.0", - "jest-regex-util": "^24.3.0", - "jest-snapshot": "^24.9.0" - }, - "devDependencies": { - "jest-haste-map": "^24.9.0", - "jest-resolve": "^24.9.0", - "jest-runtime": "^24.9.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-resolve-dependencies", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-resolve-dependencies" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-resolve/LICENSE b/node_modules/jest-resolve/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-resolve/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-resolve/build/defaultResolver.d.ts b/node_modules/jest-resolve/build/defaultResolver.d.ts deleted file mode 100644 index 9acd812e..00000000 --- a/node_modules/jest-resolve/build/defaultResolver.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -declare type ResolverOptions = { - basedir: Config.Path; - browser?: boolean; - defaultResolver: typeof defaultResolver; - extensions?: Array; - moduleDirectory?: Array; - paths?: Array; - rootDir?: Config.Path; -}; -export default function defaultResolver(path: Config.Path, options: ResolverOptions): Config.Path; -export declare const clearDefaultResolverCache: () => void; -export {}; -//# sourceMappingURL=defaultResolver.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-resolve/build/defaultResolver.d.ts.map b/node_modules/jest-resolve/build/defaultResolver.d.ts.map deleted file mode 100644 index a5b1c9a3..00000000 --- a/node_modules/jest-resolve/build/defaultResolver.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultResolver.d.ts","sourceRoot":"","sources":["../src/defaultResolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAInC,aAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,eAAe,CAAC;IACxC,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,eAAe,CACrC,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,OAAO,EAAE,eAAe,GACvB,MAAM,CAAC,IAAI,CAgBb;AAED,eAAO,MAAM,yBAAyB,YAErC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-resolve/build/defaultResolver.js b/node_modules/jest-resolve/build/defaultResolver.js deleted file mode 100644 index 9925bdcc..00000000 --- a/node_modules/jest-resolve/build/defaultResolver.js +++ /dev/null @@ -1,253 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = defaultResolver; -exports.clearDefaultResolverCache = void 0; - -function _fs() { - const data = _interopRequireDefault(require('fs')); - - _fs = function _fs() { - return data; - }; - - return data; -} - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _browserResolve() { - const data = _interopRequireDefault(require('browser-resolve')); - - _browserResolve = function _browserResolve() { - return data; - }; - - return data; -} - -function _jestPnpResolver() { - const data = _interopRequireDefault(require('jest-pnp-resolver')); - - _jestPnpResolver = function _jestPnpResolver() { - return data; - }; - - return data; -} - -var _isBuiltinModule = _interopRequireDefault(require('./isBuiltinModule')); - -var _nodeModulesPaths = _interopRequireDefault(require('./nodeModulesPaths')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function defaultResolver(path, options) { - // @ts-ignore: the "pnp" version named isn't in DefinitelyTyped - if (process.versions.pnp) { - return (0, _jestPnpResolver().default)(path, options); - } - - const resolve = options.browser - ? _browserResolve().default.sync - : resolveSync; - return resolve(path, { - basedir: options.basedir, - defaultResolver, - extensions: options.extensions, - moduleDirectory: options.moduleDirectory, - paths: options.paths, - rootDir: options.rootDir - }); -} - -const clearDefaultResolverCache = () => { - checkedPaths.clear(); -}; - -exports.clearDefaultResolverCache = clearDefaultResolverCache; -const REGEX_RELATIVE_IMPORT = /^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[\\\/])/; - -function resolveSync(target, options) { - const basedir = options.basedir; - const extensions = options.extensions || ['.js']; - const paths = options.paths || []; - - if (REGEX_RELATIVE_IMPORT.test(target)) { - // resolve relative import - const resolveTarget = _path().default.resolve(basedir, target); - - const result = tryResolve(resolveTarget); - - if (result) { - return result; - } - } else { - // otherwise search for node_modules - const dirs = (0, _nodeModulesPaths.default)(basedir, { - moduleDirectory: options.moduleDirectory, - paths - }); - - for (let i = 0; i < dirs.length; i++) { - const resolveTarget = _path().default.join(dirs[i], target); - - const result = tryResolve(resolveTarget); - - if (result) { - return result; - } - } - } - - if ((0, _isBuiltinModule.default)(target)) { - return target; - } - - const err = new Error( - "Cannot find module '" + target + "' from '" + basedir + "'" - ); - err.code = 'MODULE_NOT_FOUND'; - throw err; - /* - * contextual helper functions - */ - - function tryResolve(name) { - const dir = _path().default.dirname(name); - - let result; - - if (isDirectory(dir)) { - result = resolveAsFile(name) || resolveAsDirectory(name); - } - - if (result) { - // Dereference symlinks to ensure we don't create a separate - // module instance depending on how it was referenced. - result = _fs().default.realpathSync(result); - } - - return result; - } - - function resolveAsFile(name) { - if (isFile(name)) { - return name; - } - - for (let i = 0; i < extensions.length; i++) { - const file = name + extensions[i]; - - if (isFile(file)) { - return file; - } - } - - return undefined; - } - - function resolveAsDirectory(name) { - if (!isDirectory(name)) { - return undefined; - } - - const pkgfile = _path().default.join(name, 'package.json'); - - let pkgmain; - - try { - const body = _fs().default.readFileSync(pkgfile, 'utf8'); - - pkgmain = JSON.parse(body).main; - } catch (e) {} - - if (pkgmain && !isCurrentDirectory(pkgmain)) { - const resolveTarget = _path().default.resolve(name, pkgmain); - - const result = tryResolve(resolveTarget); - - if (result) { - return result; - } - } - - return resolveAsFile(_path().default.join(name, 'index')); - } -} - -var IPathType; - -(function(IPathType) { - IPathType[(IPathType['FILE'] = 1)] = 'FILE'; - IPathType[(IPathType['DIRECTORY'] = 2)] = 'DIRECTORY'; - IPathType[(IPathType['OTHER'] = 3)] = 'OTHER'; -})(IPathType || (IPathType = {})); - -const checkedPaths = new Map(); - -function statSyncCached(path) { - const result = checkedPaths.get(path); - - if (result !== undefined) { - return result; - } - - let stat; - - try { - stat = _fs().default.statSync(path); - } catch (e) { - if (!(e && (e.code === 'ENOENT' || e.code === 'ENOTDIR'))) { - throw e; - } - } - - if (stat) { - if (stat.isFile() || stat.isFIFO()) { - checkedPaths.set(path, IPathType.FILE); - return IPathType.FILE; - } else if (stat.isDirectory()) { - checkedPaths.set(path, IPathType.DIRECTORY); - return IPathType.DIRECTORY; - } - } - - checkedPaths.set(path, IPathType.OTHER); - return IPathType.OTHER; -} -/* - * helper functions - */ - -function isFile(file) { - return statSyncCached(file) === IPathType.FILE; -} - -function isDirectory(dir) { - return statSyncCached(dir) === IPathType.DIRECTORY; -} - -const CURRENT_DIRECTORY = _path().default.resolve('.'); - -function isCurrentDirectory(testPath) { - return CURRENT_DIRECTORY === _path().default.resolve(testPath); -} diff --git a/node_modules/jest-resolve/build/index.d.ts b/node_modules/jest-resolve/build/index.d.ts deleted file mode 100644 index 1ae77d32..00000000 --- a/node_modules/jest-resolve/build/index.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { ModuleMap } from 'jest-haste-map'; -import { ResolverConfig } from './types'; -declare type FindNodeModuleConfig = { - basedir: Config.Path; - browser?: boolean; - extensions?: Array; - moduleDirectory?: Array; - paths?: Array; - resolver?: Config.Path | null; - rootDir?: Config.Path; -}; -declare type BooleanObject = Record; -declare namespace Resolver { - type ResolveModuleConfig = { - skipNodeResolution?: boolean; - paths?: Array; - }; -} -declare class Resolver { - private readonly _options; - private readonly _moduleMap; - private readonly _moduleIDCache; - private readonly _moduleNameCache; - private readonly _modulePathCache; - private readonly _supportsNativePlatform; - constructor(moduleMap: ModuleMap, options: ResolverConfig); - static clearDefaultResolverCache(): void; - static findNodeModule(path: Config.Path, options: FindNodeModuleConfig): Config.Path | null; - resolveModuleFromDirIfExists(dirname: Config.Path, moduleName: string, options?: Resolver.ResolveModuleConfig): Config.Path | null; - resolveModule(from: Config.Path, moduleName: string, options?: Resolver.ResolveModuleConfig): Config.Path; - isCoreModule(moduleName: string): boolean; - getModule(name: string): Config.Path | null; - getModulePath(from: Config.Path, moduleName: string): string; - getPackage(name: string): Config.Path | null; - getMockModule(from: Config.Path, name: string): Config.Path | null; - getModulePaths(from: Config.Path): Array; - getModuleID(virtualMocks: BooleanObject, from: Config.Path, _moduleName?: string): string; - private _getModuleType; - private _getAbsolutePath; - private _getMockPath; - private _getVirtualMockPath; - private _isModuleResolved; - resolveStubModuleName(from: Config.Path, moduleName: string): Config.Path | null; -} -export = Resolver; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-resolve/build/index.d.ts.map b/node_modules/jest-resolve/build/index.d.ts.map deleted file mode 100644 index a6e6a522..00000000 --- a/node_modules/jest-resolve/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAMzC,OAAO,EAAC,cAAc,EAAC,MAAM,SAAS,CAAC;AAEvC,aAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC;CACvB,CAAC;AAEF,aAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE7C,kBAAU,QAAQ,CAAC;IACjB,KAAY,mBAAmB,GAAG;QAChC,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KAC5B,CAAC;CACH;AAgBD,cAAM,QAAQ;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiB;IAC1C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAY;IACvC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAsB;IACrD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA2B;IAC5D,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAkC;IACnE,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAU;gBAEtC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc;IAuBzD,MAAM,CAAC,yBAAyB;IAIhC,MAAM,CAAC,cAAc,CACnB,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAAC,IAAI,GAAG,IAAI;IAoBrB,4BAA4B,CAC1B,OAAO,EAAE,MAAM,CAAC,IAAI,EACpB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,QAAQ,CAAC,mBAAmB,GACrC,MAAM,CAAC,IAAI,GAAG,IAAI;IAoFrB,aAAa,CACX,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,QAAQ,CAAC,mBAAmB,GACrC,MAAM,CAAC,IAAI;IAkBd,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAIzC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,IAAI,GAAG,IAAI;IAQ3C,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM;IAOnD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,IAAI,GAAG,IAAI;IAQ5C,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,IAAI,GAAG,IAAI;IAalE,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;IAgBrD,WAAW,CACT,YAAY,EAAE,aAAa,EAC3B,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,WAAW,CAAC,EAAE,MAAM,GACnB,MAAM;IAwBT,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,iBAAiB;IAMzB,qBAAqB,CACnB,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,UAAU,EAAE,MAAM,GACjB,MAAM,CAAC,IAAI,GAAG,IAAI;CA4DtB;AA6BD,SAAS,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-resolve/build/index.js b/node_modules/jest-resolve/build/index.js deleted file mode 100644 index 195c0f4d..00000000 --- a/node_modules/jest-resolve/build/index.js +++ /dev/null @@ -1,519 +0,0 @@ -'use strict'; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _realpathNative() { - const data = require('realpath-native'); - - _realpathNative = function _realpathNative() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -var _nodeModulesPaths = _interopRequireDefault(require('./nodeModulesPaths')); - -var _isBuiltinModule = _interopRequireDefault(require('./isBuiltinModule')); - -var _defaultResolver = _interopRequireWildcard(require('./defaultResolver')); - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const NATIVE_PLATFORM = 'native'; // We might be inside a symlink. - -const cwd = process.cwd(); -const resolvedCwd = (0, _realpathNative().sync)(cwd) || cwd; -const NODE_PATH = process.env.NODE_PATH; -const nodePaths = NODE_PATH - ? NODE_PATH.split(_path().default.delimiter) - .filter(Boolean) // The resolver expects absolute paths. - .map(p => _path().default.resolve(resolvedCwd, p)) - : undefined; -/* eslint-disable-next-line no-redeclare */ - -class Resolver { - constructor(moduleMap, options) { - _defineProperty(this, '_options', void 0); - - _defineProperty(this, '_moduleMap', void 0); - - _defineProperty(this, '_moduleIDCache', void 0); - - _defineProperty(this, '_moduleNameCache', void 0); - - _defineProperty(this, '_modulePathCache', void 0); - - _defineProperty(this, '_supportsNativePlatform', void 0); - - this._options = { - browser: options.browser, - defaultPlatform: options.defaultPlatform, - extensions: options.extensions, - hasCoreModules: - options.hasCoreModules === undefined ? true : options.hasCoreModules, - moduleDirectories: options.moduleDirectories || ['node_modules'], - moduleNameMapper: options.moduleNameMapper, - modulePaths: options.modulePaths, - platforms: options.platforms, - resolver: options.resolver, - rootDir: options.rootDir - }; - this._supportsNativePlatform = options.platforms - ? options.platforms.includes(NATIVE_PLATFORM) - : false; - this._moduleMap = moduleMap; - this._moduleIDCache = new Map(); - this._moduleNameCache = new Map(); - this._modulePathCache = new Map(); - } - - static clearDefaultResolverCache() { - (0, _defaultResolver.clearDefaultResolverCache)(); - } - - static findNodeModule(path, options) { - const resolver = options.resolver - ? require(options.resolver) - : _defaultResolver.default; - const paths = options.paths; - - try { - return resolver(path, { - basedir: options.basedir, - browser: options.browser, - defaultResolver: _defaultResolver.default, - extensions: options.extensions, - moduleDirectory: options.moduleDirectory, - paths: paths ? (nodePaths || []).concat(paths) : nodePaths, - rootDir: options.rootDir - }); - } catch (e) {} - - return null; - } - - resolveModuleFromDirIfExists(dirname, moduleName, options) { - const paths = (options && options.paths) || this._options.modulePaths; - const moduleDirectory = this._options.moduleDirectories; - const key = dirname + _path().default.delimiter + moduleName; - const defaultPlatform = this._options.defaultPlatform; - - const extensions = this._options.extensions.slice(); - - let module; - - if (this._supportsNativePlatform) { - extensions.unshift( - ...this._options.extensions.map(ext => '.' + NATIVE_PLATFORM + ext) - ); - } - - if (defaultPlatform) { - extensions.unshift( - ...this._options.extensions.map(ext => '.' + defaultPlatform + ext) - ); - } // 1. If we have already resolved this module for this directory name, - // return a value from the cache. - - const cacheResult = this._moduleNameCache.get(key); - - if (cacheResult) { - return cacheResult; - } // 2. Check if the module is a haste module. - - module = this.getModule(moduleName); - - if (module) { - this._moduleNameCache.set(key, module); - - return module; - } // 3. Check if the module is a node module and resolve it based on - // the node module resolution algorithm. If skipNodeResolution is given we - // ignore all modules that look like node modules (ie. are not relative - // requires). This enables us to speed up resolution when we build a - // dependency graph because we don't have to look at modules that may not - // exist and aren't mocked. - - const skipResolution = - options && - options.skipNodeResolution && - !moduleName.includes(_path().default.sep); - - const resolveNodeModule = name => - Resolver.findNodeModule(name, { - basedir: dirname, - browser: this._options.browser, - extensions, - moduleDirectory, - paths, - resolver: this._options.resolver, - rootDir: this._options.rootDir - }); - - if (!skipResolution) { - module = resolveNodeModule(moduleName); - - if (module) { - this._moduleNameCache.set(key, module); - - return module; - } - } // 4. Resolve "haste packages" which are `package.json` files outside of - // `node_modules` folders anywhere in the file system. - - const parts = moduleName.split('/'); - const hastePackage = this.getPackage(parts.shift()); - - if (hastePackage) { - try { - const module = _path().default.join.apply( - _path().default, - [_path().default.dirname(hastePackage)].concat(parts) - ); // try resolving with custom resolver first to support extensions, - // then fallback to require.resolve - - const resolvedModule = - resolveNodeModule(module) || require.resolve(module); - - this._moduleNameCache.set(key, resolvedModule); - - return resolvedModule; - } catch (ignoredError) {} - } - - return null; - } - - resolveModule(from, moduleName, options) { - const dirname = _path().default.dirname(from); - - const module = - this.resolveStubModuleName(from, moduleName) || - this.resolveModuleFromDirIfExists(dirname, moduleName, options); - if (module) return module; // 5. Throw an error if the module could not be found. `resolve.sync` only - // produces an error based on the dirname but we have the actual current - // module name available. - - const relativePath = _path().default.relative(dirname, from); - - const err = new Error( - `Cannot find module '${moduleName}' from '${relativePath || '.'}'` - ); - err.code = 'MODULE_NOT_FOUND'; - throw err; - } - - isCoreModule(moduleName) { - return ( - this._options.hasCoreModules && (0, _isBuiltinModule.default)(moduleName) - ); - } - - getModule(name) { - return this._moduleMap.getModule( - name, - this._options.defaultPlatform, - this._supportsNativePlatform - ); - } - - getModulePath(from, moduleName) { - if (moduleName[0] !== '.' || _path().default.isAbsolute(moduleName)) { - return moduleName; - } - - return _path().default.normalize( - _path().default.dirname(from) + '/' + moduleName - ); - } - - getPackage(name) { - return this._moduleMap.getPackage( - name, - this._options.defaultPlatform, - this._supportsNativePlatform - ); - } - - getMockModule(from, name) { - const mock = this._moduleMap.getMockModule(name); - - if (mock) { - return mock; - } else { - const moduleName = this.resolveStubModuleName(from, name); - - if (moduleName) { - return this.getModule(moduleName) || moduleName; - } - } - - return null; - } - - getModulePaths(from) { - const cachedModule = this._modulePathCache.get(from); - - if (cachedModule) { - return cachedModule; - } - - const moduleDirectory = this._options.moduleDirectories; - const paths = (0, _nodeModulesPaths.default)(from, { - moduleDirectory - }); - - if (paths[paths.length - 1] === undefined) { - // circumvent node-resolve bug that adds `undefined` as last item. - paths.pop(); - } - - this._modulePathCache.set(from, paths); - - return paths; - } - - getModuleID(virtualMocks, from, _moduleName) { - const moduleName = _moduleName || ''; - const key = from + _path().default.delimiter + moduleName; - - const cachedModuleID = this._moduleIDCache.get(key); - - if (cachedModuleID) { - return cachedModuleID; - } - - const moduleType = this._getModuleType(moduleName); - - const absolutePath = this._getAbsolutePath(virtualMocks, from, moduleName); - - const mockPath = this._getMockPath(from, moduleName); - - const sep = _path().default.delimiter; - - const id = - moduleType + - sep + - (absolutePath ? absolutePath + sep : '') + - (mockPath ? mockPath + sep : ''); - - this._moduleIDCache.set(key, id); - - return id; - } - - _getModuleType(moduleName) { - return this.isCoreModule(moduleName) ? 'node' : 'user'; - } - - _getAbsolutePath(virtualMocks, from, moduleName) { - if (this.isCoreModule(moduleName)) { - return moduleName; - } - - return this._isModuleResolved(from, moduleName) - ? this.getModule(moduleName) - : this._getVirtualMockPath(virtualMocks, from, moduleName); - } - - _getMockPath(from, moduleName) { - return !this.isCoreModule(moduleName) - ? this.getMockModule(from, moduleName) - : null; - } - - _getVirtualMockPath(virtualMocks, from, moduleName) { - const virtualMockPath = this.getModulePath(from, moduleName); - return virtualMocks[virtualMockPath] - ? virtualMockPath - : moduleName - ? this.resolveModule(from, moduleName) - : from; - } - - _isModuleResolved(from, moduleName) { - return !!( - this.getModule(moduleName) || this.getMockModule(from, moduleName) - ); - } - - resolveStubModuleName(from, moduleName) { - const dirname = _path().default.dirname(from); - - const paths = this._options.modulePaths; - - const extensions = this._options.extensions.slice(); - - const moduleDirectory = this._options.moduleDirectories; - const moduleNameMapper = this._options.moduleNameMapper; - const resolver = this._options.resolver; - const defaultPlatform = this._options.defaultPlatform; - - if (this._supportsNativePlatform) { - extensions.unshift( - ...this._options.extensions.map(ext => '.' + NATIVE_PLATFORM + ext) - ); - } - - if (defaultPlatform) { - extensions.unshift( - ...this._options.extensions.map(ext => '.' + defaultPlatform + ext) - ); - } - - if (moduleNameMapper) { - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = moduleNameMapper[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const _step$value = _step.value, - mappedModuleName = _step$value.moduleName, - regex = _step$value.regex; - - if (regex.test(moduleName)) { - // Note: once a moduleNameMapper matches the name, it must result - // in a module, or else an error is thrown. - const matches = moduleName.match(regex); - const updatedName = matches - ? mappedModuleName.replace( - /\$([0-9]+)/g, - (_, index) => matches[parseInt(index, 10)] - ) - : mappedModuleName; - const module = - this.getModule(updatedName) || - Resolver.findNodeModule(updatedName, { - basedir: dirname, - browser: this._options.browser, - extensions, - moduleDirectory, - paths, - resolver, - rootDir: this._options.rootDir - }); - - if (!module) { - throw createNoMappedModuleFoundError( - moduleName, - updatedName, - mappedModuleName, - regex, - resolver - ); - } - - return module; - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - } - - return null; - } -} - -const createNoMappedModuleFoundError = ( - moduleName, - updatedName, - mappedModuleName, - regex, - resolver -) => { - const error = new Error( - _chalk().default.red(`${_chalk().default.bold('Configuration error')}: - -Could not locate module ${_chalk().default.bold(moduleName)} mapped as: -${_chalk().default.bold(updatedName)}. - -Please check your configuration for these entries: -{ - "moduleNameMapper": { - "${regex.toString()}": "${_chalk().default.bold(mappedModuleName)}" - }, - "resolver": ${_chalk().default.bold(String(resolver))} -}`) - ); - error.name = ''; - return error; -}; - -module.exports = Resolver; diff --git a/node_modules/jest-resolve/build/isBuiltinModule.d.ts b/node_modules/jest-resolve/build/isBuiltinModule.d.ts deleted file mode 100644 index 4d4aabbe..00000000 --- a/node_modules/jest-resolve/build/isBuiltinModule.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default function isBuiltinModule(module: string): boolean; -//# sourceMappingURL=isBuiltinModule.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-resolve/build/isBuiltinModule.d.ts.map b/node_modules/jest-resolve/build/isBuiltinModule.d.ts.map deleted file mode 100644 index e664961d..00000000 --- a/node_modules/jest-resolve/build/isBuiltinModule.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isBuiltinModule.d.ts","sourceRoot":"","sources":["../src/isBuiltinModule.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAmBH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE/D"} \ No newline at end of file diff --git a/node_modules/jest-resolve/build/isBuiltinModule.js b/node_modules/jest-resolve/build/isBuiltinModule.js deleted file mode 100644 index a4c9f503..00000000 --- a/node_modules/jest-resolve/build/isBuiltinModule.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = isBuiltinModule; - -function _module2() { - const data = _interopRequireDefault(require('module')); - - _module2 = function _module2() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const EXPERIMENTAL_MODULES = ['worker_threads']; -const BUILTIN_MODULES = new Set( - _module2().default.builtinModules - ? _module2().default.builtinModules.concat(EXPERIMENTAL_MODULES) - : Object.keys(process.binding('natives')) - .filter(module => !/^internal\//.test(module)) - .concat(EXPERIMENTAL_MODULES) -); - -function isBuiltinModule(module) { - return BUILTIN_MODULES.has(module); -} diff --git a/node_modules/jest-resolve/build/nodeModulesPaths.d.ts b/node_modules/jest-resolve/build/nodeModulesPaths.d.ts deleted file mode 100644 index 1a0627c7..00000000 --- a/node_modules/jest-resolve/build/nodeModulesPaths.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * Adapted from: https://github.com/substack/node-resolve - */ -import { Config } from '@jest/types'; -declare type NodeModulesPathsOptions = { - moduleDirectory?: Array; - paths?: Array; -}; -export default function nodeModulesPaths(basedir: Config.Path, options: NodeModulesPathsOptions): Array; -export {}; -//# sourceMappingURL=nodeModulesPaths.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-resolve/build/nodeModulesPaths.d.ts.map b/node_modules/jest-resolve/build/nodeModulesPaths.d.ts.map deleted file mode 100644 index 2df737af..00000000 --- a/node_modules/jest-resolve/build/nodeModulesPaths.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"nodeModulesPaths.d.ts","sourceRoot":"","sources":["../src/nodeModulesPaths.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAGnC,aAAK,uBAAuB,GAAG;IAC7B,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CAC5B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,OAAO,EAAE,MAAM,CAAC,IAAI,EACpB,OAAO,EAAE,uBAAuB,GAC/B,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAmDpB"} \ No newline at end of file diff --git a/node_modules/jest-resolve/build/nodeModulesPaths.js b/node_modules/jest-resolve/build/nodeModulesPaths.js deleted file mode 100644 index 8d9d10f0..00000000 --- a/node_modules/jest-resolve/build/nodeModulesPaths.js +++ /dev/null @@ -1,92 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = nodeModulesPaths; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _realpathNative() { - const data = require('realpath-native'); - - _realpathNative = function _realpathNative() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * Adapted from: https://github.com/substack/node-resolve - */ -function nodeModulesPaths(basedir, options) { - const modules = - options && options.moduleDirectory - ? Array.from(options.moduleDirectory) - : ['node_modules']; // ensure that `basedir` is an absolute path at this point, - // resolving against the process' current working directory - - const basedirAbs = _path().default.resolve(basedir); - - let prefix = '/'; - - if (/^([A-Za-z]:)/.test(basedirAbs)) { - prefix = ''; - } else if (/^\\\\/.test(basedirAbs)) { - prefix = '\\\\'; - } // The node resolution algorithm (as implemented by NodeJS and TypeScript) - // traverses parents of the physical path, not the symlinked path - - let physicalBasedir; - - try { - physicalBasedir = (0, _realpathNative().sync)(basedirAbs); - } catch (err) { - // realpath can throw, e.g. on mapped drives - physicalBasedir = basedirAbs; - } - - const paths = [physicalBasedir]; - - let parsed = _path().default.parse(physicalBasedir); - - while (parsed.dir !== paths[paths.length - 1]) { - paths.push(parsed.dir); - parsed = _path().default.parse(parsed.dir); - } - - const dirs = paths - .reduce( - (dirs, aPath) => - dirs.concat( - modules.map(moduleDir => - _path().default.isAbsolute(moduleDir) - ? aPath === basedirAbs - ? moduleDir - : '' - : _path().default.join(prefix, aPath, moduleDir) - ) - ), - [] - ) - .filter(dir => dir !== ''); - return options.paths ? dirs.concat(options.paths) : dirs; -} diff --git a/node_modules/jest-resolve/build/types.d.ts b/node_modules/jest-resolve/build/types.d.ts deleted file mode 100644 index 4d0e031d..00000000 --- a/node_modules/jest-resolve/build/types.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export declare type ResolverConfig = { - browser?: boolean; - defaultPlatform?: string | null; - extensions: Array; - hasCoreModules: boolean; - moduleDirectories: Array; - moduleNameMapper?: Array | null; - modulePaths: Array; - platforms?: Array; - resolver?: Config.Path | null; - rootDir: Config.Path; -}; -declare type ModuleNameMapperConfig = { - regex: RegExp; - moduleName: string; -}; -export {}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-resolve/build/types.d.ts.map b/node_modules/jest-resolve/build/types.d.ts.map deleted file mode 100644 index 143373f7..00000000 --- a/node_modules/jest-resolve/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,oBAAY,cAAc,GAAG;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,gBAAgB,CAAC,EAAE,KAAK,CAAC,sBAAsB,CAAC,GAAG,IAAI,CAAC;IACxD,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChC,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC;CACtB,CAAC;AAEF,aAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-resolve/build/types.js b/node_modules/jest-resolve/build/types.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/jest-resolve/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/jest-resolve/package.json b/node_modules/jest-resolve/package.json deleted file mode 100644 index 7c593405..00000000 --- a/node_modules/jest-resolve/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_args": [ - [ - "jest-resolve@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-resolve@24.9.0", - "_id": "jest-resolve@24.9.0", - "_inBundle": false, - "_integrity": "sha512-TaLeLVL1l08YFZAt3zaPtjiVvyy4oSA6CRe+0AFPPVX3Q/VI0giIWWoAvoS5L96vj9Dqxj4fB5p2qrHCmTU/MQ==", - "_location": "/jest-resolve", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-resolve@24.9.0", - "name": "jest-resolve", - "escapedName": "jest-resolve", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core", - "/@jest/reporters", - "/jest-config", - "/jest-runner", - "/jest-runtime", - "/jest-snapshot" - ], - "_resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/types": "^24.9.0", - "browser-resolve": "^1.11.3", - "chalk": "^2.0.1", - "jest-pnp-resolver": "^1.2.1", - "realpath-native": "^1.1.0" - }, - "devDependencies": { - "@types/browser-resolve": "^0.0.5", - "jest-haste-map": "^24.9.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-resolve", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-resolve" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-runner/build/index.d.ts b/node_modules/jest-runner/build/index.d.ts deleted file mode 100644 index ec90986a..00000000 --- a/node_modules/jest-runner/build/index.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { OnTestFailure as JestOnTestFailure, OnTestStart as JestOnTestStart, OnTestSuccess as JestOnTestSuccess, Test as JestTest, TestRunnerContext as JestTestRunnerContext, TestRunnerOptions as JestTestRunnerOptions, TestWatcher as JestTestWatcher } from './types'; -declare namespace TestRunner { - type Test = JestTest; - type OnTestFailure = JestOnTestFailure; - type OnTestStart = JestOnTestStart; - type OnTestSuccess = JestOnTestSuccess; - type TestWatcher = JestTestWatcher; - type TestRunnerContext = JestTestRunnerContext; - type TestRunnerOptions = JestTestRunnerOptions; -} -declare class TestRunner { - private _globalConfig; - private _context; - constructor(globalConfig: Config.GlobalConfig, context?: JestTestRunnerContext); - runTests(tests: Array, watcher: JestTestWatcher, onStart: JestOnTestStart, onResult: JestOnTestSuccess, onFailure: JestOnTestFailure, options: JestTestRunnerOptions): Promise; - private _createInBandTestRun; - private _createParallelTestRun; -} -export = TestRunner; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-runner/build/index.d.ts.map b/node_modules/jest-runner/build/index.d.ts.map deleted file mode 100644 index 3252da3a..00000000 --- a/node_modules/jest-runner/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAOnC,OAAO,EACL,aAAa,IAAI,iBAAiB,EAClC,WAAW,IAAI,eAAe,EAC9B,aAAa,IAAI,iBAAiB,EAClC,IAAI,IAAI,QAAQ,EAChB,iBAAiB,IAAI,qBAAqB,EAC1C,iBAAiB,IAAI,qBAAqB,EAC1C,WAAW,IAAI,eAAe,EAE/B,MAAM,SAAS,CAAC;AAQjB,kBAAU,UAAU,CAAC;IACnB,KAAY,IAAI,GAAG,QAAQ,CAAC;IAC5B,KAAY,aAAa,GAAG,iBAAiB,CAAC;IAC9C,KAAY,WAAW,GAAG,eAAe,CAAC;IAC1C,KAAY,aAAa,GAAG,iBAAiB,CAAC;IAC9C,KAAY,WAAW,GAAG,eAAe,CAAC;IAC1C,KAAY,iBAAiB,GAAG,qBAAqB,CAAC;IACtD,KAAY,iBAAiB,GAAG,qBAAqB,CAAC;CACvD;AAGD,cAAM,UAAU;IACd,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,QAAQ,CAAwB;gBAGtC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,OAAO,CAAC,EAAE,qBAAqB;IAM3B,QAAQ,CACZ,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,EACtB,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,iBAAiB,EAC3B,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC;YAYF,oBAAoB;YAkCpB,sBAAsB;CAuFrC;AASD,SAAS,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-runner/build/index.js b/node_modules/jest-runner/build/index.js deleted file mode 100644 index c116a8ca..00000000 --- a/node_modules/jest-runner/build/index.js +++ /dev/null @@ -1,298 +0,0 @@ -'use strict'; - -function _exit() { - const data = _interopRequireDefault(require('exit')); - - _exit = function _exit() { - return data; - }; - - return data; -} - -function _throat() { - const data = _interopRequireDefault(require('throat')); - - _throat = function _throat() { - return data; - }; - - return data; -} - -function _jestWorker() { - const data = _interopRequireDefault(require('jest-worker')); - - _jestWorker = function _jestWorker() { - return data; - }; - - return data; -} - -var _runTest = _interopRequireDefault(require('./runTest')); - -var _testWorker = require('./testWorker'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const TEST_WORKER_PATH = require.resolve('./testWorker'); - -/* eslint-disable-next-line no-redeclare */ -class TestRunner { - constructor(globalConfig, context) { - _defineProperty(this, '_globalConfig', void 0); - - _defineProperty(this, '_context', void 0); - - this._globalConfig = globalConfig; - this._context = context || {}; - } - - runTests(tests, watcher, onStart, onResult, onFailure, options) { - var _this = this; - - return _asyncToGenerator(function*() { - return yield options.serial - ? _this._createInBandTestRun( - tests, - watcher, - onStart, - onResult, - onFailure - ) - : _this._createParallelTestRun( - tests, - watcher, - onStart, - onResult, - onFailure - ); - })(); - } - - _createInBandTestRun(tests, watcher, onStart, onResult, onFailure) { - var _this2 = this; - - return _asyncToGenerator(function*() { - process.env.JEST_WORKER_ID = '1'; - const mutex = (0, _throat().default)(1); - return tests.reduce( - (promise, test) => - mutex(() => - promise - .then( - /*#__PURE__*/ - _asyncToGenerator(function*() { - if (watcher.isInterrupted()) { - throw new CancelRun(); - } - - yield onStart(test); - return (0, - _runTest.default)(test.path, _this2._globalConfig, test.context.config, test.context.resolver, _this2._context); - }) - ) - .then(result => onResult(test, result)) - .catch(err => onFailure(test, err)) - ), - Promise.resolve() - ); - })(); - } - - _createParallelTestRun(tests, watcher, onStart, onResult, onFailure) { - var _this3 = this; - - return _asyncToGenerator(function*() { - const resolvers = new Map(); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = tests[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const test = _step.value; - - if (!resolvers.has(test.context.config.name)) { - resolvers.set(test.context.config.name, { - config: test.context.config, - serializableModuleMap: test.context.moduleMap.toJSON() - }); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - const worker = new (_jestWorker()).default(TEST_WORKER_PATH, { - exposedMethods: ['worker'], - forkOptions: { - stdio: 'pipe' - }, - maxRetries: 3, - numWorkers: _this3._globalConfig.maxWorkers, - setupArgs: [ - { - serializableResolvers: Array.from(resolvers.values()) - } - ] - }); - if (worker.getStdout()) worker.getStdout().pipe(process.stdout); - if (worker.getStderr()) worker.getStderr().pipe(process.stderr); - const mutex = (0, _throat().default)(_this3._globalConfig.maxWorkers); // Send test suites to workers continuously instead of all at once to track - // the start time of individual tests. - - const runTestInWorker = test => - mutex( - /*#__PURE__*/ - _asyncToGenerator(function*() { - if (watcher.isInterrupted()) { - return Promise.reject(); - } - - yield onStart(test); - return worker.worker({ - config: test.context.config, - context: _objectSpread({}, _this3._context, { - changedFiles: - _this3._context.changedFiles && - Array.from(_this3._context.changedFiles) - }), - globalConfig: _this3._globalConfig, - path: test.path - }); - }) - ); - - const onError = - /*#__PURE__*/ - (function() { - var _ref3 = _asyncToGenerator(function*(err, test) { - yield onFailure(test, err); - - if (err.type === 'ProcessTerminatedError') { - console.error( - 'A worker process has quit unexpectedly! ' + - 'Most likely this is an initialization error.' - ); - (0, _exit().default)(1); - } - }); - - return function onError(_x, _x2) { - return _ref3.apply(this, arguments); - }; - })(); - - const onInterrupt = new Promise((_, reject) => { - watcher.on('change', state => { - if (state.interrupted) { - reject(new CancelRun()); - } - }); - }); - const runAllTests = Promise.all( - tests.map(test => - runTestInWorker(test) - .then(testResult => onResult(test, testResult)) - .catch(error => onError(error, test)) - ) - ); - - const cleanup = () => worker.end(); - - return Promise.race([runAllTests, onInterrupt]).then(cleanup, cleanup); - })(); - } -} - -class CancelRun extends Error { - constructor(message) { - super(message); - this.name = 'CancelRun'; - } -} - -module.exports = TestRunner; diff --git a/node_modules/jest-runner/build/runTest.d.ts b/node_modules/jest-runner/build/runTest.d.ts deleted file mode 100644 index b8414f72..00000000 --- a/node_modules/jest-runner/build/runTest.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { Config } from '@jest/types'; -import { TestResult } from '@jest/test-result'; -import Resolver from 'jest-resolve'; -import { TestRunnerContext } from './types'; -export default function runTest(path: Config.Path, globalConfig: Config.GlobalConfig, config: Config.ProjectConfig, resolver: Resolver, context?: TestRunnerContext): Promise; -//# sourceMappingURL=runTest.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-runner/build/runTest.d.ts.map b/node_modules/jest-runner/build/runTest.d.ts.map deleted file mode 100644 index 865ad600..00000000 --- a/node_modules/jest-runner/build/runTest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"runTest.d.ts","sourceRoot":"","sources":["../src/runTest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAc7C,OAAO,QAAQ,MAAM,cAAc,CAAC;AAQpC,OAAO,EAAgB,iBAAiB,EAAC,MAAM,SAAS,CAAC;AA4PzD,wBAA8B,OAAO,CACnC,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,QAAQ,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,UAAU,CAAC,CAoBrB"} \ No newline at end of file diff --git a/node_modules/jest-runner/build/runTest.js b/node_modules/jest-runner/build/runTest.js deleted file mode 100644 index 1e68712a..00000000 --- a/node_modules/jest-runner/build/runTest.js +++ /dev/null @@ -1,482 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = runTest; - -function _console() { - const data = require('@jest/console'); - - _console = function _console() { - return data; - }; - - return data; -} - -function _gracefulFs() { - const data = _interopRequireDefault(require('graceful-fs')); - - _gracefulFs = function _gracefulFs() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _jestLeakDetector() { - const data = _interopRequireDefault(require('jest-leak-detector')); - - _jestLeakDetector = function _jestLeakDetector() { - return data; - }; - - return data; -} - -function _jestConfig() { - const data = require('jest-config'); - - _jestConfig = function _jestConfig() { - return data; - }; - - return data; -} - -function docblock() { - const data = _interopRequireWildcard(require('jest-docblock')); - - docblock = function docblock() { - return data; - }; - - return data; -} - -function _jestMessageUtil() { - const data = require('jest-message-util'); - - _jestMessageUtil = function _jestMessageUtil() { - return data; - }; - - return data; -} - -function _sourceMapSupport() { - const data = _interopRequireDefault(require('source-map-support')); - - _sourceMapSupport = function _sourceMapSupport() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -function freezeConsole(testConsole, config) { - // @ts-ignore: `_log` is `private` - we should figure out some proper API here - testConsole._log = function fakeConsolePush(_type, message) { - const error = new (_jestUtil()).ErrorWithStack( - `${_chalk().default.red( - `${_chalk().default.bold( - 'Cannot log after tests are done.' - )} Did you forget to wait for something async in your test?` - )}\nAttempted to log "${message}".`, - fakeConsolePush - ); - const formattedError = (0, _jestMessageUtil().formatExecError)( - error, - config, - { - noStackTrace: false - }, - undefined, - true - ); - process.stderr.write('\n' + formattedError + '\n'); // TODO: set exit code in Jest 25 - // process.exitCode = 1; - }; -} // Keeping the core of "runTest" as a separate function (as "runTestInternal") -// is key to be able to detect memory leaks. Since all variables are local to -// the function, when "runTestInternal" finishes its execution, they can all be -// freed, UNLESS something else is leaking them (and that's why we can detect -// the leak!). -// -// If we had all the code in a single function, we should manually nullify all -// references to verify if there is a leak, which is not maintainable and error -// prone. That's why "runTestInternal" CANNOT be inlined inside "runTest". - -function runTestInternal(_x, _x2, _x3, _x4, _x5) { - return _runTestInternal.apply(this, arguments); -} - -function _runTestInternal() { - _runTestInternal = _asyncToGenerator(function*( - path, - globalConfig, - config, - resolver, - context - ) { - const testSource = _gracefulFs().default.readFileSync(path, 'utf8'); - - const docblockPragmas = docblock().parse(docblock().extract(testSource)); - const customEnvironment = docblockPragmas['jest-environment']; - let testEnvironment = config.testEnvironment; - - if (customEnvironment) { - if (Array.isArray(customEnvironment)) { - throw new Error( - `You can only define a single test environment through docblocks, got "${customEnvironment.join( - ', ' - )}"` - ); - } - - testEnvironment = (0, _jestConfig().getTestEnvironment)( - _objectSpread({}, config, { - testEnvironment: customEnvironment - }) - ); - } - - const TestEnvironment = (0, _jestUtil().interopRequireDefault)( - require(testEnvironment) - ).default; - const testFramework = - process.env.JEST_CIRCUS === '1' - ? require('jest-circus/runner') // eslint-disable-line import/no-extraneous-dependencies - : require(config.testRunner); - const Runtime = config.moduleLoader - ? require(config.moduleLoader) - : require('jest-runtime'); - let runtime = undefined; - const consoleOut = globalConfig.useStderr ? process.stderr : process.stdout; - - const consoleFormatter = (type, message) => - (0, _console().getConsoleOutput)( - config.cwd, - !!globalConfig.verbose, // 4 = the console call is buried 4 stack frames deep - _console().BufferedConsole.write( - [], - type, - message, - 4, - runtime && runtime.getSourceMaps() - ) - ); - - let testConsole; - - if (globalConfig.silent) { - testConsole = new (_console()).NullConsole( - consoleOut, - consoleOut, - consoleFormatter - ); - } else if (globalConfig.verbose) { - testConsole = new (_console()).CustomConsole( - consoleOut, - consoleOut, - consoleFormatter - ); - } else { - testConsole = new (_console()).BufferedConsole( - () => runtime && runtime.getSourceMaps() - ); - } - - const environment = new TestEnvironment(config, { - console: testConsole, - docblockPragmas, - testPath: path - }); - const leakDetector = config.detectLeaks - ? new (_jestLeakDetector()).default(environment) - : null; - const cacheFS = { - [path]: testSource - }; - (0, _jestUtil().setGlobal)(environment.global, 'console', testConsole); - runtime = new Runtime(config, environment, resolver, cacheFS, { - changedFiles: context && context.changedFiles, - collectCoverage: globalConfig.collectCoverage, - collectCoverageFrom: globalConfig.collectCoverageFrom, - collectCoverageOnlyFrom: globalConfig.collectCoverageOnlyFrom - }); - const start = Date.now(); - const sourcemapOptions = { - environment: 'node', - handleUncaughtExceptions: false, - retrieveSourceMap: source => { - const sourceMaps = runtime && runtime.getSourceMaps(); - const sourceMapSource = sourceMaps && sourceMaps[source]; - - if (sourceMapSource) { - try { - return { - map: JSON.parse( - _gracefulFs().default.readFileSync(sourceMapSource, 'utf8') - ), - url: source - }; - } catch (e) {} - } - - return null; - } - }; // For tests - - runtime - .requireInternalModule( - require.resolve('source-map-support'), - 'source-map-support' - ) - .install(sourcemapOptions); // For runtime errors - - _sourceMapSupport().default.install(sourcemapOptions); - - if ( - environment.global && - environment.global.process && - environment.global.process.exit - ) { - const realExit = environment.global.process.exit; - - environment.global.process.exit = function exit(...args) { - const error = new (_jestUtil()).ErrorWithStack( - `process.exit called with "${args.join(', ')}"`, - exit - ); - const formattedError = (0, _jestMessageUtil().formatExecError)( - error, - config, - { - noStackTrace: false - }, - undefined, - true - ); - process.stderr.write(formattedError); - return realExit(...args); - }; - } - - try { - yield environment.setup(); - let result; - - try { - result = yield testFramework( - globalConfig, - config, - environment, - runtime, - path - ); - } catch (err) { - // Access stack before uninstalling sourcemaps - err.stack; - throw err; - } - - freezeConsole(testConsole, config); - const testCount = - result.numPassingTests + - result.numFailingTests + - result.numPendingTests + - result.numTodoTests; - result.perfStats = { - end: Date.now(), - start - }; - result.testFilePath = path; - result.console = testConsole.getBuffer(); - result.skipped = testCount === result.numPendingTests; - result.displayName = config.displayName; - const coverage = runtime.getAllCoverageInfoCopy(); - - if (coverage) { - const coverageKeys = Object.keys(coverage); - - if (coverageKeys.length) { - result.coverage = coverage; - result.sourceMaps = runtime.getSourceMapInfo(new Set(coverageKeys)); - } - } - - if (globalConfig.logHeapUsage) { - if (global.gc) { - global.gc(); - } - - result.memoryUsage = process.memoryUsage().heapUsed; - } // Delay the resolution to allow log messages to be output. - - return new Promise(resolve => { - setImmediate(() => - resolve({ - leakDetector, - result - }) - ); - }); - } finally { - yield environment.teardown(); - - _sourceMapSupport().default.resetRetrieveHandlers(); - } - }); - return _runTestInternal.apply(this, arguments); -} - -function runTest(_x6, _x7, _x8, _x9, _x10) { - return _runTest.apply(this, arguments); -} - -function _runTest() { - _runTest = _asyncToGenerator(function*( - path, - globalConfig, - config, - resolver, - context - ) { - const _ref = yield runTestInternal( - path, - globalConfig, - config, - resolver, - context - ), - leakDetector = _ref.leakDetector, - result = _ref.result; - - if (leakDetector) { - // We wanna allow a tiny but time to pass to allow last-minute cleanup - yield new Promise(resolve => setTimeout(resolve, 100)); // Resolve leak detector, outside the "runTestInternal" closure. - - result.leaks = leakDetector.isLeaking(); - } else { - result.leaks = false; - } - - return result; - }); - return _runTest.apply(this, arguments); -} diff --git a/node_modules/jest-runner/build/testWorker.d.ts b/node_modules/jest-runner/build/testWorker.d.ts deleted file mode 100644 index dc26a1d2..00000000 --- a/node_modules/jest-runner/build/testWorker.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { Config } from '@jest/types'; -import { TestResult } from '@jest/test-result'; -import { SerializableModuleMap } from 'jest-haste-map'; -import { TestRunnerSerializedContext } from './types'; -export declare type SerializableResolver = { - config: Config.ProjectConfig; - serializableModuleMap: SerializableModuleMap; -}; -declare type WorkerData = { - config: Config.ProjectConfig; - globalConfig: Config.GlobalConfig; - path: Config.Path; - context?: TestRunnerSerializedContext; -}; -export declare function setup(setupData: { - serializableResolvers: Array; -}): void; -export declare function worker({ config, globalConfig, path, context, }: WorkerData): Promise; -export {}; -//# sourceMappingURL=testWorker.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-runner/build/testWorker.d.ts.map b/node_modules/jest-runner/build/testWorker.d.ts.map deleted file mode 100644 index 51872dca..00000000 --- a/node_modules/jest-runner/build/testWorker.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"testWorker.d.ts","sourceRoot":"","sources":["../src/testWorker.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAoB,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAChE,OAAiB,EAAC,qBAAqB,EAAC,MAAM,gBAAgB,CAAC;AAK/D,OAAO,EAAgB,2BAA2B,EAAC,MAAM,SAAS,CAAC;AAGnE,oBAAY,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;IAC7B,qBAAqB,EAAE,qBAAqB,CAAC;CAC9C,CAAC;AAEF,aAAK,UAAU,GAAG;IAChB,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC;IAClB,OAAO,CAAC,EAAE,2BAA2B,CAAC;CACvC,CAAC;AAmCF,wBAAgB,KAAK,CAAC,SAAS,EAAE;IAC/B,qBAAqB,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC;CACpD,QASA;AAED,wBAAsB,MAAM,CAAC,EAC3B,MAAM,EACN,YAAY,EACZ,IAAI,EACJ,OAAO,GACR,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAelC"} \ No newline at end of file diff --git a/node_modules/jest-runner/build/testWorker.js b/node_modules/jest-runner/build/testWorker.js deleted file mode 100644 index b504a0c7..00000000 --- a/node_modules/jest-runner/build/testWorker.js +++ /dev/null @@ -1,222 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.setup = setup; -exports.worker = worker; - -function _jestHasteMap() { - const data = _interopRequireDefault(require('jest-haste-map')); - - _jestHasteMap = function _jestHasteMap() { - return data; - }; - - return data; -} - -function _exit() { - const data = _interopRequireDefault(require('exit')); - - _exit = function _exit() { - return data; - }; - - return data; -} - -function _jestMessageUtil() { - const data = require('jest-message-util'); - - _jestMessageUtil = function _jestMessageUtil() { - return data; - }; - - return data; -} - -function _jestRuntime() { - const data = _interopRequireDefault(require('jest-runtime')); - - _jestRuntime = function _jestRuntime() { - return data; - }; - - return data; -} - -var _runTest = _interopRequireDefault(require('./runTest')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -// Make sure uncaught errors are logged before we exit. -process.on('uncaughtException', err => { - console.error(err.stack); - (0, _exit().default)(1); -}); - -const formatError = error => { - if (typeof error === 'string') { - const _separateMessageFromS = (0, - _jestMessageUtil().separateMessageFromStack)(error), - message = _separateMessageFromS.message, - stack = _separateMessageFromS.stack; - - return { - message, - stack, - type: 'Error' - }; - } - - return { - code: error.code || undefined, - message: error.message, - stack: error.stack, - type: 'Error' - }; -}; - -const resolvers = new Map(); - -const getResolver = config => { - const resolver = resolvers.get(config.name); - - if (!resolver) { - throw new Error('Cannot find resolver for: ' + config.name); - } - - return resolver; -}; - -function setup(setupData) { - // Module maps that will be needed for the test runs are passed. - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = setupData.serializableResolvers[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const _step$value = _step.value, - config = _step$value.config, - serializableModuleMap = _step$value.serializableModuleMap; - - const moduleMap = _jestHasteMap().default.ModuleMap.fromJSON( - serializableModuleMap - ); - - resolvers.set( - config.name, - _jestRuntime().default.createResolver(config, moduleMap) - ); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } -} - -function worker(_x) { - return _worker.apply(this, arguments); -} - -function _worker() { - _worker = _asyncToGenerator(function*({config, globalConfig, path, context}) { - try { - return yield (0, _runTest.default)( - path, - globalConfig, - config, - getResolver(config), - context && - _objectSpread({}, context, { - changedFiles: context.changedFiles && new Set(context.changedFiles) - }) - ); - } catch (error) { - throw formatError(error); - } - }); - return _worker.apply(this, arguments); -} diff --git a/node_modules/jest-runner/build/types.d.ts b/node_modules/jest-runner/build/types.d.ts deleted file mode 100644 index d112928f..00000000 --- a/node_modules/jest-runner/build/types.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { EventEmitter } from 'events'; -import { Config } from '@jest/types'; -import { SerializableError, TestResult } from '@jest/test-result'; -import { JestEnvironment } from '@jest/environment'; -import { ModuleMap, FS as HasteFS } from 'jest-haste-map'; -import HasteResolver from 'jest-resolve'; -import Runtime from 'jest-runtime'; -export declare type ErrorWithCode = Error & { - code?: string; -}; -export declare type Test = { - context: Context; - duration?: number; - path: Config.Path; -}; -export declare type Context = { - config: Config.ProjectConfig; - hasteFS: HasteFS; - moduleMap: ModuleMap; - resolver: HasteResolver; -}; -export declare type OnTestStart = (test: Test) => Promise; -export declare type OnTestFailure = (test: Test, serializableError: SerializableError) => Promise; -export declare type OnTestSuccess = (test: Test, testResult: TestResult) => Promise; -export declare type TestFramework = (globalConfig: Config.GlobalConfig, config: Config.ProjectConfig, environment: JestEnvironment, runtime: Runtime, testPath: string) => Promise; -export declare type TestRunnerOptions = { - serial: boolean; -}; -export declare type TestRunnerContext = { - changedFiles?: Set; -}; -export declare type TestRunnerSerializedContext = { - changedFiles?: Array; -}; -export declare type WatcherState = { - interrupted: boolean; -}; -export interface TestWatcher extends EventEmitter { - state: WatcherState; - new ({ isWatchMode }: { - isWatchMode: boolean; - }): TestWatcher; - setState(state: WatcherState): void; - isInterrupted(): boolean; - isWatchMode(): boolean; -} -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-runner/build/types.d.ts.map b/node_modules/jest-runner/build/types.d.ts.map deleted file mode 100644 index 8475dd9e..00000000 --- a/node_modules/jest-runner/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,iBAAiB,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,SAAS,EAAE,EAAE,IAAI,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,aAAa,MAAM,cAAc,CAAC;AACzC,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,oBAAY,aAAa,GAAG,KAAK,GAAG;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC;AACpD,oBAAY,IAAI,GAAG;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC;CACnB,CAAC;AAEF,oBAAY,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,aAAa,CAAC;CACzB,CAAC;AAEF,oBAAY,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AACxD,oBAAY,aAAa,GAAG,CAC1B,IAAI,EAAE,IAAI,EACV,iBAAiB,EAAE,iBAAiB,KACjC,OAAO,CAAC,IAAI,CAAC,CAAC;AACnB,oBAAY,aAAa,GAAG,CAC1B,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,KACnB,OAAO,CAAC,IAAI,CAAC,CAAC;AAEnB,oBAAY,aAAa,GAAG,CAC1B,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,KACb,OAAO,CAAC,UAAU,CAAC,CAAC;AAEzB,oBAAY,iBAAiB,GAAG;IAC9B,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CACjC,CAAC;AAEF,oBAAY,2BAA2B,GAAG;IACxC,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CACnC,CAAC;AAGF,oBAAY,YAAY,GAAG;IACzB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AACF,MAAM,WAAW,WAAY,SAAQ,YAAY;IAC/C,KAAK,EAAE,YAAY,CAAC;IACpB,KAAK,EAAC,WAAW,EAAC,EAAE;QAAC,WAAW,EAAE,OAAO,CAAA;KAAC,GAAG,WAAW,CAAC;IACzD,QAAQ,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IACpC,aAAa,IAAI,OAAO,CAAC;IACzB,WAAW,IAAI,OAAO,CAAC;CACxB"} \ No newline at end of file diff --git a/node_modules/jest-runner/build/types.js b/node_modules/jest-runner/build/types.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/jest-runner/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/jest-runner/package.json b/node_modules/jest-runner/package.json deleted file mode 100644 index 5a9c99b7..00000000 --- a/node_modules/jest-runner/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "_args": [ - [ - "jest-runner@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-runner@24.9.0", - "_id": "jest-runner@24.9.0", - "_inBundle": false, - "_integrity": "sha512-KksJQyI3/0mhcfspnxxEOBueGrd5E4vV7ADQLT9ESaCzz02WnbdbKWIf5Mkaucoaj7obQckYPVX6JJhgUcoWWg==", - "_location": "/jest-runner", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-runner@24.9.0", - "name": "jest-runner", - "escapedName": "jest-runner", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core", - "/@jest/test-sequencer" - ], - "_resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/console": "^24.7.1", - "@jest/environment": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "chalk": "^2.4.2", - "exit": "^0.1.2", - "graceful-fs": "^4.1.15", - "jest-config": "^24.9.0", - "jest-docblock": "^24.3.0", - "jest-haste-map": "^24.9.0", - "jest-jasmine2": "^24.9.0", - "jest-leak-detector": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-resolve": "^24.9.0", - "jest-runtime": "^24.9.0", - "jest-util": "^24.9.0", - "jest-worker": "^24.6.0", - "source-map-support": "^0.5.6", - "throat": "^4.0.0" - }, - "devDependencies": { - "@types/exit": "^0.1.30", - "@types/graceful-fs": "^4.1.2", - "@types/source-map-support": "^0.5.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-runner", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-runner" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-runtime/bin/jest-runtime.js b/node_modules/jest-runtime/bin/jest-runtime.js deleted file mode 100644 index 6a510e72..00000000 --- a/node_modules/jest-runtime/bin/jest-runtime.js +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env node -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -if (process.env.NODE_ENV == null) { - process.env.NODE_ENV = 'test'; -} - -require('../build/cli').run(); diff --git a/node_modules/jest-runtime/build/cli/args.d.ts b/node_modules/jest-runtime/build/cli/args.d.ts deleted file mode 100644 index cd6e0774..00000000 --- a/node_modules/jest-runtime/build/cli/args.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Options } from 'yargs'; -export declare const usage = "Usage: $0 [--config=] "; -export declare const options: Record<'cache' | 'config' | 'debug' | 'version' | 'watchman', Options>; -//# sourceMappingURL=args.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-runtime/build/cli/args.d.ts.map b/node_modules/jest-runtime/build/cli/args.d.ts.map deleted file mode 100644 index 6e290fc9..00000000 --- a/node_modules/jest-runtime/build/cli/args.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAE9B,eAAO,MAAM,KAAK,mDAAmD,CAAC;AAEtE,eAAO,MAAM,OAAO,EAAE,MAAM,CAC1B,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,EACrD,OAAO,CA8BR,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-runtime/build/cli/args.js b/node_modules/jest-runtime/build/cli/args.js deleted file mode 100644 index 9419c609..00000000 --- a/node_modules/jest-runtime/build/cli/args.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.options = exports.usage = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const usage = 'Usage: $0 [--config=] '; -exports.usage = usage; -const options = { - cache: { - default: true, - description: - 'Whether to use the preprocessor cache. Disable ' + - 'the cache using --no-cache.', - type: 'boolean' - }, - config: { - alias: 'c', - description: 'The path to a Jest config file.', - type: 'string' - }, - debug: { - description: 'Print debugging info about your jest config.', - type: 'boolean' - }, - version: { - alias: 'v', - description: 'Print the version and exit', - type: 'boolean' - }, - watchman: { - default: true, - description: - 'Whether to use watchman for file crawling. Disable using ' + - '--no-watchman.', - type: 'boolean' - } -}; -exports.options = options; diff --git a/node_modules/jest-runtime/build/cli/index.d.ts b/node_modules/jest-runtime/build/cli/index.d.ts deleted file mode 100644 index a1da9f8e..00000000 --- a/node_modules/jest-runtime/build/cli/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export declare function run(cliArgv?: Config.Argv, cliInfo?: Array): void; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-runtime/build/cli/index.d.ts.map b/node_modules/jest-runtime/build/cli/index.d.ts.map deleted file mode 100644 index c9be420e..00000000 --- a/node_modules/jest-runtime/build/cli/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAUnC,wBAAgB,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,QA+EjE"} \ No newline at end of file diff --git a/node_modules/jest-runtime/build/cli/index.js b/node_modules/jest-runtime/build/cli/index.js deleted file mode 100644 index 47f4f5db..00000000 --- a/node_modules/jest-runtime/build/cli/index.js +++ /dev/null @@ -1,256 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.run = run; - -function _os() { - const data = _interopRequireDefault(require('os')); - - _os = function _os() { - return data; - }; - - return data; -} - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _realpathNative() { - const data = require('realpath-native'); - - _realpathNative = function _realpathNative() { - return data; - }; - - return data; -} - -function _yargs() { - const data = _interopRequireDefault(require('yargs')); - - _yargs = function _yargs() { - return data; - }; - - return data; -} - -function _console() { - const data = require('@jest/console'); - - _console = function _console() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _jestValidate() { - const data = require('jest-validate'); - - _jestValidate = function _jestValidate() { - return data; - }; - - return data; -} - -function _jestConfig() { - const data = require('jest-config'); - - _jestConfig = function _jestConfig() { - return data; - }; - - return data; -} - -var _version = require('../version'); - -var args = _interopRequireWildcard(require('./args')); - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -function run(cliArgv, cliInfo) { - const realFs = require('fs'); - - const fs = require('graceful-fs'); - - fs.gracefulify(realFs); - let argv; - - if (cliArgv) { - argv = cliArgv; - } else { - argv = _yargs() - .default.usage(args.usage) - .help(false) - .version(false) - .options(args.options).argv; // @ts-ignore: fix this at some point - - (0, _jestValidate().validateCLIOptions)( - argv, - _objectSpread({}, args.options, { - deprecationEntries: _jestConfig().deprecationEntries - }) - ); - } - - if (argv.help) { - _yargs().default.showHelp(); - - process.on('exit', () => (process.exitCode = 1)); - return; - } - - if (argv.version) { - console.log(`v${_version.VERSION}\n`); - return; - } - - if (!argv._.length) { - console.log('Please provide a path to a script. (See --help for details)'); - process.on('exit', () => (process.exitCode = 1)); - return; - } - - const root = (0, _realpathNative().sync)(process.cwd()); - - const filePath = _path().default.resolve(root, argv._[0]); - - if (argv.debug) { - const info = cliInfo ? ', ' + cliInfo.join(', ') : ''; - console.log(`Using Jest Runtime v${_version.VERSION}${info}`); - } // TODO: Figure this out - // @ts-ignore: this might not have the correct arguments - - const options = (0, _jestConfig().readConfig)(argv, root); - const globalConfig = options.globalConfig; // Always disable automocking in scripts. - - const config = _objectSpread({}, options.projectConfig, { - automock: false, - unmockedModulePathPatterns: null - }); // Break circular dependency - - const Runtime = require('..'); - - Runtime.createContext(config, { - maxWorkers: Math.max(_os().default.cpus().length - 1, 1), - watchman: globalConfig.watchman - }) - .then(hasteMap => { - const Environment = require(config.testEnvironment); - - const environment = new Environment(config); - (0, _jestUtil().setGlobal)( - environment.global, - 'console', - new (_console()).CustomConsole(process.stdout, process.stderr) - ); - (0, _jestUtil().setGlobal)( - environment.global, - 'jestProjectConfig', - config - ); - (0, _jestUtil().setGlobal)( - environment.global, - 'jestGlobalConfig', - globalConfig - ); - const runtime = new Runtime(config, environment, hasteMap.resolver); - runtime.requireModule(filePath); - }) - .catch(e => { - console.error(_chalk().default.red(e.stack || e)); - process.on('exit', () => (process.exitCode = 1)); - }); -} diff --git a/node_modules/jest-runtime/build/helpers.d.ts b/node_modules/jest-runtime/build/helpers.d.ts deleted file mode 100644 index 76dc0ec2..00000000 --- a/node_modules/jest-runtime/build/helpers.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare const findSiblingsWithFileExtension: (moduleFileExtensions: string[], from: string, moduleName: string) => string; -//# sourceMappingURL=helpers.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-runtime/build/helpers.d.ts.map b/node_modules/jest-runtime/build/helpers.d.ts.map deleted file mode 100644 index 52b744e8..00000000 --- a/node_modules/jest-runtime/build/helpers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,eAAO,MAAM,6BAA6B,8EA0CzC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-runtime/build/helpers.js b/node_modules/jest-runtime/build/helpers.js deleted file mode 100644 index 652a1887..00000000 --- a/node_modules/jest-runtime/build/helpers.js +++ /dev/null @@ -1,97 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.findSiblingsWithFileExtension = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _slash() { - const data = _interopRequireDefault(require('slash')); - - _slash = function _slash() { - return data; - }; - - return data; -} - -function _glob() { - const data = _interopRequireDefault(require('glob')); - - _glob = function _glob() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const findSiblingsWithFileExtension = ( - moduleFileExtensions, - from, - moduleName -) => { - if ( - !_path().default.isAbsolute(moduleName) && - _path().default.extname(moduleName) === '' - ) { - const dirname = _path().default.dirname(from); - - const pathToModule = _path().default.resolve(dirname, moduleName); - - try { - const slashedDirname = (0, _slash().default)(dirname); - - const matches = _glob() - .default.sync(`${pathToModule}.*`) - .map(match => (0, _slash().default)(match)) - .map(match => { - const relativePath = _path().default.posix.relative( - slashedDirname, - match - ); - - return _path().default.posix.dirname(match) === slashedDirname - ? `./${relativePath}` - : relativePath; - }) - .map(match => `\t'${match}'`) - .join('\n'); - - if (matches) { - const foundMessage = `\n\nHowever, Jest was able to find:\n${matches}`; - const mappedModuleFileExtensions = moduleFileExtensions - .map(ext => `'${ext}'`) - .join(', '); - return ( - foundMessage + - "\n\nYou might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently " + - `[${mappedModuleFileExtensions}].\n\nSee https://jestjs.io/docs/en/configuration#modulefileextensions-array-string` - ); - } - } catch (ignored) {} - } - - return ''; -}; - -exports.findSiblingsWithFileExtension = findSiblingsWithFileExtension; diff --git a/node_modules/jest-runtime/build/index.d.ts b/node_modules/jest-runtime/build/index.d.ts deleted file mode 100644 index 7f01ed5b..00000000 --- a/node_modules/jest-runtime/build/index.d.ts +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Config } from '@jest/types'; -import { JestEnvironment } from '@jest/environment'; -import { SourceMapRegistry } from '@jest/source-map'; -import HasteMap, { ModuleMap } from 'jest-haste-map'; -import Resolver from 'jest-resolve'; -import { ScriptTransformer, ShouldInstrumentOptions } from '@jest/transform'; -import { Context as JestContext } from './types'; -declare type HasteMapOptions = { - console?: Console; - maxWorkers: number; - resetCache: boolean; - watch?: boolean; - watchman: boolean; -}; -declare type InternalModuleOptions = { - isInternalModule: boolean; -}; -declare type CacheFS = { - [path: string]: string; -}; -declare namespace Runtime { - type Context = JestContext; -} -declare class Runtime { - static ScriptTransformer: typeof ScriptTransformer; - private _cacheFS; - private _config; - private _coverageOptions; - private _currentlyExecutingModulePath; - private _environment; - private _explicitShouldMock; - private _internalModuleRegistry; - private _isCurrentlyExecutingManualMock; - private _mockFactories; - private _mockMetaDataCache; - private _mockRegistry; - private _isolatedMockRegistry; - private _moduleMocker; - private _isolatedModuleRegistry; - private _moduleRegistry; - private _needsCoverageMapped; - private _resolver; - private _shouldAutoMock; - private _shouldMockModuleCache; - private _shouldUnmockTransitiveDependenciesCache; - private _sourceMapRegistry; - private _scriptTransformer; - private _transitiveShouldMock; - private _unmockList; - private _virtualMocks; - constructor(config: Config.ProjectConfig, environment: JestEnvironment, resolver: Resolver, cacheFS?: CacheFS, coverageOptions?: ShouldInstrumentOptions); - static shouldInstrument(filename: Config.Path, options: ShouldInstrumentOptions, config: Config.ProjectConfig): boolean; - static createContext(config: Config.ProjectConfig, options: { - console?: Console; - maxWorkers: number; - watch?: boolean; - watchman: boolean; - }): Promise; - static createHasteMap(config: Config.ProjectConfig, options?: HasteMapOptions): HasteMap; - static createResolver(config: Config.ProjectConfig, moduleMap: ModuleMap): Resolver; - static runCLI(args?: Config.Argv, info?: Array): void; - static getCLIOptions(): Record<"cache" | "config" | "debug" | "version" | "watchman", import("yargs").Options>; - requireModule(from: Config.Path, moduleName?: string, options?: InternalModuleOptions, isRequireActual?: boolean | null): any; - requireInternalModule(from: Config.Path, to?: string): any; - requireActual(from: Config.Path, moduleName: string): any; - requireMock(from: Config.Path, moduleName: string): any; - private _loadModule; - private _getFullTransformationOptions; - requireModuleOrMock(from: Config.Path, moduleName: string): any; - isolateModules(fn: () => void): void; - resetModules(): void; - getAllCoverageInfoCopy(): import("istanbul-lib-coverage").CoverageMapData; - getSourceMapInfo(coveredFiles: Set): { - [path: string]: string; - }; - getSourceMaps(): SourceMapRegistry; - setMock(from: string, moduleName: string, mockFactory: () => unknown, options?: { - virtual?: boolean; - }): void; - restoreAllMocks(): void; - resetAllMocks(): void; - clearAllMocks(): void; - private _resolveModule; - private _requireResolve; - private _requireResolvePaths; - private _execModule; - private _requireCoreModule; - private _generateMock; - private _shouldMock; - private _createRequireImplementation; - private _createJestObjectFor; - private _logFormattedReferenceError; -} -export = Runtime; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-runtime/build/index.d.ts.map b/node_modules/jest-runtime/build/index.d.ts.map deleted file mode 100644 index cc8ee3a2..00000000 --- a/node_modules/jest-runtime/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAEL,eAAe,EAGhB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAEnD,OAAO,QAAQ,EAAE,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEnD,OAAO,QAAQ,MAAM,cAAc,CAAC;AAIpC,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EAGxB,MAAM,iBAAiB,CAAC;AAMzB,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,SAAS,CAAC;AAE/C,aAAK,eAAe,GAAG;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,aAAK,qBAAqB,GAAG;IAC3B,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAQF,aAAK,OAAO,GAAG;IAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CAAC,CAAC;AAExC,kBAAU,OAAO,CAAC;IAChB,KAAY,OAAO,GAAG,WAAW,CAAC;CACnC;AAuBD,cAAM,OAAO;IACX,MAAM,CAAC,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;IAEnD,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,gBAAgB,CAA0B;IAClD,OAAO,CAAC,6BAA6B,CAAS;IAC9C,OAAO,CAAC,YAAY,CAAkB;IACtC,OAAO,CAAC,mBAAmB,CAAgB;IAC3C,OAAO,CAAC,uBAAuB,CAAiB;IAChD,OAAO,CAAC,+BAA+B,CAAgB;IACvD,OAAO,CAAC,cAAc,CAAgC;IACtD,OAAO,CAAC,kBAAkB,CAExB;IACF,OAAO,CAAC,aAAa,CAAmB;IACxC,OAAO,CAAC,qBAAqB,CAA0B;IACvD,OAAO,CAAC,aAAa,CAAkB;IACvC,OAAO,CAAC,uBAAuB,CAAwB;IACvD,OAAO,CAAC,eAAe,CAAiB;IACxC,OAAO,CAAC,oBAAoB,CAAc;IAC1C,OAAO,CAAC,SAAS,CAAW;IAC5B,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,sBAAsB,CAAgB;IAC9C,OAAO,CAAC,wCAAwC,CAAgB;IAChE,OAAO,CAAC,kBAAkB,CAAoB;IAC9C,OAAO,CAAC,kBAAkB,CAAoB;IAC9C,OAAO,CAAC,qBAAqB,CAAgB;IAC7C,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,aAAa,CAAgB;gBAGnC,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,WAAW,EAAE,eAAe,EAC5B,QAAQ,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE,OAAO,EACjB,eAAe,CAAC,EAAE,uBAAuB;IAgE3C,MAAM,CAAC,gBAAgB,CACrB,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,OAAO,EAAE,uBAAuB,EAChC,MAAM,EAAE,MAAM,CAAC,aAAa;IAK9B,MAAM,CAAC,aAAa,CAClB,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,OAAO,EAAE;QACP,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,QAAQ,EAAE,OAAO,CAAC;KACnB,GACA,OAAO,CAAC,WAAW,CAAC;IAsBvB,MAAM,CAAC,cAAc,CACnB,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,OAAO,CAAC,EAAE,eAAe,GACxB,QAAQ;IAmCX,MAAM,CAAC,cAAc,CACnB,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,SAAS,EAAE,SAAS,GACnB,QAAQ;IAeX,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC;IAItD,MAAM,CAAC,aAAa;IAIpB,aAAa,CACX,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,qBAAqB,EAC/B,eAAe,CAAC,EAAE,OAAO,GAAG,IAAI;IA6ElC,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,MAAM;IAIpD,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM;IAInD,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM;IAuFjD,OAAO,CAAC,WAAW;IA8BnB,OAAO,CAAC,6BAA6B;IAarC,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM;IAuBzD,cAAc,CAAC,EAAE,EAAE,MAAM,IAAI;IAa7B,YAAY;IA2BZ,sBAAsB;IAItB,gBAAgB,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC;;;IAe1C,aAAa,IAAI,iBAAiB;IAIlC,OAAO,CACL,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,OAAO,EAC1B,OAAO,CAAC,EAAE;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAC;IAe/B,eAAe;IAIf,aAAa;IAIb,aAAa;IAIb,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,eAAe;IA6CvB,OAAO,CAAC,oBAAoB;IAqB5B,OAAO,CAAC,WAAW;IAoFnB,OAAO,CAAC,kBAAkB;IAQ1B,OAAO,CAAC,aAAa;IAwCrB,OAAO,CAAC,WAAW;IA8DnB,OAAO,CAAC,4BAA4B;IAwCpC,OAAO,CAAC,oBAAoB;IA8J5B,OAAO,CAAC,2BAA2B;CAcpC;AAID,SAAS,OAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-runtime/build/index.js b/node_modules/jest-runtime/build/index.js deleted file mode 100644 index 731effa5..00000000 --- a/node_modules/jest-runtime/build/index.js +++ /dev/null @@ -1,1234 +0,0 @@ -'use strict'; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _jestHasteMap() { - const data = _interopRequireDefault(require('jest-haste-map')); - - _jestHasteMap = function _jestHasteMap() { - return data; - }; - - return data; -} - -function _jestMessageUtil() { - const data = require('jest-message-util'); - - _jestMessageUtil = function _jestMessageUtil() { - return data; - }; - - return data; -} - -function _jestResolve() { - const data = _interopRequireDefault(require('jest-resolve')); - - _jestResolve = function _jestResolve() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _jestRegexUtil() { - const data = require('jest-regex-util'); - - _jestRegexUtil = function _jestRegexUtil() { - return data; - }; - - return data; -} - -function _jestSnapshot() { - const data = _interopRequireDefault(require('jest-snapshot')); - - _jestSnapshot = function _jestSnapshot() { - return data; - }; - - return data; -} - -function _transform() { - const data = require('@jest/transform'); - - _transform = function _transform() { - return data; - }; - - return data; -} - -function _gracefulFs() { - const data = _interopRequireDefault(require('graceful-fs')); - - _gracefulFs = function _gracefulFs() { - return data; - }; - - return data; -} - -function _stripBom() { - const data = _interopRequireDefault(require('strip-bom')); - - _stripBom = function _stripBom() { - return data; - }; - - return data; -} - -var _cli = require('./cli'); - -var _args = require('./cli/args'); - -var _helpers = require('./helpers'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const testTimeoutSymbol = Symbol.for('TEST_TIMEOUT_SYMBOL'); -const retryTimesSymbol = Symbol.for('RETRY_TIMES'); - -const NODE_MODULES = _path().default.sep + 'node_modules' + _path().default.sep; - -const getModuleNameMapper = config => { - if ( - Array.isArray(config.moduleNameMapper) && - config.moduleNameMapper.length - ) { - return config.moduleNameMapper.map(([regex, moduleName]) => ({ - moduleName, - regex: new RegExp(regex) - })); - } - - return null; -}; - -const unmockRegExpCache = new WeakMap(); -/* eslint-disable-next-line no-redeclare */ - -class Runtime { - constructor(config, environment, resolver, cacheFS, coverageOptions) { - _defineProperty(this, '_cacheFS', void 0); - - _defineProperty(this, '_config', void 0); - - _defineProperty(this, '_coverageOptions', void 0); - - _defineProperty(this, '_currentlyExecutingModulePath', void 0); - - _defineProperty(this, '_environment', void 0); - - _defineProperty(this, '_explicitShouldMock', void 0); - - _defineProperty(this, '_internalModuleRegistry', void 0); - - _defineProperty(this, '_isCurrentlyExecutingManualMock', void 0); - - _defineProperty(this, '_mockFactories', void 0); - - _defineProperty(this, '_mockMetaDataCache', void 0); - - _defineProperty(this, '_mockRegistry', void 0); - - _defineProperty(this, '_isolatedMockRegistry', void 0); - - _defineProperty(this, '_moduleMocker', void 0); - - _defineProperty(this, '_isolatedModuleRegistry', void 0); - - _defineProperty(this, '_moduleRegistry', void 0); - - _defineProperty(this, '_needsCoverageMapped', void 0); - - _defineProperty(this, '_resolver', void 0); - - _defineProperty(this, '_shouldAutoMock', void 0); - - _defineProperty(this, '_shouldMockModuleCache', void 0); - - _defineProperty(this, '_shouldUnmockTransitiveDependenciesCache', void 0); - - _defineProperty(this, '_sourceMapRegistry', void 0); - - _defineProperty(this, '_scriptTransformer', void 0); - - _defineProperty(this, '_transitiveShouldMock', void 0); - - _defineProperty(this, '_unmockList', void 0); - - _defineProperty(this, '_virtualMocks', void 0); - - this._cacheFS = cacheFS || Object.create(null); - this._config = config; - this._coverageOptions = coverageOptions || { - changedFiles: undefined, - collectCoverage: false, - collectCoverageFrom: [], - collectCoverageOnlyFrom: null - }; - this._currentlyExecutingModulePath = ''; - this._environment = environment; - this._explicitShouldMock = Object.create(null); - this._internalModuleRegistry = new Map(); - this._isCurrentlyExecutingManualMock = null; - this._mockFactories = Object.create(null); - this._mockRegistry = new Map(); // during setup, this cannot be null (and it's fine to explode if it is) - - this._moduleMocker = this._environment.moduleMocker; - this._isolatedModuleRegistry = null; - this._isolatedMockRegistry = null; - this._moduleRegistry = new Map(); - this._needsCoverageMapped = new Set(); - this._resolver = resolver; - this._scriptTransformer = new (_transform()).ScriptTransformer(config); - this._shouldAutoMock = config.automock; - this._sourceMapRegistry = Object.create(null); - this._virtualMocks = Object.create(null); - this._mockMetaDataCache = Object.create(null); - this._shouldMockModuleCache = Object.create(null); - this._shouldUnmockTransitiveDependenciesCache = Object.create(null); - this._transitiveShouldMock = Object.create(null); - this._unmockList = unmockRegExpCache.get(config); - - if (!this._unmockList && config.unmockedModulePathPatterns) { - this._unmockList = new RegExp( - config.unmockedModulePathPatterns.join('|') - ); - unmockRegExpCache.set(config, this._unmockList); - } - - if (config.automock) { - config.setupFiles.forEach(filePath => { - if (filePath && filePath.includes(NODE_MODULES)) { - const moduleID = this._resolver.getModuleID( - this._virtualMocks, - filePath - ); - - this._transitiveShouldMock[moduleID] = false; - } - }); - } - - this.resetModules(); - - if (config.setupFiles.length) { - for (let i = 0; i < config.setupFiles.length; i++) { - this.requireModule(config.setupFiles[i]); - } - } - } // TODO: Make this `static shouldInstrument = shouldInstrument;` after https://github.com/facebook/jest/issues/7846 - - static shouldInstrument(filename, options, config) { - return (0, _transform().shouldInstrument)(filename, options, config); - } - - static createContext(config, options) { - (0, _jestUtil().createDirectory)(config.cacheDirectory); - const instance = Runtime.createHasteMap(config, { - console: options.console, - maxWorkers: options.maxWorkers, - resetCache: !config.cache, - watch: options.watch, - watchman: options.watchman - }); - return instance.build().then( - hasteMap => ({ - config, - hasteFS: hasteMap.hasteFS, - moduleMap: hasteMap.moduleMap, - resolver: Runtime.createResolver(config, hasteMap.moduleMap) - }), - error => { - throw error; - } - ); - } - - static createHasteMap(config, options) { - const ignorePatternParts = [ - ...config.modulePathIgnorePatterns, - ...(options && options.watch ? config.watchPathIgnorePatterns : []), - config.cacheDirectory.startsWith(config.rootDir + _path().default.sep) && - config.cacheDirectory - ].filter(Boolean); - const ignorePattern = - ignorePatternParts.length > 0 - ? new RegExp(ignorePatternParts.join('|')) - : undefined; - return new (_jestHasteMap()).default({ - cacheDirectory: config.cacheDirectory, - computeSha1: config.haste.computeSha1, - console: options && options.console, - dependencyExtractor: config.dependencyExtractor, - extensions: [_jestSnapshot().default.EXTENSION].concat( - config.moduleFileExtensions - ), - hasteImplModulePath: config.haste.hasteImplModulePath, - ignorePattern, - maxWorkers: (options && options.maxWorkers) || 1, - mocksPattern: (0, _jestRegexUtil().escapePathForRegex)( - _path().default.sep + '__mocks__' + _path().default.sep - ), - name: config.name, - platforms: config.haste.platforms || ['ios', 'android'], - providesModuleNodeModules: config.haste.providesModuleNodeModules, - resetCache: options && options.resetCache, - retainAllFiles: false, - rootDir: config.rootDir, - roots: config.roots, - throwOnModuleCollision: config.haste.throwOnModuleCollision, - useWatchman: options && options.watchman, - watch: options && options.watch - }); - } - - static createResolver(config, moduleMap) { - return new (_jestResolve()).default(moduleMap, { - browser: config.browser, - defaultPlatform: config.haste.defaultPlatform, - extensions: config.moduleFileExtensions.map(extension => '.' + extension), - hasCoreModules: true, - moduleDirectories: config.moduleDirectories, - moduleNameMapper: getModuleNameMapper(config), - modulePaths: config.modulePaths, - platforms: config.haste.platforms, - resolver: config.resolver, - rootDir: config.rootDir - }); - } - - static runCLI(args, info) { - return (0, _cli.run)(args, info); - } - - static getCLIOptions() { - return _args.options; - } - - requireModule(from, moduleName, options, isRequireActual) { - const moduleID = this._resolver.getModuleID( - this._virtualMocks, - from, - moduleName - ); - - let modulePath; // Some old tests rely on this mocking behavior. Ideally we'll change this - // to be more explicit. - - const moduleResource = moduleName && this._resolver.getModule(moduleName); - - const manualMock = - moduleName && this._resolver.getMockModule(from, moduleName); - - if ( - (!options || !options.isInternalModule) && - !isRequireActual && - !moduleResource && - manualMock && - manualMock !== this._isCurrentlyExecutingManualMock && - this._explicitShouldMock[moduleID] !== false - ) { - modulePath = manualMock; - } - - if (moduleName && this._resolver.isCoreModule(moduleName)) { - return this._requireCoreModule(moduleName); - } - - if (!modulePath) { - modulePath = this._resolveModule(from, moduleName); - } - - let moduleRegistry; - - if (!options || !options.isInternalModule) { - if ( - this._moduleRegistry.get(modulePath) || - !this._isolatedModuleRegistry - ) { - moduleRegistry = this._moduleRegistry; - } else { - moduleRegistry = this._isolatedModuleRegistry; - } - } else { - moduleRegistry = this._internalModuleRegistry; - } - - const module = moduleRegistry.get(modulePath); - - if (module) { - return module.exports; - } // We must register the pre-allocated module object first so that any - // circular dependencies that may arise while evaluating the module can - // be satisfied. - - const localModule = { - children: [], - exports: {}, - filename: modulePath, - id: modulePath, - loaded: false - }; - moduleRegistry.set(modulePath, localModule); - - this._loadModule( - localModule, - from, - moduleName, - modulePath, - options, - moduleRegistry - ); - - return localModule.exports; - } - - requireInternalModule(from, to) { - return this.requireModule(from, to, { - isInternalModule: true - }); - } - - requireActual(from, moduleName) { - return this.requireModule(from, moduleName, undefined, true); - } - - requireMock(from, moduleName) { - const moduleID = this._resolver.getModuleID( - this._virtualMocks, - from, - moduleName - ); - - if ( - this._isolatedMockRegistry && - this._isolatedMockRegistry.get(moduleID) - ) { - return this._isolatedMockRegistry.get(moduleID); - } else if (this._mockRegistry.get(moduleID)) { - return this._mockRegistry.get(moduleID); - } - - const mockRegistry = this._isolatedMockRegistry || this._mockRegistry; - - if (moduleID in this._mockFactories) { - const module = this._mockFactories[moduleID](); - - mockRegistry.set(moduleID, module); - return module; - } - - const manualMockOrStub = this._resolver.getMockModule(from, moduleName); - - let modulePath; - - if (manualMockOrStub) { - modulePath = this._resolveModule(from, manualMockOrStub); - } else { - modulePath = this._resolveModule(from, moduleName); - } - - let isManualMock = - manualMockOrStub && - !this._resolver.resolveStubModuleName(from, moduleName); - - if (!isManualMock) { - // If the actual module file has a __mocks__ dir sitting immediately next - // to it, look to see if there is a manual mock for this file. - // - // subDir1/my_module.js - // subDir1/__mocks__/my_module.js - // subDir2/my_module.js - // subDir2/__mocks__/my_module.js - // - // Where some other module does a relative require into each of the - // respective subDir{1,2} directories and expects a manual mock - // corresponding to that particular my_module.js file. - const moduleDir = _path().default.dirname(modulePath); - - const moduleFileName = _path().default.basename(modulePath); - - const potentialManualMock = _path().default.join( - moduleDir, - '__mocks__', - moduleFileName - ); - - if (_gracefulFs().default.existsSync(potentialManualMock)) { - isManualMock = true; - modulePath = potentialManualMock; - } - } - - if (isManualMock) { - const localModule = { - children: [], - exports: {}, - filename: modulePath, - id: modulePath, - loaded: false - }; - - this._loadModule( - localModule, - from, - moduleName, - modulePath, - undefined, - mockRegistry - ); - - mockRegistry.set(moduleID, localModule.exports); - } else { - // Look for a real module to generate an automock from - mockRegistry.set(moduleID, this._generateMock(from, moduleName)); - } - - return mockRegistry.get(moduleID); - } - - _loadModule( - localModule, - from, - moduleName, - modulePath, - options, - moduleRegistry - ) { - if (_path().default.extname(modulePath) === '.json') { - const text = (0, _stripBom().default)( - _gracefulFs().default.readFileSync(modulePath, 'utf8') - ); - - const transformedFile = this._scriptTransformer.transformJson( - modulePath, - this._getFullTransformationOptions(options), - text - ); - - localModule.exports = this._environment.global.JSON.parse( - transformedFile - ); - } else if (_path().default.extname(modulePath) === '.node') { - localModule.exports = require(modulePath); - } else { - // Only include the fromPath if a moduleName is given. Else treat as root. - const fromPath = moduleName ? from : null; - - this._execModule(localModule, options, moduleRegistry, fromPath); - } - - localModule.loaded = true; - } - - _getFullTransformationOptions(options) { - return _objectSpread({}, options, { - changedFiles: this._coverageOptions.changedFiles, - collectCoverage: this._coverageOptions.collectCoverage, - collectCoverageFrom: this._coverageOptions.collectCoverageFrom, - collectCoverageOnlyFrom: this._coverageOptions.collectCoverageOnlyFrom, - extraGlobals: this._config.extraGlobals || [] - }); - } - - requireModuleOrMock(from, moduleName) { - try { - if (this._shouldMock(from, moduleName)) { - return this.requireMock(from, moduleName); - } else { - return this.requireModule(from, moduleName); - } - } catch (e) { - if (e.code === 'MODULE_NOT_FOUND') { - const appendedMessage = (0, _helpers.findSiblingsWithFileExtension)( - this._config.moduleFileExtensions, - from, - moduleName - ); - - if (appendedMessage) { - e.message += appendedMessage; - } - } - - throw e; - } - } - - isolateModules(fn) { - if (this._isolatedModuleRegistry || this._isolatedMockRegistry) { - throw new Error( - 'isolateModules cannot be nested inside another isolateModules.' - ); - } - - this._isolatedModuleRegistry = new Map(); - this._isolatedMockRegistry = new Map(); - fn(); - this._isolatedModuleRegistry = null; - this._isolatedMockRegistry = null; - } - - resetModules() { - this._isolatedModuleRegistry = null; - this._isolatedMockRegistry = null; - - this._mockRegistry.clear(); - - this._moduleRegistry.clear(); - - if (this._environment) { - if (this._environment.global) { - const envGlobal = this._environment.global; - Object.keys(envGlobal).forEach(key => { - const globalMock = envGlobal[key]; - - if ( - ((typeof globalMock === 'object' && globalMock !== null) || - typeof globalMock === 'function') && - globalMock._isMockFunction === true - ) { - globalMock.mockClear(); - } - }); - } - - if (this._environment.fakeTimers) { - this._environment.fakeTimers.clearAllTimers(); - } - } - } - - getAllCoverageInfoCopy() { - return (0, _jestUtil().deepCyclicCopy)( - this._environment.global.__coverage__ - ); - } - - getSourceMapInfo(coveredFiles) { - return Object.keys(this._sourceMapRegistry).reduce((result, sourcePath) => { - if ( - coveredFiles.has(sourcePath) && - this._needsCoverageMapped.has(sourcePath) && - _gracefulFs().default.existsSync(this._sourceMapRegistry[sourcePath]) - ) { - result[sourcePath] = this._sourceMapRegistry[sourcePath]; - } - - return result; - }, {}); - } - - getSourceMaps() { - return this._sourceMapRegistry; - } - - setMock(from, moduleName, mockFactory, options) { - if (options && options.virtual) { - const mockPath = this._resolver.getModulePath(from, moduleName); - - this._virtualMocks[mockPath] = true; - } - - const moduleID = this._resolver.getModuleID( - this._virtualMocks, - from, - moduleName - ); - - this._explicitShouldMock[moduleID] = true; - this._mockFactories[moduleID] = mockFactory; - } - - restoreAllMocks() { - this._moduleMocker.restoreAllMocks(); - } - - resetAllMocks() { - this._moduleMocker.resetAllMocks(); - } - - clearAllMocks() { - this._moduleMocker.clearAllMocks(); - } - - _resolveModule(from, to) { - return to ? this._resolver.resolveModule(from, to) : from; - } - - _requireResolve(from, moduleName, options = {}) { - if (moduleName == null) { - throw new Error( - 'The first argument to require.resolve must be a string. Received null or undefined.' - ); - } - - const paths = options.paths; - - if (paths) { - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for ( - var _iterator = paths[Symbol.iterator](), _step; - !(_iteratorNormalCompletion = (_step = _iterator.next()).done); - _iteratorNormalCompletion = true - ) { - const p = _step.value; - - const absolutePath = _path().default.resolve(from, '..', p); - - const module = this._resolver.resolveModuleFromDirIfExists( - absolutePath, - moduleName, // required to also resolve files without leading './' directly in the path - { - paths: [absolutePath] - } - ); - - if (module) { - return module; - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - throw new Error( - `Cannot resolve module '${moduleName}' from paths ['${paths.join( - "', '" - )}'] from ${from}` - ); - } - - try { - return this._resolveModule(from, moduleName); - } catch (err) { - const module = this._resolver.getMockModule(from, moduleName); - - if (module) { - return module; - } else { - throw err; - } - } - } - - _requireResolvePaths(from, moduleName) { - if (moduleName == null) { - throw new Error( - 'The first argument to require.resolve.paths must be a string. Received null or undefined.' - ); - } - - if (!moduleName.length) { - throw new Error( - 'The first argument to require.resolve.paths must not be the empty string.' - ); - } - - if (moduleName[0] === '.') { - return [_path().default.resolve(from, '..')]; - } - - if (this._resolver.isCoreModule(moduleName)) { - return null; - } - - return this._resolver.getModulePaths(_path().default.resolve(from, '..')); - } - - _execModule(localModule, options, moduleRegistry, from) { - // If the environment was disposed, prevent this module from being executed. - if (!this._environment.global) { - return; - } - - const filename = localModule.filename; - const lastExecutingModulePath = this._currentlyExecutingModulePath; - this._currentlyExecutingModulePath = filename; - const origCurrExecutingManualMock = this._isCurrentlyExecutingManualMock; - this._isCurrentlyExecutingManualMock = filename; - - const dirname = _path().default.dirname(filename); - - localModule.children = []; - Object.defineProperty(localModule, 'parent', { - enumerable: true, - - get() { - const key = from || ''; - return moduleRegistry.get(key) || null; - } - }); - localModule.paths = this._resolver.getModulePaths(dirname); - Object.defineProperty(localModule, 'require', { - value: this._createRequireImplementation(localModule, options) - }); - const extraGlobals = this._config.extraGlobals || []; - - const transformedFile = this._scriptTransformer.transform( - filename, - this._getFullTransformationOptions(options), - this._cacheFS[filename] - ); - - if (transformedFile.sourceMapPath) { - this._sourceMapRegistry[filename] = transformedFile.sourceMapPath; - - if (transformedFile.mapCoverage) { - this._needsCoverageMapped.add(filename); - } - } - - const runScript = this._environment.runScript(transformedFile.script); - - if (runScript === null) { - this._logFormattedReferenceError( - 'You are trying to `import` a file after the Jest environment has been torn down.' - ); - - process.exitCode = 1; - return; - } //Wrapper - - runScript[_transform().ScriptTransformer.EVAL_RESULT_VARIABLE].call( - localModule.exports, - localModule, // module object - localModule.exports, // module exports - localModule.require, // require implementation - dirname, // __dirname - filename, // __filename - this._environment.global, // global object - this._createJestObjectFor(filename, localModule.require), // jest object - ...extraGlobals.map(globalVariable => { - if (this._environment.global[globalVariable]) { - return this._environment.global[globalVariable]; - } - - throw new Error( - `You have requested '${globalVariable}' as a global variable, but it was not present. Please check your config or your global environment.` - ); - }) - ); - - this._isCurrentlyExecutingManualMock = origCurrExecutingManualMock; - this._currentlyExecutingModulePath = lastExecutingModulePath; - } - - _requireCoreModule(moduleName) { - if (moduleName === 'process') { - return this._environment.global.process; - } - - return require(moduleName); - } - - _generateMock(from, moduleName) { - const modulePath = - this._resolver.resolveStubModuleName(from, moduleName) || - this._resolveModule(from, moduleName); - - if (!(modulePath in this._mockMetaDataCache)) { - // This allows us to handle circular dependencies while generating an - // automock - this._mockMetaDataCache[modulePath] = - this._moduleMocker.getMetadata({}) || {}; // In order to avoid it being possible for automocking to potentially - // cause side-effects within the module environment, we need to execute - // the module in isolation. This could cause issues if the module being - // mocked has calls into side-effectful APIs on another module. - - const origMockRegistry = this._mockRegistry; - const origModuleRegistry = this._moduleRegistry; - this._mockRegistry = new Map(); - this._moduleRegistry = new Map(); - const moduleExports = this.requireModule(from, moduleName); // Restore the "real" module/mock registries - - this._mockRegistry = origMockRegistry; - this._moduleRegistry = origModuleRegistry; - - const mockMetadata = this._moduleMocker.getMetadata(moduleExports); - - if (mockMetadata == null) { - throw new Error( - `Failed to get mock metadata: ${modulePath}\n\n` + - `See: https://jestjs.io/docs/manual-mocks.html#content` - ); - } - - this._mockMetaDataCache[modulePath] = mockMetadata; - } - - return this._moduleMocker.generateFromMetadata( - this._mockMetaDataCache[modulePath] - ); - } - - _shouldMock(from, moduleName) { - const explicitShouldMock = this._explicitShouldMock; - - const moduleID = this._resolver.getModuleID( - this._virtualMocks, - from, - moduleName - ); - - const key = from + _path().default.delimiter + moduleID; - - if (moduleID in explicitShouldMock) { - return explicitShouldMock[moduleID]; - } - - if ( - !this._shouldAutoMock || - this._resolver.isCoreModule(moduleName) || - this._shouldUnmockTransitiveDependenciesCache[key] - ) { - return false; - } - - if (moduleID in this._shouldMockModuleCache) { - return this._shouldMockModuleCache[moduleID]; - } - - let modulePath; - - try { - modulePath = this._resolveModule(from, moduleName); - } catch (e) { - const manualMock = this._resolver.getMockModule(from, moduleName); - - if (manualMock) { - this._shouldMockModuleCache[moduleID] = true; - return true; - } - - throw e; - } - - if (this._unmockList && this._unmockList.test(modulePath)) { - this._shouldMockModuleCache[moduleID] = false; - return false; - } // transitive unmocking for package managers that store flat packages (npm3) - - const currentModuleID = this._resolver.getModuleID( - this._virtualMocks, - from - ); - - if ( - this._transitiveShouldMock[currentModuleID] === false || - (from.includes(NODE_MODULES) && - modulePath.includes(NODE_MODULES) && - ((this._unmockList && this._unmockList.test(from)) || - explicitShouldMock[currentModuleID] === false)) - ) { - this._transitiveShouldMock[moduleID] = false; - this._shouldUnmockTransitiveDependenciesCache[key] = true; - return false; - } - - return (this._shouldMockModuleCache[moduleID] = true); - } - - _createRequireImplementation(from, options) { - // TODO: somehow avoid having to type the arguments - they should come from `NodeRequire/LocalModuleRequire.resolve` - const resolve = (moduleName, options) => - this._requireResolve(from.filename, moduleName, options); - - resolve.paths = moduleName => - this._requireResolvePaths(from.filename, moduleName); - - const moduleRequire = - options && options.isInternalModule - ? moduleName => this.requireInternalModule(from.filename, moduleName) - : this.requireModuleOrMock.bind(this, from.filename); - moduleRequire.cache = Object.create(null); - moduleRequire.extensions = Object.create(null); - moduleRequire.requireActual = this.requireActual.bind(this, from.filename); - moduleRequire.requireMock = this.requireMock.bind(this, from.filename); - moduleRequire.resolve = resolve; - Object.defineProperty(moduleRequire, 'main', { - enumerable: true, - - get() { - let mainModule = from.parent; - - while ( - mainModule && - mainModule.parent && - mainModule.id !== mainModule.parent.id - ) { - mainModule = mainModule.parent; - } - - return mainModule; - } - }); - return moduleRequire; - } - - _createJestObjectFor(from, localRequire) { - const disableAutomock = () => { - this._shouldAutoMock = false; - return jestObject; - }; - - const enableAutomock = () => { - this._shouldAutoMock = true; - return jestObject; - }; - - const unmock = moduleName => { - const moduleID = this._resolver.getModuleID( - this._virtualMocks, - from, - moduleName - ); - - this._explicitShouldMock[moduleID] = false; - return jestObject; - }; - - const deepUnmock = moduleName => { - const moduleID = this._resolver.getModuleID( - this._virtualMocks, - from, - moduleName - ); - - this._explicitShouldMock[moduleID] = false; - this._transitiveShouldMock[moduleID] = false; - return jestObject; - }; - - const mock = (moduleName, mockFactory, options) => { - if (mockFactory !== undefined) { - return setMockFactory(moduleName, mockFactory, options); - } - - const moduleID = this._resolver.getModuleID( - this._virtualMocks, - from, - moduleName - ); - - this._explicitShouldMock[moduleID] = true; - return jestObject; - }; - - const setMockFactory = (moduleName, mockFactory, options) => { - this.setMock(from, moduleName, mockFactory, options); - return jestObject; - }; - - const clearAllMocks = () => { - this.clearAllMocks(); - return jestObject; - }; - - const resetAllMocks = () => { - this.resetAllMocks(); - return jestObject; - }; - - const restoreAllMocks = () => { - this.restoreAllMocks(); - return jestObject; - }; - - const useFakeTimers = () => { - _getFakeTimers().useFakeTimers(); - - return jestObject; - }; - - const useRealTimers = () => { - _getFakeTimers().useRealTimers(); - - return jestObject; - }; - - const resetModules = () => { - this.resetModules(); - return jestObject; - }; - - const isolateModules = fn => { - this.isolateModules(fn); - return jestObject; - }; - - const fn = this._moduleMocker.fn.bind(this._moduleMocker); - - const spyOn = this._moduleMocker.spyOn.bind(this._moduleMocker); - - const setTimeout = timeout => { - if (this._environment.global.jasmine) { - this._environment.global.jasmine._DEFAULT_TIMEOUT_INTERVAL = timeout; - } else { - // @ts-ignore: https://github.com/Microsoft/TypeScript/issues/24587 - this._environment.global[testTimeoutSymbol] = timeout; - } - - return jestObject; - }; - - const retryTimes = numTestRetries => { - // @ts-ignore: https://github.com/Microsoft/TypeScript/issues/24587 - this._environment.global[retryTimesSymbol] = numTestRetries; - return jestObject; - }; - - const _getFakeTimers = () => { - if (!this._environment.fakeTimers) { - this._logFormattedReferenceError( - 'You are trying to access a property or method of the Jest environment after it has been torn down.' - ); - - process.exitCode = 1; - } // We've logged a user message above, so it doesn't matter if we return `null` here - - return this._environment.fakeTimers; - }; - - const jestObject = { - addMatchers: matchers => - this._environment.global.jasmine.addMatchers(matchers), - advanceTimersByTime: msToRun => - _getFakeTimers().advanceTimersByTime(msToRun), - advanceTimersToNextTimer: steps => - _getFakeTimers().advanceTimersToNextTimer(steps), - autoMockOff: disableAutomock, - autoMockOn: enableAutomock, - clearAllMocks, - clearAllTimers: () => _getFakeTimers().clearAllTimers(), - deepUnmock, - disableAutomock, - doMock: mock, - dontMock: unmock, - enableAutomock, - fn, - genMockFromModule: moduleName => this._generateMock(from, moduleName), - getTimerCount: () => _getFakeTimers().getTimerCount(), - isMockFunction: this._moduleMocker.isMockFunction, - isolateModules, - mock, - requireActual: localRequire.requireActual, - requireMock: localRequire.requireMock, - resetAllMocks, - resetModuleRegistry: resetModules, - resetModules, - restoreAllMocks, - retryTimes, - runAllImmediates: () => _getFakeTimers().runAllImmediates(), - runAllTicks: () => _getFakeTimers().runAllTicks(), - runAllTimers: () => _getFakeTimers().runAllTimers(), - runOnlyPendingTimers: () => _getFakeTimers().runOnlyPendingTimers(), - runTimersToTime: msToRun => _getFakeTimers().advanceTimersByTime(msToRun), - setMock: (moduleName, mock) => setMockFactory(moduleName, () => mock), - setTimeout, - spyOn, - unmock, - useFakeTimers, - useRealTimers - }; - return jestObject; - } - - _logFormattedReferenceError(errorMessage) { - const originalStack = new ReferenceError(errorMessage).stack - .split('\n') // Remove this file from the stack (jest-message-utils will keep one line) - .filter(line => line.indexOf(__filename) === -1) - .join('\n'); - - const _separateMessageFromS = (0, - _jestMessageUtil().separateMessageFromStack)(originalStack), - message = _separateMessageFromS.message, - stack = _separateMessageFromS.stack; - - console.error( - `\n${message}\n` + - (0, _jestMessageUtil().formatStackTrace)(stack, this._config, { - noStackTrace: false - }) - ); - } -} - -_defineProperty(Runtime, 'ScriptTransformer', void 0); - -Runtime.ScriptTransformer = _transform().ScriptTransformer; -module.exports = Runtime; diff --git a/node_modules/jest-runtime/build/types.d.ts b/node_modules/jest-runtime/build/types.d.ts deleted file mode 100644 index 513fd0ab..00000000 --- a/node_modules/jest-runtime/build/types.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import HasteResolver from 'jest-resolve'; -import { FS as HasteFS, ModuleMap } from 'jest-haste-map'; -export declare type Context = { - config: Config.ProjectConfig; - hasteFS: HasteFS; - moduleMap: ModuleMap; - resolver: HasteResolver; -}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-runtime/build/types.d.ts.map b/node_modules/jest-runtime/build/types.d.ts.map deleted file mode 100644 index 01f087ad..00000000 --- a/node_modules/jest-runtime/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,aAAa,MAAM,cAAc,CAAC;AACzC,OAAO,EAAC,EAAE,IAAI,OAAO,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAExD,oBAAY,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,aAAa,CAAC;CACzB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-runtime/build/types.js b/node_modules/jest-runtime/build/types.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/jest-runtime/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/jest-runtime/build/version.d.ts b/node_modules/jest-runtime/build/version.d.ts deleted file mode 100644 index 33ef02eb..00000000 --- a/node_modules/jest-runtime/build/version.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare const VERSION: string; -//# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-runtime/build/version.d.ts.map b/node_modules/jest-runtime/build/version.d.ts.map deleted file mode 100644 index 60880b83..00000000 --- a/node_modules/jest-runtime/build/version.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,eAAO,MAAM,OAAO,EAAE,MAA2C,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-runtime/build/version.js b/node_modules/jest-runtime/build/version.js deleted file mode 100644 index 6df9698e..00000000 --- a/node_modules/jest-runtime/build/version.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.VERSION = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const VERSION = require('../package.json').version; - -exports.VERSION = VERSION; diff --git a/node_modules/jest-runtime/node_modules/slash/index.js b/node_modules/jest-runtime/node_modules/slash/index.js deleted file mode 100644 index 75d72501..00000000 --- a/node_modules/jest-runtime/node_modules/slash/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -module.exports = input => { - const isExtendedLengthPath = /^\\\\\?\\/.test(input); - const hasNonAscii = /[^\u0000-\u0080]+/.test(input); // eslint-disable-line no-control-regex - - if (isExtendedLengthPath || hasNonAscii) { - return input; - } - - return input.replace(/\\/g, '/'); -}; diff --git a/node_modules/jest-runtime/node_modules/slash/license b/node_modules/jest-runtime/node_modules/slash/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/jest-runtime/node_modules/slash/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/jest-runtime/node_modules/slash/package.json b/node_modules/jest-runtime/node_modules/slash/package.json deleted file mode 100644 index af6c056a..00000000 --- a/node_modules/jest-runtime/node_modules/slash/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "slash@2.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "slash@2.0.0", - "_id": "slash@2.0.0", - "_inBundle": false, - "_integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "_location": "/jest-runtime/slash", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "slash@2.0.0", - "name": "slash", - "escapedName": "slash", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/jest-runtime" - ], - "_resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/slash/issues" - }, - "description": "Convert Windows backslash paths to slash paths", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/slash#readme", - "keywords": [ - "path", - "seperator", - "sep", - "slash", - "backslash", - "windows", - "win" - ], - "license": "MIT", - "name": "slash", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/slash.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0" -} diff --git a/node_modules/jest-runtime/node_modules/slash/readme.md b/node_modules/jest-runtime/node_modules/slash/readme.md deleted file mode 100644 index 5e2fedbc..00000000 --- a/node_modules/jest-runtime/node_modules/slash/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# slash [![Build Status](https://travis-ci.org/sindresorhus/slash.svg?branch=master)](https://travis-ci.org/sindresorhus/slash) - -> Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar` - -[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters. - -This was created since the `path` methods in Node outputs `\\` paths on Windows. - - -## Install - -``` -$ npm install slash -``` - - -## Usage - -```js -const path = require('path'); -const slash = require('slash'); - -const str = path.join('foo', 'bar'); -// Unix => foo/bar -// Windows => foo\\bar - -slash(str); -// Unix => foo/bar -// Windows => foo/bar -``` - - -## API - -### slash(path) - -Type: `string` - -Accepts a Windows backslash path and returns a slash path. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/jest-runtime/package.json b/node_modules/jest-runtime/package.json deleted file mode 100644 index e78afddd..00000000 --- a/node_modules/jest-runtime/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "_args": [ - [ - "jest-runtime@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-runtime@24.9.0", - "_id": "jest-runtime@24.9.0", - "_inBundle": false, - "_integrity": "sha512-8oNqgnmF3v2J6PVRM2Jfuj8oX3syKmaynlDMMKQ4iyzbQzIG6th5ub/lM2bCMTmoTKM3ykcUYI2Pw9xwNtjMnw==", - "_location": "/jest-runtime", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-runtime@24.9.0", - "name": "jest-runtime", - "escapedName": "jest-runtime", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core", - "/@jest/reporters", - "/@jest/test-sequencer", - "/jest-jasmine2", - "/jest-runner" - ], - "_resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bin": { - "jest-runtime": "./bin/jest-runtime.js" - }, - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/console": "^24.7.1", - "@jest/environment": "^24.9.0", - "@jest/source-map": "^24.3.0", - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "@types/yargs": "^13.0.0", - "chalk": "^2.0.1", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.1.15", - "jest-config": "^24.9.0", - "jest-haste-map": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-mock": "^24.9.0", - "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.9.0", - "jest-snapshot": "^24.9.0", - "jest-util": "^24.9.0", - "jest-validate": "^24.9.0", - "realpath-native": "^1.1.0", - "slash": "^2.0.0", - "strip-bom": "^3.0.0", - "yargs": "^13.3.0" - }, - "devDependencies": { - "@types/exit": "^0.1.30", - "@types/glob": "^7.1.1", - "@types/graceful-fs": "^4.1.2", - "@types/slash": "^2.0.0", - "@types/strip-bom": "^3.0.0", - "jest-environment-node": "^24.9.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-runtime", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-runtime" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-serializer/LICENSE b/node_modules/jest-serializer/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-serializer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-serializer/README.md b/node_modules/jest-serializer/README.md deleted file mode 100644 index 15cf4666..00000000 --- a/node_modules/jest-serializer/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# jest-serializer - -Module for serializing and deserializing object into memory and disk. By default, the `v8` implementations are used, but if not present, it defaults to `JSON` implementation. Both serializers have the advantage of being able to serialize `Map`, `Set`, `undefined`, `NaN`, etc, although the JSON one does it through a replacer/reviver. - -## Install - -```sh -$ yarn add jest-serializer -``` - -## API - -Three kinds of API groups are exposed: - -### In-memory serialization: `serialize` and `deserialize` - -This set of functions take or return a `Buffer`. All the process happens in memory. This is useful when willing to transfer over HTTP, TCP or via UNIX pipes. - -```javascript -import {serialize, deserialize} from 'jest-serializer'; - -const myObject = { - foo: 'bar', - baz: [0, true, '2', [], {}], -}; - -const buffer = serialize(myObject); -const myCopyObject = deserialize(buffer); -``` - -### Synchronous persistent filesystem: `readFileSync` and `writeFileSync` - -This set of functions allow to send to disk a serialization result and retrieve it back, in a synchronous way. It mimics the `fs` API so it looks familiar. - -```javascript -import {readFileSync, writeFileSync} from 'jest-serializer'; - -const myObject = { - foo: 'bar', - baz: [0, true, '2', [], {}], -}; - -const myFile = '/tmp/obj'; - -writeFileSync(myFile, myObject); -const myCopyObject = readFileSync(myFile); -``` diff --git a/node_modules/jest-serializer/build/index.d.ts b/node_modules/jest-serializer/build/index.d.ts deleted file mode 100644 index 24bb3751..00000000 --- a/node_modules/jest-serializer/build/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -/// -declare type Path = string; -export declare function deserialize(buffer: Buffer): any; -export declare function serialize(content: unknown): Buffer; -export declare function readFileSync(filePath: Path): any; -export declare function writeFileSync(filePath: Path, content: any): void; -declare const _default: { - deserialize: typeof deserialize; - readFileSync: typeof readFileSync; - serialize: typeof serialize; - writeFileSync: typeof writeFileSync; -}; -export default _default; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-serializer/build/index.d.ts.map b/node_modules/jest-serializer/build/index.d.ts.map deleted file mode 100644 index 38a867d9..00000000 --- a/node_modules/jest-serializer/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AAOH,aAAK,IAAI,GAAG,MAAM,CAAC;AAuGnB,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAI/C;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAIlD;AAID,wBAAgB,YAAY,CAAC,QAAQ,EAAE,IAAI,GAAG,GAAG,CAIhD;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,QAIzD;;;;;;;AAED,wBAKE"} \ No newline at end of file diff --git a/node_modules/jest-serializer/build/index.js b/node_modules/jest-serializer/build/index.js deleted file mode 100644 index fa19569a..00000000 --- a/node_modules/jest-serializer/build/index.js +++ /dev/null @@ -1,206 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.deserialize = deserialize; -exports.serialize = serialize; -exports.readFileSync = readFileSync; -exports.writeFileSync = writeFileSync; -exports.default = void 0; - -function _fs() { - const data = _interopRequireDefault(require('fs')); - - _fs = function _fs() { - return data; - }; - - return data; -} - -function _v() { - const data = _interopRequireDefault(require('v8')); - - _v = function _v() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// TODO: Remove this -/// -// JSON and V8 serializers are both stable when it comes to compatibility. The -// current JSON specification is well defined in RFC 8259, and V8 ensures that -// the versions are compatible by encoding the serialization version in the own -// generated buffer. -const JS_TYPE = '__$t__'; -const JS_VALUE = '__$v__'; -const JS_VF = '__$f__'; - -function replacer(_key, value) { - // NaN cannot be in a switch statement, because NaN !== NaN. - if (Number.isNaN(value)) { - return { - [JS_TYPE]: 'n' - }; - } - - switch (value) { - case undefined: - return { - [JS_TYPE]: 'u' - }; - - case +Infinity: - return { - [JS_TYPE]: '+' - }; - - case -Infinity: - return { - [JS_TYPE]: '-' - }; - } - - switch (value && value.constructor) { - case Date: - return { - [JS_TYPE]: 'd', - [JS_VALUE]: value.getTime() - }; - - case RegExp: - return { - [JS_TYPE]: 'r', - [JS_VALUE]: value.source, - [JS_VF]: value.flags - }; - - case Set: - return { - [JS_TYPE]: 's', - [JS_VALUE]: Array.from(value) - }; - - case Map: - return { - [JS_TYPE]: 'm', - [JS_VALUE]: Array.from(value) - }; - - case Buffer: - return { - [JS_TYPE]: 'b', - [JS_VALUE]: value.toString('latin1') - }; - } - - return value; -} - -function reviver(_key, value) { - if (!value || (typeof value !== 'object' && !value.hasOwnProperty(JS_TYPE))) { - return value; - } - - switch (value[JS_TYPE]) { - case 'u': - return undefined; - - case 'n': - return NaN; - - case '+': - return +Infinity; - - case '-': - return -Infinity; - - case 'd': - return new Date(value[JS_VALUE]); - - case 'r': - return new RegExp(value[JS_VALUE], value[JS_VF]); - - case 's': - return new Set(value[JS_VALUE]); - - case 'm': - return new Map(value[JS_VALUE]); - - case 'b': - return Buffer.from(value[JS_VALUE], 'latin1'); - } - - return value; -} - -function jsonStringify(content) { - // Not pretty, but the ES JSON spec says that "toJSON" will be called before - // getting into your replacer, so we have to remove them beforehand. See - // https://www.ecma-international.org/ecma-262/#sec-serializejsonproperty - // section 2.b for more information. - const dateToJSON = Date.prototype.toJSON; - const bufferToJSON = Buffer.prototype.toJSON; - /* eslint-disable no-extend-native */ - - try { - // @ts-ignore intentional removal of "toJSON" property. - Date.prototype.toJSON = undefined; // @ts-ignore intentional removal of "toJSON" property. - - Buffer.prototype.toJSON = undefined; - return JSON.stringify(content, replacer); - } finally { - Date.prototype.toJSON = dateToJSON; - Buffer.prototype.toJSON = bufferToJSON; - } - /* eslint-enable no-extend-native */ -} - -function jsonParse(content) { - return JSON.parse(content, reviver); -} // In memory functions. - -function deserialize(buffer) { - return _v().default.deserialize - ? _v().default.deserialize(buffer) - : jsonParse(buffer.toString('utf8')); -} - -function serialize(content) { - return _v().default.serialize - ? _v().default.serialize(content) - : Buffer.from(jsonStringify(content)); -} // Synchronous filesystem functions. - -function readFileSync(filePath) { - return _v().default.deserialize - ? _v().default.deserialize(_fs().default.readFileSync(filePath)) - : jsonParse(_fs().default.readFileSync(filePath, 'utf8')); -} - -function writeFileSync(filePath, content) { - return _v().default.serialize - ? _fs().default.writeFileSync(filePath, _v().default.serialize(content)) - : _fs().default.writeFileSync(filePath, jsonStringify(content), 'utf8'); -} - -var _default = { - deserialize, - readFileSync, - serialize, - writeFileSync -}; -exports.default = _default; diff --git a/node_modules/jest-serializer/package.json b/node_modules/jest-serializer/package.json deleted file mode 100644 index ddd0bb0a..00000000 --- a/node_modules/jest-serializer/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "_args": [ - [ - "jest-serializer@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-serializer@24.9.0", - "_id": "jest-serializer@24.9.0", - "_inBundle": false, - "_integrity": "sha512-DxYipDr8OvfrKH3Kel6NdED3OXxjvxXZ1uIY2I9OFbGg+vUkkg7AGvi65qbhbWNPvDckXmzMPbK3u3HaDO49bQ==", - "_location": "/jest-serializer", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-serializer@24.9.0", - "name": "jest-serializer", - "escapedName": "jest-serializer", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/jest-haste-map" - ], - "_resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "description": "Module for serializing and deserializing object into memory and disk. By default, the `v8` implementations are used, but if not present, it defaults to `JSON` implementation. Both serializers have the advantage of being able to serialize `Map`, `Set`, `undefined`, `NaN`, etc, although the JSON one does it through a replacer/reviver.", - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-serializer", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-serializer" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-serializer/v8.d.ts b/node_modules/jest-serializer/v8.d.ts deleted file mode 100644 index 809c4991..00000000 --- a/node_modules/jest-serializer/v8.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -declare module 'v8' { - function serialize(value: unknown): Buffer; - function deserialize(value: Buffer): unknown; -} diff --git a/node_modules/jest-snapshot/LICENSE b/node_modules/jest-snapshot/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-snapshot/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-snapshot/build/State.d.ts b/node_modules/jest-snapshot/build/State.d.ts deleted file mode 100644 index 9f91c107..00000000 --- a/node_modules/jest-snapshot/build/State.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export declare type SnapshotStateOptions = { - updateSnapshot: Config.SnapshotUpdateState; - getPrettier: () => null | any; - getBabelTraverse: () => Function; - expand?: boolean; -}; -export declare type SnapshotMatchOptions = { - testName: string; - received: any; - key?: string; - inlineSnapshot?: string; - error?: Error; -}; -export default class SnapshotState { - private _counters; - private _dirty; - private _index; - private _updateSnapshot; - private _snapshotData; - private _initialData; - private _snapshotPath; - private _inlineSnapshots; - private _uncheckedKeys; - private _getBabelTraverse; - private _getPrettier; - added: number; - expand: boolean; - matched: number; - unmatched: number; - updated: number; - constructor(snapshotPath: Config.Path, options: SnapshotStateOptions); - markSnapshotsAsCheckedForTest(testName: string): void; - private _addSnapshot; - clear(): void; - save(): { - deleted: boolean; - saved: boolean; - }; - getUncheckedCount(): number; - getUncheckedKeys(): Array; - removeUncheckedKeys(): void; - match({ testName, received, key, inlineSnapshot, error, }: SnapshotMatchOptions): { - actual: string; - count: number; - expected: string | null; - key: string; - pass: boolean; - }; - fail(testName: string, _received: any, key?: string): string; -} -//# sourceMappingURL=State.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/State.d.ts.map b/node_modules/jest-snapshot/build/State.d.ts.map deleted file mode 100644 index 0b97fd3b..00000000 --- a/node_modules/jest-snapshot/build/State.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../src/State.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAcnC,oBAAY,oBAAoB,GAAG;IACjC,cAAc,EAAE,MAAM,CAAC,mBAAmB,CAAC;IAC3C,WAAW,EAAE,MAAM,IAAI,GAAG,GAAG,CAAC;IAC9B,gBAAgB,EAAE,MAAM,QAAQ,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,GAAG,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,aAAa;IAChC,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,MAAM,CAAU;IAExB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,aAAa,CAAe;IACpC,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,aAAa,CAAc;IACnC,OAAO,CAAC,gBAAgB,CAAwB;IAChD,OAAO,CAAC,cAAc,CAAc;IACpC,OAAO,CAAC,iBAAiB,CAAiB;IAC1C,OAAO,CAAC,YAAY,CAAmB;IAEvC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;gBAEJ,YAAY,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,oBAAoB;IAuBpE,6BAA6B,CAAC,QAAQ,EAAE,MAAM;IAQ9C,OAAO,CAAC,YAAY;IAwBpB,KAAK;IAWL,IAAI;;;;IA8BJ,iBAAiB,IAAI,MAAM;IAI3B,gBAAgB,IAAI,KAAK,CAAC,MAAM,CAAC;IAIjC,mBAAmB,IAAI,IAAI;IAQ3B,KAAK,CAAC,EACJ,QAAQ,EACR,QAAQ,EACR,GAAG,EACH,cAAc,EACd,KAAK,GACN,EAAE,oBAAoB;;;;;;;IA4FvB,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM;CAYpD"} \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/State.js b/node_modules/jest-snapshot/build/State.js deleted file mode 100644 index 16b15e74..00000000 --- a/node_modules/jest-snapshot/build/State.js +++ /dev/null @@ -1,316 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _fs = _interopRequireDefault(require('fs')); - -var _jestMessageUtil = require('jest-message-util'); - -var _utils = require('./utils'); - -var _inline_snapshots = require('./inline_snapshots'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; - -var jestExistsFile = - global[Symbol.for('jest-native-exists-file')] || _fs.default.existsSync; - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class SnapshotState { - // @ts-ignore - constructor(snapshotPath, options) { - _defineProperty(this, '_counters', void 0); - - _defineProperty(this, '_dirty', void 0); - - _defineProperty(this, '_index', void 0); - - _defineProperty(this, '_updateSnapshot', void 0); - - _defineProperty(this, '_snapshotData', void 0); - - _defineProperty(this, '_initialData', void 0); - - _defineProperty(this, '_snapshotPath', void 0); - - _defineProperty(this, '_inlineSnapshots', void 0); - - _defineProperty(this, '_uncheckedKeys', void 0); - - _defineProperty(this, '_getBabelTraverse', void 0); - - _defineProperty(this, '_getPrettier', void 0); - - _defineProperty(this, 'added', void 0); - - _defineProperty(this, 'expand', void 0); - - _defineProperty(this, 'matched', void 0); - - _defineProperty(this, 'unmatched', void 0); - - _defineProperty(this, 'updated', void 0); - - this._snapshotPath = snapshotPath; - - const _getSnapshotData = (0, _utils.getSnapshotData)( - this._snapshotPath, - options.updateSnapshot - ), - data = _getSnapshotData.data, - dirty = _getSnapshotData.dirty; - - this._initialData = data; - this._snapshotData = data; - this._dirty = dirty; - this._getBabelTraverse = options.getBabelTraverse; - this._getPrettier = options.getPrettier; - this._inlineSnapshots = []; - this._uncheckedKeys = new Set(Object.keys(this._snapshotData)); - this._counters = new Map(); - this._index = 0; - this.expand = options.expand || false; - this.added = 0; - this.matched = 0; - this.unmatched = 0; - this._updateSnapshot = options.updateSnapshot; - this.updated = 0; - } - - markSnapshotsAsCheckedForTest(testName) { - this._uncheckedKeys.forEach(uncheckedKey => { - if ((0, _utils.keyToTestName)(uncheckedKey) === testName) { - this._uncheckedKeys.delete(uncheckedKey); - } - }); - } - - _addSnapshot(key, receivedSerialized, options) { - this._dirty = true; - - if (options.isInline) { - const error = options.error || new Error(); - const lines = (0, _jestMessageUtil.getStackTraceLines)(error.stack || ''); - const frame = (0, _jestMessageUtil.getTopFrame)(lines); - - if (!frame) { - throw new Error( - "Jest: Couldn't infer stack frame for inline snapshot." - ); - } - - this._inlineSnapshots.push({ - frame, - snapshot: receivedSerialized - }); - } else { - this._snapshotData[key] = receivedSerialized; - } - } - - clear() { - this._snapshotData = this._initialData; - this._inlineSnapshots = []; - this._counters = new Map(); - this._index = 0; - this.added = 0; - this.matched = 0; - this.unmatched = 0; - this.updated = 0; - } - - save() { - const hasExternalSnapshots = Object.keys(this._snapshotData).length; - const hasInlineSnapshots = this._inlineSnapshots.length; - const isEmpty = !hasExternalSnapshots && !hasInlineSnapshots; - const status = { - deleted: false, - saved: false - }; - - if ((this._dirty || this._uncheckedKeys.size) && !isEmpty) { - if (hasExternalSnapshots) { - (0, _utils.saveSnapshotFile)(this._snapshotData, this._snapshotPath); - } - - if (hasInlineSnapshots) { - const prettier = this._getPrettier(); // Load lazily - - const babelTraverse = this._getBabelTraverse(); // Load lazily - - (0, _inline_snapshots.saveInlineSnapshots)( - this._inlineSnapshots, - prettier, - babelTraverse - ); - } - - status.saved = true; - } else if (!hasExternalSnapshots && jestExistsFile(this._snapshotPath)) { - if (this._updateSnapshot === 'all') { - _fs.default.unlinkSync(this._snapshotPath); - } - - status.deleted = true; - } - - return status; - } - - getUncheckedCount() { - return this._uncheckedKeys.size || 0; - } - - getUncheckedKeys() { - return Array.from(this._uncheckedKeys); - } - - removeUncheckedKeys() { - if (this._updateSnapshot === 'all' && this._uncheckedKeys.size) { - this._dirty = true; - - this._uncheckedKeys.forEach(key => delete this._snapshotData[key]); - - this._uncheckedKeys.clear(); - } - } - - match({testName, received, key, inlineSnapshot, error}) { - this._counters.set(testName, (this._counters.get(testName) || 0) + 1); - - const count = Number(this._counters.get(testName)); - const isInline = inlineSnapshot !== undefined; - - if (!key) { - key = (0, _utils.testNameToKey)(testName, count); - } // Do not mark the snapshot as "checked" if the snapshot is inline and - // there's an external snapshot. This way the external snapshot can be - // removed with `--updateSnapshot`. - - if (!(isInline && this._snapshotData[key])) { - this._uncheckedKeys.delete(key); - } - - const receivedSerialized = (0, _utils.serialize)(received); - const expected = isInline ? inlineSnapshot : this._snapshotData[key]; - const pass = expected === receivedSerialized; - const hasSnapshot = isInline - ? inlineSnapshot !== '' - : this._snapshotData[key] !== undefined; - - const snapshotIsPersisted = - isInline || _fs.default.existsSync(this._snapshotPath); - - if (pass && !isInline) { - // Executing a snapshot file as JavaScript and writing the strings back - // when other snapshots have changed loses the proper escaping for some - // characters. Since we check every snapshot in every test, use the newly - // generated formatted string. - // Note that this is only relevant when a snapshot is added and the dirty - // flag is set. - this._snapshotData[key] = receivedSerialized; - } // These are the conditions on when to write snapshots: - // * There's no snapshot file in a non-CI environment. - // * There is a snapshot file and we decided to update the snapshot. - // * There is a snapshot file, but it doesn't have this snaphsot. - // These are the conditions on when not to write snapshots: - // * The update flag is set to 'none'. - // * There's no snapshot file or a file without this snapshot on a CI environment. - - if ( - (hasSnapshot && this._updateSnapshot === 'all') || - ((!hasSnapshot || !snapshotIsPersisted) && - (this._updateSnapshot === 'new' || this._updateSnapshot === 'all')) - ) { - if (this._updateSnapshot === 'all') { - if (!pass) { - if (hasSnapshot) { - this.updated++; - } else { - this.added++; - } - - this._addSnapshot(key, receivedSerialized, { - error, - isInline - }); - } else { - this.matched++; - } - } else { - this._addSnapshot(key, receivedSerialized, { - error, - isInline - }); - - this.added++; - } - - return { - actual: '', - count, - expected: '', - key, - pass: true - }; - } else { - if (!pass) { - this.unmatched++; - return { - actual: (0, _utils.unescape)(receivedSerialized), - count, - expected: expected ? (0, _utils.unescape)(expected) : null, - key, - pass: false - }; - } else { - this.matched++; - return { - actual: '', - count, - expected: '', - key, - pass: true - }; - } - } - } - - fail(testName, _received, key) { - this._counters.set(testName, (this._counters.get(testName) || 0) + 1); - - const count = Number(this._counters.get(testName)); - - if (!key) { - key = (0, _utils.testNameToKey)(testName, count); - } - - this._uncheckedKeys.delete(key); - - this.unmatched++; - return key; - } -} - -exports.default = SnapshotState; diff --git a/node_modules/jest-snapshot/build/index.d.ts b/node_modules/jest-snapshot/build/index.d.ts deleted file mode 100644 index 05d7a546..00000000 --- a/node_modules/jest-snapshot/build/index.d.ts +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { MatcherState } from 'expect'; -import { SnapshotResolver as JestSnapshotResolver } from './snapshot_resolver'; -import SnapshotState from './State'; -import * as utils from './utils'; -declare type Context = MatcherState & { - snapshotState: SnapshotState; -}; -declare const JestSnapshot: { - EXTENSION: string; - SnapshotState: typeof SnapshotState; - addSerializer: (plugin: import("pretty-format/build/types").Plugin) => void; - buildSnapshotResolver: (config: Config.ProjectConfig) => JestSnapshotResolver; - cleanup: (hasteFS: import("jest-haste-map/build/HasteFS").default, update: Config.SnapshotUpdateState, snapshotResolver: JestSnapshotResolver, testPathIgnorePatterns?: string[] | undefined) => { - filesRemoved: number; - filesRemovedList: string[]; - }; - getSerializers: () => import("pretty-format/build/types").Plugin[]; - isSnapshotPath: (path: string) => boolean; - toMatchInlineSnapshot: (this: Context, received: any, propertyMatchersOrInlineSnapshot?: any, inlineSnapshot?: string | undefined) => { - message: () => string; - name: string; - pass: boolean; - report: () => string; - actual?: undefined; - expected?: undefined; - } | { - message: () => string; - pass: boolean; - name?: undefined; - report?: undefined; - actual?: undefined; - expected?: undefined; - } | { - actual: string; - expected: string | null; - message: () => string; - name: string; - pass: boolean; - report: () => string; - }; - toMatchSnapshot: (this: Context, received: any, propertyMatchers?: any, hint?: string | undefined) => { - message: () => string; - name: string; - pass: boolean; - report: () => string; - actual?: undefined; - expected?: undefined; - } | { - message: () => string; - pass: boolean; - name?: undefined; - report?: undefined; - actual?: undefined; - expected?: undefined; - } | { - actual: string; - expected: string | null; - message: () => string; - name: string; - pass: boolean; - report: () => string; - }; - toThrowErrorMatchingInlineSnapshot: (this: Context, received: any, inlineSnapshot?: string | undefined, fromPromise?: boolean | undefined) => { - message: () => string; - name: string; - pass: boolean; - report: () => string; - actual?: undefined; - expected?: undefined; - } | { - message: () => string; - pass: boolean; - name?: undefined; - report?: undefined; - actual?: undefined; - expected?: undefined; - } | { - actual: string; - expected: string | null; - message: () => string; - name: string; - pass: boolean; - report: () => string; - }; - toThrowErrorMatchingSnapshot: (this: Context, received: any, hint: string | undefined, fromPromise: boolean) => { - message: () => string; - name: string; - pass: boolean; - report: () => string; - actual?: undefined; - expected?: undefined; - } | { - message: () => string; - pass: boolean; - name?: undefined; - report?: undefined; - actual?: undefined; - expected?: undefined; - } | { - actual: string; - expected: string | null; - message: () => string; - name: string; - pass: boolean; - report: () => string; - }; - utils: typeof utils; -}; -declare namespace JestSnapshot { - type SnapshotResolver = JestSnapshotResolver; - type SnapshotStateType = SnapshotState; -} -export = JestSnapshot; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/index.d.ts.map b/node_modules/jest-snapshot/build/index.d.ts.map deleted file mode 100644 index a59a321c..00000000 --- a/node_modules/jest-snapshot/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAQpC,OAAO,EAGL,gBAAgB,IAAI,oBAAoB,EAEzC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,aAAa,MAAM,SAAS,CAAC;AAGpC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,aAAK,OAAO,GAAG,YAAY,GAAG;IAC5B,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAidF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAajB,CAAC;AAEF,kBAAU,YAAY,CAAC;IACrB,KAAY,gBAAgB,GAAG,oBAAoB,CAAC;IACpD,KAAY,iBAAiB,GAAG,aAAa,CAAC;CAC/C;AAED,SAAS,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/index.js b/node_modules/jest-snapshot/build/index.js deleted file mode 100644 index 279b027a..00000000 --- a/node_modules/jest-snapshot/build/index.js +++ /dev/null @@ -1,541 +0,0 @@ -'use strict'; - -var _fs = _interopRequireDefault(require('fs')); - -var _jestMatcherUtils = require('jest-matcher-utils'); - -var _snapshot_resolver = require('./snapshot_resolver'); - -var _State = _interopRequireDefault(require('./State')); - -var _plugins = require('./plugins'); - -var _print = require('./print'); - -var utils = _interopRequireWildcard(require('./utils')); - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; - -var jestExistsFile = - global[Symbol.for('jest-native-exists-file')] || _fs.default.existsSync; - -const DID_NOT_THROW = 'Received function did not throw'; // same as toThrow - -const NOT_SNAPSHOT_MATCHERS = `.${(0, _jestMatcherUtils.BOLD_WEIGHT)( - 'not' -)} cannot be used with snapshot matchers`; -const HINT_ARG = 'hint'; -const HINT_COLOR = _jestMatcherUtils.BOLD_WEIGHT; -const INLINE_SNAPSHOT_ARG = 'snapshot'; -const PROPERTY_MATCHERS_ARG = 'properties'; -const INDENTATION_REGEX = /^([^\S\n]*)\S/m; // Display name in report when matcher fails same as in snapshot file, -// but with optional hint argument in bold weight. - -const printName = (concatenatedBlockNames = '', hint = '', count) => { - const hasNames = concatenatedBlockNames.length !== 0; - const hasHint = hint.length !== 0; - return ( - '`' + - (hasNames ? utils.escapeBacktickString(concatenatedBlockNames) : '') + - (hasNames && hasHint ? ': ' : '') + - (hasHint - ? (0, _jestMatcherUtils.BOLD_WEIGHT)(utils.escapeBacktickString(hint)) - : '') + - ' ' + - count + - '`' - ); -}; - -function stripAddedIndentation(inlineSnapshot) { - // Find indentation if exists. - const match = inlineSnapshot.match(INDENTATION_REGEX); - - if (!match || !match[1]) { - // No indentation. - return inlineSnapshot; - } - - const indentation = match[1]; - const lines = inlineSnapshot.split('\n'); - - if (lines.length <= 2) { - // Must be at least 3 lines. - return inlineSnapshot; - } - - if (lines[0].trim() !== '' || lines[lines.length - 1].trim() !== '') { - // If not blank first and last lines, abort. - return inlineSnapshot; - } - - for (let i = 1; i < lines.length - 1; i++) { - if (lines[i] !== '') { - if (lines[i].indexOf(indentation) !== 0) { - // All lines except first and last should either be blank or have the same - // indent as the first line (or more). If this isn't the case we don't - // want to touch the snapshot at all. - return inlineSnapshot; - } - - lines[i] = lines[i].substr(indentation.length); - } - } // Last line is a special case because it won't have the same indent as others - // but may still have been given some indent to line up. - - lines[lines.length - 1] = ''; // Return inline snapshot, now at indent 0. - - inlineSnapshot = lines.join('\n'); - return inlineSnapshot; -} - -const fileExists = (filePath, hasteFS) => - hasteFS.exists(filePath) || jestExistsFile(filePath); - -const cleanup = (hasteFS, update, snapshotResolver, testPathIgnorePatterns) => { - const pattern = '\\.' + _snapshot_resolver.EXTENSION + '$'; - const files = hasteFS.matchFiles(pattern); - let testIgnorePatternsRegex = null; - - if (testPathIgnorePatterns && testPathIgnorePatterns.length > 0) { - testIgnorePatternsRegex = new RegExp(testPathIgnorePatterns.join('|')); - } - - const list = files.filter(snapshotFile => { - const testPath = snapshotResolver.resolveTestPath(snapshotFile); // ignore snapshots of ignored tests - - if (testIgnorePatternsRegex && testIgnorePatternsRegex.test(testPath)) { - return false; - } - - if (!fileExists(testPath, hasteFS)) { - if (update === 'all') { - _fs.default.unlinkSync(snapshotFile); - } - - return true; - } - - return false; - }); - return { - filesRemoved: list.length, - filesRemovedList: list - }; -}; - -const toMatchSnapshot = function toMatchSnapshot( - received, - propertyMatchers, - hint -) { - const matcherName = 'toMatchSnapshot'; - let expectedArgument = ''; - let secondArgument = ''; - - if (typeof propertyMatchers === 'object' && propertyMatchers !== null) { - expectedArgument = PROPERTY_MATCHERS_ARG; - - if (typeof hint === 'string' && hint.length !== 0) { - secondArgument = HINT_ARG; - } - } else if ( - typeof propertyMatchers === 'string' && - propertyMatchers.length !== 0 - ) { - expectedArgument = HINT_ARG; - } - - const options = { - isNot: this.isNot, - promise: this.promise, - secondArgument - }; - - if (expectedArgument === HINT_ARG) { - options.expectedColor = HINT_COLOR; - } - - if (secondArgument === HINT_ARG) { - options.secondArgumentColor = HINT_COLOR; - } - - if (arguments.length === 3 && !propertyMatchers) { - throw new Error( - 'Property matchers must be an object.\n\nTo provide a snapshot test name without property matchers, use: toMatchSnapshot("name")' - ); - } - - return _toMatchSnapshot({ - context: this, - expectedArgument, - hint, - matcherName, - options, - propertyMatchers, - received - }); -}; - -const toMatchInlineSnapshot = function toMatchInlineSnapshot( - received, - propertyMatchersOrInlineSnapshot, - inlineSnapshot -) { - const matcherName = 'toMatchInlineSnapshot'; - let expectedArgument = ''; - let secondArgument = ''; - - if (typeof propertyMatchersOrInlineSnapshot === 'string') { - expectedArgument = INLINE_SNAPSHOT_ARG; - } else if ( - typeof propertyMatchersOrInlineSnapshot === 'object' && - propertyMatchersOrInlineSnapshot !== null - ) { - expectedArgument = PROPERTY_MATCHERS_ARG; - - if (typeof inlineSnapshot === 'string') { - secondArgument = INLINE_SNAPSHOT_ARG; - } - } - - const options = { - isNot: this.isNot, - promise: this.promise, - secondArgument - }; - let propertyMatchers; - - if (typeof propertyMatchersOrInlineSnapshot === 'string') { - inlineSnapshot = propertyMatchersOrInlineSnapshot; - } else { - propertyMatchers = propertyMatchersOrInlineSnapshot; - } - - return _toMatchSnapshot({ - context: this, - expectedArgument, - inlineSnapshot: stripAddedIndentation(inlineSnapshot || ''), - matcherName, - options, - propertyMatchers, - received - }); -}; - -const _toMatchSnapshot = ({ - context, - expectedArgument, - hint, - inlineSnapshot, - matcherName, - options, - propertyMatchers, - received -}) => { - context.dontThrow && context.dontThrow(); - hint = typeof propertyMatchers === 'string' ? propertyMatchers : hint; - const currentTestName = context.currentTestName, - isNot = context.isNot, - snapshotState = context.snapshotState; - - if (isNot) { - throw new Error( - (0, _jestMatcherUtils.matcherHint)( - matcherName, - undefined, - expectedArgument, - options - ) + - '\n\n' + - NOT_SNAPSHOT_MATCHERS - ); - } - - if (!snapshotState) { - throw new Error( - (0, _jestMatcherUtils.matcherHint)( - matcherName, - undefined, - expectedArgument, - options - ) + '\n\nsnapshot state must be initialized' - ); - } - - const fullTestName = - currentTestName && hint - ? `${currentTestName}: ${hint}` - : currentTestName || ''; // future BREAKING change: || hint - - if (typeof propertyMatchers === 'object') { - if (propertyMatchers === null) { - throw new Error(`Property matchers must be an object.`); - } - - const propertyPass = context.equals(received, propertyMatchers, [ - context.utils.iterableEquality, - context.utils.subsetEquality - ]); - - if (!propertyPass) { - const key = snapshotState.fail(fullTestName, received); - const matched = /(\d+)$/.exec(key); - const count = matched === null ? 1 : Number(matched[1]); - - const report = () => - `Snapshot name: ${printName(currentTestName, hint, count)}\n` + - '\n' + - `Expected properties: ${context.utils.printExpected( - propertyMatchers - )}\n` + - `Received value: ${context.utils.printReceived(received)}`; - - return { - message: () => - (0, _jestMatcherUtils.matcherHint)( - matcherName, - undefined, - expectedArgument, - options - ) + - '\n\n' + - report(), - name: matcherName, - pass: false, - report - }; - } else { - received = utils.deepMerge(received, propertyMatchers); - } - } - - const result = snapshotState.match({ - error: context.error, - inlineSnapshot, - received, - testName: fullTestName - }); - const count = result.count, - pass = result.pass; - let actual = result.actual, - expected = result.expected; - let report; - - if (pass) { - return { - message: () => '', - pass: true - }; - } else if (!expected) { - report = () => - `New snapshot was ${(0, _jestMatcherUtils.RECEIVED_COLOR)( - 'not written' - )}. The update flag ` + - `must be explicitly passed to write a new snapshot.\n\n` + - `This is likely because this test is run in a continuous integration ` + - `(CI) environment in which snapshots are not written by default.\n\n` + - `${(0, _jestMatcherUtils.RECEIVED_COLOR)('Received value')} ` + - `${actual}`; - } else { - expected = (expected || '').trim(); - actual = (actual || '').trim(); // Assign to local variable because of declaration let expected: - // TypeScript thinks it could change before report function is called. - - const printed = (0, _print.printDiffOrStringified)( - expected, - actual, - received, - 'Snapshot', - 'Received', - snapshotState.expand - ); - - report = () => - `Snapshot name: ${printName(currentTestName, hint, count)}\n\n` + printed; - } // Passing the actual and expected objects so that a custom reporter - // could access them, for example in order to display a custom visual diff, - // or create a different error message - - return { - actual, - expected, - message: () => - (0, _jestMatcherUtils.matcherHint)( - matcherName, - undefined, - expectedArgument, - options - ) + - '\n\n' + - report(), - name: matcherName, - pass: false, - report - }; -}; - -const toThrowErrorMatchingSnapshot = function toThrowErrorMatchingSnapshot( - received, - hint, // because error TS1016 for hint?: string - fromPromise -) { - const matcherName = 'toThrowErrorMatchingSnapshot'; - const expectedArgument = - typeof hint === 'string' && hint.length !== 0 ? HINT_ARG : ''; - const options = { - expectedColor: HINT_COLOR, - isNot: this.isNot, - promise: this.promise, - secondArgument: '' - }; - return _toThrowErrorMatchingSnapshot( - { - context: this, - expectedArgument, - hint, - matcherName, - options, - received - }, - fromPromise - ); -}; - -const toThrowErrorMatchingInlineSnapshot = function toThrowErrorMatchingInlineSnapshot( - received, - inlineSnapshot, - fromPromise -) { - const matcherName = 'toThrowErrorMatchingInlineSnapshot'; - const expectedArgument = - typeof inlineSnapshot === 'string' ? INLINE_SNAPSHOT_ARG : ''; - const options = { - isNot: this.isNot, - promise: this.promise, - secondArgument: '' - }; - return _toThrowErrorMatchingSnapshot( - { - context: this, - expectedArgument, - inlineSnapshot: inlineSnapshot || '', - matcherName, - options, - received - }, - fromPromise - ); -}; - -const _toThrowErrorMatchingSnapshot = ( - { - context, - expectedArgument, - inlineSnapshot, - matcherName, - options, - received, - hint - }, - fromPromise -) => { - context.dontThrow && context.dontThrow(); - const isNot = context.isNot; - - if (isNot) { - throw new Error( - (0, _jestMatcherUtils.matcherHint)( - matcherName, - undefined, - expectedArgument, - options - ) + - '\n\n' + - NOT_SNAPSHOT_MATCHERS - ); - } - - let error; - - if (fromPromise) { - error = received; - } else { - try { - received(); - } catch (e) { - error = e; - } - } - - if (error === undefined) { - throw new Error( - (0, _jestMatcherUtils.matcherHint)( - matcherName, - undefined, - expectedArgument, - options - ) + - '\n\n' + - DID_NOT_THROW - ); - } - - return _toMatchSnapshot({ - context, - expectedArgument, - hint, - inlineSnapshot, - matcherName, - options, - received: error.message - }); -}; - -const JestSnapshot = { - EXTENSION: _snapshot_resolver.EXTENSION, - SnapshotState: _State.default, - addSerializer: _plugins.addSerializer, - buildSnapshotResolver: _snapshot_resolver.buildSnapshotResolver, - cleanup, - getSerializers: _plugins.getSerializers, - isSnapshotPath: _snapshot_resolver.isSnapshotPath, - toMatchInlineSnapshot, - toMatchSnapshot, - toThrowErrorMatchingInlineSnapshot, - toThrowErrorMatchingSnapshot, - utils -}; -/* eslint-disable-next-line no-redeclare */ - -module.exports = JestSnapshot; diff --git a/node_modules/jest-snapshot/build/inline_snapshots.d.ts b/node_modules/jest-snapshot/build/inline_snapshots.d.ts deleted file mode 100644 index 63d29b0b..00000000 --- a/node_modules/jest-snapshot/build/inline_snapshots.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Frame } from 'jest-message-util'; -export declare type InlineSnapshot = { - snapshot: string; - frame: Frame; -}; -export declare const saveInlineSnapshots: (snapshots: InlineSnapshot[], prettier: any, babelTraverse: Function) => void; -//# sourceMappingURL=inline_snapshots.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/inline_snapshots.d.ts.map b/node_modules/jest-snapshot/build/inline_snapshots.d.ts.map deleted file mode 100644 index cee1f653..00000000 --- a/node_modules/jest-snapshot/build/inline_snapshots.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"inline_snapshots.d.ts","sourceRoot":"","sources":["../src/inline_snapshots.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,OAAO,EAAC,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAKxC,oBAAY,cAAc,GAAG;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,mBAAmB,+EA8B/B,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/inline_snapshots.js b/node_modules/jest-snapshot/build/inline_snapshots.js deleted file mode 100644 index 66965e12..00000000 --- a/node_modules/jest-snapshot/build/inline_snapshots.js +++ /dev/null @@ -1,331 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.saveInlineSnapshots = void 0; - -var _fs = _interopRequireDefault(require('fs')); - -var _path = _interopRequireDefault(require('path')); - -var _semver = _interopRequireDefault(require('semver')); - -var _types = require('@babel/types'); - -var _utils = require('./utils'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; - -var jestWriteFile = - global[Symbol.for('jest-native-write-file')] || _fs.default.writeFileSync; - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; - -var jestReadFile = - global[Symbol.for('jest-native-read-file')] || _fs.default.readFileSync; - -const saveInlineSnapshots = (snapshots, prettier, babelTraverse) => { - if (!prettier) { - throw new Error( - `Jest: Inline Snapshots requires Prettier.\n` + - `Please ensure "prettier" is installed in your project.` - ); - } // Custom parser API was added in 1.5.0 - - if (_semver.default.lt(prettier.version, '1.5.0')) { - throw new Error( - `Jest: Inline Snapshots require prettier>=1.5.0.\n` + - `Please upgrade "prettier".` - ); - } - - const snapshotsByFile = groupSnapshotsByFile(snapshots); - - var _arr = Object.keys(snapshotsByFile); - - for (var _i = 0; _i < _arr.length; _i++) { - const sourceFilePath = _arr[_i]; - saveSnapshotsForFile( - snapshotsByFile[sourceFilePath], - sourceFilePath, - prettier, - babelTraverse - ); - } -}; - -exports.saveInlineSnapshots = saveInlineSnapshots; - -const saveSnapshotsForFile = ( - snapshots, - sourceFilePath, - prettier, - babelTraverse -) => { - const sourceFile = jestReadFile(sourceFilePath, 'utf8'); // Resolve project configuration. - // For older versions of Prettier, do not load configuration. - - const config = prettier.resolveConfig - ? prettier.resolveConfig.sync(sourceFilePath, { - editorconfig: true - }) - : null; // Detect the parser for the test file. - // For older versions of Prettier, fallback to a simple parser detection. - - const inferredParser = prettier.getFileInfo - ? prettier.getFileInfo.sync(sourceFilePath).inferredParser - : (config && config.parser) || simpleDetectParser(sourceFilePath); // Insert snapshots using the custom parser API. After insertion, the code is - // formatted, except snapshot indentation. Snapshots cannot be formatted until - // after the initial format because we don't know where the call expression - // will be placed (specifically its indentation). - - const newSourceFile = prettier.format( - sourceFile, - _objectSpread({}, config, { - filepath: sourceFilePath, - parser: createInsertionParser(snapshots, inferredParser, babelTraverse) - }) - ); // Format the snapshots using the custom parser API. - - const formattedNewSourceFile = prettier.format( - newSourceFile, - _objectSpread({}, config, { - filepath: sourceFilePath, - parser: createFormattingParser(inferredParser, babelTraverse) - }) - ); - - if (formattedNewSourceFile !== sourceFile) { - jestWriteFile(sourceFilePath, formattedNewSourceFile); - } -}; - -const groupSnapshotsBy = createKey => snapshots => - snapshots.reduce((object, inlineSnapshot) => { - const key = createKey(inlineSnapshot); - return _objectSpread({}, object, { - [key]: (object[key] || []).concat(inlineSnapshot) - }); - }, {}); - -const groupSnapshotsByFrame = groupSnapshotsBy(({frame: {line, column}}) => - typeof line === 'number' && typeof column === 'number' - ? `${line}:${column - 1}` - : '' -); -const groupSnapshotsByFile = groupSnapshotsBy(({frame: {file}}) => file); - -const indent = (snapshot, numIndents, indentation) => { - const lines = snapshot.split('\n'); // Prevent re-identation of inline snapshots. - - if ( - lines.length >= 2 && - lines[1].startsWith(indentation.repeat(numIndents + 1)) - ) { - return snapshot; - } - - return lines - .map((line, index) => { - if (index === 0) { - // First line is either a 1-line snapshot or a blank line. - return line; - } else if (index !== lines.length - 1) { - // Do not indent empty lines. - if (line === '') { - return line; - } // Not last line, indent one level deeper than expect call. - - return indentation.repeat(numIndents + 1) + line; - } else { - // The last line should be placed on the same level as the expect call. - return indentation.repeat(numIndents) + line; - } - }) - .join('\n'); -}; - -const getAst = (parsers, inferredParser, text) => { - // Flow uses a 'Program' parent node, babel expects a 'File'. - let ast = parsers[inferredParser](text); - - if (ast.type !== 'File') { - ast = (0, _types.file)(ast, ast.comments, ast.tokens); - delete ast.program.comments; - } - - return ast; -}; // This parser inserts snapshots into the AST. - -const createInsertionParser = (snapshots, inferredParser, babelTraverse) => ( - text, - parsers, - options -) => { - // Workaround for https://github.com/prettier/prettier/issues/3150 - options.parser = inferredParser; - const groupedSnapshots = groupSnapshotsByFrame(snapshots); - const remainingSnapshots = new Set(snapshots.map(({snapshot}) => snapshot)); - const ast = getAst(parsers, inferredParser, text); - babelTraverse(ast, { - CallExpression({node: {arguments: args, callee}}) { - if ( - callee.type !== 'MemberExpression' || - callee.property.type !== 'Identifier' - ) { - return; - } - - const _callee$property$loc$ = callee.property.loc.start, - line = _callee$property$loc$.line, - column = _callee$property$loc$.column; - const snapshotsForFrame = groupedSnapshots[`${line}:${column}`]; - - if (!snapshotsForFrame) { - return; - } - - if (snapshotsForFrame.length > 1) { - throw new Error( - 'Jest: Multiple inline snapshots for the same call are not supported.' - ); - } - - const snapshotIndex = args.findIndex( - ({type}) => type === 'TemplateLiteral' - ); - const values = snapshotsForFrame.map(({snapshot}) => { - remainingSnapshots.delete(snapshot); - return (0, _types.templateLiteral)( - [ - (0, _types.templateElement)({ - raw: (0, _utils.escapeBacktickString)(snapshot) - }) - ], - [] - ); - }); - const replacementNode = values[0]; - - if (snapshotIndex > -1) { - args[snapshotIndex] = replacementNode; - } else { - args.push(replacementNode); - } - } - }); - - if (remainingSnapshots.size) { - throw new Error(`Jest: Couldn't locate all inline snapshots.`); - } - - return ast; -}; // This parser formats snapshots to the correct indentation. - -const createFormattingParser = (inferredParser, babelTraverse) => ( - text, - parsers, - options -) => { - // Workaround for https://github.com/prettier/prettier/issues/3150 - options.parser = inferredParser; - const ast = getAst(parsers, inferredParser, text); - babelTraverse(ast, { - CallExpression({node: {arguments: args, callee}}) { - if ( - callee.type !== 'MemberExpression' || - callee.property.type !== 'Identifier' || - callee.property.name !== 'toMatchInlineSnapshot' || - !callee.loc || - callee.computed - ) { - return; - } - - let snapshotIndex; - let snapshot; - - for (let i = 0; i < args.length; i++) { - const node = args[i]; - - if (node.type === 'TemplateLiteral') { - snapshotIndex = i; - snapshot = node.quasis[0].value.raw; - } - } - - if (snapshot === undefined || snapshotIndex === undefined) { - return; - } - - const useSpaces = !options.useTabs; - snapshot = indent( - snapshot, - Math.ceil( - useSpaces - ? callee.loc.start.column / options.tabWidth - : callee.loc.start.column / 2 // Each tab is 2 characters. - ), - useSpaces ? ' '.repeat(options.tabWidth) : '\t' - ); - const replacementNode = (0, _types.templateLiteral)( - [ - (0, _types.templateElement)({ - raw: snapshot - }) - ], - [] - ); - args[snapshotIndex] = replacementNode; - } - }); - return ast; -}; - -const simpleDetectParser = filePath => { - const extname = _path.default.extname(filePath); - - if (/tsx?$/.test(extname)) { - return 'typescript'; - } - - return 'babylon'; -}; diff --git a/node_modules/jest-snapshot/build/mock_serializer.d.ts b/node_modules/jest-snapshot/build/mock_serializer.d.ts deleted file mode 100644 index 23557b62..00000000 --- a/node_modules/jest-snapshot/build/mock_serializer.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { NewPlugin } from 'pretty-format'; -export declare const serialize: NewPlugin['serialize']; -export declare const test: NewPlugin['test']; -declare const plugin: NewPlugin; -export default plugin; -//# sourceMappingURL=mock_serializer.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/mock_serializer.d.ts.map b/node_modules/jest-snapshot/build/mock_serializer.d.ts.map deleted file mode 100644 index 93fc3dfc..00000000 --- a/node_modules/jest-snapshot/build/mock_serializer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mock_serializer.d.ts","sourceRoot":"","sources":["../src/mock_serializer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAExC,eAAO,MAAM,SAAS,EAAE,SAAS,CAAC,WAAW,CAiC5C,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,SAAS,CAAC,MAAM,CAAuC,CAAC;AAE3E,QAAA,MAAM,MAAM,EAAE,SAA6B,CAAC;AAE5C,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/mock_serializer.js b/node_modules/jest-snapshot/build/mock_serializer.js deleted file mode 100644 index b7a339c6..00000000 --- a/node_modules/jest-snapshot/build/mock_serializer.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = exports.test = exports.serialize = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const serialize = (val, config, indentation, depth, refs, printer) => { - // Serialize a non-default name, even if config.printFunctionName is false. - const name = val.getMockName(); - const nameString = name === 'jest.fn()' ? '' : ' ' + name; - let callsString = ''; - - if (val.mock.calls.length !== 0) { - const indentationNext = indentation + config.indent; - callsString = - ' {' + - config.spacingOuter + - indentationNext + - '"calls": ' + - printer(val.mock.calls, config, indentationNext, depth, refs) + - (config.min ? ', ' : ',') + - config.spacingOuter + - indentationNext + - '"results": ' + - printer(val.mock.results, config, indentationNext, depth, refs) + - (config.min ? '' : ',') + - config.spacingOuter + - indentation + - '}'; - } - - return '[MockFunction' + nameString + ']' + callsString; -}; - -exports.serialize = serialize; - -const test = val => val && !!val._isMockFunction; - -exports.test = test; -const plugin = { - serialize, - test -}; -var _default = plugin; -exports.default = _default; diff --git a/node_modules/jest-snapshot/build/plugins.d.ts b/node_modules/jest-snapshot/build/plugins.d.ts deleted file mode 100644 index f8c0df14..00000000 --- a/node_modules/jest-snapshot/build/plugins.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare const addSerializer: (plugin: import("pretty-format/build/types").Plugin) => void; -export declare const getSerializers: () => import("pretty-format/build/types").Plugin[]; -//# sourceMappingURL=plugins.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/plugins.d.ts.map b/node_modules/jest-snapshot/build/plugins.d.ts.map deleted file mode 100644 index 1e0a8c2d..00000000 --- a/node_modules/jest-snapshot/build/plugins.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA0BH,eAAO,MAAM,aAAa,8DAEzB,CAAC;AAEF,eAAO,MAAM,cAAc,oDAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/plugins.js b/node_modules/jest-snapshot/build/plugins.js deleted file mode 100644 index 1cbaf464..00000000 --- a/node_modules/jest-snapshot/build/plugins.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.getSerializers = exports.addSerializer = void 0; - -var _prettyFormat = _interopRequireDefault(require('pretty-format')); - -var _mock_serializer = _interopRequireDefault(require('./mock_serializer')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const _prettyFormat$plugins = _prettyFormat.default.plugins, - DOMCollection = _prettyFormat$plugins.DOMCollection, - DOMElement = _prettyFormat$plugins.DOMElement, - Immutable = _prettyFormat$plugins.Immutable, - ReactElement = _prettyFormat$plugins.ReactElement, - ReactTestComponent = _prettyFormat$plugins.ReactTestComponent, - AsymmetricMatcher = _prettyFormat$plugins.AsymmetricMatcher; -let PLUGINS = [ - ReactTestComponent, - ReactElement, - DOMElement, - DOMCollection, - Immutable, - _mock_serializer.default, - AsymmetricMatcher -]; // Prepend to list so the last added is the first tested. - -const addSerializer = plugin => { - PLUGINS = [plugin].concat(PLUGINS); -}; - -exports.addSerializer = addSerializer; - -const getSerializers = () => PLUGINS; - -exports.getSerializers = getSerializers; diff --git a/node_modules/jest-snapshot/build/print.d.ts b/node_modules/jest-snapshot/build/print.d.ts deleted file mode 100644 index 5204cf98..00000000 --- a/node_modules/jest-snapshot/build/print.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare const printDiffOrStringified: (expectedSerializedTrimmed: string, receivedSerializedTrimmed: string, received: unknown, expectedLabel: string, receivedLabel: string, expand: boolean) => string; -//# sourceMappingURL=print.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/print.d.ts.map b/node_modules/jest-snapshot/build/print.d.ts.map deleted file mode 100644 index b0996405..00000000 --- a/node_modules/jest-snapshot/build/print.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"print.d.ts","sourceRoot":"","sources":["../src/print.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA0CH,eAAO,MAAM,sBAAsB,oKAkFlC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/print.js b/node_modules/jest-snapshot/build/print.js deleted file mode 100644 index d0ce6dbb..00000000 --- a/node_modules/jest-snapshot/build/print.js +++ /dev/null @@ -1,174 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.printDiffOrStringified = void 0; - -var _jestDiff = _interopRequireWildcard(require('jest-diff')); - -var _jestGetType = _interopRequireWildcard(require('jest-get-type')); - -var _jestMatcherUtils = require('jest-matcher-utils'); - -var _prettyFormat = _interopRequireDefault(require('pretty-format')); - -var _utils = require('./utils'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const isLineDiffable = received => { - const receivedType = (0, _jestGetType.default)(received); - - if ((0, _jestGetType.isPrimitive)(received)) { - return typeof received === 'string' && received.includes('\n'); - } - - if ( - receivedType === 'date' || - receivedType === 'function' || - receivedType === 'regexp' - ) { - return false; - } - - if (received instanceof Error) { - return false; - } - - if ( - receivedType === 'object' && - typeof received.asymmetricMatch === 'function' - ) { - return false; - } - - return true; -}; - -const printDiffOrStringified = ( - expectedSerializedTrimmed, - receivedSerializedTrimmed, - received, - expectedLabel, - receivedLabel, - expand -) => { - if (typeof received === 'string') { - if ( - expectedSerializedTrimmed.length >= 2 && - expectedSerializedTrimmed.startsWith('"') && - expectedSerializedTrimmed.endsWith('"') && - receivedSerializedTrimmed === - (0, _utils.unescape)((0, _prettyFormat.default)(received)) - ) { - // The expected snapshot looks like a stringified string. - // The received serialization is default stringified string. - // Undo default serialization of expected snapshot: - // Remove enclosing double quote marks. - // Remove backslash escape preceding backslash here, - // because unescape replaced it only preceding double quote mark. - return (0, _jestMatcherUtils.printDiffOrStringify)( - expectedSerializedTrimmed.slice(1, -1).replace(/\\\\/g, '\\'), - received, - expectedLabel, - receivedLabel, - expand - ); - } // Display substring highlight even when strings have custom serialization. - - const result = (0, _jestDiff.getStringDiff)( - expectedSerializedTrimmed, - receivedSerializedTrimmed, - { - aAnnotation: expectedLabel, - bAnnotation: receivedLabel, - expand - } - ); - - if (result !== null) { - if (result.isMultiline) { - return result.annotatedDiff; - } // Because not default stringify, call EXPECTED_COLOR and RECEIVED_COLOR - // This is reason to call getStringDiff instead of printDiffOrStringify - // Because there is no closing double quote mark at end of single lines, - // future improvement is to call replaceSpacesAtEnd if it becomes public. - - const printLabel = (0, _jestMatcherUtils.getLabelPrinter)( - expectedLabel, - receivedLabel - ); - return ( - printLabel(expectedLabel) + - (0, _jestMatcherUtils.EXPECTED_COLOR)(result.a) + - '\n' + - printLabel(receivedLabel) + - (0, _jestMatcherUtils.RECEIVED_COLOR)(result.b) - ); - } - } - - if ( - (expectedSerializedTrimmed.includes('\n') || - receivedSerializedTrimmed.includes('\n')) && - isLineDiffable(received) - ) { - return (0, _jestDiff.default)( - expectedSerializedTrimmed, - receivedSerializedTrimmed, - { - aAnnotation: expectedLabel, - bAnnotation: receivedLabel, - expand - } - ); - } - - const printLabel = (0, _jestMatcherUtils.getLabelPrinter)( - expectedLabel, - receivedLabel - ); - return ( - printLabel(expectedLabel) + - (0, _jestMatcherUtils.EXPECTED_COLOR)(expectedSerializedTrimmed) + - '\n' + - printLabel(receivedLabel) + - (0, _jestMatcherUtils.RECEIVED_COLOR)(receivedSerializedTrimmed) - ); -}; - -exports.printDiffOrStringified = printDiffOrStringified; diff --git a/node_modules/jest-snapshot/build/snapshot_resolver.d.ts b/node_modules/jest-snapshot/build/snapshot_resolver.d.ts deleted file mode 100644 index 8c0b86bb..00000000 --- a/node_modules/jest-snapshot/build/snapshot_resolver.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export declare type SnapshotResolver = { - testPathForConsistencyCheck: string; - resolveSnapshotPath(testPath: Config.Path, extension?: string): Config.Path; - resolveTestPath(snapshotPath: Config.Path, extension?: string): Config.Path; -}; -export declare const EXTENSION = "snap"; -export declare const DOT_EXTENSION: string; -export declare const isSnapshotPath: (path: string) => boolean; -export declare const buildSnapshotResolver: (config: Config.ProjectConfig) => SnapshotResolver; -//# sourceMappingURL=snapshot_resolver.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/snapshot_resolver.d.ts.map b/node_modules/jest-snapshot/build/snapshot_resolver.d.ts.map deleted file mode 100644 index 5d0f62c3..00000000 --- a/node_modules/jest-snapshot/build/snapshot_resolver.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"snapshot_resolver.d.ts","sourceRoot":"","sources":["../src/snapshot_resolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAGnC,oBAAY,gBAAgB,GAAG;IAC7B,2BAA2B,EAAE,MAAM,CAAC;IACpC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IAC5E,eAAe,CAAC,YAAY,EAAE,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;CAC7E,CAAC;AAEF,eAAO,MAAM,SAAS,SAAS,CAAC;AAChC,eAAO,MAAM,aAAa,QAAkB,CAAC;AAE7C,eAAO,MAAM,cAAc,2BACG,CAAC;AAG/B,eAAO,MAAM,qBAAqB,oDAQjC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/snapshot_resolver.js b/node_modules/jest-snapshot/build/snapshot_resolver.js deleted file mode 100644 index dabab180..00000000 --- a/node_modules/jest-snapshot/build/snapshot_resolver.js +++ /dev/null @@ -1,117 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.buildSnapshotResolver = exports.isSnapshotPath = exports.DOT_EXTENSION = exports.EXTENSION = void 0; - -var _path = _interopRequireDefault(require('path')); - -var _chalk = _interopRequireDefault(require('chalk')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const EXTENSION = 'snap'; -exports.EXTENSION = EXTENSION; -const DOT_EXTENSION = '.' + EXTENSION; -exports.DOT_EXTENSION = DOT_EXTENSION; - -const isSnapshotPath = path => path.endsWith(DOT_EXTENSION); - -exports.isSnapshotPath = isSnapshotPath; -const cache = new Map(); - -const buildSnapshotResolver = config => { - const key = config.rootDir; - - if (!cache.has(key)) { - cache.set(key, createSnapshotResolver(config.snapshotResolver)); - } - - return cache.get(key); -}; - -exports.buildSnapshotResolver = buildSnapshotResolver; - -function createSnapshotResolver(snapshotResolverPath) { - return typeof snapshotResolverPath === 'string' - ? createCustomSnapshotResolver(snapshotResolverPath) - : createDefaultSnapshotResolver(); -} - -function createDefaultSnapshotResolver() { - return { - resolveSnapshotPath: testPath => - _path.default.join( - _path.default.join(_path.default.dirname(testPath), '__snapshots__'), - _path.default.basename(testPath) + DOT_EXTENSION - ), - resolveTestPath: snapshotPath => - _path.default.resolve( - _path.default.dirname(snapshotPath), - '..', - _path.default.basename(snapshotPath, DOT_EXTENSION) - ), - testPathForConsistencyCheck: _path.default.posix.join( - 'consistency_check', - '__tests__', - 'example.test.js' - ) - }; -} - -function createCustomSnapshotResolver(snapshotResolverPath) { - const custom = require(snapshotResolverPath); - - const keys = [ - ['resolveSnapshotPath', 'function'], - ['resolveTestPath', 'function'], - ['testPathForConsistencyCheck', 'string'] - ]; - keys.forEach(([propName, requiredType]) => { - if (typeof custom[propName] !== requiredType) { - throw new TypeError(mustImplement(propName, requiredType)); - } - }); - const customResolver = { - resolveSnapshotPath: testPath => - custom.resolveSnapshotPath(testPath, DOT_EXTENSION), - resolveTestPath: snapshotPath => - custom.resolveTestPath(snapshotPath, DOT_EXTENSION), - testPathForConsistencyCheck: custom.testPathForConsistencyCheck - }; - verifyConsistentTransformations(customResolver); - return customResolver; -} - -function mustImplement(propName, requiredType) { - return ( - _chalk.default.bold( - `Custom snapshot resolver must implement a \`${propName}\` as a ${requiredType}.` - ) + - '\nDocumentation: https://facebook.github.io/jest/docs/en/configuration.html#snapshotResolver' - ); -} - -function verifyConsistentTransformations(custom) { - const resolvedSnapshotPath = custom.resolveSnapshotPath( - custom.testPathForConsistencyCheck - ); - const resolvedTestPath = custom.resolveTestPath(resolvedSnapshotPath); - - if (resolvedTestPath !== custom.testPathForConsistencyCheck) { - throw new Error( - _chalk.default.bold( - `Custom snapshot resolver functions must transform paths consistently, i.e. expects resolveTestPath(resolveSnapshotPath('${custom.testPathForConsistencyCheck}')) === ${resolvedTestPath}` - ) - ); - } -} diff --git a/node_modules/jest-snapshot/build/types.d.ts b/node_modules/jest-snapshot/build/types.d.ts deleted file mode 100644 index 19691231..00000000 --- a/node_modules/jest-snapshot/build/types.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare type SnapshotData = Record; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/types.d.ts.map b/node_modules/jest-snapshot/build/types.d.ts.map deleted file mode 100644 index 659c550e..00000000 --- a/node_modules/jest-snapshot/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oBAAY,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/types.js b/node_modules/jest-snapshot/build/types.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/jest-snapshot/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/jest-snapshot/build/utils.d.ts b/node_modules/jest-snapshot/build/utils.d.ts deleted file mode 100644 index 940f248d..00000000 --- a/node_modules/jest-snapshot/build/utils.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export declare const SNAPSHOT_VERSION = "1"; -export declare const SNAPSHOT_GUIDE_LINK = "https://goo.gl/fbAQLP"; -export declare const SNAPSHOT_VERSION_WARNING: string; -export declare const testNameToKey: (testName: string, count: number) => string; -export declare const keyToTestName: (key: string) => string; -export declare const getSnapshotData: (snapshotPath: string, update: Config.SnapshotUpdateState) => { - data: Record; - dirty: boolean; -}; -export declare const serialize: (data: string) => string; -export declare const unescape: (data: string) => string; -export declare const escapeBacktickString: (str: string) => string; -export declare const ensureDirectoryExists: (filePath: string) => void; -export declare const saveSnapshotFile: (snapshotData: Record, snapshotPath: string) => void; -export declare const deepMerge: (target: any, source: any) => any; -//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/utils.d.ts.map b/node_modules/jest-snapshot/build/utils.d.ts.map deleted file mode 100644 index 0b2157e5..00000000 --- a/node_modules/jest-snapshot/build/utils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAKnC,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAC3D,eAAO,MAAM,wBAAwB,QAIpC,CAAC;AAwDF,eAAO,MAAM,aAAa,6CACF,CAAC;AAEzB,eAAO,MAAM,aAAa,yBAMzB,CAAC;AAEF,eAAO,MAAM,eAAe;;;CAgC3B,CAAC;AAOF,eAAO,MAAM,SAAS,0BASnB,CAAC;AAGJ,eAAO,MAAM,QAAQ,0BAAyD,CAAC;AAE/E,eAAO,MAAM,oBAAoB,yBACC,CAAC;AAKnC,eAAO,MAAM,qBAAqB,4BAIjC,CAAC;AAIF,eAAO,MAAM,gBAAgB,sEAoB5B,CAAC;AAqBF,eAAO,MAAM,SAAS,mCAerB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-snapshot/build/utils.js b/node_modules/jest-snapshot/build/utils.js deleted file mode 100644 index dc3d4efc..00000000 --- a/node_modules/jest-snapshot/build/utils.js +++ /dev/null @@ -1,297 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.deepMerge = exports.saveSnapshotFile = exports.ensureDirectoryExists = exports.escapeBacktickString = exports.unescape = exports.serialize = exports.getSnapshotData = exports.keyToTestName = exports.testNameToKey = exports.SNAPSHOT_VERSION_WARNING = exports.SNAPSHOT_GUIDE_LINK = exports.SNAPSHOT_VERSION = void 0; - -var _fs = _interopRequireDefault(require('fs')); - -var _path = _interopRequireDefault(require('path')); - -var _mkdirp = _interopRequireDefault(require('mkdirp')); - -var _naturalCompare = _interopRequireDefault(require('natural-compare')); - -var _chalk = _interopRequireDefault(require('chalk')); - -var _prettyFormat = _interopRequireDefault(require('pretty-format')); - -var _plugins = require('./plugins'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; - -var jestWriteFile = - global[Symbol.for('jest-native-write-file')] || _fs.default.writeFileSync; - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; - -var jestReadFile = - global[Symbol.for('jest-native-read-file')] || _fs.default.readFileSync; - -var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; - -var jestExistsFile = - global[Symbol.for('jest-native-exists-file')] || _fs.default.existsSync; - -const SNAPSHOT_VERSION = '1'; -exports.SNAPSHOT_VERSION = SNAPSHOT_VERSION; -const SNAPSHOT_VERSION_REGEXP = /^\/\/ Jest Snapshot v(.+),/; -const SNAPSHOT_GUIDE_LINK = 'https://goo.gl/fbAQLP'; -exports.SNAPSHOT_GUIDE_LINK = SNAPSHOT_GUIDE_LINK; - -const SNAPSHOT_VERSION_WARNING = _chalk.default.yellow( - `${_chalk.default.bold('Warning')}: Before you upgrade snapshots, ` + - `we recommend that you revert any local changes to tests or other code, ` + - `to ensure that you do not store invalid state.` -); - -exports.SNAPSHOT_VERSION_WARNING = SNAPSHOT_VERSION_WARNING; - -const writeSnapshotVersion = () => - `// Jest Snapshot v${SNAPSHOT_VERSION}, ${SNAPSHOT_GUIDE_LINK}`; - -const validateSnapshotVersion = snapshotContents => { - const versionTest = SNAPSHOT_VERSION_REGEXP.exec(snapshotContents); - const version = versionTest && versionTest[1]; - - if (!version) { - return new Error( - _chalk.default.red( - `${_chalk.default.bold( - 'Outdated snapshot' - )}: No snapshot header found. ` + - `Jest 19 introduced versioned snapshots to ensure all developers ` + - `on a project are using the same version of Jest. ` + - `Please update all snapshots during this upgrade of Jest.\n\n` - ) + SNAPSHOT_VERSION_WARNING - ); - } - - if (version < SNAPSHOT_VERSION) { - return new Error( - _chalk.default.red( - `${_chalk.default.red.bold( - 'Outdated snapshot' - )}: The version of the snapshot ` + - `file associated with this test is outdated. The snapshot file ` + - `version ensures that all developers on a project are using ` + - `the same version of Jest. ` + - `Please update all snapshots during this upgrade of Jest.\n\n` - ) + - `Expected: v${SNAPSHOT_VERSION}\n` + - `Received: v${version}\n\n` + - SNAPSHOT_VERSION_WARNING - ); - } - - if (version > SNAPSHOT_VERSION) { - return new Error( - _chalk.default.red( - `${_chalk.default.red.bold( - 'Outdated Jest version' - )}: The version of this ` + - `snapshot file indicates that this project is meant to be used ` + - `with a newer version of Jest. The snapshot file version ensures ` + - `that all developers on a project are using the same version of ` + - `Jest. Please update your version of Jest and re-run the tests.\n\n` - ) + - `Expected: v${SNAPSHOT_VERSION}\n` + - `Received: v${version}` - ); - } - - return null; -}; - -function isObject(item) { - return item && typeof item === 'object' && !Array.isArray(item); -} - -const testNameToKey = (testName, count) => testName + ' ' + count; - -exports.testNameToKey = testNameToKey; - -const keyToTestName = key => { - if (!/ \d+$/.test(key)) { - throw new Error('Snapshot keys must end with a number.'); - } - - return key.replace(/ \d+$/, ''); -}; - -exports.keyToTestName = keyToTestName; - -const getSnapshotData = (snapshotPath, update) => { - const data = Object.create(null); - let snapshotContents = ''; - let dirty = false; - - if (jestExistsFile(snapshotPath)) { - try { - snapshotContents = jestReadFile(snapshotPath, 'utf8'); // eslint-disable-next-line no-new-func - - const populate = new Function('exports', snapshotContents); - populate(data); - } catch (e) {} - } - - const validationResult = validateSnapshotVersion(snapshotContents); - const isInvalid = snapshotContents && validationResult; - - if (update === 'none' && isInvalid) { - throw validationResult; - } - - if ((update === 'all' || update === 'new') && isInvalid) { - dirty = true; - } - - return { - data, - dirty - }; -}; // Extra line breaks at the beginning and at the end of the snapshot are useful -// to make the content of the snapshot easier to read - -exports.getSnapshotData = getSnapshotData; - -const addExtraLineBreaks = string => - string.includes('\n') ? `\n${string}\n` : string; - -const serialize = data => - addExtraLineBreaks( - normalizeNewlines( - (0, _prettyFormat.default)(data, { - escapeRegex: true, - plugins: (0, _plugins.getSerializers)(), - printFunctionName: false - }) - ) - ); // unescape double quotes - -exports.serialize = serialize; - -const unescape = data => data.replace(/\\(")/g, '$1'); - -exports.unescape = unescape; - -const escapeBacktickString = str => str.replace(/`|\\|\${/g, '\\$&'); - -exports.escapeBacktickString = escapeBacktickString; - -const printBacktickString = str => '`' + escapeBacktickString(str) + '`'; - -const ensureDirectoryExists = filePath => { - try { - _mkdirp.default.sync( - _path.default.join(_path.default.dirname(filePath)), - '777' - ); - } catch (e) {} -}; - -exports.ensureDirectoryExists = ensureDirectoryExists; - -const normalizeNewlines = string => string.replace(/\r\n|\r/g, '\n'); - -const saveSnapshotFile = (snapshotData, snapshotPath) => { - const snapshots = Object.keys(snapshotData) - .sort(_naturalCompare.default) - .map( - key => - 'exports[' + - printBacktickString(key) + - '] = ' + - printBacktickString(normalizeNewlines(snapshotData[key])) + - ';' - ); - ensureDirectoryExists(snapshotPath); - jestWriteFile( - snapshotPath, - writeSnapshotVersion() + '\n\n' + snapshots.join('\n\n') + '\n' - ); -}; - -exports.saveSnapshotFile = saveSnapshotFile; - -const deepMergeArray = (target, source) => { - const mergedOutput = Array.from(target); - source.forEach((sourceElement, index) => { - const targetElement = mergedOutput[index]; - - if (Array.isArray(target[index])) { - mergedOutput[index] = deepMergeArray(target[index], sourceElement); - } else if (isObject(targetElement)) { - mergedOutput[index] = deepMerge(target[index], sourceElement); - } else { - // Source does not exist in target or target is primitive and cannot be deep merged - mergedOutput[index] = sourceElement; - } - }); - return mergedOutput; -}; - -const deepMerge = (target, source) => { - const mergedOutput = _objectSpread({}, target); - - if (isObject(target) && isObject(source)) { - Object.keys(source).forEach(key => { - if (isObject(source[key]) && !source[key].$$typeof) { - if (!(key in target)) - Object.assign(mergedOutput, { - [key]: source[key] - }); - else mergedOutput[key] = deepMerge(target[key], source[key]); - } else if (Array.isArray(source[key])) { - mergedOutput[key] = deepMergeArray(target[key], source[key]); - } else { - Object.assign(mergedOutput, { - [key]: source[key] - }); - } - }); - } - - return mergedOutput; -}; - -exports.deepMerge = deepMerge; diff --git a/node_modules/jest-snapshot/package.json b/node_modules/jest-snapshot/package.json deleted file mode 100644 index c34b7689..00000000 --- a/node_modules/jest-snapshot/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_args": [ - [ - "jest-snapshot@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-snapshot@24.9.0", - "_id": "jest-snapshot@24.9.0", - "_inBundle": false, - "_integrity": "sha512-uI/rszGSs73xCM0l+up7O7a40o90cnrk429LOiK3aeTvfC0HHmldbd81/B7Ix81KSFe1lwkbl7GnBGG4UfuDew==", - "_location": "/jest-snapshot", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-snapshot@24.9.0", - "name": "jest-snapshot", - "escapedName": "jest-snapshot", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core", - "/jest-circus", - "/jest-jasmine2", - "/jest-resolve-dependencies", - "/jest-runtime" - ], - "_resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@babel/types": "^7.0.0", - "@jest/types": "^24.9.0", - "chalk": "^2.0.1", - "expect": "^24.9.0", - "jest-diff": "^24.9.0", - "jest-get-type": "^24.9.0", - "jest-matcher-utils": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-resolve": "^24.9.0", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "pretty-format": "^24.9.0", - "semver": "^6.2.0" - }, - "devDependencies": { - "@babel/traverse": "^7.3.4", - "@types/mkdirp": "^0.5.2", - "@types/natural-compare": "^1.4.0", - "@types/prettier": "^1.16.1", - "@types/semver": "^6.0.1", - "jest-haste-map": "^24.9.0", - "prettier": "^1.13.4" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-snapshot", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-snapshot" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-util/LICENSE b/node_modules/jest-util/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-util/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-util/build/ErrorWithStack.d.ts b/node_modules/jest-util/build/ErrorWithStack.d.ts deleted file mode 100644 index ed881a77..00000000 --- a/node_modules/jest-util/build/ErrorWithStack.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default class ErrorWithStack extends Error { - constructor(message: string | undefined, callsite: Function); -} -//# sourceMappingURL=ErrorWithStack.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/ErrorWithStack.d.ts.map b/node_modules/jest-util/build/ErrorWithStack.d.ts.map deleted file mode 100644 index 6fd333f4..00000000 --- a/node_modules/jest-util/build/ErrorWithStack.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ErrorWithStack.d.ts","sourceRoot":"","sources":["../src/ErrorWithStack.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,QAAQ;CAM5D"} \ No newline at end of file diff --git a/node_modules/jest-util/build/ErrorWithStack.js b/node_modules/jest-util/build/ErrorWithStack.js deleted file mode 100644 index da7b9d2a..00000000 --- a/node_modules/jest-util/build/ErrorWithStack.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -class ErrorWithStack extends Error { - constructor(message, callsite) { - super(message); - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, callsite); - } - } -} - -exports.default = ErrorWithStack; diff --git a/node_modules/jest-util/build/clearLine.d.ts b/node_modules/jest-util/build/clearLine.d.ts deleted file mode 100644 index 63f75c32..00000000 --- a/node_modules/jest-util/build/clearLine.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -declare const _default: (stream: NodeJS.WritableStream) => void; -export default _default; -//# sourceMappingURL=clearLine.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/clearLine.d.ts.map b/node_modules/jest-util/build/clearLine.d.ts.map deleted file mode 100644 index aebd73a9..00000000 --- a/node_modules/jest-util/build/clearLine.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"clearLine.d.ts","sourceRoot":"","sources":["../src/clearLine.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AAEH,wBAIE"} \ No newline at end of file diff --git a/node_modules/jest-util/build/clearLine.js b/node_modules/jest-util/build/clearLine.js deleted file mode 100644 index 425f7d1d..00000000 --- a/node_modules/jest-util/build/clearLine.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var _default = stream => { - if (process.stdout.isTTY) { - stream.write('\x1b[999D\x1b[K'); - } -}; - -exports.default = _default; diff --git a/node_modules/jest-util/build/convertDescriptorToString.d.ts b/node_modules/jest-util/build/convertDescriptorToString.d.ts deleted file mode 100644 index 568c2fc0..00000000 --- a/node_modules/jest-util/build/convertDescriptorToString.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default function convertDescriptorToString(descriptor: T): T | string; -//# sourceMappingURL=convertDescriptorToString.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/convertDescriptorToString.d.ts.map b/node_modules/jest-util/build/convertDescriptorToString.d.ts.map deleted file mode 100644 index 048c6b43..00000000 --- a/node_modules/jest-util/build/convertDescriptorToString.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"convertDescriptorToString.d.ts","sourceRoot":"","sources":["../src/convertDescriptorToString.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAC/C,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,EAChD,UAAU,EAAE,CAAC,GAAG,CAAC,GAAG,MAAM,CA0B3B"} \ No newline at end of file diff --git a/node_modules/jest-util/build/convertDescriptorToString.js b/node_modules/jest-util/build/convertDescriptorToString.js deleted file mode 100644 index 742e981d..00000000 --- a/node_modules/jest-util/build/convertDescriptorToString.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = convertDescriptorToString; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// See: https://github.com/facebook/jest/pull/5154 -function convertDescriptorToString(descriptor) { - if ( - typeof descriptor === 'string' || - typeof descriptor === 'number' || - descriptor === undefined - ) { - return descriptor; - } - - if (typeof descriptor !== 'function') { - throw new Error('describe expects a class, function, number, or string.'); - } - - if (descriptor.name !== undefined) { - return descriptor.name; - } // Fallback for old browsers, pardon Flow - - const stringified = descriptor.toString(); - const typeDescriptorMatch = stringified.match(/class|function/); - const indexOfNameSpace = // @ts-ignore: typeDescriptorMatch exists - typeDescriptorMatch.index + typeDescriptorMatch[0].length; - const indexOfNameAfterSpace = stringified.search(/\(|\{/); - const name = stringified.substring(indexOfNameSpace, indexOfNameAfterSpace); - return name.trim(); -} diff --git a/node_modules/jest-util/build/createDirectory.d.ts b/node_modules/jest-util/build/createDirectory.d.ts deleted file mode 100644 index ec8de1fd..00000000 --- a/node_modules/jest-util/build/createDirectory.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export default function createDirectory(path: Config.Path): void; -//# sourceMappingURL=createDirectory.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/createDirectory.d.ts.map b/node_modules/jest-util/build/createDirectory.d.ts.map deleted file mode 100644 index 8fca16c9..00000000 --- a/node_modules/jest-util/build/createDirectory.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"createDirectory.d.ts","sourceRoot":"","sources":["../src/createDirectory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,QAQxD"} \ No newline at end of file diff --git a/node_modules/jest-util/build/createDirectory.js b/node_modules/jest-util/build/createDirectory.js deleted file mode 100644 index 5caa8c40..00000000 --- a/node_modules/jest-util/build/createDirectory.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = createDirectory; - -function _mkdirp() { - const data = _interopRequireDefault(require('mkdirp')); - - _mkdirp = function _mkdirp() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function createDirectory(path) { - try { - _mkdirp().default.sync(path, '777'); - } catch (e) { - if (e.code !== 'EEXIST') { - throw e; - } - } -} diff --git a/node_modules/jest-util/build/createProcessObject.d.ts b/node_modules/jest-util/build/createProcessObject.d.ts deleted file mode 100644 index 86dd8e85..00000000 --- a/node_modules/jest-util/build/createProcessObject.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default function (): any; -//# sourceMappingURL=createProcessObject.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/createProcessObject.d.ts.map b/node_modules/jest-util/build/createProcessObject.d.ts.map deleted file mode 100644 index bd19f56e..00000000 --- a/node_modules/jest-util/build/createProcessObject.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"createProcessObject.d.ts","sourceRoot":"","sources":["../src/createProcessObject.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA4EH,MAAM,CAAC,OAAO,kBAkCb"} \ No newline at end of file diff --git a/node_modules/jest-util/build/createProcessObject.js b/node_modules/jest-util/build/createProcessObject.js deleted file mode 100644 index 5ba6f387..00000000 --- a/node_modules/jest-util/build/createProcessObject.js +++ /dev/null @@ -1,121 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = _default; - -var _deepCyclicCopy = _interopRequireDefault(require('./deepCyclicCopy')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const BLACKLIST = new Set(['env', 'mainModule', '_events']); -const isWin32 = process.platform === 'win32'; -const proto = Object.getPrototypeOf(process.env); // The "process.env" object has a bunch of particularities: first, it does not -// directly extend from Object; second, it converts any assigned value to a -// string; and third, it is case-insensitive in Windows. We use a proxy here to -// mimic it (see https://nodejs.org/api/process.html#process_process_env). - -function createProcessEnv() { - const real = Object.create(proto); - const lookup = {}; - - function deletePropertyWin32(_target, key) { - for (const name in real) { - if (real.hasOwnProperty(name)) { - if (typeof key === 'string') { - if (name.toLowerCase() === key.toLowerCase()) { - delete real[name]; - delete lookup[name.toLowerCase()]; - } - } else { - if (key === name) { - delete real[name]; - delete lookup[name]; - } - } - } - } - - return true; - } - - function deleteProperty(_target, key) { - delete real[key]; - delete lookup[key]; - return true; - } - - function getProperty(_target, key) { - return real[key]; - } - - function getPropertyWin32(_target, key) { - if (typeof key === 'string') { - return lookup[key in proto ? key : key.toLowerCase()]; - } else { - return real[key]; - } - } - - const proxy = new Proxy(real, { - deleteProperty: isWin32 ? deletePropertyWin32 : deleteProperty, - get: isWin32 ? getPropertyWin32 : getProperty, - - set(_target, key, value) { - const strValue = '' + value; - - if (typeof key === 'string') { - lookup[key.toLowerCase()] = strValue; - } - - real[key] = strValue; - return true; - } - }); - return Object.assign(proxy, process.env); -} - -function _default() { - const process = require('process'); - - const newProcess = (0, _deepCyclicCopy.default)(process, { - blacklist: BLACKLIST, - keepPrototype: true - }); - - try { - // This fails on Node 12, but it's already set to 'process' - newProcess[Symbol.toStringTag] = 'process'; - } catch (e) { - // Make sure it's actually set instead of potentially ignoring errors - if (newProcess[Symbol.toStringTag] !== 'process') { - e.message = - 'Unable to set toStringTag on process. Please open up an issue at https://github.com/facebook/jest\n\n' + - e.message; - throw e; - } - } // Sequentially execute all constructors over the object. - - let proto = process; - - while ((proto = Object.getPrototypeOf(proto))) { - if (typeof proto.constructor === 'function') { - proto.constructor.call(newProcess); - } - } - - newProcess.env = createProcessEnv(); - - newProcess.send = () => {}; - - return newProcess; -} diff --git a/node_modules/jest-util/build/deepCyclicCopy.d.ts b/node_modules/jest-util/build/deepCyclicCopy.d.ts deleted file mode 100644 index b721ef34..00000000 --- a/node_modules/jest-util/build/deepCyclicCopy.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare type DeepCyclicCopyOptions = { - blacklist?: Set; - keepPrototype?: boolean; -}; -export default function deepCyclicCopy(value: T, options?: DeepCyclicCopyOptions, cycles?: WeakMap): T; -//# sourceMappingURL=deepCyclicCopy.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/deepCyclicCopy.d.ts.map b/node_modules/jest-util/build/deepCyclicCopy.d.ts.map deleted file mode 100644 index 58528150..00000000 --- a/node_modules/jest-util/build/deepCyclicCopy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"deepCyclicCopy.d.ts","sourceRoot":"","sources":["../src/deepCyclicCopy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,oBAAY,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAmBF,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,EACtC,KAAK,EAAE,CAAC,EACR,OAAO,GAAE,qBAAgE,EACzE,MAAM,GAAE,OAAO,CAAC,GAAG,EAAE,GAAG,CAAiB,GACxC,CAAC,CAUH"} \ No newline at end of file diff --git a/node_modules/jest-util/build/deepCyclicCopy.js b/node_modules/jest-util/build/deepCyclicCopy.js deleted file mode 100644 index 9ed23c8d..00000000 --- a/node_modules/jest-util/build/deepCyclicCopy.js +++ /dev/null @@ -1,99 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = deepCyclicCopy; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const EMPTY = new Set(); - -// Node 6 does not have gOPDs, so we define a simple polyfill for it. -if (!Object.getOwnPropertyDescriptors) { - // @ts-ignore: polyfill - Object.getOwnPropertyDescriptors = obj => { - const list = {}; - Object.getOwnPropertyNames(obj) - .concat(Object.getOwnPropertySymbols(obj)) - .forEach(key => { - // @ts-ignore: assignment with a Symbol is OK. - list[key] = Object.getOwnPropertyDescriptor(obj, key); - }); - return list; - }; -} - -function deepCyclicCopy( - value, - options = { - blacklist: EMPTY, - keepPrototype: false - }, - cycles = new WeakMap() -) { - if (typeof value !== 'object' || value === null) { - return value; - } else if (cycles.has(value)) { - return cycles.get(value); - } else if (Array.isArray(value)) { - return deepCyclicCopyArray(value, options, cycles); - } else { - return deepCyclicCopyObject(value, options, cycles); - } -} - -function deepCyclicCopyObject(object, options, cycles) { - const newObject = options.keepPrototype - ? Object.create(Object.getPrototypeOf(object)) - : {}; - const descriptors = Object.getOwnPropertyDescriptors(object); - cycles.set(object, newObject); - Object.keys(descriptors).forEach(key => { - if (options.blacklist && options.blacklist.has(key)) { - delete descriptors[key]; - return; - } - - const descriptor = descriptors[key]; - - if (typeof descriptor.value !== 'undefined') { - descriptor.value = deepCyclicCopy( - descriptor.value, - { - blacklist: EMPTY, - keepPrototype: options.keepPrototype - }, - cycles - ); - } - - descriptor.configurable = true; - }); - return Object.defineProperties(newObject, descriptors); -} - -function deepCyclicCopyArray(array, options, cycles) { - const newArray = options.keepPrototype - ? new (Object.getPrototypeOf(array)).constructor(array.length) - : []; - const length = array.length; - cycles.set(array, newArray); - - for (let i = 0; i < length; i++) { - newArray[i] = deepCyclicCopy( - array[i], - { - blacklist: EMPTY, - keepPrototype: options.keepPrototype - }, - cycles - ); - } - - return newArray; -} diff --git a/node_modules/jest-util/build/getFailedSnapshotTests.d.ts b/node_modules/jest-util/build/getFailedSnapshotTests.d.ts deleted file mode 100644 index eb2f89e7..00000000 --- a/node_modules/jest-util/build/getFailedSnapshotTests.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { AggregatedResult } from '@jest/test-result'; -declare function getFailedSnapshotTests(testResults: AggregatedResult): string[]; -export default getFailedSnapshotTests; -//# sourceMappingURL=getFailedSnapshotTests.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/getFailedSnapshotTests.d.ts.map b/node_modules/jest-util/build/getFailedSnapshotTests.d.ts.map deleted file mode 100644 index e1b300fa..00000000 --- a/node_modules/jest-util/build/getFailedSnapshotTests.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getFailedSnapshotTests.d.ts","sourceRoot":"","sources":["../src/getFailedSnapshotTests.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAEnD,iBAAS,sBAAsB,CAAC,WAAW,EAAE,gBAAgB,YAa5D;AAED,eAAe,sBAAsB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-util/build/getFailedSnapshotTests.js b/node_modules/jest-util/build/getFailedSnapshotTests.js deleted file mode 100644 index f24176d1..00000000 --- a/node_modules/jest-util/build/getFailedSnapshotTests.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function getFailedSnapshotTests(testResults) { - const failedTestPaths = []; - - if (testResults.numFailedTests === 0 || !testResults.testResults) { - return failedTestPaths; - } - - testResults.testResults.forEach(testResult => { - if (testResult.snapshot && testResult.snapshot.unmatched) { - failedTestPaths.push(testResult.testFilePath); - } - }); - return failedTestPaths; -} - -var _default = getFailedSnapshotTests; -exports.default = _default; diff --git a/node_modules/jest-util/build/index.d.ts b/node_modules/jest-util/build/index.d.ts deleted file mode 100644 index fd86eec4..00000000 --- a/node_modules/jest-util/build/index.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { JestFakeTimers as FakeTimers } from '@jest/fake-timers'; -import { BufferedConsole, CustomConsole, NullConsole } from '@jest/console'; -import { formatTestResults } from '@jest/test-result'; -import createDirectory from './createDirectory'; -import ErrorWithStack from './ErrorWithStack'; -import getFailedSnapshotTests from './getFailedSnapshotTests'; -import installCommonGlobals from './installCommonGlobals'; -import interopRequireDefault from './interopRequireDefault'; -import deepCyclicCopy from './deepCyclicCopy'; -import convertDescriptorToString from './convertDescriptorToString'; -import * as specialChars from './specialChars'; -import replacePathSepForGlob from './replacePathSepForGlob'; -import * as preRunMessage from './preRunMessage'; -import pluralize from './pluralize'; -declare const _default: { - BufferedConsole: typeof BufferedConsole; - Console: typeof CustomConsole; - ErrorWithStack: typeof ErrorWithStack; - FakeTimers: typeof FakeTimers; - NullConsole: typeof NullConsole; - clearLine: (stream: NodeJS.WritableStream) => void; - convertDescriptorToString: typeof convertDescriptorToString; - createDirectory: typeof createDirectory; - deepCyclicCopy: typeof deepCyclicCopy; - formatTestResults: typeof formatTestResults; - getCallsite: (level: number, sourceMaps?: Record | null | undefined) => import("callsites").CallSite; - getConsoleOutput: (root: string, verbose: boolean, buffer: import("@jest/console/build/types").LogEntry[]) => string; - getFailedSnapshotTests: typeof getFailedSnapshotTests; - installCommonGlobals: typeof installCommonGlobals; - interopRequireDefault: typeof interopRequireDefault; - isInteractive: boolean; - isPromise: (candidate: unknown) => candidate is Promise; - pluralize: typeof pluralize; - preRunMessage: typeof preRunMessage; - replacePathSepForGlob: typeof replacePathSepForGlob; - setGlobal: (globalToMutate: NodeJS.Global | Window, key: string, value: unknown) => void; - specialChars: typeof specialChars; - testPathPatternToRegExp: (testPathPattern: string) => RegExp; -}; -export = _default; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/index.d.ts.map b/node_modules/jest-util/build/index.d.ts.map deleted file mode 100644 index 28d5c321..00000000 --- a/node_modules/jest-util/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAC,cAAc,IAAI,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EACL,eAAe,EACf,aAAa,EACb,WAAW,EAEZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAEpD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAC9D,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAI5D,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAE5D,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,SAAS,MAAM,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;AAEpC,kBAwBE"} \ No newline at end of file diff --git a/node_modules/jest-util/build/index.js b/node_modules/jest-util/build/index.js deleted file mode 100644 index 04368082..00000000 --- a/node_modules/jest-util/build/index.js +++ /dev/null @@ -1,147 +0,0 @@ -'use strict'; - -function _fakeTimers() { - const data = require('@jest/fake-timers'); - - _fakeTimers = function _fakeTimers() { - return data; - }; - - return data; -} - -function _sourceMap() { - const data = require('@jest/source-map'); - - _sourceMap = function _sourceMap() { - return data; - }; - - return data; -} - -function _console() { - const data = require('@jest/console'); - - _console = function _console() { - return data; - }; - - return data; -} - -function _testResult() { - const data = require('@jest/test-result'); - - _testResult = function _testResult() { - return data; - }; - - return data; -} - -var _clearLine = _interopRequireDefault2(require('./clearLine')); - -var _createDirectory = _interopRequireDefault2(require('./createDirectory')); - -var _ErrorWithStack = _interopRequireDefault2(require('./ErrorWithStack')); - -var _getFailedSnapshotTests = _interopRequireDefault2( - require('./getFailedSnapshotTests') -); - -var _installCommonGlobals = _interopRequireDefault2( - require('./installCommonGlobals') -); - -var _interopRequireDefault = _interopRequireDefault2( - require('./interopRequireDefault') -); - -var _isInteractive = _interopRequireDefault2(require('./isInteractive')); - -var _isPromise = _interopRequireDefault2(require('./isPromise')); - -var _setGlobal = _interopRequireDefault2(require('./setGlobal')); - -var _deepCyclicCopy = _interopRequireDefault2(require('./deepCyclicCopy')); - -var _convertDescriptorToString = _interopRequireDefault2( - require('./convertDescriptorToString') -); - -var specialChars = _interopRequireWildcard(require('./specialChars')); - -var _replacePathSepForGlob = _interopRequireDefault2( - require('./replacePathSepForGlob') -); - -var _testPathPatternToRegExp = _interopRequireDefault2( - require('./testPathPatternToRegExp') -); - -var preRunMessage = _interopRequireWildcard(require('./preRunMessage')); - -var _pluralize = _interopRequireDefault2(require('./pluralize')); - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} - -function _interopRequireDefault2(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// TODO: Remove these exports in the next major -module.exports = { - BufferedConsole: _console().BufferedConsole, - Console: _console().CustomConsole, - ErrorWithStack: _ErrorWithStack.default, - FakeTimers: _fakeTimers().JestFakeTimers, - NullConsole: _console().NullConsole, - clearLine: _clearLine.default, - convertDescriptorToString: _convertDescriptorToString.default, - createDirectory: _createDirectory.default, - deepCyclicCopy: _deepCyclicCopy.default, - formatTestResults: _testResult().formatTestResults, - getCallsite: _sourceMap().getCallsite, - getConsoleOutput: _console().getConsoleOutput, - getFailedSnapshotTests: _getFailedSnapshotTests.default, - installCommonGlobals: _installCommonGlobals.default, - interopRequireDefault: _interopRequireDefault.default, - isInteractive: _isInteractive.default, - isPromise: _isPromise.default, - pluralize: _pluralize.default, - preRunMessage, - replacePathSepForGlob: _replacePathSepForGlob.default, - setGlobal: _setGlobal.default, - specialChars, - testPathPatternToRegExp: _testPathPatternToRegExp.default -}; diff --git a/node_modules/jest-util/build/installCommonGlobals.d.ts b/node_modules/jest-util/build/installCommonGlobals.d.ts deleted file mode 100644 index a97459df..00000000 --- a/node_modules/jest-util/build/installCommonGlobals.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Config } from '@jest/types'; -export default function (globalObject: NodeJS.Global, globals: Config.ConfigGlobals): NodeJS.Global & Config.ConfigGlobals; -//# sourceMappingURL=installCommonGlobals.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/installCommonGlobals.d.ts.map b/node_modules/jest-util/build/installCommonGlobals.d.ts.map deleted file mode 100644 index 5034844e..00000000 --- a/node_modules/jest-util/build/installCommonGlobals.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"installCommonGlobals.d.ts","sourceRoot":"","sources":["../src/installCommonGlobals.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAMnC,MAAM,CAAC,OAAO,WACZ,YAAY,EAAE,MAAM,CAAC,MAAM,EAC3B,OAAO,EAAE,MAAM,CAAC,aAAa,GAC5B,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,aAAa,CAqDtC"} \ No newline at end of file diff --git a/node_modules/jest-util/build/installCommonGlobals.js b/node_modules/jest-util/build/installCommonGlobals.js deleted file mode 100644 index 0570afd3..00000000 --- a/node_modules/jest-util/build/installCommonGlobals.js +++ /dev/null @@ -1,85 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = _default; - -function _fs() { - const data = _interopRequireDefault(require('fs')); - - _fs = function _fs() { - return data; - }; - - return data; -} - -var _createProcessObject = _interopRequireDefault( - require('./createProcessObject') -); - -var _deepCyclicCopy = _interopRequireDefault(require('./deepCyclicCopy')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const DTRACE = Object.keys(global).filter(key => key.startsWith('DTRACE')); - -function _default(globalObject, globals) { - globalObject.process = (0, _createProcessObject.default)(); - const symbol = globalObject.Symbol; // Keep a reference to some globals that Jest needs - - Object.defineProperties(globalObject, { - [symbol.for('jest-native-promise')]: { - enumerable: false, - value: Promise, - writable: false - }, - [symbol.for('jest-native-now')]: { - enumerable: false, - value: globalObject.Date.now.bind(globalObject.Date), - writable: false - }, - [symbol.for('jest-native-read-file')]: { - enumerable: false, - value: _fs().default.readFileSync.bind(_fs().default), - writable: false - }, - [symbol.for('jest-native-write-file')]: { - enumerable: false, - value: _fs().default.writeFileSync.bind(_fs().default), - writable: false - }, - [symbol.for('jest-native-exists-file')]: { - enumerable: false, - value: _fs().default.existsSync.bind(_fs().default), - writable: false - }, - 'jest-symbol-do-not-touch': { - enumerable: false, - value: symbol, - writable: false - } - }); // Forward some APIs. - - DTRACE.forEach(dtrace => { - // @ts-ignore: no index - globalObject[dtrace] = function(...args) { - // @ts-ignore: no index - return global[dtrace].apply(this, args); - }; - }); // Forward some others (this breaks the sandbox but for now it's OK). - - globalObject.Buffer = global.Buffer; - globalObject.setImmediate = global.setImmediate; - globalObject.clearImmediate = global.clearImmediate; - return Object.assign(globalObject, (0, _deepCyclicCopy.default)(globals)); -} diff --git a/node_modules/jest-util/build/interopRequireDefault.d.ts b/node_modules/jest-util/build/interopRequireDefault.d.ts deleted file mode 100644 index 0a340d1f..00000000 --- a/node_modules/jest-util/build/interopRequireDefault.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default function interopRequireDefault(obj: any): any; -//# sourceMappingURL=interopRequireDefault.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/interopRequireDefault.d.ts.map b/node_modules/jest-util/build/interopRequireDefault.d.ts.map deleted file mode 100644 index 3d88b8d4..00000000 --- a/node_modules/jest-util/build/interopRequireDefault.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interopRequireDefault.d.ts","sourceRoot":"","sources":["../src/interopRequireDefault.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,GAAG,EAAE,GAAG,OAErD"} \ No newline at end of file diff --git a/node_modules/jest-util/build/interopRequireDefault.js b/node_modules/jest-util/build/interopRequireDefault.js deleted file mode 100644 index 420876c6..00000000 --- a/node_modules/jest-util/build/interopRequireDefault.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = interopRequireDefault; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// copied from https://github.com/babel/babel/blob/56044c7851d583d498f919e9546caddf8f80a72f/packages/babel-helpers/src/helpers.js#L558-L562 -function interopRequireDefault(obj) { - return obj && obj.__esModule - ? obj - : { - default: obj - }; -} diff --git a/node_modules/jest-util/build/isInteractive.d.ts b/node_modules/jest-util/build/isInteractive.d.ts deleted file mode 100644 index ae0f8541..00000000 --- a/node_modules/jest-util/build/isInteractive.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare const _default: boolean; -export default _default; -//# sourceMappingURL=isInteractive.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/isInteractive.d.ts.map b/node_modules/jest-util/build/isInteractive.d.ts.map deleted file mode 100644 index e5007e38..00000000 --- a/node_modules/jest-util/build/isInteractive.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isInteractive.d.ts","sourceRoot":"","sources":["../src/isInteractive.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAIH,wBAA8E"} \ No newline at end of file diff --git a/node_modules/jest-util/build/isInteractive.js b/node_modules/jest-util/build/isInteractive.js deleted file mode 100644 index 7801d4b8..00000000 --- a/node_modules/jest-util/build/isInteractive.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _isCi() { - const data = _interopRequireDefault(require('is-ci')); - - _isCi = function _isCi() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var _default = - !!process.stdout.isTTY && process.env.TERM !== 'dumb' && !_isCi().default; - -exports.default = _default; diff --git a/node_modules/jest-util/build/isPromise.d.ts b/node_modules/jest-util/build/isPromise.d.ts deleted file mode 100644 index acfc1c0f..00000000 --- a/node_modules/jest-util/build/isPromise.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare const isPromise: (candidate: unknown) => candidate is Promise; -export default isPromise; -//# sourceMappingURL=isPromise.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/isPromise.d.ts.map b/node_modules/jest-util/build/isPromise.d.ts.map deleted file mode 100644 index 0a18194a..00000000 --- a/node_modules/jest-util/build/isPromise.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isPromise.d.ts","sourceRoot":"","sources":["../src/isPromise.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,QAAA,MAAM,SAAS,uDAC2B,CAAC;AAC3C,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-util/build/isPromise.js b/node_modules/jest-util/build/isPromise.js deleted file mode 100644 index 9b2182de..00000000 --- a/node_modules/jest-util/build/isPromise.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const Promise = global.Promise; // see ES2015 spec 25.4.4.5, https://stackoverflow.com/a/38339199 - -const isPromise = candidate => Promise.resolve(candidate) === candidate; - -var _default = isPromise; -exports.default = _default; diff --git a/node_modules/jest-util/build/pluralize.d.ts b/node_modules/jest-util/build/pluralize.d.ts deleted file mode 100644 index 38fa4421..00000000 --- a/node_modules/jest-util/build/pluralize.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default function pluralize(word: string, count: number): string; -//# sourceMappingURL=pluralize.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/pluralize.d.ts.map b/node_modules/jest-util/build/pluralize.d.ts.map deleted file mode 100644 index 41f95618..00000000 --- a/node_modules/jest-util/build/pluralize.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pluralize.d.ts","sourceRoot":"","sources":["../src/pluralize.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,UAE5D"} \ No newline at end of file diff --git a/node_modules/jest-util/build/pluralize.js b/node_modules/jest-util/build/pluralize.js deleted file mode 100644 index 55f533ee..00000000 --- a/node_modules/jest-util/build/pluralize.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = pluralize; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function pluralize(word, count) { - return `${count} ${word}${count === 1 ? '' : 's'}`; -} diff --git a/node_modules/jest-util/build/preRunMessage.d.ts b/node_modules/jest-util/build/preRunMessage.d.ts deleted file mode 100644 index a37c4a91..00000000 --- a/node_modules/jest-util/build/preRunMessage.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -export declare const print: (stream: NodeJS.WritableStream) => void; -export declare const remove: (stream: NodeJS.WritableStream) => void; -//# sourceMappingURL=preRunMessage.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/preRunMessage.d.ts.map b/node_modules/jest-util/build/preRunMessage.d.ts.map deleted file mode 100644 index 776031e8..00000000 --- a/node_modules/jest-util/build/preRunMessage.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"preRunMessage.d.ts","sourceRoot":"","sources":["../src/preRunMessage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAMH,eAAO,MAAM,KAAK,yCAIjB,CAAC;AAEF,eAAO,MAAM,MAAM,yCAIlB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-util/build/preRunMessage.js b/node_modules/jest-util/build/preRunMessage.js deleted file mode 100644 index 76e17339..00000000 --- a/node_modules/jest-util/build/preRunMessage.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.remove = exports.print = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -var _clearLine = _interopRequireDefault(require('./clearLine')); - -var _isInteractive = _interopRequireDefault(require('./isInteractive')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const print = stream => { - if (_isInteractive.default) { - stream.write( - _chalk().default.bold.dim('Determining test suites to run...') - ); - } -}; - -exports.print = print; - -const remove = stream => { - if (_isInteractive.default) { - (0, _clearLine.default)(stream); - } -}; - -exports.remove = remove; diff --git a/node_modules/jest-util/build/replacePathSepForGlob.d.ts b/node_modules/jest-util/build/replacePathSepForGlob.d.ts deleted file mode 100644 index 2e0cea3e..00000000 --- a/node_modules/jest-util/build/replacePathSepForGlob.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export default function replacePathSepForGlob(path: Config.Path): Config.Glob; -//# sourceMappingURL=replacePathSepForGlob.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/replacePathSepForGlob.d.ts.map b/node_modules/jest-util/build/replacePathSepForGlob.d.ts.map deleted file mode 100644 index 0a608635..00000000 --- a/node_modules/jest-util/build/replacePathSepForGlob.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"replacePathSepForGlob.d.ts","sourceRoot":"","sources":["../src/replacePathSepForGlob.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAE5E"} \ No newline at end of file diff --git a/node_modules/jest-util/build/replacePathSepForGlob.js b/node_modules/jest-util/build/replacePathSepForGlob.js deleted file mode 100644 index b7a1d0f9..00000000 --- a/node_modules/jest-util/build/replacePathSepForGlob.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = replacePathSepForGlob; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function replacePathSepForGlob(path) { - return path.replace(/\\(?![{}()+?.^$])/g, '/'); -} diff --git a/node_modules/jest-util/build/setGlobal.d.ts b/node_modules/jest-util/build/setGlobal.d.ts deleted file mode 100644 index ec7c7559..00000000 --- a/node_modules/jest-util/build/setGlobal.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -declare const _default: (globalToMutate: NodeJS.Global | Window, key: string, value: unknown) => void; -export default _default; -//# sourceMappingURL=setGlobal.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/setGlobal.d.ts.map b/node_modules/jest-util/build/setGlobal.d.ts.map deleted file mode 100644 index 91346c3f..00000000 --- a/node_modules/jest-util/build/setGlobal.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"setGlobal.d.ts","sourceRoot":"","sources":["../src/setGlobal.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AAEH,wBAOE"} \ No newline at end of file diff --git a/node_modules/jest-util/build/setGlobal.js b/node_modules/jest-util/build/setGlobal.js deleted file mode 100644 index 3ff3cc67..00000000 --- a/node_modules/jest-util/build/setGlobal.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var _default = (globalToMutate, key, value) => { - // @ts-ignore: no index - globalToMutate[key] = value; -}; - -exports.default = _default; diff --git a/node_modules/jest-util/build/specialChars.d.ts b/node_modules/jest-util/build/specialChars.d.ts deleted file mode 100644 index 10eca154..00000000 --- a/node_modules/jest-util/build/specialChars.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare const ARROW = " \u203A "; -export declare const ICONS: { - failed: string; - pending: string; - success: string; - todo: string; -}; -export declare const CLEAR: string; -//# sourceMappingURL=specialChars.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/specialChars.d.ts.map b/node_modules/jest-util/build/specialChars.d.ts.map deleted file mode 100644 index 6949873e..00000000 --- a/node_modules/jest-util/build/specialChars.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"specialChars.d.ts","sourceRoot":"","sources":["../src/specialChars.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,eAAO,MAAM,KAAK,aAAa,CAAC;AAChC,eAAO,MAAM,KAAK;;;;;CAKjB,CAAC;AAEF,eAAO,MAAM,KAAK,QAAwD,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-util/build/specialChars.js b/node_modules/jest-util/build/specialChars.js deleted file mode 100644 index 1f9ddcc4..00000000 --- a/node_modules/jest-util/build/specialChars.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.CLEAR = exports.ICONS = exports.ARROW = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const isWindows = process.platform === 'win32'; -const ARROW = ' \u203A '; -exports.ARROW = ARROW; -const ICONS = { - failed: isWindows ? '\u00D7' : '\u2715', - pending: '\u25CB', - success: isWindows ? '\u221A' : '\u2713', - todo: '\u270E' -}; -exports.ICONS = ICONS; -const CLEAR = isWindows ? '\x1B[2J\x1B[0f' : '\x1B[2J\x1B[3J\x1B[H'; -exports.CLEAR = CLEAR; diff --git a/node_modules/jest-util/build/testPathPatternToRegExp.d.ts b/node_modules/jest-util/build/testPathPatternToRegExp.d.ts deleted file mode 100644 index 16ae6f88..00000000 --- a/node_modules/jest-util/build/testPathPatternToRegExp.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare const _default: (testPathPattern: string) => RegExp; -export default _default; -//# sourceMappingURL=testPathPatternToRegExp.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-util/build/testPathPatternToRegExp.d.ts.map b/node_modules/jest-util/build/testPathPatternToRegExp.d.ts.map deleted file mode 100644 index 56587d95..00000000 --- a/node_modules/jest-util/build/testPathPatternToRegExp.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"testPathPatternToRegExp.d.ts","sourceRoot":"","sources":["../src/testPathPatternToRegExp.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAOH,wBACmC"} \ No newline at end of file diff --git a/node_modules/jest-util/build/testPathPatternToRegExp.js b/node_modules/jest-util/build/testPathPatternToRegExp.js deleted file mode 100644 index 29fd338c..00000000 --- a/node_modules/jest-util/build/testPathPatternToRegExp.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// Because we serialize/deserialize globalConfig when we spawn workers, -// we can't pass regular expression. Using this shared function on both sides -// will ensure that we produce consistent regexp for testPathPattern. -var _default = testPathPattern => new RegExp(testPathPattern, 'i'); - -exports.default = _default; diff --git a/node_modules/jest-util/node_modules/callsites/index.d.ts b/node_modules/jest-util/node_modules/callsites/index.d.ts deleted file mode 100644 index 61f597cf..00000000 --- a/node_modules/jest-util/node_modules/callsites/index.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -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/jest-util/node_modules/callsites/index.js b/node_modules/jest-util/node_modules/callsites/index.js deleted file mode 100644 index 486c2410..00000000 --- a/node_modules/jest-util/node_modules/callsites/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'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/jest-util/node_modules/callsites/license b/node_modules/jest-util/node_modules/callsites/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/jest-util/node_modules/callsites/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/jest-util/node_modules/callsites/package.json b/node_modules/jest-util/node_modules/callsites/package.json deleted file mode 100644 index 90c085c1..00000000 --- a/node_modules/jest-util/node_modules/callsites/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_args": [ - [ - "callsites@3.1.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "callsites@3.1.0", - "_id": "callsites@3.1.0", - "_inBundle": false, - "_integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "_location": "/jest-util/callsites", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "callsites@3.1.0", - "name": "callsites", - "escapedName": "callsites", - "rawSpec": "3.1.0", - "saveSpec": null, - "fetchSpec": "3.1.0" - }, - "_requiredBy": [ - "/jest-util" - ], - "_resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "_spec": "3.1.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/callsites/issues" - }, - "description": "Get callsites from the V8 stack trace API", - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/sindresorhus/callsites#readme", - "keywords": [ - "stacktrace", - "v8", - "callsite", - "callsites", - "stack", - "trace", - "function", - "file", - "line", - "debug" - ], - "license": "MIT", - "name": "callsites", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/callsites.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "3.1.0" -} diff --git a/node_modules/jest-util/node_modules/callsites/readme.md b/node_modules/jest-util/node_modules/callsites/readme.md deleted file mode 100644 index fc846138..00000000 --- a/node_modules/jest-util/node_modules/callsites/readme.md +++ /dev/null @@ -1,48 +0,0 @@ -# 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/jest-util/node_modules/slash/index.js b/node_modules/jest-util/node_modules/slash/index.js deleted file mode 100644 index 75d72501..00000000 --- a/node_modules/jest-util/node_modules/slash/index.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; -module.exports = input => { - const isExtendedLengthPath = /^\\\\\?\\/.test(input); - const hasNonAscii = /[^\u0000-\u0080]+/.test(input); // eslint-disable-line no-control-regex - - if (isExtendedLengthPath || hasNonAscii) { - return input; - } - - return input.replace(/\\/g, '/'); -}; diff --git a/node_modules/jest-util/node_modules/slash/license b/node_modules/jest-util/node_modules/slash/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/jest-util/node_modules/slash/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/jest-util/node_modules/slash/package.json b/node_modules/jest-util/node_modules/slash/package.json deleted file mode 100644 index e688a14b..00000000 --- a/node_modules/jest-util/node_modules/slash/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_args": [ - [ - "slash@2.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "slash@2.0.0", - "_id": "slash@2.0.0", - "_inBundle": false, - "_integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "_location": "/jest-util/slash", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "slash@2.0.0", - "name": "slash", - "escapedName": "slash", - "rawSpec": "2.0.0", - "saveSpec": null, - "fetchSpec": "2.0.0" - }, - "_requiredBy": [ - "/jest-util" - ], - "_resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "_spec": "2.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/slash/issues" - }, - "description": "Convert Windows backslash paths to slash paths", - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/slash#readme", - "keywords": [ - "path", - "seperator", - "sep", - "slash", - "backslash", - "windows", - "win" - ], - "license": "MIT", - "name": "slash", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/slash.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "2.0.0" -} diff --git a/node_modules/jest-util/node_modules/slash/readme.md b/node_modules/jest-util/node_modules/slash/readme.md deleted file mode 100644 index 5e2fedbc..00000000 --- a/node_modules/jest-util/node_modules/slash/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# slash [![Build Status](https://travis-ci.org/sindresorhus/slash.svg?branch=master)](https://travis-ci.org/sindresorhus/slash) - -> Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar` - -[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters. - -This was created since the `path` methods in Node outputs `\\` paths on Windows. - - -## Install - -``` -$ npm install slash -``` - - -## Usage - -```js -const path = require('path'); -const slash = require('slash'); - -const str = path.join('foo', 'bar'); -// Unix => foo/bar -// Windows => foo\\bar - -slash(str); -// Unix => foo/bar -// Windows => foo/bar -``` - - -## API - -### slash(path) - -Type: `string` - -Accepts a Windows backslash path and returns a slash path. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/jest-util/package.json b/node_modules/jest-util/package.json deleted file mode 100644 index 26076231..00000000 --- a/node_modules/jest-util/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_args": [ - [ - "jest-util@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-util@24.9.0", - "_id": "jest-util@24.9.0", - "_inBundle": false, - "_integrity": "sha512-x+cZU8VRmOJxbA1K5oDBdxQmdq0OIdADarLxk0Mq+3XS4jgvhG/oKGWcIDCtPG0HgjxOYvF+ilPJQsAyXfbNOg==", - "_location": "/jest-util", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-util@24.9.0", - "name": "jest-util", - "escapedName": "jest-util", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core", - "/@jest/reporters", - "/@jest/transform", - "/jest-circus", - "/jest-config", - "/jest-each", - "/jest-environment-jsdom", - "/jest-environment-node", - "/jest-haste-map", - "/jest-jasmine2", - "/jest-runner", - "/jest-runtime", - "/jest-watcher", - "/jest/jest-cli" - ], - "_resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/console": "^24.9.0", - "@jest/fake-timers": "^24.9.0", - "@jest/source-map": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "callsites": "^3.0.0", - "chalk": "^2.0.1", - "graceful-fs": "^4.1.15", - "is-ci": "^2.0.0", - "mkdirp": "^0.5.1", - "slash": "^2.0.0", - "source-map": "^0.6.0" - }, - "devDependencies": { - "@types/graceful-fs": "^4.1.2", - "@types/is-ci": "^2.0.0", - "@types/mkdirp": "^0.5.2", - "@types/slash": "^2.0.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-util", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-util" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-validate/LICENSE b/node_modules/jest-validate/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-validate/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-validate/README.md b/node_modules/jest-validate/README.md deleted file mode 100644 index efe749a2..00000000 --- a/node_modules/jest-validate/README.md +++ /dev/null @@ -1,193 +0,0 @@ -# jest-validate - -Generic configuration validation tool that helps you with warnings, errors and deprecation messages as well as showing users examples of correct configuration. - -```bash -npm install --save jest-validate -``` - -## Usage - -```js -import {validate} from 'jest-validate'; - -validate((config: Object), (options: ValidationOptions)); // => {hasDeprecationWarnings: boolean, isValid: boolean} -``` - -Where `ValidationOptions` are: - -```js -type ValidationOptions = { - blacklist?: Array, - comment?: string, - condition?: (option: any, validOption: any) => boolean, - deprecate?: ( - config: Object, - option: string, - deprecatedOptions: Object, - options: ValidationOptions, - ) => true, - deprecatedConfig?: {[key: string]: Function}, - error?: ( - option: string, - received: any, - defaultValue: any, - options: ValidationOptions, - ) => void, - exampleConfig: Object, - recursive?: boolean, - title?: Title, - unknown?: ( - config: Object, - exampleConfig: Object, - option: string, - options: ValidationOptions, - ) => void, -}; - -type Title = {| - deprecation?: string, - error?: string, - warning?: string, -|}; -``` - -`exampleConfig` is the only option required. - -## API - -By default `jest-validate` will print generic warning and error messages. You can however customize this behavior by providing `options: ValidationOptions` object as a second argument: - -Almost anything can be overwritten to suite your needs. - -### Options - -- `recursiveBlacklist` – optional array of string keyPaths that should be excluded from deep (recursive) validation. -- `comment` – optional string to be rendered below error/warning message. -- `condition` – an optional function with validation condition. -- `deprecate`, `error`, `unknown` – optional functions responsible for displaying warning and error messages. -- `deprecatedConfig` – optional object with deprecated config keys. -- `exampleConfig` – the only **required** option with configuration against which you'd like to test. -- `recursive` - optional boolean determining whether recursively compare `exampleConfig` to `config` (default: `true`). -- `title` – optional object of titles for errors and messages. - -You will find examples of `condition`, `deprecate`, `error`, `unknown`, and `deprecatedConfig` inside source of this repository, named respectively. - -## exampleConfig syntax - -`exampleConfig` should be an object with key/value pairs that contain an example of a valid value for each key. A configuration value is considered valid when: - -- it matches the JavaScript type of the example value, e.g. `string`, `number`, `array`, `boolean`, `function`, or `object` -- it is `null` or `undefined` -- it matches the Javascript type of any of arguments passed to `MultipleValidOptions(...)` - -The last condition is a special syntax that allows validating where more than one type is permissible; see example below. It's acceptable to have multiple values of the same type in the example, so you can also use this syntax to provide more than one example. When a validation failure occurs, the error message will show all other values in the array as examples. - -## Examples - -Minimal example: - -```js -validate(config, {exampleConfig}); -``` - -Example with slight modifications: - -```js -validate(config, { - comment: ' Documentation: http://custom-docs.com', - deprecatedConfig, - exampleConfig, - title: { - deprecation: 'Custom Deprecation', - // leaving 'error' and 'warning' as default - }, -}); -``` - -This will output: - -#### Warning: - -```bash -● Validation Warning: - - Unknown option transformx with value "/node_modules/babel-jest" was found. - This is either a typing error or a user mistake. Fixing it will remove this message. - - Documentation: http://custom-docs.com -``` - -#### Error: - -```bash -● Validation Error: - - Option transform must be of type: - object - but instead received: - string - - Example: - { - "transform": { - "^.+\\.js$": "/preprocessor.js" - } - } - - Documentation: http://custom-docs.com -``` - -## Example validating multiple types - -```js -import {multipleValidOptions} from 'jest-validate'; - -validate(config, { - // `bar` will accept either a string or a number - bar: multipleValidOptions('string is ok', 2), -}); -``` - -#### Error: - -```bash -● Validation Error: - - Option foo must be of type: - string or number - but instead received: - array - - Example: - { - "bar": "string is ok" - } - - or - - { - "bar": 2 - } - - Documentation: http://custom-docs.com -``` - -#### Deprecation - -Based on `deprecatedConfig` object with proper deprecation messages. Note custom title: - -```bash -Custom Deprecation: - - Option scriptPreprocessor was replaced by transform, which support multiple preprocessors. - - Jest now treats your current configuration as: - { - "transform": {".*": "xxx"} - } - - Please update your configuration. - - Documentation: http://custom-docs.com -``` diff --git a/node_modules/jest-validate/build/condition.d.ts b/node_modules/jest-validate/build/condition.d.ts deleted file mode 100644 index 43e0004e..00000000 --- a/node_modules/jest-validate/build/condition.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare function getValues(validOption: any): any[]; -export declare function validationCondition(option: any, validOption: any): boolean; -export declare function multipleValidOptions>(...args: T): T[number]; -//# sourceMappingURL=condition.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-validate/build/condition.d.ts.map b/node_modules/jest-validate/build/condition.d.ts.map deleted file mode 100644 index bea58a28..00000000 --- a/node_modules/jest-validate/build/condition.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../src/condition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH,wBAAgB,SAAS,CAAC,WAAW,EAAE,GAAG,SASzC;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,GAAG,OAAO,CAE1E;AAED,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,EACvD,GAAG,IAAI,EAAE,CAAC,GACT,CAAC,CAAC,MAAM,CAAC,CAKX"} \ No newline at end of file diff --git a/node_modules/jest-validate/build/condition.js b/node_modules/jest-validate/build/condition.js deleted file mode 100644 index 5f6165e4..00000000 --- a/node_modules/jest-validate/build/condition.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.getValues = getValues; -exports.validationCondition = validationCondition; -exports.multipleValidOptions = multipleValidOptions; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const toString = Object.prototype.toString; -const MULTIPLE_VALID_OPTIONS_SYMBOL = Symbol('JEST_MULTIPLE_VALID_OPTIONS'); - -function validationConditionSingle(option, validOption) { - return ( - option === null || - option === undefined || - (typeof option === 'function' && typeof validOption === 'function') || - toString.call(option) === toString.call(validOption) - ); -} - -function getValues(validOption) { - if ( - Array.isArray(validOption) && // @ts-ignore - validOption[MULTIPLE_VALID_OPTIONS_SYMBOL] - ) { - return validOption; - } - - return [validOption]; -} - -function validationCondition(option, validOption) { - return getValues(validOption).some(e => validationConditionSingle(option, e)); -} - -function multipleValidOptions(...args) { - const options = [...args]; // @ts-ignore - - options[MULTIPLE_VALID_OPTIONS_SYMBOL] = true; - return options; -} diff --git a/node_modules/jest-validate/build/defaultConfig.d.ts b/node_modules/jest-validate/build/defaultConfig.d.ts deleted file mode 100644 index fe491a5a..00000000 --- a/node_modules/jest-validate/build/defaultConfig.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { ValidationOptions } from './types'; -declare const validationOptions: ValidationOptions; -export default validationOptions; -//# sourceMappingURL=defaultConfig.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-validate/build/defaultConfig.d.ts.map b/node_modules/jest-validate/build/defaultConfig.d.ts.map deleted file mode 100644 index cbf3e0dc..00000000 --- a/node_modules/jest-validate/build/defaultConfig.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultConfig.d.ts","sourceRoot":"","sources":["../src/defaultConfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAQ1C,QAAA,MAAM,iBAAiB,EAAE,iBAgBxB,CAAC;AAEF,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-validate/build/defaultConfig.js b/node_modules/jest-validate/build/defaultConfig.js deleted file mode 100644 index 7700033b..00000000 --- a/node_modules/jest-validate/build/defaultConfig.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _deprecated = require('./deprecated'); - -var _warnings = require('./warnings'); - -var _errors = require('./errors'); - -var _condition = require('./condition'); - -var _utils = require('./utils'); - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const validationOptions = { - comment: '', - condition: _condition.validationCondition, - deprecate: _deprecated.deprecationWarning, - deprecatedConfig: {}, - error: _errors.errorMessage, - exampleConfig: {}, - recursive: true, - // Allow NPM-sanctioned comments in package.json. Use a "//" key. - recursiveBlacklist: ['//'], - title: { - deprecation: _utils.DEPRECATION, - error: _utils.ERROR, - warning: _utils.WARNING - }, - unknown: _warnings.unknownOptionWarning -}; -var _default = validationOptions; -exports.default = _default; diff --git a/node_modules/jest-validate/build/deprecated.d.ts b/node_modules/jest-validate/build/deprecated.d.ts deleted file mode 100644 index 94bc648c..00000000 --- a/node_modules/jest-validate/build/deprecated.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { ValidationOptions } from './types'; -export declare const deprecationWarning: (config: Record, option: string, deprecatedOptions: Record, options: ValidationOptions) => boolean; -//# sourceMappingURL=deprecated.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-validate/build/deprecated.d.ts.map b/node_modules/jest-validate/build/deprecated.d.ts.map deleted file mode 100644 index 1488faf0..00000000 --- a/node_modules/jest-validate/build/deprecated.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../src/deprecated.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAoB,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAW7D,eAAO,MAAM,kBAAkB,mIAa9B,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-validate/build/deprecated.js b/node_modules/jest-validate/build/deprecated.js deleted file mode 100644 index 08be871e..00000000 --- a/node_modules/jest-validate/build/deprecated.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.deprecationWarning = void 0; - -var _utils = require('./utils'); - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const deprecationMessage = (message, options) => { - const comment = options.comment; - const name = - (options.title && options.title.deprecation) || _utils.DEPRECATION; - (0, _utils.logValidationWarning)(name, message, comment); -}; - -const deprecationWarning = (config, option, deprecatedOptions, options) => { - if (option in deprecatedOptions) { - deprecationMessage(deprecatedOptions[option](config), options); - return true; - } - - return false; -}; - -exports.deprecationWarning = deprecationWarning; diff --git a/node_modules/jest-validate/build/errors.d.ts b/node_modules/jest-validate/build/errors.d.ts deleted file mode 100644 index 8f82b3c5..00000000 --- a/node_modules/jest-validate/build/errors.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { ValidationOptions } from './types'; -export declare const errorMessage: (option: string, received: any, defaultValue: any, options: ValidationOptions, path?: string[] | undefined) => void; -//# sourceMappingURL=errors.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-validate/build/errors.d.ts.map b/node_modules/jest-validate/build/errors.d.ts.map deleted file mode 100644 index 7d224343..00000000 --- a/node_modules/jest-validate/build/errors.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAE1C,eAAO,MAAM,YAAY,qHA0BxB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-validate/build/errors.js b/node_modules/jest-validate/build/errors.js deleted file mode 100644 index 03851fa8..00000000 --- a/node_modules/jest-validate/build/errors.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.errorMessage = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _jestGetType() { - const data = _interopRequireDefault(require('jest-get-type')); - - _jestGetType = function _jestGetType() { - return data; - }; - - return data; -} - -var _utils = require('./utils'); - -var _condition = require('./condition'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const errorMessage = (option, received, defaultValue, options, path) => { - const conditions = (0, _condition.getValues)(defaultValue); - const validTypes = Array.from( - new Set(conditions.map(_jestGetType().default)) - ); - const message = ` Option ${_chalk().default.bold( - `"${path && path.length > 0 ? path.join('.') + '.' : ''}${option}"` - )} must be of type: - ${validTypes.map(e => _chalk().default.bold.green(e)).join(' or ')} - but instead received: - ${_chalk().default.bold.red((0, _jestGetType().default)(received))} - - Example: -${formatExamples(option, conditions)}`; - const comment = options.comment; - const name = (options.title && options.title.error) || _utils.ERROR; - throw new _utils.ValidationError(name, message, comment); -}; - -exports.errorMessage = errorMessage; - -function formatExamples(option, examples) { - return examples.map( - e => ` { - ${_chalk().default.bold(`"${option}"`)}: ${_chalk().default.bold( - (0, _utils.formatPrettyObject)(e) - )} - }` - ).join(` - - or - -`); -} diff --git a/node_modules/jest-validate/build/exampleConfig.d.ts b/node_modules/jest-validate/build/exampleConfig.d.ts deleted file mode 100644 index f0004119..00000000 --- a/node_modules/jest-validate/build/exampleConfig.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { ValidationOptions } from './types'; -declare const config: ValidationOptions; -export default config; -//# sourceMappingURL=exampleConfig.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-validate/build/exampleConfig.d.ts.map b/node_modules/jest-validate/build/exampleConfig.d.ts.map deleted file mode 100644 index 371e347c..00000000 --- a/node_modules/jest-validate/build/exampleConfig.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exampleConfig.d.ts","sourceRoot":"","sources":["../src/exampleConfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAE1C,QAAA,MAAM,MAAM,EAAE,iBAiBb,CAAC;AAEF,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-validate/build/exampleConfig.js b/node_modules/jest-validate/build/exampleConfig.js deleted file mode 100644 index c4eda4d0..00000000 --- a/node_modules/jest-validate/build/exampleConfig.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const config = { - comment: ' A comment', - condition: () => true, - deprecate: () => false, - deprecatedConfig: { - key: () => {} - }, - error: () => {}, - exampleConfig: { - key: 'value', - test: 'case' - }, - recursive: true, - recursiveBlacklist: [], - title: { - deprecation: 'Deprecation Warning', - error: 'Validation Error', - warning: 'Validation Warning' - }, - unknown: () => {} -}; -var _default = config; -exports.default = _default; diff --git a/node_modules/jest-validate/build/index.d.ts b/node_modules/jest-validate/build/index.d.ts deleted file mode 100644 index a4c57f61..00000000 --- a/node_modules/jest-validate/build/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { ValidationError } from './utils'; -import validateCLIOptions from './validateCLIOptions'; -import { multipleValidOptions } from './condition'; -declare const _default: { - ValidationError: typeof ValidationError; - createDidYouMeanMessage: (unrecognized: string, allowedOptions: string[]) => string; - format: (value: any) => string; - logValidationWarning: (name: string, message: string, comment?: string | null | undefined) => void; - multipleValidOptions: typeof multipleValidOptions; - validate: (config: Record, options: import("./types").ValidationOptions) => { - hasDeprecationWarnings: boolean; - isValid: boolean; - }; - validateCLIOptions: typeof validateCLIOptions; -}; -export = _default; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-validate/build/index.d.ts.map b/node_modules/jest-validate/build/index.d.ts.map deleted file mode 100644 index 92279438..00000000 --- a/node_modules/jest-validate/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAIL,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;;;;;;;;;;;;;AAEjD,kBAQE"} \ No newline at end of file diff --git a/node_modules/jest-validate/build/index.js b/node_modules/jest-validate/build/index.js deleted file mode 100644 index b0a84cb4..00000000 --- a/node_modules/jest-validate/build/index.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -var _utils = require('./utils'); - -var _validate = _interopRequireDefault(require('./validate')); - -var _validateCLIOptions = _interopRequireDefault( - require('./validateCLIOptions') -); - -var _condition = require('./condition'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -module.exports = { - ValidationError: _utils.ValidationError, - createDidYouMeanMessage: _utils.createDidYouMeanMessage, - format: _utils.format, - logValidationWarning: _utils.logValidationWarning, - multipleValidOptions: _condition.multipleValidOptions, - validate: _validate.default, - validateCLIOptions: _validateCLIOptions.default -}; diff --git a/node_modules/jest-validate/build/types.d.ts b/node_modules/jest-validate/build/types.d.ts deleted file mode 100644 index 6826cb93..00000000 --- a/node_modules/jest-validate/build/types.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare type Title = { - deprecation?: string; - error?: string; - warning?: string; -}; -export declare type DeprecatedOptions = Record; -export declare type ValidationOptions = { - comment?: string; - condition?: (option: any, validOption: any) => boolean; - deprecate?: (config: Record, option: string, deprecatedOptions: DeprecatedOptions, options: ValidationOptions) => boolean; - deprecatedConfig?: DeprecatedOptions; - error?: (option: string, received: any, defaultValue: any, options: ValidationOptions, path?: Array) => void; - exampleConfig: Record; - recursive?: boolean; - recursiveBlacklist?: Array; - title?: Title; - unknown?: (config: Record, exampleConfig: Record, option: string, options: ValidationOptions, path?: Array) => void; -}; -export {}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-validate/build/types.d.ts.map b/node_modules/jest-validate/build/types.d.ts.map deleted file mode 100644 index 73102791..00000000 --- a/node_modules/jest-validate/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,aAAK,KAAK,GAAG;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAEzD,oBAAY,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,KAAK,OAAO,CAAC;IACvD,SAAS,CAAC,EAAE,CACV,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE,iBAAiB,KACvB,OAAO,CAAC;IACb,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC,KAAK,CAAC,EAAE,CACN,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,GAAG,EACb,YAAY,EAAE,GAAG,EACjB,OAAO,EAAE,iBAAiB,EAC1B,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,KACjB,IAAI,CAAC;IACV,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kBAAkB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,CACR,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAClC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,iBAAiB,EAC1B,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,KACjB,IAAI,CAAC;CACX,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-validate/build/types.js b/node_modules/jest-validate/build/types.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/jest-validate/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/jest-validate/build/utils.d.ts b/node_modules/jest-validate/build/utils.d.ts deleted file mode 100644 index 426ebf8b..00000000 --- a/node_modules/jest-validate/build/utils.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare const DEPRECATION: string; -export declare const ERROR: string; -export declare const WARNING: string; -export declare const format: (value: any) => string; -export declare const formatPrettyObject: (value: any) => string; -export declare class ValidationError extends Error { - name: string; - message: string; - constructor(name: string, message: string, comment?: string | null); -} -export declare const logValidationWarning: (name: string, message: string, comment?: string | null | undefined) => void; -export declare const createDidYouMeanMessage: (unrecognized: string, allowedOptions: string[]) => string; -//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-validate/build/utils.d.ts.map b/node_modules/jest-validate/build/utils.d.ts.map deleted file mode 100644 index 489ff7e7..00000000 --- a/node_modules/jest-validate/build/utils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,eAAO,MAAM,WAAW,QAAkC,CAAC;AAC3D,eAAO,MAAM,KAAK,QAA+B,CAAC;AAClD,eAAO,MAAM,OAAO,QAAiC,CAAC;AAEtD,eAAO,MAAM,MAAM,wBAGmB,CAAC;AAEvC,eAAO,MAAM,kBAAkB,wBAKR,CAAC;AAExB,qBAAa,eAAgB,SAAQ,KAAK;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;gBAEJ,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;CAOnE;AAED,eAAO,MAAM,oBAAoB,8EAOhC,CAAC;AAEF,eAAO,MAAM,uBAAuB,4DAUnC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-validate/build/utils.js b/node_modules/jest-validate/build/utils.js deleted file mode 100644 index 964e21c8..00000000 --- a/node_modules/jest-validate/build/utils.js +++ /dev/null @@ -1,123 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.createDidYouMeanMessage = exports.logValidationWarning = exports.ValidationError = exports.formatPrettyObject = exports.format = exports.WARNING = exports.ERROR = exports.DEPRECATION = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _prettyFormat() { - const data = _interopRequireDefault(require('pretty-format')); - - _prettyFormat = function _prettyFormat() { - return data; - }; - - return data; -} - -function _leven() { - const data = _interopRequireDefault(require('leven')); - - _leven = function _leven() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const BULLET = _chalk().default.bold('\u25cf'); - -const DEPRECATION = `${BULLET} Deprecation Warning`; -exports.DEPRECATION = DEPRECATION; -const ERROR = `${BULLET} Validation Error`; -exports.ERROR = ERROR; -const WARNING = `${BULLET} Validation Warning`; -exports.WARNING = WARNING; - -const format = value => - typeof value === 'function' - ? value.toString() - : (0, _prettyFormat().default)(value, { - min: true - }); - -exports.format = format; - -const formatPrettyObject = value => - typeof value === 'function' - ? value.toString() - : JSON.stringify(value, null, 2) - .split('\n') - .join('\n '); - -exports.formatPrettyObject = formatPrettyObject; - -class ValidationError extends Error { - constructor(name, message, comment) { - super(); - - _defineProperty(this, 'name', void 0); - - _defineProperty(this, 'message', void 0); - - comment = comment ? '\n\n' + comment : '\n'; - this.name = ''; - this.message = _chalk().default.red( - _chalk().default.bold(name) + ':\n\n' + message + comment - ); - Error.captureStackTrace(this, () => {}); - } -} - -exports.ValidationError = ValidationError; - -const logValidationWarning = (name, message, comment) => { - comment = comment ? '\n\n' + comment : '\n'; - console.warn( - _chalk().default.yellow( - _chalk().default.bold(name) + ':\n\n' + message + comment - ) - ); -}; - -exports.logValidationWarning = logValidationWarning; - -const createDidYouMeanMessage = (unrecognized, allowedOptions) => { - const suggestion = allowedOptions.find(option => { - const steps = (0, _leven().default)(option, unrecognized); - return steps < 3; - }); - return suggestion - ? `Did you mean ${_chalk().default.bold(format(suggestion))}?` - : ''; -}; - -exports.createDidYouMeanMessage = createDidYouMeanMessage; diff --git a/node_modules/jest-validate/build/validate.d.ts b/node_modules/jest-validate/build/validate.d.ts deleted file mode 100644 index ceba2c89..00000000 --- a/node_modules/jest-validate/build/validate.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { ValidationOptions } from './types'; -declare const validate: (config: Record, options: ValidationOptions) => { - hasDeprecationWarnings: boolean; - isValid: boolean; -}; -export default validate; -//# sourceMappingURL=validate.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-validate/build/validate.d.ts.map b/node_modules/jest-validate/build/validate.d.ts.map deleted file mode 100644 index 83f12232..00000000 --- a/node_modules/jest-validate/build/validate.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AA0F1C,QAAA,MAAM,QAAQ;;;CA0Bb,CAAC;AAEF,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-validate/build/validate.js b/node_modules/jest-validate/build/validate.js deleted file mode 100644 index e31a16bb..00000000 --- a/node_modules/jest-validate/build/validate.js +++ /dev/null @@ -1,154 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _defaultConfig = _interopRequireDefault(require('./defaultConfig')); - -var _utils = require('./utils'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -let hasDeprecationWarnings = false; - -const shouldSkipValidationForPath = (path, key, blacklist) => - blacklist ? blacklist.includes([...path, key].join('.')) : false; - -const _validate = (config, exampleConfig, options, path = []) => { - if ( - typeof config !== 'object' || - config == null || - typeof exampleConfig !== 'object' || - exampleConfig == null - ) { - return { - hasDeprecationWarnings - }; - } - - for (const key in config) { - if ( - options.deprecatedConfig && - key in options.deprecatedConfig && - typeof options.deprecate === 'function' - ) { - const isDeprecatedKey = options.deprecate( - config, - key, - options.deprecatedConfig, - options - ); - hasDeprecationWarnings = hasDeprecationWarnings || isDeprecatedKey; - } else if (allowsMultipleTypes(key)) { - const value = config[key]; - - if ( - typeof options.condition === 'function' && - typeof options.error === 'function' - ) { - if (key === 'maxWorkers' && !isOfTypeStringOrNumber(value)) { - throw new _utils.ValidationError( - 'Validation Error', - `${key} has to be of type string or number`, - `maxWorkers=50% or\nmaxWorkers=3` - ); - } - } - } else if (Object.hasOwnProperty.call(exampleConfig, key)) { - if ( - typeof options.condition === 'function' && - typeof options.error === 'function' && - !options.condition(config[key], exampleConfig[key]) - ) { - options.error(key, config[key], exampleConfig[key], options, path); - } - } else if ( - shouldSkipValidationForPath(path, key, options.recursiveBlacklist) - ) { - // skip validating unknown options inside blacklisted paths - } else { - options.unknown && - options.unknown(config, exampleConfig, key, options, path); - } - - if ( - options.recursive && - !Array.isArray(exampleConfig[key]) && - options.recursiveBlacklist && - !shouldSkipValidationForPath(path, key, options.recursiveBlacklist) - ) { - _validate(config[key], exampleConfig[key], options, [...path, key]); - } - } - - return { - hasDeprecationWarnings - }; -}; - -const allowsMultipleTypes = key => key === 'maxWorkers'; - -const isOfTypeStringOrNumber = value => - typeof value === 'number' || typeof value === 'string'; - -const validate = (config, options) => { - hasDeprecationWarnings = false; // Preserve default blacklist entries even with user-supplied blacklist - - const combinedBlacklist = [ - ...(_defaultConfig.default.recursiveBlacklist || []), - ...(options.recursiveBlacklist || []) - ]; - const defaultedOptions = Object.assign( - _objectSpread({}, _defaultConfig.default, options, { - recursiveBlacklist: combinedBlacklist, - title: options.title || _defaultConfig.default.title - }) - ); - - const _validate2 = _validate(config, options.exampleConfig, defaultedOptions), - hdw = _validate2.hasDeprecationWarnings; - - return { - hasDeprecationWarnings: hdw, - isValid: true - }; -}; - -var _default = validate; -exports.default = _default; diff --git a/node_modules/jest-validate/build/validateCLIOptions.d.ts b/node_modules/jest-validate/build/validateCLIOptions.d.ts deleted file mode 100644 index 2fbd82ca..00000000 --- a/node_modules/jest-validate/build/validateCLIOptions.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { Options } from 'yargs'; -import { DeprecatedOptions } from './types'; -export declare const DOCUMENTATION_NOTE: string; -export default function validateCLIOptions(argv: Config.Argv, options: { - deprecationEntries: DeprecatedOptions; - [s: string]: Options; -}, rawArgv?: Array): boolean; -//# sourceMappingURL=validateCLIOptions.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-validate/build/validateCLIOptions.d.ts.map b/node_modules/jest-validate/build/validateCLIOptions.d.ts.map deleted file mode 100644 index bfc2dead..00000000 --- a/node_modules/jest-validate/build/validateCLIOptions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"validateCLIOptions.d.ts","sourceRoot":"","sources":["../src/validateCLIOptions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAInC,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAI9B,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAG1C,eAAO,MAAM,kBAAkB,QAE9B,CAAC;AA4CF,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,OAAO,EAAE;IACP,kBAAkB,EAAE,iBAAiB,CAAC;IACtC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB,EACD,OAAO,GAAE,KAAK,CAAC,MAAM,CAAM,WA2C5B"} \ No newline at end of file diff --git a/node_modules/jest-validate/build/validateCLIOptions.js b/node_modules/jest-validate/build/validateCLIOptions.js deleted file mode 100644 index 236f6906..00000000 --- a/node_modules/jest-validate/build/validateCLIOptions.js +++ /dev/null @@ -1,163 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = validateCLIOptions; -exports.DOCUMENTATION_NOTE = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _camelcase() { - const data = _interopRequireDefault(require('camelcase')); - - _camelcase = function _camelcase() { - return data; - }; - - return data; -} - -var _utils = require('./utils'); - -var _deprecated = require('./deprecated'); - -var _defaultConfig = _interopRequireDefault(require('./defaultConfig')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const BULLET = _chalk().default.bold('\u25cf'); - -const DOCUMENTATION_NOTE = ` ${_chalk().default.bold( - 'CLI Options Documentation:' -)} - https://jestjs.io/docs/en/cli.html -`; -exports.DOCUMENTATION_NOTE = DOCUMENTATION_NOTE; - -const createCLIValidationError = (unrecognizedOptions, allowedOptions) => { - let title = `${BULLET} Unrecognized CLI Parameter`; - let message; - const comment = - ` ${_chalk().default.bold('CLI Options Documentation')}:\n` + - ` https://jestjs.io/docs/en/cli.html\n`; - - if (unrecognizedOptions.length === 1) { - const unrecognized = unrecognizedOptions[0]; - const didYouMeanMessage = (0, _utils.createDidYouMeanMessage)( - unrecognized, - Array.from(allowedOptions) - ); - message = - ` Unrecognized option ${_chalk().default.bold( - (0, _utils.format)(unrecognized) - )}.` + (didYouMeanMessage ? ` ${didYouMeanMessage}` : ''); - } else { - title += 's'; - message = - ` Following options were not recognized:\n` + - ` ${_chalk().default.bold((0, _utils.format)(unrecognizedOptions))}`; - } - - return new _utils.ValidationError(title, message, comment); -}; - -const logDeprecatedOptions = (deprecatedOptions, deprecationEntries, argv) => { - deprecatedOptions.forEach(opt => { - (0, _deprecated.deprecationWarning)( - argv, - opt, - deprecationEntries, - _objectSpread({}, _defaultConfig.default, { - comment: DOCUMENTATION_NOTE - }) - ); - }); -}; - -function validateCLIOptions(argv, options, rawArgv = []) { - const yargsSpecialOptions = ['$0', '_', 'help', 'h']; - const deprecationEntries = options.deprecationEntries || {}; - const allowedOptions = Object.keys(options).reduce( - (acc, option) => acc.add(option).add(options[option].alias || option), - new Set(yargsSpecialOptions) - ); - const unrecognizedOptions = Object.keys(argv).filter( - arg => - !allowedOptions.has((0, _camelcase().default)(arg)) && - (!rawArgv.length || rawArgv.includes(arg)), - [] - ); - - if (unrecognizedOptions.length) { - throw createCLIValidationError(unrecognizedOptions, allowedOptions); - } - - const CLIDeprecations = Object.keys(deprecationEntries).reduce( - (acc, entry) => { - if (options[entry]) { - acc[entry] = deprecationEntries[entry]; - const alias = options[entry].alias; - - if (alias) { - acc[alias] = deprecationEntries[entry]; - } - } - - return acc; - }, - {} - ); - const deprecations = new Set(Object.keys(CLIDeprecations)); - const deprecatedOptions = Object.keys(argv).filter( - arg => deprecations.has(arg) && argv[arg] != null - ); - - if (deprecatedOptions.length) { - logDeprecatedOptions(deprecatedOptions, CLIDeprecations, argv); - } - - return true; -} diff --git a/node_modules/jest-validate/build/warnings.d.ts b/node_modules/jest-validate/build/warnings.d.ts deleted file mode 100644 index c7759783..00000000 --- a/node_modules/jest-validate/build/warnings.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { ValidationOptions } from './types'; -export declare const unknownOptionWarning: (config: Record, exampleConfig: Record, option: string, options: ValidationOptions, path?: string[] | undefined) => void; -//# sourceMappingURL=warnings.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-validate/build/warnings.d.ts.map b/node_modules/jest-validate/build/warnings.d.ts.map deleted file mode 100644 index a01f6ad0..00000000 --- a/node_modules/jest-validate/build/warnings.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"warnings.d.ts","sourceRoot":"","sources":["../src/warnings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAQ1C,eAAO,MAAM,oBAAoB,oJAsBhC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-validate/build/warnings.js b/node_modules/jest-validate/build/warnings.js deleted file mode 100644 index d69f7f29..00000000 --- a/node_modules/jest-validate/build/warnings.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.unknownOptionWarning = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -var _utils = require('./utils'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const unknownOptionWarning = (config, exampleConfig, option, options, path) => { - const didYouMean = (0, _utils.createDidYouMeanMessage)( - option, - Object.keys(exampleConfig) - ); - const message = - ` Unknown option ${_chalk().default.bold( - `"${path && path.length > 0 ? path.join('.') + '.' : ''}${option}"` - )} with value ${_chalk().default.bold( - (0, _utils.format)(config[option]) - )} was found.` + - (didYouMean && ` ${didYouMean}`) + - `\n This is probably a typing mistake. Fixing it will remove this message.`; - const comment = options.comment; - const name = (options.title && options.title.warning) || _utils.WARNING; - (0, _utils.logValidationWarning)(name, message, comment); -}; - -exports.unknownOptionWarning = unknownOptionWarning; diff --git a/node_modules/jest-validate/package.json b/node_modules/jest-validate/package.json deleted file mode 100644 index 67925550..00000000 --- a/node_modules/jest-validate/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_args": [ - [ - "jest-validate@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-validate@24.9.0", - "_id": "jest-validate@24.9.0", - "_inBundle": false, - "_integrity": "sha512-HPIt6C5ACwiqSiwi+OfSSHbK8sG7akG8eATl+IPKaeIjtPOeBUd/g3J7DghugzxrGjI93qS/+RPKe1H6PqvhRQ==", - "_location": "/jest-validate", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-validate@24.9.0", - "name": "jest-validate", - "escapedName": "jest-validate", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core", - "/jest-config", - "/jest-runtime", - "/jest/jest-cli" - ], - "_resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/types": "^24.9.0", - "camelcase": "^5.3.1", - "chalk": "^2.0.1", - "jest-get-type": "^24.9.0", - "leven": "^3.1.0", - "pretty-format": "^24.9.0" - }, - "description": "Generic configuration validation tool that helps you with warnings, errors and deprecation messages as well as showing users examples of correct configuration.", - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-validate", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-validate" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest-watcher/LICENSE b/node_modules/jest-watcher/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-watcher/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-watcher/build/BaseWatchPlugin.d.ts b/node_modules/jest-watcher/build/BaseWatchPlugin.d.ts deleted file mode 100644 index 463b2468..00000000 --- a/node_modules/jest-watcher/build/BaseWatchPlugin.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Config } from '@jest/types'; -import { JestHookSubscriber, UpdateConfigCallback, UsageData, WatchPlugin } from './types'; -declare class BaseWatchPlugin implements WatchPlugin { - protected _stdin: NodeJS.ReadStream; - protected _stdout: NodeJS.WriteStream; - constructor({ stdin, stdout, }: { - stdin: NodeJS.ReadStream; - stdout: NodeJS.WriteStream; - }); - apply(_hooks: JestHookSubscriber): void; - getUsageInfo(_globalConfig: Config.GlobalConfig): UsageData | null; - onKey(_key: string): void; - run(_globalConfig: Config.GlobalConfig, _updateConfigAndRun: UpdateConfigCallback): Promise; -} -export default BaseWatchPlugin; -//# sourceMappingURL=BaseWatchPlugin.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-watcher/build/BaseWatchPlugin.d.ts.map b/node_modules/jest-watcher/build/BaseWatchPlugin.d.ts.map deleted file mode 100644 index 19cf3095..00000000 --- a/node_modules/jest-watcher/build/BaseWatchPlugin.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BaseWatchPlugin.d.ts","sourceRoot":"","sources":["../src/BaseWatchPlugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,SAAS,EACT,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB,cAAM,eAAgB,YAAW,WAAW;IAC1C,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC;IACpC,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,WAAW,CAAC;gBAE1B,EACV,KAAK,EACL,MAAM,GACP,EAAE;QACD,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;QACzB,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC;KAC5B;IAKD,KAAK,CAAC,MAAM,EAAE,kBAAkB;IAEhC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,YAAY,GAAG,SAAS,GAAG,IAAI;IAIlE,KAAK,CAAC,IAAI,EAAE,MAAM;IAElB,GAAG,CACD,aAAa,EAAE,MAAM,CAAC,YAAY,EAClC,mBAAmB,EAAE,oBAAoB,GACxC,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC;CAG3B;AAED,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-watcher/build/BaseWatchPlugin.js b/node_modules/jest-watcher/build/BaseWatchPlugin.js deleted file mode 100644 index 40b368cb..00000000 --- a/node_modules/jest-watcher/build/BaseWatchPlugin.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -class BaseWatchPlugin { - constructor({stdin, stdout}) { - _defineProperty(this, '_stdin', void 0); - - _defineProperty(this, '_stdout', void 0); - - this._stdin = stdin; - this._stdout = stdout; - } - - apply(_hooks) {} - - getUsageInfo(_globalConfig) { - return null; - } - - onKey(_key) {} - - run(_globalConfig, _updateConfigAndRun) { - return Promise.resolve(); - } -} - -var _default = BaseWatchPlugin; -exports.default = _default; diff --git a/node_modules/jest-watcher/build/JestHooks.d.ts b/node_modules/jest-watcher/build/JestHooks.d.ts deleted file mode 100644 index 206e02af..00000000 --- a/node_modules/jest-watcher/build/JestHooks.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { JestHookSubscriber, JestHookEmitter } from './types'; -declare type AvailableHooks = 'onFileChange' | 'onTestRunComplete' | 'shouldRunTestSuite'; -declare class JestHooks { - private _listeners; - private _subscriber; - private _emitter; - constructor(); - isUsed(hook: AvailableHooks): number; - getSubscriber(): Readonly; - getEmitter(): Readonly; -} -export default JestHooks; -//# sourceMappingURL=JestHooks.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-watcher/build/JestHooks.d.ts.map b/node_modules/jest-watcher/build/JestHooks.d.ts.map deleted file mode 100644 index 32c90cf4..00000000 --- a/node_modules/jest-watcher/build/JestHooks.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"JestHooks.d.ts","sourceRoot":"","sources":["../src/JestHooks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,kBAAkB,EAClB,eAAe,EAIhB,MAAM,SAAS,CAAC;AAEjB,aAAK,cAAc,GACf,cAAc,GACd,mBAAmB,GACnB,oBAAoB,CAAC;AAEzB,cAAM,SAAS;IACb,OAAO,CAAC,UAAU,CAIhB;IAEF,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,QAAQ,CAAkB;;IAwClC,MAAM,CAAC,IAAI,EAAE,cAAc;IAI3B,aAAa,IAAI,QAAQ,CAAC,kBAAkB,CAAC;IAI7C,UAAU,IAAI,QAAQ,CAAC,eAAe,CAAC;CAGxC;AAED,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-watcher/build/JestHooks.js b/node_modules/jest-watcher/build/JestHooks.js deleted file mode 100644 index 04630f22..00000000 --- a/node_modules/jest-watcher/build/JestHooks.js +++ /dev/null @@ -1,126 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -class JestHooks { - constructor() { - var _this = this; - - _defineProperty(this, '_listeners', void 0); - - _defineProperty(this, '_subscriber', void 0); - - _defineProperty(this, '_emitter', void 0); - - this._listeners = { - onFileChange: [], - onTestRunComplete: [], - shouldRunTestSuite: [] - }; - this._subscriber = { - onFileChange: fn => { - this._listeners.onFileChange.push(fn); - }, - onTestRunComplete: fn => { - this._listeners.onTestRunComplete.push(fn); - }, - shouldRunTestSuite: fn => { - this._listeners.shouldRunTestSuite.push(fn); - } - }; - this._emitter = { - onFileChange: fs => - this._listeners.onFileChange.forEach(listener => listener(fs)), - onTestRunComplete: results => - this._listeners.onTestRunComplete.forEach(listener => - listener(results) - ), - shouldRunTestSuite: (function() { - var _shouldRunTestSuite = _asyncToGenerator(function*(testSuiteInfo) { - const result = yield Promise.all( - _this._listeners.shouldRunTestSuite.map(listener => - listener(testSuiteInfo) - ) - ); - return result.every(Boolean); - }); - - function shouldRunTestSuite(_x) { - return _shouldRunTestSuite.apply(this, arguments); - } - - return shouldRunTestSuite; - })() - }; - } - - isUsed(hook) { - return this._listeners[hook] && this._listeners[hook].length; - } - - getSubscriber() { - return this._subscriber; - } - - getEmitter() { - return this._emitter; - } -} - -var _default = JestHooks; -exports.default = _default; diff --git a/node_modules/jest-watcher/build/PatternPrompt.d.ts b/node_modules/jest-watcher/build/PatternPrompt.d.ts deleted file mode 100644 index 016b0b60..00000000 --- a/node_modules/jest-watcher/build/PatternPrompt.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import Prompt from './lib/Prompt'; -import { ScrollOptions } from './types'; -export default class PatternPrompt { - protected _pipe: NodeJS.WritableStream; - protected _prompt: Prompt; - protected _entityName: string; - protected _currentUsageRows: number; - constructor(pipe: NodeJS.WritableStream, prompt: Prompt); - run(onSuccess: (value: string) => void, onCancel: () => void, options?: { - header: string; - }): void; - protected _onChange(_pattern: string, _options: ScrollOptions): void; -} -//# sourceMappingURL=PatternPrompt.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-watcher/build/PatternPrompt.d.ts.map b/node_modules/jest-watcher/build/PatternPrompt.d.ts.map deleted file mode 100644 index 18724365..00000000 --- a/node_modules/jest-watcher/build/PatternPrompt.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PatternPrompt.d.ts","sourceRoot":"","sources":["../src/PatternPrompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAKH,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AAatC,MAAM,CAAC,OAAO,OAAO,aAAa;IAChC,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,cAAc,CAAC;IACvC,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC;IAC9B,SAAS,CAAC,iBAAiB,EAAE,MAAM,CAAC;gBAExB,IAAI,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM;IAQvD,GAAG,CACD,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,EAClC,QAAQ,EAAE,MAAM,IAAI,EACpB,OAAO,CAAC,EAAE;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC;IAkB5B,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa;CAI9D"} \ No newline at end of file diff --git a/node_modules/jest-watcher/build/PatternPrompt.js b/node_modules/jest-watcher/build/PatternPrompt.js deleted file mode 100644 index 9c9f9360..00000000 --- a/node_modules/jest-watcher/build/PatternPrompt.js +++ /dev/null @@ -1,113 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _ansiEscapes() { - const data = _interopRequireDefault(require('ansi-escapes')); - - _ansiEscapes = function _ansiEscapes() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const CLEAR = _jestUtil().specialChars.CLEAR; - -const usage = entity => - `\n${_chalk().default.bold('Pattern Mode Usage')}\n` + - ` ${_chalk().default.dim('\u203A Press')} Esc ${_chalk().default.dim( - 'to exit pattern mode.' - )}\n` + - ` ${_chalk().default.dim('\u203A Press')} Enter ` + - `${_chalk().default.dim(`to filter by a ${entity} regex pattern.`)}\n` + - `\n`; - -const usageRows = usage('').split('\n').length; - -class PatternPrompt { - constructor(pipe, prompt) { - _defineProperty(this, '_pipe', void 0); - - _defineProperty(this, '_prompt', void 0); - - _defineProperty(this, '_entityName', void 0); - - _defineProperty(this, '_currentUsageRows', void 0); - - // TODO: Should come in the constructor - this._entityName = ''; - this._pipe = pipe; - this._prompt = prompt; - this._currentUsageRows = usageRows; - } - - run(onSuccess, onCancel, options) { - this._pipe.write(_ansiEscapes().default.cursorHide); - - this._pipe.write(CLEAR); - - if (options && options.header) { - this._pipe.write(options.header + '\n'); - - this._currentUsageRows = usageRows + options.header.split('\n').length; - } else { - this._currentUsageRows = usageRows; - } - - this._pipe.write(usage(this._entityName)); - - this._pipe.write(_ansiEscapes().default.cursorShow); - - this._prompt.enter(this._onChange.bind(this), onSuccess, onCancel); - } - - _onChange(_pattern, _options) { - this._pipe.write(_ansiEscapes().default.eraseLine); - - this._pipe.write(_ansiEscapes().default.cursorLeft); - } -} - -exports.default = PatternPrompt; diff --git a/node_modules/jest-watcher/build/constants.d.ts b/node_modules/jest-watcher/build/constants.d.ts deleted file mode 100644 index 06cb6e6f..00000000 --- a/node_modules/jest-watcher/build/constants.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare const KEYS: { - ARROW_DOWN: string; - ARROW_LEFT: string; - ARROW_RIGHT: string; - ARROW_UP: string; - BACKSPACE: string; - CONTROL_C: string; - CONTROL_D: string; - ENTER: string; - ESCAPE: string; -}; -//# sourceMappingURL=constants.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-watcher/build/constants.d.ts.map b/node_modules/jest-watcher/build/constants.d.ts.map deleted file mode 100644 index 6727f28b..00000000 --- a/node_modules/jest-watcher/build/constants.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,eAAO,MAAM,IAAI;;;;;;;;;;CAUhB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-watcher/build/constants.js b/node_modules/jest-watcher/build/constants.js deleted file mode 100644 index 97b0bdd7..00000000 --- a/node_modules/jest-watcher/build/constants.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.KEYS = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const isWindows = process.platform === 'win32'; -const KEYS = { - ARROW_DOWN: '\u001b[B', - ARROW_LEFT: '\u001b[D', - ARROW_RIGHT: '\u001b[C', - ARROW_UP: '\u001b[A', - BACKSPACE: Buffer.from(isWindows ? '08' : '7f', 'hex').toString(), - CONTROL_C: '\u0003', - CONTROL_D: '\u0004', - ENTER: '\r', - ESCAPE: '\u001b' -}; -exports.KEYS = KEYS; diff --git a/node_modules/jest-watcher/build/index.d.ts b/node_modules/jest-watcher/build/index.d.ts deleted file mode 100644 index 71f5d8b4..00000000 --- a/node_modules/jest-watcher/build/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export { default as BaseWatchPlugin } from './BaseWatchPlugin'; -export { default as JestHook } from './JestHooks'; -export { default as PatternPrompt } from './PatternPrompt'; -export * from './constants'; -export { AllowedConfigOptions, JestHookEmitter, JestHookSubscriber, ScrollOptions, UpdateConfigCallback, UsageData, WatchPlugin, WatchPluginClass, } from './types'; -export { default as Prompt } from './lib/Prompt'; -export * from './lib/patternModeHelpers'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-watcher/build/index.d.ts.map b/node_modules/jest-watcher/build/index.d.ts.map deleted file mode 100644 index 070ebac2..00000000 --- a/node_modules/jest-watcher/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC;AACzD,cAAc,aAAa,CAAC;AAC5B,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,SAAS,EACT,WAAW,EACX,gBAAgB,GACjB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,cAAc,CAAC;AAC/C,cAAc,0BAA0B,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-watcher/build/index.js b/node_modules/jest-watcher/build/index.js deleted file mode 100644 index 88941094..00000000 --- a/node_modules/jest-watcher/build/index.js +++ /dev/null @@ -1,131 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -var _exportNames = { - BaseWatchPlugin: true, - JestHook: true, - PatternPrompt: true, - AllowedConfigOptions: true, - JestHookEmitter: true, - JestHookSubscriber: true, - ScrollOptions: true, - UpdateConfigCallback: true, - UsageData: true, - WatchPlugin: true, - WatchPluginClass: true, - Prompt: true -}; -Object.defineProperty(exports, 'BaseWatchPlugin', { - enumerable: true, - get: function get() { - return _BaseWatchPlugin.default; - } -}); -Object.defineProperty(exports, 'JestHook', { - enumerable: true, - get: function get() { - return _JestHooks.default; - } -}); -Object.defineProperty(exports, 'PatternPrompt', { - enumerable: true, - get: function get() { - return _PatternPrompt.default; - } -}); -Object.defineProperty(exports, 'AllowedConfigOptions', { - enumerable: true, - get: function get() { - return _types.AllowedConfigOptions; - } -}); -Object.defineProperty(exports, 'JestHookEmitter', { - enumerable: true, - get: function get() { - return _types.JestHookEmitter; - } -}); -Object.defineProperty(exports, 'JestHookSubscriber', { - enumerable: true, - get: function get() { - return _types.JestHookSubscriber; - } -}); -Object.defineProperty(exports, 'ScrollOptions', { - enumerable: true, - get: function get() { - return _types.ScrollOptions; - } -}); -Object.defineProperty(exports, 'UpdateConfigCallback', { - enumerable: true, - get: function get() { - return _types.UpdateConfigCallback; - } -}); -Object.defineProperty(exports, 'UsageData', { - enumerable: true, - get: function get() { - return _types.UsageData; - } -}); -Object.defineProperty(exports, 'WatchPlugin', { - enumerable: true, - get: function get() { - return _types.WatchPlugin; - } -}); -Object.defineProperty(exports, 'WatchPluginClass', { - enumerable: true, - get: function get() { - return _types.WatchPluginClass; - } -}); -Object.defineProperty(exports, 'Prompt', { - enumerable: true, - get: function get() { - return _Prompt.default; - } -}); - -var _BaseWatchPlugin = _interopRequireDefault(require('./BaseWatchPlugin')); - -var _JestHooks = _interopRequireDefault(require('./JestHooks')); - -var _PatternPrompt = _interopRequireDefault(require('./PatternPrompt')); - -var _constants = require('./constants'); - -Object.keys(_constants).forEach(function(key) { - if (key === 'default' || key === '__esModule') return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _constants[key]; - } - }); -}); - -var _types = require('./types'); - -var _Prompt = _interopRequireDefault(require('./lib/Prompt')); - -var _patternModeHelpers = require('./lib/patternModeHelpers'); - -Object.keys(_patternModeHelpers).forEach(function(key) { - if (key === 'default' || key === '__esModule') return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _patternModeHelpers[key]; - } - }); -}); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} diff --git a/node_modules/jest-watcher/build/lib/Prompt.d.ts b/node_modules/jest-watcher/build/lib/Prompt.d.ts deleted file mode 100644 index 8eed8f58..00000000 --- a/node_modules/jest-watcher/build/lib/Prompt.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { ScrollOptions } from '../types'; -export default class Prompt { - private _entering; - private _value; - private _onChange; - private _onSuccess; - private _onCancel; - private _offset; - private _promptLength; - private _selection; - constructor(); - private _onResize; - enter(onChange: (pattern: string, options: ScrollOptions) => void, onSuccess: (pattern: string) => void, onCancel: () => void): void; - setPromptLength(length: number): void; - setPromptSelection(selected: string): void; - put(key: string): void; - abort(): void; - isEntering(): boolean; -} -//# sourceMappingURL=Prompt.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-watcher/build/lib/Prompt.d.ts.map b/node_modules/jest-watcher/build/lib/Prompt.d.ts.map deleted file mode 100644 index 01353ffc..00000000 --- a/node_modules/jest-watcher/build/lib/Prompt.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Prompt.d.ts","sourceRoot":"","sources":["../../src/lib/Prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAGvC,MAAM,CAAC,OAAO,OAAO,MAAM;IACzB,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,UAAU,CAA0B;IAC5C,OAAO,CAAC,SAAS,CAA0B;IAC3C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,UAAU,CAAgB;;IAelC,OAAO,CAAC,SAAS,CAEf;IAEF,KAAK,CACH,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,KAAK,IAAI,EAC3D,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EACpC,QAAQ,EAAE,MAAM,IAAI;IAoBtB,eAAe,CAAC,MAAM,EAAE,MAAM;IAI9B,kBAAkB,CAAC,QAAQ,EAAE,MAAM;IAInC,GAAG,CAAC,GAAG,EAAE,MAAM;IAiCf,KAAK;IAML,UAAU;CAGX"} \ No newline at end of file diff --git a/node_modules/jest-watcher/build/lib/Prompt.js b/node_modules/jest-watcher/build/lib/Prompt.js deleted file mode 100644 index 3bcf0117..00000000 --- a/node_modules/jest-watcher/build/lib/Prompt.js +++ /dev/null @@ -1,149 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _constants = require('../constants'); - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class Prompt { - constructor() { - _defineProperty(this, '_entering', void 0); - - _defineProperty(this, '_value', void 0); - - _defineProperty(this, '_onChange', void 0); - - _defineProperty(this, '_onSuccess', void 0); - - _defineProperty(this, '_onCancel', void 0); - - _defineProperty(this, '_offset', void 0); - - _defineProperty(this, '_promptLength', void 0); - - _defineProperty(this, '_selection', void 0); - - _defineProperty(this, '_onResize', () => { - this._onChange(); - }); - - // Copied from `enter` to satisfy TS - this._entering = true; - this._value = ''; - this._selection = null; - this._offset = -1; - this._promptLength = 0; - - this._onChange = () => {}; - - this._onSuccess = () => {}; - - this._onCancel = () => {}; - } - - enter(onChange, onSuccess, onCancel) { - this._entering = true; - this._value = ''; - this._onSuccess = onSuccess; - this._onCancel = onCancel; - this._selection = null; - this._offset = -1; - this._promptLength = 0; - - this._onChange = () => - onChange(this._value, { - max: 10, - offset: this._offset - }); - - this._onChange(); - - process.stdout.on('resize', this._onResize); - } - - setPromptLength(length) { - this._promptLength = length; - } - - setPromptSelection(selected) { - this._selection = selected; - } - - put(key) { - switch (key) { - case _constants.KEYS.ENTER: - this._entering = false; - - this._onSuccess(this._selection || this._value); - - this.abort(); - break; - - case _constants.KEYS.ESCAPE: - this._entering = false; - - this._onCancel(this._value); - - this.abort(); - break; - - case _constants.KEYS.ARROW_DOWN: - this._offset = Math.min(this._offset + 1, this._promptLength - 1); - - this._onChange(); - - break; - - case _constants.KEYS.ARROW_UP: - this._offset = Math.max(this._offset - 1, -1); - - this._onChange(); - - break; - - case _constants.KEYS.ARROW_LEFT: - case _constants.KEYS.ARROW_RIGHT: - break; - - default: - this._value = - key === _constants.KEYS.BACKSPACE - ? this._value.slice(0, -1) - : this._value + key; - this._offset = -1; - this._selection = null; - - this._onChange(); - - break; - } - } - - abort() { - this._entering = false; - this._value = ''; - process.stdout.removeListener('resize', this._onResize); - } - - isEntering() { - return this._entering; - } -} - -exports.default = Prompt; diff --git a/node_modules/jest-watcher/build/lib/colorize.d.ts b/node_modules/jest-watcher/build/lib/colorize.d.ts deleted file mode 100644 index 3ab52226..00000000 --- a/node_modules/jest-watcher/build/lib/colorize.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare const _default: (str: string, start: number, end: number) => string; -export default _default; -//# sourceMappingURL=colorize.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-watcher/build/lib/colorize.d.ts.map b/node_modules/jest-watcher/build/lib/colorize.d.ts.map deleted file mode 100644 index d16621e7..00000000 --- a/node_modules/jest-watcher/build/lib/colorize.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"colorize.d.ts","sourceRoot":"","sources":["../../src/lib/colorize.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAIH,wBAG4B"} \ No newline at end of file diff --git a/node_modules/jest-watcher/build/lib/colorize.js b/node_modules/jest-watcher/build/lib/colorize.js deleted file mode 100644 index 7562424e..00000000 --- a/node_modules/jest-watcher/build/lib/colorize.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var _default = (str, start, end) => - _chalk().default.dim(str.slice(0, start)) + - _chalk().default.reset(str.slice(start, end)) + - _chalk().default.dim(str.slice(end)); - -exports.default = _default; diff --git a/node_modules/jest-watcher/build/lib/formatTestNameByPattern.d.ts b/node_modules/jest-watcher/build/lib/formatTestNameByPattern.d.ts deleted file mode 100644 index 60999b67..00000000 --- a/node_modules/jest-watcher/build/lib/formatTestNameByPattern.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare const _default: (testName: string, pattern: string, width: number) => string; -export default _default; -//# sourceMappingURL=formatTestNameByPattern.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-watcher/build/lib/formatTestNameByPattern.d.ts.map b/node_modules/jest-watcher/build/lib/formatTestNameByPattern.d.ts.map deleted file mode 100644 index 47c434bd..00000000 --- a/node_modules/jest-watcher/build/lib/formatTestNameByPattern.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"formatTestNameByPattern.d.ts","sourceRoot":"","sources":["../../src/lib/formatTestNameByPattern.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AASH,wBA2CE"} \ No newline at end of file diff --git a/node_modules/jest-watcher/build/lib/formatTestNameByPattern.js b/node_modules/jest-watcher/build/lib/formatTestNameByPattern.js deleted file mode 100644 index 07219c38..00000000 --- a/node_modules/jest-watcher/build/lib/formatTestNameByPattern.js +++ /dev/null @@ -1,83 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -var _colorize = _interopRequireDefault(require('./colorize')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const DOTS = '...'; -const ENTER = '⏎'; - -var _default = (testName, pattern, width) => { - const inlineTestName = testName.replace(/(\r\n|\n|\r)/gm, ENTER); - let regexp; - - try { - regexp = new RegExp(pattern, 'i'); - } catch (e) { - return _chalk().default.dim(inlineTestName); - } - - const match = inlineTestName.match(regexp); - - if (!match) { - return _chalk().default.dim(inlineTestName); - } - - const startPatternIndex = Math.max(match.index || 0, 0); - const endPatternIndex = startPatternIndex + match[0].length; - - if (inlineTestName.length <= width) { - return (0, _colorize.default)( - inlineTestName, - startPatternIndex, - endPatternIndex - ); - } - - const slicedTestName = inlineTestName.slice(0, width - DOTS.length); - - if (startPatternIndex < slicedTestName.length) { - if (endPatternIndex > slicedTestName.length) { - return (0, _colorize.default)( - slicedTestName + DOTS, - startPatternIndex, - slicedTestName.length + DOTS.length - ); - } else { - return (0, _colorize.default)( - slicedTestName + DOTS, - Math.min(startPatternIndex, slicedTestName.length), - endPatternIndex - ); - } - } - - return `${_chalk().default.dim(slicedTestName)}${_chalk().default.reset( - DOTS - )}`; -}; - -exports.default = _default; diff --git a/node_modules/jest-watcher/build/lib/patternModeHelpers.d.ts b/node_modules/jest-watcher/build/lib/patternModeHelpers.d.ts deleted file mode 100644 index 13f0466d..00000000 --- a/node_modules/jest-watcher/build/lib/patternModeHelpers.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -export declare const printPatternCaret: (pattern: string, pipe: NodeJS.WritableStream) => void; -export declare const printRestoredPatternCaret: (pattern: string, currentUsageRows: number, pipe: NodeJS.WritableStream) => void; -//# sourceMappingURL=patternModeHelpers.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-watcher/build/lib/patternModeHelpers.d.ts.map b/node_modules/jest-watcher/build/lib/patternModeHelpers.d.ts.map deleted file mode 100644 index 12ec6810..00000000 --- a/node_modules/jest-watcher/build/lib/patternModeHelpers.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"patternModeHelpers.d.ts","sourceRoot":"","sources":["../../src/lib/patternModeHelpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAMH,eAAO,MAAM,iBAAiB,wDAS7B,CAAC;AAEF,eAAO,MAAM,yBAAyB,kFAWrC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-watcher/build/lib/patternModeHelpers.js b/node_modules/jest-watcher/build/lib/patternModeHelpers.js deleted file mode 100644 index 13bbfb20..00000000 --- a/node_modules/jest-watcher/build/lib/patternModeHelpers.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.printRestoredPatternCaret = exports.printPatternCaret = void 0; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _ansiEscapes() { - const data = _interopRequireDefault(require('ansi-escapes')); - - _ansiEscapes = function _ansiEscapes() { - return data; - }; - - return data; -} - -function _stringLength() { - const data = _interopRequireDefault(require('string-length')); - - _stringLength = function _stringLength() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const printPatternCaret = (pattern, pipe) => { - const inputText = `${_chalk().default.dim(' pattern \u203A')} ${pattern}`; - pipe.write(_ansiEscapes().default.eraseDown); - pipe.write(inputText); - pipe.write(_ansiEscapes().default.cursorSavePosition); -}; - -exports.printPatternCaret = printPatternCaret; - -const printRestoredPatternCaret = (pattern, currentUsageRows, pipe) => { - const inputText = `${_chalk().default.dim(' pattern \u203A')} ${pattern}`; - pipe.write( - _ansiEscapes().default.cursorTo( - (0, _stringLength().default)(inputText), - currentUsageRows - 1 - ) - ); - pipe.write(_ansiEscapes().default.cursorRestorePosition); -}; - -exports.printRestoredPatternCaret = printRestoredPatternCaret; diff --git a/node_modules/jest-watcher/build/lib/scroll.d.ts b/node_modules/jest-watcher/build/lib/scroll.d.ts deleted file mode 100644 index 104a2c6b..00000000 --- a/node_modules/jest-watcher/build/lib/scroll.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { ScrollOptions } from '../types'; -export default function scroll(size: number, { offset, max }: ScrollOptions): { - end: number; - index: number; - start: number; -}; -//# sourceMappingURL=scroll.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-watcher/build/lib/scroll.d.ts.map b/node_modules/jest-watcher/build/lib/scroll.d.ts.map deleted file mode 100644 index 375d3dc8..00000000 --- a/node_modules/jest-watcher/build/lib/scroll.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scroll.d.ts","sourceRoot":"","sources":["../../src/lib/scroll.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAC,MAAM,EAAE,GAAG,EAAC,EAAE,aAAa;;;;EAoBxE"} \ No newline at end of file diff --git a/node_modules/jest-watcher/build/lib/scroll.js b/node_modules/jest-watcher/build/lib/scroll.js deleted file mode 100644 index 4a545041..00000000 --- a/node_modules/jest-watcher/build/lib/scroll.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = scroll; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function scroll(size, {offset, max}) { - let start = 0; - let index = Math.min(offset, size); - const halfScreen = max / 2; - - if (index <= halfScreen) { - start = 0; - } else { - if (size >= max) { - start = Math.min(index - halfScreen - 1, size - max); - } - - index = Math.min(index - start, size); - } - - return { - end: Math.min(size, start + max), - index, - start - }; -} diff --git a/node_modules/jest-watcher/build/types.d.ts b/node_modules/jest-watcher/build/types.d.ts deleted file mode 100644 index de3a0dd2..00000000 --- a/node_modules/jest-watcher/build/types.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Config } from '@jest/types'; -import { AggregatedResult } from '@jest/test-result'; -declare type TestSuiteInfo = { - config: Config.ProjectConfig; - duration?: number; - testPath: string; -}; -export declare type JestHookExposedFS = { - projects: Array<{ - config: Config.ProjectConfig; - testPaths: Array; - }>; -}; -export declare type FileChange = (fs: JestHookExposedFS) => void; -export declare type ShouldRunTestSuite = (testSuiteInfo: TestSuiteInfo) => Promise; -export declare type TestRunComplete = (results: AggregatedResult) => void; -export declare type JestHookSubscriber = { - onFileChange: (fn: FileChange) => void; - onTestRunComplete: (fn: TestRunComplete) => void; - shouldRunTestSuite: (fn: ShouldRunTestSuite) => void; -}; -export declare type JestHookEmitter = { - onFileChange: (fs: JestHookExposedFS) => void; - onTestRunComplete: (results: AggregatedResult) => void; - shouldRunTestSuite: (testSuiteInfo: TestSuiteInfo) => Promise; -}; -export declare type UsageData = { - key: string; - prompt: string; -}; -export declare type AllowedConfigOptions = Partial & { - mode: 'watch' | 'watchAll'; -}>; -export declare type UpdateConfigCallback = (config?: AllowedConfigOptions) => void; -export interface WatchPlugin { - isInternal?: boolean; - apply?: (hooks: JestHookSubscriber) => void; - getUsageInfo?: (globalConfig: Config.GlobalConfig) => UsageData | null; - onKey?: (value: string) => void; - run?: (globalConfig: Config.GlobalConfig, updateConfigAndRun: UpdateConfigCallback) => Promise; -} -export interface WatchPluginClass { - new (options: { - stdin: NodeJS.ReadStream; - stdout: NodeJS.WriteStream; - }): WatchPlugin; -} -export declare type ScrollOptions = { - offset: number; - max: number; -}; -export {}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-watcher/build/types.d.ts.map b/node_modules/jest-watcher/build/types.d.ts.map deleted file mode 100644 index 636cded6..00000000 --- a/node_modules/jest-watcher/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAEnD,aAAK,aAAa,GAAG;IACnB,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,KAAK,CAAC;QACd,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;QAC7B,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KAC/B,CAAC,CAAC;CACJ,CAAC;AAEF,oBAAY,UAAU,GAAG,CAAC,EAAE,EAAE,iBAAiB,KAAK,IAAI,CAAC;AACzD,oBAAY,kBAAkB,GAAG,CAC/B,aAAa,EAAE,aAAa,KACzB,OAAO,CAAC,OAAO,CAAC,CAAC;AACtB,oBAAY,eAAe,GAAG,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;AAElE,oBAAY,kBAAkB,GAAG;IAC/B,YAAY,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;IACvC,iBAAiB,EAAE,CAAC,EAAE,EAAE,eAAe,KAAK,IAAI,CAAC;IACjD,kBAAkB,EAAE,CAAC,EAAE,EAAE,kBAAkB,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,YAAY,EAAE,CAAC,EAAE,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,iBAAiB,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACvD,kBAAkB,EAAE,CAAC,aAAa,EAAE,aAAa,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACxE,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,oBAAoB,GAAG,OAAO,CACxC,IAAI,CACF,MAAM,CAAC,YAAY,EACjB,MAAM,GACN,cAAc,GACd,iBAAiB,GACjB,qBAAqB,GACrB,yBAAyB,GACzB,mBAAmB,GACnB,mBAAmB,GACnB,QAAQ,GACR,YAAY,GACZ,cAAc,GACd,WAAW,GACX,iBAAiB,GACjB,iBAAiB,GACjB,gBAAgB,GAChB,SAAS,CACZ,GAAG;IAAC,IAAI,EAAE,OAAO,GAAG,UAAU,CAAA;CAAC,CACjC,CAAC;AAEF,oBAAY,oBAAoB,GAAG,CAAC,MAAM,CAAC,EAAE,oBAAoB,KAAK,IAAI,CAAC;AAE3E,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC5C,YAAY,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,YAAY,KAAK,SAAS,GAAG,IAAI,CAAC;IACvE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,GAAG,CAAC,EAAE,CACJ,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,kBAAkB,EAAE,oBAAoB,KACrC,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC;CAC9B;AACD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,OAAO,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;QACzB,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC;KAC5B,GAAG,WAAW,CAAC;CACjB;AAED,oBAAY,aAAa,GAAG;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-watcher/build/types.js b/node_modules/jest-watcher/build/types.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/jest-watcher/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/jest-watcher/package.json b/node_modules/jest-watcher/package.json deleted file mode 100644 index d9cc61d6..00000000 --- a/node_modules/jest-watcher/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_args": [ - [ - "jest-watcher@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-watcher@24.9.0", - "_id": "jest-watcher@24.9.0", - "_inBundle": false, - "_integrity": "sha512-+/fLOfKPXXYJDYlks62/4R4GoT+GU1tYZed99JSCOsmzkkF7727RqKrjNAxtfO4YpGv11wybgRvCjR73lK2GZw==", - "_location": "/jest-watcher", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-watcher@24.9.0", - "name": "jest-watcher", - "escapedName": "jest-watcher", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/core" - ], - "_resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "@types/yargs": "^13.0.0", - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.1", - "jest-util": "^24.9.0", - "string-length": "^2.0.0" - }, - "description": "Delightful JavaScript Testing.", - "devDependencies": { - "@types/ansi-escapes": "^3.0.0", - "@types/string-length": "^2.0.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://jestjs.io/", - "license": "MIT", - "main": "build/index.js", - "name": "jest-watcher", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-watcher" - }, - "version": "24.9.0" -} diff --git a/node_modules/jest-worker/LICENSE b/node_modules/jest-worker/LICENSE deleted file mode 100644 index b96dcb04..00000000 --- a/node_modules/jest-worker/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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/jest-worker/README.md b/node_modules/jest-worker/README.md deleted file mode 100644 index e6ca3a79..00000000 --- a/node_modules/jest-worker/README.md +++ /dev/null @@ -1,215 +0,0 @@ -# jest-worker - -Module for executing heavy tasks under forked processes in parallel, by providing a `Promise` based interface, minimum overhead, and bound workers. - -The module works by providing an absolute path of the module to be loaded in all forked processes. Files relative to a node module are also accepted. All methods are exposed on the parent process as promises, so they can be `await`'ed. Child (worker) methods can either be synchronous or asynchronous. - -The module also implements support for bound workers. Binding a worker means that, based on certain parameters, the same task will always be executed by the same worker. The way bound workers work is by using the returned string of the `computeWorkerKey` method. If the string was used before for a task, the call will be queued to the related worker that processed the task earlier; if not, it will be executed by the first available worker, then sticked to the worker that executed it; so the next time it will be processed by the same worker. If you have no preference on the worker executing the task, but you have defined a `computeWorkerKey` method because you want _some_ of the tasks to be sticked, you can return `null` from it. - -The list of exposed methods can be explicitly provided via the `exposedMethods` option. If it is not provided, it will be obtained by requiring the child module into the main process, and analyzed via reflection. Check the "minimal example" section for a valid one. - -## Install - -```sh -$ yarn add jest-worker -``` - -## Example - -This example covers the minimal usage: - -### File `parent.js` - -```javascript -import Worker from 'jest-worker'; - -async function main() { - const worker = new Worker(require.resolve('./Worker')); - const result = await worker.hello('Alice'); // "Hello, Alice" -} - -main(); -``` - -### File `worker.js` - -```javascript -export function hello(param) { - return 'Hello, ' + param; -} -``` - -## Experimental worker - -Node 10 shipped with [worker-threads](https://nodejs.org/api/worker_threads.html), a "threading API" that uses SharedArrayBuffers to communicate between the main process and its child threads. This experimental Node feature can significantly improve the communication time between parent and child processes in `jest-worker`. - -Since `worker_threads` are considered experimental in Node, you have to opt-in to this behavior by passing `enableWorkerThreads: true` when instantiating the worker. While the feature was unflagged in Node 11.7.0, you'll need to run the Node process with the `--experimental-worker` flag for Node 10. - -## API - -The only exposed method is a constructor (`Worker`) that is initialized by passing the worker path, plus an options object. - -### `workerPath: string` (required) - -Node module name or absolute path of the file to be loaded in the child processes. Use `require.resolve` to transform a relative path into an absolute one. - -### `options: Object` (optional) - -#### `exposedMethods: $ReadOnlyArray` (optional) - -List of method names that can be called on the child processes from the parent process. You cannot expose any method named like a public `Worker` method, or starting with `_`. If you use method auto-discovery, then these methods will not be exposed, even if they exist. - -#### `numWorkers: number` (optional) - -Amount of workers to spawn. Defaults to the number of CPUs minus 1. - -#### `maxRetries: number` (optional) - -Maximum amount of times that a dead child can be re-spawned, per call. Defaults to `3`, pass `Infinity` to allow endless retries. - -#### `forkOptions: Object` (optional) - -Allow customizing all options passed to `childProcess.fork`. By default, some values are set (`cwd`, `env` and `execArgv`), but you can override them and customize the rest. For a list of valid values, check [the Node documentation](https://nodejs.org/api/child_process.html#child_process_child_process_fork_modulepath_args_options). - -#### `computeWorkerKey: (method: string, ...args: Array) => ?string` (optional) - -Every time a method exposed via the API is called, `computeWorkerKey` is also called in order to bound the call to a worker. This is useful for workers that are able to cache the result or part of it. You bound calls to a worker by making `computeWorkerKey` return the same identifier for all different calls. If you do not want to bind the call to any worker, return `null`. - -The callback you provide is called with the method name, plus all the rest of the arguments of the call. Thus, you have full control to decide what to return. Check a practical example on bound workers under the "bound worker usage" section. - -By default, no process is bound to any worker. - -#### `setupArgs: Array` (optional) - -The arguments that will be passed to the `setup` method during initialization. - -#### `workerPool: (workerPath: string, options?: WorkerPoolOptions) => WorkerPoolInterface` (optional) - -Provide a custom worker pool to be used for spawning child processes. By default, Jest will use a node thread pool if available and fall back to child process threads. - -The arguments that will be passed to the `setup` method during initialization. - -#### `enableWorkerThreads: boolean` (optional) - -`jest-worker` will automatically detect if `worker_threads` are available, but will not use them unless passed `enableWorkerThreads: true`. - -## Worker - -The returned `Worker` instance has all the exposed methods, plus some additional ones to interact with the workers itself: - -### `getStdout(): Readable` - -Returns a `ReadableStream` where the standard output of all workers is piped. Note that the `silent` option of the child workers must be set to `true` to make it work. This is the default set by `jest-worker`, but keep it in mind when overriding options through `forkOptions`. - -### `getStderr(): Readable` - -Returns a `ReadableStream` where the standard error of all workers is piped. Note that the `silent` option of the child workers must be set to `true` to make it work. This is the default set by `jest-worker`, but keep it in mind when overriding options through `forkOptions`. - -### `end()` - -Finishes the workers by killing all workers. No further calls can be done to the `Worker` instance. - -**Note:** Each worker has a unique id (index that starts with `1`) which is available on `process.env.JEST_WORKER_ID` - -## Setting up and tearing down the child process - -The child process can define two special methods (both of them can be asynchronous): - -- `setup()`: If defined, it's executed before the first call to any method in the child. -- `teardown()`: If defined, it's executed when the farm ends. - -# More examples - -## Standard usage - -This example covers the standard usage: - -### File `parent.js` - -```javascript -import Worker from 'jest-worker'; - -async function main() { - const myWorker = new Worker(require.resolve('./Worker'), { - exposedMethods: ['foo', 'bar', 'getWorkerId'], - numWorkers: 4, - }); - - console.log(await myWorker.foo('Alice')); // "Hello from foo: Alice" - console.log(await myWorker.bar('Bob')); // "Hello from bar: Bob" - console.log(await myWorker.getWorkerId()); // "3" -> this message has sent from the 3rd worker - - myWorker.end(); -} - -main(); -``` - -### File `worker.js` - -```javascript -export function foo(param) { - return 'Hello from foo: ' + param; -} - -export function bar(param) { - return 'Hello from bar: ' + param; -} - -export function getWorkerId() { - return process.env.JEST_WORKER_ID; -} -``` - -## Bound worker usage: - -This example covers the usage with a `computeWorkerKey` method: - -### File `parent.js` - -```javascript -import Worker from 'jest-worker'; - -async function main() { - const myWorker = new Worker(require.resolve('./Worker'), { - computeWorkerKey: (method, filename) => filename, - }); - - // Transform the given file, within the first available worker. - console.log(await myWorker.transform('/tmp/foo.js')); - - // Wait a bit. - await sleep(10000); - - // Transform the same file again. Will immediately return because the - // transformed file is cached in the worker, and `computeWorkerKey` ensures - // the same worker that processed the file the first time will process it now. - console.log(await myWorker.transform('/tmp/foo.js')); - - myWorker.end(); -} - -main(); -``` - -### File `worker.js` - -```javascript -import babel from '@babel/core'; - -const cache = Object.create(null); - -export function transform(filename) { - if (cache[filename]) { - return cache[filename]; - } - - // jest-worker can handle both immediate results and thenables. If a - // thenable is returned, it will be await'ed until it resolves. - return babel.transformFileAsync(filename).then(result => { - cache[filename] = result; - - return result; - }); -} -``` diff --git a/node_modules/jest-worker/build/Farm.d.ts b/node_modules/jest-worker/build/Farm.d.ts deleted file mode 100644 index fbdaea0f..00000000 --- a/node_modules/jest-worker/build/Farm.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { FarmOptions } from './types'; -export default class Farm { - private _computeWorkerKey; - private _cacheKeys; - private _callback; - private _last; - private _locks; - private _numOfWorkers; - private _offset; - private _queue; - constructor(numOfWorkers: number, callback: Function, computeWorkerKey?: FarmOptions['computeWorkerKey']); - doWork(method: string, ...args: Array): Promise; - private _getNextTask; - private _process; - private _enqueue; - private _push; - private _lock; - private _unlock; - private _isLocked; -} -//# sourceMappingURL=Farm.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-worker/build/Farm.d.ts.map b/node_modules/jest-worker/build/Farm.d.ts.map deleted file mode 100644 index 95d95412..00000000 --- a/node_modules/jest-worker/build/Farm.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Farm.d.ts","sourceRoot":"","sources":["../src/Farm.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAEL,WAAW,EAOZ,MAAM,SAAS,CAAC;AAEjB,MAAM,CAAC,OAAO,OAAO,IAAI;IACvB,OAAO,CAAC,iBAAiB,CAAkC;IAC3D,OAAO,CAAC,UAAU,CAAkC;IACpD,OAAO,CAAC,SAAS,CAAW;IAC5B,OAAO,CAAC,KAAK,CAAmB;IAChC,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAA0B;gBAGtC,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,CAAC,EAAE,WAAW,CAAC,kBAAkB,CAAC;IAepD,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAqC7D,OAAO,CAAC,YAAY;IAYpB,OAAO,CAAC,QAAQ;IA0BhB,OAAO,CAAC,QAAQ;IAmBhB,OAAO,CAAC,KAAK;IAUb,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,SAAS;CAGlB"} \ No newline at end of file diff --git a/node_modules/jest-worker/build/Farm.js b/node_modules/jest-worker/build/Farm.js deleted file mode 100644 index 64a58654..00000000 --- a/node_modules/jest-worker/build/Farm.js +++ /dev/null @@ -1,179 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _types = require('./types'); - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class Farm { - constructor(numOfWorkers, callback, computeWorkerKey) { - _defineProperty(this, '_computeWorkerKey', void 0); - - _defineProperty(this, '_cacheKeys', void 0); - - _defineProperty(this, '_callback', void 0); - - _defineProperty(this, '_last', void 0); - - _defineProperty(this, '_locks', void 0); - - _defineProperty(this, '_numOfWorkers', void 0); - - _defineProperty(this, '_offset', void 0); - - _defineProperty(this, '_queue', void 0); - - this._cacheKeys = Object.create(null); - this._callback = callback; - this._last = []; - this._locks = []; - this._numOfWorkers = numOfWorkers; - this._offset = 0; - this._queue = []; - - if (computeWorkerKey) { - this._computeWorkerKey = computeWorkerKey; - } - } - - doWork(method, ...args) { - return new Promise((resolve, reject) => { - const computeWorkerKey = this._computeWorkerKey; - const request = [_types.CHILD_MESSAGE_CALL, false, method, args]; - let worker = null; - let hash = null; - - if (computeWorkerKey) { - hash = computeWorkerKey.call(this, method, ...args); - worker = hash == null ? null : this._cacheKeys[hash]; - } - - const onStart = worker => { - if (hash != null) { - this._cacheKeys[hash] = worker; - } - }; - - const onEnd = (error, result) => { - if (error) { - reject(error); - } else { - resolve(result); - } - }; - - const task = { - onEnd, - onStart, - request - }; - - if (worker) { - this._enqueue(task, worker.getWorkerId()); - } else { - this._push(task); - } - }); - } - - _getNextTask(workerId) { - let queueHead = this._queue[workerId]; - - while (queueHead && queueHead.task.request[1]) { - queueHead = queueHead.next || null; - } - - this._queue[workerId] = queueHead; - return queueHead && queueHead.task; - } - - _process(workerId) { - if (this._isLocked(workerId)) { - return this; - } - - const task = this._getNextTask(workerId); - - if (!task) { - return this; - } - - const onEnd = (error, result) => { - task.onEnd(error, result); - - this._unlock(workerId); - - this._process(workerId); - }; - - task.request[1] = true; - - this._lock(workerId); - - this._callback(workerId, task.request, task.onStart, onEnd); - - return this; - } - - _enqueue(task, workerId) { - const item = { - next: null, - task - }; - - if (task.request[1]) { - return this; - } - - if (this._queue[workerId]) { - this._last[workerId].next = item; - } else { - this._queue[workerId] = item; - } - - this._last[workerId] = item; - - this._process(workerId); - - return this; - } - - _push(task) { - for (let i = 0; i < this._numOfWorkers; i++) { - this._enqueue(task, (this._offset + i) % this._numOfWorkers); - } - - this._offset++; - return this; - } - - _lock(workerId) { - this._locks[workerId] = true; - } - - _unlock(workerId) { - this._locks[workerId] = false; - } - - _isLocked(workerId) { - return this._locks[workerId]; - } -} - -exports.default = Farm; diff --git a/node_modules/jest-worker/build/WorkerPool.d.ts b/node_modules/jest-worker/build/WorkerPool.d.ts deleted file mode 100644 index 21ee6608..00000000 --- a/node_modules/jest-worker/build/WorkerPool.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import BaseWorkerPool from './base/BaseWorkerPool'; -import { ChildMessage, WorkerOptions, OnStart, OnEnd, WorkerPoolInterface, WorkerInterface } from './types'; -declare class WorkerPool extends BaseWorkerPool implements WorkerPoolInterface { - send(workerId: number, request: ChildMessage, onStart: OnStart, onEnd: OnEnd): void; - createWorker(workerOptions: WorkerOptions): WorkerInterface; -} -export default WorkerPool; -//# sourceMappingURL=WorkerPool.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-worker/build/WorkerPool.d.ts.map b/node_modules/jest-worker/build/WorkerPool.d.ts.map deleted file mode 100644 index 49bc9cee..00000000 --- a/node_modules/jest-worker/build/WorkerPool.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WorkerPool.d.ts","sourceRoot":"","sources":["../src/WorkerPool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,cAAc,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EACL,YAAY,EACZ,aAAa,EACb,OAAO,EACP,KAAK,EACL,mBAAmB,EACnB,eAAe,EAChB,MAAM,SAAS,CAAC;AAWjB,cAAM,UAAW,SAAQ,cAAe,YAAW,mBAAmB;IACpE,IAAI,CACF,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,GACX,IAAI;IAIP,YAAY,CAAC,aAAa,EAAE,aAAa,GAAG,eAAe;CAU5D;AAED,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-worker/build/WorkerPool.js b/node_modules/jest-worker/build/WorkerPool.js deleted file mode 100644 index 752ea5b1..00000000 --- a/node_modules/jest-worker/build/WorkerPool.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -var _BaseWorkerPool = _interopRequireDefault(require('./base/BaseWorkerPool')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const canUseWorkerThreads = () => { - try { - require('worker_threads'); - - return true; - } catch (_) { - return false; - } -}; - -class WorkerPool extends _BaseWorkerPool.default { - send(workerId, request, onStart, onEnd) { - this.getWorkerById(workerId).send(request, onStart, onEnd); - } - - createWorker(workerOptions) { - let Worker; - - if (this._options.enableWorkerThreads && canUseWorkerThreads()) { - Worker = require('./workers/NodeThreadsWorker').default; - } else { - Worker = require('./workers/ChildProcessWorker').default; - } - - return new Worker(workerOptions); - } -} - -var _default = WorkerPool; -exports.default = _default; diff --git a/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts b/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts deleted file mode 100644 index 26f0e0f0..00000000 --- a/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { WorkerPoolOptions, WorkerOptions, WorkerInterface } from '../types'; -export default class BaseWorkerPool { - private readonly _stderr; - private readonly _stdout; - protected readonly _options: WorkerPoolOptions; - private readonly _workers; - constructor(workerPath: string, options: WorkerPoolOptions); - getStderr(): NodeJS.ReadableStream; - getStdout(): NodeJS.ReadableStream; - getWorkers(): Array; - getWorkerById(workerId: number): WorkerInterface; - createWorker(_workerOptions: WorkerOptions): WorkerInterface; - end(): void; -} -//# sourceMappingURL=BaseWorkerPool.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts.map b/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts.map deleted file mode 100644 index 2d3e1c64..00000000 --- a/node_modules/jest-worker/build/base/BaseWorkerPool.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BaseWorkerPool.d.ts","sourceRoot":"","sources":["../../src/base/BaseWorkerPool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAKH,OAAO,EAEL,iBAAiB,EACjB,aAAa,EACb,eAAe,EAChB,MAAM,UAAU,CAAC;AAKlB,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwB;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwB;IAChD,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IAC/C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyB;gBAEtC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB;IAyC1D,SAAS,IAAI,MAAM,CAAC,cAAc;IAIlC,SAAS,IAAI,MAAM,CAAC,cAAc;IAIlC,UAAU,IAAI,KAAK,CAAC,eAAe,CAAC;IAIpC,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe;IAIhD,YAAY,CAAC,cAAc,EAAE,aAAa,GAAG,eAAe;IAI5D,GAAG,IAAI,IAAI;CAWZ"} \ No newline at end of file diff --git a/node_modules/jest-worker/build/base/BaseWorkerPool.js b/node_modules/jest-worker/build/base/BaseWorkerPool.js deleted file mode 100644 index 11960017..00000000 --- a/node_modules/jest-worker/build/base/BaseWorkerPool.js +++ /dev/null @@ -1,134 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _mergeStream() { - const data = _interopRequireDefault(require('merge-stream')); - - _mergeStream = function _mergeStream() { - return data; - }; - - return data; -} - -var _types = require('../types'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/* istanbul ignore next */ -const emptyMethod = () => {}; - -class BaseWorkerPool { - constructor(workerPath, options) { - _defineProperty(this, '_stderr', void 0); - - _defineProperty(this, '_stdout', void 0); - - _defineProperty(this, '_options', void 0); - - _defineProperty(this, '_workers', void 0); - - this._options = options; - this._workers = new Array(options.numWorkers); - - if (!_path().default.isAbsolute(workerPath)) { - workerPath = require.resolve(workerPath); - } - - const stdout = (0, _mergeStream().default)(); - const stderr = (0, _mergeStream().default)(); - const forkOptions = options.forkOptions, - maxRetries = options.maxRetries, - setupArgs = options.setupArgs; - - for (let i = 0; i < options.numWorkers; i++) { - const workerOptions = { - forkOptions, - maxRetries, - setupArgs, - workerId: i, - workerPath - }; - const worker = this.createWorker(workerOptions); - const workerStdout = worker.getStdout(); - const workerStderr = worker.getStderr(); - - if (workerStdout) { - stdout.add(workerStdout); - } - - if (workerStderr) { - stderr.add(workerStderr); - } - - this._workers[i] = worker; - } - - this._stdout = stdout; - this._stderr = stderr; - } - - getStderr() { - return this._stderr; - } - - getStdout() { - return this._stdout; - } - - getWorkers() { - return this._workers; - } - - getWorkerById(workerId) { - return this._workers[workerId]; - } - - createWorker(_workerOptions) { - throw Error('Missing method createWorker in WorkerPool'); - } - - end() { - // We do not cache the request object here. If so, it would only be only - // processed by one of the workers, and we want them all to close. - for (let i = 0; i < this._workers.length; i++) { - this._workers[i].send( - [_types.CHILD_MESSAGE_END, false], - emptyMethod, - emptyMethod - ); - } - } -} - -exports.default = BaseWorkerPool; diff --git a/node_modules/jest-worker/build/index.d.ts b/node_modules/jest-worker/build/index.d.ts deleted file mode 100644 index e931617f..00000000 --- a/node_modules/jest-worker/build/index.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { FarmOptions } from './types'; -/** - * The Jest farm (publicly called "Worker") is a class that allows you to queue - * methods across multiple child processes, in order to parallelize work. This - * is done by providing an absolute path to a module that will be loaded on each - * of the child processes, and bridged to the main process. - * - * Bridged methods are specified by using the "exposedMethods" property of the - * "options" object. This is an array of strings, where each of them corresponds - * to the exported name in the loaded module. - * - * You can also control the amount of workers by using the "numWorkers" property - * of the "options" object, and the settings passed to fork the process through - * the "forkOptions" property. The amount of workers defaults to the amount of - * CPUS minus one. - * - * Queueing calls can be done in two ways: - * - Standard method: calls will be redirected to the first available worker, - * so they will get executed as soon as they can. - * - * - Sticky method: if a "computeWorkerKey" method is provided within the - * config, the resulting string of this method will be used as a key. - * Every time this key is returned, it is guaranteed that your job will be - * processed by the same worker. This is specially useful if your workers - * are caching results. - */ -export default class JestWorker { - private _ending; - private _farm; - private _options; - private _workerPool; - constructor(workerPath: string, options?: FarmOptions); - private _bindExposedWorkerMethods; - private _callFunctionWithArgs; - getStderr(): NodeJS.ReadableStream; - getStdout(): NodeJS.ReadableStream; - end(): void; -} -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-worker/build/index.d.ts.map b/node_modules/jest-worker/build/index.d.ts.map deleted file mode 100644 index b3158491..00000000 --- a/node_modules/jest-worker/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAKH,OAAO,EAAyC,WAAW,EAAC,MAAM,SAAS,CAAC;AAyB5E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,KAAK,CAAO;IACpB,OAAO,CAAC,QAAQ,CAAc;IAC9B,OAAO,CAAC,WAAW,CAAsB;gBAE7B,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW;IA+BrD,OAAO,CAAC,yBAAyB;IAkBjC,OAAO,CAAC,qBAAqB;IAW7B,SAAS,IAAI,MAAM,CAAC,cAAc;IAIlC,SAAS,IAAI,MAAM,CAAC,cAAc;IAIlC,GAAG,IAAI,IAAI;CASZ"} \ No newline at end of file diff --git a/node_modules/jest-worker/build/index.js b/node_modules/jest-worker/build/index.js deleted file mode 100644 index 18d4f567..00000000 --- a/node_modules/jest-worker/build/index.js +++ /dev/null @@ -1,184 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _os() { - const data = _interopRequireDefault(require('os')); - - _os = function _os() { - return data; - }; - - return data; -} - -var _WorkerPool = _interopRequireDefault(require('./WorkerPool')); - -var _Farm = _interopRequireDefault(require('./Farm')); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -function getExposedMethods(workerPath, options) { - let exposedMethods = options.exposedMethods; // If no methods list is given, try getting it by auto-requiring the module. - - if (!exposedMethods) { - const module = require(workerPath); - - exposedMethods = Object.keys(module).filter( - // @ts-ignore: no index - name => typeof module[name] === 'function' - ); - - if (typeof module === 'function') { - exposedMethods = [...exposedMethods, 'default']; - } - } - - return exposedMethods; -} -/** - * The Jest farm (publicly called "Worker") is a class that allows you to queue - * methods across multiple child processes, in order to parallelize work. This - * is done by providing an absolute path to a module that will be loaded on each - * of the child processes, and bridged to the main process. - * - * Bridged methods are specified by using the "exposedMethods" property of the - * "options" object. This is an array of strings, where each of them corresponds - * to the exported name in the loaded module. - * - * You can also control the amount of workers by using the "numWorkers" property - * of the "options" object, and the settings passed to fork the process through - * the "forkOptions" property. The amount of workers defaults to the amount of - * CPUS minus one. - * - * Queueing calls can be done in two ways: - * - Standard method: calls will be redirected to the first available worker, - * so they will get executed as soon as they can. - * - * - Sticky method: if a "computeWorkerKey" method is provided within the - * config, the resulting string of this method will be used as a key. - * Every time this key is returned, it is guaranteed that your job will be - * processed by the same worker. This is specially useful if your workers - * are caching results. - */ - -class JestWorker { - constructor(workerPath, options) { - _defineProperty(this, '_ending', void 0); - - _defineProperty(this, '_farm', void 0); - - _defineProperty(this, '_options', void 0); - - _defineProperty(this, '_workerPool', void 0); - - this._options = _objectSpread({}, options); - this._ending = false; - const workerPoolOptions = { - enableWorkerThreads: this._options.enableWorkerThreads || false, - forkOptions: this._options.forkOptions || {}, - maxRetries: this._options.maxRetries || 3, - numWorkers: - this._options.numWorkers || - Math.max(_os().default.cpus().length - 1, 1), - setupArgs: this._options.setupArgs || [] - }; - - if (this._options.WorkerPool) { - // @ts-ignore: constructor target any? - this._workerPool = new this._options.WorkerPool( - workerPath, - workerPoolOptions - ); - } else { - this._workerPool = new _WorkerPool.default(workerPath, workerPoolOptions); - } - - this._farm = new _Farm.default( - workerPoolOptions.numWorkers, - this._workerPool.send.bind(this._workerPool), - this._options.computeWorkerKey - ); - - this._bindExposedWorkerMethods(workerPath, this._options); - } - - _bindExposedWorkerMethods(workerPath, options) { - getExposedMethods(workerPath, options).forEach(name => { - if (name.startsWith('_')) { - return; - } - - if (this.constructor.prototype.hasOwnProperty(name)) { - throw new TypeError('Cannot define a method called ' + name); - } // @ts-ignore: dynamic extension of the class instance is expected. - - this[name] = this._callFunctionWithArgs.bind(this, name); - }); - } - - _callFunctionWithArgs(method, ...args) { - if (this._ending) { - throw new Error('Farm is ended, no more calls can be done to it'); - } - - return this._farm.doWork(method, ...args); - } - - getStderr() { - return this._workerPool.getStderr(); - } - - getStdout() { - return this._workerPool.getStdout(); - } - - end() { - if (this._ending) { - throw new Error('Farm is ended, no more calls can be done to it'); - } - - this._workerPool.end(); - - this._ending = true; - } -} - -exports.default = JestWorker; diff --git a/node_modules/jest-worker/build/types.d.ts b/node_modules/jest-worker/build/types.d.ts deleted file mode 100644 index e25cf11d..00000000 --- a/node_modules/jest-worker/build/types.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { EventEmitter } from 'events'; -import { ForkOptions } from 'child_process'; -export declare const CHILD_MESSAGE_INITIALIZE: 0; -export declare const CHILD_MESSAGE_CALL: 1; -export declare const CHILD_MESSAGE_END: 2; -export declare const PARENT_MESSAGE_OK: 0; -export declare const PARENT_MESSAGE_CLIENT_ERROR: 1; -export declare const PARENT_MESSAGE_SETUP_ERROR: 2; -export declare type PARENT_MESSAGE_ERROR = typeof PARENT_MESSAGE_CLIENT_ERROR | typeof PARENT_MESSAGE_SETUP_ERROR; -export { ForkOptions }; -export interface WorkerPoolInterface { - getStderr(): NodeJS.ReadableStream; - getStdout(): NodeJS.ReadableStream; - getWorkers(): Array; - createWorker(options: WorkerOptions): WorkerInterface; - send(workerId: number, request: ChildMessage, onStart: OnStart, onEnd: OnEnd): void; - end(): void; -} -export interface WorkerInterface { - send(request: ChildMessage, onProcessStart: OnStart, onProcessEnd: OnEnd): void; - getWorkerId(): number; - getStderr(): NodeJS.ReadableStream | null; - getStdout(): NodeJS.ReadableStream | null; - onExit(exitCode: number): void; - onMessage(message: ParentMessage): void; -} -export declare type FarmOptions = { - computeWorkerKey?: (method: string, ...args: Array) => string | null; - exposedMethods?: ReadonlyArray; - forkOptions?: ForkOptions; - setupArgs?: Array; - maxRetries?: number; - numWorkers?: number; - WorkerPool?: (workerPath: string, options?: WorkerPoolOptions) => WorkerPoolInterface; - enableWorkerThreads?: boolean; -}; -export declare type WorkerPoolOptions = { - setupArgs: Array; - forkOptions: ForkOptions; - maxRetries: number; - numWorkers: number; - enableWorkerThreads: boolean; -}; -export declare type WorkerOptions = { - forkOptions: ForkOptions; - setupArgs: Array; - maxRetries: number; - workerId: number; - workerPath: string; -}; -export declare type MessagePort = typeof EventEmitter & { - postMessage(message: unknown): void; -}; -export declare type MessageChannel = { - port1: MessagePort; - port2: MessagePort; -}; -export declare type ChildMessageInitialize = [typeof CHILD_MESSAGE_INITIALIZE, // type -boolean, // processed -string, // file -// file -Array | undefined, // setupArgs -// setupArgs -MessagePort | undefined]; -export declare type ChildMessageCall = [typeof CHILD_MESSAGE_CALL, // type -boolean, // processed -string, // method -Array]; -export declare type ChildMessageEnd = [typeof CHILD_MESSAGE_END, // type -boolean]; -export declare type ChildMessage = ChildMessageInitialize | ChildMessageCall | ChildMessageEnd; -export declare type ParentMessageOk = [typeof PARENT_MESSAGE_OK, // type -unknown]; -export declare type ParentMessageError = [PARENT_MESSAGE_ERROR, // type -string, // constructor -string, // message -string, // stack -unknown]; -export declare type ParentMessage = ParentMessageOk | ParentMessageError; -export declare type OnStart = (worker: WorkerInterface) => void; -export declare type OnEnd = (err: Error | null, result: unknown) => void; -export declare type QueueChildMessage = { - request: ChildMessage; - onStart: OnStart; - onEnd: OnEnd; -}; -export declare type QueueItem = { - task: QueueChildMessage; - next: QueueItem | null; -}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-worker/build/types.d.ts.map b/node_modules/jest-worker/build/types.d.ts.map deleted file mode 100644 index ba985538..00000000 --- a/node_modules/jest-worker/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAM1C,eAAO,MAAM,wBAAwB,EAAE,CAAK,CAAC;AAC7C,eAAO,MAAM,kBAAkB,EAAE,CAAK,CAAC;AACvC,eAAO,MAAM,iBAAiB,EAAE,CAAK,CAAC;AAEtC,eAAO,MAAM,iBAAiB,EAAE,CAAK,CAAC;AACtC,eAAO,MAAM,2BAA2B,EAAE,CAAK,CAAC;AAChD,eAAO,MAAM,0BAA0B,EAAE,CAAK,CAAC;AAE/C,oBAAY,oBAAoB,GAC5B,OAAO,2BAA2B,GAClC,OAAO,0BAA0B,CAAC;AAItC,OAAO,EAAC,WAAW,EAAC,CAAC;AAErB,MAAM,WAAW,mBAAmB;IAClC,SAAS,IAAI,MAAM,CAAC,cAAc,CAAC;IACnC,SAAS,IAAI,MAAM,CAAC,cAAc,CAAC;IACnC,UAAU,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;IACrC,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,eAAe,CAAC;IACtD,IAAI,CACF,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,GACX,IAAI,CAAC;IACR,GAAG,IAAI,IAAI,CAAC;CACb;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,CACF,OAAO,EAAE,YAAY,EACrB,cAAc,EAAE,OAAO,EACvB,YAAY,EAAE,KAAK,GAClB,IAAI,CAAC;IACR,WAAW,IAAI,MAAM,CAAC;IACtB,SAAS,IAAI,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;IAC1C,SAAS,IAAI,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;IAC1C,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAC;CACzC;AAED,oBAAY,WAAW,GAAG;IACxB,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,MAAM,GAAG,IAAI,CAAC;IAC9E,cAAc,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACvC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,SAAS,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,CACX,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,iBAAiB,KACxB,mBAAmB,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC1B,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAIF,oBAAY,WAAW,GAAG,OAAO,YAAY,GAAG;IAC9C,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;CACrC,CAAC;AAEF,oBAAY,cAAc,GAAG;IAC3B,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,EAAE,WAAW,CAAC;CACpB,CAAC;AAEF,oBAAY,sBAAsB,GAAG,CACnC,OAAO,wBAAwB,EAAE,OAAO;AACxC,OAAO,EAAE,YAAY;AACrB,MAAM,EAAE,OAAO;AACf,AADQ,OAAO;AACf,KAAK,CAAC,OAAO,CAAC,GAAG,SAAS,EAAE,YAAY;AACxC,AAD4B,YAAY;AACxC,WAAW,GAAG,SAAS,CACxB,CAAC;AAEF,oBAAY,gBAAgB,GAAG,CAC7B,OAAO,kBAAkB,EAAE,OAAO;AAClC,OAAO,EAAE,YAAY;AACrB,MAAM,EAAE,SAAS;AACjB,KAAK,CAAC,OAAO,CAAC,CACf,CAAC;AAEF,oBAAY,eAAe,GAAG,CAC5B,OAAO,iBAAiB,EAAE,OAAO;AACjC,OAAO,CACR,CAAC;AAEF,oBAAY,YAAY,GACpB,sBAAsB,GACtB,gBAAgB,GAChB,eAAe,CAAC;AAIpB,oBAAY,eAAe,GAAG,CAC5B,OAAO,iBAAiB,EAAE,OAAO;AACjC,OAAO,CACR,CAAC;AAEF,oBAAY,kBAAkB,GAAG,CAC/B,oBAAoB,EAAE,OAAO;AAC7B,MAAM,EAAE,cAAc;AACtB,MAAM,EAAE,UAAU;AAClB,MAAM,EAAE,QAAQ;AAChB,OAAO,CACR,CAAC;AAEF,oBAAY,aAAa,GAAG,eAAe,GAAG,kBAAkB,CAAC;AAIjE,oBAAY,OAAO,GAAG,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;AACxD,oBAAY,KAAK,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;AAEjE,oBAAY,iBAAiB,GAAG;IAC9B,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;CACxB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest-worker/build/types.js b/node_modules/jest-worker/build/types.js deleted file mode 100644 index f4b65de9..00000000 --- a/node_modules/jest-worker/build/types.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -Object.defineProperty(exports, 'ForkOptions', { - enumerable: true, - get: function get() { - return _child_process().ForkOptions; - } -}); -exports.PARENT_MESSAGE_SETUP_ERROR = exports.PARENT_MESSAGE_CLIENT_ERROR = exports.PARENT_MESSAGE_OK = exports.CHILD_MESSAGE_END = exports.CHILD_MESSAGE_CALL = exports.CHILD_MESSAGE_INITIALIZE = void 0; - -function _child_process() { - const data = require('child_process'); - - _child_process = function _child_process() { - return data; - }; - - return data; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// Because of the dynamic nature of a worker communication process, all messages -// coming from any of the other processes cannot be typed. Thus, many types -const CHILD_MESSAGE_INITIALIZE = 0; -exports.CHILD_MESSAGE_INITIALIZE = CHILD_MESSAGE_INITIALIZE; -const CHILD_MESSAGE_CALL = 1; -exports.CHILD_MESSAGE_CALL = CHILD_MESSAGE_CALL; -const CHILD_MESSAGE_END = 2; -exports.CHILD_MESSAGE_END = CHILD_MESSAGE_END; -const PARENT_MESSAGE_OK = 0; -exports.PARENT_MESSAGE_OK = PARENT_MESSAGE_OK; -const PARENT_MESSAGE_CLIENT_ERROR = 1; -exports.PARENT_MESSAGE_CLIENT_ERROR = PARENT_MESSAGE_CLIENT_ERROR; -const PARENT_MESSAGE_SETUP_ERROR = 2; -exports.PARENT_MESSAGE_SETUP_ERROR = PARENT_MESSAGE_SETUP_ERROR; diff --git a/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts b/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts deleted file mode 100644 index 850d6ade..00000000 --- a/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { WorkerInterface, ChildMessage, OnEnd, OnStart, WorkerOptions, ParentMessage } from '../types'; -/** - * This class wraps the child process and provides a nice interface to - * communicate with. It takes care of: - * - * - Re-spawning the process if it dies. - * - Queues calls while the worker is busy. - * - Re-sends the requests if the worker blew up. - * - * The reason for queueing them here (since childProcess.send also has an - * internal queue) is because the worker could be doing asynchronous work, and - * this would lead to the child process to read its receiving buffer and start a - * second call. By queueing calls here, we don't send the next call to the - * children until we receive the result of the previous one. - * - * As soon as a request starts to be processed by a worker, its "processed" - * field is changed to "true", so that other workers which might encounter the - * same call skip it. - */ -export default class ChildProcessWorker implements WorkerInterface { - private _child; - private _options; - private _onProcessEnd; - private _fakeStream; - private _request; - private _retries; - private _stderr; - private _stdout; - constructor(options: WorkerOptions); - initialize(): void; - private _shutdown; - onMessage(response: ParentMessage): void; - onExit(exitCode: number): void; - send(request: ChildMessage, onProcessStart: OnStart, onProcessEnd: OnEnd): void; - getWorkerId(): number; - getStdout(): NodeJS.ReadableStream | null; - getStderr(): NodeJS.ReadableStream | null; - private _getFakeStream; -} -//# sourceMappingURL=ChildProcessWorker.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts.map b/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts.map deleted file mode 100644 index 52f53494..00000000 --- a/node_modules/jest-worker/build/workers/ChildProcessWorker.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ChildProcessWorker.d.ts","sourceRoot":"","sources":["../../src/workers/ChildProcessWorker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAOH,OAAO,EAKL,eAAe,EACf,YAAY,EACZ,KAAK,EACL,OAAO,EACP,aAAa,EACb,aAAa,EACd,MAAM,UAAU,CAAC;AAElB;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,YAAW,eAAe;IAChE,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,QAAQ,CAAsB;IACtC,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,OAAO,CAAwC;gBAE3C,OAAO,EAAE,aAAa;IAUlC,UAAU;IAiEV,OAAO,CAAC,SAAS;IAQjB,SAAS,CAAC,QAAQ,EAAE,aAAa;IA6CjC,MAAM,CAAC,QAAQ,EAAE,MAAM;IAYvB,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK;IAcxE,WAAW;IAIX,SAAS,IAAI,MAAM,CAAC,cAAc,GAAG,IAAI;IAIzC,SAAS,IAAI,MAAM,CAAC,cAAc,GAAG,IAAI;IAIzC,OAAO,CAAC,cAAc;CAMvB"} \ No newline at end of file diff --git a/node_modules/jest-worker/build/workers/ChildProcessWorker.js b/node_modules/jest-worker/build/workers/ChildProcessWorker.js deleted file mode 100644 index 7632297f..00000000 --- a/node_modules/jest-worker/build/workers/ChildProcessWorker.js +++ /dev/null @@ -1,310 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _child_process() { - const data = _interopRequireDefault(require('child_process')); - - _child_process = function _child_process() { - return data; - }; - - return data; -} - -function _stream() { - const data = require('stream'); - - _stream = function _stream() { - return data; - }; - - return data; -} - -function _mergeStream() { - const data = _interopRequireDefault(require('merge-stream')); - - _mergeStream = function _mergeStream() { - return data; - }; - - return data; -} - -function _supportsColor() { - const data = _interopRequireDefault(require('supports-color')); - - _supportsColor = function _supportsColor() { - return data; - }; - - return data; -} - -var _types = require('../types'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -/** - * This class wraps the child process and provides a nice interface to - * communicate with. It takes care of: - * - * - Re-spawning the process if it dies. - * - Queues calls while the worker is busy. - * - Re-sends the requests if the worker blew up. - * - * The reason for queueing them here (since childProcess.send also has an - * internal queue) is because the worker could be doing asynchronous work, and - * this would lead to the child process to read its receiving buffer and start a - * second call. By queueing calls here, we don't send the next call to the - * children until we receive the result of the previous one. - * - * As soon as a request starts to be processed by a worker, its "processed" - * field is changed to "true", so that other workers which might encounter the - * same call skip it. - */ -class ChildProcessWorker { - constructor(options) { - _defineProperty(this, '_child', void 0); - - _defineProperty(this, '_options', void 0); - - _defineProperty(this, '_onProcessEnd', void 0); - - _defineProperty(this, '_fakeStream', void 0); - - _defineProperty(this, '_request', void 0); - - _defineProperty(this, '_retries', void 0); - - _defineProperty(this, '_stderr', void 0); - - _defineProperty(this, '_stdout', void 0); - - this._options = options; - this._fakeStream = null; - this._request = null; - this._stderr = null; - this._stdout = null; - this.initialize(); - } - - initialize() { - const forceColor = _supportsColor().default.stdout - ? { - FORCE_COLOR: '1' - } - : {}; - - const child = _child_process().default.fork( - require.resolve('./processChild'), - [], - _objectSpread( - { - cwd: process.cwd(), - env: _objectSpread( - {}, - process.env, - { - JEST_WORKER_ID: String(this._options.workerId + 1) - }, - forceColor - ), - // Suppress --debug / --inspect flags while preserving others (like --harmony). - execArgv: process.execArgv.filter(v => !/^--(debug|inspect)/.test(v)), - silent: true - }, - this._options.forkOptions - ) - ); - - if (child.stdout) { - if (!this._stdout) { - // We need to add a permanent stream to the merged stream to prevent it - // from ending when the subprocess stream ends - this._stdout = (0, _mergeStream().default)(this._getFakeStream()); - } - - this._stdout.add(child.stdout); - } - - if (child.stderr) { - if (!this._stderr) { - // We need to add a permanent stream to the merged stream to prevent it - // from ending when the subprocess stream ends - this._stderr = (0, _mergeStream().default)(this._getFakeStream()); - } - - this._stderr.add(child.stderr); - } - - child.on('message', this.onMessage.bind(this)); - child.on('exit', this.onExit.bind(this)); - child.send([ - _types.CHILD_MESSAGE_INITIALIZE, - false, - this._options.workerPath, - this._options.setupArgs - ]); - this._child = child; - this._retries++; // If we exceeded the amount of retries, we will emulate an error reply - // coming from the child. This avoids code duplication related with cleaning - // the queue, and scheduling the next call. - - if (this._retries > this._options.maxRetries) { - const error = new Error('Call retries were exceeded'); - this.onMessage([ - _types.PARENT_MESSAGE_CLIENT_ERROR, - error.name, - error.message, - error.stack, - { - type: 'WorkerError' - } - ]); - } - } - - _shutdown() { - // End the temporary streams so the merged streams end too - if (this._fakeStream) { - this._fakeStream.end(); - - this._fakeStream = null; - } - } - - onMessage(response) { - let error; - - switch (response[0]) { - case _types.PARENT_MESSAGE_OK: - this._onProcessEnd(null, response[1]); - - break; - - case _types.PARENT_MESSAGE_CLIENT_ERROR: - error = response[4]; - - if (error != null && typeof error === 'object') { - const extra = error; // @ts-ignore: no index - - const NativeCtor = global[response[1]]; - const Ctor = typeof NativeCtor === 'function' ? NativeCtor : Error; - error = new Ctor(response[2]); - error.type = response[1]; - error.stack = response[3]; - - for (const key in extra) { - // @ts-ignore: adding custom properties to errors. - error[key] = extra[key]; - } - } - - this._onProcessEnd(error, null); - - break; - - case _types.PARENT_MESSAGE_SETUP_ERROR: - error = new Error('Error when calling setup: ' + response[2]); // @ts-ignore: adding custom properties to errors. - - error.type = response[1]; - error.stack = response[3]; - - this._onProcessEnd(error, null); - - break; - - default: - throw new TypeError('Unexpected response from worker: ' + response[0]); - } - } - - onExit(exitCode) { - if (exitCode !== 0) { - this.initialize(); - - if (this._request) { - this._child.send(this._request); - } - } else { - this._shutdown(); - } - } - - send(request, onProcessStart, onProcessEnd) { - onProcessStart(this); - - this._onProcessEnd = (...args) => { - // Clean the request to avoid sending past requests to workers that fail - // while waiting for a new request (timers, unhandled rejections...) - this._request = null; - return onProcessEnd(...args); - }; - - this._request = request; - this._retries = 0; - - this._child.send(request); - } - - getWorkerId() { - return this._options.workerId; - } - - getStdout() { - return this._stdout; - } - - getStderr() { - return this._stderr; - } - - _getFakeStream() { - if (!this._fakeStream) { - this._fakeStream = new (_stream()).PassThrough(); - } - - return this._fakeStream; - } -} - -exports.default = ChildProcessWorker; diff --git a/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts b/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts deleted file mode 100644 index f6e39b29..00000000 --- a/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { ChildMessage, OnEnd, OnStart, WorkerOptions, WorkerInterface, ParentMessage } from '../types'; -export default class ExperimentalWorker implements WorkerInterface { - private _worker; - private _options; - private _onProcessEnd; - private _request; - private _retries; - private _stderr; - private _stdout; - private _fakeStream; - constructor(options: WorkerOptions); - initialize(): void; - private _shutdown; - onMessage(response: ParentMessage): void; - onExit(exitCode: number): void; - send(request: ChildMessage, onProcessStart: OnStart, onProcessEnd: OnEnd): void; - getWorkerId(): number; - getStdout(): NodeJS.ReadableStream | null; - getStderr(): NodeJS.ReadableStream | null; - private _getFakeStream; -} -//# sourceMappingURL=NodeThreadsWorker.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts.map b/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts.map deleted file mode 100644 index b44fb374..00000000 --- a/node_modules/jest-worker/build/workers/NodeThreadsWorker.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NodeThreadsWorker.d.ts","sourceRoot":"","sources":["../../src/workers/NodeThreadsWorker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AASH,OAAO,EAKL,YAAY,EACZ,KAAK,EACL,OAAO,EACP,aAAa,EACb,eAAe,EACf,aAAa,EACd,MAAM,UAAU,CAAC;AAElB,MAAM,CAAC,OAAO,OAAO,kBAAmB,YAAW,eAAe;IAChE,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAsB;IACtC,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,WAAW,CAAqB;gBAE5B,OAAO,EAAE,aAAa;IAUlC,UAAU;IAkEV,OAAO,CAAC,SAAS;IAQjB,SAAS,CAAC,QAAQ,EAAE,aAAa;IA2CjC,MAAM,CAAC,QAAQ,EAAE,MAAM;IAYvB,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK;IAexE,WAAW;IAIX,SAAS,IAAI,MAAM,CAAC,cAAc,GAAG,IAAI;IAIzC,SAAS,IAAI,MAAM,CAAC,cAAc,GAAG,IAAI;IAIzC,OAAO,CAAC,cAAc;CAMvB"} \ No newline at end of file diff --git a/node_modules/jest-worker/build/workers/NodeThreadsWorker.js b/node_modules/jest-worker/build/workers/NodeThreadsWorker.js deleted file mode 100644 index 5c1b7f8b..00000000 --- a/node_modules/jest-worker/build/workers/NodeThreadsWorker.js +++ /dev/null @@ -1,289 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _stream() { - const data = require('stream'); - - _stream = function _stream() { - return data; - }; - - return data; -} - -function _worker_threads() { - const data = require('worker_threads'); - - _worker_threads = function _worker_threads() { - return data; - }; - - return data; -} - -function _mergeStream() { - const data = _interopRequireDefault(require('merge-stream')); - - _mergeStream = function _mergeStream() { - return data; - }; - - return data; -} - -var _types = require('../types'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -class ExperimentalWorker { - constructor(options) { - _defineProperty(this, '_worker', void 0); - - _defineProperty(this, '_options', void 0); - - _defineProperty(this, '_onProcessEnd', void 0); - - _defineProperty(this, '_request', void 0); - - _defineProperty(this, '_retries', void 0); - - _defineProperty(this, '_stderr', void 0); - - _defineProperty(this, '_stdout', void 0); - - _defineProperty(this, '_fakeStream', void 0); - - this._options = options; - this._request = null; - this._stderr = null; - this._stdout = null; - this._fakeStream = null; - this.initialize(); - } - - initialize() { - this._worker = new (_worker_threads()).Worker( - _path().default.resolve(__dirname, './threadChild.js'), - { - eval: false, - stderr: true, - stdout: true, - workerData: _objectSpread( - { - cwd: process.cwd(), - env: _objectSpread({}, process.env, { - JEST_WORKER_ID: String(this._options.workerId + 1) // 0-indexed workerId, 1-indexed JEST_WORKER_ID - }), - // Suppress --debug / --inspect flags while preserving others (like --harmony). - execArgv: process.execArgv.filter( - v => !/^--(debug|inspect)/.test(v) - ), - silent: true - }, - this._options.forkOptions - ) - } - ); - - if (this._worker.stdout) { - if (!this._stdout) { - // We need to add a permanent stream to the merged stream to prevent it - // from ending when the subprocess stream ends - this._stdout = (0, _mergeStream().default)(this._getFakeStream()); - } - - this._stdout.add(this._worker.stdout); - } - - if (this._worker.stderr) { - if (!this._stderr) { - // We need to add a permanent stream to the merged stream to prevent it - // from ending when the subprocess stream ends - this._stderr = (0, _mergeStream().default)(this._getFakeStream()); - } - - this._stderr.add(this._worker.stderr); - } - - this._worker.on('message', this.onMessage.bind(this)); - - this._worker.on('exit', this.onExit.bind(this)); - - this._worker.postMessage([ - _types.CHILD_MESSAGE_INITIALIZE, - false, - this._options.workerPath, - this._options.setupArgs - ]); - - this._retries++; // If we exceeded the amount of retries, we will emulate an error reply - // coming from the child. This avoids code duplication related with cleaning - // the queue, and scheduling the next call. - - if (this._retries > this._options.maxRetries) { - const error = new Error('Call retries were exceeded'); - this.onMessage([ - _types.PARENT_MESSAGE_CLIENT_ERROR, - error.name, - error.message, - error.stack, - { - type: 'WorkerError' - } - ]); - } - } - - _shutdown() { - // End the permanent stream so the merged stream end too - if (this._fakeStream) { - this._fakeStream.end(); - - this._fakeStream = null; - } - } - - onMessage(response) { - let error; - - switch (response[0]) { - case _types.PARENT_MESSAGE_OK: - this._onProcessEnd(null, response[1]); - - break; - - case _types.PARENT_MESSAGE_CLIENT_ERROR: - error = response[4]; - - if (error != null && typeof error === 'object') { - const extra = error; // @ts-ignore: no index - - const NativeCtor = global[response[1]]; - const Ctor = typeof NativeCtor === 'function' ? NativeCtor : Error; - error = new Ctor(response[2]); - error.type = response[1]; - error.stack = response[3]; - - for (const key in extra) { - // @ts-ignore: no index - error[key] = extra[key]; - } - } - - this._onProcessEnd(error, null); - - break; - - case _types.PARENT_MESSAGE_SETUP_ERROR: - error = new Error('Error when calling setup: ' + response[2]); // @ts-ignore: adding custom properties to errors. - - error.type = response[1]; - error.stack = response[3]; - - this._onProcessEnd(error, null); - - break; - - default: - throw new TypeError('Unexpected response from worker: ' + response[0]); - } - } - - onExit(exitCode) { - if (exitCode !== 0) { - this.initialize(); - - if (this._request) { - this._worker.postMessage(this._request); - } - } else { - this._shutdown(); - } - } - - send(request, onProcessStart, onProcessEnd) { - onProcessStart(this); - - this._onProcessEnd = (...args) => { - // Clean the request to avoid sending past requests to workers that fail - // while waiting for a new request (timers, unhandled rejections...) - this._request = null; - return onProcessEnd(...args); - }; - - this._request = request; - this._retries = 0; - - this._worker.postMessage(request); - } - - getWorkerId() { - return this._options.workerId; - } - - getStdout() { - return this._stdout; - } - - getStderr() { - return this._stderr; - } - - _getFakeStream() { - if (!this._fakeStream) { - this._fakeStream = new (_stream()).PassThrough(); - } - - return this._fakeStream; - } -} - -exports.default = ExperimentalWorker; diff --git a/node_modules/jest-worker/build/workers/processChild.d.ts b/node_modules/jest-worker/build/workers/processChild.d.ts deleted file mode 100644 index 9763cb5a..00000000 --- a/node_modules/jest-worker/build/workers/processChild.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export {}; -//# sourceMappingURL=processChild.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-worker/build/workers/processChild.d.ts.map b/node_modules/jest-worker/build/workers/processChild.d.ts.map deleted file mode 100644 index 62ae3de0..00000000 --- a/node_modules/jest-worker/build/workers/processChild.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"processChild.d.ts","sourceRoot":"","sources":["../../src/workers/processChild.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/node_modules/jest-worker/build/workers/processChild.js b/node_modules/jest-worker/build/workers/processChild.js deleted file mode 100644 index 252b7383..00000000 --- a/node_modules/jest-worker/build/workers/processChild.js +++ /dev/null @@ -1,166 +0,0 @@ -'use strict'; - -var _types = require('../types'); - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -let file = null; -let setupArgs = []; -let initialized = false; -/** - * This file is a small bootstrapper for workers. It sets up the communication - * between the worker and the parent process, interpreting parent messages and - * sending results back. - * - * The file loaded will be lazily initialized the first time any of the workers - * is called. This is done for optimal performance: if the farm is initialized, - * but no call is made to it, child Node processes will be consuming the least - * possible amount of memory. - * - * If an invalid message is detected, the child will exit (by throwing) with a - * non-zero exit code. - */ - -process.on('message', request => { - switch (request[0]) { - case _types.CHILD_MESSAGE_INITIALIZE: - const init = request; - file = init[2]; - setupArgs = request[3]; - break; - - case _types.CHILD_MESSAGE_CALL: - const call = request; - execMethod(call[2], call[3]); - break; - - case _types.CHILD_MESSAGE_END: - end(); - break; - - default: - throw new TypeError( - 'Unexpected request from parent process: ' + request[0] - ); - } -}); - -function reportSuccess(result) { - if (!process || !process.send) { - throw new Error('Child can only be used on a forked process'); - } - - process.send([_types.PARENT_MESSAGE_OK, result]); -} - -function reportClientError(error) { - return reportError(error, _types.PARENT_MESSAGE_CLIENT_ERROR); -} - -function reportInitializeError(error) { - return reportError(error, _types.PARENT_MESSAGE_SETUP_ERROR); -} - -function reportError(error, type) { - if (!process || !process.send) { - throw new Error('Child can only be used on a forked process'); - } - - if (error == null) { - error = new Error('"null" or "undefined" thrown'); - } - - process.send([ - type, - error.constructor && error.constructor.name, - error.message, - error.stack, - typeof error === 'object' ? _objectSpread({}, error) : error - ]); -} - -function end() { - const main = require(file); - - if (!main.teardown) { - exitProcess(); - return; - } - - execFunction(main.teardown, main, [], exitProcess, exitProcess); -} - -function exitProcess() { - process.exit(0); -} - -function execMethod(method, args) { - const main = require(file); - - let fn; - - if (method === 'default') { - fn = main.__esModule ? main['default'] : main; - } else { - fn = main[method]; - } - - function execHelper() { - execFunction(fn, main, args, reportSuccess, reportClientError); - } - - if (initialized || !main.setup) { - execHelper(); - return; - } - - initialized = true; - execFunction(main.setup, main, setupArgs, execHelper, reportInitializeError); -} - -function execFunction(fn, ctx, args, onResult, onError) { - let result; - - try { - result = fn.apply(ctx, args); - } catch (err) { - onError(err); - return; - } - - if (result && typeof result.then === 'function') { - result.then(onResult, onError); - } else { - onResult(result); - } -} diff --git a/node_modules/jest-worker/build/workers/threadChild.d.ts b/node_modules/jest-worker/build/workers/threadChild.d.ts deleted file mode 100644 index e83f4432..00000000 --- a/node_modules/jest-worker/build/workers/threadChild.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export {}; -//# sourceMappingURL=threadChild.d.ts.map \ No newline at end of file diff --git a/node_modules/jest-worker/build/workers/threadChild.d.ts.map b/node_modules/jest-worker/build/workers/threadChild.d.ts.map deleted file mode 100644 index 5e405bd9..00000000 --- a/node_modules/jest-worker/build/workers/threadChild.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"threadChild.d.ts","sourceRoot":"","sources":["../../src/workers/threadChild.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"} \ No newline at end of file diff --git a/node_modules/jest-worker/build/workers/threadChild.js b/node_modules/jest-worker/build/workers/threadChild.js deleted file mode 100644 index 941c6999..00000000 --- a/node_modules/jest-worker/build/workers/threadChild.js +++ /dev/null @@ -1,176 +0,0 @@ -'use strict'; - -function _worker_threads() { - const data = require('worker_threads'); - - _worker_threads = function _worker_threads() { - return data; - }; - - return data; -} - -var _types = require('../types'); - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -let file = null; -let setupArgs = []; -let initialized = false; -/** - * This file is a small bootstrapper for workers. It sets up the communication - * between the worker and the parent process, interpreting parent messages and - * sending results back. - * - * The file loaded will be lazily initialized the first time any of the workers - * is called. This is done for optimal performance: if the farm is initialized, - * but no call is made to it, child Node processes will be consuming the least - * possible amount of memory. - * - * If an invalid message is detected, the child will exit (by throwing) with a - * non-zero exit code. - */ - -_worker_threads().parentPort.on('message', request => { - switch (request[0]) { - case _types.CHILD_MESSAGE_INITIALIZE: - const init = request; - file = init[2]; - setupArgs = request[3]; - break; - - case _types.CHILD_MESSAGE_CALL: - const call = request; - execMethod(call[2], call[3]); - break; - - case _types.CHILD_MESSAGE_END: - end(); - break; - - default: - throw new TypeError( - 'Unexpected request from parent process: ' + request[0] - ); - } -}); - -function reportSuccess(result) { - if (_worker_threads().isMainThread) { - throw new Error('Child can only be used on a forked process'); - } - - _worker_threads().parentPort.postMessage([_types.PARENT_MESSAGE_OK, result]); -} - -function reportClientError(error) { - return reportError(error, _types.PARENT_MESSAGE_CLIENT_ERROR); -} - -function reportInitializeError(error) { - return reportError(error, _types.PARENT_MESSAGE_SETUP_ERROR); -} - -function reportError(error, type) { - if (_worker_threads().isMainThread) { - throw new Error('Child can only be used on a forked process'); - } - - if (error == null) { - error = new Error('"null" or "undefined" thrown'); - } - - _worker_threads().parentPort.postMessage([ - type, - error.constructor && error.constructor.name, - error.message, - error.stack, - typeof error === 'object' ? _objectSpread({}, error) : error - ]); -} - -function end() { - const main = require(file); - - if (!main.teardown) { - exitProcess(); - return; - } - - execFunction(main.teardown, main, [], exitProcess, exitProcess); -} - -function exitProcess() { - process.exit(0); -} - -function execMethod(method, args) { - const main = require(file); - - let fn; - - if (method === 'default') { - fn = main.__esModule ? main['default'] : main; - } else { - fn = main[method]; - } - - function execHelper() { - execFunction(fn, main, args, reportSuccess, reportClientError); - } - - if (initialized || !main.setup) { - execHelper(); - return; - } - - initialized = true; - execFunction(main.setup, main, setupArgs, execHelper, reportInitializeError); -} - -function execFunction(fn, ctx, args, onResult, onError) { - let result; - - try { - result = fn.apply(ctx, args); - } catch (err) { - onError(err); - return; - } - - if (result && typeof result.then === 'function') { - result.then(onResult, onError); - } else { - onResult(result); - } -} diff --git a/node_modules/jest-worker/node_modules/supports-color/browser.js b/node_modules/jest-worker/node_modules/supports-color/browser.js deleted file mode 100644 index 62afa3a7..00000000 --- a/node_modules/jest-worker/node_modules/supports-color/browser.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; -module.exports = { - stdout: false, - stderr: false -}; diff --git a/node_modules/jest-worker/node_modules/supports-color/index.js b/node_modules/jest-worker/node_modules/supports-color/index.js deleted file mode 100644 index 0477d300..00000000 --- a/node_modules/jest-worker/node_modules/supports-color/index.js +++ /dev/null @@ -1,138 +0,0 @@ -'use strict'; -const os = require('os'); -const hasFlag = require('has-flag'); - -const {env} = process; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false') || - hasFlag('color=never')) { - forceColor = 0; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = 1; -} -if ('FORCE_COLOR' in env) { - if (env.FORCE_COLOR === true || env.FORCE_COLOR === 'true') { - forceColor = 1; - } else if (env.FORCE_COLOR === false || env.FORCE_COLOR === 'false') { - forceColor = 0; - } else { - forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); - } -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(stream) { - if (forceColor === 0) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (stream && !stream.isTTY && forceColor === undefined) { - return 0; - } - - const min = forceColor || 0; - - if (env.TERM === 'dumb') { - return min; - } - - if (process.platform === 'win32') { - // Node.js 7.5.0 is the first version of Node.js to include a patch to - // libuv that enables 256 color output on Windows. Anything earlier and it - // won't work. However, here we target Node.js 8 at minimum as it is an LTS - // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows - // release that supports 256 colors. Windows 10 build 14931 is the first release - // that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(process.versions.node.split('.')[0]) >= 8 && - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - - if (env.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - return min; -} - -function getSupportLevel(stream) { - const level = supportsColor(stream); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr) -}; diff --git a/node_modules/jest-worker/node_modules/supports-color/license b/node_modules/jest-worker/node_modules/supports-color/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/jest-worker/node_modules/supports-color/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/jest-worker/node_modules/supports-color/package.json b/node_modules/jest-worker/node_modules/supports-color/package.json deleted file mode 100644 index 859f811e..00000000 --- a/node_modules/jest-worker/node_modules/supports-color/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_args": [ - [ - "supports-color@6.1.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "supports-color@6.1.0", - "_id": "supports-color@6.1.0", - "_inBundle": false, - "_integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "_location": "/jest-worker/supports-color", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "supports-color@6.1.0", - "name": "supports-color", - "escapedName": "supports-color", - "rawSpec": "6.1.0", - "saveSpec": null, - "fetchSpec": "6.1.0" - }, - "_requiredBy": [ - "/jest-worker" - ], - "_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "_spec": "6.1.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "browser": "browser.js", - "bugs": { - "url": "https://github.com/chalk/supports-color/issues" - }, - "dependencies": { - "has-flag": "^3.0.0" - }, - "description": "Detect whether a terminal supports color", - "devDependencies": { - "ava": "^0.25.0", - "import-fresh": "^2.0.0", - "xo": "^0.23.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "browser.js" - ], - "homepage": "https://github.com/chalk/supports-color#readme", - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "supports", - "capability", - "detect", - "truecolor", - "16m" - ], - "license": "MIT", - "name": "supports-color", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/supports-color.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "6.1.0" -} diff --git a/node_modules/jest-worker/node_modules/supports-color/readme.md b/node_modules/jest-worker/node_modules/supports-color/readme.md deleted file mode 100644 index d4cc58a6..00000000 --- a/node_modules/jest-worker/node_modules/supports-color/readme.md +++ /dev/null @@ -1,85 +0,0 @@ -# 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 - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
- ---- - - -## Install - -``` -$ npm install supports-color -``` - - -## Usage - -```js -const supportsColor = require('supports-color'); - -if (supportsColor.stdout) { - console.log('Terminal stdout supports color'); -} - -if (supportsColor.stdout.has256) { - console.log('Terminal stdout supports 256 colors'); -} - -if (supportsColor.stderr.has16m) { - console.log('Terminal stderr supports 16 million colors (truecolor)'); -} -``` - - -## API - -Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported. - -The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag: - -- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors) -- `.level = 2` and `.has256 = true`: 256 color support -- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors) - - -## Info - -It obeys the `--color` and `--no-color` CLI flags. - -For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. - -Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## 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 - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/jest-worker/package.json b/node_modules/jest-worker/package.json deleted file mode 100644 index 13cd4fdd..00000000 --- a/node_modules/jest-worker/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_args": [ - [ - "jest-worker@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-worker@24.9.0", - "_id": "jest-worker@24.9.0", - "_inBundle": false, - "_integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", - "_location": "/jest-worker", - "_phantomChildren": { - "has-flag": "3.0.0" - }, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-worker@24.9.0", - "name": "jest-worker", - "escapedName": "jest-worker", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/@jest/reporters", - "/jest-haste-map", - "/jest-runner" - ], - "_resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "merge-stream": "^2.0.0", - "supports-color": "^6.1.0" - }, - "description": "Module for executing heavy tasks under forked processes in parallel, by providing a `Promise` based interface, minimum overhead, and bound workers.", - "devDependencies": { - "@types/merge-stream": "^1.1.2", - "@types/supports-color": "^5.3.0", - "get-stream": "^4.1.0", - "worker-farm": "^1.6.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://github.com/facebook/jest#readme", - "license": "MIT", - "main": "build/index.js", - "name": "jest-worker", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-worker" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest/README.md b/node_modules/jest/README.md deleted file mode 100644 index 4e02089b..00000000 --- a/node_modules/jest/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Jest - -🃏 Delightful JavaScript Testing - -- **👩🏻‍💻 Developer Ready**: Complete and ready to set-up JavaScript testing solution. Works out of the box for any React project. - -- **🏃🏽 Instant Feedback**: Failed tests run first. Fast interactive mode can switch between running all tests or only test files related to changed files. - -- **📸 Snapshot Testing**: Jest can [capture snapshots](https://jestjs.io/docs/snapshot-testing.html) of React trees or other serializable values to simplify UI testing. - -Read More: https://jestjs.io/ diff --git a/node_modules/jest/bin/jest.js b/node_modules/jest/bin/jest.js deleted file mode 100644 index 4a828880..00000000 --- a/node_modules/jest/bin/jest.js +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env node -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const importLocal = require('import-local'); - -if (!importLocal(__filename)) { - require('jest-cli/bin/jest'); -} diff --git a/node_modules/jest/build/jest.d.ts b/node_modules/jest/build/jest.d.ts deleted file mode 100644 index 21b28bae..00000000 --- a/node_modules/jest/build/jest.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import * as cli from 'jest-cli'; -export = cli; -//# sourceMappingURL=jest.d.ts.map \ No newline at end of file diff --git a/node_modules/jest/build/jest.d.ts.map b/node_modules/jest/build/jest.d.ts.map deleted file mode 100644 index 90b8b46e..00000000 --- a/node_modules/jest/build/jest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jest.d.ts","sourceRoot":"","sources":["../src/jest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAEhC,SAAS,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/jest/build/jest.js b/node_modules/jest/build/jest.js deleted file mode 100644 index d721a3cd..00000000 --- a/node_modules/jest/build/jest.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -function cli() { - const data = _interopRequireWildcard(require('jest-cli')); - - cli = function cli() { - return data; - }; - - return data; -} - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -module.exports = cli(); diff --git a/node_modules/jest/node_modules/.bin/jest b/node_modules/jest/node_modules/.bin/jest deleted file mode 100644 index 88d7b6d9..00000000 --- a/node_modules/jest/node_modules/.bin/jest +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../jest-cli/bin/jest.js" "$@" - ret=$? -else - node "$basedir/../jest-cli/bin/jest.js" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/jest/node_modules/.bin/jest.cmd b/node_modules/jest/node_modules/.bin/jest.cmd deleted file mode 100644 index 2cb058fa..00000000 --- a/node_modules/jest/node_modules/.bin/jest.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\jest-cli\bin\jest.js" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\jest-cli\bin\jest.js" %* -) \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/README.md b/node_modules/jest/node_modules/jest-cli/README.md deleted file mode 100644 index 4e02089b..00000000 --- a/node_modules/jest/node_modules/jest-cli/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Jest - -🃏 Delightful JavaScript Testing - -- **👩🏻‍💻 Developer Ready**: Complete and ready to set-up JavaScript testing solution. Works out of the box for any React project. - -- **🏃🏽 Instant Feedback**: Failed tests run first. Fast interactive mode can switch between running all tests or only test files related to changed files. - -- **📸 Snapshot Testing**: Jest can [capture snapshots](https://jestjs.io/docs/snapshot-testing.html) of React trees or other serializable values to simplify UI testing. - -Read More: https://jestjs.io/ diff --git a/node_modules/jest/node_modules/jest-cli/bin/jest.js b/node_modules/jest/node_modules/jest-cli/bin/jest.js deleted file mode 100644 index fc6308c8..00000000 --- a/node_modules/jest/node_modules/jest-cli/bin/jest.js +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env node -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const importLocal = require('import-local'); - -if (!importLocal(__filename)) { - if (process.env.NODE_ENV == null) { - process.env.NODE_ENV = 'test'; - } - - require('../build/cli').run(); -} diff --git a/node_modules/jest/node_modules/jest-cli/build/cli/args.d.ts b/node_modules/jest/node_modules/jest-cli/build/cli/args.d.ts deleted file mode 100644 index 2c026b9b..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/cli/args.d.ts +++ /dev/null @@ -1,580 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -export declare const check: (argv: import("yargs").Arguments>) => boolean; -export declare const usage = "Usage: $0 [--config=] [TestPathPattern]"; -export declare const docs = "Documentation: https://jestjs.io/"; -export declare const options: { - all: { - default: undefined; - description: string; - type: "boolean"; - }; - automock: { - default: undefined; - description: string; - type: "boolean"; - }; - bail: { - alias: string; - default: undefined; - description: string; - type: "boolean"; - }; - browser: { - default: undefined; - description: string; - type: "boolean"; - }; - cache: { - default: undefined; - description: string; - type: "boolean"; - }; - cacheDirectory: { - description: string; - type: "string"; - }; - changedFilesWithAncestor: { - default: undefined; - description: string; - type: "boolean"; - }; - changedSince: { - description: string; - nargs: number; - type: "string"; - }; - ci: { - default: boolean; - description: string; - type: "boolean"; - }; - clearCache: { - default: undefined; - description: string; - type: "boolean"; - }; - clearMocks: { - default: undefined; - description: string; - type: "boolean"; - }; - collectCoverage: { - default: undefined; - description: string; - type: "boolean"; - }; - collectCoverageFrom: { - description: string; - type: "string"; - }; - collectCoverageOnlyFrom: { - description: string; - string: true; - type: "array"; - }; - color: { - default: undefined; - description: string; - type: "boolean"; - }; - colors: { - default: undefined; - description: string; - type: "boolean"; - }; - config: { - alias: string; - description: string; - type: "string"; - }; - coverage: { - default: undefined; - description: string; - type: "boolean"; - }; - coverageDirectory: { - description: string; - type: "string"; - }; - coveragePathIgnorePatterns: { - description: string; - string: true; - type: "array"; - }; - coverageReporters: { - description: string; - string: true; - type: "array"; - }; - coverageThreshold: { - description: string; - type: "string"; - }; - debug: { - default: undefined; - description: string; - type: "boolean"; - }; - detectLeaks: { - default: boolean; - description: string; - type: "boolean"; - }; - detectOpenHandles: { - default: boolean; - description: string; - type: "boolean"; - }; - env: { - description: string; - type: "string"; - }; - errorOnDeprecated: { - default: boolean; - description: string; - type: "boolean"; - }; - expand: { - alias: string; - default: undefined; - description: string; - type: "boolean"; - }; - filter: { - default: undefined; - description: string; - type: "string"; - }; - findRelatedTests: { - default: undefined; - description: string; - type: "boolean"; - }; - forceExit: { - default: undefined; - description: string; - type: "boolean"; - }; - globalSetup: { - description: string; - type: "string"; - }; - globalTeardown: { - description: string; - type: "string"; - }; - globals: { - description: string; - type: "string"; - }; - haste: { - description: string; - type: "string"; - }; - init: { - description: string; - type: "boolean"; - }; - json: { - default: undefined; - description: string; - type: "boolean"; - }; - lastCommit: { - default: undefined; - description: string; - type: "boolean"; - }; - listTests: { - default: boolean; - description: string; - type: "boolean"; - }; - logHeapUsage: { - default: undefined; - description: string; - type: "boolean"; - }; - mapCoverage: { - default: undefined; - description: string; - type: "boolean"; - }; - maxConcurrency: { - default: number; - description: string; - type: "number"; - }; - maxWorkers: { - alias: string; - description: string; - type: "string"; - }; - moduleDirectories: { - description: string; - string: true; - type: "array"; - }; - moduleFileExtensions: { - description: string; - string: true; - type: "array"; - }; - moduleNameMapper: { - description: string; - type: "string"; - }; - modulePathIgnorePatterns: { - description: string; - string: true; - type: "array"; - }; - modulePaths: { - description: string; - string: true; - type: "array"; - }; - noStackTrace: { - default: undefined; - description: string; - type: "boolean"; - }; - notify: { - default: undefined; - description: string; - type: "boolean"; - }; - notifyMode: { - default: string; - description: string; - type: "string"; - }; - onlyChanged: { - alias: string; - default: undefined; - description: string; - type: "boolean"; - }; - onlyFailures: { - alias: string; - default: undefined; - description: string; - type: "boolean"; - }; - outputFile: { - description: string; - type: "string"; - }; - passWithNoTests: { - default: boolean; - description: string; - type: "boolean"; - }; - preset: { - description: string; - type: "string"; - }; - prettierPath: { - default: undefined; - description: string; - type: "string"; - }; - projects: { - description: string; - string: true; - type: "array"; - }; - reporters: { - description: string; - string: true; - type: "array"; - }; - resetMocks: { - default: undefined; - description: string; - type: "boolean"; - }; - resetModules: { - default: undefined; - description: string; - type: "boolean"; - }; - resolver: { - description: string; - type: "string"; - }; - restoreMocks: { - default: undefined; - description: string; - type: "boolean"; - }; - rootDir: { - description: string; - type: "string"; - }; - roots: { - description: string; - string: true; - type: "array"; - }; - runInBand: { - alias: string; - default: undefined; - description: string; - type: "boolean"; - }; - runTestsByPath: { - default: boolean; - description: string; - type: "boolean"; - }; - runner: { - description: string; - type: "string"; - }; - setupFiles: { - description: string; - string: true; - type: "array"; - }; - setupFilesAfterEnv: { - description: string; - string: true; - type: "array"; - }; - showConfig: { - default: undefined; - description: string; - type: "boolean"; - }; - silent: { - default: undefined; - description: string; - type: "boolean"; - }; - skipFilter: { - default: undefined; - description: string; - type: "boolean"; - }; - snapshotSerializers: { - description: string; - string: true; - type: "array"; - }; - testEnvironment: { - description: string; - type: "string"; - }; - testEnvironmentOptions: { - description: string; - type: "string"; - }; - testFailureExitCode: { - description: string; - type: "string"; - }; - testLocationInResults: { - default: boolean; - description: string; - type: "boolean"; - }; - testMatch: { - description: string; - string: true; - type: "array"; - }; - testNamePattern: { - alias: string; - description: string; - type: "string"; - }; - testPathIgnorePatterns: { - description: string; - string: true; - type: "array"; - }; - testPathPattern: { - description: string; - string: true; - type: "array"; - }; - testRegex: { - description: string; - string: true; - type: "array"; - }; - testResultsProcessor: { - description: string; - type: "string"; - }; - testRunner: { - description: string; - type: "string"; - }; - testSequencer: { - description: string; - type: "string"; - }; - testTimeout: { - description: string; - type: "number"; - }; - testURL: { - description: string; - type: "string"; - }; - timers: { - description: string; - type: "string"; - }; - transform: { - description: string; - type: "string"; - }; - transformIgnorePatterns: { - description: string; - string: true; - type: "array"; - }; - unmockedModulePathPatterns: { - description: string; - string: true; - type: "array"; - }; - updateSnapshot: { - alias: string; - default: undefined; - description: string; - type: "boolean"; - }; - useStderr: { - default: undefined; - description: string; - type: "boolean"; - }; - verbose: { - default: undefined; - description: string; - type: "boolean"; - }; - version: { - alias: string; - default: undefined; - description: string; - type: "boolean"; - }; - watch: { - default: undefined; - description: string; - type: "boolean"; - }; - watchAll: { - default: undefined; - description: string; - type: "boolean"; - }; - watchPathIgnorePatterns: { - description: string; - string: true; - type: "array"; - }; - watchman: { - default: undefined; - description: string; - type: "boolean"; - }; -}; -//# sourceMappingURL=args.d.ts.map \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/cli/args.d.ts.map b/node_modules/jest/node_modules/jest-cli/build/cli/args.d.ts.map deleted file mode 100644 index 90f9e36d..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/cli/args.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAMH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAoDjB,CAAC;AAEF,eAAO,MAAM,KAAK,8DAC2C,CAAC;AAC9D,eAAO,MAAM,IAAI,sCAAsC,CAAC;AAExD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2oBnB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/cli/args.js b/node_modules/jest/node_modules/jest-cli/build/cli/args.js deleted file mode 100644 index bee66297..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/cli/args.js +++ /dev/null @@ -1,753 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.options = exports.docs = exports.usage = exports.check = void 0; - -function _jestConfig() { - const data = require('jest-config'); - - _jestConfig = function _jestConfig() { - return data; - }; - - return data; -} - -function _isCi() { - const data = _interopRequireDefault(require('is-ci')); - - _isCi = function _isCi() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const check = argv => { - if (argv.runInBand && argv.hasOwnProperty('maxWorkers')) { - throw new Error( - 'Both --runInBand and --maxWorkers were specified, but these two ' + - 'options do not make sense together. Which is it?' - ); - } - - var _arr = [ - 'onlyChanged', - 'lastCommit', - 'changedFilesWithAncestor', - 'changedSince' - ]; - - for (var _i = 0; _i < _arr.length; _i++) { - const key = _arr[_i]; - - if (argv[key] && argv.watchAll) { - throw new Error( - `Both --${key} and --watchAll were specified, but these two ` + - 'options do not make sense together. Try the --watch option which ' + - 'reruns only tests related to changed files.' - ); - } - } - - if (argv.findRelatedTests && argv._.length === 0) { - throw new Error( - 'The --findRelatedTests option requires file paths to be specified.\n' + - 'Example usage: jest --findRelatedTests ./src/source.js ' + - './src/index.js.' - ); - } - - if (argv.hasOwnProperty('maxWorkers') && argv.maxWorkers === undefined) { - throw new Error( - 'The --maxWorkers (-w) option requires a number or string to be specified.\n' + - 'Example usage: jest --maxWorkers 2\n' + - 'Example usage: jest --maxWorkers 50%\n' + - 'Or did you mean --watch?' - ); - } - - if ( - argv.config && - !(0, _jestConfig().isJSONString)(argv.config) && - !argv.config.match(/\.js(on)?$/) - ) { - throw new Error( - 'The --config option requires a JSON string literal, or a file path with a .js or .json extension.\n' + - 'Example usage: jest --config ./jest.config.js' - ); - } - - return true; -}; - -exports.check = check; -const usage = 'Usage: $0 [--config=] [TestPathPattern]'; -exports.usage = usage; -const docs = 'Documentation: https://jestjs.io/'; -exports.docs = docs; -const options = { - all: { - default: undefined, - description: - 'The opposite of `onlyChanged`. If `onlyChanged` is set by ' + - 'default, running jest with `--all` will force Jest to run all tests ' + - 'instead of running only tests related to changed files.', - type: 'boolean' - }, - automock: { - default: undefined, - description: 'Automock all files by default.', - type: 'boolean' - }, - bail: { - alias: 'b', - default: undefined, - description: - 'Exit the test suite immediately after `n` number of failing tests.', - type: 'boolean' - }, - browser: { - default: undefined, - description: - 'Respect the "browser" field in package.json ' + - 'when resolving modules. Some packages export different versions ' + - 'based on whether they are operating in node.js or a browser.', - type: 'boolean' - }, - cache: { - default: undefined, - description: - 'Whether to use the transform cache. Disable the cache ' + - 'using --no-cache.', - type: 'boolean' - }, - cacheDirectory: { - description: - 'The directory where Jest should store its cached ' + - ' dependency information.', - type: 'string' - }, - changedFilesWithAncestor: { - default: undefined, - description: - 'Runs tests related to the current changes and the changes made in the ' + - 'last commit. Behaves similarly to `--onlyChanged`.', - type: 'boolean' - }, - changedSince: { - description: - 'Runs tests related to the changes since the provided branch. If the ' + - 'current branch has diverged from the given branch, then only changes ' + - 'made locally will be tested. Behaves similarly to `--onlyChanged`.', - nargs: 1, - type: 'string' - }, - ci: { - default: _isCi().default, - description: - 'Whether to run Jest in continuous integration (CI) mode. ' + - 'This option is on by default in most popular CI environments. It will ' + - ' prevent snapshots from being written unless explicitly requested.', - type: 'boolean' - }, - clearCache: { - default: undefined, - description: - 'Clears the configured Jest cache directory and then exits. ' + - 'Default directory can be found by calling jest --showConfig', - type: 'boolean' - }, - clearMocks: { - default: undefined, - description: - 'Automatically clear mock calls and instances between every ' + - 'test. Equivalent to calling jest.clearAllMocks() between each test.', - type: 'boolean' - }, - collectCoverage: { - default: undefined, - description: 'Alias for --coverage.', - type: 'boolean' - }, - collectCoverageFrom: { - description: - 'A glob pattern relative to matching the files that coverage ' + - 'info needs to be collected from.', - type: 'string' - }, - collectCoverageOnlyFrom: { - description: 'Explicit list of paths coverage will be restricted to.', - string: true, - type: 'array' - }, - color: { - default: undefined, - description: - 'Forces test results output color highlighting (even if ' + - 'stdout is not a TTY). Set to false if you would like to have no colors.', - type: 'boolean' - }, - colors: { - default: undefined, - description: 'Alias for `--color`.', - type: 'boolean' - }, - config: { - alias: 'c', - description: - 'The path to a jest config file specifying how to find ' + - 'and execute tests. If no rootDir is set in the config, the directory ' + - 'containing the config file is assumed to be the rootDir for the project.' + - 'This can also be a JSON encoded value which Jest will use as configuration.', - type: 'string' - }, - coverage: { - default: undefined, - description: - 'Indicates that test coverage information should be ' + - 'collected and reported in the output.', - type: 'boolean' - }, - coverageDirectory: { - description: 'The directory where Jest should output its coverage files.', - type: 'string' - }, - coveragePathIgnorePatterns: { - description: - 'An array of regexp pattern strings that are matched ' + - 'against all file paths before executing the test. If the file path' + - 'matches any of the patterns, coverage information will be skipped.', - string: true, - type: 'array' - }, - coverageReporters: { - description: - 'A list of reporter names that Jest uses when writing ' + - 'coverage reports. Any istanbul reporter can be used.', - string: true, - type: 'array' - }, - coverageThreshold: { - description: - 'A JSON string with which will be used to configure ' + - 'minimum threshold enforcement for coverage results', - type: 'string' - }, - debug: { - default: undefined, - description: 'Print debugging info about your jest config.', - type: 'boolean' - }, - detectLeaks: { - default: false, - description: - '**EXPERIMENTAL**: Detect memory leaks in tests. After executing a ' + - 'test, it will try to garbage collect the global object used, and fail ' + - 'if it was leaked', - type: 'boolean' - }, - detectOpenHandles: { - default: false, - description: - 'Print out remaining open handles preventing Jest from exiting at the ' + - 'end of a test run. Implies `runInBand`.', - type: 'boolean' - }, - env: { - description: - 'The test environment used for all tests. This can point to ' + - 'any file or node module. Examples: `jsdom`, `node` or ' + - '`path/to/my-environment.js`', - type: 'string' - }, - errorOnDeprecated: { - default: false, - description: 'Make calling deprecated APIs throw helpful error messages.', - type: 'boolean' - }, - expand: { - alias: 'e', - default: undefined, - description: 'Use this flag to show full diffs instead of a patch.', - type: 'boolean' - }, - filter: { - default: undefined, - description: - 'Path to a module exporting a filtering function. This method receives ' + - 'a list of tests which can be manipulated to exclude tests from ' + - 'running. Especially useful when used in conjunction with a testing ' + - 'infrastructure to filter known broken tests.', - type: 'string' - }, - findRelatedTests: { - default: undefined, - description: - 'Find related tests for a list of source files that were ' + - 'passed in as arguments. Useful for pre-commit hook integration to run ' + - 'the minimal amount of tests necessary.', - type: 'boolean' - }, - forceExit: { - default: undefined, - description: - 'Force Jest to exit after all tests have completed running. ' + - 'This is useful when resources set up by test code cannot be ' + - 'adequately cleaned up.', - type: 'boolean' - }, - globalSetup: { - description: 'The path to a module that runs before All Tests.', - type: 'string' - }, - globalTeardown: { - description: 'The path to a module that runs after All Tests.', - type: 'string' - }, - globals: { - description: - 'A JSON string with map of global variables that need ' + - 'to be available in all test environments.', - type: 'string' - }, - haste: { - description: - 'A JSON string with map of variables for the haste module system', - type: 'string' - }, - init: { - description: 'Generate a basic configuration file', - type: 'boolean' - }, - json: { - default: undefined, - description: - 'Prints the test results in JSON. This mode will send all ' + - 'other test output and user messages to stderr.', - type: 'boolean' - }, - lastCommit: { - default: undefined, - description: - 'Run all tests affected by file changes in the last commit made. ' + - 'Behaves similarly to `--onlyChanged`.', - type: 'boolean' - }, - listTests: { - default: false, - description: - 'Lists all tests Jest will run given the arguments and ' + - 'exits. Most useful in a CI system together with `--findRelatedTests` ' + - 'to determine the tests Jest will run based on specific files', - type: 'boolean' - }, - logHeapUsage: { - default: undefined, - description: - 'Logs the heap usage after every test. Useful to debug ' + - 'memory leaks. Use together with `--runInBand` and `--expose-gc` in ' + - 'node.', - type: 'boolean' - }, - mapCoverage: { - default: undefined, - description: - 'Maps code coverage reports against original source code ' + - 'when transformers supply source maps.\n\nDEPRECATED', - type: 'boolean' - }, - maxConcurrency: { - default: 5, - description: - 'Specifies the maximum number of tests that are allowed to run' + - 'concurrently. This only affects tests using `test.concurrent`.', - type: 'number' - }, - maxWorkers: { - alias: 'w', - description: - 'Specifies the maximum number of workers the worker-pool ' + - 'will spawn for running tests. This defaults to the number of the ' + - 'cores available on your machine. (its usually best not to override ' + - 'this default)', - type: 'string' - }, - moduleDirectories: { - description: - 'An array of directory names to be searched recursively ' + - "up from the requiring module's location.", - string: true, - type: 'array' - }, - moduleFileExtensions: { - description: - 'An array of file extensions your modules use. If you ' + - 'require modules without specifying a file extension, these are the ' + - 'extensions Jest will look for. ', - string: true, - type: 'array' - }, - moduleNameMapper: { - description: - 'A JSON string with a map from regular expressions to ' + - 'module names that allow to stub out resources, like images or ' + - 'styles with a single module', - type: 'string' - }, - modulePathIgnorePatterns: { - description: - 'An array of regexp pattern strings that are matched ' + - 'against all module paths before those paths are to be considered ' + - '"visible" to the module loader.', - string: true, - type: 'array' - }, - modulePaths: { - description: - 'An alternative API to setting the NODE_PATH env variable, ' + - 'modulePaths is an array of absolute paths to additional locations to ' + - 'search when resolving modules.', - string: true, - type: 'array' - }, - noStackTrace: { - default: undefined, - description: 'Disables stack trace in test results output', - type: 'boolean' - }, - notify: { - default: undefined, - description: 'Activates notifications for test results.', - type: 'boolean' - }, - notifyMode: { - default: 'failure-change', - description: 'Specifies when notifications will appear for test results.', - type: 'string' - }, - onlyChanged: { - alias: 'o', - default: undefined, - description: - 'Attempts to identify which tests to run based on which ' + - "files have changed in the current repository. Only works if you're " + - 'running tests in a git or hg repository at the moment.', - type: 'boolean' - }, - onlyFailures: { - alias: 'f', - default: undefined, - description: 'Run tests that failed in the previous execution.', - type: 'boolean' - }, - outputFile: { - description: - 'Write test results to a file when the --json option is ' + - 'also specified.', - type: 'string' - }, - passWithNoTests: { - default: false, - description: - 'Will not fail if no tests are found (for example while using `--testPathPattern`.)', - type: 'boolean' - }, - preset: { - description: "A preset that is used as a base for Jest's configuration.", - type: 'string' - }, - prettierPath: { - default: undefined, - description: 'The path to the "prettier" module used for inline snapshots.', - type: 'string' - }, - projects: { - description: - 'A list of projects that use Jest to run all tests of all ' + - 'projects in a single instance of Jest.', - string: true, - type: 'array' - }, - reporters: { - description: 'A list of custom reporters for the test suite.', - string: true, - type: 'array' - }, - resetMocks: { - default: undefined, - description: - 'Automatically reset mock state between every test. ' + - 'Equivalent to calling jest.resetAllMocks() between each test.', - type: 'boolean' - }, - resetModules: { - default: undefined, - description: - 'If enabled, the module registry for every test file will ' + - 'be reset before running each individual test.', - type: 'boolean' - }, - resolver: { - description: 'A JSON string which allows the use of a custom resolver.', - type: 'string' - }, - restoreMocks: { - default: undefined, - description: - 'Automatically restore mock state and implementation between every test. ' + - 'Equivalent to calling jest.restoreAllMocks() between each test.', - type: 'boolean' - }, - rootDir: { - description: - 'The root directory that Jest should scan for tests and ' + - 'modules within.', - type: 'string' - }, - roots: { - description: - 'A list of paths to directories that Jest should use to ' + - 'search for files in.', - string: true, - type: 'array' - }, - runInBand: { - alias: 'i', - default: undefined, - description: - 'Run all tests serially in the current process (rather than ' + - 'creating a worker pool of child processes that run tests). This ' + - 'is sometimes useful for debugging, but such use cases are pretty ' + - 'rare.', - type: 'boolean' - }, - runTestsByPath: { - default: false, - description: - 'Used when provided patterns are exact file paths. This avoids ' + - 'converting them into a regular expression and matching it against ' + - 'every single file.', - type: 'boolean' - }, - runner: { - description: - "Allows to use a custom runner instead of Jest's default test runner.", - type: 'string' - }, - setupFiles: { - description: - 'A list of paths to modules that run some code to configure or ' + - 'set up the testing environment before each test. ', - string: true, - type: 'array' - }, - setupFilesAfterEnv: { - description: - 'A list of paths to modules that run some code to configure or ' + - 'set up the testing framework before each test ', - string: true, - type: 'array' - }, - showConfig: { - default: undefined, - description: 'Print your jest config and then exits.', - type: 'boolean' - }, - silent: { - default: undefined, - description: 'Prevent tests from printing messages through the console.', - type: 'boolean' - }, - skipFilter: { - default: undefined, - description: - 'Disables the filter provided by --filter. Useful for CI jobs, or ' + - 'local enforcement when fixing tests.', - type: 'boolean' - }, - snapshotSerializers: { - description: - 'A list of paths to snapshot serializer modules Jest should ' + - 'use for snapshot testing.', - string: true, - type: 'array' - }, - testEnvironment: { - description: 'Alias for --env', - type: 'string' - }, - testEnvironmentOptions: { - description: - 'Test environment options that will be passed to the testEnvironment. ' + - 'The relevant options depend on the environment.', - type: 'string' // Object - }, - testFailureExitCode: { - description: 'Exit code of `jest` command if the test run failed', - type: 'string' // number - }, - testLocationInResults: { - default: false, - description: 'Add `location` information to the test results', - type: 'boolean' - }, - testMatch: { - description: 'The glob patterns Jest uses to detect test files.', - string: true, - type: 'array' - }, - testNamePattern: { - alias: 't', - description: 'Run only tests with a name that matches the regex pattern.', - type: 'string' - }, - testPathIgnorePatterns: { - description: - 'An array of regexp pattern strings that are matched ' + - 'against all test paths before executing the test. If the test path ' + - 'matches any of the patterns, it will be skipped.', - string: true, - type: 'array' - }, - testPathPattern: { - description: - 'A regexp pattern string that is matched against all tests ' + - 'paths before executing the test.', - string: true, - type: 'array' - }, - testRegex: { - description: - 'A string or array of string regexp patterns that Jest uses to detect test files.', - string: true, - type: 'array' - }, - testResultsProcessor: { - description: - 'Allows the use of a custom results processor. ' + - 'This processor must be a node module that exports ' + - 'a function expecting as the first argument the result object.', - type: 'string' - }, - testRunner: { - description: - 'Allows to specify a custom test runner. The default is ' + - ' `jasmine2`. A path to a custom test runner can be provided: ' + - '`/path/to/testRunner.js`.', - type: 'string' - }, - testSequencer: { - description: - 'Allows to specify a custom test sequencer. The default is ' + - '`@jest/test-sequencer`. A path to a custom test sequencer can be ' + - 'provided: `/path/to/testSequencer.js`', - type: 'string' - }, - testTimeout: { - description: 'This option sets the default timeouts of test cases.', - type: 'number' - }, - testURL: { - description: 'This option sets the URL for the jsdom environment.', - type: 'string' - }, - timers: { - description: - 'Setting this value to fake allows the use of fake timers ' + - 'for functions such as setTimeout.', - type: 'string' - }, - transform: { - description: - 'A JSON string which maps from regular expressions to paths ' + - 'to transformers.', - type: 'string' - }, - transformIgnorePatterns: { - description: - 'An array of regexp pattern strings that are matched ' + - 'against all source file paths before transformation.', - string: true, - type: 'array' - }, - unmockedModulePathPatterns: { - description: - 'An array of regexp pattern strings that are matched ' + - 'against all modules before the module loader will automatically ' + - 'return a mock for them.', - string: true, - type: 'array' - }, - updateSnapshot: { - alias: 'u', - default: undefined, - description: - 'Use this flag to re-record snapshots. ' + - 'Can be used together with a test suite pattern or with ' + - '`--testNamePattern` to re-record snapshot for test matching ' + - 'the pattern', - type: 'boolean' - }, - useStderr: { - default: undefined, - description: 'Divert all output to stderr.', - type: 'boolean' - }, - verbose: { - default: undefined, - description: - 'Display individual test results with the test suite hierarchy.', - type: 'boolean' - }, - version: { - alias: 'v', - default: undefined, - description: 'Print the version and exit', - type: 'boolean' - }, - watch: { - default: undefined, - description: - 'Watch files for changes and rerun tests related to ' + - 'changed files. If you want to re-run all tests when a file has ' + - 'changed, use the `--watchAll` option.', - type: 'boolean' - }, - watchAll: { - default: undefined, - description: - 'Watch files for changes and rerun all tests. If you want ' + - 'to re-run only the tests related to the changed files, use the ' + - '`--watch` option.', - type: 'boolean' - }, - watchPathIgnorePatterns: { - description: - 'An array of regexp pattern strings that are matched ' + - 'against all paths before trigger test re-run in watch mode. ' + - 'If the test path matches any of the patterns, it will be skipped.', - string: true, - type: 'array' - }, - watchman: { - default: undefined, - description: - 'Whether to use watchman for file crawling. Disable using ' + - '--no-watchman.', - type: 'boolean' - } -}; -exports.options = options; diff --git a/node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts b/node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts deleted file mode 100644 index ca138d85..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import yargs from 'yargs'; -export declare function run(maybeArgv?: Array, project?: Config.Path): Promise; -export declare const buildArgv: (maybeArgv?: string[] | undefined) => yargs.Arguments>; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts.map b/node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts.map deleted file mode 100644 index 32fac6df..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/cli/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAQnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,wBAAsB,GAAG,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,iBAyBzE;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCrB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/cli/index.js b/node_modules/jest/node_modules/jest-cli/build/cli/index.js deleted file mode 100644 index 621799fe..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/cli/index.js +++ /dev/null @@ -1,325 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.run = run; -exports.buildArgv = void 0; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _jestValidate() { - const data = require('jest-validate'); - - _jestValidate = function _jestValidate() { - return data; - }; - - return data; -} - -function _jestConfig() { - const data = require('jest-config'); - - _jestConfig = function _jestConfig() { - return data; - }; - - return data; -} - -function _core() { - const data = require('@jest/core'); - - _core = function _core() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _exit() { - const data = _interopRequireDefault(require('exit')); - - _exit = function _exit() { - return data; - }; - - return data; -} - -function _yargs() { - const data = _interopRequireDefault(require('yargs')); - - _yargs = function _yargs() { - return data; - }; - - return data; -} - -function _realpathNative() { - const data = require('realpath-native'); - - _realpathNative = function _realpathNative() { - return data; - }; - - return data; -} - -var _init = _interopRequireDefault(require('../init')); - -var args = _interopRequireWildcard(require('./args')); - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat( - Object.getOwnPropertySymbols(source).filter(function(sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - }) - ); - } - ownKeys.forEach(function(key) { - _defineProperty(target, key, source[key]); - }); - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -function run(_x, _x2) { - return _run.apply(this, arguments); -} - -function _run() { - _run = _asyncToGenerator(function*(maybeArgv, project) { - try { - const argv = buildArgv(maybeArgv); - - if (argv.init) { - yield (0, _init.default)(); - return; - } - - const projects = getProjectListFromCLIArgs(argv, project); - - const _ref = yield (0, _core().runCLI)(argv, projects), - results = _ref.results, - globalConfig = _ref.globalConfig; - - readResultsAndExit(results, globalConfig); - } catch (error) { - (0, _jestUtil().clearLine)(process.stderr); - (0, _jestUtil().clearLine)(process.stdout); - - if (error.stack) { - console.error(_chalk().default.red(error.stack)); - } else { - console.error(_chalk().default.red(error)); - } - - (0, _exit().default)(1); - throw error; - } - }); - return _run.apply(this, arguments); -} - -const buildArgv = maybeArgv => { - const version = - (0, _core().getVersion)() + - (__dirname.includes(`packages${_path().default.sep}jest-cli`) - ? '-dev' - : ''); - const rawArgv = maybeArgv || process.argv.slice(2); - const argv = (0, _yargs().default)(rawArgv) - .usage(args.usage) - .version(version) - .alias('help', 'h') - .options(args.options) - .epilogue(args.docs) - .check(args.check).argv; - (0, _jestValidate().validateCLIOptions)( - argv, - _objectSpread({}, args.options, { - deprecationEntries: _jestConfig().deprecationEntries - }), // strip leading dashes - Array.isArray(rawArgv) - ? rawArgv.map(rawArgv => rawArgv.replace(/^--?/, '')) - : Object.keys(rawArgv) - ); // strip dashed args - - return Object.keys(argv).reduce((result, key) => { - if (!key.includes('-')) { - result[key] = argv[key]; - } - - return result; - }, {}); -}; - -exports.buildArgv = buildArgv; - -const getProjectListFromCLIArgs = (argv, project) => { - const projects = argv.projects ? argv.projects : []; - - if (project) { - projects.push(project); - } - - if (!projects.length && process.platform === 'win32') { - try { - projects.push((0, _realpathNative().sync)(process.cwd())); - } catch (err) { - // do nothing, just catch error - // process.binding('fs').realpath can throw, e.g. on mapped drives - } - } - - if (!projects.length) { - projects.push(process.cwd()); - } - - return projects; -}; - -const readResultsAndExit = (result, globalConfig) => { - const code = !result || result.success ? 0 : globalConfig.testFailureExitCode; // Only exit if needed - - process.on('exit', () => { - if (typeof code === 'number' && code !== 0) { - process.exitCode = code; - } - }); - - if (globalConfig.forceExit) { - if (!globalConfig.detectOpenHandles) { - console.warn( - _chalk().default.bold('Force exiting Jest: ') + - 'Have you considered using `--detectOpenHandles` to detect ' + - 'async operations that kept running after all tests finished?' - ); - } - - (0, _exit().default)(code); - } else if (!globalConfig.detectOpenHandles) { - setTimeout(() => { - console.warn( - _chalk().default.yellow.bold( - 'Jest did not exit one second after the test run has completed.\n\n' - ) + - _chalk().default.yellow( - 'This usually means that there are asynchronous operations that ' + - "weren't stopped in your tests. Consider running Jest with " + - '`--detectOpenHandles` to troubleshoot this issue.' - ) - ); - }, 1000).unref(); - } -}; diff --git a/node_modules/jest/node_modules/jest-cli/build/index.d.ts b/node_modules/jest/node_modules/jest-cli/build/index.d.ts deleted file mode 100644 index 98ce3b40..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/index.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { getVersion, SearchSource, TestScheduler, TestWatcher } from '@jest/core'; -import { run } from './cli'; -declare const _default: { - SearchSource: typeof SearchSource; - TestScheduler: typeof TestScheduler; - TestWatcher: typeof TestWatcher; - getVersion: typeof getVersion; - run: typeof run; - runCLI: (argv: import("yargs").Arguments>, projects: string[]) => Promise<{ - results: import("@jest/test-result").AggregatedResult; - globalConfig: import("@jest/types/build/Config").GlobalConfig; - }>; -}; -export = _default; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/index.d.ts.map b/node_modules/jest/node_modules/jest-cli/build/index.d.ts.map deleted file mode 100644 index 26c74a7c..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EACL,UAAU,EAEV,YAAY,EACZ,aAAa,EACb,WAAW,EACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE1B,kBAOE"} \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/index.js b/node_modules/jest/node_modules/jest-cli/build/index.js deleted file mode 100644 index 4063b36b..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/index.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -function _core() { - const data = require('@jest/core'); - - _core = function _core() { - return data; - }; - - return data; -} - -var _cli = require('./cli'); - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -// TODO: remove @jest/core exports for the next major -module.exports = { - SearchSource: _core().SearchSource, - TestScheduler: _core().TestScheduler, - TestWatcher: _core().TestWatcher, - getVersion: _core().getVersion, - run: _cli.run, - runCLI: _core().runCLI -}; diff --git a/node_modules/jest/node_modules/jest-cli/build/init/constants.d.ts b/node_modules/jest/node_modules/jest-cli/build/init/constants.d.ts deleted file mode 100644 index 0a726888..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/constants.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare const PACKAGE_JSON = "package.json"; -export declare const JEST_CONFIG = "jest.config.js"; -//# sourceMappingURL=constants.d.ts.map \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/init/constants.d.ts.map b/node_modules/jest/node_modules/jest-cli/build/init/constants.d.ts.map deleted file mode 100644 index bce48d46..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/constants.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/init/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,WAAW,mBAAmB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/init/constants.js b/node_modules/jest/node_modules/jest-cli/build/init/constants.js deleted file mode 100644 index 900f23ec..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/constants.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.JEST_CONFIG = exports.PACKAGE_JSON = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const PACKAGE_JSON = 'package.json'; -exports.PACKAGE_JSON = PACKAGE_JSON; -const JEST_CONFIG = 'jest.config.js'; -exports.JEST_CONFIG = JEST_CONFIG; diff --git a/node_modules/jest/node_modules/jest-cli/build/init/errors.d.ts b/node_modules/jest/node_modules/jest-cli/build/init/errors.d.ts deleted file mode 100644 index 54dfc65c..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/errors.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export declare class NotFoundPackageJsonError extends Error { - constructor(rootDir: string); -} -export declare class MalformedPackageJsonError extends Error { - constructor(packageJsonPath: string); -} -//# sourceMappingURL=errors.d.ts.map \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/init/errors.d.ts.map b/node_modules/jest/node_modules/jest-cli/build/init/errors.d.ts.map deleted file mode 100644 index 6b97d292..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/errors.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/init/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,OAAO,EAAE,MAAM;CAK5B;AAED,qBAAa,yBAA0B,SAAQ,KAAK;gBACtC,eAAe,EAAE,MAAM;CAQpC"} \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/init/errors.js b/node_modules/jest/node_modules/jest-cli/build/init/errors.js deleted file mode 100644 index eed7c8a6..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/errors.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.MalformedPackageJsonError = exports.NotFoundPackageJsonError = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -class NotFoundPackageJsonError extends Error { - constructor(rootDir) { - super(`Could not find a "package.json" file in ${rootDir}`); - this.name = ''; - Error.captureStackTrace(this, () => {}); - } -} - -exports.NotFoundPackageJsonError = NotFoundPackageJsonError; - -class MalformedPackageJsonError extends Error { - constructor(packageJsonPath) { - super( - `There is malformed json in ${packageJsonPath}\n` + - 'Fix it, and then run "jest --init"' - ); - this.name = ''; - Error.captureStackTrace(this, () => {}); - } -} - -exports.MalformedPackageJsonError = MalformedPackageJsonError; diff --git a/node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts b/node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts deleted file mode 100644 index 8d9f6b13..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare const generateConfigFile: (results: Record) => string; -export default generateConfigFile; -//# sourceMappingURL=generate_config_file.d.ts.map \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts.map b/node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts.map deleted file mode 100644 index 662504b7..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generate_config_file.d.ts","sourceRoot":"","sources":["../../src/init/generate_config_file.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA4BH,QAAA,MAAM,kBAAkB,8CAgDvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.js b/node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.js deleted file mode 100644 index 44952dc9..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/generate_config_file.js +++ /dev/null @@ -1,89 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _jestConfig() { - const data = require('jest-config'); - - _jestConfig = function _jestConfig() { - return data; - }; - - return data; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const stringifyOption = (option, map, linePrefix = '') => { - const optionDescription = ` // ${_jestConfig().descriptions[option]}`; - const stringifiedObject = `${option}: ${JSON.stringify( - map[option], - null, - 2 - )}`; - return ( - optionDescription + - '\n' + - stringifiedObject - .split('\n') - .map(line => ' ' + linePrefix + line) - .join('\n') + - ',\n' - ); -}; - -const generateConfigFile = results => { - const coverage = results.coverage, - clearMocks = results.clearMocks, - environment = results.environment; - const overrides = {}; - - if (coverage) { - Object.assign(overrides, { - coverageDirectory: 'coverage' - }); - } - - if (environment === 'node') { - Object.assign(overrides, { - testEnvironment: 'node' - }); - } - - if (clearMocks) { - Object.assign(overrides, { - clearMocks: true - }); - } - - const overrideKeys = Object.keys(overrides); - const properties = []; - - for (const option in _jestConfig().descriptions) { - const opt = option; - - if (overrideKeys.includes(opt)) { - properties.push(stringifyOption(opt, overrides)); - } else { - properties.push(stringifyOption(opt, _jestConfig().defaults, '// ')); - } - } - - return ( - '// For a detailed explanation regarding each configuration property, visit:\n' + - '// https://jestjs.io/docs/en/configuration.html\n\n' + - 'module.exports = {\n' + - properties.join('\n') + - '};\n' - ); -}; - -var _default = generateConfigFile; -exports.default = _default; diff --git a/node_modules/jest/node_modules/jest-cli/build/init/index.d.ts b/node_modules/jest/node_modules/jest-cli/build/init/index.d.ts deleted file mode 100644 index 49539d7e..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -declare const _default: (rootDir?: string) => Promise; -export default _default; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/init/index.d.ts.map b/node_modules/jest/node_modules/jest-cli/build/init/index.d.ts.map deleted file mode 100644 index d92d8a36..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/init/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAqBH,wBAmGE"} \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/init/index.js b/node_modules/jest/node_modules/jest-cli/build/init/index.js deleted file mode 100644 index cae2fc28..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/index.js +++ /dev/null @@ -1,255 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _fs() { - const data = _interopRequireDefault(require('fs')); - - _fs = function _fs() { - return data; - }; - - return data; -} - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _prompts() { - const data = _interopRequireDefault(require('prompts')); - - _prompts = function _prompts() { - return data; - }; - - return data; -} - -function _realpathNative() { - const data = require('realpath-native'); - - _realpathNative = function _realpathNative() { - return data; - }; - - return data; -} - -var _questions = _interopRequireWildcard(require('./questions')); - -var _errors = require('./errors'); - -var _constants = require('./constants'); - -var _generate_config_file = _interopRequireDefault( - require('./generate_config_file') -); - -var _modify_package_json = _interopRequireDefault( - require('./modify_package_json') -); - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = - Object.defineProperty && Object.getOwnPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : {}; - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - newObj.default = obj; - return newObj; - } -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -var _default = - /*#__PURE__*/ - (function() { - var _ref = _asyncToGenerator(function*( - rootDir = (0, _realpathNative().sync)(process.cwd()) - ) { - // prerequisite checks - const projectPackageJsonPath = _path().default.join( - rootDir, - _constants.PACKAGE_JSON - ); - - const jestConfigPath = _path().default.join( - rootDir, - _constants.JEST_CONFIG - ); - - if (!_fs().default.existsSync(projectPackageJsonPath)) { - throw new _errors.NotFoundPackageJsonError(rootDir); - } - - const questions = _questions.default.slice(0); - - let hasJestProperty = false; - let hasJestConfig = false; - let projectPackageJson; - - try { - projectPackageJson = JSON.parse( - _fs().default.readFileSync(projectPackageJsonPath, 'utf-8') - ); - } catch (error) { - throw new _errors.MalformedPackageJsonError(projectPackageJsonPath); - } - - if (projectPackageJson.jest) { - hasJestProperty = true; - } - - if (_fs().default.existsSync(jestConfigPath)) { - hasJestConfig = true; - } - - if (hasJestProperty || hasJestConfig) { - const result = yield (0, _prompts().default)({ - initial: true, - message: - 'It seems that you already have a jest configuration, do you want to override it?', - name: 'continue', - type: 'confirm' - }); - - if (!result.continue) { - console.log(); - console.log('Aborting...'); - return; - } - } // Add test script installation only if needed - - if ( - !projectPackageJson.scripts || - projectPackageJson.scripts.test !== 'jest' - ) { - questions.unshift(_questions.testScriptQuestion); - } // Start the init process - - console.log(); - console.log( - _chalk().default.underline( - `The following questions will help Jest to create a suitable configuration for your project\n` - ) - ); - let promptAborted = false; // @ts-ignore: Return type cannot be object - faulty typings - - const results = yield (0, _prompts().default)(questions, { - onCancel: () => { - promptAborted = true; - } - }); - - if (promptAborted) { - console.log(); - console.log('Aborting...'); - return; - } - - const shouldModifyScripts = results.scripts; - - if (shouldModifyScripts || hasJestProperty) { - const modifiedPackageJson = (0, _modify_package_json.default)({ - projectPackageJson, - shouldModifyScripts - }); - - _fs().default.writeFileSync( - projectPackageJsonPath, - modifiedPackageJson - ); - - console.log(''); - console.log( - `✏️ Modified ${_chalk().default.cyan(projectPackageJsonPath)}` - ); - } - - const generatedConfig = (0, _generate_config_file.default)(results); - - _fs().default.writeFileSync(jestConfigPath, generatedConfig); - - console.log(''); - console.log( - `📝 Configuration file created at ${_chalk().default.cyan( - jestConfigPath - )}` - ); - }); - - return function() { - return _ref.apply(this, arguments); - }; - })(); - -exports.default = _default; diff --git a/node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.d.ts b/node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.d.ts deleted file mode 100644 index 021e5cee..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { ProjectPackageJson } from './types'; -declare const modifyPackageJson: ({ projectPackageJson, shouldModifyScripts, }: { - projectPackageJson: ProjectPackageJson; - shouldModifyScripts: boolean; -}) => string; -export default modifyPackageJson; -//# sourceMappingURL=modify_package_json.d.ts.map \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.d.ts.map b/node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.d.ts.map deleted file mode 100644 index b9f0b588..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"modify_package_json.d.ts","sourceRoot":"","sources":["../../src/init/modify_package_json.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AAE3C,QAAA,MAAM,iBAAiB;;;YAgBtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.js b/node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.js deleted file mode 100644 index 526b485b..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/modify_package_json.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const modifyPackageJson = ({projectPackageJson, shouldModifyScripts}) => { - if (shouldModifyScripts) { - projectPackageJson.scripts - ? (projectPackageJson.scripts.test = 'jest') - : (projectPackageJson.scripts = { - test: 'jest' - }); - } - - delete projectPackageJson.jest; - return JSON.stringify(projectPackageJson, null, 2) + '\n'; -}; - -var _default = modifyPackageJson; -exports.default = _default; diff --git a/node_modules/jest/node_modules/jest-cli/build/init/questions.d.ts b/node_modules/jest/node_modules/jest-cli/build/init/questions.d.ts deleted file mode 100644 index 4b156aa8..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/questions.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { PromptObject } from 'prompts'; -declare const defaultQuestions: Array; -export default defaultQuestions; -export declare const testScriptQuestion: PromptObject; -//# sourceMappingURL=questions.d.ts.map \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/init/questions.d.ts.map b/node_modules/jest/node_modules/jest-cli/build/init/questions.d.ts.map deleted file mode 100644 index d34d0159..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/questions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"questions.d.ts","sourceRoot":"","sources":["../../src/init/questions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AAErC,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,YAAY,CAuBzC,CAAC;AAEF,eAAe,gBAAgB,CAAC;AAEhC,eAAO,MAAM,kBAAkB,EAAE,YAMhC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/init/questions.js b/node_modules/jest/node_modules/jest-cli/build/init/questions.js deleted file mode 100644 index e4790b96..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/questions.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.testScriptQuestion = exports.default = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const defaultQuestions = [ - { - choices: [ - { - title: 'node', - value: 'node' - }, - { - title: 'jsdom (browser-like)', - value: 'jsdom' - } - ], - initial: 0, - message: 'Choose the test environment that will be used for testing', - name: 'environment', - type: 'select' - }, - { - initial: false, - message: 'Do you want Jest to add coverage reports?', - name: 'coverage', - type: 'confirm' - }, - { - initial: false, - message: 'Automatically clear mock calls and instances between every test?', - name: 'clearMocks', - type: 'confirm' - } -]; -var _default = defaultQuestions; -exports.default = _default; -const testScriptQuestion = { - initial: true, - message: - 'Would you like to use Jest when running "test" script in "package.json"?', - name: 'scripts', - type: 'confirm' -}; -exports.testScriptQuestion = testScriptQuestion; diff --git a/node_modules/jest/node_modules/jest-cli/build/init/types.d.ts b/node_modules/jest/node_modules/jest-cli/build/init/types.d.ts deleted file mode 100644 index a0baea1a..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/types.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -export declare type ProjectPackageJson = { - jest?: Partial; - scripts?: Record; -}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/init/types.d.ts.map b/node_modules/jest/node_modules/jest-cli/build/init/types.d.ts.map deleted file mode 100644 index 3cb8ed91..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/init/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,oBAAY,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC,CAAC"} \ No newline at end of file diff --git a/node_modules/jest/node_modules/jest-cli/build/init/types.js b/node_modules/jest/node_modules/jest-cli/build/init/types.js deleted file mode 100644 index ad9a93a7..00000000 --- a/node_modules/jest/node_modules/jest-cli/build/init/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/node_modules/jest/node_modules/jest-cli/package.json b/node_modules/jest/node_modules/jest-cli/package.json deleted file mode 100644 index 241336c5..00000000 --- a/node_modules/jest/node_modules/jest-cli/package.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "_args": [ - [ - "jest-cli@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest-cli@24.9.0", - "_id": "jest-cli@24.9.0", - "_inBundle": false, - "_integrity": "sha512-+VLRKyitT3BWoMeSUIHRxV/2g8y9gw91Jh5z2UmXZzkZKpbC08CSehVxgHUwTpy+HwGcns/tqafQDJW7imYvGg==", - "_location": "/jest/jest-cli", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest-cli@24.9.0", - "name": "jest-cli", - "escapedName": "jest-cli", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "/jest" - ], - "_resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bin": { - "jest": "./bin/jest.js" - }, - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "@jest/core": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "chalk": "^2.0.1", - "exit": "^0.1.2", - "import-local": "^2.0.0", - "is-ci": "^2.0.0", - "jest-config": "^24.9.0", - "jest-util": "^24.9.0", - "jest-validate": "^24.9.0", - "prompts": "^2.0.1", - "realpath-native": "^1.1.0", - "yargs": "^13.3.0" - }, - "description": "Delightful JavaScript Testing.", - "devDependencies": { - "@types/exit": "^0.1.30", - "@types/is-ci": "^2.0.0", - "@types/prompts": "^2.0.1", - "@types/yargs": "^13.0.0" - }, - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://jestjs.io/", - "keywords": [ - "ava", - "babel", - "coverage", - "easy", - "expect", - "facebook", - "immersive", - "instant", - "jasmine", - "jest", - "jsdom", - "mocha", - "mocking", - "painless", - "qunit", - "runner", - "sandboxed", - "snapshot", - "tap", - "tape", - "test", - "testing", - "typescript", - "watch" - ], - "license": "MIT", - "main": "build/index.js", - "name": "jest-cli", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git", - "directory": "packages/jest-cli" - }, - "types": "build/index.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/jest/package.json b/node_modules/jest/package.json deleted file mode 100644 index ad2c9ce7..00000000 --- a/node_modules/jest/package.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "_args": [ - [ - "jest@24.9.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jest@24.9.0", - "_id": "jest@24.9.0", - "_inBundle": false, - "_integrity": "sha512-YvkBL1Zm7d2B1+h5fHEOdyjCG+sGMz4f8D86/0HiqJ6MB4MnDc8FgP5vdWsGnemOQro7lnYo8UakZ3+5A0jxGw==", - "_location": "/jest", - "_phantomChildren": { - "@jest/core": "24.9.0", - "@jest/test-result": "24.9.0", - "@jest/types": "24.9.0", - "chalk": "2.4.2", - "exit": "0.1.2", - "import-local": "2.0.0", - "is-ci": "2.0.0", - "jest-config": "24.9.0", - "jest-util": "24.9.0", - "jest-validate": "24.9.0", - "prompts": "2.2.1", - "realpath-native": "1.1.0", - "yargs": "13.3.0" - }, - "_requested": { - "type": "version", - "registry": true, - "raw": "jest@24.9.0", - "name": "jest", - "escapedName": "jest", - "rawSpec": "24.9.0", - "saveSpec": null, - "fetchSpec": "24.9.0" - }, - "_requiredBy": [ - "#DEV:/" - ], - "_resolved": "https://registry.npmjs.org/jest/-/jest-24.9.0.tgz", - "_spec": "24.9.0", - "_where": "E:\\python\\setup-php", - "bin": { - "jest": "./bin/jest.js" - }, - "bugs": { - "url": "https://github.com/facebook/jest/issues" - }, - "dependencies": { - "import-local": "^2.0.0", - "jest-cli": "^24.9.0" - }, - "description": "Delightful JavaScript Testing.", - "engines": { - "node": ">= 6" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1", - "homepage": "https://jestjs.io/", - "keywords": [ - "ava", - "babel", - "coverage", - "easy", - "expect", - "facebook", - "immersive", - "instant", - "jasmine", - "jest", - "jsdom", - "mocha", - "mocking", - "painless", - "qunit", - "runner", - "sandboxed", - "snapshot", - "tap", - "tape", - "test", - "testing", - "typescript", - "watch" - ], - "license": "MIT", - "main": "build/jest.js", - "name": "jest", - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/facebook/jest.git" - }, - "types": "build/jest.d.ts", - "version": "24.9.0" -} diff --git a/node_modules/js-tokens/CHANGELOG.md b/node_modules/js-tokens/CHANGELOG.md deleted file mode 100644 index 755e6f6e..00000000 --- a/node_modules/js-tokens/CHANGELOG.md +++ /dev/null @@ -1,151 +0,0 @@ -### Version 4.0.0 (2018-01-28) ### - -- Added: Support for ES2018. The only change needed was recognizing the `s` - regex flag. -- Changed: _All_ tokens returned by the `matchToToken` function now have a - `closed` property. It is set to `undefined` for the tokens where “closed” - doesn’t make sense. This means that all tokens objects have the same shape, - which might improve performance. - -These are the breaking changes: - -- `'/a/s'.match(jsTokens)` no longer returns `['/', 'a', '/', 's']`, but - `['/a/s']`. (There are of course other variations of this.) -- Code that rely on some token objects not having the `closed` property could - now behave differently. - - -### Version 3.0.2 (2017-06-28) ### - -- No code changes. Just updates to the readme. - - -### Version 3.0.1 (2017-01-30) ### - -- Fixed: ES2015 unicode escapes with more than 6 hex digits are now matched - correctly. - - -### Version 3.0.0 (2017-01-11) ### - -This release contains one breaking change, that should [improve performance in -V8][v8-perf]: - -> So how can you, as a JavaScript developer, ensure that your RegExps are fast? -> If you are not interested in hooking into RegExp internals, make sure that -> neither the RegExp instance, nor its prototype is modified in order to get the -> best performance: -> -> ```js -> var re = /./g; -> re.exec(''); // Fast path. -> re.new_property = 'slow'; -> ``` - -This module used to export a single regex, with `.matchToToken` bolted -on, just like in the above example. This release changes the exports of -the module to avoid this issue. - -Before: - -```js -import jsTokens from "js-tokens" -// or: -var jsTokens = require("js-tokens") -var matchToToken = jsTokens.matchToToken -``` - -After: - -```js -import jsTokens, {matchToToken} from "js-tokens" -// or: -var jsTokens = require("js-tokens").default -var matchToToken = require("js-tokens").matchToToken -``` - -[v8-perf]: http://v8project.blogspot.se/2017/01/speeding-up-v8-regular-expressions.html - - -### Version 2.0.0 (2016-06-19) ### - -- Added: Support for ES2016. In other words, support for the `**` exponentiation - operator. - -These are the breaking changes: - -- `'**'.match(jsTokens)` no longer returns `['*', '*']`, but `['**']`. -- `'**='.match(jsTokens)` no longer returns `['*', '*=']`, but `['**=']`. - - -### Version 1.0.3 (2016-03-27) ### - -- Improved: Made the regex ever so slightly smaller. -- Updated: The readme. - - -### Version 1.0.2 (2015-10-18) ### - -- Improved: Limited npm package contents for a smaller download. Thanks to - @zertosh! - - -### Version 1.0.1 (2015-06-20) ### - -- Fixed: Declared an undeclared variable. - - -### Version 1.0.0 (2015-02-26) ### - -- Changed: Merged the 'operator' and 'punctuation' types into 'punctuator'. That - type is now equivalent to the Punctuator token in the ECMAScript - specification. (Backwards-incompatible change.) -- Fixed: A `-` followed by a number is now correctly matched as a punctuator - followed by a number. It used to be matched as just a number, but there is no - such thing as negative number literals. (Possibly backwards-incompatible - change.) - - -### Version 0.4.1 (2015-02-21) ### - -- Added: Support for the regex `u` flag. - - -### Version 0.4.0 (2015-02-21) ### - -- Improved: `jsTokens.matchToToken` performance. -- Added: Support for octal and binary number literals. -- Added: Support for template strings. - - -### Version 0.3.1 (2015-01-06) ### - -- Fixed: Support for unicode spaces. They used to be allowed in names (which is - very confusing), and some unicode newlines were wrongly allowed in strings and - regexes. - - -### Version 0.3.0 (2014-12-19) ### - -- Changed: The `jsTokens.names` array has been replaced with the - `jsTokens.matchToToken` function. The capturing groups of `jsTokens` are no - longer part of the public API; instead use said function. See this [gist] for - an example. (Backwards-incompatible change.) -- Changed: The empty string is now considered an “invalid” token, instead an - “empty” token (its own group). (Backwards-incompatible change.) -- Removed: component support. (Backwards-incompatible change.) - -[gist]: https://gist.github.com/lydell/be49dbf80c382c473004 - - -### Version 0.2.0 (2014-06-19) ### - -- Changed: Match ES6 function arrows (`=>`) as an operator, instead of its own - category (“functionArrow”), for simplicity. (Backwards-incompatible change.) -- Added: ES6 splats (`...`) are now matched as an operator (instead of three - punctuations). (Backwards-incompatible change.) - - -### Version 0.1.0 (2014-03-08) ### - -- Initial release. diff --git a/node_modules/js-tokens/LICENSE b/node_modules/js-tokens/LICENSE deleted file mode 100644 index 54aef52f..00000000 --- a/node_modules/js-tokens/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014, 2015, 2016, 2017, 2018 Simon Lydell - -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/js-tokens/README.md b/node_modules/js-tokens/README.md deleted file mode 100644 index 00cdf163..00000000 --- a/node_modules/js-tokens/README.md +++ /dev/null @@ -1,240 +0,0 @@ -Overview [![Build Status](https://travis-ci.org/lydell/js-tokens.svg?branch=master)](https://travis-ci.org/lydell/js-tokens) -======== - -A regex that tokenizes JavaScript. - -```js -var jsTokens = require("js-tokens").default - -var jsString = "var foo=opts.foo;\n..." - -jsString.match(jsTokens) -// ["var", " ", "foo", "=", "opts", ".", "foo", ";", "\n", ...] -``` - - -Installation -============ - -`npm install js-tokens` - -```js -import jsTokens from "js-tokens" -// or: -var jsTokens = require("js-tokens").default -``` - - -Usage -===== - -### `jsTokens` ### - -A regex with the `g` flag that matches JavaScript tokens. - -The regex _always_ matches, even invalid JavaScript and the empty string. - -The next match is always directly after the previous. - -### `var token = matchToToken(match)` ### - -```js -import {matchToToken} from "js-tokens" -// or: -var matchToToken = require("js-tokens").matchToToken -``` - -Takes a `match` returned by `jsTokens.exec(string)`, and returns a `{type: -String, value: String}` object. The following types are available: - -- string -- comment -- regex -- number -- name -- punctuator -- whitespace -- invalid - -Multi-line comments and strings also have a `closed` property indicating if the -token was closed or not (see below). - -Comments and strings both come in several flavors. To distinguish them, check if -the token starts with `//`, `/*`, `'`, `"` or `` ` ``. - -Names are ECMAScript IdentifierNames, that is, including both identifiers and -keywords. You may use [is-keyword-js] to tell them apart. - -Whitespace includes both line terminators and other whitespace. - -[is-keyword-js]: https://github.com/crissdev/is-keyword-js - - -ECMAScript support -================== - -The intention is to always support the latest ECMAScript version whose feature -set has been finalized. - -If adding support for a newer version requires changes, a new version with a -major verion bump will be released. - -Currently, ECMAScript 2018 is supported. - - -Invalid code handling -===================== - -Unterminated strings are still matched as strings. JavaScript strings cannot -contain (unescaped) newlines, so unterminated strings simply end at the end of -the line. Unterminated template strings can contain unescaped newlines, though, -so they go on to the end of input. - -Unterminated multi-line comments are also still matched as comments. They -simply go on to the end of the input. - -Unterminated regex literals are likely matched as division and whatever is -inside the regex. - -Invalid ASCII characters have their own capturing group. - -Invalid non-ASCII characters are treated as names, to simplify the matching of -names (except unicode spaces which are treated as whitespace). Note: See also -the [ES2018](#es2018) section. - -Regex literals may contain invalid regex syntax. They are still matched as -regex literals. They may also contain repeated regex flags, to keep the regex -simple. - -Strings may contain invalid escape sequences. - - -Limitations -=========== - -Tokenizing JavaScript using regexes—in fact, _one single regex_—won’t be -perfect. But that’s not the point either. - -You may compare jsTokens with [esprima] by using `esprima-compare.js`. -See `npm run esprima-compare`! - -[esprima]: http://esprima.org/ - -### Template string interpolation ### - -Template strings are matched as single tokens, from the starting `` ` `` to the -ending `` ` ``, including interpolations (whose tokens are not matched -individually). - -Matching template string interpolations requires recursive balancing of `{` and -`}`—something that JavaScript regexes cannot do. Only one level of nesting is -supported. - -### Division and regex literals collision ### - -Consider this example: - -```js -var g = 9.82 -var number = bar / 2/g - -var regex = / 2/g -``` - -A human can easily understand that in the `number` line we’re dealing with -division, and in the `regex` line we’re dealing with a regex literal. How come? -Because humans can look at the whole code to put the `/` characters in context. -A JavaScript regex cannot. It only sees forwards. (Well, ES2018 regexes can also -look backwards. See the [ES2018](#es2018) section). - -When the `jsTokens` regex scans throught the above, it will see the following -at the end of both the `number` and `regex` rows: - -```js -/ 2/g -``` - -It is then impossible to know if that is a regex literal, or part of an -expression dealing with division. - -Here is a similar case: - -```js -foo /= 2/g -foo(/= 2/g) -``` - -The first line divides the `foo` variable with `2/g`. The second line calls the -`foo` function with the regex literal `/= 2/g`. Again, since `jsTokens` only -sees forwards, it cannot tell the two cases apart. - -There are some cases where we _can_ tell division and regex literals apart, -though. - -First off, we have the simple cases where there’s only one slash in the line: - -```js -var foo = 2/g -foo /= 2 -``` - -Regex literals cannot contain newlines, so the above cases are correctly -identified as division. Things are only problematic when there are more than -one non-comment slash in a single line. - -Secondly, not every character is a valid regex flag. - -```js -var number = bar / 2/e -``` - -The above example is also correctly identified as division, because `e` is not a -valid regex flag. I initially wanted to future-proof by allowing `[a-zA-Z]*` -(any letter) as flags, but it is not worth it since it increases the amount of -ambigous cases. So only the standard `g`, `m`, `i`, `y` and `u` flags are -allowed. This means that the above example will be identified as division as -long as you don’t rename the `e` variable to some permutation of `gmiyus` 1 to 6 -characters long. - -Lastly, we can look _forward_ for information. - -- If the token following what looks like a regex literal is not valid after a - regex literal, but is valid in a division expression, then the regex literal - is treated as division instead. For example, a flagless regex cannot be - followed by a string, number or name, but all of those three can be the - denominator of a division. -- Generally, if what looks like a regex literal is followed by an operator, the - regex literal is treated as division instead. This is because regexes are - seldomly used with operators (such as `+`, `*`, `&&` and `==`), but division - could likely be part of such an expression. - -Please consult the regex source and the test cases for precise information on -when regex or division is matched (should you need to know). In short, you -could sum it up as: - -If the end of a statement looks like a regex literal (even if it isn’t), it -will be treated as one. Otherwise it should work as expected (if you write sane -code). - -### ES2018 ### - -ES2018 added some nice regex improvements to the language. - -- [Unicode property escapes] should allow telling names and invalid non-ASCII - characters apart without blowing up the regex size. -- [Lookbehind assertions] should allow matching telling division and regex - literals apart in more cases. -- [Named capture groups] might simplify some things. - -These things would be nice to do, but are not critical. They probably have to -wait until the oldest maintained Node.js LTS release supports those features. - -[Unicode property escapes]: http://2ality.com/2017/07/regexp-unicode-property-escapes.html -[Lookbehind assertions]: http://2ality.com/2017/05/regexp-lookbehind-assertions.html -[Named capture groups]: http://2ality.com/2017/05/regexp-named-capture-groups.html - - -License -======= - -[MIT](LICENSE). diff --git a/node_modules/js-tokens/index.js b/node_modules/js-tokens/index.js deleted file mode 100644 index b23a4a0e..00000000 --- a/node_modules/js-tokens/index.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2014, 2015, 2016, 2017, 2018 Simon Lydell -// License: MIT. (See LICENSE.) - -Object.defineProperty(exports, "__esModule", { - value: true -}) - -// This regex comes from regex.coffee, and is inserted here by generate-index.js -// (run `npm run build`). -exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g - -exports.matchToToken = function(match) { - var token = {type: "invalid", value: match[0], closed: undefined} - if (match[ 1]) token.type = "string" , token.closed = !!(match[3] || match[4]) - else if (match[ 5]) token.type = "comment" - else if (match[ 6]) token.type = "comment", token.closed = !!match[7] - else if (match[ 8]) token.type = "regex" - else if (match[ 9]) token.type = "number" - else if (match[10]) token.type = "name" - else if (match[11]) token.type = "punctuator" - else if (match[12]) token.type = "whitespace" - return token -} diff --git a/node_modules/js-tokens/package.json b/node_modules/js-tokens/package.json deleted file mode 100644 index 15155fcc..00000000 --- a/node_modules/js-tokens/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_args": [ - [ - "js-tokens@4.0.0", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "js-tokens@4.0.0", - "_id": "js-tokens@4.0.0", - "_inBundle": false, - "_integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "_location": "/js-tokens", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "js-tokens@4.0.0", - "name": "js-tokens", - "escapedName": "js-tokens", - "rawSpec": "4.0.0", - "saveSpec": null, - "fetchSpec": "4.0.0" - }, - "_requiredBy": [ - "/@babel/highlight", - "/loose-envify" - ], - "_resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "_spec": "4.0.0", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Simon Lydell" - }, - "bugs": { - "url": "https://github.com/lydell/js-tokens/issues" - }, - "description": "A regex that tokenizes JavaScript.", - "devDependencies": { - "coffeescript": "2.1.1", - "esprima": "4.0.0", - "everything.js": "1.0.3", - "mocha": "5.0.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/lydell/js-tokens#readme", - "keywords": [ - "JavaScript", - "js", - "token", - "tokenize", - "regex" - ], - "license": "MIT", - "name": "js-tokens", - "repository": { - "type": "git", - "url": "git+https://github.com/lydell/js-tokens.git" - }, - "scripts": { - "build": "node generate-index.js", - "dev": "npm run build && npm test", - "esprima-compare": "node esprima-compare ./index.js everything.js/es5.js", - "test": "mocha --ui tdd" - }, - "version": "4.0.0" -} diff --git a/node_modules/js-yaml/CHANGELOG.md b/node_modules/js-yaml/CHANGELOG.md deleted file mode 100644 index 3f1cc985..00000000 --- a/node_modules/js-yaml/CHANGELOG.md +++ /dev/null @@ -1,501 +0,0 @@ -3.13.1 / 2019-04-05 -------------------- - -- Fix possible code execution in (already unsafe) `.load()`, #480. - - -3.13.0 / 2019-03-20 -------------------- - -- Security fix: `safeLoad()` can hang when arrays with nested refs - used as key. Now throws exception for nested arrays. #475. - - -3.12.2 / 2019-02-26 -------------------- - -- Fix `noArrayIndent` option for root level, #468. - - -3.12.1 / 2019-01-05 -------------------- - -- Added `noArrayIndent` option, #432. - - -3.12.0 / 2018-06-02 -------------------- - -- Support arrow functions without a block statement, #421. - - -3.11.0 / 2018-03-05 -------------------- - -- Fix dump in bin/octal/hex formats for negative integers, #399. -- Add arrow functions suport for `!!js/function`. - - -3.10.0 / 2017-09-10 -------------------- - -- Fix `condenseFlow` output (quote keys for sure, instead of spaces), #371, #370. -- Dump astrals as codepoints instead of surrogate pair, #368. - - -3.9.1 / 2017-07-08 ------------------- - -- Ensure stack is present for custom errors in node 7.+, #351. - - -3.9.0 / 2017-07-08 ------------------- - -- Add `condenseFlow` option (to create pretty URL query params), #346. -- Support array return from safeLoadAll/loadAll, #350. - - -3.8.4 / 2017-05-08 ------------------- - -- Dumper: prevent space after dash for arrays that wrap, #343. - - -3.8.3 / 2017-04-05 ------------------- - -- Should not allow numbers to begin and end with underscore, #335. - - -3.8.2 / 2017-03-02 ------------------- - -- Fix `!!float 123` (integers) parse, #333. -- Don't allow leading zeros in floats (except 0, 0.xxx). -- Allow positive exponent without sign in floats. - - -3.8.1 / 2017-02-07 ------------------- - -- Maintenance: update browserified build. - - -3.8.0 / 2017-02-07 ------------------- - -- Fix reported position for `duplicated mapping key` errors. - Now points to block start instead of block end. - (#243, thanks to @shockey). - - -3.7.0 / 2016-11-12 ------------------- - -- Fix parsing of quotes followed by newlines (#304, thanks to @dplepage). -- Support polymorphism for tags (#300, thanks to @monken). - - -3.6.1 / 2016-05-11 ------------------- - -- Fix output cut on a pipe, #286. - - -3.6.0 / 2016-04-16 ------------------- - -- Dumper rewrite, fix multiple bugs with trailing `\n`. - Big thanks to @aepsilon! -- Loader: fix leading/trailing newlines in block scalars, @aepsilon. - - -3.5.5 / 2016-03-17 ------------------- - -- Date parse fix: don't allow dates with on digit in month and day, #268. - - -3.5.4 / 2016-03-09 ------------------- - -- `noCompatMode` for dumper, to disable quoting YAML 1.1 values. - - -3.5.3 / 2016-02-11 ------------------- - -- Maintenance release. - - -3.5.2 / 2016-01-11 ------------------- - -- Maintenance: missed comma in bower config. - - -3.5.1 / 2016-01-11 ------------------- - -- Removed `inherit` dependency, #239. -- Better browserify workaround for esprima load. -- Demo rewrite. - - -3.5.0 / 2016-01-10 ------------------- - -- Dumper. Fold strings only, #217. -- Dumper. `norefs` option, to clone linked objects, #229. -- Loader. Throw a warning for duplicate keys, #166. -- Improved browserify support (mark `esprima` & `Buffer` excluded). - - -3.4.6 / 2015-11-26 ------------------- - -- Use standalone `inherit` to keep browserified files clear. - - -3.4.5 / 2015-11-23 ------------------- - -- Added `lineWidth` option to dumper. - - -3.4.4 / 2015-11-21 ------------------- - -- Fixed floats dump (missed dot for scientific format), #220. -- Allow non-printable characters inside quoted scalars, #192. - - -3.4.3 / 2015-10-10 ------------------- - -- Maintenance release - deps bump (esprima, argparse). - - -3.4.2 / 2015-09-09 ------------------- - -- Fixed serialization of duplicated entries in sequences, #205. - Thanks to @vogelsgesang. - - -3.4.1 / 2015-09-05 ------------------- - -- Fixed stacktrace handling in generated errors, for browsers (FF/IE). - - -3.4.0 / 2015-08-23 ------------------- - -- Fixed multiline keys dump, #197. Thanks to @tcr. -- Don't throw on warnongs anymore. Use `onWarning` option to catch. -- Throw error on unknown tags (was warning before). -- Fixed heading line breaks in some scalars (regression). -- Reworked internals of error class. - - -3.3.1 / 2015-05-13 ------------------- - -- Added `.sortKeys` dumper option, thanks to @rjmunro. -- Fixed astral characters support, #191. - - -3.3.0 / 2015-04-26 ------------------- - -- Significantly improved long strings formatting in dumper, thanks to @isaacs. -- Strip BOM if exists. - - -3.2.7 / 2015-02-19 ------------------- - -- Maintenance release. -- Updated dependencies. -- HISTORY.md -> CHANGELOG.md - - -3.2.6 / 2015-02-07 ------------------- - -- Fixed encoding of UTF-16 surrogate pairs. (e.g. "\U0001F431" CAT FACE). -- Fixed demo dates dump (#113, thanks to @Hypercubed). - - -3.2.5 / 2014-12-28 ------------------- - -- Fixed resolving of all built-in types on empty nodes. -- Fixed invalid warning on empty lines within quoted scalars and flow collections. -- Fixed bug: Tag on an empty node didn't resolve in some cases. - - -3.2.4 / 2014-12-19 ------------------- - -- Fixed resolving of !!null tag on an empty node. - - -3.2.3 / 2014-11-08 ------------------- - -- Implemented dumping of objects with circular and cross references. -- Partially fixed aliasing of constructed objects. (see issue #141 for details) - - -3.2.2 / 2014-09-07 ------------------- - -- Fixed infinite loop on unindented block scalars. -- Rewritten base64 encode/decode in binary type, to keep code licence clear. - - -3.2.1 / 2014-08-24 ------------------- - -- Nothig new. Just fix npm publish error. - - -3.2.0 / 2014-08-24 ------------------- - -- Added input piping support to CLI. -- Fixed typo, that could cause hand on initial indent (#139). - - -3.1.0 / 2014-07-07 ------------------- - -- 1.5x-2x speed boost. -- Removed deprecated `require('xxx.yml')` support. -- Significant code cleanup and refactoring. -- Internal API changed. If you used custom types - see updated examples. - Others are not affected. -- Even if the input string has no trailing line break character, - it will be parsed as if it has one. -- Added benchmark scripts. -- Moved bower files to /dist folder -- Bugfixes. - - -3.0.2 / 2014-02-27 ------------------- - -- Fixed bug: "constructor" string parsed as `null`. - - -3.0.1 / 2013-12-22 ------------------- - -- Fixed parsing of literal scalars. (issue #108) -- Prevented adding unnecessary spaces in object dumps. (issue #68) -- Fixed dumping of objects with very long (> 1024 in length) keys. - - -3.0.0 / 2013-12-16 ------------------- - -- Refactored code. Changed API for custom types. -- Removed output colors in CLI, dump json by default. -- Removed big dependencies from browser version (esprima, buffer) - - load `esprima` manually, if !!js/function needed - - !!bin now returns Array in browser -- AMD support. -- Don't quote dumped strings because of `-` & `?` (if not first char). -- __Deprecated__ loading yaml files via `require()`, as not recommended - behaviour for node. - - -2.1.3 / 2013-10-16 ------------------- - -- Fix wrong loading of empty block scalars. - - -2.1.2 / 2013-10-07 ------------------- - -- Fix unwanted line breaks in folded scalars. - - -2.1.1 / 2013-10-02 ------------------- - -- Dumper now respects deprecated booleans syntax from YAML 1.0/1.1 -- Fixed reader bug in JSON-like sequences/mappings. - - -2.1.0 / 2013-06-05 ------------------- - -- Add standard YAML schemas: Failsafe (`FAILSAFE_SCHEMA`), - JSON (`JSON_SCHEMA`) and Core (`CORE_SCHEMA`). -- Rename `DEFAULT_SCHEMA` to `DEFAULT_FULL_SCHEMA` - and `SAFE_SCHEMA` to `DEFAULT_SAFE_SCHEMA`. -- Bug fix: export `NIL` constant from the public interface. -- Add `skipInvalid` dumper option. -- Use `safeLoad` for `require` extension. - - -2.0.5 / 2013-04-26 ------------------- - -- Close security issue in !!js/function constructor. - Big thanks to @nealpoole for security audit. - - -2.0.4 / 2013-04-08 ------------------- - -- Updated .npmignore to reduce package size - - -2.0.3 / 2013-02-26 ------------------- - -- Fixed dumping of empty arrays ans objects. ([] and {} instead of null) - - -2.0.2 / 2013-02-15 ------------------- - -- Fixed input validation: tabs are printable characters. - - -2.0.1 / 2013-02-09 ------------------- - -- Fixed error, when options not passed to function cass - - -2.0.0 / 2013-02-09 ------------------- - -- Full rewrite. New architecture. Fast one-stage parsing. -- Changed custom types API. -- Added YAML dumper. - - -1.0.3 / 2012-11-05 ------------------- - -- Fixed utf-8 files loading. - - -1.0.2 / 2012-08-02 ------------------- - -- Pull out hand-written shims. Use ES5-Shims for old browsers support. See #44. -- Fix timstamps incorectly parsed in local time when no time part specified. - - -1.0.1 / 2012-07-07 ------------------- - -- Fixes `TypeError: 'undefined' is not an object` under Safari. Thanks Phuong. -- Fix timestamps incorrectly parsed in local time. Thanks @caolan. Closes #46. - - -1.0.0 / 2012-07-01 ------------------- - -- `y`, `yes`, `n`, `no`, `on`, `off` are not converted to Booleans anymore. - Fixes #42. -- `require(filename)` now returns a single document and throws an Error if - file contains more than one document. -- CLI was merged back from js-yaml.bin - - -0.3.7 / 2012-02-28 ------------------- - -- Fix export of `addConstructor()`. Closes #39. - - -0.3.6 / 2012-02-22 ------------------- - -- Removed AMD parts - too buggy to use. Need help to rewrite from scratch -- Removed YUI compressor warning (renamed `double` variable). Closes #40. - - -0.3.5 / 2012-01-10 ------------------- - -- Workagound for .npmignore fuckup under windows. Thanks to airportyh. - - -0.3.4 / 2011-12-24 ------------------- - -- Fixes str[] for oldIEs support. -- Adds better has change support for browserified demo. -- improves compact output of Error. Closes #33. - - -0.3.3 / 2011-12-20 ------------------- - -- jsyaml executable moved to separate module. -- adds `compact` stringification of Errors. - - -0.3.2 / 2011-12-16 ------------------- - -- Fixes ug with block style scalars. Closes #26. -- All sources are passing JSLint now. -- Fixes bug in Safari. Closes #28. -- Fixes bug in Opers. Closes #29. -- Improves browser support. Closes #20. -- Added jsyaml executable. -- Added !!js/function support. Closes #12. - - -0.3.1 / 2011-11-18 ------------------- - -- Added AMD support for browserified version. -- Wrapped browserified js-yaml into closure. -- Fixed the resolvement of non-specific tags. Closes #17. -- Added permalinks for online demo YAML snippets. Now we have YPaste service, lol. -- Added !!js/regexp and !!js/undefined types. Partially solves #12. -- Fixed !!set mapping. -- Fixed month parse in dates. Closes #19. - - -0.3.0 / 2011-11-09 ------------------- - -- Removed JS.Class dependency. Closes #3. -- Added browserified version. Closes #13. -- Added live demo of browserified version. -- Ported some of the PyYAML tests. See #14. -- Fixed timestamp bug when fraction was given. - - -0.2.2 / 2011-11-06 ------------------- - -- Fixed crash on docs without ---. Closes #8. -- Fixed miltiline string parse -- Fixed tests/comments for using array as key - - -0.2.1 / 2011-11-02 ------------------- - -- Fixed short file read (<4k). Closes #9. - - -0.2.0 / 2011-11-02 ------------------- - -- First public release diff --git a/node_modules/js-yaml/LICENSE b/node_modules/js-yaml/LICENSE deleted file mode 100644 index 09d3a29e..00000000 --- a/node_modules/js-yaml/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -(The MIT License) - -Copyright (C) 2011-2015 by Vitaly Puzrin - -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/js-yaml/README.md b/node_modules/js-yaml/README.md deleted file mode 100644 index 03a9e5ae..00000000 --- a/node_modules/js-yaml/README.md +++ /dev/null @@ -1,314 +0,0 @@ -JS-YAML - YAML 1.2 parser / writer for JavaScript -================================================= - -[![Build Status](https://travis-ci.org/nodeca/js-yaml.svg?branch=master)](https://travis-ci.org/nodeca/js-yaml) -[![NPM version](https://img.shields.io/npm/v/js-yaml.svg)](https://www.npmjs.org/package/js-yaml) - -__[Online Demo](http://nodeca.github.com/js-yaml/)__ - - -This is an implementation of [YAML](http://yaml.org/), a human-friendly data -serialization language. Started as [PyYAML](http://pyyaml.org/) port, it was -completely rewritten from scratch. Now it's very fast, and supports 1.2 spec. - - -Installation ------------- - -### YAML module for node.js - -``` -npm install js-yaml -``` - - -### CLI executable - -If you want to inspect your YAML files from CLI, install js-yaml globally: - -``` -npm install -g js-yaml -``` - -#### Usage - -``` -usage: js-yaml [-h] [-v] [-c] [-t] file - -Positional arguments: - file File with YAML document(s) - -Optional arguments: - -h, --help Show this help message and exit. - -v, --version Show program's version number and exit. - -c, --compact Display errors in compact mode - -t, --trace Show stack trace on error -``` - - -### Bundled YAML library for browsers - -``` html - - - - -``` - -Browser support was done mostly for the online demo. If you find any errors - feel -free to send pull requests with fixes. Also note, that IE and other old browsers -needs [es5-shims](https://github.com/kriskowal/es5-shim) to operate. - -Notes: - -1. We have no resources to support browserified version. Don't expect it to be - well tested. Don't expect fast fixes if something goes wrong there. -2. `!!js/function` in browser bundle will not work by default. If you really need - it - load `esprima` parser first (via amd or directly). -3. `!!bin` in browser will return `Array`, because browsers do not support - node.js `Buffer` and adding Buffer shims is completely useless on practice. - - -API ---- - -Here we cover the most 'useful' methods. If you need advanced details (creating -your own tags), see [wiki](https://github.com/nodeca/js-yaml/wiki) and -[examples](https://github.com/nodeca/js-yaml/tree/master/examples) for more -info. - -``` javascript -yaml = require('js-yaml'); -fs = require('fs'); - -// Get document, or throw exception on error -try { - var doc = yaml.safeLoad(fs.readFileSync('/home/ixti/example.yml', 'utf8')); - console.log(doc); -} catch (e) { - console.log(e); -} -``` - - -### safeLoad (string [ , options ]) - -**Recommended loading way.** Parses `string` as single YAML document. Returns a JavaScript -object or throws `YAMLException` on error. By default, does not support regexps, -functions and undefined. This method is safe for untrusted data. - -options: - -- `filename` _(default: null)_ - string to be used as a file path in - error/warning messages. -- `onWarning` _(default: null)_ - function to call on warning messages. - Loader will call this function with an instance of `YAMLException` for each warning. -- `schema` _(default: `DEFAULT_SAFE_SCHEMA`)_ - specifies a schema to use. - - `FAILSAFE_SCHEMA` - only strings, arrays and plain objects: - http://www.yaml.org/spec/1.2/spec.html#id2802346 - - `JSON_SCHEMA` - all JSON-supported types: - http://www.yaml.org/spec/1.2/spec.html#id2803231 - - `CORE_SCHEMA` - same as `JSON_SCHEMA`: - http://www.yaml.org/spec/1.2/spec.html#id2804923 - - `DEFAULT_SAFE_SCHEMA` - all supported YAML types, without unsafe ones - (`!!js/undefined`, `!!js/regexp` and `!!js/function`): - http://yaml.org/type/ - - `DEFAULT_FULL_SCHEMA` - all supported YAML types. -- `json` _(default: false)_ - compatibility with JSON.parse behaviour. If true, then duplicate keys in a mapping will override values rather than throwing an error. - -NOTE: This function **does not** understand multi-document sources, it throws -exception on those. - -NOTE: JS-YAML **does not** support schema-specific tag resolution restrictions. -So, the JSON schema is not as strictly defined in the YAML specification. -It allows numbers in any notation, use `Null` and `NULL` as `null`, etc. -The core schema also has no such restrictions. It allows binary notation for integers. - - -### load (string [ , options ]) - -**Use with care with untrusted sources**. The same as `safeLoad()` but uses -`DEFAULT_FULL_SCHEMA` by default - adds some JavaScript-specific types: -`!!js/function`, `!!js/regexp` and `!!js/undefined`. For untrusted sources, you -must additionally validate object structure to avoid injections: - -``` javascript -var untrusted_code = '"toString": ! "function (){very_evil_thing();}"'; - -// I'm just converting that string, what could possibly go wrong? -require('js-yaml').load(untrusted_code) + '' -``` - - -### safeLoadAll (string [, iterator] [, options ]) - -Same as `safeLoad()`, but understands multi-document sources. Applies -`iterator` to each document if specified, or returns array of documents. - -``` javascript -var yaml = require('js-yaml'); - -yaml.safeLoadAll(data, function (doc) { - console.log(doc); -}); -``` - - -### loadAll (string [, iterator] [ , options ]) - -Same as `safeLoadAll()` but uses `DEFAULT_FULL_SCHEMA` by default. - - -### safeDump (object [ , options ]) - -Serializes `object` as a YAML document. Uses `DEFAULT_SAFE_SCHEMA`, so it will -throw an exception if you try to dump regexps or functions. However, you can -disable exceptions by setting the `skipInvalid` option to `true`. - -options: - -- `indent` _(default: 2)_ - indentation width to use (in spaces). -- `noArrayIndent` _(default: false)_ - when true, will not add an indentation level to array elements -- `skipInvalid` _(default: false)_ - do not throw on invalid types (like function - in the safe schema) and skip pairs and single values with such types. -- `flowLevel` (default: -1) - specifies level of nesting, when to switch from - block to flow style for collections. -1 means block style everwhere -- `styles` - "tag" => "style" map. Each tag may have own set of styles. -- `schema` _(default: `DEFAULT_SAFE_SCHEMA`)_ specifies a schema to use. -- `sortKeys` _(default: `false`)_ - if `true`, sort keys when dumping YAML. If a - function, use the function to sort the keys. -- `lineWidth` _(default: `80`)_ - set max line width. -- `noRefs` _(default: `false`)_ - if `true`, don't convert duplicate objects into references -- `noCompatMode` _(default: `false`)_ - if `true` don't try to be compatible with older - yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1 -- `condenseFlow` _(default: `false`)_ - if `true` flow sequences will be condensed, omitting the space between `a, b`. Eg. `'[a,b]'`, and omitting the space between `key: value` and quoting the key. Eg. `'{"a":b}'` Can be useful when using yaml for pretty URL query params as spaces are %-encoded. - -The following table show availlable styles (e.g. "canonical", -"binary"...) available for each tag (.e.g. !!null, !!int ...). Yaml -output is shown on the right side after `=>` (default setting) or `->`: - -``` none -!!null - "canonical" -> "~" - "lowercase" => "null" - "uppercase" -> "NULL" - "camelcase" -> "Null" - -!!int - "binary" -> "0b1", "0b101010", "0b1110001111010" - "octal" -> "01", "052", "016172" - "decimal" => "1", "42", "7290" - "hexadecimal" -> "0x1", "0x2A", "0x1C7A" - -!!bool - "lowercase" => "true", "false" - "uppercase" -> "TRUE", "FALSE" - "camelcase" -> "True", "False" - -!!float - "lowercase" => ".nan", '.inf' - "uppercase" -> ".NAN", '.INF' - "camelcase" -> ".NaN", '.Inf' -``` - -Example: - -``` javascript -safeDump (object, { - 'styles': { - '!!null': 'canonical' // dump null as ~ - }, - 'sortKeys': true // sort object keys -}); -``` - -### dump (object [ , options ]) - -Same as `safeDump()` but without limits (uses `DEFAULT_FULL_SCHEMA` by default). - - -Supported YAML types --------------------- - -The list of standard YAML tags and corresponding JavaScipt types. See also -[YAML tag discussion](http://pyyaml.org/wiki/YAMLTagDiscussion) and -[YAML types repository](http://yaml.org/type/). - -``` -!!null '' # null -!!bool 'yes' # bool -!!int '3...' # number -!!float '3.14...' # number -!!binary '...base64...' # buffer -!!timestamp 'YYYY-...' # date -!!omap [ ... ] # array of key-value pairs -!!pairs [ ... ] # array or array pairs -!!set { ... } # array of objects with given keys and null values -!!str '...' # string -!!seq [ ... ] # array -!!map { ... } # object -``` - -**JavaScript-specific tags** - -``` -!!js/regexp /pattern/gim # RegExp -!!js/undefined '' # Undefined -!!js/function 'function () {...}' # Function -``` - -Caveats -------- - -Note, that you use arrays or objects as key in JS-YAML. JS does not allow objects -or arrays as keys, and stringifies (by calling `toString()` method) them at the -moment of adding them. - -``` yaml ---- -? [ foo, bar ] -: - baz -? { foo: bar } -: - baz - - baz -``` - -``` javascript -{ "foo,bar": ["baz"], "[object Object]": ["baz", "baz"] } -``` - -Also, reading of properties on implicit block mapping keys is not supported yet. -So, the following YAML document cannot be loaded. - -``` yaml -&anchor foo: - foo: bar - *anchor: duplicate key - baz: bat - *anchor: duplicate key -``` - - -Breaking changes in 2.x.x -> 3.x.x ----------------------------------- - -If you have not used __custom__ tags or loader classes and not loaded yaml -files via `require()`, no changes are needed. Just upgrade the library. - -Otherwise, you should: - -1. Replace all occurrences of `require('xxxx.yml')` by `fs.readFileSync()` + - `yaml.safeLoad()`. -2. rewrite your custom tags constructors and custom loader - classes, to conform the new API. See - [examples](https://github.com/nodeca/js-yaml/tree/master/examples) and - [wiki](https://github.com/nodeca/js-yaml/wiki) for details. - - -License -------- - -View the [LICENSE](https://github.com/nodeca/js-yaml/blob/master/LICENSE) file -(MIT). diff --git a/node_modules/js-yaml/bin/js-yaml.js b/node_modules/js-yaml/bin/js-yaml.js deleted file mode 100644 index e79186be..00000000 --- a/node_modules/js-yaml/bin/js-yaml.js +++ /dev/null @@ -1,132 +0,0 @@ -#!/usr/bin/env node - - -'use strict'; - -/*eslint-disable no-console*/ - - -// stdlib -var fs = require('fs'); - - -// 3rd-party -var argparse = require('argparse'); - - -// internal -var yaml = require('..'); - - -//////////////////////////////////////////////////////////////////////////////// - - -var cli = new argparse.ArgumentParser({ - prog: 'js-yaml', - version: require('../package.json').version, - addHelp: true -}); - - -cli.addArgument([ '-c', '--compact' ], { - help: 'Display errors in compact mode', - action: 'storeTrue' -}); - - -// deprecated (not needed after we removed output colors) -// option suppressed, but not completely removed for compatibility -cli.addArgument([ '-j', '--to-json' ], { - help: argparse.Const.SUPPRESS, - dest: 'json', - action: 'storeTrue' -}); - - -cli.addArgument([ '-t', '--trace' ], { - help: 'Show stack trace on error', - action: 'storeTrue' -}); - -cli.addArgument([ 'file' ], { - help: 'File to read, utf-8 encoded without BOM', - nargs: '?', - defaultValue: '-' -}); - - -//////////////////////////////////////////////////////////////////////////////// - - -var options = cli.parseArgs(); - - -//////////////////////////////////////////////////////////////////////////////// - -function readFile(filename, encoding, callback) { - if (options.file === '-') { - // read from stdin - - var chunks = []; - - process.stdin.on('data', function (chunk) { - chunks.push(chunk); - }); - - process.stdin.on('end', function () { - return callback(null, Buffer.concat(chunks).toString(encoding)); - }); - } else { - fs.readFile(filename, encoding, callback); - } -} - -readFile(options.file, 'utf8', function (error, input) { - var output, isYaml; - - if (error) { - if (error.code === 'ENOENT') { - console.error('File not found: ' + options.file); - process.exit(2); - } - - console.error( - options.trace && error.stack || - error.message || - String(error)); - - process.exit(1); - } - - try { - output = JSON.parse(input); - isYaml = false; - } catch (err) { - if (err instanceof SyntaxError) { - try { - output = []; - yaml.loadAll(input, function (doc) { output.push(doc); }, {}); - isYaml = true; - - if (output.length === 0) output = null; - else if (output.length === 1) output = output[0]; - - } catch (e) { - if (options.trace && err.stack) console.error(e.stack); - else console.error(e.toString(options.compact)); - - process.exit(1); - } - } else { - console.error( - options.trace && err.stack || - err.message || - String(err)); - - process.exit(1); - } - } - - if (isYaml) console.log(JSON.stringify(output, null, ' ')); - else console.log(yaml.dump(output)); -}); diff --git a/node_modules/js-yaml/dist/js-yaml.js b/node_modules/js-yaml/dist/js-yaml.js deleted file mode 100644 index fad044a4..00000000 --- a/node_modules/js-yaml/dist/js-yaml.js +++ /dev/null @@ -1,3946 +0,0 @@ -/* js-yaml 3.13.1 https://github.com/nodeca/js-yaml */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.jsyaml = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i */ -var CHAR_QUESTION = 0x3F; /* ? */ -var CHAR_COMMERCIAL_AT = 0x40; /* @ */ -var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ -var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ -var CHAR_GRAVE_ACCENT = 0x60; /* ` */ -var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ -var CHAR_VERTICAL_LINE = 0x7C; /* | */ -var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ - -var ESCAPE_SEQUENCES = {}; - -ESCAPE_SEQUENCES[0x00] = '\\0'; -ESCAPE_SEQUENCES[0x07] = '\\a'; -ESCAPE_SEQUENCES[0x08] = '\\b'; -ESCAPE_SEQUENCES[0x09] = '\\t'; -ESCAPE_SEQUENCES[0x0A] = '\\n'; -ESCAPE_SEQUENCES[0x0B] = '\\v'; -ESCAPE_SEQUENCES[0x0C] = '\\f'; -ESCAPE_SEQUENCES[0x0D] = '\\r'; -ESCAPE_SEQUENCES[0x1B] = '\\e'; -ESCAPE_SEQUENCES[0x22] = '\\"'; -ESCAPE_SEQUENCES[0x5C] = '\\\\'; -ESCAPE_SEQUENCES[0x85] = '\\N'; -ESCAPE_SEQUENCES[0xA0] = '\\_'; -ESCAPE_SEQUENCES[0x2028] = '\\L'; -ESCAPE_SEQUENCES[0x2029] = '\\P'; - -var DEPRECATED_BOOLEANS_SYNTAX = [ - 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', - 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' -]; - -function compileStyleMap(schema, map) { - var result, keys, index, length, tag, style, type; - - if (map === null) return {}; - - result = {}; - keys = Object.keys(map); - - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map[tag]); - - if (tag.slice(0, 2) === '!!') { - tag = 'tag:yaml.org,2002:' + tag.slice(2); - } - type = schema.compiledTypeMap['fallback'][tag]; - - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style]; - } - - result[tag] = style; - } - - return result; -} - -function encodeHex(character) { - var string, handle, length; - - string = character.toString(16).toUpperCase(); - - if (character <= 0xFF) { - handle = 'x'; - length = 2; - } else if (character <= 0xFFFF) { - handle = 'u'; - length = 4; - } else if (character <= 0xFFFFFFFF) { - handle = 'U'; - length = 8; - } else { - throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); - } - - return '\\' + handle + common.repeat('0', length - string.length) + string; -} - -function State(options) { - this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; - this.indent = Math.max(1, (options['indent'] || 2)); - this.noArrayIndent = options['noArrayIndent'] || false; - this.skipInvalid = options['skipInvalid'] || false; - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); - this.styleMap = compileStyleMap(this.schema, options['styles'] || null); - this.sortKeys = options['sortKeys'] || false; - this.lineWidth = options['lineWidth'] || 80; - this.noRefs = options['noRefs'] || false; - this.noCompatMode = options['noCompatMode'] || false; - this.condenseFlow = options['condenseFlow'] || false; - - this.implicitTypes = this.schema.compiledImplicit; - this.explicitTypes = this.schema.compiledExplicit; - - this.tag = null; - this.result = ''; - - this.duplicates = []; - this.usedDuplicates = null; -} - -// Indents every line in a string. Empty lines (\n only) are not indented. -function indentString(string, spaces) { - var ind = common.repeat(' ', spaces), - position = 0, - next = -1, - result = '', - line, - length = string.length; - - while (position < length) { - next = string.indexOf('\n', position); - if (next === -1) { - line = string.slice(position); - position = length; - } else { - line = string.slice(position, next + 1); - position = next + 1; - } - - if (line.length && line !== '\n') result += ind; - - result += line; - } - - return result; -} - -function generateNextLine(state, level) { - return '\n' + common.repeat(' ', state.indent * level); -} - -function testImplicitResolving(state, str) { - var index, length, type; - - for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { - type = state.implicitTypes[index]; - - if (type.resolve(str)) { - return true; - } - } - - return false; -} - -// [33] s-white ::= s-space | s-tab -function isWhitespace(c) { - return c === CHAR_SPACE || c === CHAR_TAB; -} - -// Returns true if the character can be printed without escaping. -// From YAML 1.2: "any allowed characters known to be non-printable -// should also be escaped. [However,] This isn’t mandatory" -// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. -function isPrintable(c) { - return (0x00020 <= c && c <= 0x00007E) - || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) - || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */) - || (0x10000 <= c && c <= 0x10FFFF); -} - -// Simplified test for values allowed after the first character in plain style. -function isPlainSafe(c) { - // Uses a subset of nb-char - c-flow-indicator - ":" - "#" - // where nb-char ::= c-printable - b-char - c-byte-order-mark. - return isPrintable(c) && c !== 0xFEFF - // - c-flow-indicator - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - // - ":" - "#" - && c !== CHAR_COLON - && c !== CHAR_SHARP; -} - -// Simplified test for values allowed as the first character in plain style. -function isPlainSafeFirst(c) { - // Uses a subset of ns-char - c-indicator - // where ns-char = nb-char - s-white. - return isPrintable(c) && c !== 0xFEFF - && !isWhitespace(c) // - s-white - // - (c-indicator ::= - // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” - && c !== CHAR_MINUS - && c !== CHAR_QUESTION - && c !== CHAR_COLON - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - // | “#” | “&” | “*” | “!” | “|” | “>” | “'” | “"” - && c !== CHAR_SHARP - && c !== CHAR_AMPERSAND - && c !== CHAR_ASTERISK - && c !== CHAR_EXCLAMATION - && c !== CHAR_VERTICAL_LINE - && c !== CHAR_GREATER_THAN - && c !== CHAR_SINGLE_QUOTE - && c !== CHAR_DOUBLE_QUOTE - // | “%” | “@” | “`”) - && c !== CHAR_PERCENT - && c !== CHAR_COMMERCIAL_AT - && c !== CHAR_GRAVE_ACCENT; -} - -// Determines whether block indentation indicator is required. -function needIndentIndicator(string) { - var leadingSpaceRe = /^\n* /; - return leadingSpaceRe.test(string); -} - -var STYLE_PLAIN = 1, - STYLE_SINGLE = 2, - STYLE_LITERAL = 3, - STYLE_FOLDED = 4, - STYLE_DOUBLE = 5; - -// Determines which scalar styles are possible and returns the preferred style. -// lineWidth = -1 => no limit. -// Pre-conditions: str.length > 0. -// Post-conditions: -// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. -// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). -// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). -function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { - var i; - var char; - var hasLineBreak = false; - var hasFoldableLine = false; // only checked if shouldTrackWidth - var shouldTrackWidth = lineWidth !== -1; - var previousLineBreak = -1; // count the first line correctly - var plain = isPlainSafeFirst(string.charCodeAt(0)) - && !isWhitespace(string.charCodeAt(string.length - 1)); - - if (singleLineOnly) { - // Case: no block styles. - // Check for disallowed characters to rule out plain and single. - for (i = 0; i < string.length; i++) { - char = string.charCodeAt(i); - if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char); - } - } else { - // Case: block styles permitted. - for (i = 0; i < string.length; i++) { - char = string.charCodeAt(i); - if (char === CHAR_LINE_FEED) { - hasLineBreak = true; - // Check if any line can be folded. - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || - // Foldable line = too long, and not more-indented. - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' '); - previousLineBreak = i; - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char); - } - // in case the end is missing a \n - hasFoldableLine = hasFoldableLine || (shouldTrackWidth && - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ')); - } - // Although every style can represent \n without escaping, prefer block styles - // for multiline, since they're more readable and they don't add empty lines. - // Also prefer folding a super-long line. - if (!hasLineBreak && !hasFoldableLine) { - // Strings interpretable as another type have to be quoted; - // e.g. the string 'true' vs. the boolean true. - return plain && !testAmbiguousType(string) - ? STYLE_PLAIN : STYLE_SINGLE; - } - // Edge case: block indentation indicator can only have one digit. - if (indentPerLevel > 9 && needIndentIndicator(string)) { - return STYLE_DOUBLE; - } - // At this point we know block styles are valid. - // Prefer literal style unless we want to fold. - return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; -} - -// Note: line breaking/folding is implemented for only the folded style. -// NB. We drop the last trailing newline (if any) of a returned block scalar -// since the dumper adds its own newline. This always works: -// • No ending newline => unaffected; already using strip "-" chomping. -// • Ending newline => removed then restored. -// Importantly, this keeps the "+" chomp indicator from gaining an extra line. -function writeScalar(state, string, level, iskey) { - state.dump = (function () { - if (string.length === 0) { - return "''"; - } - if (!state.noCompatMode && - DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { - return "'" + string + "'"; - } - - var indent = state.indent * Math.max(1, level); // no 0-indent scalars - // As indentation gets deeper, let the width decrease monotonically - // to the lower bound min(state.lineWidth, 40). - // Note that this implies - // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. - // state.lineWidth > 40 + state.indent: width decreases until the lower bound. - // This behaves better than a constant minimum width which disallows narrower options, - // or an indent threshold which causes the width to suddenly increase. - var lineWidth = state.lineWidth === -1 - ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); - - // Without knowing if keys are implicit/explicit, assume implicit for safety. - var singleLineOnly = iskey - // No block styles in flow mode. - || (state.flowLevel > -1 && level >= state.flowLevel); - function testAmbiguity(string) { - return testImplicitResolving(state, string); - } - - switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { - case STYLE_PLAIN: - return string; - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'"; - case STYLE_LITERAL: - return '|' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(string, indent)); - case STYLE_FOLDED: - return '>' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); - case STYLE_DOUBLE: - return '"' + escapeString(string, lineWidth) + '"'; - default: - throw new YAMLException('impossible error: invalid scalar style'); - } - }()); -} - -// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. -function blockHeader(string, indentPerLevel) { - var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; - - // note the special case: the string '\n' counts as a "trailing" empty line. - var clip = string[string.length - 1] === '\n'; - var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); - var chomp = keep ? '+' : (clip ? '' : '-'); - - return indentIndicator + chomp + '\n'; -} - -// (See the note for writeScalar.) -function dropEndingNewline(string) { - return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; -} - -// Note: a long line without a suitable break point will exceed the width limit. -// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. -function foldString(string, width) { - // In folded style, $k$ consecutive newlines output as $k+1$ newlines— - // unless they're before or after a more-indented line, or at the very - // beginning or end, in which case $k$ maps to $k$. - // Therefore, parse each chunk as newline(s) followed by a content line. - var lineRe = /(\n+)([^\n]*)/g; - - // first line (possibly an empty line) - var result = (function () { - var nextLF = string.indexOf('\n'); - nextLF = nextLF !== -1 ? nextLF : string.length; - lineRe.lastIndex = nextLF; - return foldLine(string.slice(0, nextLF), width); - }()); - // If we haven't reached the first content line yet, don't add an extra \n. - var prevMoreIndented = string[0] === '\n' || string[0] === ' '; - var moreIndented; - - // rest of the lines - var match; - while ((match = lineRe.exec(string))) { - var prefix = match[1], line = match[2]; - moreIndented = (line[0] === ' '); - result += prefix - + (!prevMoreIndented && !moreIndented && line !== '' - ? '\n' : '') - + foldLine(line, width); - prevMoreIndented = moreIndented; - } - - return result; -} - -// Greedy line breaking. -// Picks the longest line under the limit each time, -// otherwise settles for the shortest line over the limit. -// NB. More-indented lines *cannot* be folded, as that would add an extra \n. -function foldLine(line, width) { - if (line === '' || line[0] === ' ') return line; - - // Since a more-indented line adds a \n, breaks can't be followed by a space. - var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. - var match; - // start is an inclusive index. end, curr, and next are exclusive. - var start = 0, end, curr = 0, next = 0; - var result = ''; - - // Invariants: 0 <= start <= length-1. - // 0 <= curr <= next <= max(0, length-2). curr - start <= width. - // Inside the loop: - // A match implies length >= 2, so curr and next are <= length-2. - while ((match = breakRe.exec(line))) { - next = match.index; - // maintain invariant: curr - start <= width - if (next - start > width) { - end = (curr > start) ? curr : next; // derive end <= length-2 - result += '\n' + line.slice(start, end); - // skip the space that was output as \n - start = end + 1; // derive start <= length-1 - } - curr = next; - } - - // By the invariants, start <= length-1, so there is something left over. - // It is either the whole string or a part starting from non-whitespace. - result += '\n'; - // Insert a break if the remainder is too long and there is a break available. - if (line.length - start > width && curr > start) { - result += line.slice(start, curr) + '\n' + line.slice(curr + 1); - } else { - result += line.slice(start); - } - - return result.slice(1); // drop extra \n joiner -} - -// Escapes a double-quoted string. -function escapeString(string) { - var result = ''; - var char, nextChar; - var escapeSeq; - - for (var i = 0; i < string.length; i++) { - char = string.charCodeAt(i); - // Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates"). - if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) { - nextChar = string.charCodeAt(i + 1); - if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) { - // Combine the surrogate pair and store it escaped. - result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000); - // Advance index one extra since we already used that char here. - i++; continue; - } - } - escapeSeq = ESCAPE_SEQUENCES[char]; - result += !escapeSeq && isPrintable(char) - ? string[i] - : escapeSeq || encodeHex(char); - } - - return result; -} - -function writeFlowSequence(state, level, object) { - var _result = '', - _tag = state.tag, - index, - length; - - for (index = 0, length = object.length; index < length; index += 1) { - // Write only valid elements. - if (writeNode(state, level, object[index], false, false)) { - if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : ''); - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = '[' + _result + ']'; -} - -function writeBlockSequence(state, level, object, compact) { - var _result = '', - _tag = state.tag, - index, - length; - - for (index = 0, length = object.length; index < length; index += 1) { - // Write only valid elements. - if (writeNode(state, level + 1, object[index], true, true)) { - if (!compact || index !== 0) { - _result += generateNextLine(state, level); - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - _result += '-'; - } else { - _result += '- '; - } - - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = _result || '[]'; // Empty sequence if no valid values. -} - -function writeFlowMapping(state, level, object) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - pairBuffer; - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = state.condenseFlow ? '"' : ''; - - if (index !== 0) pairBuffer += ', '; - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (!writeNode(state, level, objectKey, false, false)) { - continue; // Skip this pair because of invalid key; - } - - if (state.dump.length > 1024) pairBuffer += '? '; - - pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); - - if (!writeNode(state, level, objectValue, false, false)) { - continue; // Skip this pair because of invalid value. - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = '{' + _result + '}'; -} - -function writeBlockMapping(state, level, object, compact) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - explicitPair, - pairBuffer; - - // Allow sorting keys so that the output file is deterministic - if (state.sortKeys === true) { - // Default sorting - objectKeyList.sort(); - } else if (typeof state.sortKeys === 'function') { - // Custom sort function - objectKeyList.sort(state.sortKeys); - } else if (state.sortKeys) { - // Something is wrong - throw new YAMLException('sortKeys must be a boolean or a function'); - } - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ''; - - if (!compact || index !== 0) { - pairBuffer += generateNextLine(state, level); - } - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (!writeNode(state, level + 1, objectKey, true, true, true)) { - continue; // Skip this pair because of invalid key. - } - - explicitPair = (state.tag !== null && state.tag !== '?') || - (state.dump && state.dump.length > 1024); - - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += '?'; - } else { - pairBuffer += '? '; - } - } - - pairBuffer += state.dump; - - if (explicitPair) { - pairBuffer += generateNextLine(state, level); - } - - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue; // Skip this pair because of invalid value. - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ':'; - } else { - pairBuffer += ': '; - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = _result || '{}'; // Empty mapping if no valid pairs. -} - -function detectType(state, object, explicit) { - var _result, typeList, index, length, type, style; - - typeList = explicit ? state.explicitTypes : state.implicitTypes; - - for (index = 0, length = typeList.length; index < length; index += 1) { - type = typeList[index]; - - if ((type.instanceOf || type.predicate) && - (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && - (!type.predicate || type.predicate(object))) { - - state.tag = explicit ? type.tag : '?'; - - if (type.represent) { - style = state.styleMap[type.tag] || type.defaultStyle; - - if (_toString.call(type.represent) === '[object Function]') { - _result = type.represent(object, style); - } else if (_hasOwnProperty.call(type.represent, style)) { - _result = type.represent[style](object, style); - } else { - throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); - } - - state.dump = _result; - } - - return true; - } - } - - return false; -} - -// Serializes `object` and writes it to global `result`. -// Returns true on success, or false on invalid object. -// -function writeNode(state, level, object, block, compact, iskey) { - state.tag = null; - state.dump = object; - - if (!detectType(state, object, false)) { - detectType(state, object, true); - } - - var type = _toString.call(state.dump); - - if (block) { - block = (state.flowLevel < 0 || state.flowLevel > level); - } - - var objectOrArray = type === '[object Object]' || type === '[object Array]', - duplicateIndex, - duplicate; - - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; - } - - if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { - compact = false; - } - - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = '*ref_' + duplicateIndex; - } else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true; - } - if (type === '[object Object]') { - if (block && (Object.keys(state.dump).length !== 0)) { - writeBlockMapping(state, level, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowMapping(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object Array]') { - var arrayLevel = (state.noArrayIndent && (level > 0)) ? level - 1 : level; - if (block && (state.dump.length !== 0)) { - writeBlockSequence(state, arrayLevel, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowSequence(state, arrayLevel, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object String]') { - if (state.tag !== '?') { - writeScalar(state, state.dump, level, iskey); - } - } else { - if (state.skipInvalid) return false; - throw new YAMLException('unacceptable kind of an object to dump ' + type); - } - - if (state.tag !== null && state.tag !== '?') { - state.dump = '!<' + state.tag + '> ' + state.dump; - } - } - - return true; -} - -function getDuplicateReferences(object, state) { - var objects = [], - duplicatesIndexes = [], - index, - length; - - inspectNode(object, objects, duplicatesIndexes); - - for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { - state.duplicates.push(objects[duplicatesIndexes[index]]); - } - state.usedDuplicates = new Array(length); -} - -function inspectNode(object, objects, duplicatesIndexes) { - var objectKeyList, - index, - length; - - if (object !== null && typeof object === 'object') { - index = objects.indexOf(object); - if (index !== -1) { - if (duplicatesIndexes.indexOf(index) === -1) { - duplicatesIndexes.push(index); - } - } else { - objects.push(object); - - if (Array.isArray(object)) { - for (index = 0, length = object.length; index < length; index += 1) { - inspectNode(object[index], objects, duplicatesIndexes); - } - } else { - objectKeyList = Object.keys(object); - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); - } - } - } - } -} - -function dump(input, options) { - options = options || {}; - - var state = new State(options); - - if (!state.noRefs) getDuplicateReferences(input, state); - - if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; - - return ''; -} - -function safeDump(input, options) { - return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} - -module.exports.dump = dump; -module.exports.safeDump = safeDump; - -},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(require,module,exports){ -// YAML error class. http://stackoverflow.com/questions/8458984 -// -'use strict'; - -function YAMLException(reason, mark) { - // Super constructor - Error.call(this); - - this.name = 'YAMLException'; - this.reason = reason; - this.mark = mark; - this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); - - // Include stack trace in error object - if (Error.captureStackTrace) { - // Chrome and NodeJS - Error.captureStackTrace(this, this.constructor); - } else { - // FF, IE 10+ and Safari 6+. Fallback for others - this.stack = (new Error()).stack || ''; - } -} - - -// Inherit from Error -YAMLException.prototype = Object.create(Error.prototype); -YAMLException.prototype.constructor = YAMLException; - - -YAMLException.prototype.toString = function toString(compact) { - var result = this.name + ': '; - - result += this.reason || '(unknown reason)'; - - if (!compact && this.mark) { - result += ' ' + this.mark.toString(); - } - - return result; -}; - - -module.exports = YAMLException; - -},{}],5:[function(require,module,exports){ -'use strict'; - -/*eslint-disable max-len,no-use-before-define*/ - -var common = require('./common'); -var YAMLException = require('./exception'); -var Mark = require('./mark'); -var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe'); -var DEFAULT_FULL_SCHEMA = require('./schema/default_full'); - - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - - -var CONTEXT_FLOW_IN = 1; -var CONTEXT_FLOW_OUT = 2; -var CONTEXT_BLOCK_IN = 3; -var CONTEXT_BLOCK_OUT = 4; - - -var CHOMPING_CLIP = 1; -var CHOMPING_STRIP = 2; -var CHOMPING_KEEP = 3; - - -var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; -var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; -var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; -var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; -var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; - - -function _class(obj) { return Object.prototype.toString.call(obj); } - -function is_EOL(c) { - return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); -} - -function is_WHITE_SPACE(c) { - return (c === 0x09/* Tab */) || (c === 0x20/* Space */); -} - -function is_WS_OR_EOL(c) { - return (c === 0x09/* Tab */) || - (c === 0x20/* Space */) || - (c === 0x0A/* LF */) || - (c === 0x0D/* CR */); -} - -function is_FLOW_INDICATOR(c) { - return c === 0x2C/* , */ || - c === 0x5B/* [ */ || - c === 0x5D/* ] */ || - c === 0x7B/* { */ || - c === 0x7D/* } */; -} - -function fromHexCode(c) { - var lc; - - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - /*eslint-disable no-bitwise*/ - lc = c | 0x20; - - if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { - return lc - 0x61 + 10; - } - - return -1; -} - -function escapedHexLen(c) { - if (c === 0x78/* x */) { return 2; } - if (c === 0x75/* u */) { return 4; } - if (c === 0x55/* U */) { return 8; } - return 0; -} - -function fromDecimalCode(c) { - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - return -1; -} - -function simpleEscapeSequence(c) { - /* eslint-disable indent */ - return (c === 0x30/* 0 */) ? '\x00' : - (c === 0x61/* a */) ? '\x07' : - (c === 0x62/* b */) ? '\x08' : - (c === 0x74/* t */) ? '\x09' : - (c === 0x09/* Tab */) ? '\x09' : - (c === 0x6E/* n */) ? '\x0A' : - (c === 0x76/* v */) ? '\x0B' : - (c === 0x66/* f */) ? '\x0C' : - (c === 0x72/* r */) ? '\x0D' : - (c === 0x65/* e */) ? '\x1B' : - (c === 0x20/* Space */) ? ' ' : - (c === 0x22/* " */) ? '\x22' : - (c === 0x2F/* / */) ? '/' : - (c === 0x5C/* \ */) ? '\x5C' : - (c === 0x4E/* N */) ? '\x85' : - (c === 0x5F/* _ */) ? '\xA0' : - (c === 0x4C/* L */) ? '\u2028' : - (c === 0x50/* P */) ? '\u2029' : ''; -} - -function charFromCodepoint(c) { - if (c <= 0xFFFF) { - return String.fromCharCode(c); - } - // Encode UTF-16 surrogate pair - // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF - return String.fromCharCode( - ((c - 0x010000) >> 10) + 0xD800, - ((c - 0x010000) & 0x03FF) + 0xDC00 - ); -} - -var simpleEscapeCheck = new Array(256); // integer, for fast access -var simpleEscapeMap = new Array(256); -for (var i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; - simpleEscapeMap[i] = simpleEscapeSequence(i); -} - - -function State(input, options) { - this.input = input; - - this.filename = options['filename'] || null; - this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; - this.onWarning = options['onWarning'] || null; - this.legacy = options['legacy'] || false; - this.json = options['json'] || false; - this.listener = options['listener'] || null; - - this.implicitTypes = this.schema.compiledImplicit; - this.typeMap = this.schema.compiledTypeMap; - - this.length = input.length; - this.position = 0; - this.line = 0; - this.lineStart = 0; - this.lineIndent = 0; - - this.documents = []; - - /* - this.version; - this.checkLineBreaks; - this.tagMap; - this.anchorMap; - this.tag; - this.anchor; - this.kind; - this.result;*/ - -} - - -function generateError(state, message) { - return new YAMLException( - message, - new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); -} - -function throwError(state, message) { - throw generateError(state, message); -} - -function throwWarning(state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)); - } -} - - -var directiveHandlers = { - - YAML: function handleYamlDirective(state, name, args) { - - var match, major, minor; - - if (state.version !== null) { - throwError(state, 'duplication of %YAML directive'); - } - - if (args.length !== 1) { - throwError(state, 'YAML directive accepts exactly one argument'); - } - - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - - if (match === null) { - throwError(state, 'ill-formed argument of the YAML directive'); - } - - major = parseInt(match[1], 10); - minor = parseInt(match[2], 10); - - if (major !== 1) { - throwError(state, 'unacceptable YAML version of the document'); - } - - state.version = args[0]; - state.checkLineBreaks = (minor < 2); - - if (minor !== 1 && minor !== 2) { - throwWarning(state, 'unsupported YAML version of the document'); - } - }, - - TAG: function handleTagDirective(state, name, args) { - - var handle, prefix; - - if (args.length !== 2) { - throwError(state, 'TAG directive accepts exactly two arguments'); - } - - handle = args[0]; - prefix = args[1]; - - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); - } - - if (_hasOwnProperty.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } - - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); - } - - state.tagMap[handle] = prefix; - } -}; - - -function captureSegment(state, start, end, checkJson) { - var _position, _length, _character, _result; - - if (start < end) { - _result = state.input.slice(start, end); - - if (checkJson) { - for (_position = 0, _length = _result.length; _position < _length; _position += 1) { - _character = _result.charCodeAt(_position); - if (!(_character === 0x09 || - (0x20 <= _character && _character <= 0x10FFFF))) { - throwError(state, 'expected valid JSON character'); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, 'the stream contains non-printable characters'); - } - - state.result += _result; - } -} - -function mergeMappings(state, destination, source, overridableKeys) { - var sourceKeys, key, index, quantity; - - if (!common.isObject(source)) { - throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); - } - - sourceKeys = Object.keys(source); - - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - - if (!_hasOwnProperty.call(destination, key)) { - destination[key] = source[key]; - overridableKeys[key] = true; - } - } -} - -function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { - var index, quantity; - - // The output is a plain object here, so keys can only be strings. - // We need to convert keyNode to a string, but doing so can hang the process - // (deeply nested arrays that explode exponentially using aliases). - if (Array.isArray(keyNode)) { - keyNode = Array.prototype.slice.call(keyNode); - - for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { - if (Array.isArray(keyNode[index])) { - throwError(state, 'nested arrays are not supported inside keys'); - } - - if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { - keyNode[index] = '[object Object]'; - } - } - } - - // Avoid code execution in load() via toString property - // (still use its own toString for arrays, timestamps, - // and whatever user schema extensions happen to have @@toStringTag) - if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { - keyNode = '[object Object]'; - } - - - keyNode = String(keyNode); - - if (_result === null) { - _result = {}; - } - - if (keyTag === 'tag:yaml.org,2002:merge') { - if (Array.isArray(valueNode)) { - for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { - mergeMappings(state, _result, valueNode[index], overridableKeys); - } - } else { - mergeMappings(state, _result, valueNode, overridableKeys); - } - } else { - if (!state.json && - !_hasOwnProperty.call(overridableKeys, keyNode) && - _hasOwnProperty.call(_result, keyNode)) { - state.line = startLine || state.line; - state.position = startPos || state.position; - throwError(state, 'duplicated mapping key'); - } - _result[keyNode] = valueNode; - delete overridableKeys[keyNode]; - } - - return _result; -} - -function readLineBreak(state) { - var ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x0A/* LF */) { - state.position++; - } else if (ch === 0x0D/* CR */) { - state.position++; - if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { - state.position++; - } - } else { - throwError(state, 'a line break is expected'); - } - - state.line += 1; - state.lineStart = state.position; -} - -function skipSeparationSpace(state, allowComments, checkIndent) { - var lineBreaks = 0, - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (allowComments && ch === 0x23/* # */) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); - } - - if (is_EOL(ch)) { - readLineBreak(state); - - ch = state.input.charCodeAt(state.position); - lineBreaks++; - state.lineIndent = 0; - - while (ch === 0x20/* Space */) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - } else { - break; - } - } - - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, 'deficient indentation'); - } - - return lineBreaks; -} - -function testDocumentSeparator(state) { - var _position = state.position, - ch; - - ch = state.input.charCodeAt(_position); - - // Condition state.position === state.lineStart is tested - // in parent on each call, for efficiency. No needs to test here again. - if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && - ch === state.input.charCodeAt(_position + 1) && - ch === state.input.charCodeAt(_position + 2)) { - - _position += 3; - - ch = state.input.charCodeAt(_position); - - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; - } - } - - return false; -} - -function writeFoldedLines(state, count) { - if (count === 1) { - state.result += ' '; - } else if (count > 1) { - state.result += common.repeat('\n', count - 1); - } -} - - -function readPlainScalar(state, nodeIndent, withinFlowCollection) { - var preceding, - following, - captureStart, - captureEnd, - hasPendingContent, - _line, - _lineStart, - _lineIndent, - _kind = state.kind, - _result = state.result, - ch; - - ch = state.input.charCodeAt(state.position); - - if (is_WS_OR_EOL(ch) || - is_FLOW_INDICATOR(ch) || - ch === 0x23/* # */ || - ch === 0x26/* & */ || - ch === 0x2A/* * */ || - ch === 0x21/* ! */ || - ch === 0x7C/* | */ || - ch === 0x3E/* > */ || - ch === 0x27/* ' */ || - ch === 0x22/* " */ || - ch === 0x25/* % */ || - ch === 0x40/* @ */ || - ch === 0x60/* ` */) { - return false; - } - - if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; - } - } - - state.kind = 'scalar'; - state.result = ''; - captureStart = captureEnd = state.position; - hasPendingContent = false; - - while (ch !== 0) { - if (ch === 0x3A/* : */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; - } - - } else if (ch === 0x23/* # */) { - preceding = state.input.charCodeAt(state.position - 1); - - if (is_WS_OR_EOL(preceding)) { - break; - } - - } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || - withinFlowCollection && is_FLOW_INDICATOR(ch)) { - break; - - } else if (is_EOL(ch)) { - _line = state.line; - _lineStart = state.lineStart; - _lineIndent = state.lineIndent; - skipSeparationSpace(state, false, -1); - - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state.input.charCodeAt(state.position); - continue; - } else { - state.position = captureEnd; - state.line = _line; - state.lineStart = _lineStart; - state.lineIndent = _lineIndent; - break; - } - } - - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false); - writeFoldedLines(state, state.line - _line); - captureStart = captureEnd = state.position; - hasPendingContent = false; - } - - if (!is_WHITE_SPACE(ch)) { - captureEnd = state.position + 1; - } - - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, captureEnd, false); - - if (state.result) { - return true; - } - - state.kind = _kind; - state.result = _result; - return false; -} - -function readSingleQuotedScalar(state, nodeIndent) { - var ch, - captureStart, captureEnd; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x27/* ' */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x27/* ' */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x27/* ' */) { - captureStart = state.position; - state.position++; - captureEnd = state.position; - } else { - return true; - } - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a single quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a single quoted scalar'); -} - -function readDoubleQuotedScalar(state, nodeIndent) { - var captureStart, - captureEnd, - hexLength, - hexResult, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x22/* " */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x22/* " */) { - captureSegment(state, captureStart, state.position, true); - state.position++; - return true; - - } else if (ch === 0x5C/* \ */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (is_EOL(ch)) { - skipSeparationSpace(state, false, nodeIndent); - - // TODO: rework to inline fn with no type cast? - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch]; - state.position++; - - } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; - - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position); - - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; - - } else { - throwError(state, 'expected hexadecimal character'); - } - } - - state.result += charFromCodepoint(hexResult); - - state.position++; - - } else { - throwError(state, 'unknown escape sequence'); - } - - captureStart = captureEnd = state.position; - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a double quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a double quoted scalar'); -} - -function readFlowCollection(state, nodeIndent) { - var readNext = true, - _line, - _tag = state.tag, - _result, - _anchor = state.anchor, - following, - terminator, - isPair, - isExplicitPair, - isMapping, - overridableKeys = {}, - keyNode, - keyTag, - valueNode, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x5B/* [ */) { - terminator = 0x5D;/* ] */ - isMapping = false; - _result = []; - } else if (ch === 0x7B/* { */) { - terminator = 0x7D;/* } */ - isMapping = true; - _result = {}; - } else { - return false; - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(++state.position); - - while (ch !== 0) { - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === terminator) { - state.position++; - state.tag = _tag; - state.anchor = _anchor; - state.kind = isMapping ? 'mapping' : 'sequence'; - state.result = _result; - return true; - } else if (!readNext) { - throwError(state, 'missed comma between flow collection entries'); - } - - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - - if (ch === 0x3F/* ? */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; - state.position++; - skipSeparationSpace(state, true, nodeIndent); - } - } - - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state.tag; - keyNode = state.result; - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { - isPair = true; - ch = state.input.charCodeAt(++state.position); - skipSeparationSpace(state, true, nodeIndent); - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state.result; - } - - if (isMapping) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); - } else if (isPair) { - _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); - } else { - _result.push(keyNode); - } - - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x2C/* , */) { - readNext = true; - ch = state.input.charCodeAt(++state.position); - } else { - readNext = false; - } - } - - throwError(state, 'unexpected end of the stream within a flow collection'); -} - -function readBlockScalar(state, nodeIndent) { - var captureStart, - folding, - chomping = CHOMPING_CLIP, - didReadContent = false, - detectedIndent = false, - textIndent = nodeIndent, - emptyLines = 0, - atMoreIndented = false, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x7C/* | */) { - folding = false; - } else if (ch === 0x3E/* > */) { - folding = true; - } else { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - - while (ch !== 0) { - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { - if (CHOMPING_CLIP === chomping) { - chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state, 'repeat of a chomping mode identifier'); - } - - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1; - detectedIndent = true; - } else { - throwError(state, 'repeat of an indentation width identifier'); - } - - } else { - break; - } - } - - if (is_WHITE_SPACE(ch)) { - do { ch = state.input.charCodeAt(++state.position); } - while (is_WHITE_SPACE(ch)); - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (!is_EOL(ch) && (ch !== 0)); - } - } - - while (ch !== 0) { - readLineBreak(state); - state.lineIndent = 0; - - ch = state.input.charCodeAt(state.position); - - while ((!detectedIndent || state.lineIndent < textIndent) && - (ch === 0x20/* Space */)) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent; - } - - if (is_EOL(ch)) { - emptyLines++; - continue; - } - - // End of the scalar. - if (state.lineIndent < textIndent) { - - // Perform the chomping. - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { // i.e. only if the scalar is not empty. - state.result += '\n'; - } - } - - // Break this `while` cycle and go to the funciton's epilogue. - break; - } - - // Folded style: use fancy rules to handle line breaks. - if (folding) { - - // Lines starting with white space characters (more-indented lines) are not folded. - if (is_WHITE_SPACE(ch)) { - atMoreIndented = true; - // except for the first content line (cf. Example 8.1) - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - - // End of more-indented block. - } else if (atMoreIndented) { - atMoreIndented = false; - state.result += common.repeat('\n', emptyLines + 1); - - // Just one line break - perceive as the same line. - } else if (emptyLines === 0) { - if (didReadContent) { // i.e. only if we have already read some scalar content. - state.result += ' '; - } - - // Several line breaks - perceive as different lines. - } else { - state.result += common.repeat('\n', emptyLines); - } - - // Literal style: just add exact number of line breaks between content lines. - } else { - // Keep all line breaks except the header line break. - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } - - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state.position; - - while (!is_EOL(ch) && (ch !== 0)) { - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, state.position, false); - } - - return true; -} - -function readBlockSequence(state, nodeIndent) { - var _line, - _tag = state.tag, - _anchor = state.anchor, - _result = [], - following, - detected = false, - ch; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - - if (ch !== 0x2D/* - */) { - break; - } - - following = state.input.charCodeAt(state.position + 1); - - if (!is_WS_OR_EOL(following)) { - break; - } - - detected = true; - state.position++; - - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null); - ch = state.input.charCodeAt(state.position); - continue; - } - } - - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state.result); - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a sequence entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'sequence'; - state.result = _result; - return true; - } - return false; -} - -function readBlockMapping(state, nodeIndent, flowIndent) { - var following, - allowCompact, - _line, - _pos, - _tag = state.tag, - _anchor = state.anchor, - _result = {}, - overridableKeys = {}, - keyTag = null, - keyNode = null, - valueNode = null, - atExplicitKey = false, - detected = false, - ch; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - following = state.input.charCodeAt(state.position + 1); - _line = state.line; // Save the current line. - _pos = state.position; - - // - // Explicit notation case. There are two separate blocks: - // first for the key (denoted by "?") and second for the value (denoted by ":") - // - if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { - - if (ch === 0x3F/* ? */) { - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = true; - allowCompact = true; - - } else if (atExplicitKey) { - // i.e. 0x3A/* : */ === character after the explicit key. - atExplicitKey = false; - allowCompact = true; - - } else { - throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); - } - - state.position += 1; - ch = following; - - // - // Implicit notation case. Flow-style node as the key first, then ":", and the value. - // - } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - - if (state.line === _line) { - ch = state.input.charCodeAt(state.position); - - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x3A/* : */) { - ch = state.input.charCodeAt(++state.position); - - if (!is_WS_OR_EOL(ch)) { - throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); - } - - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = false; - allowCompact = false; - keyTag = state.tag; - keyNode = state.result; - - } else if (detected) { - throwError(state, 'can not read an implicit mapping pair; a colon is missed'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - - } else if (detected) { - throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - - } else { - break; // Reading is done. Go to the epilogue. - } - - // - // Common reading code for both explicit and implicit notations. - // - if (state.line === _line || state.lineIndent > nodeIndent) { - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result; - } else { - valueNode = state.result; - } - } - - if (!atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos); - keyTag = keyNode = valueNode = null; - } - - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - } - - if (state.lineIndent > nodeIndent && (ch !== 0)) { - throwError(state, 'bad indentation of a mapping entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - // - // Epilogue. - // - - // Special case: last mapping's node contains only the key in explicit notation. - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); - } - - // Expose the resulting mapping. - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'mapping'; - state.result = _result; - } - - return detected; -} - -function readTagProperty(state) { - var _position, - isVerbatim = false, - isNamed = false, - tagHandle, - tagName, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x21/* ! */) return false; - - if (state.tag !== null) { - throwError(state, 'duplication of a tag property'); - } - - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x3C/* < */) { - isVerbatim = true; - ch = state.input.charCodeAt(++state.position); - - } else if (ch === 0x21/* ! */) { - isNamed = true; - tagHandle = '!!'; - ch = state.input.charCodeAt(++state.position); - - } else { - tagHandle = '!'; - } - - _position = state.position; - - if (isVerbatim) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && ch !== 0x3E/* > */); - - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position); - ch = state.input.charCodeAt(++state.position); - } else { - throwError(state, 'unexpected end of the stream within a verbatim tag'); - } - } else { - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - - if (ch === 0x21/* ! */) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1); - - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, 'named tag handle cannot contain such characters'); - } - - isNamed = true; - _position = state.position + 1; - } else { - throwError(state, 'tag suffix cannot contain exclamation marks'); - } - } - - ch = state.input.charCodeAt(++state.position); - } - - tagName = state.input.slice(_position, state.position); - - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, 'tag suffix cannot contain flow indicator characters'); - } - } - - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, 'tag name cannot contain such characters: ' + tagName); - } - - if (isVerbatim) { - state.tag = tagName; - - } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName; - - } else if (tagHandle === '!') { - state.tag = '!' + tagName; - - } else if (tagHandle === '!!') { - state.tag = 'tag:yaml.org,2002:' + tagName; - - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"'); - } - - return true; -} - -function readAnchorProperty(state) { - var _position, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x26/* & */) return false; - - if (state.anchor !== null) { - throwError(state, 'duplication of an anchor property'); - } - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an anchor node must contain at least one character'); - } - - state.anchor = state.input.slice(_position, state.position); - return true; -} - -function readAlias(state) { - var _position, alias, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x2A/* * */) return false; - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an alias node must contain at least one character'); - } - - alias = state.input.slice(_position, state.position); - - if (!state.anchorMap.hasOwnProperty(alias)) { - throwError(state, 'unidentified alias "' + alias + '"'); - } - - state.result = state.anchorMap[alias]; - skipSeparationSpace(state, true, -1); - return true; -} - -function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, - allowBlockScalars, - allowBlockCollections, - indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } - } - - if (indentStatus === 1) { - while (readTagProperty(state) || readAnchorProperty(state)) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true; - allowBlockCollections = allowBlockStyles; - - if (state.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } else { - allowBlockCollections = false; - } - } - } - - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } - - blockIndent = state.position - state.lineStart; - - if (indentStatus === 1) { - if (allowBlockCollections && - (readBlockSequence(state, blockIndent) || - readBlockMapping(state, blockIndent, flowIndent)) || - readFlowCollection(state, flowIndent)) { - hasContent = true; - } else { - if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || - readSingleQuotedScalar(state, flowIndent) || - readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true; - - } else if (readAlias(state)) { - hasContent = true; - - if (state.tag !== null || state.anchor !== null) { - throwError(state, 'alias node should not have any properties'); - } - - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true; - - if (state.tag === null) { - state.tag = '?'; - } - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } else if (indentStatus === 0) { - // Special case: block sequences are allowed to have same indentation level as the parent. - // http://www.yaml.org/spec/1.2/spec.html#id2799784 - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); - } - } - - if (state.tag !== null && state.tag !== '!') { - if (state.tag === '?') { - for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type = state.implicitTypes[typeIndex]; - - // Implicit resolving is not allowed for non-scalar types, and '?' - // non-specific tag is only assigned to plain scalars. So, it isn't - // needed to check for 'kind' conformity. - - if (type.resolve(state.result)) { // `state.result` updated in resolver if matched - state.result = type.construct(state.result); - state.tag = type.tag; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - break; - } - } - } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { - type = state.typeMap[state.kind || 'fallback'][state.tag]; - - if (state.result !== null && type.kind !== state.kind) { - throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); - } - - if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched - throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); - } else { - state.result = type.construct(state.result); - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } else { - throwError(state, 'unknown tag !<' + state.tag + '>'); - } - } - - if (state.listener !== null) { - state.listener('close', state); - } - return state.tag !== null || state.anchor !== null || hasContent; -} - -function readDocument(state) { - var documentStart = state.position, - _position, - directiveName, - directiveArgs, - hasDirectives = false, - ch; - - state.version = null; - state.checkLineBreaks = state.legacy; - state.tagMap = {}; - state.anchorMap = {}; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if (state.lineIndent > 0 || ch !== 0x25/* % */) { - break; - } - - hasDirectives = true; - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveName = state.input.slice(_position, state.position); - directiveArgs = []; - - if (directiveName.length < 1) { - throwError(state, 'directive name must not be less than one character in length'); - } - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && !is_EOL(ch)); - break; - } - - if (is_EOL(ch)) break; - - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveArgs.push(state.input.slice(_position, state.position)); - } - - if (ch !== 0) readLineBreak(state); - - if (_hasOwnProperty.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs); - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"'); - } - } - - skipSeparationSpace(state, true, -1); - - if (state.lineIndent === 0 && - state.input.charCodeAt(state.position) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - - } else if (hasDirectives) { - throwError(state, 'directives end mark is expected'); - } - - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state, true, -1); - - if (state.checkLineBreaks && - PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, 'non-ASCII line breaks are interpreted as content'); - } - - state.documents.push(state.result); - - if (state.position === state.lineStart && testDocumentSeparator(state)) { - - if (state.input.charCodeAt(state.position) === 0x2E/* . */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - } - return; - } - - if (state.position < (state.length - 1)) { - throwError(state, 'end of the stream or a document separator is expected'); - } else { - return; - } -} - - -function loadDocuments(input, options) { - input = String(input); - options = options || {}; - - if (input.length !== 0) { - - // Add tailing `\n` if not exists - if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && - input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { - input += '\n'; - } - - // Strip BOM - if (input.charCodeAt(0) === 0xFEFF) { - input = input.slice(1); - } - } - - var state = new State(input, options); - - // Use 0 as string terminator. That significantly simplifies bounds check. - state.input += '\0'; - - while (state.input.charCodeAt(state.position) === 0x20/* Space */) { - state.lineIndent += 1; - state.position += 1; - } - - while (state.position < (state.length - 1)) { - readDocument(state); - } - - return state.documents; -} - - -function loadAll(input, iterator, options) { - var documents = loadDocuments(input, options), index, length; - - if (typeof iterator !== 'function') { - return documents; - } - - for (index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]); - } -} - - -function load(input, options) { - var documents = loadDocuments(input, options); - - if (documents.length === 0) { - /*eslint-disable no-undefined*/ - return undefined; - } else if (documents.length === 1) { - return documents[0]; - } - throw new YAMLException('expected a single document in the stream, but found more'); -} - - -function safeLoadAll(input, output, options) { - if (typeof output === 'function') { - loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); - } else { - return loadAll(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); - } -} - - -function safeLoad(input, options) { - return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} - - -module.exports.loadAll = loadAll; -module.exports.load = load; -module.exports.safeLoadAll = safeLoadAll; -module.exports.safeLoad = safeLoad; - -},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(require,module,exports){ -'use strict'; - - -var common = require('./common'); - - -function Mark(name, buffer, position, line, column) { - this.name = name; - this.buffer = buffer; - this.position = position; - this.line = line; - this.column = column; -} - - -Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { - var head, start, tail, end, snippet; - - if (!this.buffer) return null; - - indent = indent || 4; - maxLength = maxLength || 75; - - head = ''; - start = this.position; - - while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { - start -= 1; - if (this.position - start > (maxLength / 2 - 1)) { - head = ' ... '; - start += 5; - break; - } - } - - tail = ''; - end = this.position; - - while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { - end += 1; - if (end - this.position > (maxLength / 2 - 1)) { - tail = ' ... '; - end -= 5; - break; - } - } - - snippet = this.buffer.slice(start, end); - - return common.repeat(' ', indent) + head + snippet + tail + '\n' + - common.repeat(' ', indent + this.position - start + head.length) + '^'; -}; - - -Mark.prototype.toString = function toString(compact) { - var snippet, where = ''; - - if (this.name) { - where += 'in "' + this.name + '" '; - } - - where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); - - if (!compact) { - snippet = this.getSnippet(); - - if (snippet) { - where += ':\n' + snippet; - } - } - - return where; -}; - - -module.exports = Mark; - -},{"./common":2}],7:[function(require,module,exports){ -'use strict'; - -/*eslint-disable max-len*/ - -var common = require('./common'); -var YAMLException = require('./exception'); -var Type = require('./type'); - - -function compileList(schema, name, result) { - var exclude = []; - - schema.include.forEach(function (includedSchema) { - result = compileList(includedSchema, name, result); - }); - - schema[name].forEach(function (currentType) { - result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { - exclude.push(previousIndex); - } - }); - - result.push(currentType); - }); - - return result.filter(function (type, index) { - return exclude.indexOf(index) === -1; - }); -} - - -function compileMap(/* lists... */) { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {} - }, index, length; - - function collectType(type) { - result[type.kind][type.tag] = result['fallback'][type.tag] = type; - } - - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); - } - return result; -} - - -function Schema(definition) { - this.include = definition.include || []; - this.implicit = definition.implicit || []; - this.explicit = definition.explicit || []; - - this.implicit.forEach(function (type) { - if (type.loadKind && type.loadKind !== 'scalar') { - throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); - } - }); - - this.compiledImplicit = compileList(this, 'implicit', []); - this.compiledExplicit = compileList(this, 'explicit', []); - this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); -} - - -Schema.DEFAULT = null; - - -Schema.create = function createSchema() { - var schemas, types; - - switch (arguments.length) { - case 1: - schemas = Schema.DEFAULT; - types = arguments[0]; - break; - - case 2: - schemas = arguments[0]; - types = arguments[1]; - break; - - default: - throw new YAMLException('Wrong number of arguments for Schema.create function'); - } - - schemas = common.toArray(schemas); - types = common.toArray(types); - - if (!schemas.every(function (schema) { return schema instanceof Schema; })) { - throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); - } - - if (!types.every(function (type) { return type instanceof Type; })) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - - return new Schema({ - include: schemas, - explicit: types - }); -}; - - -module.exports = Schema; - -},{"./common":2,"./exception":4,"./type":13}],8:[function(require,module,exports){ -// Standard YAML's Core schema. -// http://www.yaml.org/spec/1.2/spec.html#id2804923 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, Core schema has no distinctions from JSON schema is JS-YAML. - - -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = new Schema({ - include: [ - require('./json') - ] -}); - -},{"../schema":7,"./json":12}],9:[function(require,module,exports){ -// JS-YAML's default schema for `load` function. -// It is not described in the YAML specification. -// -// This schema is based on JS-YAML's default safe schema and includes -// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function. -// -// Also this schema is used as default base schema at `Schema.create` function. - - -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = Schema.DEFAULT = new Schema({ - include: [ - require('./default_safe') - ], - explicit: [ - require('../type/js/undefined'), - require('../type/js/regexp'), - require('../type/js/function') - ] -}); - -},{"../schema":7,"../type/js/function":18,"../type/js/regexp":19,"../type/js/undefined":20,"./default_safe":10}],10:[function(require,module,exports){ -// JS-YAML's default schema for `safeLoad` function. -// It is not described in the YAML specification. -// -// This schema is based on standard YAML's Core schema and includes most of -// extra types described at YAML tag repository. (http://yaml.org/type/) - - -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = new Schema({ - include: [ - require('./core') - ], - implicit: [ - require('../type/timestamp'), - require('../type/merge') - ], - explicit: [ - require('../type/binary'), - require('../type/omap'), - require('../type/pairs'), - require('../type/set') - ] -}); - -},{"../schema":7,"../type/binary":14,"../type/merge":22,"../type/omap":24,"../type/pairs":25,"../type/set":27,"../type/timestamp":29,"./core":8}],11:[function(require,module,exports){ -// Standard YAML's Failsafe schema. -// http://www.yaml.org/spec/1.2/spec.html#id2802346 - - -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = new Schema({ - explicit: [ - require('../type/str'), - require('../type/seq'), - require('../type/map') - ] -}); - -},{"../schema":7,"../type/map":21,"../type/seq":26,"../type/str":28}],12:[function(require,module,exports){ -// Standard YAML's JSON schema. -// http://www.yaml.org/spec/1.2/spec.html#id2803231 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, this schema is not such strict as defined in the YAML specification. -// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. - - -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = new Schema({ - include: [ - require('./failsafe') - ], - implicit: [ - require('../type/null'), - require('../type/bool'), - require('../type/int'), - require('../type/float') - ] -}); - -},{"../schema":7,"../type/bool":15,"../type/float":16,"../type/int":17,"../type/null":23,"./failsafe":11}],13:[function(require,module,exports){ -'use strict'; - -var YAMLException = require('./exception'); - -var TYPE_CONSTRUCTOR_OPTIONS = [ - 'kind', - 'resolve', - 'construct', - 'instanceOf', - 'predicate', - 'represent', - 'defaultStyle', - 'styleAliases' -]; - -var YAML_NODE_KINDS = [ - 'scalar', - 'sequence', - 'mapping' -]; - -function compileStyleAliases(map) { - var result = {}; - - if (map !== null) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style; - }); - }); - } - - return result; -} - -function Type(tag, options) { - options = options || {}; - - Object.keys(options).forEach(function (name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); - } - }); - - // TODO: Add tag format check. - this.tag = tag; - this.kind = options['kind'] || null; - this.resolve = options['resolve'] || function () { return true; }; - this.construct = options['construct'] || function (data) { return data; }; - this.instanceOf = options['instanceOf'] || null; - this.predicate = options['predicate'] || null; - this.represent = options['represent'] || null; - this.defaultStyle = options['defaultStyle'] || null; - this.styleAliases = compileStyleAliases(options['styleAliases'] || null); - - if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { - throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } -} - -module.exports = Type; - -},{"./exception":4}],14:[function(require,module,exports){ -'use strict'; - -/*eslint-disable no-bitwise*/ - -var NodeBuffer; - -try { - // A trick for browserified version, to not include `Buffer` shim - var _require = require; - NodeBuffer = _require('buffer').Buffer; -} catch (__) {} - -var Type = require('../type'); - - -// [ 64, 65, 66 ] -> [ padding, CR, LF ] -var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; - - -function resolveYamlBinary(data) { - if (data === null) return false; - - var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; - - // Convert one by one. - for (idx = 0; idx < max; idx++) { - code = map.indexOf(data.charAt(idx)); - - // Skip CR/LF - if (code > 64) continue; - - // Fail on illegal characters - if (code < 0) return false; - - bitlen += 6; - } - - // If there are any bits left, source was corrupted - return (bitlen % 8) === 0; -} - -function constructYamlBinary(data) { - var idx, tailbits, - input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan - max = input.length, - map = BASE64_MAP, - bits = 0, - result = []; - - // Collect by 6*4 bits (3 bytes) - - for (idx = 0; idx < max; idx++) { - if ((idx % 4 === 0) && idx) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } - - bits = (bits << 6) | map.indexOf(input.charAt(idx)); - } - - // Dump tail - - tailbits = (max % 4) * 6; - - if (tailbits === 0) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } else if (tailbits === 18) { - result.push((bits >> 10) & 0xFF); - result.push((bits >> 2) & 0xFF); - } else if (tailbits === 12) { - result.push((bits >> 4) & 0xFF); - } - - // Wrap into Buffer for NodeJS and leave Array for browser - if (NodeBuffer) { - // Support node 6.+ Buffer API when available - return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result); - } - - return result; -} - -function representYamlBinary(object /*, style*/) { - var result = '', bits = 0, idx, tail, - max = object.length, - map = BASE64_MAP; - - // Convert every three bytes to 4 ASCII characters. - - for (idx = 0; idx < max; idx++) { - if ((idx % 3 === 0) && idx) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } - - bits = (bits << 8) + object[idx]; - } - - // Dump tail - - tail = max % 3; - - if (tail === 0) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } else if (tail === 2) { - result += map[(bits >> 10) & 0x3F]; - result += map[(bits >> 4) & 0x3F]; - result += map[(bits << 2) & 0x3F]; - result += map[64]; - } else if (tail === 1) { - result += map[(bits >> 2) & 0x3F]; - result += map[(bits << 4) & 0x3F]; - result += map[64]; - result += map[64]; - } - - return result; -} - -function isBinary(object) { - return NodeBuffer && NodeBuffer.isBuffer(object); -} - -module.exports = new Type('tag:yaml.org,2002:binary', { - kind: 'scalar', - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}); - -},{"../type":13}],15:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -function resolveYamlBoolean(data) { - if (data === null) return false; - - var max = data.length; - - return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || - (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); -} - -function constructYamlBoolean(data) { - return data === 'true' || - data === 'True' || - data === 'TRUE'; -} - -function isBoolean(object) { - return Object.prototype.toString.call(object) === '[object Boolean]'; -} - -module.exports = new Type('tag:yaml.org,2002:bool', { - kind: 'scalar', - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: function (object) { return object ? 'true' : 'false'; }, - uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, - camelcase: function (object) { return object ? 'True' : 'False'; } - }, - defaultStyle: 'lowercase' -}); - -},{"../type":13}],16:[function(require,module,exports){ -'use strict'; - -var common = require('../common'); -var Type = require('../type'); - -var YAML_FLOAT_PATTERN = new RegExp( - // 2.5e4, 2.5 and integers - '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + - // .2e4, .2 - // special case, seems not from spec - '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + - // 20:59 - '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + - // .inf - '|[-+]?\\.(?:inf|Inf|INF)' + - // .nan - '|\\.(?:nan|NaN|NAN))$'); - -function resolveYamlFloat(data) { - if (data === null) return false; - - if (!YAML_FLOAT_PATTERN.test(data) || - // Quick hack to not allow integers end with `_` - // Probably should update regexp & check speed - data[data.length - 1] === '_') { - return false; - } - - return true; -} - -function constructYamlFloat(data) { - var value, sign, base, digits; - - value = data.replace(/_/g, '').toLowerCase(); - sign = value[0] === '-' ? -1 : 1; - digits = []; - - if ('+-'.indexOf(value[0]) >= 0) { - value = value.slice(1); - } - - if (value === '.inf') { - return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; - - } else if (value === '.nan') { - return NaN; - - } else if (value.indexOf(':') >= 0) { - value.split(':').forEach(function (v) { - digits.unshift(parseFloat(v, 10)); - }); - - value = 0.0; - base = 1; - - digits.forEach(function (d) { - value += d * base; - base *= 60; - }); - - return sign * value; - - } - return sign * parseFloat(value, 10); -} - - -var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; - -function representYamlFloat(object, style) { - var res; - - if (isNaN(object)) { - switch (style) { - case 'lowercase': return '.nan'; - case 'uppercase': return '.NAN'; - case 'camelcase': return '.NaN'; - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '.inf'; - case 'uppercase': return '.INF'; - case 'camelcase': return '.Inf'; - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '-.inf'; - case 'uppercase': return '-.INF'; - case 'camelcase': return '-.Inf'; - } - } else if (common.isNegativeZero(object)) { - return '-0.0'; - } - - res = object.toString(10); - - // JS stringifier can build scientific format without dots: 5e-100, - // while YAML requres dot: 5.e-100. Fix it with simple hack - - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; -} - -function isFloat(object) { - return (Object.prototype.toString.call(object) === '[object Number]') && - (object % 1 !== 0 || common.isNegativeZero(object)); -} - -module.exports = new Type('tag:yaml.org,2002:float', { - kind: 'scalar', - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: 'lowercase' -}); - -},{"../common":2,"../type":13}],17:[function(require,module,exports){ -'use strict'; - -var common = require('../common'); -var Type = require('../type'); - -function isHexCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || - ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || - ((0x61/* a */ <= c) && (c <= 0x66/* f */)); -} - -function isOctCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); -} - -function isDecCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); -} - -function resolveYamlInteger(data) { - if (data === null) return false; - - var max = data.length, - index = 0, - hasDigits = false, - ch; - - if (!max) return false; - - ch = data[index]; - - // sign - if (ch === '-' || ch === '+') { - ch = data[++index]; - } - - if (ch === '0') { - // 0 - if (index + 1 === max) return true; - ch = data[++index]; - - // base 2, base 8, base 16 - - if (ch === 'b') { - // base 2 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (ch !== '0' && ch !== '1') return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - - if (ch === 'x') { - // base 16 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isHexCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - // base 8 - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isOctCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - // base 10 (except 0) or base 60 - - // value should not start with `_`; - if (ch === '_') return false; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (ch === ':') break; - if (!isDecCode(data.charCodeAt(index))) { - return false; - } - hasDigits = true; - } - - // Should have digits and should not end with `_` - if (!hasDigits || ch === '_') return false; - - // if !base60 - done; - if (ch !== ':') return true; - - // base60 almost not used, no needs to optimize - return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); -} - -function constructYamlInteger(data) { - var value = data, sign = 1, ch, base, digits = []; - - if (value.indexOf('_') !== -1) { - value = value.replace(/_/g, ''); - } - - ch = value[0]; - - if (ch === '-' || ch === '+') { - if (ch === '-') sign = -1; - value = value.slice(1); - ch = value[0]; - } - - if (value === '0') return 0; - - if (ch === '0') { - if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); - if (value[1] === 'x') return sign * parseInt(value, 16); - return sign * parseInt(value, 8); - } - - if (value.indexOf(':') !== -1) { - value.split(':').forEach(function (v) { - digits.unshift(parseInt(v, 10)); - }); - - value = 0; - base = 1; - - digits.forEach(function (d) { - value += (d * base); - base *= 60; - }); - - return sign * value; - - } - - return sign * parseInt(value, 10); -} - -function isInteger(object) { - return (Object.prototype.toString.call(object)) === '[object Number]' && - (object % 1 === 0 && !common.isNegativeZero(object)); -} - -module.exports = new Type('tag:yaml.org,2002:int', { - kind: 'scalar', - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, - octal: function (obj) { return obj >= 0 ? '0' + obj.toString(8) : '-0' + obj.toString(8).slice(1); }, - decimal: function (obj) { return obj.toString(10); }, - /* eslint-disable max-len */ - hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } - }, - defaultStyle: 'decimal', - styleAliases: { - binary: [ 2, 'bin' ], - octal: [ 8, 'oct' ], - decimal: [ 10, 'dec' ], - hexadecimal: [ 16, 'hex' ] - } -}); - -},{"../common":2,"../type":13}],18:[function(require,module,exports){ -'use strict'; - -var esprima; - -// Browserified version does not have esprima -// -// 1. For node.js just require module as deps -// 2. For browser try to require mudule via external AMD system. -// If not found - try to fallback to window.esprima. If not -// found too - then fail to parse. -// -try { - // workaround to exclude package from browserify list. - var _require = require; - esprima = _require('esprima'); -} catch (_) { - /*global window */ - if (typeof window !== 'undefined') esprima = window.esprima; -} - -var Type = require('../../type'); - -function resolveJavascriptFunction(data) { - if (data === null) return false; - - try { - var source = '(' + data + ')', - ast = esprima.parse(source, { range: true }); - - if (ast.type !== 'Program' || - ast.body.length !== 1 || - ast.body[0].type !== 'ExpressionStatement' || - (ast.body[0].expression.type !== 'ArrowFunctionExpression' && - ast.body[0].expression.type !== 'FunctionExpression')) { - return false; - } - - return true; - } catch (err) { - return false; - } -} - -function constructJavascriptFunction(data) { - /*jslint evil:true*/ - - var source = '(' + data + ')', - ast = esprima.parse(source, { range: true }), - params = [], - body; - - if (ast.type !== 'Program' || - ast.body.length !== 1 || - ast.body[0].type !== 'ExpressionStatement' || - (ast.body[0].expression.type !== 'ArrowFunctionExpression' && - ast.body[0].expression.type !== 'FunctionExpression')) { - throw new Error('Failed to resolve function'); - } - - ast.body[0].expression.params.forEach(function (param) { - params.push(param.name); - }); - - body = ast.body[0].expression.body.range; - - // Esprima's ranges include the first '{' and the last '}' characters on - // function expressions. So cut them out. - if (ast.body[0].expression.body.type === 'BlockStatement') { - /*eslint-disable no-new-func*/ - return new Function(params, source.slice(body[0] + 1, body[1] - 1)); - } - // ES6 arrow functions can omit the BlockStatement. In that case, just return - // the body. - /*eslint-disable no-new-func*/ - return new Function(params, 'return ' + source.slice(body[0], body[1])); -} - -function representJavascriptFunction(object /*, style*/) { - return object.toString(); -} - -function isFunction(object) { - return Object.prototype.toString.call(object) === '[object Function]'; -} - -module.exports = new Type('tag:yaml.org,2002:js/function', { - kind: 'scalar', - resolve: resolveJavascriptFunction, - construct: constructJavascriptFunction, - predicate: isFunction, - represent: representJavascriptFunction -}); - -},{"../../type":13}],19:[function(require,module,exports){ -'use strict'; - -var Type = require('../../type'); - -function resolveJavascriptRegExp(data) { - if (data === null) return false; - if (data.length === 0) return false; - - var regexp = data, - tail = /\/([gim]*)$/.exec(data), - modifiers = ''; - - // if regexp starts with '/' it can have modifiers and must be properly closed - // `/foo/gim` - modifiers tail can be maximum 3 chars - if (regexp[0] === '/') { - if (tail) modifiers = tail[1]; - - if (modifiers.length > 3) return false; - // if expression starts with /, is should be properly terminated - if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; - } - - return true; -} - -function constructJavascriptRegExp(data) { - var regexp = data, - tail = /\/([gim]*)$/.exec(data), - modifiers = ''; - - // `/foo/gim` - tail can be maximum 4 chars - if (regexp[0] === '/') { - if (tail) modifiers = tail[1]; - regexp = regexp.slice(1, regexp.length - modifiers.length - 1); - } - - return new RegExp(regexp, modifiers); -} - -function representJavascriptRegExp(object /*, style*/) { - var result = '/' + object.source + '/'; - - if (object.global) result += 'g'; - if (object.multiline) result += 'm'; - if (object.ignoreCase) result += 'i'; - - return result; -} - -function isRegExp(object) { - return Object.prototype.toString.call(object) === '[object RegExp]'; -} - -module.exports = new Type('tag:yaml.org,2002:js/regexp', { - kind: 'scalar', - resolve: resolveJavascriptRegExp, - construct: constructJavascriptRegExp, - predicate: isRegExp, - represent: representJavascriptRegExp -}); - -},{"../../type":13}],20:[function(require,module,exports){ -'use strict'; - -var Type = require('../../type'); - -function resolveJavascriptUndefined() { - return true; -} - -function constructJavascriptUndefined() { - /*eslint-disable no-undefined*/ - return undefined; -} - -function representJavascriptUndefined() { - return ''; -} - -function isUndefined(object) { - return typeof object === 'undefined'; -} - -module.exports = new Type('tag:yaml.org,2002:js/undefined', { - kind: 'scalar', - resolve: resolveJavascriptUndefined, - construct: constructJavascriptUndefined, - predicate: isUndefined, - represent: representJavascriptUndefined -}); - -},{"../../type":13}],21:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -module.exports = new Type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return data !== null ? data : {}; } -}); - -},{"../type":13}],22:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -function resolveYamlMerge(data) { - return data === '<<' || data === null; -} - -module.exports = new Type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge -}); - -},{"../type":13}],23:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -function resolveYamlNull(data) { - if (data === null) return true; - - var max = data.length; - - return (max === 1 && data === '~') || - (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); -} - -function constructYamlNull() { - return null; -} - -function isNull(object) { - return object === null; -} - -module.exports = new Type('tag:yaml.org,2002:null', { - kind: 'scalar', - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function () { return '~'; }, - lowercase: function () { return 'null'; }, - uppercase: function () { return 'NULL'; }, - camelcase: function () { return 'Null'; } - }, - defaultStyle: 'lowercase' -}); - -},{"../type":13}],24:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -var _hasOwnProperty = Object.prototype.hasOwnProperty; -var _toString = Object.prototype.toString; - -function resolveYamlOmap(data) { - if (data === null) return true; - - var objectKeys = [], index, length, pair, pairKey, pairHasKey, - object = data; - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - pairHasKey = false; - - if (_toString.call(pair) !== '[object Object]') return false; - - for (pairKey in pair) { - if (_hasOwnProperty.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true; - else return false; - } - } - - if (!pairHasKey) return false; - - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); - else return false; - } - - return true; -} - -function constructYamlOmap(data) { - return data !== null ? data : []; -} - -module.exports = new Type('tag:yaml.org,2002:omap', { - kind: 'sequence', - resolve: resolveYamlOmap, - construct: constructYamlOmap -}); - -},{"../type":13}],25:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -var _toString = Object.prototype.toString; - -function resolveYamlPairs(data) { - if (data === null) return true; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - if (_toString.call(pair) !== '[object Object]') return false; - - keys = Object.keys(pair); - - if (keys.length !== 1) return false; - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return true; -} - -function constructYamlPairs(data) { - if (data === null) return []; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - keys = Object.keys(pair); - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return result; -} - -module.exports = new Type('tag:yaml.org,2002:pairs', { - kind: 'sequence', - resolve: resolveYamlPairs, - construct: constructYamlPairs -}); - -},{"../type":13}],26:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -module.exports = new Type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return data !== null ? data : []; } -}); - -},{"../type":13}],27:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - -function resolveYamlSet(data) { - if (data === null) return true; - - var key, object = data; - - for (key in object) { - if (_hasOwnProperty.call(object, key)) { - if (object[key] !== null) return false; - } - } - - return true; -} - -function constructYamlSet(data) { - return data !== null ? data : {}; -} - -module.exports = new Type('tag:yaml.org,2002:set', { - kind: 'mapping', - resolve: resolveYamlSet, - construct: constructYamlSet -}); - -},{"../type":13}],28:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -module.exports = new Type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return data !== null ? data : ''; } -}); - -},{"../type":13}],29:[function(require,module,exports){ -'use strict'; - -var Type = require('../type'); - -var YAML_DATE_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9])' + // [2] month - '-([0-9][0-9])$'); // [3] day - -var YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour - '(?::([0-9][0-9]))?))?$'); // [11] tz_minute - -function resolveYamlTimestamp(data) { - if (data === null) return false; - if (YAML_DATE_REGEXP.exec(data) !== null) return true; - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; - return false; -} - -function constructYamlTimestamp(data) { - var match, year, month, day, hour, minute, second, fraction = 0, - delta = null, tz_hour, tz_minute, date; - - match = YAML_DATE_REGEXP.exec(data); - if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); - - if (match === null) throw new Error('Date resolve error'); - - // match: [1] year [2] month [3] day - - year = +(match[1]); - month = +(match[2]) - 1; // JS month starts with 0 - day = +(match[3]); - - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)); - } - - // match: [4] hour [5] minute [6] second [7] fraction - - hour = +(match[4]); - minute = +(match[5]); - second = +(match[6]); - - if (match[7]) { - fraction = match[7].slice(0, 3); - while (fraction.length < 3) { // milli-seconds - fraction += '0'; - } - fraction = +fraction; - } - - // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute - - if (match[9]) { - tz_hour = +(match[10]); - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds - if (match[9] === '-') delta = -delta; - } - - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - - if (delta) date.setTime(date.getTime() - delta); - - return date; -} - -function representYamlTimestamp(object /*, style*/) { - return object.toISOString(); -} - -module.exports = new Type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}); - -},{"../type":13}],"/":[function(require,module,exports){ -'use strict'; - - -var yaml = require('./lib/js-yaml.js'); - - -module.exports = yaml; - -},{"./lib/js-yaml.js":1}]},{},[])("/") -}); diff --git a/node_modules/js-yaml/dist/js-yaml.min.js b/node_modules/js-yaml/dist/js-yaml.min.js deleted file mode 100644 index 0623500e..00000000 --- a/node_modules/js-yaml/dist/js-yaml.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).jsyaml=e()}}(function(){return function o(a,s,c){function u(t,e){if(!s[t]){if(!a[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}var r=s[t]={exports:{}};a[t][0].call(r.exports,function(e){return u(a[t][1][e]||e)},r,r.exports,o,a,s,c)}return s[t].exports}for(var l="function"==typeof require&&require,e=0;e=i.flowLevel;switch(H(r,n,i.indent,t,function(e){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n"+V(r,i.indent)+Z(L(function(t,n){var e,i,r=/(\n+)([^\n]*)/g,o=function(){var e=t.indexOf("\n");return e=-1!==e?e:t.length,r.lastIndex=e,z(t.slice(0,e),n)}(),a="\n"===t[0]||" "===t[0];for(;i=r.exec(t);){var s=i[1],c=i[2];e=" "===c[0],o+=s+(a||e||""===c?"":"\n")+z(c,n),a=e}return o}(r,t),e));case $:return'"'+function(e){for(var t,n,i,r="",o=0;ot&&o tag resolver accepts not "'+c+'" style');i=s.represent[c](t,c)}e.dump=i}return!0}return!1}function Q(e,t,n,i,r,o){e.tag=null,e.dump=n,J(e,n,!1)||J(e,n,!0);var a=p.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var s,c,u="[object Object]"===a||"[object Array]"===a;if(u&&(c=-1!==(s=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&0 "+e.dump)}return!0}function X(e,t){var n,i,r=[],o=[];for(function e(t,n,i){var r,o,a;if(null!==t&&"object"==typeof t)if(-1!==(o=n.indexOf(t)))-1===i.indexOf(o)&&i.push(o);else if(n.push(t),Array.isArray(t))for(o=0,a=t.length;ot)&&0!==i)N(e,"bad indentation of a sequence entry");else if(e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt)&&($(e,t,b,!0,r)&&(m?d=e.result:h=e.result),m||(U(e,l,p,f,d,h,o,a),f=d=h=null),Y(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)N(e,"bad indentation of a mapping entry");else if(e.lineIndentl&&(l=e.lineIndent),j(o))p++;else{if(e.lineIndent>10),56320+(c-65536&1023)),e.position++}else N(e,"unknown escape sequence");n=i=e.position}else j(s)?(L(e,n,i,!0),B(e,Y(e,!1,t)),n=i=e.position):e.position===e.lineStart&&R(e)?N(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}N(e,"unexpected end of the stream within a double quoted scalar")}(e,p)?m=!0:!function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!I(i)&&!O(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&N(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||N(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],Y(e,!0,-1),!0}(e)?function(e,t,n){var i,r,o,a,s,c,u,l,p=e.kind,f=e.result;if(I(l=e.input.charCodeAt(e.position))||O(l)||35===l||38===l||42===l||33===l||124===l||62===l||39===l||34===l||37===l||64===l||96===l)return!1;if((63===l||45===l)&&(I(i=e.input.charCodeAt(e.position+1))||n&&O(i)))return!1;for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==l;){if(58===l){if(I(i=e.input.charCodeAt(e.position+1))||n&&O(i))break}else if(35===l){if(I(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&R(e)||n&&O(l))break;if(j(l)){if(s=e.line,c=e.lineStart,u=e.lineIndent,Y(e,!1,-1),e.lineIndent>=t){a=!0,l=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=c,e.lineIndent=u;break}}a&&(L(e,r,o,!1),B(e,e.line-s),r=o=e.position,a=!1),S(l)||(o=e.position+1),l=e.input.charCodeAt(++e.position)}return L(e,r,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,p,x===n)&&(m=!0,null===e.tag&&(e.tag="?")):(m=!0,null===e.tag&&null===e.anchor||N(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(m=s&&P(e,f))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(c=0,u=e.implicitTypes.length;c tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):N(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):N(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||m}function H(e){var t,n,i,r,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(r=e.input.charCodeAt(e.position))&&(Y(e,!0,-1),r=e.input.charCodeAt(e.position),!(0t/2-1){n=" ... ",i+=5;break}for(r="",o=this.position;ot/2-1){r=" ... ",o-=5;break}return a=this.buffer.slice(i,o),s.repeat(" ",e)+n+a+r+"\n"+s.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},t.exports=i},{"./common":2}],7:[function(e,t,n){"use strict";var i=e("./common"),r=e("./exception"),o=e("./type");function a(e,t,i){var r=[];return e.include.forEach(function(e){i=a(e,t,i)}),e[t].forEach(function(n){i.forEach(function(e,t){e.tag===n.tag&&e.kind===n.kind&&r.push(t)}),i.push(n)}),i.filter(function(e,t){return-1===r.indexOf(t)})}function s(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=a(this,"implicit",[]),this.compiledExplicit=a(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{}};function i(e){n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(i.charAt(t));return 0==(n=r%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18==n?(s.push(a>>10&255),s.push(a>>2&255)):12==n&&s.push(a>>4&255),c?c.from?c.from(s):new c(s):s},predicate:function(e){return c&&c.isBuffer(e)},represent:function(e){var t,n,i="",r=0,o=e.length,a=u;for(t=0;t>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t];return 0==(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2==n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1==n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}})},{"../type":13}],15:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(e,t,n){"use strict";var i=e("../common"),r=e("../type"),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var a=/^[-+]?[0-9]+e/;t.exports=new r("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,i,r;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,r=[],0<="+-".indexOf(t[0])&&(t=t.slice(1)),".inf"===t?1==n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:0<=t.indexOf(":")?(t.split(":").forEach(function(e){r.unshift(parseFloat(e,10))}),t=0,i=1,r.forEach(function(e){t+=e*i,i*=60}),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||i.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(e,t,n){"use strict";var i=e("../common"),r=e("../type");t.exports=new r("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i,r,o=e.length,a=0,s=!1;if(!o)return!1;if("-"!==(t=e[a])&&"+"!==t||(t=e[++a]),"0"===t){if(a+1===o)return!0;if("b"===(t=e[++a])){for(a++;a */ -var CHAR_QUESTION = 0x3F; /* ? */ -var CHAR_COMMERCIAL_AT = 0x40; /* @ */ -var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ -var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ -var CHAR_GRAVE_ACCENT = 0x60; /* ` */ -var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ -var CHAR_VERTICAL_LINE = 0x7C; /* | */ -var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ - -var ESCAPE_SEQUENCES = {}; - -ESCAPE_SEQUENCES[0x00] = '\\0'; -ESCAPE_SEQUENCES[0x07] = '\\a'; -ESCAPE_SEQUENCES[0x08] = '\\b'; -ESCAPE_SEQUENCES[0x09] = '\\t'; -ESCAPE_SEQUENCES[0x0A] = '\\n'; -ESCAPE_SEQUENCES[0x0B] = '\\v'; -ESCAPE_SEQUENCES[0x0C] = '\\f'; -ESCAPE_SEQUENCES[0x0D] = '\\r'; -ESCAPE_SEQUENCES[0x1B] = '\\e'; -ESCAPE_SEQUENCES[0x22] = '\\"'; -ESCAPE_SEQUENCES[0x5C] = '\\\\'; -ESCAPE_SEQUENCES[0x85] = '\\N'; -ESCAPE_SEQUENCES[0xA0] = '\\_'; -ESCAPE_SEQUENCES[0x2028] = '\\L'; -ESCAPE_SEQUENCES[0x2029] = '\\P'; - -var DEPRECATED_BOOLEANS_SYNTAX = [ - 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', - 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' -]; - -function compileStyleMap(schema, map) { - var result, keys, index, length, tag, style, type; - - if (map === null) return {}; - - result = {}; - keys = Object.keys(map); - - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map[tag]); - - if (tag.slice(0, 2) === '!!') { - tag = 'tag:yaml.org,2002:' + tag.slice(2); - } - type = schema.compiledTypeMap['fallback'][tag]; - - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style]; - } - - result[tag] = style; - } - - return result; -} - -function encodeHex(character) { - var string, handle, length; - - string = character.toString(16).toUpperCase(); - - if (character <= 0xFF) { - handle = 'x'; - length = 2; - } else if (character <= 0xFFFF) { - handle = 'u'; - length = 4; - } else if (character <= 0xFFFFFFFF) { - handle = 'U'; - length = 8; - } else { - throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); - } - - return '\\' + handle + common.repeat('0', length - string.length) + string; -} - -function State(options) { - this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; - this.indent = Math.max(1, (options['indent'] || 2)); - this.noArrayIndent = options['noArrayIndent'] || false; - this.skipInvalid = options['skipInvalid'] || false; - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); - this.styleMap = compileStyleMap(this.schema, options['styles'] || null); - this.sortKeys = options['sortKeys'] || false; - this.lineWidth = options['lineWidth'] || 80; - this.noRefs = options['noRefs'] || false; - this.noCompatMode = options['noCompatMode'] || false; - this.condenseFlow = options['condenseFlow'] || false; - - this.implicitTypes = this.schema.compiledImplicit; - this.explicitTypes = this.schema.compiledExplicit; - - this.tag = null; - this.result = ''; - - this.duplicates = []; - this.usedDuplicates = null; -} - -// Indents every line in a string. Empty lines (\n only) are not indented. -function indentString(string, spaces) { - var ind = common.repeat(' ', spaces), - position = 0, - next = -1, - result = '', - line, - length = string.length; - - while (position < length) { - next = string.indexOf('\n', position); - if (next === -1) { - line = string.slice(position); - position = length; - } else { - line = string.slice(position, next + 1); - position = next + 1; - } - - if (line.length && line !== '\n') result += ind; - - result += line; - } - - return result; -} - -function generateNextLine(state, level) { - return '\n' + common.repeat(' ', state.indent * level); -} - -function testImplicitResolving(state, str) { - var index, length, type; - - for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { - type = state.implicitTypes[index]; - - if (type.resolve(str)) { - return true; - } - } - - return false; -} - -// [33] s-white ::= s-space | s-tab -function isWhitespace(c) { - return c === CHAR_SPACE || c === CHAR_TAB; -} - -// Returns true if the character can be printed without escaping. -// From YAML 1.2: "any allowed characters known to be non-printable -// should also be escaped. [However,] This isn’t mandatory" -// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. -function isPrintable(c) { - return (0x00020 <= c && c <= 0x00007E) - || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) - || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */) - || (0x10000 <= c && c <= 0x10FFFF); -} - -// Simplified test for values allowed after the first character in plain style. -function isPlainSafe(c) { - // Uses a subset of nb-char - c-flow-indicator - ":" - "#" - // where nb-char ::= c-printable - b-char - c-byte-order-mark. - return isPrintable(c) && c !== 0xFEFF - // - c-flow-indicator - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - // - ":" - "#" - && c !== CHAR_COLON - && c !== CHAR_SHARP; -} - -// Simplified test for values allowed as the first character in plain style. -function isPlainSafeFirst(c) { - // Uses a subset of ns-char - c-indicator - // where ns-char = nb-char - s-white. - return isPrintable(c) && c !== 0xFEFF - && !isWhitespace(c) // - s-white - // - (c-indicator ::= - // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” - && c !== CHAR_MINUS - && c !== CHAR_QUESTION - && c !== CHAR_COLON - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - // | “#” | “&” | “*” | “!” | “|” | “>” | “'” | “"” - && c !== CHAR_SHARP - && c !== CHAR_AMPERSAND - && c !== CHAR_ASTERISK - && c !== CHAR_EXCLAMATION - && c !== CHAR_VERTICAL_LINE - && c !== CHAR_GREATER_THAN - && c !== CHAR_SINGLE_QUOTE - && c !== CHAR_DOUBLE_QUOTE - // | “%” | “@” | “`”) - && c !== CHAR_PERCENT - && c !== CHAR_COMMERCIAL_AT - && c !== CHAR_GRAVE_ACCENT; -} - -// Determines whether block indentation indicator is required. -function needIndentIndicator(string) { - var leadingSpaceRe = /^\n* /; - return leadingSpaceRe.test(string); -} - -var STYLE_PLAIN = 1, - STYLE_SINGLE = 2, - STYLE_LITERAL = 3, - STYLE_FOLDED = 4, - STYLE_DOUBLE = 5; - -// Determines which scalar styles are possible and returns the preferred style. -// lineWidth = -1 => no limit. -// Pre-conditions: str.length > 0. -// Post-conditions: -// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. -// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). -// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). -function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { - var i; - var char; - var hasLineBreak = false; - var hasFoldableLine = false; // only checked if shouldTrackWidth - var shouldTrackWidth = lineWidth !== -1; - var previousLineBreak = -1; // count the first line correctly - var plain = isPlainSafeFirst(string.charCodeAt(0)) - && !isWhitespace(string.charCodeAt(string.length - 1)); - - if (singleLineOnly) { - // Case: no block styles. - // Check for disallowed characters to rule out plain and single. - for (i = 0; i < string.length; i++) { - char = string.charCodeAt(i); - if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char); - } - } else { - // Case: block styles permitted. - for (i = 0; i < string.length; i++) { - char = string.charCodeAt(i); - if (char === CHAR_LINE_FEED) { - hasLineBreak = true; - // Check if any line can be folded. - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || - // Foldable line = too long, and not more-indented. - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' '); - previousLineBreak = i; - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char); - } - // in case the end is missing a \n - hasFoldableLine = hasFoldableLine || (shouldTrackWidth && - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ')); - } - // Although every style can represent \n without escaping, prefer block styles - // for multiline, since they're more readable and they don't add empty lines. - // Also prefer folding a super-long line. - if (!hasLineBreak && !hasFoldableLine) { - // Strings interpretable as another type have to be quoted; - // e.g. the string 'true' vs. the boolean true. - return plain && !testAmbiguousType(string) - ? STYLE_PLAIN : STYLE_SINGLE; - } - // Edge case: block indentation indicator can only have one digit. - if (indentPerLevel > 9 && needIndentIndicator(string)) { - return STYLE_DOUBLE; - } - // At this point we know block styles are valid. - // Prefer literal style unless we want to fold. - return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; -} - -// Note: line breaking/folding is implemented for only the folded style. -// NB. We drop the last trailing newline (if any) of a returned block scalar -// since the dumper adds its own newline. This always works: -// • No ending newline => unaffected; already using strip "-" chomping. -// • Ending newline => removed then restored. -// Importantly, this keeps the "+" chomp indicator from gaining an extra line. -function writeScalar(state, string, level, iskey) { - state.dump = (function () { - if (string.length === 0) { - return "''"; - } - if (!state.noCompatMode && - DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { - return "'" + string + "'"; - } - - var indent = state.indent * Math.max(1, level); // no 0-indent scalars - // As indentation gets deeper, let the width decrease monotonically - // to the lower bound min(state.lineWidth, 40). - // Note that this implies - // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. - // state.lineWidth > 40 + state.indent: width decreases until the lower bound. - // This behaves better than a constant minimum width which disallows narrower options, - // or an indent threshold which causes the width to suddenly increase. - var lineWidth = state.lineWidth === -1 - ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); - - // Without knowing if keys are implicit/explicit, assume implicit for safety. - var singleLineOnly = iskey - // No block styles in flow mode. - || (state.flowLevel > -1 && level >= state.flowLevel); - function testAmbiguity(string) { - return testImplicitResolving(state, string); - } - - switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { - case STYLE_PLAIN: - return string; - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'"; - case STYLE_LITERAL: - return '|' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(string, indent)); - case STYLE_FOLDED: - return '>' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); - case STYLE_DOUBLE: - return '"' + escapeString(string, lineWidth) + '"'; - default: - throw new YAMLException('impossible error: invalid scalar style'); - } - }()); -} - -// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. -function blockHeader(string, indentPerLevel) { - var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; - - // note the special case: the string '\n' counts as a "trailing" empty line. - var clip = string[string.length - 1] === '\n'; - var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); - var chomp = keep ? '+' : (clip ? '' : '-'); - - return indentIndicator + chomp + '\n'; -} - -// (See the note for writeScalar.) -function dropEndingNewline(string) { - return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; -} - -// Note: a long line without a suitable break point will exceed the width limit. -// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. -function foldString(string, width) { - // In folded style, $k$ consecutive newlines output as $k+1$ newlines— - // unless they're before or after a more-indented line, or at the very - // beginning or end, in which case $k$ maps to $k$. - // Therefore, parse each chunk as newline(s) followed by a content line. - var lineRe = /(\n+)([^\n]*)/g; - - // first line (possibly an empty line) - var result = (function () { - var nextLF = string.indexOf('\n'); - nextLF = nextLF !== -1 ? nextLF : string.length; - lineRe.lastIndex = nextLF; - return foldLine(string.slice(0, nextLF), width); - }()); - // If we haven't reached the first content line yet, don't add an extra \n. - var prevMoreIndented = string[0] === '\n' || string[0] === ' '; - var moreIndented; - - // rest of the lines - var match; - while ((match = lineRe.exec(string))) { - var prefix = match[1], line = match[2]; - moreIndented = (line[0] === ' '); - result += prefix - + (!prevMoreIndented && !moreIndented && line !== '' - ? '\n' : '') - + foldLine(line, width); - prevMoreIndented = moreIndented; - } - - return result; -} - -// Greedy line breaking. -// Picks the longest line under the limit each time, -// otherwise settles for the shortest line over the limit. -// NB. More-indented lines *cannot* be folded, as that would add an extra \n. -function foldLine(line, width) { - if (line === '' || line[0] === ' ') return line; - - // Since a more-indented line adds a \n, breaks can't be followed by a space. - var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. - var match; - // start is an inclusive index. end, curr, and next are exclusive. - var start = 0, end, curr = 0, next = 0; - var result = ''; - - // Invariants: 0 <= start <= length-1. - // 0 <= curr <= next <= max(0, length-2). curr - start <= width. - // Inside the loop: - // A match implies length >= 2, so curr and next are <= length-2. - while ((match = breakRe.exec(line))) { - next = match.index; - // maintain invariant: curr - start <= width - if (next - start > width) { - end = (curr > start) ? curr : next; // derive end <= length-2 - result += '\n' + line.slice(start, end); - // skip the space that was output as \n - start = end + 1; // derive start <= length-1 - } - curr = next; - } - - // By the invariants, start <= length-1, so there is something left over. - // It is either the whole string or a part starting from non-whitespace. - result += '\n'; - // Insert a break if the remainder is too long and there is a break available. - if (line.length - start > width && curr > start) { - result += line.slice(start, curr) + '\n' + line.slice(curr + 1); - } else { - result += line.slice(start); - } - - return result.slice(1); // drop extra \n joiner -} - -// Escapes a double-quoted string. -function escapeString(string) { - var result = ''; - var char, nextChar; - var escapeSeq; - - for (var i = 0; i < string.length; i++) { - char = string.charCodeAt(i); - // Check for surrogate pairs (reference Unicode 3.0 section "3.7 Surrogates"). - if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) { - nextChar = string.charCodeAt(i + 1); - if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) { - // Combine the surrogate pair and store it escaped. - result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000); - // Advance index one extra since we already used that char here. - i++; continue; - } - } - escapeSeq = ESCAPE_SEQUENCES[char]; - result += !escapeSeq && isPrintable(char) - ? string[i] - : escapeSeq || encodeHex(char); - } - - return result; -} - -function writeFlowSequence(state, level, object) { - var _result = '', - _tag = state.tag, - index, - length; - - for (index = 0, length = object.length; index < length; index += 1) { - // Write only valid elements. - if (writeNode(state, level, object[index], false, false)) { - if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : ''); - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = '[' + _result + ']'; -} - -function writeBlockSequence(state, level, object, compact) { - var _result = '', - _tag = state.tag, - index, - length; - - for (index = 0, length = object.length; index < length; index += 1) { - // Write only valid elements. - if (writeNode(state, level + 1, object[index], true, true)) { - if (!compact || index !== 0) { - _result += generateNextLine(state, level); - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - _result += '-'; - } else { - _result += '- '; - } - - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = _result || '[]'; // Empty sequence if no valid values. -} - -function writeFlowMapping(state, level, object) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - pairBuffer; - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = state.condenseFlow ? '"' : ''; - - if (index !== 0) pairBuffer += ', '; - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (!writeNode(state, level, objectKey, false, false)) { - continue; // Skip this pair because of invalid key; - } - - if (state.dump.length > 1024) pairBuffer += '? '; - - pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); - - if (!writeNode(state, level, objectValue, false, false)) { - continue; // Skip this pair because of invalid value. - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = '{' + _result + '}'; -} - -function writeBlockMapping(state, level, object, compact) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - explicitPair, - pairBuffer; - - // Allow sorting keys so that the output file is deterministic - if (state.sortKeys === true) { - // Default sorting - objectKeyList.sort(); - } else if (typeof state.sortKeys === 'function') { - // Custom sort function - objectKeyList.sort(state.sortKeys); - } else if (state.sortKeys) { - // Something is wrong - throw new YAMLException('sortKeys must be a boolean or a function'); - } - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ''; - - if (!compact || index !== 0) { - pairBuffer += generateNextLine(state, level); - } - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (!writeNode(state, level + 1, objectKey, true, true, true)) { - continue; // Skip this pair because of invalid key. - } - - explicitPair = (state.tag !== null && state.tag !== '?') || - (state.dump && state.dump.length > 1024); - - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += '?'; - } else { - pairBuffer += '? '; - } - } - - pairBuffer += state.dump; - - if (explicitPair) { - pairBuffer += generateNextLine(state, level); - } - - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue; // Skip this pair because of invalid value. - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ':'; - } else { - pairBuffer += ': '; - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = _result || '{}'; // Empty mapping if no valid pairs. -} - -function detectType(state, object, explicit) { - var _result, typeList, index, length, type, style; - - typeList = explicit ? state.explicitTypes : state.implicitTypes; - - for (index = 0, length = typeList.length; index < length; index += 1) { - type = typeList[index]; - - if ((type.instanceOf || type.predicate) && - (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && - (!type.predicate || type.predicate(object))) { - - state.tag = explicit ? type.tag : '?'; - - if (type.represent) { - style = state.styleMap[type.tag] || type.defaultStyle; - - if (_toString.call(type.represent) === '[object Function]') { - _result = type.represent(object, style); - } else if (_hasOwnProperty.call(type.represent, style)) { - _result = type.represent[style](object, style); - } else { - throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); - } - - state.dump = _result; - } - - return true; - } - } - - return false; -} - -// Serializes `object` and writes it to global `result`. -// Returns true on success, or false on invalid object. -// -function writeNode(state, level, object, block, compact, iskey) { - state.tag = null; - state.dump = object; - - if (!detectType(state, object, false)) { - detectType(state, object, true); - } - - var type = _toString.call(state.dump); - - if (block) { - block = (state.flowLevel < 0 || state.flowLevel > level); - } - - var objectOrArray = type === '[object Object]' || type === '[object Array]', - duplicateIndex, - duplicate; - - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; - } - - if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { - compact = false; - } - - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = '*ref_' + duplicateIndex; - } else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true; - } - if (type === '[object Object]') { - if (block && (Object.keys(state.dump).length !== 0)) { - writeBlockMapping(state, level, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowMapping(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object Array]') { - var arrayLevel = (state.noArrayIndent && (level > 0)) ? level - 1 : level; - if (block && (state.dump.length !== 0)) { - writeBlockSequence(state, arrayLevel, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowSequence(state, arrayLevel, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object String]') { - if (state.tag !== '?') { - writeScalar(state, state.dump, level, iskey); - } - } else { - if (state.skipInvalid) return false; - throw new YAMLException('unacceptable kind of an object to dump ' + type); - } - - if (state.tag !== null && state.tag !== '?') { - state.dump = '!<' + state.tag + '> ' + state.dump; - } - } - - return true; -} - -function getDuplicateReferences(object, state) { - var objects = [], - duplicatesIndexes = [], - index, - length; - - inspectNode(object, objects, duplicatesIndexes); - - for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { - state.duplicates.push(objects[duplicatesIndexes[index]]); - } - state.usedDuplicates = new Array(length); -} - -function inspectNode(object, objects, duplicatesIndexes) { - var objectKeyList, - index, - length; - - if (object !== null && typeof object === 'object') { - index = objects.indexOf(object); - if (index !== -1) { - if (duplicatesIndexes.indexOf(index) === -1) { - duplicatesIndexes.push(index); - } - } else { - objects.push(object); - - if (Array.isArray(object)) { - for (index = 0, length = object.length; index < length; index += 1) { - inspectNode(object[index], objects, duplicatesIndexes); - } - } else { - objectKeyList = Object.keys(object); - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); - } - } - } - } -} - -function dump(input, options) { - options = options || {}; - - var state = new State(options); - - if (!state.noRefs) getDuplicateReferences(input, state); - - if (writeNode(state, 0, input, true, true)) return state.dump + '\n'; - - return ''; -} - -function safeDump(input, options) { - return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} - -module.exports.dump = dump; -module.exports.safeDump = safeDump; diff --git a/node_modules/js-yaml/lib/js-yaml/exception.js b/node_modules/js-yaml/lib/js-yaml/exception.js deleted file mode 100644 index b744a1ee..00000000 --- a/node_modules/js-yaml/lib/js-yaml/exception.js +++ /dev/null @@ -1,43 +0,0 @@ -// YAML error class. http://stackoverflow.com/questions/8458984 -// -'use strict'; - -function YAMLException(reason, mark) { - // Super constructor - Error.call(this); - - this.name = 'YAMLException'; - this.reason = reason; - this.mark = mark; - this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : ''); - - // Include stack trace in error object - if (Error.captureStackTrace) { - // Chrome and NodeJS - Error.captureStackTrace(this, this.constructor); - } else { - // FF, IE 10+ and Safari 6+. Fallback for others - this.stack = (new Error()).stack || ''; - } -} - - -// Inherit from Error -YAMLException.prototype = Object.create(Error.prototype); -YAMLException.prototype.constructor = YAMLException; - - -YAMLException.prototype.toString = function toString(compact) { - var result = this.name + ': '; - - result += this.reason || '(unknown reason)'; - - if (!compact && this.mark) { - result += ' ' + this.mark.toString(); - } - - return result; -}; - - -module.exports = YAMLException; diff --git a/node_modules/js-yaml/lib/js-yaml/loader.js b/node_modules/js-yaml/lib/js-yaml/loader.js deleted file mode 100644 index 2815c955..00000000 --- a/node_modules/js-yaml/lib/js-yaml/loader.js +++ /dev/null @@ -1,1625 +0,0 @@ -'use strict'; - -/*eslint-disable max-len,no-use-before-define*/ - -var common = require('./common'); -var YAMLException = require('./exception'); -var Mark = require('./mark'); -var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe'); -var DEFAULT_FULL_SCHEMA = require('./schema/default_full'); - - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - - -var CONTEXT_FLOW_IN = 1; -var CONTEXT_FLOW_OUT = 2; -var CONTEXT_BLOCK_IN = 3; -var CONTEXT_BLOCK_OUT = 4; - - -var CHOMPING_CLIP = 1; -var CHOMPING_STRIP = 2; -var CHOMPING_KEEP = 3; - - -var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; -var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; -var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; -var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; -var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; - - -function _class(obj) { return Object.prototype.toString.call(obj); } - -function is_EOL(c) { - return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); -} - -function is_WHITE_SPACE(c) { - return (c === 0x09/* Tab */) || (c === 0x20/* Space */); -} - -function is_WS_OR_EOL(c) { - return (c === 0x09/* Tab */) || - (c === 0x20/* Space */) || - (c === 0x0A/* LF */) || - (c === 0x0D/* CR */); -} - -function is_FLOW_INDICATOR(c) { - return c === 0x2C/* , */ || - c === 0x5B/* [ */ || - c === 0x5D/* ] */ || - c === 0x7B/* { */ || - c === 0x7D/* } */; -} - -function fromHexCode(c) { - var lc; - - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - /*eslint-disable no-bitwise*/ - lc = c | 0x20; - - if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { - return lc - 0x61 + 10; - } - - return -1; -} - -function escapedHexLen(c) { - if (c === 0x78/* x */) { return 2; } - if (c === 0x75/* u */) { return 4; } - if (c === 0x55/* U */) { return 8; } - return 0; -} - -function fromDecimalCode(c) { - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - return -1; -} - -function simpleEscapeSequence(c) { - /* eslint-disable indent */ - return (c === 0x30/* 0 */) ? '\x00' : - (c === 0x61/* a */) ? '\x07' : - (c === 0x62/* b */) ? '\x08' : - (c === 0x74/* t */) ? '\x09' : - (c === 0x09/* Tab */) ? '\x09' : - (c === 0x6E/* n */) ? '\x0A' : - (c === 0x76/* v */) ? '\x0B' : - (c === 0x66/* f */) ? '\x0C' : - (c === 0x72/* r */) ? '\x0D' : - (c === 0x65/* e */) ? '\x1B' : - (c === 0x20/* Space */) ? ' ' : - (c === 0x22/* " */) ? '\x22' : - (c === 0x2F/* / */) ? '/' : - (c === 0x5C/* \ */) ? '\x5C' : - (c === 0x4E/* N */) ? '\x85' : - (c === 0x5F/* _ */) ? '\xA0' : - (c === 0x4C/* L */) ? '\u2028' : - (c === 0x50/* P */) ? '\u2029' : ''; -} - -function charFromCodepoint(c) { - if (c <= 0xFFFF) { - return String.fromCharCode(c); - } - // Encode UTF-16 surrogate pair - // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF - return String.fromCharCode( - ((c - 0x010000) >> 10) + 0xD800, - ((c - 0x010000) & 0x03FF) + 0xDC00 - ); -} - -var simpleEscapeCheck = new Array(256); // integer, for fast access -var simpleEscapeMap = new Array(256); -for (var i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; - simpleEscapeMap[i] = simpleEscapeSequence(i); -} - - -function State(input, options) { - this.input = input; - - this.filename = options['filename'] || null; - this.schema = options['schema'] || DEFAULT_FULL_SCHEMA; - this.onWarning = options['onWarning'] || null; - this.legacy = options['legacy'] || false; - this.json = options['json'] || false; - this.listener = options['listener'] || null; - - this.implicitTypes = this.schema.compiledImplicit; - this.typeMap = this.schema.compiledTypeMap; - - this.length = input.length; - this.position = 0; - this.line = 0; - this.lineStart = 0; - this.lineIndent = 0; - - this.documents = []; - - /* - this.version; - this.checkLineBreaks; - this.tagMap; - this.anchorMap; - this.tag; - this.anchor; - this.kind; - this.result;*/ - -} - - -function generateError(state, message) { - return new YAMLException( - message, - new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart))); -} - -function throwError(state, message) { - throw generateError(state, message); -} - -function throwWarning(state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)); - } -} - - -var directiveHandlers = { - - YAML: function handleYamlDirective(state, name, args) { - - var match, major, minor; - - if (state.version !== null) { - throwError(state, 'duplication of %YAML directive'); - } - - if (args.length !== 1) { - throwError(state, 'YAML directive accepts exactly one argument'); - } - - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - - if (match === null) { - throwError(state, 'ill-formed argument of the YAML directive'); - } - - major = parseInt(match[1], 10); - minor = parseInt(match[2], 10); - - if (major !== 1) { - throwError(state, 'unacceptable YAML version of the document'); - } - - state.version = args[0]; - state.checkLineBreaks = (minor < 2); - - if (minor !== 1 && minor !== 2) { - throwWarning(state, 'unsupported YAML version of the document'); - } - }, - - TAG: function handleTagDirective(state, name, args) { - - var handle, prefix; - - if (args.length !== 2) { - throwError(state, 'TAG directive accepts exactly two arguments'); - } - - handle = args[0]; - prefix = args[1]; - - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); - } - - if (_hasOwnProperty.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } - - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); - } - - state.tagMap[handle] = prefix; - } -}; - - -function captureSegment(state, start, end, checkJson) { - var _position, _length, _character, _result; - - if (start < end) { - _result = state.input.slice(start, end); - - if (checkJson) { - for (_position = 0, _length = _result.length; _position < _length; _position += 1) { - _character = _result.charCodeAt(_position); - if (!(_character === 0x09 || - (0x20 <= _character && _character <= 0x10FFFF))) { - throwError(state, 'expected valid JSON character'); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, 'the stream contains non-printable characters'); - } - - state.result += _result; - } -} - -function mergeMappings(state, destination, source, overridableKeys) { - var sourceKeys, key, index, quantity; - - if (!common.isObject(source)) { - throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); - } - - sourceKeys = Object.keys(source); - - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - - if (!_hasOwnProperty.call(destination, key)) { - destination[key] = source[key]; - overridableKeys[key] = true; - } - } -} - -function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { - var index, quantity; - - // The output is a plain object here, so keys can only be strings. - // We need to convert keyNode to a string, but doing so can hang the process - // (deeply nested arrays that explode exponentially using aliases). - if (Array.isArray(keyNode)) { - keyNode = Array.prototype.slice.call(keyNode); - - for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { - if (Array.isArray(keyNode[index])) { - throwError(state, 'nested arrays are not supported inside keys'); - } - - if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { - keyNode[index] = '[object Object]'; - } - } - } - - // Avoid code execution in load() via toString property - // (still use its own toString for arrays, timestamps, - // and whatever user schema extensions happen to have @@toStringTag) - if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { - keyNode = '[object Object]'; - } - - - keyNode = String(keyNode); - - if (_result === null) { - _result = {}; - } - - if (keyTag === 'tag:yaml.org,2002:merge') { - if (Array.isArray(valueNode)) { - for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { - mergeMappings(state, _result, valueNode[index], overridableKeys); - } - } else { - mergeMappings(state, _result, valueNode, overridableKeys); - } - } else { - if (!state.json && - !_hasOwnProperty.call(overridableKeys, keyNode) && - _hasOwnProperty.call(_result, keyNode)) { - state.line = startLine || state.line; - state.position = startPos || state.position; - throwError(state, 'duplicated mapping key'); - } - _result[keyNode] = valueNode; - delete overridableKeys[keyNode]; - } - - return _result; -} - -function readLineBreak(state) { - var ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x0A/* LF */) { - state.position++; - } else if (ch === 0x0D/* CR */) { - state.position++; - if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { - state.position++; - } - } else { - throwError(state, 'a line break is expected'); - } - - state.line += 1; - state.lineStart = state.position; -} - -function skipSeparationSpace(state, allowComments, checkIndent) { - var lineBreaks = 0, - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (allowComments && ch === 0x23/* # */) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); - } - - if (is_EOL(ch)) { - readLineBreak(state); - - ch = state.input.charCodeAt(state.position); - lineBreaks++; - state.lineIndent = 0; - - while (ch === 0x20/* Space */) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - } else { - break; - } - } - - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, 'deficient indentation'); - } - - return lineBreaks; -} - -function testDocumentSeparator(state) { - var _position = state.position, - ch; - - ch = state.input.charCodeAt(_position); - - // Condition state.position === state.lineStart is tested - // in parent on each call, for efficiency. No needs to test here again. - if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && - ch === state.input.charCodeAt(_position + 1) && - ch === state.input.charCodeAt(_position + 2)) { - - _position += 3; - - ch = state.input.charCodeAt(_position); - - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; - } - } - - return false; -} - -function writeFoldedLines(state, count) { - if (count === 1) { - state.result += ' '; - } else if (count > 1) { - state.result += common.repeat('\n', count - 1); - } -} - - -function readPlainScalar(state, nodeIndent, withinFlowCollection) { - var preceding, - following, - captureStart, - captureEnd, - hasPendingContent, - _line, - _lineStart, - _lineIndent, - _kind = state.kind, - _result = state.result, - ch; - - ch = state.input.charCodeAt(state.position); - - if (is_WS_OR_EOL(ch) || - is_FLOW_INDICATOR(ch) || - ch === 0x23/* # */ || - ch === 0x26/* & */ || - ch === 0x2A/* * */ || - ch === 0x21/* ! */ || - ch === 0x7C/* | */ || - ch === 0x3E/* > */ || - ch === 0x27/* ' */ || - ch === 0x22/* " */ || - ch === 0x25/* % */ || - ch === 0x40/* @ */ || - ch === 0x60/* ` */) { - return false; - } - - if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; - } - } - - state.kind = 'scalar'; - state.result = ''; - captureStart = captureEnd = state.position; - hasPendingContent = false; - - while (ch !== 0) { - if (ch === 0x3A/* : */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; - } - - } else if (ch === 0x23/* # */) { - preceding = state.input.charCodeAt(state.position - 1); - - if (is_WS_OR_EOL(preceding)) { - break; - } - - } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || - withinFlowCollection && is_FLOW_INDICATOR(ch)) { - break; - - } else if (is_EOL(ch)) { - _line = state.line; - _lineStart = state.lineStart; - _lineIndent = state.lineIndent; - skipSeparationSpace(state, false, -1); - - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state.input.charCodeAt(state.position); - continue; - } else { - state.position = captureEnd; - state.line = _line; - state.lineStart = _lineStart; - state.lineIndent = _lineIndent; - break; - } - } - - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false); - writeFoldedLines(state, state.line - _line); - captureStart = captureEnd = state.position; - hasPendingContent = false; - } - - if (!is_WHITE_SPACE(ch)) { - captureEnd = state.position + 1; - } - - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, captureEnd, false); - - if (state.result) { - return true; - } - - state.kind = _kind; - state.result = _result; - return false; -} - -function readSingleQuotedScalar(state, nodeIndent) { - var ch, - captureStart, captureEnd; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x27/* ' */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x27/* ' */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x27/* ' */) { - captureStart = state.position; - state.position++; - captureEnd = state.position; - } else { - return true; - } - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a single quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a single quoted scalar'); -} - -function readDoubleQuotedScalar(state, nodeIndent) { - var captureStart, - captureEnd, - hexLength, - hexResult, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x22/* " */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x22/* " */) { - captureSegment(state, captureStart, state.position, true); - state.position++; - return true; - - } else if (ch === 0x5C/* \ */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (is_EOL(ch)) { - skipSeparationSpace(state, false, nodeIndent); - - // TODO: rework to inline fn with no type cast? - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch]; - state.position++; - - } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; - - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position); - - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; - - } else { - throwError(state, 'expected hexadecimal character'); - } - } - - state.result += charFromCodepoint(hexResult); - - state.position++; - - } else { - throwError(state, 'unknown escape sequence'); - } - - captureStart = captureEnd = state.position; - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a double quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a double quoted scalar'); -} - -function readFlowCollection(state, nodeIndent) { - var readNext = true, - _line, - _tag = state.tag, - _result, - _anchor = state.anchor, - following, - terminator, - isPair, - isExplicitPair, - isMapping, - overridableKeys = {}, - keyNode, - keyTag, - valueNode, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x5B/* [ */) { - terminator = 0x5D;/* ] */ - isMapping = false; - _result = []; - } else if (ch === 0x7B/* { */) { - terminator = 0x7D;/* } */ - isMapping = true; - _result = {}; - } else { - return false; - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(++state.position); - - while (ch !== 0) { - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === terminator) { - state.position++; - state.tag = _tag; - state.anchor = _anchor; - state.kind = isMapping ? 'mapping' : 'sequence'; - state.result = _result; - return true; - } else if (!readNext) { - throwError(state, 'missed comma between flow collection entries'); - } - - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - - if (ch === 0x3F/* ? */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; - state.position++; - skipSeparationSpace(state, true, nodeIndent); - } - } - - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state.tag; - keyNode = state.result; - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { - isPair = true; - ch = state.input.charCodeAt(++state.position); - skipSeparationSpace(state, true, nodeIndent); - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state.result; - } - - if (isMapping) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); - } else if (isPair) { - _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); - } else { - _result.push(keyNode); - } - - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x2C/* , */) { - readNext = true; - ch = state.input.charCodeAt(++state.position); - } else { - readNext = false; - } - } - - throwError(state, 'unexpected end of the stream within a flow collection'); -} - -function readBlockScalar(state, nodeIndent) { - var captureStart, - folding, - chomping = CHOMPING_CLIP, - didReadContent = false, - detectedIndent = false, - textIndent = nodeIndent, - emptyLines = 0, - atMoreIndented = false, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x7C/* | */) { - folding = false; - } else if (ch === 0x3E/* > */) { - folding = true; - } else { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - - while (ch !== 0) { - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { - if (CHOMPING_CLIP === chomping) { - chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state, 'repeat of a chomping mode identifier'); - } - - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1; - detectedIndent = true; - } else { - throwError(state, 'repeat of an indentation width identifier'); - } - - } else { - break; - } - } - - if (is_WHITE_SPACE(ch)) { - do { ch = state.input.charCodeAt(++state.position); } - while (is_WHITE_SPACE(ch)); - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (!is_EOL(ch) && (ch !== 0)); - } - } - - while (ch !== 0) { - readLineBreak(state); - state.lineIndent = 0; - - ch = state.input.charCodeAt(state.position); - - while ((!detectedIndent || state.lineIndent < textIndent) && - (ch === 0x20/* Space */)) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent; - } - - if (is_EOL(ch)) { - emptyLines++; - continue; - } - - // End of the scalar. - if (state.lineIndent < textIndent) { - - // Perform the chomping. - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { // i.e. only if the scalar is not empty. - state.result += '\n'; - } - } - - // Break this `while` cycle and go to the funciton's epilogue. - break; - } - - // Folded style: use fancy rules to handle line breaks. - if (folding) { - - // Lines starting with white space characters (more-indented lines) are not folded. - if (is_WHITE_SPACE(ch)) { - atMoreIndented = true; - // except for the first content line (cf. Example 8.1) - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - - // End of more-indented block. - } else if (atMoreIndented) { - atMoreIndented = false; - state.result += common.repeat('\n', emptyLines + 1); - - // Just one line break - perceive as the same line. - } else if (emptyLines === 0) { - if (didReadContent) { // i.e. only if we have already read some scalar content. - state.result += ' '; - } - - // Several line breaks - perceive as different lines. - } else { - state.result += common.repeat('\n', emptyLines); - } - - // Literal style: just add exact number of line breaks between content lines. - } else { - // Keep all line breaks except the header line break. - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } - - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state.position; - - while (!is_EOL(ch) && (ch !== 0)) { - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, state.position, false); - } - - return true; -} - -function readBlockSequence(state, nodeIndent) { - var _line, - _tag = state.tag, - _anchor = state.anchor, - _result = [], - following, - detected = false, - ch; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - - if (ch !== 0x2D/* - */) { - break; - } - - following = state.input.charCodeAt(state.position + 1); - - if (!is_WS_OR_EOL(following)) { - break; - } - - detected = true; - state.position++; - - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null); - ch = state.input.charCodeAt(state.position); - continue; - } - } - - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state.result); - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a sequence entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'sequence'; - state.result = _result; - return true; - } - return false; -} - -function readBlockMapping(state, nodeIndent, flowIndent) { - var following, - allowCompact, - _line, - _pos, - _tag = state.tag, - _anchor = state.anchor, - _result = {}, - overridableKeys = {}, - keyTag = null, - keyNode = null, - valueNode = null, - atExplicitKey = false, - detected = false, - ch; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - following = state.input.charCodeAt(state.position + 1); - _line = state.line; // Save the current line. - _pos = state.position; - - // - // Explicit notation case. There are two separate blocks: - // first for the key (denoted by "?") and second for the value (denoted by ":") - // - if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { - - if (ch === 0x3F/* ? */) { - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = true; - allowCompact = true; - - } else if (atExplicitKey) { - // i.e. 0x3A/* : */ === character after the explicit key. - atExplicitKey = false; - allowCompact = true; - - } else { - throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); - } - - state.position += 1; - ch = following; - - // - // Implicit notation case. Flow-style node as the key first, then ":", and the value. - // - } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - - if (state.line === _line) { - ch = state.input.charCodeAt(state.position); - - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x3A/* : */) { - ch = state.input.charCodeAt(++state.position); - - if (!is_WS_OR_EOL(ch)) { - throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); - } - - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = false; - allowCompact = false; - keyTag = state.tag; - keyNode = state.result; - - } else if (detected) { - throwError(state, 'can not read an implicit mapping pair; a colon is missed'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - - } else if (detected) { - throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - - } else { - break; // Reading is done. Go to the epilogue. - } - - // - // Common reading code for both explicit and implicit notations. - // - if (state.line === _line || state.lineIndent > nodeIndent) { - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result; - } else { - valueNode = state.result; - } - } - - if (!atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos); - keyTag = keyNode = valueNode = null; - } - - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - } - - if (state.lineIndent > nodeIndent && (ch !== 0)) { - throwError(state, 'bad indentation of a mapping entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - // - // Epilogue. - // - - // Special case: last mapping's node contains only the key in explicit notation. - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); - } - - // Expose the resulting mapping. - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'mapping'; - state.result = _result; - } - - return detected; -} - -function readTagProperty(state) { - var _position, - isVerbatim = false, - isNamed = false, - tagHandle, - tagName, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x21/* ! */) return false; - - if (state.tag !== null) { - throwError(state, 'duplication of a tag property'); - } - - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x3C/* < */) { - isVerbatim = true; - ch = state.input.charCodeAt(++state.position); - - } else if (ch === 0x21/* ! */) { - isNamed = true; - tagHandle = '!!'; - ch = state.input.charCodeAt(++state.position); - - } else { - tagHandle = '!'; - } - - _position = state.position; - - if (isVerbatim) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && ch !== 0x3E/* > */); - - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position); - ch = state.input.charCodeAt(++state.position); - } else { - throwError(state, 'unexpected end of the stream within a verbatim tag'); - } - } else { - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - - if (ch === 0x21/* ! */) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1); - - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, 'named tag handle cannot contain such characters'); - } - - isNamed = true; - _position = state.position + 1; - } else { - throwError(state, 'tag suffix cannot contain exclamation marks'); - } - } - - ch = state.input.charCodeAt(++state.position); - } - - tagName = state.input.slice(_position, state.position); - - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, 'tag suffix cannot contain flow indicator characters'); - } - } - - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, 'tag name cannot contain such characters: ' + tagName); - } - - if (isVerbatim) { - state.tag = tagName; - - } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName; - - } else if (tagHandle === '!') { - state.tag = '!' + tagName; - - } else if (tagHandle === '!!') { - state.tag = 'tag:yaml.org,2002:' + tagName; - - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"'); - } - - return true; -} - -function readAnchorProperty(state) { - var _position, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x26/* & */) return false; - - if (state.anchor !== null) { - throwError(state, 'duplication of an anchor property'); - } - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an anchor node must contain at least one character'); - } - - state.anchor = state.input.slice(_position, state.position); - return true; -} - -function readAlias(state) { - var _position, alias, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x2A/* * */) return false; - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an alias node must contain at least one character'); - } - - alias = state.input.slice(_position, state.position); - - if (!state.anchorMap.hasOwnProperty(alias)) { - throwError(state, 'unidentified alias "' + alias + '"'); - } - - state.result = state.anchorMap[alias]; - skipSeparationSpace(state, true, -1); - return true; -} - -function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, - allowBlockScalars, - allowBlockCollections, - indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } - } - - if (indentStatus === 1) { - while (readTagProperty(state) || readAnchorProperty(state)) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true; - allowBlockCollections = allowBlockStyles; - - if (state.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } else { - allowBlockCollections = false; - } - } - } - - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } - - blockIndent = state.position - state.lineStart; - - if (indentStatus === 1) { - if (allowBlockCollections && - (readBlockSequence(state, blockIndent) || - readBlockMapping(state, blockIndent, flowIndent)) || - readFlowCollection(state, flowIndent)) { - hasContent = true; - } else { - if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || - readSingleQuotedScalar(state, flowIndent) || - readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true; - - } else if (readAlias(state)) { - hasContent = true; - - if (state.tag !== null || state.anchor !== null) { - throwError(state, 'alias node should not have any properties'); - } - - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true; - - if (state.tag === null) { - state.tag = '?'; - } - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } else if (indentStatus === 0) { - // Special case: block sequences are allowed to have same indentation level as the parent. - // http://www.yaml.org/spec/1.2/spec.html#id2799784 - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); - } - } - - if (state.tag !== null && state.tag !== '!') { - if (state.tag === '?') { - for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type = state.implicitTypes[typeIndex]; - - // Implicit resolving is not allowed for non-scalar types, and '?' - // non-specific tag is only assigned to plain scalars. So, it isn't - // needed to check for 'kind' conformity. - - if (type.resolve(state.result)) { // `state.result` updated in resolver if matched - state.result = type.construct(state.result); - state.tag = type.tag; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - break; - } - } - } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { - type = state.typeMap[state.kind || 'fallback'][state.tag]; - - if (state.result !== null && type.kind !== state.kind) { - throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); - } - - if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched - throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); - } else { - state.result = type.construct(state.result); - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } else { - throwError(state, 'unknown tag !<' + state.tag + '>'); - } - } - - if (state.listener !== null) { - state.listener('close', state); - } - return state.tag !== null || state.anchor !== null || hasContent; -} - -function readDocument(state) { - var documentStart = state.position, - _position, - directiveName, - directiveArgs, - hasDirectives = false, - ch; - - state.version = null; - state.checkLineBreaks = state.legacy; - state.tagMap = {}; - state.anchorMap = {}; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if (state.lineIndent > 0 || ch !== 0x25/* % */) { - break; - } - - hasDirectives = true; - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveName = state.input.slice(_position, state.position); - directiveArgs = []; - - if (directiveName.length < 1) { - throwError(state, 'directive name must not be less than one character in length'); - } - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && !is_EOL(ch)); - break; - } - - if (is_EOL(ch)) break; - - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveArgs.push(state.input.slice(_position, state.position)); - } - - if (ch !== 0) readLineBreak(state); - - if (_hasOwnProperty.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs); - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"'); - } - } - - skipSeparationSpace(state, true, -1); - - if (state.lineIndent === 0 && - state.input.charCodeAt(state.position) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - - } else if (hasDirectives) { - throwError(state, 'directives end mark is expected'); - } - - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state, true, -1); - - if (state.checkLineBreaks && - PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, 'non-ASCII line breaks are interpreted as content'); - } - - state.documents.push(state.result); - - if (state.position === state.lineStart && testDocumentSeparator(state)) { - - if (state.input.charCodeAt(state.position) === 0x2E/* . */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - } - return; - } - - if (state.position < (state.length - 1)) { - throwError(state, 'end of the stream or a document separator is expected'); - } else { - return; - } -} - - -function loadDocuments(input, options) { - input = String(input); - options = options || {}; - - if (input.length !== 0) { - - // Add tailing `\n` if not exists - if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && - input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { - input += '\n'; - } - - // Strip BOM - if (input.charCodeAt(0) === 0xFEFF) { - input = input.slice(1); - } - } - - var state = new State(input, options); - - // Use 0 as string terminator. That significantly simplifies bounds check. - state.input += '\0'; - - while (state.input.charCodeAt(state.position) === 0x20/* Space */) { - state.lineIndent += 1; - state.position += 1; - } - - while (state.position < (state.length - 1)) { - readDocument(state); - } - - return state.documents; -} - - -function loadAll(input, iterator, options) { - var documents = loadDocuments(input, options), index, length; - - if (typeof iterator !== 'function') { - return documents; - } - - for (index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]); - } -} - - -function load(input, options) { - var documents = loadDocuments(input, options); - - if (documents.length === 0) { - /*eslint-disable no-undefined*/ - return undefined; - } else if (documents.length === 1) { - return documents[0]; - } - throw new YAMLException('expected a single document in the stream, but found more'); -} - - -function safeLoadAll(input, output, options) { - if (typeof output === 'function') { - loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); - } else { - return loadAll(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); - } -} - - -function safeLoad(input, options) { - return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); -} - - -module.exports.loadAll = loadAll; -module.exports.load = load; -module.exports.safeLoadAll = safeLoadAll; -module.exports.safeLoad = safeLoad; diff --git a/node_modules/js-yaml/lib/js-yaml/mark.js b/node_modules/js-yaml/lib/js-yaml/mark.js deleted file mode 100644 index 47b265c2..00000000 --- a/node_modules/js-yaml/lib/js-yaml/mark.js +++ /dev/null @@ -1,76 +0,0 @@ -'use strict'; - - -var common = require('./common'); - - -function Mark(name, buffer, position, line, column) { - this.name = name; - this.buffer = buffer; - this.position = position; - this.line = line; - this.column = column; -} - - -Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { - var head, start, tail, end, snippet; - - if (!this.buffer) return null; - - indent = indent || 4; - maxLength = maxLength || 75; - - head = ''; - start = this.position; - - while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) { - start -= 1; - if (this.position - start > (maxLength / 2 - 1)) { - head = ' ... '; - start += 5; - break; - } - } - - tail = ''; - end = this.position; - - while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) { - end += 1; - if (end - this.position > (maxLength / 2 - 1)) { - tail = ' ... '; - end -= 5; - break; - } - } - - snippet = this.buffer.slice(start, end); - - return common.repeat(' ', indent) + head + snippet + tail + '\n' + - common.repeat(' ', indent + this.position - start + head.length) + '^'; -}; - - -Mark.prototype.toString = function toString(compact) { - var snippet, where = ''; - - if (this.name) { - where += 'in "' + this.name + '" '; - } - - where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1); - - if (!compact) { - snippet = this.getSnippet(); - - if (snippet) { - where += ':\n' + snippet; - } - } - - return where; -}; - - -module.exports = Mark; diff --git a/node_modules/js-yaml/lib/js-yaml/schema.js b/node_modules/js-yaml/lib/js-yaml/schema.js deleted file mode 100644 index ca7cf47e..00000000 --- a/node_modules/js-yaml/lib/js-yaml/schema.js +++ /dev/null @@ -1,108 +0,0 @@ -'use strict'; - -/*eslint-disable max-len*/ - -var common = require('./common'); -var YAMLException = require('./exception'); -var Type = require('./type'); - - -function compileList(schema, name, result) { - var exclude = []; - - schema.include.forEach(function (includedSchema) { - result = compileList(includedSchema, name, result); - }); - - schema[name].forEach(function (currentType) { - result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { - exclude.push(previousIndex); - } - }); - - result.push(currentType); - }); - - return result.filter(function (type, index) { - return exclude.indexOf(index) === -1; - }); -} - - -function compileMap(/* lists... */) { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {} - }, index, length; - - function collectType(type) { - result[type.kind][type.tag] = result['fallback'][type.tag] = type; - } - - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); - } - return result; -} - - -function Schema(definition) { - this.include = definition.include || []; - this.implicit = definition.implicit || []; - this.explicit = definition.explicit || []; - - this.implicit.forEach(function (type) { - if (type.loadKind && type.loadKind !== 'scalar') { - throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); - } - }); - - this.compiledImplicit = compileList(this, 'implicit', []); - this.compiledExplicit = compileList(this, 'explicit', []); - this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); -} - - -Schema.DEFAULT = null; - - -Schema.create = function createSchema() { - var schemas, types; - - switch (arguments.length) { - case 1: - schemas = Schema.DEFAULT; - types = arguments[0]; - break; - - case 2: - schemas = arguments[0]; - types = arguments[1]; - break; - - default: - throw new YAMLException('Wrong number of arguments for Schema.create function'); - } - - schemas = common.toArray(schemas); - types = common.toArray(types); - - if (!schemas.every(function (schema) { return schema instanceof Schema; })) { - throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.'); - } - - if (!types.every(function (type) { return type instanceof Type; })) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - - return new Schema({ - include: schemas, - explicit: types - }); -}; - - -module.exports = Schema; diff --git a/node_modules/js-yaml/lib/js-yaml/schema/core.js b/node_modules/js-yaml/lib/js-yaml/schema/core.js deleted file mode 100644 index 206daab5..00000000 --- a/node_modules/js-yaml/lib/js-yaml/schema/core.js +++ /dev/null @@ -1,18 +0,0 @@ -// Standard YAML's Core schema. -// http://www.yaml.org/spec/1.2/spec.html#id2804923 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, Core schema has no distinctions from JSON schema is JS-YAML. - - -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = new Schema({ - include: [ - require('./json') - ] -}); diff --git a/node_modules/js-yaml/lib/js-yaml/schema/default_full.js b/node_modules/js-yaml/lib/js-yaml/schema/default_full.js deleted file mode 100644 index a55ef42a..00000000 --- a/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +++ /dev/null @@ -1,25 +0,0 @@ -// JS-YAML's default schema for `load` function. -// It is not described in the YAML specification. -// -// This schema is based on JS-YAML's default safe schema and includes -// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function. -// -// Also this schema is used as default base schema at `Schema.create` function. - - -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = Schema.DEFAULT = new Schema({ - include: [ - require('./default_safe') - ], - explicit: [ - require('../type/js/undefined'), - require('../type/js/regexp'), - require('../type/js/function') - ] -}); diff --git a/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js b/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js deleted file mode 100644 index 11d89bbf..00000000 --- a/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +++ /dev/null @@ -1,28 +0,0 @@ -// JS-YAML's default schema for `safeLoad` function. -// It is not described in the YAML specification. -// -// This schema is based on standard YAML's Core schema and includes most of -// extra types described at YAML tag repository. (http://yaml.org/type/) - - -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = new Schema({ - include: [ - require('./core') - ], - implicit: [ - require('../type/timestamp'), - require('../type/merge') - ], - explicit: [ - require('../type/binary'), - require('../type/omap'), - require('../type/pairs'), - require('../type/set') - ] -}); diff --git a/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js b/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js deleted file mode 100644 index b7a33eb7..00000000 --- a/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +++ /dev/null @@ -1,17 +0,0 @@ -// Standard YAML's Failsafe schema. -// http://www.yaml.org/spec/1.2/spec.html#id2802346 - - -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = new Schema({ - explicit: [ - require('../type/str'), - require('../type/seq'), - require('../type/map') - ] -}); diff --git a/node_modules/js-yaml/lib/js-yaml/schema/json.js b/node_modules/js-yaml/lib/js-yaml/schema/json.js deleted file mode 100644 index 5be3dbf8..00000000 --- a/node_modules/js-yaml/lib/js-yaml/schema/json.js +++ /dev/null @@ -1,25 +0,0 @@ -// Standard YAML's JSON schema. -// http://www.yaml.org/spec/1.2/spec.html#id2803231 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, this schema is not such strict as defined in the YAML specification. -// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. - - -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = new Schema({ - include: [ - require('./failsafe') - ], - implicit: [ - require('../type/null'), - require('../type/bool'), - require('../type/int'), - require('../type/float') - ] -}); diff --git a/node_modules/js-yaml/lib/js-yaml/type.js b/node_modules/js-yaml/lib/js-yaml/type.js deleted file mode 100644 index 90b702ac..00000000 --- a/node_modules/js-yaml/lib/js-yaml/type.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -var YAMLException = require('./exception'); - -var TYPE_CONSTRUCTOR_OPTIONS = [ - 'kind', - 'resolve', - 'construct', - 'instanceOf', - 'predicate', - 'represent', - 'defaultStyle', - 'styleAliases' -]; - -var YAML_NODE_KINDS = [ - 'scalar', - 'sequence', - 'mapping' -]; - -function compileStyleAliases(map) { - var result = {}; - - if (map !== null) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style; - }); - }); - } - - return result; -} - -function Type(tag, options) { - options = options || {}; - - Object.keys(options).forEach(function (name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); - } - }); - - // TODO: Add tag format check. - this.tag = tag; - this.kind = options['kind'] || null; - this.resolve = options['resolve'] || function () { return true; }; - this.construct = options['construct'] || function (data) { return data; }; - this.instanceOf = options['instanceOf'] || null; - this.predicate = options['predicate'] || null; - this.represent = options['represent'] || null; - this.defaultStyle = options['defaultStyle'] || null; - this.styleAliases = compileStyleAliases(options['styleAliases'] || null); - - if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { - throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } -} - -module.exports = Type; diff --git a/node_modules/js-yaml/lib/js-yaml/type/binary.js b/node_modules/js-yaml/lib/js-yaml/type/binary.js deleted file mode 100644 index 10b18755..00000000 --- a/node_modules/js-yaml/lib/js-yaml/type/binary.js +++ /dev/null @@ -1,138 +0,0 @@ -'use strict'; - -/*eslint-disable no-bitwise*/ - -var NodeBuffer; - -try { - // A trick for browserified version, to not include `Buffer` shim - var _require = require; - NodeBuffer = _require('buffer').Buffer; -} catch (__) {} - -var Type = require('../type'); - - -// [ 64, 65, 66 ] -> [ padding, CR, LF ] -var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; - - -function resolveYamlBinary(data) { - if (data === null) return false; - - var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; - - // Convert one by one. - for (idx = 0; idx < max; idx++) { - code = map.indexOf(data.charAt(idx)); - - // Skip CR/LF - if (code > 64) continue; - - // Fail on illegal characters - if (code < 0) return false; - - bitlen += 6; - } - - // If there are any bits left, source was corrupted - return (bitlen % 8) === 0; -} - -function constructYamlBinary(data) { - var idx, tailbits, - input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan - max = input.length, - map = BASE64_MAP, - bits = 0, - result = []; - - // Collect by 6*4 bits (3 bytes) - - for (idx = 0; idx < max; idx++) { - if ((idx % 4 === 0) && idx) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } - - bits = (bits << 6) | map.indexOf(input.charAt(idx)); - } - - // Dump tail - - tailbits = (max % 4) * 6; - - if (tailbits === 0) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } else if (tailbits === 18) { - result.push((bits >> 10) & 0xFF); - result.push((bits >> 2) & 0xFF); - } else if (tailbits === 12) { - result.push((bits >> 4) & 0xFF); - } - - // Wrap into Buffer for NodeJS and leave Array for browser - if (NodeBuffer) { - // Support node 6.+ Buffer API when available - return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result); - } - - return result; -} - -function representYamlBinary(object /*, style*/) { - var result = '', bits = 0, idx, tail, - max = object.length, - map = BASE64_MAP; - - // Convert every three bytes to 4 ASCII characters. - - for (idx = 0; idx < max; idx++) { - if ((idx % 3 === 0) && idx) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } - - bits = (bits << 8) + object[idx]; - } - - // Dump tail - - tail = max % 3; - - if (tail === 0) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } else if (tail === 2) { - result += map[(bits >> 10) & 0x3F]; - result += map[(bits >> 4) & 0x3F]; - result += map[(bits << 2) & 0x3F]; - result += map[64]; - } else if (tail === 1) { - result += map[(bits >> 2) & 0x3F]; - result += map[(bits << 4) & 0x3F]; - result += map[64]; - result += map[64]; - } - - return result; -} - -function isBinary(object) { - return NodeBuffer && NodeBuffer.isBuffer(object); -} - -module.exports = new Type('tag:yaml.org,2002:binary', { - kind: 'scalar', - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/bool.js b/node_modules/js-yaml/lib/js-yaml/type/bool.js deleted file mode 100644 index cb774593..00000000 --- a/node_modules/js-yaml/lib/js-yaml/type/bool.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -function resolveYamlBoolean(data) { - if (data === null) return false; - - var max = data.length; - - return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || - (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); -} - -function constructYamlBoolean(data) { - return data === 'true' || - data === 'True' || - data === 'TRUE'; -} - -function isBoolean(object) { - return Object.prototype.toString.call(object) === '[object Boolean]'; -} - -module.exports = new Type('tag:yaml.org,2002:bool', { - kind: 'scalar', - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: function (object) { return object ? 'true' : 'false'; }, - uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, - camelcase: function (object) { return object ? 'True' : 'False'; } - }, - defaultStyle: 'lowercase' -}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/float.js b/node_modules/js-yaml/lib/js-yaml/type/float.js deleted file mode 100644 index 127671b2..00000000 --- a/node_modules/js-yaml/lib/js-yaml/type/float.js +++ /dev/null @@ -1,116 +0,0 @@ -'use strict'; - -var common = require('../common'); -var Type = require('../type'); - -var YAML_FLOAT_PATTERN = new RegExp( - // 2.5e4, 2.5 and integers - '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + - // .2e4, .2 - // special case, seems not from spec - '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + - // 20:59 - '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' + - // .inf - '|[-+]?\\.(?:inf|Inf|INF)' + - // .nan - '|\\.(?:nan|NaN|NAN))$'); - -function resolveYamlFloat(data) { - if (data === null) return false; - - if (!YAML_FLOAT_PATTERN.test(data) || - // Quick hack to not allow integers end with `_` - // Probably should update regexp & check speed - data[data.length - 1] === '_') { - return false; - } - - return true; -} - -function constructYamlFloat(data) { - var value, sign, base, digits; - - value = data.replace(/_/g, '').toLowerCase(); - sign = value[0] === '-' ? -1 : 1; - digits = []; - - if ('+-'.indexOf(value[0]) >= 0) { - value = value.slice(1); - } - - if (value === '.inf') { - return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; - - } else if (value === '.nan') { - return NaN; - - } else if (value.indexOf(':') >= 0) { - value.split(':').forEach(function (v) { - digits.unshift(parseFloat(v, 10)); - }); - - value = 0.0; - base = 1; - - digits.forEach(function (d) { - value += d * base; - base *= 60; - }); - - return sign * value; - - } - return sign * parseFloat(value, 10); -} - - -var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; - -function representYamlFloat(object, style) { - var res; - - if (isNaN(object)) { - switch (style) { - case 'lowercase': return '.nan'; - case 'uppercase': return '.NAN'; - case 'camelcase': return '.NaN'; - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '.inf'; - case 'uppercase': return '.INF'; - case 'camelcase': return '.Inf'; - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '-.inf'; - case 'uppercase': return '-.INF'; - case 'camelcase': return '-.Inf'; - } - } else if (common.isNegativeZero(object)) { - return '-0.0'; - } - - res = object.toString(10); - - // JS stringifier can build scientific format without dots: 5e-100, - // while YAML requres dot: 5.e-100. Fix it with simple hack - - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; -} - -function isFloat(object) { - return (Object.prototype.toString.call(object) === '[object Number]') && - (object % 1 !== 0 || common.isNegativeZero(object)); -} - -module.exports = new Type('tag:yaml.org,2002:float', { - kind: 'scalar', - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: 'lowercase' -}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/int.js b/node_modules/js-yaml/lib/js-yaml/type/int.js deleted file mode 100644 index ba61c5f9..00000000 --- a/node_modules/js-yaml/lib/js-yaml/type/int.js +++ /dev/null @@ -1,173 +0,0 @@ -'use strict'; - -var common = require('../common'); -var Type = require('../type'); - -function isHexCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || - ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || - ((0x61/* a */ <= c) && (c <= 0x66/* f */)); -} - -function isOctCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); -} - -function isDecCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); -} - -function resolveYamlInteger(data) { - if (data === null) return false; - - var max = data.length, - index = 0, - hasDigits = false, - ch; - - if (!max) return false; - - ch = data[index]; - - // sign - if (ch === '-' || ch === '+') { - ch = data[++index]; - } - - if (ch === '0') { - // 0 - if (index + 1 === max) return true; - ch = data[++index]; - - // base 2, base 8, base 16 - - if (ch === 'b') { - // base 2 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (ch !== '0' && ch !== '1') return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - - if (ch === 'x') { - // base 16 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isHexCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - // base 8 - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isOctCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - // base 10 (except 0) or base 60 - - // value should not start with `_`; - if (ch === '_') return false; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (ch === ':') break; - if (!isDecCode(data.charCodeAt(index))) { - return false; - } - hasDigits = true; - } - - // Should have digits and should not end with `_` - if (!hasDigits || ch === '_') return false; - - // if !base60 - done; - if (ch !== ':') return true; - - // base60 almost not used, no needs to optimize - return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); -} - -function constructYamlInteger(data) { - var value = data, sign = 1, ch, base, digits = []; - - if (value.indexOf('_') !== -1) { - value = value.replace(/_/g, ''); - } - - ch = value[0]; - - if (ch === '-' || ch === '+') { - if (ch === '-') sign = -1; - value = value.slice(1); - ch = value[0]; - } - - if (value === '0') return 0; - - if (ch === '0') { - if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); - if (value[1] === 'x') return sign * parseInt(value, 16); - return sign * parseInt(value, 8); - } - - if (value.indexOf(':') !== -1) { - value.split(':').forEach(function (v) { - digits.unshift(parseInt(v, 10)); - }); - - value = 0; - base = 1; - - digits.forEach(function (d) { - value += (d * base); - base *= 60; - }); - - return sign * value; - - } - - return sign * parseInt(value, 10); -} - -function isInteger(object) { - return (Object.prototype.toString.call(object)) === '[object Number]' && - (object % 1 === 0 && !common.isNegativeZero(object)); -} - -module.exports = new Type('tag:yaml.org,2002:int', { - kind: 'scalar', - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, - octal: function (obj) { return obj >= 0 ? '0' + obj.toString(8) : '-0' + obj.toString(8).slice(1); }, - decimal: function (obj) { return obj.toString(10); }, - /* eslint-disable max-len */ - hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } - }, - defaultStyle: 'decimal', - styleAliases: { - binary: [ 2, 'bin' ], - octal: [ 8, 'oct' ], - decimal: [ 10, 'dec' ], - hexadecimal: [ 16, 'hex' ] - } -}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/js/function.js b/node_modules/js-yaml/lib/js-yaml/type/js/function.js deleted file mode 100644 index 3604e233..00000000 --- a/node_modules/js-yaml/lib/js-yaml/type/js/function.js +++ /dev/null @@ -1,92 +0,0 @@ -'use strict'; - -var esprima; - -// Browserified version does not have esprima -// -// 1. For node.js just require module as deps -// 2. For browser try to require mudule via external AMD system. -// If not found - try to fallback to window.esprima. If not -// found too - then fail to parse. -// -try { - // workaround to exclude package from browserify list. - var _require = require; - esprima = _require('esprima'); -} catch (_) { - /*global window */ - if (typeof window !== 'undefined') esprima = window.esprima; -} - -var Type = require('../../type'); - -function resolveJavascriptFunction(data) { - if (data === null) return false; - - try { - var source = '(' + data + ')', - ast = esprima.parse(source, { range: true }); - - if (ast.type !== 'Program' || - ast.body.length !== 1 || - ast.body[0].type !== 'ExpressionStatement' || - (ast.body[0].expression.type !== 'ArrowFunctionExpression' && - ast.body[0].expression.type !== 'FunctionExpression')) { - return false; - } - - return true; - } catch (err) { - return false; - } -} - -function constructJavascriptFunction(data) { - /*jslint evil:true*/ - - var source = '(' + data + ')', - ast = esprima.parse(source, { range: true }), - params = [], - body; - - if (ast.type !== 'Program' || - ast.body.length !== 1 || - ast.body[0].type !== 'ExpressionStatement' || - (ast.body[0].expression.type !== 'ArrowFunctionExpression' && - ast.body[0].expression.type !== 'FunctionExpression')) { - throw new Error('Failed to resolve function'); - } - - ast.body[0].expression.params.forEach(function (param) { - params.push(param.name); - }); - - body = ast.body[0].expression.body.range; - - // Esprima's ranges include the first '{' and the last '}' characters on - // function expressions. So cut them out. - if (ast.body[0].expression.body.type === 'BlockStatement') { - /*eslint-disable no-new-func*/ - return new Function(params, source.slice(body[0] + 1, body[1] - 1)); - } - // ES6 arrow functions can omit the BlockStatement. In that case, just return - // the body. - /*eslint-disable no-new-func*/ - return new Function(params, 'return ' + source.slice(body[0], body[1])); -} - -function representJavascriptFunction(object /*, style*/) { - return object.toString(); -} - -function isFunction(object) { - return Object.prototype.toString.call(object) === '[object Function]'; -} - -module.exports = new Type('tag:yaml.org,2002:js/function', { - kind: 'scalar', - resolve: resolveJavascriptFunction, - construct: constructJavascriptFunction, - predicate: isFunction, - represent: representJavascriptFunction -}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js b/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js deleted file mode 100644 index 43fa4701..00000000 --- a/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - -var Type = require('../../type'); - -function resolveJavascriptRegExp(data) { - if (data === null) return false; - if (data.length === 0) return false; - - var regexp = data, - tail = /\/([gim]*)$/.exec(data), - modifiers = ''; - - // if regexp starts with '/' it can have modifiers and must be properly closed - // `/foo/gim` - modifiers tail can be maximum 3 chars - if (regexp[0] === '/') { - if (tail) modifiers = tail[1]; - - if (modifiers.length > 3) return false; - // if expression starts with /, is should be properly terminated - if (regexp[regexp.length - modifiers.length - 1] !== '/') return false; - } - - return true; -} - -function constructJavascriptRegExp(data) { - var regexp = data, - tail = /\/([gim]*)$/.exec(data), - modifiers = ''; - - // `/foo/gim` - tail can be maximum 4 chars - if (regexp[0] === '/') { - if (tail) modifiers = tail[1]; - regexp = regexp.slice(1, regexp.length - modifiers.length - 1); - } - - return new RegExp(regexp, modifiers); -} - -function representJavascriptRegExp(object /*, style*/) { - var result = '/' + object.source + '/'; - - if (object.global) result += 'g'; - if (object.multiline) result += 'm'; - if (object.ignoreCase) result += 'i'; - - return result; -} - -function isRegExp(object) { - return Object.prototype.toString.call(object) === '[object RegExp]'; -} - -module.exports = new Type('tag:yaml.org,2002:js/regexp', { - kind: 'scalar', - resolve: resolveJavascriptRegExp, - construct: constructJavascriptRegExp, - predicate: isRegExp, - represent: representJavascriptRegExp -}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js b/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js deleted file mode 100644 index 95b5569f..00000000 --- a/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var Type = require('../../type'); - -function resolveJavascriptUndefined() { - return true; -} - -function constructJavascriptUndefined() { - /*eslint-disable no-undefined*/ - return undefined; -} - -function representJavascriptUndefined() { - return ''; -} - -function isUndefined(object) { - return typeof object === 'undefined'; -} - -module.exports = new Type('tag:yaml.org,2002:js/undefined', { - kind: 'scalar', - resolve: resolveJavascriptUndefined, - construct: constructJavascriptUndefined, - predicate: isUndefined, - represent: representJavascriptUndefined -}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/map.js b/node_modules/js-yaml/lib/js-yaml/type/map.js deleted file mode 100644 index f327beeb..00000000 --- a/node_modules/js-yaml/lib/js-yaml/type/map.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -module.exports = new Type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return data !== null ? data : {}; } -}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/merge.js b/node_modules/js-yaml/lib/js-yaml/type/merge.js deleted file mode 100644 index ae08a864..00000000 --- a/node_modules/js-yaml/lib/js-yaml/type/merge.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -function resolveYamlMerge(data) { - return data === '<<' || data === null; -} - -module.exports = new Type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge -}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/null.js b/node_modules/js-yaml/lib/js-yaml/type/null.js deleted file mode 100644 index 6874daa6..00000000 --- a/node_modules/js-yaml/lib/js-yaml/type/null.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -function resolveYamlNull(data) { - if (data === null) return true; - - var max = data.length; - - return (max === 1 && data === '~') || - (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); -} - -function constructYamlNull() { - return null; -} - -function isNull(object) { - return object === null; -} - -module.exports = new Type('tag:yaml.org,2002:null', { - kind: 'scalar', - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function () { return '~'; }, - lowercase: function () { return 'null'; }, - uppercase: function () { return 'NULL'; }, - camelcase: function () { return 'Null'; } - }, - defaultStyle: 'lowercase' -}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/omap.js b/node_modules/js-yaml/lib/js-yaml/type/omap.js deleted file mode 100644 index b2b5323b..00000000 --- a/node_modules/js-yaml/lib/js-yaml/type/omap.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -var _hasOwnProperty = Object.prototype.hasOwnProperty; -var _toString = Object.prototype.toString; - -function resolveYamlOmap(data) { - if (data === null) return true; - - var objectKeys = [], index, length, pair, pairKey, pairHasKey, - object = data; - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - pairHasKey = false; - - if (_toString.call(pair) !== '[object Object]') return false; - - for (pairKey in pair) { - if (_hasOwnProperty.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true; - else return false; - } - } - - if (!pairHasKey) return false; - - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); - else return false; - } - - return true; -} - -function constructYamlOmap(data) { - return data !== null ? data : []; -} - -module.exports = new Type('tag:yaml.org,2002:omap', { - kind: 'sequence', - resolve: resolveYamlOmap, - construct: constructYamlOmap -}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/pairs.js b/node_modules/js-yaml/lib/js-yaml/type/pairs.js deleted file mode 100644 index 74b52403..00000000 --- a/node_modules/js-yaml/lib/js-yaml/type/pairs.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -var _toString = Object.prototype.toString; - -function resolveYamlPairs(data) { - if (data === null) return true; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - if (_toString.call(pair) !== '[object Object]') return false; - - keys = Object.keys(pair); - - if (keys.length !== 1) return false; - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return true; -} - -function constructYamlPairs(data) { - if (data === null) return []; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - keys = Object.keys(pair); - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return result; -} - -module.exports = new Type('tag:yaml.org,2002:pairs', { - kind: 'sequence', - resolve: resolveYamlPairs, - construct: constructYamlPairs -}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/seq.js b/node_modules/js-yaml/lib/js-yaml/type/seq.js deleted file mode 100644 index be8f77f2..00000000 --- a/node_modules/js-yaml/lib/js-yaml/type/seq.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -module.exports = new Type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return data !== null ? data : []; } -}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/set.js b/node_modules/js-yaml/lib/js-yaml/type/set.js deleted file mode 100644 index f885a329..00000000 --- a/node_modules/js-yaml/lib/js-yaml/type/set.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - -function resolveYamlSet(data) { - if (data === null) return true; - - var key, object = data; - - for (key in object) { - if (_hasOwnProperty.call(object, key)) { - if (object[key] !== null) return false; - } - } - - return true; -} - -function constructYamlSet(data) { - return data !== null ? data : {}; -} - -module.exports = new Type('tag:yaml.org,2002:set', { - kind: 'mapping', - resolve: resolveYamlSet, - construct: constructYamlSet -}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/str.js b/node_modules/js-yaml/lib/js-yaml/type/str.js deleted file mode 100644 index 27acc106..00000000 --- a/node_modules/js-yaml/lib/js-yaml/type/str.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -module.exports = new Type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return data !== null ? data : ''; } -}); diff --git a/node_modules/js-yaml/lib/js-yaml/type/timestamp.js b/node_modules/js-yaml/lib/js-yaml/type/timestamp.js deleted file mode 100644 index 8fa9c586..00000000 --- a/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -var YAML_DATE_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9])' + // [2] month - '-([0-9][0-9])$'); // [3] day - -var YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour - '(?::([0-9][0-9]))?))?$'); // [11] tz_minute - -function resolveYamlTimestamp(data) { - if (data === null) return false; - if (YAML_DATE_REGEXP.exec(data) !== null) return true; - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; - return false; -} - -function constructYamlTimestamp(data) { - var match, year, month, day, hour, minute, second, fraction = 0, - delta = null, tz_hour, tz_minute, date; - - match = YAML_DATE_REGEXP.exec(data); - if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); - - if (match === null) throw new Error('Date resolve error'); - - // match: [1] year [2] month [3] day - - year = +(match[1]); - month = +(match[2]) - 1; // JS month starts with 0 - day = +(match[3]); - - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)); - } - - // match: [4] hour [5] minute [6] second [7] fraction - - hour = +(match[4]); - minute = +(match[5]); - second = +(match[6]); - - if (match[7]) { - fraction = match[7].slice(0, 3); - while (fraction.length < 3) { // milli-seconds - fraction += '0'; - } - fraction = +fraction; - } - - // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute - - if (match[9]) { - tz_hour = +(match[10]); - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds - if (match[9] === '-') delta = -delta; - } - - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - - if (delta) date.setTime(date.getTime() - delta); - - return date; -} - -function representYamlTimestamp(object /*, style*/) { - return object.toISOString(); -} - -module.exports = new Type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}); diff --git a/node_modules/js-yaml/package.json b/node_modules/js-yaml/package.json deleted file mode 100644 index a1bce022..00000000 --- a/node_modules/js-yaml/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "_args": [ - [ - "js-yaml@3.13.1", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "js-yaml@3.13.1", - "_id": "js-yaml@3.13.1", - "_inBundle": false, - "_integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "_location": "/js-yaml", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "js-yaml@3.13.1", - "name": "js-yaml", - "escapedName": "js-yaml", - "rawSpec": "3.13.1", - "saveSpec": null, - "fetchSpec": "3.13.1" - }, - "_requiredBy": [ - "/cosmiconfig" - ], - "_resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "_spec": "3.13.1", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Vladimir Zapparov", - "email": "dervus.grim@gmail.com" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - }, - "bugs": { - "url": "https://github.com/nodeca/js-yaml/issues" - }, - "contributors": [ - { - "name": "Aleksey V Zapparov", - "email": "ixti@member.fsf.org", - "url": "http://www.ixti.net/" - }, - { - "name": "Vitaly Puzrin", - "email": "vitaly@rcdesign.ru", - "url": "https://github.com/puzrin" - }, - { - "name": "Martin Grenfell", - "email": "martin.grenfell@gmail.com", - "url": "http://got-ravings.blogspot.com" - } - ], - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "description": "YAML 1.2 parser and serializer", - "devDependencies": { - "ansi": "^0.3.1", - "benchmark": "^2.1.4", - "browserify": "^16.2.2", - "codemirror": "^5.13.4", - "eslint": "^4.1.1", - "fast-check": "1.1.3", - "istanbul": "^0.4.5", - "mocha": "^5.2.0", - "uglify-js": "^3.0.1" - }, - "files": [ - "index.js", - "lib/", - "bin/", - "dist/" - ], - "homepage": "https://github.com/nodeca/js-yaml", - "keywords": [ - "yaml", - "parser", - "serializer", - "pyyaml" - ], - "license": "MIT", - "name": "js-yaml", - "repository": { - "type": "git", - "url": "git+https://github.com/nodeca/js-yaml.git" - }, - "scripts": { - "test": "make test" - }, - "version": "3.13.1" -} diff --git a/node_modules/jsbn/.npmignore b/node_modules/jsbn/.npmignore deleted file mode 100644 index 28f1ba75..00000000 --- a/node_modules/jsbn/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.DS_Store \ No newline at end of file diff --git a/node_modules/jsbn/LICENSE b/node_modules/jsbn/LICENSE deleted file mode 100644 index 2a6457e9..00000000 --- a/node_modules/jsbn/LICENSE +++ /dev/null @@ -1,40 +0,0 @@ -Licensing ---------- - -This software is covered under the following copyright: - -/* - * Copyright (c) 2003-2005 Tom Wu - * All Rights Reserved. - * - * 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" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, - * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER - * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF - * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * In addition, the following condition applies: - * - * All redistributions must retain an intact copy of this copyright notice - * and disclaimer. - */ - -Address all questions regarding this license to: - - Tom Wu - tjw@cs.Stanford.EDU \ No newline at end of file diff --git a/node_modules/jsbn/README.md b/node_modules/jsbn/README.md deleted file mode 100644 index 7aac67f5..00000000 --- a/node_modules/jsbn/README.md +++ /dev/null @@ -1,175 +0,0 @@ -# jsbn: javascript big number - -[Tom Wu's Original Website](http://www-cs-students.stanford.edu/~tjw/jsbn/) - -I felt compelled to put this on github and publish to npm. I haven't tested every other big integer library out there, but the few that I have tested in comparison to this one have not even come close in performance. I am aware of the `bi` module on npm, however it has been modified and I wanted to publish the original without modifications. This is jsbn and jsbn2 from Tom Wu's original website above, with the modular pattern applied to prevent global leaks and to allow for use with node.js on the server side. - -## usage - - var BigInteger = require('jsbn'); - - var a = new BigInteger('91823918239182398123'); - alert(a.bitLength()); // 67 - - -## API - -### bi.toString() - -returns the base-10 number as a string - -### bi.negate() - -returns a new BigInteger equal to the negation of `bi` - -### bi.abs - -returns new BI of absolute value - -### bi.compareTo - - - -### bi.bitLength - - - -### bi.mod - - - -### bi.modPowInt - - - -### bi.clone - - - -### bi.intValue - - - -### bi.byteValue - - - -### bi.shortValue - - - -### bi.signum - - - -### bi.toByteArray - - - -### bi.equals - - - -### bi.min - - - -### bi.max - - - -### bi.and - - - -### bi.or - - - -### bi.xor - - - -### bi.andNot - - - -### bi.not - - - -### bi.shiftLeft - - - -### bi.shiftRight - - - -### bi.getLowestSetBit - - - -### bi.bitCount - - - -### bi.testBit - - - -### bi.setBit - - - -### bi.clearBit - - - -### bi.flipBit - - - -### bi.add - - - -### bi.subtract - - - -### bi.multiply - - - -### bi.divide - - - -### bi.remainder - - - -### bi.divideAndRemainder - - - -### bi.modPow - - - -### bi.modInverse - - - -### bi.pow - - - -### bi.gcd - - - -### bi.isProbablePrime - - diff --git a/node_modules/jsbn/example.html b/node_modules/jsbn/example.html deleted file mode 100644 index 7c26a566..00000000 --- a/node_modules/jsbn/example.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/node_modules/jsbn/example.js b/node_modules/jsbn/example.js deleted file mode 100644 index 664c1b45..00000000 --- a/node_modules/jsbn/example.js +++ /dev/null @@ -1,3 +0,0 @@ -var BigInteger = require('./'); -var a = new BigInteger('91823918239182398123'); -console.log(a.bitLength()); \ No newline at end of file diff --git a/node_modules/jsbn/index.js b/node_modules/jsbn/index.js deleted file mode 100644 index 973226dd..00000000 --- a/node_modules/jsbn/index.js +++ /dev/null @@ -1,1357 +0,0 @@ -(function(){ - - // Copyright (c) 2005 Tom Wu - // All Rights Reserved. - // See "LICENSE" for details. - - // Basic JavaScript BN library - subset useful for RSA encryption. - - // Bits per digit - var dbits; - - // JavaScript engine analysis - var canary = 0xdeadbeefcafe; - var j_lm = ((canary&0xffffff)==0xefcafe); - - // (public) Constructor - function BigInteger(a,b,c) { - if(a != null) - if("number" == typeof a) this.fromNumber(a,b,c); - else if(b == null && "string" != typeof a) this.fromString(a,256); - else this.fromString(a,b); - } - - // return new, unset BigInteger - function nbi() { return new BigInteger(null); } - - // am: Compute w_j += (x*this_i), propagate carries, - // c is initial carry, returns final carry. - // c < 3*dvalue, x < 2*dvalue, this_i < dvalue - // We need to select the fastest one that works in this environment. - - // am1: use a single mult and divide to get the high bits, - // max digit bits should be 26 because - // max internal value = 2*dvalue^2-2*dvalue (< 2^53) - function am1(i,x,w,j,c,n) { - while(--n >= 0) { - var v = x*this[i++]+w[j]+c; - c = Math.floor(v/0x4000000); - w[j++] = v&0x3ffffff; - } - return c; - } - // am2 avoids a big mult-and-extract completely. - // Max digit bits should be <= 30 because we do bitwise ops - // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) - function am2(i,x,w,j,c,n) { - var xl = x&0x7fff, xh = x>>15; - while(--n >= 0) { - var l = this[i]&0x7fff; - var h = this[i++]>>15; - var m = xh*l+h*xl; - l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff); - c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); - w[j++] = l&0x3fffffff; - } - return c; - } - // Alternately, set max digit bits to 28 since some - // browsers slow down when dealing with 32-bit numbers. - function am3(i,x,w,j,c,n) { - var xl = x&0x3fff, xh = x>>14; - while(--n >= 0) { - var l = this[i]&0x3fff; - var h = this[i++]>>14; - var m = xh*l+h*xl; - l = xl*l+((m&0x3fff)<<14)+w[j]+c; - c = (l>>28)+(m>>14)+xh*h; - w[j++] = l&0xfffffff; - } - return c; - } - var inBrowser = typeof navigator !== "undefined"; - if(inBrowser && j_lm && (navigator.appName == "Microsoft Internet Explorer")) { - BigInteger.prototype.am = am2; - dbits = 30; - } - else if(inBrowser && j_lm && (navigator.appName != "Netscape")) { - BigInteger.prototype.am = am1; - dbits = 26; - } - else { // Mozilla/Netscape seems to prefer am3 - BigInteger.prototype.am = am3; - dbits = 28; - } - - BigInteger.prototype.DB = dbits; - BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i]; - r.t = this.t; - r.s = this.s; - } - - // (protected) set from integer value x, -DV <= x < DV - function bnpFromInt(x) { - this.t = 1; - this.s = (x<0)?-1:0; - if(x > 0) this[0] = x; - else if(x < -1) this[0] = x+this.DV; - else this.t = 0; - } - - // return bigint initialized to value - function nbv(i) { var r = nbi(); r.fromInt(i); return r; } - - // (protected) set from string and radix - function bnpFromString(s,b) { - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 256) k = 8; // byte array - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else { this.fromRadix(s,b); return; } - this.t = 0; - this.s = 0; - var i = s.length, mi = false, sh = 0; - while(--i >= 0) { - var x = (k==8)?s[i]&0xff:intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-") mi = true; - continue; - } - mi = false; - if(sh == 0) - this[this.t++] = x; - else if(sh+k > this.DB) { - this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); - } - else - this[this.t-1] |= x<= this.DB) sh -= this.DB; - } - if(k == 8 && (s[0]&0x80) != 0) { - this.s = -1; - if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t; - } - - // (public) return string representation in given radix - function bnToString(b) { - if(this.s < 0) return "-"+this.negate().toString(b); - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else return this.toRadix(b); - var km = (1< 0) { - if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); } - while(i >= 0) { - if(p < k) { - d = (this[i]&((1<>(p+=this.DB-k); - } - else { - d = (this[i]>>(p-=k))&km; - if(p <= 0) { p += this.DB; --i; } - } - if(d > 0) m = true; - if(m) r += int2char(d); - } - } - return m?r:"0"; - } - - // (public) -this - function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } - - // (public) |this| - function bnAbs() { return (this.s<0)?this.negate():this; } - - // (public) return + if this > a, - if this < a, 0 if equal - function bnCompareTo(a) { - var r = this.s-a.s; - if(r != 0) return r; - var i = this.t; - r = i-a.t; - if(r != 0) return (this.s<0)?-r:r; - while(--i >= 0) if((r=this[i]-a[i]) != 0) return r; - return 0; - } - - // returns bit length of the integer x - function nbits(x) { - var r = 1, t; - if((t=x>>>16) != 0) { x = t; r += 16; } - if((t=x>>8) != 0) { x = t; r += 8; } - if((t=x>>4) != 0) { x = t; r += 4; } - if((t=x>>2) != 0) { x = t; r += 2; } - if((t=x>>1) != 0) { x = t; r += 1; } - return r; - } - - // (public) return the number of bits in "this" - function bnBitLength() { - if(this.t <= 0) return 0; - return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM)); - } - - // (protected) r = this << n*DB - function bnpDLShiftTo(n,r) { - var i; - for(i = this.t-1; i >= 0; --i) r[i+n] = this[i]; - for(i = n-1; i >= 0; --i) r[i] = 0; - r.t = this.t+n; - r.s = this.s; - } - - // (protected) r = this >> n*DB - function bnpDRShiftTo(n,r) { - for(var i = n; i < this.t; ++i) r[i-n] = this[i]; - r.t = Math.max(this.t-n,0); - r.s = this.s; - } - - // (protected) r = this << n - function bnpLShiftTo(n,r) { - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<= 0; --i) { - r[i+ds+1] = (this[i]>>cbs)|c; - c = (this[i]&bm)<= 0; --i) r[i] = 0; - r[ds] = c; - r.t = this.t+ds+1; - r.s = this.s; - r.clamp(); - } - - // (protected) r = this >> n - function bnpRShiftTo(n,r) { - r.s = this.s; - var ds = Math.floor(n/this.DB); - if(ds >= this.t) { r.t = 0; return; } - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<>bs; - for(var i = ds+1; i < this.t; ++i) { - r[i-ds-1] |= (this[i]&bm)<>bs; - } - if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB; - } - if(a.t < this.t) { - c -= a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c -= a[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c -= a.s; - } - r.s = (c<0)?-1:0; - if(c < -1) r[i++] = this.DV+c; - else if(c > 0) r[i++] = c; - r.t = i; - r.clamp(); - } - - // (protected) r = this * a, r != this,a (HAC 14.12) - // "this" should be the larger one if appropriate. - function bnpMultiplyTo(a,r) { - var x = this.abs(), y = a.abs(); - var i = x.t; - r.t = i+y.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t); - r.s = 0; - r.clamp(); - if(this.s != a.s) BigInteger.ZERO.subTo(r,r); - } - - // (protected) r = this^2, r != this (HAC 14.16) - function bnpSquareTo(r) { - var x = this.abs(); - var i = r.t = 2*x.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < x.t-1; ++i) { - var c = x.am(i,x[i],r,2*i,0,1); - if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { - r[i+x.t] -= x.DV; - r[i+x.t+1] = 1; - } - } - if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1); - r.s = 0; - r.clamp(); - } - - // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) - // r != q, this != m. q or r may be null. - function bnpDivRemTo(m,q,r) { - var pm = m.abs(); - if(pm.t <= 0) return; - var pt = this.abs(); - if(pt.t < pm.t) { - if(q != null) q.fromInt(0); - if(r != null) this.copyTo(r); - return; - } - if(r == null) r = nbi(); - var y = nbi(), ts = this.s, ms = m.s; - var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus - if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } - else { pm.copyTo(y); pt.copyTo(r); } - var ys = y.t; - var y0 = y[ys-1]; - if(y0 == 0) return; - var yt = y0*(1<1)?y[ys-2]>>this.F2:0); - var d1 = this.FV/yt, d2 = (1<= 0) { - r[r.t++] = 1; - r.subTo(t,r); - } - BigInteger.ONE.dlShiftTo(ys,t); - t.subTo(y,y); // "negative" y so we can replace sub with am later - while(y.t < ys) y[y.t++] = 0; - while(--j >= 0) { - // Estimate quotient digit - var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2); - if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out - y.dlShiftTo(j,t); - r.subTo(t,r); - while(r[i] < --qd) r.subTo(t,r); - } - } - if(q != null) { - r.drShiftTo(ys,q); - if(ts != ms) BigInteger.ZERO.subTo(q,q); - } - r.t = ys; - r.clamp(); - if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder - if(ts < 0) BigInteger.ZERO.subTo(r,r); - } - - // (public) this mod a - function bnMod(a) { - var r = nbi(); - this.abs().divRemTo(a,null,r); - if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); - return r; - } - - // Modular reduction using "classic" algorithm - function Classic(m) { this.m = m; } - function cConvert(x) { - if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); - else return x; - } - function cRevert(x) { return x; } - function cReduce(x) { x.divRemTo(this.m,null,x); } - function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - Classic.prototype.convert = cConvert; - Classic.prototype.revert = cRevert; - Classic.prototype.reduce = cReduce; - Classic.prototype.mulTo = cMulTo; - Classic.prototype.sqrTo = cSqrTo; - - // (protected) return "-1/this % 2^DB"; useful for Mont. reduction - // justification: - // xy == 1 (mod m) - // xy = 1+km - // xy(2-xy) = (1+km)(1-km) - // x[y(2-xy)] = 1-k^2m^2 - // x[y(2-xy)] == 1 (mod m^2) - // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 - // should reduce x and y(2-xy) by m^2 at each step to keep size bounded. - // JS multiply "overflows" differently from C/C++, so care is needed here. - function bnpInvDigit() { - if(this.t < 1) return 0; - var x = this[0]; - if((x&1) == 0) return 0; - var y = x&3; // y == 1/x mod 2^2 - y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 - y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 - y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 - // last step - calculate inverse mod DV directly; - // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints - y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits - // we really want the negative inverse, and -DV < y < DV - return (y>0)?this.DV-y:-y; - } - - // Montgomery reduction - function Montgomery(m) { - this.m = m; - this.mp = m.invDigit(); - this.mpl = this.mp&0x7fff; - this.mph = this.mp>>15; - this.um = (1<<(m.DB-15))-1; - this.mt2 = 2*m.t; - } - - // xR mod m - function montConvert(x) { - var r = nbi(); - x.abs().dlShiftTo(this.m.t,r); - r.divRemTo(this.m,null,r); - if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); - return r; - } - - // x/R mod m - function montRevert(x) { - var r = nbi(); - x.copyTo(r); - this.reduce(r); - return r; - } - - // x = x/R mod m (HAC 14.32) - function montReduce(x) { - while(x.t <= this.mt2) // pad x so am has enough room later - x[x.t++] = 0; - for(var i = 0; i < this.m.t; ++i) { - // faster way of calculating u0 = x[i]*mp mod DV - var j = x[i]&0x7fff; - var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM; - // use am to combine the multiply-shift-add into one call - j = i+this.m.t; - x[j] += this.m.am(0,u0,x,i,0,this.m.t); - // propagate carry - while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; } - } - x.clamp(); - x.drShiftTo(this.m.t,x); - if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); - } - - // r = "x^2/R mod m"; x != r - function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - // r = "xy/R mod m"; x,y != r - function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - - Montgomery.prototype.convert = montConvert; - Montgomery.prototype.revert = montRevert; - Montgomery.prototype.reduce = montReduce; - Montgomery.prototype.mulTo = montMulTo; - Montgomery.prototype.sqrTo = montSqrTo; - - // (protected) true iff this is even - function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; } - - // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) - function bnpExp(e,z) { - if(e > 0xffffffff || e < 1) return BigInteger.ONE; - var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; - g.copyTo(r); - while(--i >= 0) { - z.sqrTo(r,r2); - if((e&(1< 0) z.mulTo(r2,g,r); - else { var t = r; r = r2; r2 = t; } - } - return z.revert(r); - } - - // (public) this^e % m, 0 <= e < 2^32 - function bnModPowInt(e,m) { - var z; - if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); - return this.exp(e,z); - } - - // protected - BigInteger.prototype.copyTo = bnpCopyTo; - BigInteger.prototype.fromInt = bnpFromInt; - BigInteger.prototype.fromString = bnpFromString; - BigInteger.prototype.clamp = bnpClamp; - BigInteger.prototype.dlShiftTo = bnpDLShiftTo; - BigInteger.prototype.drShiftTo = bnpDRShiftTo; - BigInteger.prototype.lShiftTo = bnpLShiftTo; - BigInteger.prototype.rShiftTo = bnpRShiftTo; - BigInteger.prototype.subTo = bnpSubTo; - BigInteger.prototype.multiplyTo = bnpMultiplyTo; - BigInteger.prototype.squareTo = bnpSquareTo; - BigInteger.prototype.divRemTo = bnpDivRemTo; - BigInteger.prototype.invDigit = bnpInvDigit; - BigInteger.prototype.isEven = bnpIsEven; - BigInteger.prototype.exp = bnpExp; - - // public - BigInteger.prototype.toString = bnToString; - BigInteger.prototype.negate = bnNegate; - BigInteger.prototype.abs = bnAbs; - BigInteger.prototype.compareTo = bnCompareTo; - BigInteger.prototype.bitLength = bnBitLength; - BigInteger.prototype.mod = bnMod; - BigInteger.prototype.modPowInt = bnModPowInt; - - // "constants" - BigInteger.ZERO = nbv(0); - BigInteger.ONE = nbv(1); - - // Copyright (c) 2005-2009 Tom Wu - // All Rights Reserved. - // See "LICENSE" for details. - - // Extended JavaScript BN functions, required for RSA private ops. - - // Version 1.1: new BigInteger("0", 10) returns "proper" zero - // Version 1.2: square() API, isProbablePrime fix - - // (public) - function bnClone() { var r = nbi(); this.copyTo(r); return r; } - - // (public) return value as integer - function bnIntValue() { - if(this.s < 0) { - if(this.t == 1) return this[0]-this.DV; - else if(this.t == 0) return -1; - } - else if(this.t == 1) return this[0]; - else if(this.t == 0) return 0; - // assumes 16 < DB < 32 - return ((this[1]&((1<<(32-this.DB))-1))<>24; } - - // (public) return value as short (assumes DB>=16) - function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; } - - // (protected) return x s.t. r^x < DV - function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } - - // (public) 0 if this == 0, 1 if this > 0 - function bnSigNum() { - if(this.s < 0) return -1; - else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; - else return 1; - } - - // (protected) convert to radix string - function bnpToRadix(b) { - if(b == null) b = 10; - if(this.signum() == 0 || b < 2 || b > 36) return "0"; - var cs = this.chunkSize(b); - var a = Math.pow(b,cs); - var d = nbv(a), y = nbi(), z = nbi(), r = ""; - this.divRemTo(d,y,z); - while(y.signum() > 0) { - r = (a+z.intValue()).toString(b).substr(1) + r; - y.divRemTo(d,y,z); - } - return z.intValue().toString(b) + r; - } - - // (protected) convert from radix string - function bnpFromRadix(s,b) { - this.fromInt(0); - if(b == null) b = 10; - var cs = this.chunkSize(b); - var d = Math.pow(b,cs), mi = false, j = 0, w = 0; - for(var i = 0; i < s.length; ++i) { - var x = intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-" && this.signum() == 0) mi = true; - continue; - } - w = b*w+x; - if(++j >= cs) { - this.dMultiply(d); - this.dAddOffset(w,0); - j = 0; - w = 0; - } - } - if(j > 0) { - this.dMultiply(Math.pow(b,j)); - this.dAddOffset(w,0); - } - if(mi) BigInteger.ZERO.subTo(this,this); - } - - // (protected) alternate constructor - function bnpFromNumber(a,b,c) { - if("number" == typeof b) { - // new BigInteger(int,int,RNG) - if(a < 2) this.fromInt(1); - else { - this.fromNumber(a,c); - if(!this.testBit(a-1)) // force MSB set - this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this); - if(this.isEven()) this.dAddOffset(1,0); // force odd - while(!this.isProbablePrime(b)) { - this.dAddOffset(2,0); - if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this); - } - } - } - else { - // new BigInteger(int,RNG) - var x = new Array(), t = a&7; - x.length = (a>>3)+1; - b.nextBytes(x); - if(t > 0) x[0] &= ((1< 0) { - if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p) - r[k++] = d|(this.s<<(this.DB-p)); - while(i >= 0) { - if(p < 8) { - d = (this[i]&((1<>(p+=this.DB-8); - } - else { - d = (this[i]>>(p-=8))&0xff; - if(p <= 0) { p += this.DB; --i; } - } - if((d&0x80) != 0) d |= -256; - if(k == 0 && (this.s&0x80) != (d&0x80)) ++k; - if(k > 0 || d != this.s) r[k++] = d; - } - } - return r; - } - - function bnEquals(a) { return(this.compareTo(a)==0); } - function bnMin(a) { return(this.compareTo(a)<0)?this:a; } - function bnMax(a) { return(this.compareTo(a)>0)?this:a; } - - // (protected) r = this op a (bitwise) - function bnpBitwiseTo(a,op,r) { - var i, f, m = Math.min(a.t,this.t); - for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]); - if(a.t < this.t) { - f = a.s&this.DM; - for(i = m; i < this.t; ++i) r[i] = op(this[i],f); - r.t = this.t; - } - else { - f = this.s&this.DM; - for(i = m; i < a.t; ++i) r[i] = op(f,a[i]); - r.t = a.t; - } - r.s = op(this.s,a.s); - r.clamp(); - } - - // (public) this & a - function op_and(x,y) { return x&y; } - function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; } - - // (public) this | a - function op_or(x,y) { return x|y; } - function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; } - - // (public) this ^ a - function op_xor(x,y) { return x^y; } - function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; } - - // (public) this & ~a - function op_andnot(x,y) { return x&~y; } - function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; } - - // (public) ~this - function bnNot() { - var r = nbi(); - for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i]; - r.t = this.t; - r.s = ~this.s; - return r; - } - - // (public) this << n - function bnShiftLeft(n) { - var r = nbi(); - if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r); - return r; - } - - // (public) this >> n - function bnShiftRight(n) { - var r = nbi(); - if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r); - return r; - } - - // return index of lowest 1-bit in x, x < 2^31 - function lbit(x) { - if(x == 0) return -1; - var r = 0; - if((x&0xffff) == 0) { x >>= 16; r += 16; } - if((x&0xff) == 0) { x >>= 8; r += 8; } - if((x&0xf) == 0) { x >>= 4; r += 4; } - if((x&3) == 0) { x >>= 2; r += 2; } - if((x&1) == 0) ++r; - return r; - } - - // (public) returns index of lowest 1-bit (or -1 if none) - function bnGetLowestSetBit() { - for(var i = 0; i < this.t; ++i) - if(this[i] != 0) return i*this.DB+lbit(this[i]); - if(this.s < 0) return this.t*this.DB; - return -1; - } - - // return number of 1 bits in x - function cbit(x) { - var r = 0; - while(x != 0) { x &= x-1; ++r; } - return r; - } - - // (public) return number of set bits - function bnBitCount() { - var r = 0, x = this.s&this.DM; - for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x); - return r; - } - - // (public) true iff nth bit is set - function bnTestBit(n) { - var j = Math.floor(n/this.DB); - if(j >= this.t) return(this.s!=0); - return((this[j]&(1<<(n%this.DB)))!=0); - } - - // (protected) this op (1<>= this.DB; - } - if(a.t < this.t) { - c += a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c += a[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += a.s; - } - r.s = (c<0)?-1:0; - if(c > 0) r[i++] = c; - else if(c < -1) r[i++] = this.DV+c; - r.t = i; - r.clamp(); - } - - // (public) this + a - function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; } - - // (public) this - a - function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; } - - // (public) this * a - function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; } - - // (public) this^2 - function bnSquare() { var r = nbi(); this.squareTo(r); return r; } - - // (public) this / a - function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; } - - // (public) this % a - function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; } - - // (public) [this/a,this%a] - function bnDivideAndRemainder(a) { - var q = nbi(), r = nbi(); - this.divRemTo(a,q,r); - return new Array(q,r); - } - - // (protected) this *= n, this >= 0, 1 < n < DV - function bnpDMultiply(n) { - this[this.t] = this.am(0,n-1,this,0,0,this.t); - ++this.t; - this.clamp(); - } - - // (protected) this += n << w words, this >= 0 - function bnpDAddOffset(n,w) { - if(n == 0) return; - while(this.t <= w) this[this.t++] = 0; - this[w] += n; - while(this[w] >= this.DV) { - this[w] -= this.DV; - if(++w >= this.t) this[this.t++] = 0; - ++this[w]; - } - } - - // A "null" reducer - function NullExp() {} - function nNop(x) { return x; } - function nMulTo(x,y,r) { x.multiplyTo(y,r); } - function nSqrTo(x,r) { x.squareTo(r); } - - NullExp.prototype.convert = nNop; - NullExp.prototype.revert = nNop; - NullExp.prototype.mulTo = nMulTo; - NullExp.prototype.sqrTo = nSqrTo; - - // (public) this^e - function bnPow(e) { return this.exp(e,new NullExp()); } - - // (protected) r = lower n words of "this * a", a.t <= n - // "this" should be the larger one if appropriate. - function bnpMultiplyLowerTo(a,n,r) { - var i = Math.min(this.t+a.t,n); - r.s = 0; // assumes a,this >= 0 - r.t = i; - while(i > 0) r[--i] = 0; - var j; - for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t); - for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i); - r.clamp(); - } - - // (protected) r = "this * a" without lower n words, n > 0 - // "this" should be the larger one if appropriate. - function bnpMultiplyUpperTo(a,n,r) { - --n; - var i = r.t = this.t+a.t-n; - r.s = 0; // assumes a,this >= 0 - while(--i >= 0) r[i] = 0; - for(i = Math.max(n-this.t,0); i < a.t; ++i) - r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n); - r.clamp(); - r.drShiftTo(1,r); - } - - // Barrett modular reduction - function Barrett(m) { - // setup Barrett - this.r2 = nbi(); - this.q3 = nbi(); - BigInteger.ONE.dlShiftTo(2*m.t,this.r2); - this.mu = this.r2.divide(m); - this.m = m; - } - - function barrettConvert(x) { - if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m); - else if(x.compareTo(this.m) < 0) return x; - else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; } - } - - function barrettRevert(x) { return x; } - - // x = x mod m (HAC 14.42) - function barrettReduce(x) { - x.drShiftTo(this.m.t-1,this.r2); - if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); } - this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3); - this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2); - while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1); - x.subTo(this.r2,x); - while(x.compareTo(this.m) >= 0) x.subTo(this.m,x); - } - - // r = x^2 mod m; x != r - function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - // r = x*y mod m; x,y != r - function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - - Barrett.prototype.convert = barrettConvert; - Barrett.prototype.revert = barrettRevert; - Barrett.prototype.reduce = barrettReduce; - Barrett.prototype.mulTo = barrettMulTo; - Barrett.prototype.sqrTo = barrettSqrTo; - - // (public) this^e % m (HAC 14.85) - function bnModPow(e,m) { - var i = e.bitLength(), k, r = nbv(1), z; - if(i <= 0) return r; - else if(i < 18) k = 1; - else if(i < 48) k = 3; - else if(i < 144) k = 4; - else if(i < 768) k = 5; - else k = 6; - if(i < 8) - z = new Classic(m); - else if(m.isEven()) - z = new Barrett(m); - else - z = new Montgomery(m); - - // precomputation - var g = new Array(), n = 3, k1 = k-1, km = (1< 1) { - var g2 = nbi(); - z.sqrTo(g[1],g2); - while(n <= km) { - g[n] = nbi(); - z.mulTo(g2,g[n-2],g[n]); - n += 2; - } - } - - var j = e.t-1, w, is1 = true, r2 = nbi(), t; - i = nbits(e[j])-1; - while(j >= 0) { - if(i >= k1) w = (e[j]>>(i-k1))&km; - else { - w = (e[j]&((1<<(i+1))-1))<<(k1-i); - if(j > 0) w |= e[j-1]>>(this.DB+i-k1); - } - - n = k; - while((w&1) == 0) { w >>= 1; --n; } - if((i -= n) < 0) { i += this.DB; --j; } - if(is1) { // ret == 1, don't bother squaring or multiplying it - g[w].copyTo(r); - is1 = false; - } - else { - while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; } - if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; } - z.mulTo(r2,g[w],r); - } - - while(j >= 0 && (e[j]&(1< 0) { - x.rShiftTo(g,x); - y.rShiftTo(g,y); - } - while(x.signum() > 0) { - if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x); - if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y); - if(x.compareTo(y) >= 0) { - x.subTo(y,x); - x.rShiftTo(1,x); - } - else { - y.subTo(x,y); - y.rShiftTo(1,y); - } - } - if(g > 0) y.lShiftTo(g,y); - return y; - } - - // (protected) this % n, n < 2^26 - function bnpModInt(n) { - if(n <= 0) return 0; - var d = this.DV%n, r = (this.s<0)?n-1:0; - if(this.t > 0) - if(d == 0) r = this[0]%n; - else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n; - return r; - } - - // (public) 1/this % m (HAC 14.61) - function bnModInverse(m) { - var ac = m.isEven(); - if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO; - var u = m.clone(), v = this.clone(); - var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1); - while(u.signum() != 0) { - while(u.isEven()) { - u.rShiftTo(1,u); - if(ac) { - if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); } - a.rShiftTo(1,a); - } - else if(!b.isEven()) b.subTo(m,b); - b.rShiftTo(1,b); - } - while(v.isEven()) { - v.rShiftTo(1,v); - if(ac) { - if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); } - c.rShiftTo(1,c); - } - else if(!d.isEven()) d.subTo(m,d); - d.rShiftTo(1,d); - } - if(u.compareTo(v) >= 0) { - u.subTo(v,u); - if(ac) a.subTo(c,a); - b.subTo(d,b); - } - else { - v.subTo(u,v); - if(ac) c.subTo(a,c); - d.subTo(b,d); - } - } - if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO; - if(d.compareTo(m) >= 0) return d.subtract(m); - if(d.signum() < 0) d.addTo(m,d); else return d; - if(d.signum() < 0) return d.add(m); else return d; - } - - var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997]; - var lplim = (1<<26)/lowprimes[lowprimes.length-1]; - - // (public) test primality with certainty >= 1-.5^t - function bnIsProbablePrime(t) { - var i, x = this.abs(); - if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) { - for(i = 0; i < lowprimes.length; ++i) - if(x[0] == lowprimes[i]) return true; - return false; - } - if(x.isEven()) return false; - i = 1; - while(i < lowprimes.length) { - var m = lowprimes[i], j = i+1; - while(j < lowprimes.length && m < lplim) m *= lowprimes[j++]; - m = x.modInt(m); - while(i < j) if(m%lowprimes[i++] == 0) return false; - } - return x.millerRabin(t); - } - - // (protected) true if probably prime (HAC 4.24, Miller-Rabin) - function bnpMillerRabin(t) { - var n1 = this.subtract(BigInteger.ONE); - var k = n1.getLowestSetBit(); - if(k <= 0) return false; - var r = n1.shiftRight(k); - t = (t+1)>>1; - if(t > lowprimes.length) t = lowprimes.length; - var a = nbi(); - for(var i = 0; i < t; ++i) { - //Pick bases at random, instead of starting at 2 - a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]); - var y = a.modPow(r,this); - if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) { - var j = 1; - while(j++ < k && y.compareTo(n1) != 0) { - y = y.modPowInt(2,this); - if(y.compareTo(BigInteger.ONE) == 0) return false; - } - if(y.compareTo(n1) != 0) return false; - } - } - return true; - } - - // protected - BigInteger.prototype.chunkSize = bnpChunkSize; - BigInteger.prototype.toRadix = bnpToRadix; - BigInteger.prototype.fromRadix = bnpFromRadix; - BigInteger.prototype.fromNumber = bnpFromNumber; - BigInteger.prototype.bitwiseTo = bnpBitwiseTo; - BigInteger.prototype.changeBit = bnpChangeBit; - BigInteger.prototype.addTo = bnpAddTo; - BigInteger.prototype.dMultiply = bnpDMultiply; - BigInteger.prototype.dAddOffset = bnpDAddOffset; - BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo; - BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo; - BigInteger.prototype.modInt = bnpModInt; - BigInteger.prototype.millerRabin = bnpMillerRabin; - - // public - BigInteger.prototype.clone = bnClone; - BigInteger.prototype.intValue = bnIntValue; - BigInteger.prototype.byteValue = bnByteValue; - BigInteger.prototype.shortValue = bnShortValue; - BigInteger.prototype.signum = bnSigNum; - BigInteger.prototype.toByteArray = bnToByteArray; - BigInteger.prototype.equals = bnEquals; - BigInteger.prototype.min = bnMin; - BigInteger.prototype.max = bnMax; - BigInteger.prototype.and = bnAnd; - BigInteger.prototype.or = bnOr; - BigInteger.prototype.xor = bnXor; - BigInteger.prototype.andNot = bnAndNot; - BigInteger.prototype.not = bnNot; - BigInteger.prototype.shiftLeft = bnShiftLeft; - BigInteger.prototype.shiftRight = bnShiftRight; - BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit; - BigInteger.prototype.bitCount = bnBitCount; - BigInteger.prototype.testBit = bnTestBit; - BigInteger.prototype.setBit = bnSetBit; - BigInteger.prototype.clearBit = bnClearBit; - BigInteger.prototype.flipBit = bnFlipBit; - BigInteger.prototype.add = bnAdd; - BigInteger.prototype.subtract = bnSubtract; - BigInteger.prototype.multiply = bnMultiply; - BigInteger.prototype.divide = bnDivide; - BigInteger.prototype.remainder = bnRemainder; - BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder; - BigInteger.prototype.modPow = bnModPow; - BigInteger.prototype.modInverse = bnModInverse; - BigInteger.prototype.pow = bnPow; - BigInteger.prototype.gcd = bnGCD; - BigInteger.prototype.isProbablePrime = bnIsProbablePrime; - - // JSBN-specific extension - BigInteger.prototype.square = bnSquare; - - // Expose the Barrett function - BigInteger.prototype.Barrett = Barrett - - // BigInteger interfaces not implemented in jsbn: - - // BigInteger(int signum, byte[] magnitude) - // double doubleValue() - // float floatValue() - // int hashCode() - // long longValue() - // static BigInteger valueOf(long val) - - // Random number generator - requires a PRNG backend, e.g. prng4.js - - // For best results, put code like - // - // in your main HTML document. - - var rng_state; - var rng_pool; - var rng_pptr; - - // Mix in a 32-bit integer into the pool - function rng_seed_int(x) { - rng_pool[rng_pptr++] ^= x & 255; - rng_pool[rng_pptr++] ^= (x >> 8) & 255; - rng_pool[rng_pptr++] ^= (x >> 16) & 255; - rng_pool[rng_pptr++] ^= (x >> 24) & 255; - if(rng_pptr >= rng_psize) rng_pptr -= rng_psize; - } - - // Mix in the current time (w/milliseconds) into the pool - function rng_seed_time() { - rng_seed_int(new Date().getTime()); - } - - // Initialize the pool with junk if needed. - if(rng_pool == null) { - rng_pool = new Array(); - rng_pptr = 0; - var t; - if(typeof window !== "undefined" && window.crypto) { - if (window.crypto.getRandomValues) { - // Use webcrypto if available - var ua = new Uint8Array(32); - window.crypto.getRandomValues(ua); - for(t = 0; t < 32; ++t) - rng_pool[rng_pptr++] = ua[t]; - } - else if(navigator.appName == "Netscape" && navigator.appVersion < "5") { - // Extract entropy (256 bits) from NS4 RNG if available - var z = window.crypto.random(32); - for(t = 0; t < z.length; ++t) - rng_pool[rng_pptr++] = z.charCodeAt(t) & 255; - } - } - while(rng_pptr < rng_psize) { // extract some randomness from Math.random() - t = Math.floor(65536 * Math.random()); - rng_pool[rng_pptr++] = t >>> 8; - rng_pool[rng_pptr++] = t & 255; - } - rng_pptr = 0; - rng_seed_time(); - //rng_seed_int(window.screenX); - //rng_seed_int(window.screenY); - } - - function rng_get_byte() { - if(rng_state == null) { - rng_seed_time(); - rng_state = prng_newstate(); - rng_state.init(rng_pool); - for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) - rng_pool[rng_pptr] = 0; - rng_pptr = 0; - //rng_pool = null; - } - // TODO: allow reseeding after first request - return rng_state.next(); - } - - function rng_get_bytes(ba) { - var i; - for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte(); - } - - function SecureRandom() {} - - SecureRandom.prototype.nextBytes = rng_get_bytes; - - // prng4.js - uses Arcfour as a PRNG - - function Arcfour() { - this.i = 0; - this.j = 0; - this.S = new Array(); - } - - // Initialize arcfour context from key, an array of ints, each from [0..255] - function ARC4init(key) { - var i, j, t; - for(i = 0; i < 256; ++i) - this.S[i] = i; - j = 0; - for(i = 0; i < 256; ++i) { - j = (j + this.S[i] + key[i % key.length]) & 255; - t = this.S[i]; - this.S[i] = this.S[j]; - this.S[j] = t; - } - this.i = 0; - this.j = 0; - } - - function ARC4next() { - var t; - this.i = (this.i + 1) & 255; - this.j = (this.j + this.S[this.i]) & 255; - t = this.S[this.i]; - this.S[this.i] = this.S[this.j]; - this.S[this.j] = t; - return this.S[(t + this.S[this.i]) & 255]; - } - - Arcfour.prototype.init = ARC4init; - Arcfour.prototype.next = ARC4next; - - // Plug in your RNG constructor here - function prng_newstate() { - return new Arcfour(); - } - - // Pool size must be a multiple of 4 and greater than 32. - // An array of bytes the size of the pool will be passed to init() - var rng_psize = 256; - - BigInteger.SecureRandom = SecureRandom; - BigInteger.BigInteger = BigInteger; - if (typeof exports !== 'undefined') { - exports = module.exports = BigInteger; - } else { - this.BigInteger = BigInteger; - this.SecureRandom = SecureRandom; - } - -}).call(this); diff --git a/node_modules/jsbn/package.json b/node_modules/jsbn/package.json deleted file mode 100644 index c679543a..00000000 --- a/node_modules/jsbn/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "_args": [ - [ - "jsbn@0.1.1", - "E:\\python\\setup-php" - ] - ], - "_development": true, - "_from": "jsbn@0.1.1", - "_id": "jsbn@0.1.1", - "_inBundle": false, - "_integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "_location": "/jsbn", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "jsbn@0.1.1", - "name": "jsbn", - "escapedName": "jsbn", - "rawSpec": "0.1.1", - "saveSpec": null, - "fetchSpec": "0.1.1" - }, - "_requiredBy": [ - "/ecc-jsbn", - "/sshpk" - ], - "_resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "_spec": "0.1.1", - "_where": "E:\\python\\setup-php", - "author": { - "name": "Tom Wu" - }, - "bugs": { - "url": "https://github.com/andyperlitch/jsbn/issues" - }, - "description": "The jsbn library is a fast, portable implementation of large-number math in pure JavaScript, enabling public-key crypto and other applications on desktop and mobile browsers.", - "homepage": "https://github.com/andyperlitch/jsbn#readme", - "keywords": [ - "biginteger", - "bignumber", - "big", - "integer" - ], - "license": "MIT", - "main": "index.js", - "name": "jsbn", - "repository": { - "type": "git", - "url": "git+https://github.com/andyperlitch/jsbn.git" - }, - "scripts": { - "test": "mocha test.js" - }, - "version": "0.1.1" -} diff --git a/node_modules/jsdom/Changelog.md b/node_modules/jsdom/Changelog.md deleted file mode 100644 index dee367af..00000000 --- a/node_modules/jsdom/Changelog.md +++ /dev/null @@ -1,1532 +0,0 @@ -## 11.12.0 - -* Added `window.localStorage`, `window.sessionStorage`, and `StorageEvent` support. These are currently only stored in-memory; file an issue if you need persistent (on-disk) storage capability so we can discuss adding that. This feature includes the new `storageQuota` option for controlling how much can be stored. -* Added `element.closest()`. (caub) -* Changed `"hashchange"` and `"popstate"` events to no longer bubble, per a specification update. -* Fixed the old API in Node.js v10 to not throw, when given input that is not a valid file path (such as a typical HTML string). -* Upgraded `cssstyle` to v1.0.0, bringing along various fixes to our CSS parser and object model. (eddies) -* Upgraded `nwsapi` to v2.0.7, bringing along various fixes to our selector engine. - -## 11.11.0 - -* Added `node.getRootNode()`. (FrecksterGIT) -* Added `label.control`. (FrecksterGIT) -* Added `el.labels` for form control elements. (FrecksterGIT) -* Fixed the `contentType` of `Document`s created through `